@spicenet-io/spiceflow-ui 4.23.2 → 4.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-privy.cjs +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/components/SpiceWithdraw/lib/executors.d.ts +1 -0
- package/dist/components/SpiceWithdraw/lib/feePreview.d.ts +1 -0
- package/dist/components/SpiceWithdraw/lib/helpers.d.ts +1 -1
- package/dist/hooks/useSpiceExecution.d.ts +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +7 -7
- package/dist/privy-BaBNtCrc.js +2 -0
- package/dist/privy-CXNjXMtm.cjs +1 -0
- package/dist/utils/relayer/index.d.ts +1 -0
- package/dist/utils/spiceConstants.d.ts +1 -0
- package/package.json +2 -2
- package/dist/privy-CDtAaiTV.js +0 -2
- package/dist/privy-D01MvNL9.cjs +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){if(typeof document==="undefined"||document.getElementById("spiceflow-styles"))return;var s=document.createElement("style");s.id="spiceflow-styles";s.textContent="@keyframes spiceflow-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{border-radius:4px;outline:2px solid currentColor;outline-offset:2px}@media (forced-colors:active){.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{outline:2px solid Highlight}}.ibm-plex-mono-thin{font-weight:100}.ibm-plex-mono-extralight,.ibm-plex-mono-thin{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-extralight{font-weight:200}.ibm-plex-mono-light{font-weight:300}.ibm-plex-mono-light,.ibm-plex-mono-regular{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-regular{font-weight:400}.ibm-plex-mono-medium{font-weight:500}.ibm-plex-mono-medium,.ibm-plex-mono-semibold{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-semibold{font-weight:600}.ibm-plex-mono-bold{font-family:IBM Plex Mono,monospace!important;font-style:normal;font-weight:700}#privy-modal-content button{border-radius:6px;font-family:IBM Plex Mono,monospace!important;font-size:small;letter-spacing:-.5px;text-transform:uppercase}#privy-modal-content input{background:#fff;border-radius:6px;padding-top:5px!important}#privy-dialog-title{display:none!important;font-size:18px;padding-bottom:10px;padding-top:10px}.AppLogoContainer-sc-a206bd44-0{display:none}#privy-modal-content{background:var(--Neutral-0,#fafafa);border:6px solid var(--Neutral-1,#e9e9e9);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),0 330px 92px transparent,0 211px 84px rgba(0,0,0,.01),0 119px 71px rgba(0,0,0,.05),0 53px 53px rgba(0,0,0,.09),0 13px 29px rgba(0,0,0,.1);height:auto!important;padding-bottom:10px}.Subtitle-sc-ddbf22b4-4{font-size:12px;margin-top:-14px;opacity:.5}.StyledLink-sc-1c6127e5-0{background:none!important}.StyledLink-sc-c8577138-0,.login-method-button{font-family:IBM Plex Mono,monospace!important}.StyledLink-sc-c8577138-0{font-style:uppercase}#protected-by-privy{color:#000!important}";document.head.appendChild(s)})();
|
|
2
|
-
"use strict";var Gd=Object.create;var Ai=Object.defineProperty;var Kd=Object.getOwnPropertyDescriptor;var Yd=Object.getOwnPropertyNames;var Zd=Object.getPrototypeOf,Xd=Object.prototype.hasOwnProperty;var Jd=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Yd(t))!Xd.call(e,r)&&r!==n&&Ai(e,r,{get:()=>t[r],enumerable:!(s=Kd(t,r))||s.enumerable});return e};var $d=(e,t,n)=>(n=e!=null?Gd(Zd(e)):{},Jd(t||!e||!e.__esModule?Ai(n,"default",{value:e,enumerable:!0}):n,e));const c=require("react/jsx-runtime"),l=require("./privy-D01MvNL9.cjs"),p=require("react"),S=require("@spicenet-io/spiceflow-core"),as=require("wagmi"),N=require("viem"),Kn=require("viem/actions"),mr=require("@privy-io/react-auth"),hr=require("react-dom");require("@tanstack/react-query");const _d="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;200;300;400;500;600;700&display=swap",eu="spiceflow-ibm-plex-mono",tu="spiceflow-preconnect-googleapis",nu="spiceflow-preconnect-gstatic";function zo(e,t){if(document.getElementById(e))return;const n=t();n.id=e,document.head.appendChild(n)}function su(){typeof document>"u"||(zo(tu,()=>{const e=document.createElement("link");return e.rel="preconnect",e.href="https://fonts.googleapis.com",e}),zo(nu,()=>{const e=document.createElement("link");return e.rel="preconnect",e.href="https://fonts.gstatic.com",e.crossOrigin="",e}),zo(eu,()=>{const e=document.createElement("link");return e.rel="stylesheet",e.href=_d,e}))}const Ei=N.parseAbi(["function exactInput((address[] tokens,address[] pools,bytes[] extensionDatas,uint256 zeroForOneBitMap,uint128 amountIn,uint128 amountOutMinimum,address recipient,uint256 deadline) params) payable returns (uint256 amountOut)","function exactOutput((address[] tokens,address[] pools,bytes[] extensionDatas,uint256 zeroForOneBitMap,uint128 amountOut,uint128 amountInMaximum,address recipient,uint256 deadline) params) payable returns (uint256 amountIn)"]),qn={name:"Metric",chainIds:[1,56,4663],apiUrl:"https://api.metric.xyz",swapRouter:"0x02201E6f13c41506c7Bb635d7543F98826229aB7"},ru=[1,56,137,143,999,4326,4663,8453,42161,43114];async function Fi(e,t,n,s,r,o){if(S.isNativeToken(n)||S.isNativeToken(s)||l.addressesEqual(n,s)||!(e.chainIds??qn.chainIds).includes(t))return null;const i=(e.apiUrl??qn.apiUrl).replace(/\/$/,""),a=AbortSignal.timeout(6e3),d=await fetch(`${i}/public/v1/evm/${t}/route`,{method:"POST",headers:{"Content-Type":"application/json"},signal:a,body:JSON.stringify({tokenIn:n,tokenOut:s,tradeType:o,[o==="exact_in"?"amountIn":"amountOut"]:r.toString(),maxRoutes:1})});if(d.status===422)return null;if(!d.ok)throw new l.SpiceflowError("VENUE_API_ERROR",`Metric route HTTP ${d.status}`,{chainId:t});const u=await d.json(),m=u.routes[0],f=BigInt(u.amountIn),h=BigInt(u.amountOut);if(u.routes.length!==1||!m||!m.legs.length||m.legs.length>2||u.tradeType!==o||!l.addressesEqual(u.tokenIn,n)||!l.addressesEqual(u.tokenOut,s)||f<=0n||h<=0n||(o==="exact_in"?f:h)!==r||BigInt(m.amountIn)!==f||BigInt(m.amountOut)!==h)throw new l.SpiceflowError("VENUE_API_ERROR","Invalid Metric route",{chainId:t});const y=m.legs.map(E=>E.poolAddress),g=new URL(`${i}/public/v1/evm/${t}/metadata`);g.searchParams.set("addresses",y.join(","));const x=await fetch(g,{signal:a});if(!x.ok)throw new l.SpiceflowError("VENUE_API_ERROR",`Metric metadata HTTP ${x.status}`,{chainId:t});const w=await x.json(),v=[n];let C=0n;for(const[E,k]of m.legs.entries()){const F=w.data.find(j=>l.addressesEqual(j.poolAddress,k.poolAddress));if(!F||F.priceProviderStatus!=="healthy"||F.pauseLevel!==0)return null;if(typeof k.zeroForOne!="boolean"||!l.addressesEqual(v[E],k.tokenIn)||!l.addressesEqual(k.tokenIn,k.zeroForOne?F.token0:F.token1)||!l.addressesEqual(k.tokenOut,k.zeroForOne?F.token1:F.token0))throw new l.SpiceflowError("VENUE_API_ERROR","Invalid Metric pool path",{chainId:t});v.push(k.tokenOut),k.zeroForOne&&(C|=1n<<BigInt(E))}if(!l.addressesEqual(v[v.length-1],s))throw new l.SpiceflowError("VENUE_API_ERROR","Invalid Metric output token",{chainId:t});return{amountIn:f,amountOut:h,path:{tokens:v,pools:y,extensionDatas:y.map(()=>"0x"),zeroForOneBitMap:C}}}function Ti(e={}){const t=e.swapRouter??qn.swapRouter;return{name:e.name??qn.name,chainIds:e.chainIds??qn.chainIds,resolve:async(n,s,r)=>{const o=await Fi(e,s,n.tokenIn,n.tokenOut,n.amountIn,"exact_in");if(!o)return null;const i=S.applySlippage(o.amountOut,n.maxSlippage??.02);return{venue:e.name??qn.name,amountOut:o.amountOut,amountOutMinimum:i,calls:[{to:n.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[t,n.amountIn]})},{to:t,value:0n,data:N.encodeFunctionData({abi:Ei,functionName:"exactInput",args:[{...o.path,amountIn:n.amountIn,amountOutMinimum:i,recipient:r,deadline:BigInt(Math.floor(Date.now()/1e3)+1200)}]})}]}}}}function Ri(e={}){return{name:e.name??qn.name,chainIds:e.chainIds??qn.chainIds,resolve:async(t,n,s)=>{const r=await Fi(e,n,t.tokenIn,t.tokenOut,t.amountOut,"exact_out");if(!r)return null;const o=BigInt(Math.round((t.maxSlippage??.02)*1e4)),i=r.amountIn+(r.amountIn*o+9999n)/10000n;return{venue:e.name??qn.name,amountIn:r.amountIn,amountInMax:i,amountOut:t.amountOut,calls:[{to:e.swapRouter??qn.swapRouter,value:0n,data:N.encodeFunctionData({abi:Ei,functionName:"exactOutput",args:[{...r.path,amountOut:t.amountOut,amountInMaximum:i,recipient:s,deadline:BigInt(Math.floor(Date.now()/1e3)+1200)}]})}]}}}}const ou={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",84532:"0x4200000000000000000000000000000000000006"},Bi=N.parseAbi(["function deposit() payable","function withdraw(uint256 wad)"]);function Ho(e){return l.getChainConfig(e)?.wrappedNativeTokenAddress??ou[e]}const Vo=(e,t)=>({to:e,value:t,data:N.encodeFunctionData({abi:Bi,functionName:"deposit"})}),Qo=(e,t)=>({to:e,value:0n,data:N.encodeFunctionData({abi:Bi,functionName:"withdraw",args:[t]})});function Go(e,t,n){const s=S.isNativeToken(t),r=S.isNativeToken(n);if(!s&&!r)return null;const o=Ho(e);return o?{weth:o,wrapIn:s,unwrapOut:r}:null}function Oi(e,t,n,s){const r=Go(e,t,n);return!r||s<=0n?null:r.wrapIn&&!r.unwrapOut&&n.toLowerCase()===r.weth.toLowerCase()?[Vo(r.weth,s)]:r.unwrapOut&&!r.wrapIn&&t.toLowerCase()===r.weth.toLowerCase()?[Qo(r.weth,s)]:null}function au(e){return{...e,resolve:async(t,n,s,r)=>{const o=Oi(n,t.tokenIn,t.tokenOut,t.amountIn);if(o)return{venue:"native-wrap",amountOut:t.amountIn,amountOutMinimum:t.amountIn,calls:o};const i=await e.resolve(t,n,s,r);if(i)return i;const a=Go(n,t.tokenIn,t.tokenOut);if(!a)return null;const d=await e.resolve({...t,tokenIn:a.wrapIn?a.weth:t.tokenIn,tokenOut:a.unwrapOut?a.weth:t.tokenOut},n,s,r);return d?{...d,calls:[...a.wrapIn?[Vo(a.weth,t.amountIn)]:[],...d.calls,...a.unwrapOut?[Qo(a.weth,d.amountOutMinimum)]:[]]}:null}}}function iu(e){return{...e,resolve:async(t,n,s)=>{const r=Oi(n,t.tokenIn,t.tokenOut,t.amountOut);if(r)return{venue:"native-wrap",amountIn:t.amountOut,amountInMax:t.amountOut,amountOut:t.amountOut,calls:r};const o=await e.resolve(t,n,s);if(o)return o;const i=Go(n,t.tokenIn,t.tokenOut);if(!i)return null;const a=await e.resolve({...t,tokenIn:i.wrapIn?i.weth:t.tokenIn,tokenOut:i.unwrapOut?i.weth:t.tokenOut},n,s);return a?{...a,calls:[...i.wrapIn?[Vo(i.weth,a.amountInMax)]:[],...a.calls,...i.unwrapOut?[Qo(i.weth,a.amountOut)]:[]]}:null}}}const ji=[100,500,3e3,1e4];function eo(e,t,n,s,r){const o=[];for(const i of n){const a=typeof i=="object"&&!Array.isArray(i)?i:void 0,d=a?a.tokens:Array.isArray(i)?i:[i];if(!d.length||d.length>2)throw new Error("A v3 route must have one or two intermediate tokens");const u=[e,...d,t];if(a&&(a.feeTiers.length!==u.length-1||a.feeTiers.some(f=>!f.length)))throw new Error("A v3 route needs fee tiers for every pool");if(new Set(u.map(f=>f.toLowerCase())).size!==u.length)continue;const m=(f,h)=>{if(f===u.length){o.push(r==="in"?h:Di(h));return}for(const y of a?.feeTiers[f-1]??s)m(f+1,N.concatHex([h,N.encodePacked(["uint24","address"],[y,u[f]])]))};m(1,u[0])}return[...new Set(o)]}function Di(e){const t=e.slice(2),n=[];for(let s=0;s<t.length;){const r=n.length%2===0?40:6;n.push(t.slice(s,s+r)),s+=r}return`0x${n.reverse().join("")}`}const cu=N.parseAbi(["function exactOutputSingle((address tokenIn, address tokenOut, uint24 fee, address recipient, uint256 amountOut, uint256 amountInMaximum, uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountIn)","function exactOutput((bytes path, address recipient, uint256 amountOut, uint256 amountInMaximum) params) payable returns (uint256 amountIn)"]),lu=N.parseAbi(["function exactOutputSingle((address tokenIn, address tokenOut, uint24 fee, address recipient, uint256 deadline, uint256 amountOut, uint256 amountInMaximum, uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountIn)","function exactOutput((bytes path, address recipient, uint256 deadline, uint256 amountOut, uint256 amountInMaximum) params) payable returns (uint256 amountIn)"]),du=1800;function Ni(e){const{config:t,route:n,tokenIn:s,tokenOut:r,recipient:o,amountOut:i}=e,a=e.amountInMaximum,d=e.routerHasDeadline?lu:cu,u=e.routerHasDeadline?{deadline:BigInt(Math.floor(Date.now()/1e3)+du)}:{},m=n.path?N.encodeFunctionData({abi:d,functionName:"exactOutput",args:[{path:n.path,recipient:o,...u,amountOut:i,amountInMaximum:a}]}):N.encodeFunctionData({abi:d,functionName:"exactOutputSingle",args:[{tokenIn:s,tokenOut:r,fee:n.fee,recipient:o,...u,amountOut:i,amountInMaximum:a,sqrtPriceLimitX96:0n}]});return{to:t.swapRouter,value:0n,data:m}}const uu=N.parseAbi(["function quoteExactInput(bytes path, uint256 amountIn) returns (uint256 amountOut, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)","function quoteExactOutput(bytes path, uint256 amountOut) returns (uint256 amountIn, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)"]);async function gr(e,t,n,s,r){const o=l.getClientForChain(e),{result:i}=await o.simulateContract({address:t.quoterV2,abi:uu,functionName:r==="in"?"quoteExactInput":"quoteExactOutput",args:[n,s]}),[a,,,d]=i;if(a<=0n)throw new Error("No liquidity along this path.");return{amount:a,gasEstimate:d}}async function pu(e){const{tokenIn:t,tokenOut:n,amountIn:s,fee:r,chainId:o,config:i}=e;if(s<=0n)throw new Error("amountIn must be greater than 0");const a=(await l.getClientForChain(o).simulateContract({address:i.quoterV2,abi:S.uniV3QuoterV2Abi,functionName:"quoteExactInputSingle",args:[{tokenIn:t,tokenOut:n,amountIn:s,fee:r,sqrtPriceLimitX96:0n}]})).result;if(a[0]<=0n)throw new Error("No liquidity found for this pair. The pool returned 0 output.");return{amountOut:a[0],sqrtPriceX96After:a[1],gasEstimate:a[3]}}async function Mi(e){const t=e.feeTiers??ji,n=eo(e.tokenIn,e.tokenOut,e.hubs??[],t,"in"),s=await Promise.allSettled([...t.map(async o=>({...await pu({...e,fee:o}),fee:o})),...n.map(async o=>{const i=await gr(e.chainId,e.config,o,e.amountIn,"in");return{amountOut:i.amount,sqrtPriceX96After:0n,gasEstimate:i.gasEstimate,fee:0,path:o}})]);let r=null;for(const o of s)o.status==="fulfilled"&&(!r||o.value.amountOut>r.amountOut)&&(r=o.value);if(!r)throw new Error("No liquidity found for this pair on any fee tier.");return r}const fu=[{inputs:[{components:[{name:"tokenIn",type:"address"},{name:"tokenOut",type:"address"},{name:"amount",type:"uint256"},{name:"fee",type:"uint24"},{name:"sqrtPriceLimitX96",type:"uint160"}],name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{name:"amountIn",type:"uint256"},{name:"sqrtPriceX96After",type:"uint160"},{name:"initializedTicksCrossed",type:"uint32"},{name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];async function mu(e){const{tokenIn:t,tokenOut:n,amountOut:s,fee:r,chainId:o,config:i}=e;if(s<=0n)throw new Error("amountOut must be greater than 0");const a=(await l.getClientForChain(o).simulateContract({address:i.quoterV2,abi:fu,functionName:"quoteExactOutputSingle",args:[{tokenIn:t,tokenOut:n,amount:s,fee:r,sqrtPriceLimitX96:0n}]})).result;if(a[0]<=0n)throw new Error("No liquidity found for this pair. The pool returned 0 input.");return{amountIn:a[0],sqrtPriceX96After:a[1],gasEstimate:a[3]}}async function Pi(e){const t=e.feeTiers??ji,n=eo(e.tokenIn,e.tokenOut,e.hubs??[],t,"out"),s=await Promise.allSettled([...t.map(async o=>({...await mu({...e,fee:o}),fee:o})),...n.map(async o=>{const i=await gr(e.chainId,e.config,o,e.amountOut,"out");return{amountIn:i.amount,sqrtPriceX96After:0n,gasEstimate:i.gasEstimate,fee:0,path:o}})]);let r=null;for(const o of s)o.status==="fulfilled"&&(!r||o.value.amountIn<r.amountIn)&&(r=o.value);if(!r)throw new Error("No liquidity found for this pair on any fee tier.");return r}function hu(e){return e.type==="swap"}const wr=.02,gu=[1,8453,42161,10,137,43114,56],wu="https://api.1inch.dev/swap/v6.0";function Ko(e,t){return S.applySlippage(e,t)}function xu(e){const t=e?.baseUrl??wu;return{name:"1inch",chainIds:e?.chainIds??gu,resolve:async(n,s,r)=>{const o=n.maxSlippage??wr,i=o*100,a=S.isNativeToken(n.tokenIn)?S.NATIVE_TOKEN_ADDRESS:n.tokenIn,d=S.isNativeToken(n.tokenOut)?S.NATIVE_TOKEN_ADDRESS:n.tokenOut,u=S.isNativeToken(n.tokenIn);try{const m=new URL(`${t}/${s}/swap`);m.searchParams.set("src",a),m.searchParams.set("dst",d),m.searchParams.set("amount",n.amountIn.toString()),m.searchParams.set("from",r),m.searchParams.set("slippage",i.toString()),m.searchParams.set("disableEstimate","true"),m.searchParams.set("allowPartialFill","false");const f={Accept:"application/json"};e?.apiKey&&(f.Authorization=`Bearer ${e.apiKey}`);const h=await fetch(m.toString(),{headers:f});if(!h.ok)throw new l.SpiceflowError("VENUE_API_ERROR",`[1inchVenue] API returned ${h.status} for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}`,{venue:"1inch",chainId:s,tokenIn:n.tokenIn,tokenOut:n.tokenOut,amountIn:n.amountIn.toString(),cause:`HTTP ${h.status}`});const y=await h.json();if(!y.dstAmount||!y.tx)return console.warn(`[1inchVenue] No route data for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}`),null;const g=BigInt(y.dstAmount);if(g<=0n)return console.warn(`[1inchVenue] Zero output for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}`),null;const x=Ko(g,o),w=[];return y.tx.to&&!u&&w.push({to:n.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[y.tx.to,n.amountIn]})}),w.push({to:y.tx.to,value:BigInt(y.tx.value||"0"),data:y.tx.data}),{venue:"1inch",amountOut:g,amountOutMinimum:x,calls:w}}catch(m){if(m instanceof l.SpiceflowError)throw m;const f=m instanceof Error?m.message:String(m);throw new l.SpiceflowError("VENUE_API_ERROR",`[1inchVenue] Exception for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}: ${f}`,{venue:"1inch",chainId:s,tokenIn:n.tokenIn,tokenOut:n.tokenOut,amountIn:n.amountIn.toString(),cause:f})}}}}const Ui=[4114,5115],Yo={name:"Satsuma",swapRouter:"0x565eD3D57fe40f78A46f348C220121AE093c3cF8",quoterV2:"0x428f20dd8926Eabe19653815Ed0BE7D6c36f8425",feeTiers:[3e3]},Wi={name:"Uniswap v3",swapRouter:"0x2626664c2603336E57B271c5C0b26F421741e481",quoterV2:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",chainIds:[8453],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x4200000000000000000000000000000000000006","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},qi={name:"Uniswap v3",swapRouter:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",quoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",chainIds:[1],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},Li={name:"Uniswap v3",swapRouter:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",quoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",chainIds:[42161],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x82aF49447D8a07e3bd95BD0d56f35241523fBab1","0xaf88d065e77c8cC2239327C5EDb3A432268e5831"]},yu={name:"Uniswap v3",swapRouter:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",quoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",chainIds:[137],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270","0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"]},bu={name:"Uniswap v3",swapRouter:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",quoterV2:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",chainIds:[56],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c","0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"]},vu={name:"Uniswap v3",swapRouter:"0xfe31f71c1b106eac32f1a19239c9a9a72ddfb900",quoterV2:"0x661e93cca42afacb172121ef892830ca3b70f08d",chainIds:[143],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A","0x754704Bc059F8C67012fEd69BC8A327a5aafb603"]},zi={name:"Uniswap v3",swapRouter:"0xcaf681a66d020601342297493863e78c959e5cb2",quoterV2:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",chainIds:[4663],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x0bd7d308f8e1639fab988df18a8011f41eacad73","0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"]},Hi={name:"SushiSwap",swapRouter:"0x1e406484F1F204b23cE84B9901C0171a738fd406",quoterV2:"0x3E290e5E01818002A0b672148BdC7514D861C7B3",chainIds:[4663],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x0bd7d308f8e1639fab988df18a8011f41eacad73","0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"],routerHasDeadline:!0},Vi=N.parseAbi(["function exactInput((bytes path, address recipient, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]),Qi=N.parseAbi(["function exactInputSingle((address tokenIn, address tokenOut, uint24 fee, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum, uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountOut)","function exactInput((bytes path, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]),Cu=N.parseAbi(["function exactInput((bytes path, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]),ku=N.parseAbi(["function exactOutput((bytes path, address recipient, uint256 deadline, uint256 amountOut, uint256 amountInMaximum) params) payable returns (uint256 amountIn)"]),Zo=1800,Gi=[1,50,100,200,2e3],xr={name:"Aerodrome",swapRouter:"0xcbBb8035cAc7D4B3Ca7aBb74cF7BdF900215Ce0D",quoterV2:"0x3d4C22254F86f64B7eC90ab8F7aeC1FBFD271c6C",chainIds:[8453],hubCurrencies:["0x4200000000000000000000000000000000000006","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]};function yr(e){const t=e.name??"Aerodrome",n=e.chainIds??[8453],s=e.tickSpacings??Gi;return{name:t,chainIds:n,resolve:async(r,o,i)=>{if(S.isNativeToken(r.tokenIn)||S.isNativeToken(r.tokenOut))return null;const a=r.maxSlippage??wr,d=[...s.map(w=>N.encodePacked(["address","uint24","address"],[r.tokenIn,w,r.tokenOut])),...eo(r.tokenIn,r.tokenOut,e.hubCurrencies??[],s,"in")],u={quoterV2:e.quoterV2},m=await Promise.allSettled(d.map(async w=>({path:w,amountOut:(await gr(o,u,w,r.amountIn,"in")).amount})));let f=null;for(const w of m)w.status==="fulfilled"&&(!f||w.value.amountOut>f.amountOut)&&(f=w.value);if(!f)return console.warn(`[AerodromeVenue] No viable route for ${r.tokenIn} \u2192 ${r.tokenOut} on chain ${o}.`),null;const h=Ko(f.amountOut,a),y=e.deadline??BigInt(Math.floor(Date.now()/1e3)+Zo),g=N.encodeFunctionData({abi:Cu,functionName:"exactInput",args:[{path:f.path,recipient:i,deadline:y,amountIn:r.amountIn,amountOutMinimum:h}]}),x=[{to:r.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.swapRouter,r.amountIn]})},{to:e.swapRouter,value:0n,data:g}];return{venue:t,amountOut:f.amountOut,amountOutMinimum:h,calls:x}}}}function Ki(e){const t=e.name??"Aerodrome",n=e.chainIds??[8453],s=e.tickSpacings??Gi;return{name:t,chainIds:n,resolve:async(r,o,i)=>{if(S.isNativeToken(r.tokenIn)||S.isNativeToken(r.tokenOut))return null;const a=r.maxSlippage??wr,d=[...s.map(x=>N.encodePacked(["address","uint24","address"],[r.tokenOut,x,r.tokenIn])),...eo(r.tokenIn,r.tokenOut,e.hubCurrencies??[],s,"out")],u={quoterV2:e.quoterV2},m=await Promise.allSettled(d.map(async x=>({path:x,amountIn:(await gr(o,u,x,r.amountOut,"out")).amount})));let f=null;for(const x of m)x.status==="fulfilled"&&(!f||x.value.amountIn<f.amountIn)&&(f=x.value);if(!f)return console.warn(`[AerodromeExactOutputVenue] No viable route for ${r.tokenIn} \u2192 ${r.tokenOut} on chain ${o}.`),null;const h=BigInt(Math.round(a*1e4)),y=f.amountIn+f.amountIn*h/10000n,g=e.deadline??BigInt(Math.floor(Date.now()/1e3)+Zo);return{venue:t,amountIn:f.amountIn,amountInMax:y,amountOut:r.amountOut,calls:[{to:e.swapRouter,value:0n,data:N.encodeFunctionData({abi:ku,functionName:"exactOutput",args:[{path:f.path,recipient:i,deadline:g,amountOut:r.amountOut,amountInMaximum:y}]})}]}}}}function br(e){const t=e.name??"Uniswap v3",n=e.chainIds??Ui;return{name:t,chainIds:n,resolve:async(s,r,o,i)=>{if(S.isNativeToken(s.tokenIn)||S.isNativeToken(s.tokenOut))return null;const a=s.maxSlippage??wr;let d;try{let g;if(i){if(i.venue!==t)return null;const x=i.calls.find(v=>v.to.toLowerCase()===e.swapRouter.toLowerCase());if(!x)return null;const w=N.decodeFunctionData({abi:e.routerHasDeadline?Qi:[...Vi,...S.uniV3SwapRouterAbi],data:x.data});if(w.functionName==="exactInput"){const{path:v}=w.args[0];if(v.slice(0,42).toLowerCase()!==s.tokenIn.toLowerCase()||`0x${v.slice(-40)}`.toLowerCase()!==s.tokenOut.toLowerCase())return null;g={path:v,fee:0}}else if(w.functionName==="exactInputSingle"){const{tokenIn:v,tokenOut:C,fee:E}=w.args[0];if(v.toLowerCase()!==s.tokenIn.toLowerCase()||C.toLowerCase()!==s.tokenOut.toLowerCase())return null;g={fee:E}}else return null}d=g?.path?{...g,amountOut:(await gr(r,e,g.path,s.amountIn,"in")).amount}:await Mi({tokenIn:s.tokenIn,tokenOut:s.tokenOut,amountIn:s.amountIn,chainId:r,config:{swapRouter:e.swapRouter,quoterV2:e.quoterV2},feeTiers:g?[g.fee]:e.feeTiers,hubs:g?[]:[...e.hubCurrencies??[],...e.hubPaths??[]]})}catch{return console.warn(`[UniV3Venue] No viable route for ${s.tokenIn} \u2192 ${s.tokenOut} on chain ${r}.`),null}const u=Ko(d.amountOut,a),m=e.routerHasDeadline?{deadline:BigInt(Math.floor(Date.now()/1e3)+Zo)}:{},f=e.routerHasDeadline?Qi:d.path?Vi:S.uniV3SwapRouterAbi,h=d.path?N.encodeFunctionData({abi:f,functionName:"exactInput",args:[{path:d.path,recipient:o,...m,amountIn:s.amountIn,amountOutMinimum:u}]}):N.encodeFunctionData({abi:f,functionName:"exactInputSingle",args:[{tokenIn:s.tokenIn,tokenOut:s.tokenOut,fee:d.fee,recipient:o,...m,amountIn:s.amountIn,amountOutMinimum:u,sqrtPriceLimitX96:0n}]}),y=[{to:s.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.swapRouter,s.amountIn]})},{to:e.swapRouter,value:0n,data:h}];return{venue:t,amountOut:d.amountOut,amountOutMinimum:u,calls:y}}}}function Xo(e){const t=e.name??"Uniswap v3",n=e.chainIds??Ui;return{name:t,chainIds:n,resolve:async(s,r,o)=>{if(S.isNativeToken(s.tokenIn)||S.isNativeToken(s.tokenOut))return null;const i=s.maxSlippage??wr;let a;try{a=await Pi({tokenIn:s.tokenIn,tokenOut:s.tokenOut,amountOut:s.amountOut,chainId:r,config:{swapRouter:e.swapRouter,quoterV2:e.quoterV2},feeTiers:e.feeTiers,hubs:[...e.hubCurrencies??[],...e.hubPaths??[]]})}catch{return null}const d=BigInt(Math.round(i*1e4)),u=a.amountIn+a.amountIn*d/10000n;return{venue:t,amountIn:a.amountIn,amountInMax:u,amountOut:s.amountOut,calls:[Ni({config:{swapRouter:e.swapRouter,quoterV2:e.quoterV2},routerHasDeadline:e.routerHasDeadline,route:a,tokenIn:s.tokenIn,tokenOut:s.tokenOut,recipient:o,amountOut:s.amountOut,amountInMaximum:u})]}}}}function Yi(e){const t=[];e?.customVenues&&t.push(...e.customVenues),e?.satsuma&&t.push(br(e.satsuma)),e?.aerodrome!==!1&&t.push(yr(e?.aerodrome??xr)),t.push(xu(e?.oneInch));const n=t.map(au);function s(i){return n.find(a=>a.chainIds.includes(i))}async function r(i,a,d,u){const m=n.filter(g=>g.chainIds.includes(a));if(m.length===0)throw new l.SpiceflowError("NO_VENUE_FOR_CHAIN",`No liquidity venue configured for chain ${a}. Cannot resolve swap ${i.tokenIn} \u2192 ${i.tokenOut}.`,{chainId:a,tokenIn:i.tokenIn,tokenOut:i.tokenOut,amountIn:i.amountIn.toString()});const f=await Promise.allSettled(m.map(g=>g.resolve(i,a,d,u)));let h=null;for(const g of f)u&&g.status==="fulfilled"&&g.value&&(g.value.venue!==u.venue||g.value.calls.length!==u.calls.length||g.value.calls.some((x,w)=>x.to.toLowerCase()!==u.calls[w].to.toLowerCase()||x.data.slice(0,10)!==u.calls[w].data.slice(0,10)))||g.status==="fulfilled"&&g.value&&(!h||g.value.amountOut>h.amountOut)&&(h=g.value);if(h)return h;const y=f.find(g=>g.status==="rejected");if(y)throw y.reason;return null}async function o(i,a,d){const u=[],m=[];for(const f of i){if(!hu(f)){u.push(f);continue}const h=await r(f,a,d);if(!h)throw new l.SpiceflowError("NO_LIQUIDITY",`No venue returned a quote for ${f.tokenIn} \u2192 ${f.tokenOut} on chain ${a}.`,{chainId:a,tokenIn:f.tokenIn,tokenOut:f.tokenOut,amountIn:f.amountIn.toString()});u.push(...h.calls),m.push(h)}return{calls:u,resolvedSwaps:m}}return{resolveSwapIntents:o,resolveSwap:r,getVenueForChain:s,venues:t}}const _n="0x0000000000000000000000000000000000000000",Jo=[{fee:100,tickSpacing:1},{fee:500,tickSpacing:10},{fee:3e3,tickSpacing:60},{fee:1e4,tickSpacing:200}],Zi=_n,Xi=.02,Iu=1800,Ji={name:"Uniswap v4",quoter:"0x0d5e0f971ed27fbff6c2837bf31316121532048d",universalRouter:"0x6ff5693b99212da76ad316178a184ab56d299b43",permit2:"0x000000000022d473030f116ddee9f6b43ac78ba3",chainIds:[8453],hubCurrencies:["0x4200000000000000000000000000000000000006",_n,"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},$i={name:"Uniswap v4",quoter:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",universalRouter:"0x8876789976decbfcbbbe364623c63652db8c0904",permit2:"0x000000000022d473030f116ddee9f6b43ac78ba3",routerHasHopPrice:!0,chainIds:[4663],hubCurrencies:["0x0bd7d308f8e1639fab988df18a8011f41eacad73",_n,"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"]},_i=N.parseAbi(["struct PoolKey { address currency0; address currency1; uint24 fee; int24 tickSpacing; address hooks; }","struct PathKey { address intermediateCurrency; uint24 fee; int24 tickSpacing; address hooks; bytes hookData; }","struct QuoteExactSingleParams { PoolKey poolKey; bool zeroForOne; uint128 exactAmount; bytes hookData; }","struct QuoteExactParams { address exactCurrency; PathKey[] path; uint128 exactAmount; }","function quoteExactInputSingle(QuoteExactSingleParams params) returns (uint256 amountOut, uint256 gasEstimate)","function quoteExactInput(QuoteExactParams params) returns (uint256 amountOut, uint256 gasEstimate)","function quoteExactOutputSingle(QuoteExactSingleParams params) returns (uint256 amountIn, uint256 gasEstimate)","function quoteExactOutput(QuoteExactParams params) returns (uint256 amountIn, uint256 gasEstimate)"]),Su=N.parseAbi(["function approve(address token, address spender, uint160 amount, uint48 expiration)"]),Au=N.parseAbi(["function execute(bytes commands, bytes[] inputs, uint256 deadline) payable"]),ec="0x10",Eu="04",Fu="06",Tu="07",Ru="08",Bu="09",to="0c",no="0e",Ou=[{name:"currency0",type:"address"},{name:"currency1",type:"address"},{name:"fee",type:"uint24"},{name:"tickSpacing",type:"int24"},{name:"hooks",type:"address"}],ju=[{name:"intermediateCurrency",type:"address"},{name:"fee",type:"uint24"},{name:"tickSpacing",type:"int24"},{name:"hooks",type:"address"},{name:"hookData",type:"bytes"}],is=(e,t)=>e.toLowerCase()===t.toLowerCase();function so(e){return S.isNativeToken(e)?_n:e}function Du(e,t){return e.toLowerCase()<t.toLowerCase()?[e,t]:[t,e]}function tc(e,t,n,s,r){const o=[],[i,a]=Du(e,t);for(const{fee:u,tickSpacing:m}of Jo)o.push({kind:"single",poolKey:{currency0:i,currency1:a,fee:u,tickSpacing:m,hooks:Zi},zeroForOne:is(e,i)});const d=(u,m)=>!!r&&(is(u,_n)&&is(m,r)||is(u,r)&&is(m,_n));for(const u of n)if(!(is(u,e)||is(u,t))&&!(d(u,e)||d(u,t)))for(const m of Jo)for(const f of Jo){const h=(y,g)=>({intermediateCurrency:y,fee:g.fee,tickSpacing:g.tickSpacing,hooks:Zi,hookData:"0x"});o.push({kind:"multi",path:s==="in"?[h(u,m),h(t,f)]:[h(e,m),h(u,f)]})}return o}async function nc(e,t,n,s,r,o){const i=l.getClientForChain(e),a=(await Promise.allSettled(n.map(async d=>{const{result:u}=d.kind==="single"?await i.simulateContract({address:t.quoter,abi:_i,functionName:o==="in"?"quoteExactInputSingle":"quoteExactOutputSingle",args:[{poolKey:d.poolKey,zeroForOne:d.zeroForOne,exactAmount:r,hookData:"0x"}]}):await i.simulateContract({address:t.quoter,abi:_i,functionName:o==="in"?"quoteExactInput":"quoteExactOutput",args:[{exactCurrency:s,path:d.path,exactAmount:r}]}),m=u[0];if(m<=0n)throw new Error("zero quote");return{candidate:d,amount:m}}))).filter(d=>d.status==="fulfilled").map(d=>d.value);return a.length===0?null:(a.sort((d,u)=>d.amount<u.amount?-1:d.amount>u.amount?1:0),o==="in"?a[a.length-1]:a[0])}function sc(e){const{candidate:t,direction:n,currencyIn:s,currencyOut:r,recipient:o,exactAmount:i,limitAmount:a,deadline:d,routerHasHopPrice:u,sweepNativeTo:m}=e;let f,h;t.kind==="single"?(f=n==="in"?`0x${Fu}${to}${no}`:`0x${Ru}${to}${no}`,h=N.encodeAbiParameters([{type:"tuple",components:[{name:"poolKey",type:"tuple",components:Ou},{name:"zeroForOne",type:"bool"},{name:n==="in"?"amountIn":"amountOut",type:"uint128"},{name:n==="in"?"amountOutMinimum":"amountInMaximum",type:"uint128"},...u?[{name:"minHopPriceX36",type:"uint256"}]:[],{name:"hookData",type:"bytes"}]}],[{poolKey:t.poolKey,zeroForOne:t.zeroForOne,[n==="in"?"amountIn":"amountOut"]:i,[n==="in"?"amountOutMinimum":"amountInMaximum"]:a,...u?{minHopPriceX36:0n}:{},hookData:"0x"}])):(f=n==="in"?`0x${Tu}${to}${no}`:`0x${Bu}${to}${no}`,h=N.encodeAbiParameters([{type:"tuple",components:[{name:n==="in"?"currencyIn":"currencyOut",type:"address"},{name:"path",type:"tuple[]",components:ju},...u?[{name:"minHopPriceX36",type:"uint256[]"}]:[],{name:n==="in"?"amountIn":"amountOut",type:"uint128"},{name:n==="in"?"amountOutMinimum":"amountInMaximum",type:"uint128"}]}],[{[n==="in"?"currencyIn":"currencyOut"]:n==="in"?s:r,path:t.path,...u?{minHopPriceX36:[]}:{},[n==="in"?"amountIn":"amountOut"]:i,[n==="in"?"amountOutMinimum":"amountInMaximum"]:a}]));const y=N.encodeAbiParameters([{type:"address"},{type:"uint256"}],[s,n==="in"?i:a]),g=N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"uint256"}],[r,o,0n]),x=N.encodeAbiParameters([{type:"bytes"},{type:"bytes[]"}],[f,[h,y,g]]),w=m?`${ec}${Eu}`:ec,v=m?[x,N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"uint256"}],[_n,m,0n])]:[x];return N.encodeFunctionData({abi:Au,functionName:"execute",args:[w,v,d]})}function rc(){return BigInt(Math.floor(Date.now()/1e3)+Iu)}function oc(e,t,n,s){return{to:e.permit2,value:0n,data:N.encodeFunctionData({abi:Su,functionName:"approve",args:[t,e.universalRouter,n,Number(s)]})}}function ac(e){const t=e.name??"Uniswap v4",n=e.v3?br({...e.v3,chainIds:e.chainIds}):null;return{name:t,chainIds:e.chainIds,resolve:async(s,r,o)=>{const i=s.maxSlippage??Xi,a=so(s.tokenIn),d=so(s.tokenOut),u=S.isNativeToken(s.tokenIn),m=e.hubCurrencies??[_n];let f=null;if(!is(a,d)&&s.amountIn>0n){const h=await nc(r,e,tc(a,d,m,"in",Ho(r)),a,s.amountIn,"in").catch(()=>null);if(h){const y=S.applySlippage(h.amount,i),g=rc(),x=[];u||(x.push({to:s.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.permit2,s.amountIn]})}),x.push(oc(e,s.tokenIn,s.amountIn,g))),x.push({to:e.universalRouter,value:u?s.amountIn:0n,data:sc({candidate:h.candidate,direction:"in",currencyIn:a,currencyOut:d,recipient:o,exactAmount:s.amountIn,limitAmount:y,deadline:g,routerHasHopPrice:e.routerHasHopPrice})}),f={venue:t,amountOut:h.amount,amountOutMinimum:y,calls:x}}}return!f&&n?n.resolve(s,r,o):f}}}function ic(e){const t=e.name??"Uniswap v4";return{name:t,chainIds:e.chainIds,resolve:async(n,s,r)=>{const o=S.isNativeToken(n.tokenIn),i=so(n.tokenIn),a=so(n.tokenOut);if(is(i,a)||n.amountOut<=0n)return null;const d=n.maxSlippage??Xi,u=e.hubCurrencies??[_n],m=await nc(s,e,tc(i,a,u,"out",Ho(s)),a,n.amountOut,"out").catch(()=>null);if(!m)return null;const f=BigInt(Math.round(d*1e4)),h=m.amount+m.amount*f/10000n,y=rc();return{venue:t,amountIn:m.amount,amountInMax:h,amountOut:n.amountOut,calls:[...o?[]:[oc(e,n.tokenIn,h,y)],{to:e.universalRouter,value:o?h:0n,data:sc({candidate:m.candidate,direction:"out",currencyIn:i,currencyOut:a,recipient:r,exactAmount:n.amountOut,limitAmount:h,deadline:y,routerHasHopPrice:e.routerHasHopPrice,sweepNativeTo:o?r:void 0})}]}}}}const ro=[{...Yo,protocol:"uniswap-v3",chainId:4114},{...Yo,protocol:"uniswap-v3",chainId:5115},{...Wi,protocol:"uniswap-v3",chainId:8453},{...qi,protocol:"uniswap-v3",chainId:1},{...Li,protocol:"uniswap-v3",chainId:42161},{...yu,protocol:"uniswap-v3",chainId:137},{...bu,protocol:"uniswap-v3",chainId:56},{...vu,protocol:"uniswap-v3",chainId:143},{...zi,protocol:"uniswap-v3",chainId:4663},{...Hi,protocol:"uniswap-v3",chainId:4663},{...Ji,protocol:"uniswap-v4",chainId:8453},{...$i,protocol:"uniswap-v4",chainId:4663},{...xr,protocol:"aerodrome-slipstream",chainId:8453},...qn.chainIds.map(e=>({protocol:"metric",chainId:e}))];function js(e){const t=e?.metricApiUrl?[...ro.filter(o=>o.protocol!=="metric"),...ru.map(o=>({protocol:"metric",chainId:o}))]:ro,n=e?.includeDefaults===!1?e.venues??[]:[...t,...e?.venues??[]],s=[],r=[];for(const o of n){const i=[o.chainId];switch(o.protocol){case"metric":{const a={...o,apiUrl:o.apiUrl??e?.metricApiUrl,chainIds:i};s.push(Ti(a)),r.push(Ri(a));break}case"uniswap-v3":{const a={...o,chainIds:i};s.push(br(a)),r.push(Xo(a));break}case"uniswap-v4":{const a={...o,chainIds:i};s.push(ac(a)),r.push(ic(a));break}case"aerodrome-slipstream":{const a={...o,chainIds:i};s.push(yr(a)),r.push(Ki(a));break}default:{const a=o;throw new l.SpiceflowError("INVALID_PARAMS",`Unsupported liquidity venue protocol: ${a.protocol}`,{protocol:a.protocol})}}}return{input:s,output:r}}const $o=new Set(["WBTC","CBTC"]),cc=new Set(["btc","wbtc","wcbtc","cbtc"]);function lc(e,t){return!e||!t?!1:e===t?!0:$o.has(e)&&$o.has(t)}function Sn(e){const[t,n,s]=e.split(":");if(t!=="evm"||!n||!s)return null;const r=Number(n);if(!Number.isFinite(r))return null;const o=s.startsWith("0x")?s.toLowerCase():`0x${s.toLowerCase()}`;return{chainId:r,address:o}}function oo(e){return(e??"").trim().replace(/^test\s+/i,"").replace(/^spice/i,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function Nu(e){return new Set([e.receiptTokenName,e.displaySymbol,e.symbol,e.displayName,e.name].map(oo).filter(Boolean))}function Mu(e,t){const n=Nu(e),s=[t.symbol,t.name,t.equivalenceGroup].map(oo);if(s.some(i=>i&&n.has(i)))return!0;const r=[...n].some(i=>cc.has(i)),o=s.some(i=>cc.has(i))||$o.has(t.equivalenceGroup??"");return r&&o}function dc(e,t,n){const s=new Set(t.map(oo).filter(Boolean)),r=o=>{if(n&&l.addressesEqual(o.address,n))return 0;const i=[o.symbol,o.name,o.equivalenceGroup].map(oo).findIndex(a=>a&&s.has(a));return i===-1?4:i+1};return[...e].sort((o,i)=>{const a=r(o)-r(i);return a!==0?a:o.address.toLowerCase().localeCompare(i.address.toLowerCase())})}function Ks(e,t){const n=e.chainTokens?Object.keys(e.chainTokens):[],s=[];for(const r of n){const o=Sn(r);if(!o||o.chainId!==t)continue;const i=o.address,a=S.isNativeToken(i)?l.getChainConfig(t)?.nativeCurrency:void 0,d=S.getTokenByAddress(i,t)??(a?{...a}:void 0);d&&(!_o(e,i,t)&&!(e.isUniversal&&Mu(e,d))||s.some(u=>l.addressesEqual(u,i))||s.push(i))}return dc(s.map(r=>{const o=S.getTokenByAddress(r,t);return{address:r,symbol:o?.symbol,name:o?.name,equivalenceGroup:o?.equivalenceGroup}}),[e.receiptTokenName,e.displaySymbol,e.symbol,e.displayName,e.name],e.chainId===t&&!e.isUniversal?e.address:void 0).map(r=>r.address)}function _o(e,t,n){return e.chainId===n&&l.addressesEqual(e.address,t)?!0:Cr(e.address,e.chainId,t,n)}async function uc(e,t){const n=l.getClientForChain(e),s=S.getEscrowContractAddress(e);return S.isNativeToken(t)?n.getBalance({address:s}):await n.readContract({address:t,abi:N.erc20Abi,functionName:"balanceOf",args:[s]})}function ea(e,t,n){const s=S.getTokensForChain(n),r=s.find(i=>l.addressesEqual(i.address,e));if(r&&(t===n||!S.isNativeToken(e)))return r;const o=S.getTokenByAddress(e,t);if(o)return dc(s.filter(i=>lc(i.equivalenceGroup,o.equivalenceGroup)),[o.symbol,o.name,o.equivalenceGroup])[0]}function vr(e){return e.equivalenceGroup==="USDC"&&e.symbol.toUpperCase()!=="USDT"}function Ds(e){const t=S.getEscrowContract(e);if(!t||t===S.ZERO_ADDRESS)return;const n=S.getTokensForChain(e).filter(vr);return n.find(s=>s.symbol.toUpperCase()==="USDC")??n[0]}function ta(e,t){if(e.chainId===t)return null;const n=S.getEscrowContract(e.chainId),s=S.getEscrowContract(t);if(!n||n===S.ZERO_ADDRESS||!s||s===S.ZERO_ADDRESS)return null;const r=!e.isNative&&!S.isNativeToken(e.address)?S.getTokenByAddress(e.address,e.chainId):void 0,o=r&&vr(r)?ea(e.address,e.chainId,t):void 0,i=o?r:Ds(e.chainId),a=o??Ds(t);if(!i||!a)return null;const d=u=>({address:u.address,symbol:u.symbol,decimals:u.decimals,chainId:u.chainId});return{source:d(i),destination:d(a)}}async function pc(e,t,n){const s=S.getTokensForChain(e.chainId).filter(vr),r=[s.find(a=>l.addressesEqual(a.address,t.address)),e,...s].filter((a,d,u)=>!!a&&u.findIndex(m=>m&&l.addressesEqual(m.address,a.address))===d);let o;for(const a of r){let d;try{d=await uc(e.chainId,a.address)}catch{continue}if(d<=0n)continue;const u={...a,address:a.address};let m;try{m=await n(u)}catch{m=null}if(l.addressesEqual(u.address,e.address)&&(o=m),m&&m.amount<=d)return{token:u,...m}}const i=o===void 0?await n(e):o;return i?{token:e,...i}:null}function Pu(e,t){return!!ta(e,t)}function Mn(e,t){if(e.chainId===t)return e.address;const n=ea(e.address,e.chainId,t);return n?n.address:null}async function es(e,t,n,s){const r=S.getTokenByAddress(t,n);return r?r.decimals:e?.chainId===n&&l.addressesEqual(e.address,t)&&!e.isUniversal?e.decimals:s?.chainId===n&&l.addressesEqual(s.address,t)?s.decimals:l.getTokenDecimals(n,t)}async function fc(e,t,n={}){const s=Mn(e,t),r=Ks(e,t);if(r.length===0)return s;if(r.length===1)return r[0];const o=n.requiredAmount??0n,i=a=>{const d=r.map(u=>({candidate:u,balance:a.get(S.isNativeToken(u)?"native":u.toLowerCase())??0n})).filter(u=>u.balance>0n).sort((u,m)=>u.balance===m.balance?0:u.balance>m.balance?-1:1);return d.length===0?null:((o>0n?d.find(u=>u.balance>=o):d[0])??d[0]).candidate};try{const a=await Promise.all(r.map(async m=>({key:S.isNativeToken(m)?"native":m.toLowerCase(),value:await uc(t,m)}))),d=new Map(a.map(({key:m,value:f})=>[m,f])),u=i(d);if(u)return u}catch{}return s}function Cr(e,t,n,s){const r=S.getTokenByAddress(e,t),o=S.getTokenByAddress(n,s);return r&&o?lc(r.equivalenceGroup,o.equivalenceGroup):S.areEquivalent(e,n)}function ao(e,t){return Cr(e.address,e.chainId,t.address,t.chainId)}const mc=.01;function hc(e,t=!1){const n=Number.isFinite(e.balanceUsd)&&e.balanceUsd>0;return e.isDiscovered?n&&e.balanceUsd>=mc:!t||!n||e.balanceUsd>=mc}function Ys(e,t=!1){return!!e&&e._source==="wallet"&&(e.location==="external"||e._fundingWallet==="external"||!e.location&&!e._fundingWallet&&t)}function xe(e){return e.positionId??`${e.owner?.toLowerCase()??""}:${e.location??e._source??""}:${e.chainId}:${e.receiptTokenId??S.normalizeNativeTokenAddress(e.address).toLowerCase()}`}function gc(e,t){if(!t?.length||e.symbol!==void 0&&l.isAssetAllowed({...e,symbol:e.symbol},t))return!0;const n=s=>t.some(r=>l.addressesEqual(S.normalizeNativeTokenAddress(r),S.normalizeNativeTokenAddress(s)));return n(e.address)||Object.keys(e.chainTokens??{}).some(s=>{const r=Sn(s);return r?n(r.address):!1})}function Yn(e,t,n,s,r,o){const i=(x,w=!1)=>({eligible:!1,reason:x,policyExcluded:w}),a=e._source==="wallet"||e.location==="external"||e.location==="embedded",d=t==="spend-source"&&a&&!!s&&e.chainId===s.chainId&&l.addressesEqual(S.normalizeNativeTokenAddress(e.address),S.normalizeNativeTokenAddress(s.address));if(n.isWhitelistGateActive||!d&&!l.isAssetAllowed(e,n.allowedTokens))return i("Asset excluded by client policy",!0);if(t!=="withdraw-destination"&&!d&&!hc(e))return i("Asset is unpriced or below the minimum value",!0);if(t==="holding")return{eligible:!0,reason:null};if(e.balanceError)return i(e.balanceError);if(!d&&!gc(e,r))return i("Asset excluded by action policy",!0);const u=new Set(s?[s.chainId]:[]);e._source!=="spice"&&e.location!=="rollup"&&u.add(e.chainId);for(const x of u)if(!l.getRpcUrlForChain(x,n.rpcOverrides)?.trim())return i(`Configure SpiceFlowProvider rpcOverrides[${x}] before using this asset.`);if(o?.requiresEscrow){const x=S.getTokenByAddress(e.address,e.chainId);if(!x||!vr(x))return i("This asset has no supported escrow mapping")}if(!s)return{eligible:!0,reason:null};const m=n.liquidityVenues?.includeDefaults===!1?n.liquidityVenues.venues??[]:[...ro,...n.liquidityVenues?.venues??[]],f=x=>m.some(w=>w.chainId===x),h=a&&e.chainId!==s.chainId,y=h?ta(e,s.chainId):null;if(h&&!y)return i("No supported source route");if(y&&!l.addressesEqual(S.normalizeNativeTokenAddress(e.address),S.normalizeNativeTokenAddress(y.source.address))&&!f(e.chainId))return i("No conversion venue configured on the source chain");const g=y?.destination.address??Mn(e,s.chainId);return t==="withdraw-destination"?(e.chainTokens||e.receiptTokenId?Ks(e,s.chainId):g?[g]:[]).some(x=>l.addressesEqual(S.normalizeNativeTokenAddress(x),S.normalizeNativeTokenAddress(s.address)))?{eligible:!0,reason:null}:i("No supported withdrawal mapping"):g&&l.addressesEqual(S.normalizeNativeTokenAddress(g),S.normalizeNativeTokenAddress(s.address))?{eligible:!0,reason:null}:!g&&!Pu(e,s.chainId)?i("No supported destination route"):f(s.chainId)?{eligible:!0,reason:null}:i("No conversion venue configured on the destination chain")}function io(){const e=p.useContext(l.SpiceFlowProviderContext),[t]=p.useState(l.createInventoryStore);return e?.inventory??t}function na(e,t,n,s,r){const o=io(),i=r??o,a=p.useMemo(()=>i.entry(e),[i,e]),[,d]=p.useState(0);p.useEffect(()=>{if(n)return a.subscribe(()=>d(m=>m+1),t,s)},[a,n,t,s]);const u=p.useCallback(()=>a.refresh(),[a]);return{...n?a.snapshot():l.EMPTY_INVENTORY,refresh:u}}var wc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA6lBMVEXc3NzX/v/1hRvZ2dnd3dzb29va7fpMaXHa1tPc3N35/v/c3Nzc3NzCrp/c3Nza2tp1PRbLsJzlr33uhSj0kTHcnWnUva7jdhuNX0B6Qhrsk0LOxMCFVDJ+RyGhfGTkeiGYVSHjdx3lij7khDPEsaPfoW/jgjLQuKXmgzB2PRb2hRvldhvjdRv4hhvpeRtwORb/ihryghvabhnsehrUaRjLXxXtfRt7PxXwexricRbRYhURFBeSTBe0XBrEZxmDRxiiVRrlgCbfzMAvLCmrWBgbMEh9UjBbOBe2pJi9byekk4nkgDHkgDJLNB7jlKArAAAAKXRSTlMzJv0TNSYsADU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AAmJJREFUeNqtV4uSgyAMRIECGhTk///1otTKG3s2Mzdz03aXbEJIQkhuYv9jIx+komhKDnxk4v1F1wT+SoxcUj3PWu8Ex39U8lH4bzt4QthL6tlDA8OP5Iv1vMADGFc5+uRQnDWdEES81EwbNquXqDuBx8va6ZcXktUYBOkc/3GixsBvwA8neFGGGO7hdyeGAsMXeM/wBJ8ziLv6LwYeisD4f4lHhiAXmH9FvzYV3AchOw6At9gFKW4KANDbsttGoSyCKd1Ab4uxkzezhBQaRfQygHB3oj2FhjwT9QgifErM6jiOrQgAXe2UmcuiIKSuHG+mki2XCH0kYqzgF1vETyYszLFaxLBMNdsgDGNFAazRoUcwrDMlDYz28RS0newGcCRlDa8TK4YgxuORGj9x8NYVEsxjKQSp/pNAw5YRcJI/JP5nYeqxjAxeIfCeRQQDyWOos/y5xR2V4NIgYhRJVkjgpralBPcvQH4PsBxIX0DjJqKRdgYLtsYPUyqh60CsACXEQew7ECvAICZp7DqwQEIQXaR+CkzaoeKr3FewQdqg4mIy36VgLyZWz4G96N5vs8sKj0UPSlJGy4fAbWX88SgGQYgJVjDXi7JaaxYo9Oj4UQ0lrHCGdN25ceiEfNoZSfIomjhcKN26DarT0q4gaiyfe2C9u9hWNUBvRghbG+yd1AZNFFrjmu+ucXMF2j60OObE7f0m+mrv/5qQkimpO+IU8fKXQ9bDMe/5oPl81P3BsP183EeGu3GoLBw/WHnuLF20sXQ9X/ueL57PV99w+Z7P5Vvj8j3fXr7j9X/f/5Vsrv9/K3NM7mGXOq0AAAAASUVORK5CYII=",kr="data:image/svg+xml,%3csvg width='8' height='11' viewBox='57 6 8 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M62.7081 13.27C62.742 13.27 62.7642 13.3057 62.7491 13.3362V13.336L61.1229 16.6083C61.0892 16.6761 60.9926 16.6759 60.959 16.6083L59.3382 13.336C59.3232 13.3057 59.3453 13.27 59.3792 13.27H62.7081Z' fill='%23EA4B4B'/%3e %3cpath d='M61.0026 9.71913C61.0194 9.68524 61.0678 9.68524 61.0845 9.71913L62.747 13.0897C62.762 13.12 62.7399 13.1557 62.706 13.1557H59.3763C59.3424 13.1557 59.3203 13.12 59.3353 13.0897L61.0026 9.71913Z' fill='%23EA4B4B'/%3e %3cpath d='M60.8426 9.63827C60.8766 9.63827 60.8987 9.6741 60.8835 9.70444L59.2164 13.0594C59.1995 13.0932 59.1513 13.0932 59.1345 13.0594L57.5001 9.77047C57.47 9.70962 57.5142 9.63827 57.5821 9.63827H60.8426Z' fill='%23EA4B4B'/%3e %3cpath d='M64.5036 9.63617C64.5715 9.63618 64.6157 9.70753 64.5855 9.76838H64.5854L62.9512 13.0573C62.9344 13.0911 62.8862 13.0912 62.8692 13.0573L61.2021 9.70235C61.187 9.672 61.2091 9.63617 61.2431 9.63617H64.5036Z' fill='%23EA4B4B'/%3e %3cpath d='M62.8284 6.18281C62.862 6.11518 62.9586 6.11518 62.9922 6.18281L64.5855 9.38969C64.6157 9.45054 64.5715 9.52189 64.5036 9.52189H61.2431C61.2091 9.52189 61.187 9.48605 61.2021 9.45571L62.8283 6.18265L62.8284 6.18281Z' fill='%23EA4B4B'/%3e %3cpath d='M62.3131 6.13196C62.381 6.13196 62.4252 6.20331 62.3951 6.26416C62.154 6.74935 61.9128 7.23455 61.6718 7.71975H61.6716C61.4225 8.22125 61.1733 8.72259 60.9242 9.22409C60.9074 9.25799 60.859 9.25799 60.8422 9.22409L60.6305 8.79587C60.6275 8.78957 60.6259 8.78263 60.6259 8.77553V6.22349C60.6259 6.17297 60.6668 6.13196 60.7173 6.13196H62.3131Z' fill='%23EA4B4B'/%3e%3c/svg%3e";const Ir=S.getChainMeta(1)?.logo??"",qu=S.TOKENS.find(e=>e.symbol==="USDC")?.logo??"",bs=Object.fromEntries([...S.getMainnetChains(),...S.getTestnetChains()].map(e=>[e.id,e.logo])),Sr={metamask:wc,metaMask:wc,rabby:Uu,phantom:Wu},sa=Object.fromEntries(S.TOKENS.map(e=>[e.symbol.toUpperCase(),e.logo])),Lu={usdc:[8453,1,42161,5115,4114],usdt:[1],btc:[4114,42161,1,5115],wbtc:[1],weth:[8453,1],eth:[8453,1,42161,4663,84532,46630],ctusd:[5115,4114],wcbtc:[5115,4114]},zu={btc:["wcbtc","cbtc","wbtc"]};function co(e){return e.replace(/^test\s*/i,"").replace(/^spice/i,"").trim()}function cs(e){return co(e).toLowerCase()}function xc(e){return cs(e??"").replace(/[^a-z0-9]/g,"")}function ra(e){const t=cs(e);return[t,...zu[t]??[]].filter(Boolean)}function Hu(e){try{return BigInt(e.balanceAvailable||"0")}catch{return 0n}}function yc(e){return Array.isArray(e.chainTokens)?e.chainTokens:Object.keys(e.chainTokens??{})}function bc(e,t){const n=l.getChainConfig(e),s=t.toLowerCase();return s===S.ZERO_ADDRESS.toLowerCase()?n?.nativeCurrency.decimals??18:n?.supportedTokens?.find(r=>r.address.toLowerCase()===s)?.decimals??18}function Vu(e,t,n,s=[]){const r=bc(t,n),o=e.filter(a=>vc(a,t,n,s));if(o.length===0)return null;const i=o.reduce((a,d)=>Math.min(a,d.decimals??r),r);return{chainDecimals:r,receiptDecimals:i}}function vc(e,t,n,s){if(yc(e).some(o=>{const i=Sn(o);return i&&Cr(i.address,i.chainId,n,t)}))return!0;const r=new Set(s.map(xc).filter(Boolean));return r.size===0?!1:r.has(xc(e.tokenName||e.receiptToken))}function Cc(e,t,n,s=[]){const r=bc(t,n);return e.reduce((o,i)=>vc(i,t,n,s)?o+S.convertAmountBetweenDecimals(Hu(i),i.decimals??r,r):o,0n)}function kc(e,t){const n=new Set([...ra(t),...ra(co(t))]);return[...e].sort((s,r)=>{const o=cs(s.symbol),i=cs(r.symbol),a=cs(s.name),d=cs(r.name),u=n.has(o)?0:n.has(a)?1:2,m=n.has(i)?0:n.has(d)?1:2;return u!==m?u-m:s.address.toLowerCase().localeCompare(r.address.toLowerCase())})[0]}function Qu(e){const t=e&&e.length>0?e:Object.keys(l.CHAIN_CONFIGS).map(Number).filter(Number.isFinite),n=new Map;for(const s of t){const r=l.getChainConfig(s);if(!r)continue;const o=`${s}:${S.ZERO_ADDRESS.toLowerCase()}`;n.has(o)||n.set(o,{address:S.ZERO_ADDRESS,chainId:s,symbol:r.nativeCurrency.symbol,name:r.nativeCurrency.name,decimals:r.nativeCurrency.decimals,isNative:!0,logoURI:sa[r.nativeCurrency.symbol.toUpperCase()]??r.logo});for(const i of r.supportedTokens??[]){const a=i.address.toLowerCase(),d=`${s}:${a}`;n.has(d)||n.set(d,{address:a,chainId:s,symbol:i.symbol,name:i.name,decimals:i.decimals,isNative:S.isNativeToken(a),logoURI:i.logo})}}return n}function Gu(e,t){const n=Qu(t),s=co(e.tokenName),r=cs(e.tokenName),o=ra(e.tokenName),i=Array.isArray(e.chainTokens)?e.chainTokens.map(g=>[g,void 0]):Object.entries(e.chainTokens??{}),a=i.map(([g])=>Sn(g)).filter(g=>g!==null),d=new Map;for(const[g,x]of i){const w=Sn(g);if(!w||!Number.isSafeInteger(w.chainId)||w.chainId<0||!/^evm:[0-9]+:(?:0x)?[0-9a-fA-F]{40}$/.test(g)){if(!Array.isArray(e.chainTokens))throw new Error("Invalid chain token metadata identity");continue}if(x!==void 0&&(!x||typeof x!="object"||Array.isArray(x)||x.name!==void 0&&typeof x.name!="string"||x.decimals!==void 0&&(!Number.isInteger(x.decimals)||x.decimals<0||x.decimals>255)))throw new Error("Invalid chain token metadata");const v=`${w.chainId}:${w.address.toLowerCase()}`;if(d.has(v)){const C=d.get(v);if(C?.name!==x?.name||C?.decimals!==x?.decimals)throw new Error("Conflicting chain token metadata")}d.set(v,x)}const u=(g,x)=>{const w=d.get(`${x.chainId}:${x.address.toLowerCase()}`);return{...g,name:typeof w?.name=="string"&&w.name.length>0?w.name:g.name,decimals:typeof w?.decimals=="number"?w.decimals:g.decimals}},m=a.map(g=>{const x=n.get(`${g.chainId}:${g.address.toLowerCase()}`);return x?u(x,g):void 0}).filter(g=>g!==void 0),f=Lu[r]??[];if(f.length>0)for(const g of f){const x=m.filter(w=>w.chainId===g);if(x.length>0)return kc(x,e.tokenName)}if(m.length>0)return kc(m,e.tokenName);const h=Array.from(n.values()).filter(g=>o.includes(cs(g.symbol))||o.includes(cs(g.name)));if(f.length>0)for(const g of f){const x=h.find(w=>w.chainId===g);if(x)return x}if(h.length>0)return h[0];const y=a[0];if(y){const g=d.get(`${y.chainId}:${y.address.toLowerCase()}`);return{address:y.address,chainId:y.chainId,symbol:s||e.tokenName,name:typeof g?.name=="string"&&g.name.length>0?g.name:s||e.tokenName,decimals:typeof g?.decimals=="number"?g.decimals:e.decimals??18,isNative:S.isNativeToken(y.address),logoURI:void 0}}}function Ku(e,t){let n;try{n=BigInt(e.balanceAvailable||"0")}catch{return null}if(n<=0n)return null;if(t?.length){const g=yc(e).map(Sn).filter(x=>x!==null);if(g.length>0&&!g.some(x=>t.includes(x.chainId)))return null}let s;try{s=Gu(e,t)}catch{return null}const r=s?.decimals??e.decimals??18,o=e.decimals??r,i=S.convertAmountBetweenDecimals(n,o,r),a=s?.address??S.ZERO_ADDRESS,d=s?.chainId??0,u=co(e.tokenName),m=s?.symbol??u,f=s?.name??u,h=parseFloat(N.formatUnits(i,r)),y=e.tokenName==="spiceUSDC"?h:typeof e.balanceUsd=="number"?e.balanceUsd:typeof e.balanceUsd=="string"&&Number(e.balanceUsd)||0;return{address:a,symbol:m,name:f,decimals:r,chainId:d,balance:i,balanceFormatted:h,balanceUsd:y,isNative:s?.isNative??S.isNativeToken(a),logoURI:s?.logoURI,displaySymbol:u||m,displayName:u||f,displayChainName:"Spicenet",receiptTokenId:e.receiptToken,receiptTokenName:e.tokenName||f,receiptTokenDecimals:o,chainTokens:e.chainTokens&&!Array.isArray(e.chainTokens)?e.chainTokens:void 0,isUniversal:!0}}const oa=6e4,Yu=3e5,Ic="https://api.g.alchemy.com/prices/v1",Zs=new Map;function lo(e,t){try{const n=t??l.getRpcUrlForChain(e);if(typeof n!="string")return null;const{hostname:s,pathname:r}=new URL(n);if(!s.endsWith(".g.alchemy.com"))return null;const o=r.split("/").filter(Boolean).pop();return o?{network:s.slice(0,-14),key:o}:null}catch{return null}}const Ar=(e,t)=>`${e.network}:${e.key}:${t.toLowerCase()}`;function Ns(e,t){const n=Zs.get(Ar(e,t));if(!n?.price||n.updatedAt===void 0)return;const s=Date.now()-n.updatedAt;if(!(s>=Yu))return{price:n.price,stale:s>=oa}}function Sc(e){const t=Number(e.prices?.find(n=>n.currency==="usd")?.value);return Number.isFinite(t)&&t>0?t:0}async function Ac(e,t,n){const s=[],r=new Set,o=Date.now();for(const i of new Set(t.map(a=>a.toLowerCase()))){const a=Zs.get(Ar(e,i));a?.pending?r.add(a.pending):(!a||o-a.attemptedAt>=oa&&(a.updatedAt===void 0||o-a.updatedAt>=oa))&&s.push(i)}for(let i=0;i<s.length;i+=25){const a=s.slice(i,i+25),d=Promise.resolve().then(async()=>{try{const u=await n(a);for(const m of a){const f=u.get(m);if(!f)continue;const h=Zs.get(Ar(e,m));h.price=f,h.updatedAt=Date.now()}}catch{}finally{for(const u of a)Zs.get(Ar(e,u)).pending=void 0}});for(const u of a){const m=Ar(e,u);Zs.set(m,{...Zs.get(m),attemptedAt:o,pending:d})}r.add(d)}await Promise.all(r)}async function aa(e,t){return await Ac(e,t,async n=>{const s=await fetch(`${Ic}/${e.key}/tokens/by-address`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({addresses:n.map(i=>({network:e.network,address:i}))}),signal:AbortSignal.timeout(1e4)});if(!s.ok)throw new Error("Provider price request failed");const r=await s.json(),o=new Map;for(const i of r?.data??[]){if(i.network&&i.network!==e.network)continue;const a=String(i.address).toLowerCase();n.includes(a)&&o.set(a,Sc(i))}return o}),new Map(t.map(n=>[n.toLowerCase(),Ns(e,n)?.price??0]))}async function ia(e,t){const n=`native:${t}`;return await Ac(e,[n],async()=>{const s=await fetch(`${Ic}/${e.key}/tokens/by-symbol?symbols=${encodeURIComponent(t)}`,{signal:AbortSignal.timeout(1e4)});if(!s.ok)throw new Error("Provider native price request failed");const r=(await s.json())?.data?.find(o=>o.symbol?.toUpperCase()===t.toUpperCase());return new Map([[n.toLowerCase(),r?Sc(r):0]])}),Ns(e,n)?.price??0}async function Zu(e,t){const n=t.supportedChains,s=e.map(r=>{if(r.receiptTokenName==="spiceUSDC")return[];const o=Object.keys(r.chainTokens??{}).map(Sn).filter(i=>!!i&&N.isAddress(i.address)&&!!n?.includes(i.chainId));return o.sort((i,a)=>{const d=u=>u===t.nativeChainId?-1:n.indexOf(u);return d(i.chainId)-d(a.chainId)||+!l.addressesEqual(i.address,r.address)-+!l.addressesEqual(a.address,r.address)}),o.flatMap(i=>{const a=t.rpcOverrides?.[i.chainId];if(!a)return[];const d=lo(i.chainId,a);if(!d)return[];const u=S.isNativeToken(i.address)?l.getChainConfig(i.chainId)?.nativeCurrency.symbol:void 0,m=u?`native:${u}`:i.address;return[{rpc:d,token:m,address:i.address,nativeSymbol:u}]})});return(typeof document>"u"||!document.hidden)&&await Promise.all(s.map(async r=>{for(const o of r)if(o.nativeSymbol?await ia(o.rpc,o.nativeSymbol).catch(()=>0):await aa(o.rpc,[o.address]).catch(()=>new Map),Ns(o.rpc,o.token)?.stale===!1)break})),e.map((r,o)=>{if(r.receiptTokenName==="spiceUSDC")return{...r,balanceUsd:r.balanceFormatted,priceStatus:"fresh"};const i=s[o].map(d=>Ns(d.rpc,d.token)),a=i.find(d=>d&&!d.stale)??i.find(Boolean);return{...r,balanceUsd:a?r.balanceFormatted*a.price:Number.isFinite(r.balanceUsd)&&r.balanceUsd>0?r.balanceUsd:0,priceStatus:a?a.stale?"stale":"fresh":"unavailable"}})}function Xu(e,t,n){const s=p.useContext(l.SpiceFlowProviderContext),[r,o]=p.useState(()=>typeof document>"u"||!document.hidden);p.useEffect(()=>{const m=()=>o(!document.hidden);return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]);const i={supportedChains:n??s?.supportedChainIds,nativeChainId:s?.nativeChainId,rpcOverrides:s?.rpcOverrides},a=JSON.stringify([e,i],(m,f)=>typeof f=="bigint"?f.toString():f),d=p.useCallback(()=>Zu(e,i),[a]),u=na(`prices:${a}`,d,t&&r&&e.length>0,6e4);return u.updatedAt?u.assets:e}function Ju(e){const t=e.chainTokens??e.chainTokenConfig;if(Array.isArray(t))return t.filter(n=>typeof n=="string");if(t&&typeof t=="object")return t}const Ec=({address:e,supportedChains:t,enabled:n=!0,refetchInterval:s,priceEnabled:r=!1})=>{const o=p.useContext(l.SpiceFlowProviderContext),i=o?.apiUrl||l.RELAYER_API_URL,a=io(),d=o?.supportedChainIds??t,u=JSON.stringify([...d??[]].sort((j,I)=>j-I)),m=e?.toLowerCase(),f=p.useCallback(async()=>{const j=`${i}/wallets/${m}/balance`;let I,b;try{const A=await l.relayerFetch(j,{cache:"no-store"});if(I=A.status,b=A.requestId,!A.ok)throw new Error(`Failed to fetch balance: ${A.status}`);const R=await A.json();if(!Array.isArray(R.balances))throw new Error("Invalid balance response");return R.balances.map(B=>{const q=Ku({receiptToken:typeof B.receiptToken=="string"?B.receiptToken:void 0,tokenName:String(B.tokenName??""),balanceAvailable:String(B.balanceAvailable??"0"),chainTokens:Ju(B),decimals:typeof B.decimals=="number"?B.decimals:void 0,balanceUsd:typeof B.balanceUsd=="number"||typeof B.balanceUsd=="string"?B.balanceUsd:null},d);return q?{...q,owner:m,location:"rollup",_source:"spice",positionId:`${m}:rollup:${q.receiptTokenId??q.address}`}:null}).filter(B=>B!==null)}catch(A){const R=A instanceof Error?A.name:void 0,B=I===429?"Balance refresh is temporarily busy. Wait a moment and try again.":I===408||I===504||R==="TimeoutError"?"Balance refresh timed out. Try again.":R==="AbortError"?"Balance refresh was interrupted. Try again.":"Balances are unavailable. Check your connection and try again.",q=new l.SpiceflowError("RELAYER_STATUS_ERROR",B,{endpoint:j,httpStatus:I,requestId:b,cause:A});throw l.sanitizeError(q),q}},[m,i,u,o?.nativeChainId,o?.rpcOverrides]),{assets:h,loading:y,refreshing:g,error:x,updatedAt:w}=na(`rollup:${m}:${i}:${u}`,f,n&&!!m,s??0,a),v=JSON.stringify(t??[]),C=p.useMemo(()=>x?h.map(j=>({...j,balanceError:x,balanceStatus:"stale"})):h,[h,x]),E=Xu(C,n&&r,d),k=p.useMemo(()=>E.filter(j=>!t?.length||t.includes(j.chainId)||Object.keys(j.chainTokens??{}).some(I=>t.some(b=>I.startsWith(`evm:${b}:`)))),[E,v]),F=p.useCallback(j=>k.filter(I=>I.chainId===j),[k]);return{assets:k,loading:y,error:x,hasBalance:k.some(j=>j.balance>0n),refreshing:g,updatedAt:w,refetch:a.invalidate,getAssetsByChain:F}};async function $u(e,t,n){if(n)return{decimals:n.decimals,symbol:n.symbol,name:n.name,logoURI:n.logo};const[s,r,o]=await Promise.all([Kn.readContract(e,{address:t,abi:N.erc20Abi,functionName:"decimals"}),Kn.readContract(e,{address:t,abi:N.erc20Abi,functionName:"symbol"}).catch(()=>"TOKEN"),Kn.readContract(e,{address:t,abi:N.erc20Abi,functionName:"name"}).catch(()=>"TOKEN")]);if(!Number.isInteger(Number(s))||Number(s)<0||Number(s)>255)throw new Error("Invalid token decimals");return{decimals:Number(s),symbol:r,name:o,logoURI:void 0}}const Fc=async(e,t,n)=>{const s=l.getClientForChain(t,n),r=l.getChainConfig(t),o=await Kn.getBalance(s,{address:e}),i=r.nativeCurrency,a=r.supportedTokens?.find(d=>S.isNativeToken(d.address));return{address:S.ZERO_ADDRESS,name:i.name,symbol:i.symbol,decimals:i.decimals,balance:o,balanceFormatted:Number(N.formatUnits(o,i.decimals)),balanceUsd:0,priceStatus:"unavailable",logoURI:a?.logo||r.logo,isNative:!0,chainId:t}},_u=async(e,t,n,s,r,o,i)=>{try{if(!N.isAddress(n))return null;const a=N.getAddress(n),d=N.isAddress(e)?N.getAddress(e):e,u=l.getClientForChain(t,i),m=await Kn.readContract(u,{address:a,abi:N.erc20Abi,functionName:"balanceOf",args:[d]}),f=Number(N.formatUnits(m,o));return m>0n?{address:a,name:s,symbol:r,decimals:o,balance:m,balanceFormatted:f,balanceUsd:0,priceStatus:"unavailable",logoURI:void 0,isNative:!1,chainId:t}:null}catch(a){throw a}},Tc=(e,t)=>{const n=l.getChainConfig(t);if(!n)return e;const s=new Set(e.map(o=>o.address.toLowerCase())),r=e.some(o=>o.isNative);for(const o of n.supportedTokens||[])S.isNativeToken(o.address)&&r||s.has(o.address.toLowerCase())||e.push({address:o.address,name:o.name,symbol:o.symbol,decimals:o.decimals,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,priceStatus:"unavailable",logoURI:o.logo,isNative:S.isNativeToken(o.address),chainId:t});if(!e.find(o=>o.isNative)){const o=n.supportedTokens?.find(i=>S.isNativeToken(i.address));e.push({address:S.ZERO_ADDRESS,name:n.nativeCurrency.name,symbol:n.nativeCurrency.symbol,decimals:n.nativeCurrency.decimals,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,priceStatus:"unavailable",logoURI:o?.logo||n.logo,isNative:!0,chainId:t})}return e},ep=async(e,t,n)=>{const s=[],r=async a=>{for(const d of a){const u=await _u(e,t,d.address,d.name,d.symbol,d.decimals,n);u&&(u.logoURI=d.logo,s.push(u))}},o=await Fc(e,t,n);o.balance>0n&&s.push(o);const i=(l.getChainConfig(t)?.supportedTokens||[]).filter(a=>!S.isNativeToken(a.address));if(i.length>0)try{const a=l.getClientForChain(t,n),d=N.getAddress(e),u=i.filter(y=>N.isAddress(y.address)).map(y=>({address:N.getAddress(y.address),abi:N.erc20Abi,functionName:"balanceOf",args:[d]})),m=await a.multicall({contracts:u}),f=i.filter(y=>N.isAddress(y.address)),h=[];m.forEach((y,g)=>{if(y.status==="success"){const x=y.result;if(x&&x>0n){const w=f[g],v=Number(N.formatUnits(x,w.decimals));x>0n&&s.push({address:N.getAddress(w.address),name:w.name,symbol:w.symbol,decimals:w.decimals,balance:x,balanceFormatted:v,balanceUsd:0,priceStatus:"unavailable",logoURI:w.logo,isNative:!1,chainId:t})}}else h.push(f[g])}),await r(h)}catch{await r(i)}return{tokens:Tc(s,t),chainId:t}},tp=async(e,t,n)=>{const s=new Map,r=lo(e,n?n[e]??"":void 0);if(!r)return s;const o=t.filter(u=>S.isNativeToken(u)),i=t.filter(u=>!S.isNativeToken(u)),[a,d]=await Promise.all([i.length?aa(r,i).catch(()=>new Map):new Map,o.length?ia(r,l.getChainConfig(e)?.nativeCurrency?.symbol??"ETH").catch(()=>0):0]);for(const[u,m]of a)m>0&&s.set(u,m);if(d>0)for(const u of o)s.set(u.toLowerCase(),d);return s},np=async(e,t,n,s=!0,r)=>{const o=l.getClientForChain(t,r),i=N.getAddress(e),a=[];let d;do{const x=await o.request({method:"alchemy_getTokenBalances",params:[i,"erc20",d?{pageKey:d}:{}]});a.push(...x.tokenBalances),d=x.pageKey||void 0}while(d);const u=a.filter(x=>N.isAddress(x.contractAddress)&&!!x.tokenBalance&&BigInt(x.tokenBalance)>0n),m=l.getChainConfig(t)?.supportedTokens||[],f=x=>m.find(w=>w.address.toLowerCase()===x.toLowerCase()),h=[],y=await Fc(e,t,r),[g]=await Promise.all([Promise.all(u.map(async x=>{const w=f(x.contractAddress);return w?{name:w.name,symbol:w.symbol,decimals:w.decimals,logo:w.logo??null}:await o.request({method:"alchemy_getTokenMetadata",params:[x.contractAddress]})})),s?aa(n,u.map(x=>x.contractAddress)):void 0,s&&y.balanceFormatted>0?ia(n,y.symbol):void 0]);if(y.balance>0n){const x=Ns(n,`native:${y.symbol}`);h.push({...y,balanceUsd:(x?.price??0)*y.balanceFormatted,priceStatus:x?x.stale?"stale":"fresh":"unavailable"})}return u.forEach((x,w)=>{const v=g[w];if(!Number.isInteger(v.decimals)||v.decimals===null||v.decimals<0||v.decimals>255)throw new Error(`Invalid token metadata on chain ${t}`);const C=BigInt(x.tokenBalance),E=Number(N.formatUnits(C,v.decimals));if(C<=0n)return;const k=Ns(n,x.contractAddress),F=(k?.price??0)*E;h.push({address:N.getAddress(x.contractAddress),name:v.name||"Unknown",symbol:v.symbol||"UNKNOWN",decimals:v.decimals,balance:C,balanceFormatted:E,balanceUsd:F,priceStatus:k?k.stale?"stale":"fresh":"unavailable",isDiscovered:!f(x.contractAddress),logoURI:v.logo||void 0,isNative:!1,chainId:t})}),{tokens:Tc(h,t),chainId:t}},Rc=new Set,sp=async(e,t,n=!0,s)=>{try{const r=lo(t,s?s[t]??"":void 0);if(r)try{return await np(e,t,r,n&&(typeof document>"u"||!document.hidden),s)}catch(o){Rc.has(t)||(Rc.add(t),console.warn(`Token discovery unavailable on chain ${t}; listing configured tokens only.`,o))}return await ep(e,t,s)}catch(r){throw r}},Xs=async(e,t,n=[],s)=>{if(!e)throw new Error("Wallet address is required");const r=l.getChainsForAssets(s),o=t?.length?[...new Set(t)]:Object.keys(r).map(Number),i=await Promise.allSettled(o.map(d=>sp(e,d,!0,s))),a={};return i.forEach((d,u)=>{const m=o[u];a[m]=d.status==="fulfilled"?d.value:{chainId:m,tokens:[],error:`Unable to refresh balances on chain ${m}`}}),(await Promise.allSettled(n.map(async d=>{const u=a[d.chainId];if(!u||u.error||u.tokens.some(w=>S.normalizeNativeTokenAddress(w.address).toLowerCase()===S.normalizeNativeTokenAddress(d.address).toLowerCase()))return;const m=l.getClientForChain(d.chainId,s),f=await $u(m,d.address,d.decimals!==void 0&&d.symbol?{decimals:d.decimals,symbol:d.symbol,name:d.name||d.symbol,logo:d.logoURI}:void 0),h=await Kn.readContract(m,{address:d.address,abi:N.erc20Abi,functionName:"balanceOf",args:[e]});await tp(d.chainId,[d.address],s);const y=Number(N.formatUnits(h,f.decimals)),g=lo(d.chainId,s?s[d.chainId]??"":void 0),x=g?Ns(g,d.address):void 0;u.tokens.push({...f,...d,name:f.name,symbol:f.symbol,decimals:f.decimals,balance:h,balanceFormatted:y,balanceUsd:(x?.price??0)*y,priceStatus:x?x.stale?"stale":"fresh":"unavailable",isNative:!1})}))).forEach((d,u)=>{if(d.status==="rejected"){const m=a[n[u].chainId];m&&(m.error=`Unable to refresh token balances on chain ${m.chainId}`)}}),a},Er=({address:e,supportedChains:t,fetchBalances:n=Xs,additionalTokens:s=[],enabled:r=!0,refreshInterval:o=0,priceEnabled:i=!0})=>{const a=p.useContext(l.SpiceFlowProviderContext),d=io(),u=e?.toLowerCase(),m=JSON.stringify([...a?.supportedChainIds??t??[]].sort((C,E)=>C-E)),f=JSON.stringify(s);p.useEffect(()=>d.registerTokens(s),[d,f]);const h=u&&u===a?.embeddedWalletAddress?.toLowerCase()?"embedded":"external",y=`wallet:${JSON.stringify([a?.network,a?.apiUrl,a?.rpcOverrides])}:${u}:${h}:${m}:${d.fetcherId(n)}`,g=p.useCallback(async()=>{let C;try{C=await n(u,JSON.parse(m),d.tokens(),a?.rpcOverrides)}catch(j){const I=j instanceof Error?j.message:"Unable to refresh balances";C=Object.fromEntries(JSON.parse(m).map(b=>[b,{chainId:b,tokens:[],error:I}]))}const E=d.entry(y).snapshot().assets,k=JSON.parse(m).map(j=>C[j]??{chainId:j,tokens:[],error:`Unable to refresh balances on chain ${j}`}),F=k.flatMap(j=>j.error?[j.error]:[]);return{assets:k.flatMap(j=>j.error?E.filter(I=>I.chainId===j.chainId).map(I=>({...I,balanceError:j.error,balanceStatus:"stale"})):j.tokens.map(I=>({...I,owner:u,location:h,_fundingWallet:h,_source:"wallet",positionId:`${u}:${h}:${j.chainId}:${S.normalizeNativeTokenAddress(I.address).toLowerCase()}`}))),error:F.length?F.join("; "):null}},[d,u,m,n,h,y]),x=na(y,g,r&&!!u,o,d),w=JSON.stringify(t&&[...t].sort((C,E)=>C-E)),v=p.useMemo(()=>t?x.assets.filter(C=>t.includes(C.chainId)):x.assets,[x.assets,w]);return p.useEffect(()=>{i&&r&&u&&x.refresh()},[i]),{...x,assets:v,refreshAssets:d.invalidate,getAssetsByChain:p.useCallback(C=>v.filter(E=>E.chainId===C),[v]),getNativeAssets:p.useCallback(()=>v.filter(C=>C.isNative),[v])}};function Ms(e){const t=p.useContext(l.SpiceFlowProviderContext),n=io(),s=e.owner??((t?.mode||"7702")!=="7702"?t?.externalWalletAddress:t?.embeddedWalletAddress),r=s?.toLowerCase()!==t?.embeddedWalletAddress?.toLowerCase(),o=e.sourceChains??t?.supportedChainIds??[],i=(e.enabled??!0)&&!t?.isWhitelistGateActive,a=p.useMemo(()=>{const h=[...t?.additionalSourceTokens??[],...e.additionalSourceTokens??[],...e.destination?[e.destination]:[]];for(const y of e.supportedSourceAssets??[])for(const g of o){const x=l.getChainConfig(g)?.supportedTokens?.find(w=>l.isAssetAllowed(w,[y]));x&&h.push({...x,address:x.address,chainId:g,logoURI:x.logo})}return h},[e.destination,JSON.stringify(t?.additionalSourceTokens),JSON.stringify(e.additionalSourceTokens),JSON.stringify(e.supportedSourceAssets),JSON.stringify(o)]),d=Er({address:s,supportedChains:o,fetchBalances:Xs,additionalTokens:a,enabled:i&&e.includeWalletAssets!==!1,refreshInterval:3e4}),u=Ec({address:s,supportedChains:o,enabled:i&&e.includeRollupAssets!==!1&&!!s&&s.toLowerCase()===t?.embeddedWalletAddress?.toLowerCase(),priceEnabled:i,refetchInterval:3e4}),m=p.useMemo(()=>i?[...(e.includeWalletAssets===!1?[]:d.assets).map(h=>({...h,owner:h.owner??s,location:h.location??(r?"external":"embedded"),_source:"wallet"})),...(e.includeRollupAssets===!1||s?.toLowerCase()!==t?.embeddedWalletAddress?.toLowerCase()?[]:u.assets).map(h=>({...h,owner:h.owner??s,location:"rollup",_source:"spice"}))]:[],[i,d.assets,u.assets,e.includeWalletAssets,e.includeRollupAssets,s,r,t?.embeddedWalletAddress]),f=p.useMemo(()=>m.map(h=>({asset:h,...Yn(h,e.role??"holding",{allowedTokens:t?.allowedTokens,rpcOverrides:t?.rpcOverrides,liquidityVenues:t?.liquidityVenues,isWhitelistGateActive:!!t?.isWhitelistGateActive},e.destination,e.supportedSourceAssets,{requiresEscrow:e.requiresEscrow})})),[m,t?.allowedTokens,t?.rpcOverrides,t?.liquidityVenues,t?.isWhitelistGateActive,e.role,e.destination,e.supportedSourceAssets,e.requiresEscrow]);return{positions:f,assets:p.useMemo(()=>f.filter(h=>h.eligible&&h.asset.balance>0n).map(h=>h.asset),[f]),walletAssets:p.useMemo(()=>m.filter(h=>h._source==="wallet"),[m]),rollupAssets:p.useMemo(()=>m.filter(h=>h._source==="spice"),[m]),loading:d.loading||u.loading,refreshing:d.refreshing||u.refreshing,error:d.error||u.error,refresh:n.invalidate}}function uo(e,t=!0,n){const s=n?.pendingOnly===!0,r=l.relayerService.getBaseUrl(),o=`${r}:${e?.toLowerCase()??""}:${s}`,[i,a]=p.useState({scope:o,actions:[],error:null,loading:t&&!!e,updatedAt:null,revision:0}),[d,u]=p.useState(0),m=p.useCallback(()=>u(h=>h+1),[]);p.useEffect(()=>{if(!t||!e){a(w=>w.scope===o&&w.actions.length===0&&!w.error&&!w.loading&&!w.updatedAt&&w.revision===0?w:{scope:o,actions:[],error:null,loading:!1,updatedAt:null,revision:0});return}const h=new AbortController,y=new l.RelayerService;y.setBaseUrl(r);let g;a(w=>({scope:o,actions:w.scope===o?w.actions:[],error:w.scope===o?w.error:null,loading:!0,updatedAt:w.scope===o?w.updatedAt:null,revision:w.scope===o?w.revision:0}));const x=async()=>{try{const w=await y.getWalletActions(e,{pendingOnly:s,signal:h.signal});h.signal.aborted||a(v=>({scope:o,actions:w,error:null,loading:!1,updatedAt:new Date().toISOString(),revision:v.scope===o?v.revision+1:1}))}catch(w){if(h.signal.aborted)return;const v=w instanceof l.SpiceflowError&&w.context.httpStatus===404;a(v&&!s?C=>({scope:o,actions:[],error:null,loading:!1,updatedAt:new Date().toISOString(),revision:C.scope===o?C.revision+1:1}):C=>({scope:o,actions:C.scope===o?C.actions:[],error:"Activity is temporarily unavailable. Refresh to check again.",loading:!1,updatedAt:C.scope===o?C.updatedAt:null,revision:C.scope===o?C.revision:0}))}h.signal.aborted||(g=setTimeout(x,5e3))};return x(),window.addEventListener("online",m),()=>{h.abort(),g&&clearTimeout(g),window.removeEventListener("online",m)}},[r,e,t,o,s,d,m]);const f=i.scope===o;return{actions:t&&e&&f?i.actions:[],error:f?i.error:null,loading:t&&!!e&&(!f||i.loading),updatedAt:f?i.updatedAt:null,revision:f?i.revision:0,refresh:m}}function ca(e){const t=p.useRef(0),n=p.useRef(null),s=p.useRef(e.run);s.current=e.run;const r=p.useRef(e.onSkip);r.current=e.onSkip;const o=p.useRef(e.onCleanup);o.current=e.onCleanup,p.useEffect(()=>{if(!e.shouldRun){t.current+=1,n.current?.abort(),r.current?.();return}let i=!1,a=!1;const d=async h=>{if(h&&a)return;n.current?.abort();const y=new AbortController;n.current=y;const g=++t.current;a=!0;try{await s.current({isBackground:h,isCurrent:()=>!i&&t.current===g,signal:y.signal})}finally{a=!1}},u=window.setTimeout(()=>void d(!1),e.delayMs??250),m=()=>{document.hidden||d(!0)},f=e.backgroundIntervalMs?window.setInterval(m,e.backgroundIntervalMs):void 0;return f!==void 0&&document.addEventListener("visibilitychange",m),()=>{i=!0,n.current?.abort(),clearTimeout(u),f!==void 0&&(window.clearInterval(f),document.removeEventListener("visibilitychange",m)),o.current?.()}},[e.shouldRun,e.delayMs,e.backgroundIntervalMs,...e.deps])}function Bc(e,t){if(e.length!==t.length)return!1;const n=S.hashChainBatches(e),s=S.hashChainBatches(t);return n.every((r,o)=>r.hash===s[o]?.hash)}const Ln=e=>new Promise(t=>setTimeout(t,e)),rp="0xa9059cbb";function Oc(e){const t=e.findIndex(r=>S.isSpicenetChainId(r.chainId));if(t<=0)return[];const n=new Map,s=(r,o,i)=>{if(i<=0n)return;const a=`${r}:${o.toLowerCase()}`,d=n.get(a);d?d.amount+=i:n.set(a,{chainId:r,token:o,amount:i})};for(const r of e.slice(0,t)){const o=S.getEscrowContract(r.chainId);if(!(!o||o===S.ZERO_ADDRESS)){for(const i of r.calls)if(i.value&&i.value>0n&&l.addressesEqual(i.to,o)&&s(r.chainId,S.ZERO_ADDRESS,i.value),!!i.data?.startsWith(rp))try{const a=N.decodeFunctionData({abi:N.erc20Abi,data:i.data});if(a.functionName!=="transfer")continue;const[d,u]=a.args;l.addressesEqual(d,o)&&s(r.chainId,i.to,u)}catch{}}}return[...n.values()]}function jc(e){const t=S.getTokenByAddress(e.token,e.chainId);return[t?.equivalenceGroup,t?.symbol,t?.name]}function Dc(e,t){return Cc(e,t.chainId,t.token,jc(t))}function op(e,t){const n=Vu(e,t.chainId,t.token,jc(t));return!n||n.receiptDecimals>=n.chainDecimals?t.amount:S.convertAmountBetweenDecimals(S.convertAmountBetweenDecimals(t.amount,n.chainDecimals,n.receiptDecimals),n.receiptDecimals,n.chainDecimals)}async function Nc(e){const{deposits:t,baseline:n,fetchEntries:s,timeoutMs:r=12e4,intervalMs:o,signal:i,wait:a=Ln}=e;if(t.length===0)return!0;const d=new Map(t.map(f=>[f,Dc(n,f)])),u=Date.now(),m=u+r;for(;!i?.aborted;){try{const g=await s();if(t.every(x=>Dc(g,x)-d.get(x)>=op(g,x)))return!0}catch{}const f=Date.now();if(f>=m)return!1;const h=f-u,y=o??(h<5e3?250:h<15e3?1e3:3e3);await a(Math.min(y,m-f))}return!1}function la(e,t){const n=S.hashChainBatches(e).map(s=>s.hash);return N.keccak256(N.encodeAbiParameters([{type:"string"},{type:"uint256"},{type:"uint256"},{type:"bytes32[]"}],["ecdsa",0n,t,n]))}async function da(e,t,n,s,r){if(s?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");const o={raw:la(t,n)},i=r?await e.signMessage(o,r):await e.signMessage(o);console.debug("[SpiceFlow:execution]",{phase:"signature-returned",at:Date.now()});const a=typeof i=="string"?i:i.signature;if(!a)throw new l.SpiceflowError("SIGNATURE_FAILED","Failed to sign intent authorization. The wallet returned an empty signature.");return a}function ap(e){return e.domain==="spicenet"||S.isSpicenetChainId(e.chainId)}const Mc=0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n;async function ip(e,t,n){const s=(m,f)=>new l.SpiceflowError("SIGNATURE_FAILED","The wallet returned an invalid authorization. Review the action and try again.",{chainId:t.chainId,reason:m,...f?{cause:f}:{}});if(!e||typeof e!="object")throw s("missing-authorization");const r=e;for(const m of["address","contractAddress"])if(r[m]!==void 0&&(typeof r[m]!="string"||r[m].toLowerCase()!==t.address.toLowerCase()))throw s("authorization-target-mismatch");for(const m of["chainId","nonce"]){const f=r[m];if(f!==void 0&&(typeof f=="bigint"?f!==BigInt(t[m]):typeof f!="number"||!Number.isSafeInteger(f)||f!==t[m]))throw s(`authorization-${m}-mismatch`)}const{r:o,s:i,yParity:a}=r;if(typeof o!="string"||typeof i!="string"||!/^0x[0-9a-fA-F]{64}$/.test(o)||!/^0x[0-9a-fA-F]{64}$/.test(i)||a!==0&&a!==1||BigInt(o)===0n||BigInt(o)>=Mc||BigInt(i)===0n||BigInt(i)>Mc/2n)throw s("invalid-signature");const d={...t,r:o,s:i,yParity:a};let u;try{u=await N.recoverAddress({hash:N.keccak256(N.concatHex(["0x05",N.toRlp([N.toHex(t.chainId),t.address,t.nonce===0?"0x":N.toHex(t.nonce)])])),signature:d})}catch(m){throw s("invalid-signature",m)}if(u.toLowerCase()!==n.toLowerCase())throw s("authorization-signer-mismatch");return d}async function ua(e){const{chainBatches:t,signingAddress:n,actions:s,cache:r,signal:o,onSignatureRequested:i,beforeSign:a}=e;if(o?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");if(typeof n!="string"||!N.isAddress(n,{strict:!1})||n.toLowerCase()===N.zeroAddress)throw new l.SpiceflowError("INVALID_PARAMS","A valid signing address is required.");for(const h of t)if(!Number.isSafeInteger(h.chainId)||h.chainId<=0)throw new l.SpiceflowError("INVALID_PARAMS","A valid authorization chain is required.");const d=[...new Set(t.filter(h=>!ap(h)).map(h=>h.chainId))].map(h=>{const y=l.getDelegateContractAddress(h);if(!N.isAddress(y,{strict:!1})||y.toLowerCase()===N.zeroAddress)throw new l.SpiceflowError("INVALID_PARAMS","A valid delegation target is required.");return{chainId:h,client:l.getClientForChain(h),delegateContract:y}}),[u]=await Promise.all([Promise.all(d.map(async({chainId:h,client:y,delegateContract:g})=>{const x=Number(await S.getAccountNonce(n,y));if(!Number.isSafeInteger(x)||x<0)throw new l.SpiceflowError("INVALID_PARAMS","The authorization nonce is invalid.");const w=[n.toLowerCase(),h,g.toLowerCase(),x].join(":");return{chainId:h,delegateContract:g,nonce:x,cacheKey:w,cached:r?.get(w)}})),d.length?s.prepareSigning?.():void 0]);if(await a?.(),o?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");const m=[];let f=!1;for(const{chainId:h,delegateContract:y,nonce:g,cacheKey:x,cached:w}of u){if(w===void 0&&f&&await a?.(),o?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");const v=w===void 0?await s.signAuthorization({contractAddress:y,chainId:h,nonce:g},i):w;let C;try{C=await ip(v,{address:y,chainId:h,nonce:g},n)}catch(E){throw r?.delete(x),E}if(o?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");f=!0,r?.set(x,C),m.push(C)}return m}const Pc=15;function cp(e){return e.now-e.lastProgressAt>=e.pollTimeoutMs}function Uc(e,t){return{intentId:e,steps:t.map(n=>({...n,status:"pending"})),overallStatus:"processing"}}function po(e,t,n){const s=e.steps.map(a=>({...a})),r=s[t];if(!r)return e;n.status==="success"||n.status==="completed"?(s[t]={...r,status:"success",transactionHash:n.transactionHash},t+1<s.length&&s[t+1].status==="pending"&&(s[t+1]={...s[t+1],status:"processing"})):n.status==="reverted"||n.status==="error"?s[t]={...r,status:"failed",transactionHash:n.transactionHash,error:n.error}:s[t]={...r,status:"processing"};const o=s.some(a=>a.status==="failed"),i=s.every(a=>a.status==="success");return{...e,steps:s,overallStatus:o?"failed":i?"success":"processing"}}function lp({checkStepStatus:e,retryStep:t,maxRetries:n=3,pollingInterval:s=2500,pollTimeoutMs:r=3e5}){const[o,i]=p.useState(null),a=p.useRef(null),d=p.useRef(null),u=p.useRef(!1),m=p.useRef(!1),f=p.useRef(0),h=p.useRef({}),y=p.useRef(0),g=p.useCallback(k=>{a.current=k,i(k)},[]),x=p.useCallback(()=>{d.current&&(clearInterval(d.current),d.current=null)},[]),w=p.useCallback(()=>{f.current=0,h.current={},y.current=0,u.current=!0,x(),g(null)},[x,g]),v=p.useCallback((k,F)=>{x(),u.current=!1,g(Uc(k,F))},[x,g]),C=p.useCallback((k,F)=>{const j=a.current;j&&g(po(j,k,F))},[g]),E=p.useCallback((k,F)=>{x(),u.current=!1,m.current=!1,f.current=0,h.current={},y.current=Date.now(),g(Uc(k,F));const j=async()=>{if(!(u.current||m.current||!e)){m.current=!0;try{if(cp({now:Date.now(),lastProgressAt:y.current,pollTimeoutMs:r})){const A=a.current;A&&g({...A,steps:A.steps.map(R=>R.status==="success"?R:{...R,status:"failed",error:"Taking longer than expected. It may still complete - check the explorer, then refresh."}),overallStatus:"failed"}),u.current=!0,x();return}const I=a.current;if(!I)return;const b=I.steps.findIndex(A=>A.status!=="success");if(b===-1){u.current=!0,x();return}if(!(b===0||I.steps[b-1].status==="success"))return;try{const A=I.steps[b].stepId,{data:R}=await e(k,A);if(f.current=0,R.status==="success"&&(y.current=Date.now()),R.status==="reverted"){const q=h.current[A]||0;if(t&&q<n){h.current[A]=q+1;try{await t(k,A)}catch(O){console.error(`[intentStatus] retry failed for step ${A}:`,O)}g(po(a.current,b,{status:"executing"}));return}}const B=po(a.current,b,R);g(B),B.overallStatus!=="processing"&&(u.current=!0,x())}catch(A){f.current+=1,console.error(`[intentStatus] poll error (${f.current}/${Pc}):`,A),f.current>=Pc&&(g(po(a.current,b,{status:"error"})),u.current=!0,x())}}finally{m.current=!1}}};j(),d.current=setInterval(j,s)},[e,t,n,s,r,x,g]);return p.useEffect(()=>()=>x(),[x]),{intentStatus:o,startStatusPolling:E,beginStatusTracking:v,applyStepUpdate:C,stopStatusPolling:x,clearStatus:w}}function dp(e,t){return(t||"").trim()||`Transaction ${e}. The transaction was rejected on-chain. This may be due to insufficient balance, price changes, or health factor constraints. Please verify your positions and try again.`}const up=350,pp=2500;async function Wc(e){const{actionId:t,intentIndex:n,intentId:s,stepIndex:r,maxPolls:o=48,maxExecuteAttempts:i=3,pollsBeforeRetry:a=5,maxConsecutiveStatusErrors:d=15,onStatusMessage:u,onStepUpdate:m,signal:f,chainId:h,startWithExecute:y=!0,observeOnly:g=!1,relayer:x=l.relayerService,completeOnExecution:w=!1}=e;if(f?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");let v="pending",C,E,k=e.initialExecuteAttempts??0,F=0,j,I;const b=new Promise((R,B)=>{j=R,I=()=>B(new l.SpiceflowError("ABORT","Execution transaction aborted"))}),A=()=>{k++,e.onExecuteAttempt?.(k),x.executeStep(t,n,r,{action:"execute"}).then(R=>{R.transactionHash&&(C=R.transactionHash),R.status==="success"&&j({status:R.status,transactionHash:R.transactionHash})}).catch(R=>{const B=R instanceof Error?R.message:String(R);console.warn(`[execution] executeStep ${r} attempt ${k} error (will poll):`,B)})};f?.addEventListener("abort",I,{once:!0});try{y&&!g&&k<i&&A();for(let R=0;R<o;R++){const B=R===0?up:pp;try{const O=await Promise.race([Ln(B).then(()=>{}),b]);if(f?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");const P=O??await Promise.race([x.checkStepStatus(s,r,w).then(M=>M.data),b]);if(f?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");F=0,v=P.status,E=P.error;const D=P.transactionHash;D&&(C=D),w&&/^0x[0-9a-f]{64}$/i.test(D??"")&&(P.executionStatus==="success"||P.executionStatus==="reverted")&&(v=P.executionStatus,E=void 0),m?.({status:v,transactionHash:C,error:E})}catch(O){if(O instanceof Error&&(O.name==="AbortError"||O instanceof l.SpiceflowError&&O.code==="ABORT"))throw O;if(F++,F>=d){if(!g)throw O;u?.("Status is temporarily unavailable. The backend continues this action.",C)}continue}if(!g&&v==="created"&&R>=k*a&&k<i&&A(),v==="reverted"||v==="error")throw new l.SpiceflowError("ON_CHAIN_REVERT",dp(v,E),{status:v,txHash:C,actionId:t,intentId:s,stepId:r,chainId:h});if(v==="success"||v==="completed")return C;let q="Waiting for solver...";v==="executing"?q="Transaction executing...":v==="submitted"?q="Transaction submitted...":v==="created"&&(q="Waiting for relayer..."),u?.(q,C)}throw new l.SpiceflowError("POLLING_EXHAUSTED",`Transaction is still processing (status: ${v}). This doesn't mean it failed \u2014 the solver may still complete it. Check your positions in a few minutes, or try refreshing the page.`,{actionId:t,intentId:s,stepId:r,lastStatus:v,pollAttempts:o,maxPolls:o,txHash:C})}finally{f?.removeEventListener("abort",I)}}async function fp(e){const{actionId:t,intentIndex:n,intentId:s,totalSteps:r,observeOnly:o,delayBeforeSpicenetStepMs:i=5e3,isSpicenetStep:a,beforeStep:d,maxExecuteAttemptsForStep:u,maxPolls:m=48,onStatusMessage:f,onStepUpdate:h,signal:y}=e;let g;for(let x=e.startStep??0;x<r;x++){if(!o&&x>0&&a?.(x)&&i>0&&await Ln(i),o||await d?.(x),y?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");const w=u?.(x)??3,v=await Wc({actionId:t,intentIndex:n,intentId:s,stepIndex:x,observeOnly:o,startWithExecute:e.startWithExecute,relayer:e.relayer,maxPolls:m,maxExecuteAttempts:w,initialExecuteAttempts:e.executeAttempts?.get(x),onExecuteAttempt:C=>e.executeAttempts?.set(x,C),maxConsecutiveStatusErrors:w===6?5:15,onStatusMessage:f,onStepUpdate:h?C=>h(x,C):void 0,signal:y,completeOnExecution:x===r-1&&a?.(x)===!1});v&&(g=v)}return g}const mp="0xa9059cbb",hp=[S.SPICE_COMBINED_FEE_RECIPIENT,S.SPICE_GAS_FEE_RECIPIENT,S.SPICE_PLATFORM_FEE_RECIPIENT];function qc(e){return hp.some(t=>l.addressesEqual(e,t))}function fo(e,t){return e.map(n=>{if(n.domain==="spicenet"||S.isSpicenetChainId(n.chainId)||n.calls.length===0)return n;const s=new Set((n.tokenTransfers??[]).filter(i=>(i.from==="escrow"||i.from==="solver")&&l.addressesEqual(i.to,t)).map(i=>i.token.toLowerCase()));if(s.size===0)return n;const r=[...s].some(S.isNativeToken);let o=0;for(const i of n.calls){if(r&&i.value>0n&&i.data==="0x"&&qc(i.to)){o+=1;continue}if(!i.data?.startsWith(mp))break;try{const a=N.decodeFunctionData({abi:N.erc20Abi,data:i.data});if(a.functionName!=="transfer")break;const[d]=a.args;if(!qc(d)||!s.has(i.to.toLowerCase()))break;o+=1}catch{break}}return o===0?n:{...n,calls:n.calls.slice(o)}})}async function pa(e,t,n){if(!t||!/^0x[0-9a-f]{64}$/i.test(t))throw new Error("The destination receipt is not available yet; reconcile the existing action before retrying.");const s=()=>new l.SpiceflowError("ABORT","Execution observation retired");if(n?.aborted)throw s();const r=await new Promise((o,i)=>{const a=()=>i(s());n?.addEventListener("abort",a,{once:!0}),Promise.resolve().then(()=>e.waitForTransactionReceipt({hash:t,timeout:12e4,pollingInterval:2e3,confirmations:1})).then(o,i).finally(()=>n?.removeEventListener("abort",a))});if(n?.aborted)throw s();if(r.transactionHash?.toLowerCase()===t.toLowerCase()&&r.status==="reverted")throw new l.SpiceflowError("ON_CHAIN_REVERT","The destination transaction reverted.",{status:"reverted",txHash:t});if(r.transactionHash?.toLowerCase()!==t.toLowerCase()||r.status!=="success")throw new Error("The destination transaction has not been confirmed successfully. Reconcile the existing action before retrying.");return t}async function mo(e){let t=e.hash,n=!1;const s=Date.now()+12e4,r=i=>i.transactionHash&&i.transactionHash.toLowerCase()!==t.toLowerCase();let o=await e.client.waitForTransactionReceipt({hash:t,timeout:12e4,pollingInterval:2e3,confirmations:1,onReplaced:i=>{const a=i.transaction,d=i.replacedTransaction;if(!(i.reason==="repriced"&&d?.hash?.toLowerCase()===t.toLowerCase()&&d?.to?.toLowerCase()===e.call.to.toLowerCase()&&(d.input??"0x").toLowerCase()===e.call.data.toLowerCase()&&BigInt(d.value??0)===e.call.value&&d?.from&&d.nonce!==void 0&&/^0x[0-9a-f]{64}$/i.test(a?.hash??"")&&a?.to?.toLowerCase()===e.call.to.toLowerCase()&&(a.input??"0x").toLowerCase()===e.call.data.toLowerCase()&&BigInt(a.value??0)===e.call.value&&a.from?.toLowerCase()===d?.from?.toLowerCase()&&a.nonce===d?.nonce)){n=!0,e.onCancelled?.();return}t=a.hash,e.onRepriced?.(t)}});if(n)throw new Error("Transaction was cancelled or replaced with a different action; retry the unfinished action");if((e.confirmations??1)>1&&!r(o)&&o.status==="success"&&(o=await e.client.waitForTransactionReceipt({hash:t,timeout:Math.max(s-Date.now(),1),pollingInterval:2e3,confirmations:e.confirmations})),r(o))throw new Error("Unexpected transaction receipt; recover the submitted transaction before retrying");return{receipt:o,hash:t}}const fa=10n,gp=5;function ho(e,t,n){return n?.calls.length&&n.amountOutMinimum>0n?[{chainId:e,token:t,amount:n.amountOutMinimum}]:[]}function ma(e){return e.map(t=>({...t,calls:[...t.calls],tokenTransfers:t.tokenTransfers?[...t.tokenTransfers]:void 0}))}function go({token:e,recipient:t,amount:n}){return{to:e,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[t,n]})}}function wp({chainBatches:e,token:t,amount:n}){const s=ma(e),r=s[s.length-1];if(!r)return s;const o=S.getEscrowContractAddress(r.chainId);return r.calls=[...r.calls,go({token:t,recipient:o,amount:n})],s}function Lc({chainBatches:e,user:t,token:n,grossAmount:s,gasFee:r,policy:o}){const i=ma(e),a=i[i.length-1];if(!a)throw new l.SpiceflowError("INVALID_PARAMS","Action-output escrow funding requires at least one chain batch.");const d=l.calculateBpsFee(s,BigInt(o?.platformBps??fa)),u=r+d;if(u>=s)throw new l.SpiceflowError("INVALID_PARAMS","Borrow amount is too small after gas and Spicenet fees.",{grossAmount:s.toString(),gasFee:r.toString(),spicenetFee:d.toString()});const m=s-u,f=S.getEscrowContractAddress(a.chainId),h=[];return r>0n&&h.push(go({token:n,recipient:o?.gasRecipient??S.SPICE_GAS_FEE_RECIPIENT,amount:r})),d>0n&&h.push(go({token:n,recipient:o?.platformRecipient??S.SPICE_PLATFORM_FEE_RECIPIENT,amount:d})),a.calls=[...a.calls,...h,go({token:n,recipient:f,amount:m})],a.tokenTransfers=[...a.tokenTransfers??[],...r>0n?[{from:t,to:S.SPICE_GAS_FEE_RECIPIENT,token:n,amount:r}]:[],...d>0n?[{from:t,to:S.SPICE_PLATFORM_FEE_RECIPIENT,token:n,amount:d}]:[],{from:t,to:f,token:n,amount:m}],{chainBatches:i,gasFee:r,spicenetFee:d,netEscrowAmount:m,outputCredit:{chainId:a.chainId,token:n,amount:s}}}async function zc({chainBatches:e,user:t,token:n,grossAmount:s,chainAuthorizations:r}){let o=0n,i,a=Lc({chainBatches:e,user:t,token:n,grossAmount:s,gasFee:o});for(let d=0;d<gp;d+=1){const u=S.hashChainBatches(a.chainBatches),m=await l.relayerService.estimateBatchGas({user:t,outputToken:n,chainBatches:a.chainBatches.map((h,y)=>({...h,hash:u[y].hash})),chainAuthorizations:r}),f=m.gasFee;if(f===o&&JSON.stringify(m.policy)===JSON.stringify(i))return a;i=m.policy,o=f,a=Lc({chainBatches:e,user:t,token:n,grossAmount:s,gasFee:o,policy:i})}throw new l.SpiceflowError("INVALID_PARAMS","Action-output fee estimate did not converge. Please retry.")}function ts(e){return S.isSpicenetChainId(e.chainId)}const xp="0xa9059cbb";function Fr(e,t){return`${e}:${S.normalizeNativeTokenAddress(t).toLowerCase()}`}function Hc(e,t){return t===S.ZERO_ADDRESS.toLowerCase()?{symbol:l.getChainName(e),decimals:18}:S.getTokenByAddress(t,e)??{symbol:"tokens",decimals:18}}function yp(e,t){const n=S.getTokenByAddress(t,e);return[n?.equivalenceGroup,n?.symbol,n?.name]}async function ha(e){return l.getWalletBalanceEntries(e)}async function ga(e,t,n){const s=new Map,r=new Map,o=[...n?.walletFundingRequirement?[n.walletFundingRequirement]:[],...n?.walletFundingRequirements??[]];for(const f of o){if(f.amount<0n)throw new Error("Accepted wallet funding must not be negative");const h=Fr(f.chainId,f.token);r.set(h,(r.get(h)??0n)+f.amount),s.set(h,0n)}const i=new Map,a=new Map,d=new Map,u=new Map;for(const f of n?.actionOutputCredits??[]){const h=Fr(f.chainId,f.token);u.set(h,(u.get(h)??0n)+f.amount)}for(const f of e){if(ts(f))continue;for(const g of f.tokenTransfers??[]){if(g.from!=="escrow"&&g.from!=="solver"||!l.addressesEqual(g.to,t))continue;const x=BigInt(g.amount??0);if(x<=0n)continue;const w=Fr(f.chainId,g.token);i.set(w,(i.get(w)??0n)+x),g.from==="escrow"&&a.set(w,(a.get(w)??0n)+x)}const h=S.getEscrowContract(f.chainId),y=g=>!!h&&h!==S.ZERO_ADDRESS&&l.addressesEqual(g,h);for(const g of f.calls){if(g.value&&g.value>0n){const x=Fr(f.chainId,S.ZERO_ADDRESS);s.set(x,(s.get(x)??0n)+g.value),y(g.to)&&d.set(x,(d.get(x)??0n)+g.value)}if(g.data?.startsWith(xp))try{const x=N.decodeFunctionData({abi:N.erc20Abi,data:g.data});if(x.functionName!=="transfer")continue;const[w,v]=x.args,C=g.to.toLowerCase(),E=Fr(f.chainId,C);s.set(E,(s.get(E)??0n)+v),y(w)&&d.set(E,(d.get(E)??0n)+v)}catch{}}}let m=null;for(const[f,h]of a){const y=h-(d.get(f)??0n);if(y<=0n)continue;const[g,x]=f.split(":"),w=Number(g),v=Hc(w,x);m??(m=await ha(t));const C=Cc(m,w,x,yp(w,x));if(!(C>=y))throw new l.SpiceflowError("INVALID_PARAMS",`Insufficient Spice ${v.symbol}: needs ${N.formatUnits(y,v.decimals)}, has ${N.formatUnits(C,v.decimals)}.`,{chainId:w,token:x,userAddress:t,requiredAmount:y.toString(),balance:C.toString(),balanceSource:"spice"})}for(const[f,h]of s){const[y,g]=f.split(":"),x=Number(y);let w=h-(i.get(f)??0n)-(u.get(f)??0n);const v=r.get(f)??0n;if(v>w&&(w=v),w<=0n)continue;const C=l.getClientForChain(x),E=g===S.ZERO_ADDRESS.toLowerCase()?await C.getBalance({address:t}):await C.readContract({address:g,abi:N.erc20Abi,functionName:"balanceOf",args:[t]});if(E>=w)continue;const k=Hc(x,g);throw new l.SpiceflowError("INVALID_PARAMS",`Insufficient ${k.symbol} on ${l.getChainName(x)}: needs ${N.formatUnits(w,k.decimals)}, has ${N.formatUnits(E,k.decimals)}.`,{chainId:x,token:g,userAddress:t,requiredAmount:w.toString(),balance:E.toString(),balanceSource:"wallet"})}}function bp({chainBatches:e,tokenAddress:t,tokenTransferAmount:n,useCustomTransfers:s}){if(!(e.some(ts)||!(s?e.some(r=>ts(r)?!1:(r.tokenTransfers??[]).some(o=>o.from==="escrow"&&BigInt(o.amount??0)>0n)):n>0n)))throw new l.SpiceflowError("INVALID_PARAMS","Payouts funded from Spice balance require a Spicenet funding batch before the destination chain batch. Deposits into Spice balance and gas-only actions do not need one.",{tokenAddress:t,tokenTransferAmount:n.toString(),useCustomTransfers:!!s})}function vp(e,t,n,s){t.forEach((r,o)=>{if(!r.to||!r.from||!r.token||r.amount===void 0)throw new l.SpiceflowError("INVALID_TOKEN_TRANSFER",`tokenTransfers[${o}] on chain ${e} is missing required fields (to/from/token/amount). This usually means the embedded wallet wasn't ready when the intent was built \u2014 please retry.`,{chainId:e,transferIndex:o,transfer:{from:r.from,to:r.to,token:r.token,amount:r.amount?.toString()},signingAddress:n,useCustomTransfers:s})})}function wo({user:e,chainBatches:t,tokenAddress:n,tokenTransferAmount:s,exp:r,signature:o,chainAuthorizations:i,useCustomTransfers:a}){const d=t,u=S.hashChainBatches(d),m=d.filter(f=>!ts(f)).length;if(bp({chainBatches:d,tokenAddress:n,tokenTransferAmount:s,useCustomTransfers:a}),!a&&s>0n&&m>1)throw new l.SpiceflowError("INVALID_PARAMS","Multiple non-Spicenet batches require explicit tokenTransfers. Pass useCustomTransfers with per-batch transfers instead of relying on the default escrow payout injection.",{nonSpicenetBatchCount:m,tokenAddress:n,tokenTransferAmount:s.toString()});return{user:e,...i?{chainAuthorizations:i}:{},intents:[{mode:"7702",signatureType:"ecdsa",signature:o,nbf:0,exp:r,chainBatches:u.map((f,h)=>{const y=d[h],g=ts(y)?[]:a?y.tokenTransfers??[]:s>0n?[{from:"escrow",to:e,token:n,amount:s}]:[];return vp(Number(f.chainId),g,e,a),{hash:f.hash,chainId:Number(f.chainId),tokenTransfers:g,calls:f.calls}})}]}}function Vc(e,t){const n=t?.depositToEscrow?.gasFundingSource==="action-output"?t.depositToEscrow:null,s=t?.depositToEscrow&&!n?wp({chainBatches:e,token:t.depositToEscrow.token,amount:t.depositToEscrow.amount}):ma(e);return{actionOutputDeposit:n,batches:s}}let wa=!1;function Js(){const{address:e,isConnected:t,isAuthenticated:n,actions:s}=l.useWallet(),r=p.useRef(null),o=p.useRef(0),i=p.useRef(null),{intentStatus:a,startStatusPolling:d,beginStatusTracking:u,applyStepUpdate:m,clearStatus:f}=lp({checkStepStatus:(E,k)=>l.relayerService.checkStepStatus(E,k),retryStep:async(E,k)=>{const[F,j]=E.split("/"),I=parseInt(j||"0",10);await l.relayerService.executeStep(F,I,k,{action:"execute"})}}),h=p.useCallback(()=>{o.current++,i.current=null,f()},[f]),y=p.useRef(s),g=p.useRef(new Map);y.current=s;const x=p.useCallback((E,k,F,j,I)=>ua({chainBatches:E,signingAddress:k,actions:y.current,cache:g.current,signal:F,onSignatureRequested:j,beforeSign:I}),[]),w=p.useCallback((E,k,F,j)=>da(y.current,E,k,F,j),[]),v=p.useCallback(async(E,k,F,j,I,b)=>{let A={},R={};const B=(O,P,D)=>{D?.actionId&&(A={actionId:D.actionId,intentId:D.intentId,intentIndex:D.intentIndex,totalSteps:D.totalSteps,autoContinue:D.autoContinue,user:b?.userOverride||e}),j?.({step:O,message:P,...R,...A,...D})};if(wa)throw new l.SpiceflowError("CONCURRENT_EXECUTION","A execution transaction is already in progress. Please wait.");wa=!0;const q=o.current;try{if(!e)throw new l.SpiceflowError("WALLET_DISCONNECTED","No wallet connected. Please log in first.");const O=b?.userOverride||e,P=l.relayerService.getBaseUrl(),D=i.current;if(D&&l.addressesEqual(D.user,O)&&D.apiUrl===P){if(D.resume)return await D.resume(E,k,F,I,j,b);throw D.error}i.current=null;const M=be=>S.hashConditionalExecutionPlan(be.map(qe=>({...qe,tokenTransfers:qe.tokenTransfers??[]})),[]),L=M(E),T=be=>new Map(Object.entries(be??{}).filter(([qe,ye])=>qe!=="signal"&&(typeof ye!="function"||["prepareForSigning","adjustBatchesForEstimate","resolveActionOutputCredits"].includes(qe))).map(([qe,ye])=>[qe,typeof ye=="function"?ye:JSON.stringify(ye,(Ue,de)=>typeof de=="bigint"?de.toString():de)])),H=T(b),V=await l.relayerService.supportsAutomaticContinuation({signal:I}),{actionOutputDeposit:te,batches:Z}=Vc(E,b);let K=Z,Y=[],J=b?.useCustomTransfers,ge=Oc(K),pe=null;const we=async()=>{(b?.walletFundingRequirement||b?.walletFundingRequirements?.length)&&await ga([],O,{walletFundingRequirement:b?.walletFundingRequirement,walletFundingRequirements:b?.walletFundingRequirements});for(let be=0;ge.length>0&&be<3;be++)try{pe=await ha(O);break}catch(qe){if(I?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");if(be===2)throw new l.SpiceflowError("RELAYER_ERROR","Unable to read your Spice balance. Please try again before submitting the transaction.",{cause:qe});await Ln(1e3)}await b?.validateBeforeSubmit?.(K)};B("building","Preparing your wallet and transaction...");const ve=await x(K,O,I,()=>B("signing-delegation","Confirm the authorization in your wallet..."),we);if(B("building","Checking transaction fees and balances..."),I?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");const ne=BigInt(Math.floor(Date.now()/1e3)+3600);if(te){const be=await zc({chainBatches:E,user:O,token:te.token,grossAmount:te.amount,chainAuthorizations:ve});K=be.chainBatches,Y=[be.outputCredit],J=!0}if(!b?.skipPreSubmitFeeEstimate){let be=!1;if(b?.feeExecutionMode==="user-transfer"&&b.adjustBatchesForEstimate&&l.relayerService.canValidateActionFees()){const qe=await l.relayerService.validateActionFees(wo({user:O,chainBatches:K,tokenAddress:k,tokenTransferAmount:F,exp:Number(ne),signature:"0x00",chainAuthorizations:ve,useCustomTransfers:J}),{signal:I});r.current=qe;const ye=await b.adjustBatchesForEstimate({feeEstimate:qe,chainBatches:K});be=!ye||Bc(K,ye),ye&&(K=ye)}for(let qe=0;!be&&qe<10;qe++){const ye=b?.feeExecutionMode==="user-transfer"?fo(K,O):K,Ue=wo({user:O,chainBatches:ye,tokenAddress:k,tokenTransferAmount:F,exp:Number(ne),signature:"0x00",chainAuthorizations:ve,useCustomTransfers:J}),de=await l.relayerService.estimateActionFees(Ue,{signal:I});r.current=de;const Ye=await b?.adjustBatchesForEstimate?.({feeEstimate:de,chainBatches:K}),pt=!!Ye&&Bc(K,Ye);if(!Ye||pt){be=!0;break}K=Ye}if(!be)throw new l.SpiceflowError("INVALID_PARAMS","Fee estimate did not converge. Please retry.")}if(b?.prepareForSigning){const be=await b.prepareForSigning(K);if(be.length!==K.length||be.some((qe,ye)=>qe.chainId!==K[ye].chainId||qe.domain!==K[ye].domain))throw new Error("The funded route changed before signing");K=be}b?.resolveActionOutputCredits&&(Y=await b.resolveActionOutputCredits()),(!b?.skipUserFundingPreflight||b.walletFundingRequirement||b.walletFundingRequirements?.length)&&await ga(b?.skipUserFundingPreflight?[]:K,O,{actionOutputCredits:Y,walletFundingRequirement:b?.walletFundingRequirement,walletFundingRequirements:b?.walletFundingRequirements}),ge=Oc(K),ge.length&&!pe&&(pe=await l.getWalletBalanceEntries(O)),await b?.validateBeforeSubmit?.(K),B("building","Preparing the signing request...");const _=await w(K,ne,I,()=>B("signing-intent","Confirm the transaction in your wallet..."));if(I?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");if(P!==l.relayerService.getBaseUrl())throw new l.SpiceflowError("RELAYER_ERROR","The network changed before submission. Review your balances before trying again.");const le=wo({user:O,chainBatches:K,tokenAddress:k,tokenTransferAmount:F,exp:Number(ne),signature:_,chainAuthorizations:ve,useCustomTransfers:J});let W=K.length-1;for(;W>=0&&ts(K[W]);)W--;R={totalSteps:K.length},W>=0&&(R={...R,destinationChainId:Number(K[W].chainId),destinationStepIndex:W});const De=Date.now();if(B("submitting","Submitting to relayer..."),await b?.validateBeforeSubmit?.(K),I?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");if(P!==l.relayerService.getBaseUrl())throw new l.SpiceflowError("RELAYER_ERROR","The network changed before submission. Review your balances before trying again.");console.debug("[SpiceFlow:execution]",{phase:"submit-check-complete",at:Date.now(),durationMs:Date.now()-De});const Ae=K.length;let z;try{z=await l.relayerService.createAction({...le,...b?.externalExecution?{externalExecution:b.externalExecution}:{}},{autoContinue:V,idempotencyKey:b?.idempotencyKey,signal:I,onAccepted:be=>{const[qe,ye="0"]=be.intentIds[0].split("/"),Ue=parseInt(ye,10);B("executing","Executing on chain...",{actionId:qe,intentId:`${qe}/${Ue}`,intentIndex:Ue,totalSteps:Ae,autoContinue:be.autoContinue===!0})}})}catch(be){throw q===o.current&&be instanceof l.SpiceflowError&&be.context.submissionStatus==="unknown"&&(i.current={user:O,apiUrl:P,error:be}),be}const[Q,se]=z.intentIds[0].split("/"),ie=parseInt(se||"0",10),X=`${Q}/${ie}`;B("executing","Executing on chain..."),B("executing","Executing on chain...",{actionId:Q,intentId:X,intentIndex:ie,totalSteps:K.length,autoContinue:z.autoContinue===!0});const oe=new l.RelayerService;oe.setBaseUrl(P);let je,Me=0;const me=new Map,Se=async(be,qe=j,ye=!1)=>{const Ue=(de,Ye,pt)=>qe?.({step:de,message:Ye,...pt});try{if((!ye||!je)&&(je=await fp({actionId:Q,intentIndex:ie,intentId:X,totalSteps:Ae,signal:be,observeOnly:z.autoContinue===!0,startWithExecute:!ye,startStep:ye?Me:0,executeAttempts:me,onStepUpdate:(de,Ye)=>{(Ye.status==="success"||Ye.status==="completed")&&(Me=Math.max(Me,de+1))},relayer:z.autoContinue||ye?oe:l.relayerService,...pe?{delayBeforeSpicenetStepMs:0}:{},isSpicenetStep:de=>ts(K[de]),beforeStep:async de=>{if(z.autoContinue===!0||!pe||!ts(K[de]))return;const Ye=await Nc({deposits:ge,baseline:pe,fetchEntries:()=>ha(O),signal:be});if(be?.aborted)throw new l.SpiceflowError("ABORT","Execution transaction aborted");if(!Ye)throw new l.SpiceflowError("POLLING_EXHAUSTED","Your deposit is still waiting for Spice credit. Check this transaction's status before trying again.",{actionId:Q,intentId:X,stepId:de})},maxExecuteAttemptsForStep:de=>ts(K[de])?6:3,maxPolls:z.autoContinue?Number.POSITIVE_INFINITY:180,onStatusMessage:(de,Ye)=>{Ue("executing",de,{txHash:Ye,actionId:Q,intentId:X,intentIndex:ie,totalSteps:Ae,autoContinue:z.autoContinue===!0})}})),b?.requireDestinationReceipt){const de=[...K].reverse().find(Ye=>!ts(Ye));if(!de)throw new Error("The action has no destination transaction to verify.");await pa(l.getClientForChain(de.chainId),je,be)}return Ue("success","Transaction successful!",{txHash:je,actionId:Q,intentId:X,intentIndex:ie,totalSteps:Ae,autoContinue:z.autoContinue===!0}),i.current?.resume===Te&&(i.current=null),je||Q}catch(de){if(de instanceof l.SpiceflowError&&de.code==="ON_CHAIN_REVERT"&&de.context.status==="reverted"&&(de.context.stepId===0||Ae===1))throw i.current?.resume===Te&&(i.current=null),de;const Ye=new l.SpiceflowError(de instanceof l.SpiceflowError?de.code:"RELAYER_STATUS_ERROR",de instanceof l.SpiceflowError&&de.code==="ON_CHAIN_REVERT"?de.message:`Your action was accepted, but its completion could not be confirmed. Check the original action before trying again. ${de instanceof Error?de.message:""}`.trim(),{...de instanceof l.SpiceflowError?de.context:{},submissionStatus:"accepted",actionId:Q,intentId:X,txHash:je,cause:de});throw q===o.current&&(i.current={user:O,apiUrl:P,error:Ye,resume:Te}),Ye}},Te=async(be,qe,ye,Ue,de,Ye)=>{const pt=T(Ye);if(L!==M(be)||H.size!==pt.size||[...H].some(([tt,$e])=>pt.get(tt)!==$e)||!l.addressesEqual(k,qe)||F!==ye)throw i.current.error;return Se(Ue,de,!0)};return await Se(I,j)}catch(O){throw console.error("[Execution] Error:",O),B("error",O.message||"Transaction failed",{error:O.message,...O?.context?.submissionStatus==="unknown"?{submissionStatus:"unknown",...typeof O.context.idempotencyKey=="string"&&/^0x[0-9a-f]{64}$/i.test(O.context.idempotencyKey)?{idempotencyKey:O.context.idempotencyKey}:{},...typeof O.context.user=="string"&&/^0x[0-9a-f]{40}$/i.test(O.context.user)?{user:O.context.user}:{}}:{}}),O}finally{wa=!1}},[e,n,x,w]),C=p.useCallback(async(E,k,F,j)=>{if(!e&&(!j?.userOverride||j.signAuthorizationsForEstimate))throw new l.SpiceflowError("WALLET_DISCONNECTED","No wallet connected. Please log in first.");const I=j?.userOverride||e,b=j?.validateFeeCalls===!0&&j.feeExecutionMode==="user-transfer"&&l.relayerService.canValidateActionFees(),{actionOutputDeposit:A,batches:R}=Vc(E,j);let B=R;const q=j?.feeExecutionMode==="user-transfer"&&!b?fo(B,I):B,O=j?.signAuthorizationsForEstimate?await x(q,I):void 0;let P=j?.useCustomTransfers;A&&(B=(await zc({chainBatches:E,user:I,token:A.token,grossAmount:A.amount,chainAuthorizations:O})).chainBatches,P=!0);const D=j?.feeExecutionMode==="user-transfer"&&!b?fo(B,I):B,M=wo({user:I,chainBatches:D,tokenAddress:k,tokenTransferAmount:F,exp:Math.floor(Date.now()/1e3)+3600,signature:"0x00",chainAuthorizations:O,useCustomTransfers:P}),L=await(b?l.relayerService.validateActionFees(M,{signal:j?.signal}):l.relayerService.estimateActionFees(M,{signal:j?.signal}));return r.current=L,L},[e,x]);return{execute:v,estimate:C,lastFeeEstimate:r.current,hasEmbeddedWallet:t&&n,intentStatus:a,startStatusPolling:d,beginStatusTracking:u,applyStepUpdate:m,clearStatus:h}}function Kt(e,t,n,s){if(t===n)return e;if(t<n)return e*10n**BigInt(n-t);const r=10n**BigInt(t-n);return s==="ceil"?(e+r-1n)/r:e/r}function ln(e,t){if(!Number.isInteger(t)||t<0||t>255)throw new Error("Invalid token decimals");if(!/^\d+(?:\.\d*)?$/.test(e))throw new Error("Enter a valid amount.");if((e.split(".")[1]?.replace(/0+$/,"")??"").length>t)throw new Error(`Use at most ${t} decimal places for this source.`);return N.parseUnits(e,t)}function nn(e,t,n){const s=Kt(e,t,n,"floor");if(Kt(s,n,t,"floor")!==e)throw new Error(`Use at most ${n} decimal places for this delivered token.`);return s}function Cp(e){return`0x77${e.slice(4)}`}function Tr({userAddress:e,destinationChainId:t,deliveryToken:n,deliveryAmount:s,withdrawalAmount:r,deliveryRecipient:o,deliveryTransfers:i,requestTimestampMs:a,expiresAt:d,metadata:u,requestNonce:m}){if(d!==void 0&&(!Number.isSafeInteger(d)||d<=0))throw new Error("Withdrawal expiry must be a positive Unix timestamp in seconds");const f=i?.length?i:[{token:n,recipient:o,amount:r??s}],h=f.reduce((v,C)=>v+C.amount,0n);if(h<=0n)return null;const y=a??Date.now(),g=BigInt(Math.floor(y/1e3)),x=e??o,w=Cp(N.keccak256(N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},...m?[{type:"bytes32"}]:[]],[x,n,o,h,BigInt(t),BigInt(y),...m?[m]:[]])));return{chainId:S.SPICENET_NATIVE_CHAIN_ID,domain:"spicenet",tokenTransfers:[],calls:[{to:S.ZERO_ADDRESS,value:0n,data:N.encodeFunctionData({abi:S.spicenetAbi,functionName:"createWithdrawalRequest",args:[{chainId:`evm:${t}`,idempotenceKey:w,nbf:0n,exp:d===void 0?g+3600n:BigInt(d),metadata:u??"{}",transfers:f.map(v=>({token:N.getAddress(v.token).toLowerCase(),to:N.getAddress(v.recipient).toLowerCase(),amount:v.amount}))}]})}]}}const xa=e=>{const[t,n]=p.useState(!1),s=p.useContext(l.SpiceFlowProviderContext),{dark:r,dk:o}=l.useSpiceBrand();if(p.useEffect(()=>{n(!0)},[]),!t)return c.jsx("div",{className:e.className,children:c.jsx("button",{disabled:!0,style:{padding:"12px 24px",fontSize:"16px",backgroundColor:r?o.hoverBg:"#ccc",color:r?o.textSecondary:"white",border:r?`1px solid ${o.buttonBorder}`:"none",borderRadius:"4px",cursor:"not-allowed"},children:"Loading..."})});if(!s){const i='ProviderLogin must be used within SpiceFlowProvider. Please wrap your app with <SpiceFlowProvider provider="privy">.';return c.jsx("div",{className:e.className,children:c.jsx("button",{onClick:()=>{e.onAuthError&&e.onAuthError(i)},style:{padding:"12px 24px",fontSize:"16px",backgroundColor:r?o.errorBg:"#dc2626",color:r?o.errorText:"white",border:r?`1px solid ${o.errorBorder}`:"none",borderRadius:"4px",cursor:"pointer"},children:"Provider Not Found"})})}return c.jsx(l.PrivyLogin,{...e})},Rr=({size:e=20,strokeWidth:t=2,color:n="currentColor",style:s})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:s,children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Br=(e,t,n,s)=>({width:e,height:e,fill:"none",className:t,"aria-hidden":n??!0,style:s}),$s=({size:e=16,color:t="currentColor",strokeWidth:n=2,direction:s="down",className:r,style:o,"aria-hidden":i})=>c.jsx("svg",{...Br(e,r,i,{transform:s==="up"?"rotate(180deg)":void 0,transition:"transform 0.3s ease",...o}),viewBox:"0 0 16 16",children:c.jsx("path",{d:"M4 6L8 10L12 6",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),kp=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsxs("svg",{...Br(e,s,o,r),viewBox:"0 0 24 24",children:[c.jsx("circle",{cx:"11",cy:"11",r:"8",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"m21 21-4.3-4.3",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})]}),Ip=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsx("svg",{...Br(e,s,o,r),viewBox:"0 0 24 24",children:c.jsx("path",{d:"m6 9 6 6 6-6",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Sp=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsx("svg",{...Br(e,s,o,r),viewBox:"0 0 24 24",children:c.jsx("path",{d:"m9 18 6-6-6-6",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Qc=({size:e=14,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsx("svg",{...Br(e,s,o,r),viewBox:"0 0 16 16",children:c.jsx("path",{d:"M3 8L6.5 11.5L13 5",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Gc=({isSuccess:e,type:t,chainName:n,explorerUrl:s,txHash:r,dark:o=!1,successBg:i="#d1fae5",successBorder:a="#6ee7b7",successText:d="#065f46",errorBg:u="#fee2e2",errorBorder:m="#fca5a5",errorText:f="#dc2626",textSecondary:h="#6b7280"})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",borderRadius:"8px",backgroundColor:e?i:u,border:e?`1px solid ${a}`:`1px solid ${m}`},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[c.jsx("div",{style:{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:e?"#10b981":"#ef4444",display:"flex",alignItems:"center",justifyContent:"center"},children:e?c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M11.6667 3.5L5.25 9.91667L2.33333 7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),c.jsxs("div",{children:[c.jsx("p",{style:{margin:0,fontSize:"14px",fontWeight:600,fontFamily:l.font.mono,letterSpacing:"0.5px",color:e?d:f},children:e?`${t.toUpperCase()} CONFIRMED`:`${t.toUpperCase()} FAILED`}),c.jsxs("p",{style:{margin:"2px 0 0 0",fontSize:"12px",color:h},children:["on ",n]})]})]}),s&&r&&c.jsxs("a",{href:`${s}/tx/${r}`,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"13px",color:h,textDecoration:"none",whiteSpace:"nowrap"},children:["View on explorer",c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[c.jsx("path",{d:"M9 6.5V9.5C9 9.76522 8.89464 10.0196 8.70711 10.2071C8.51957 10.3946 8.26522 10.5 8 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V4C1.5 3.73478 1.60536 3.48043 1.79289 3.29289C1.98043 3.10536 2.23478 3 2.5 3H5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M7.5 1.5H10.5V4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M5 7L10.5 1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]}),Kc=`
|
|
2
|
+
"use strict";var Kd=Object.create;var Ai=Object.defineProperty;var Yd=Object.getOwnPropertyDescriptor;var Zd=Object.getOwnPropertyNames;var Xd=Object.getPrototypeOf,Jd=Object.prototype.hasOwnProperty;var $d=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Zd(t))!Jd.call(e,r)&&r!==n&&Ai(e,r,{get:()=>t[r],enumerable:!(s=Yd(t,r))||s.enumerable});return e};var _d=(e,t,n)=>(n=e!=null?Kd(Xd(e)):{},$d(t||!e||!e.__esModule?Ai(n,"default",{value:e,enumerable:!0}):n,e));const c=require("react/jsx-runtime"),d=require("./privy-CXNjXMtm.cjs"),p=require("react"),S=require("@spicenet-io/spiceflow-core"),is=require("wagmi"),N=require("viem"),Kn=require("viem/actions"),hr=require("@privy-io/react-auth"),gr=require("react-dom");require("@tanstack/react-query");const eu="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;200;300;400;500;600;700&display=swap",tu="spiceflow-ibm-plex-mono",nu="spiceflow-preconnect-googleapis",su="spiceflow-preconnect-gstatic";function Lo(e,t){if(document.getElementById(e))return;const n=t();n.id=e,document.head.appendChild(n)}function ru(){typeof document>"u"||(Lo(nu,()=>{const e=document.createElement("link");return e.rel="preconnect",e.href="https://fonts.googleapis.com",e}),Lo(su,()=>{const e=document.createElement("link");return e.rel="preconnect",e.href="https://fonts.gstatic.com",e.crossOrigin="",e}),Lo(tu,()=>{const e=document.createElement("link");return e.rel="stylesheet",e.href=eu,e}))}const Ei=N.parseAbi(["function exactInput((address[] tokens,address[] pools,bytes[] extensionDatas,uint256 zeroForOneBitMap,uint128 amountIn,uint128 amountOutMinimum,address recipient,uint256 deadline) params) payable returns (uint256 amountOut)","function exactOutput((address[] tokens,address[] pools,bytes[] extensionDatas,uint256 zeroForOneBitMap,uint128 amountOut,uint128 amountInMaximum,address recipient,uint256 deadline) params) payable returns (uint256 amountIn)"]),Wn={name:"Metric",chainIds:[1,56,4663],apiUrl:"https://api.metric.xyz",swapRouter:"0x02201E6f13c41506c7Bb635d7543F98826229aB7"},ou=[1,56,137,143,999,4326,4663,8453,42161,43114];async function Fi(e,t,n,s,r,o){if(S.isNativeToken(n)||S.isNativeToken(s)||d.addressesEqual(n,s)||!(e.chainIds??Wn.chainIds).includes(t))return null;const i=(e.apiUrl??Wn.apiUrl).replace(/\/$/,""),a=AbortSignal.timeout(6e3),l=await fetch(`${i}/public/v1/evm/${t}/route`,{method:"POST",headers:{"Content-Type":"application/json"},signal:a,body:JSON.stringify({tokenIn:n,tokenOut:s,tradeType:o,[o==="exact_in"?"amountIn":"amountOut"]:r.toString(),maxRoutes:1})});if(l.status===422)return null;if(!l.ok)throw new d.SpiceflowError("VENUE_API_ERROR",`Metric route HTTP ${l.status}`,{chainId:t});const u=await l.json(),m=u.routes[0],f=BigInt(u.amountIn),h=BigInt(u.amountOut);if(u.routes.length!==1||!m||!m.legs.length||m.legs.length>2||u.tradeType!==o||!d.addressesEqual(u.tokenIn,n)||!d.addressesEqual(u.tokenOut,s)||f<=0n||h<=0n||(o==="exact_in"?f:h)!==r||BigInt(m.amountIn)!==f||BigInt(m.amountOut)!==h)throw new d.SpiceflowError("VENUE_API_ERROR","Invalid Metric route",{chainId:t});const y=m.legs.map(E=>E.poolAddress),g=new URL(`${i}/public/v1/evm/${t}/metadata`);g.searchParams.set("addresses",y.join(","));const x=await fetch(g,{signal:a});if(!x.ok)throw new d.SpiceflowError("VENUE_API_ERROR",`Metric metadata HTTP ${x.status}`,{chainId:t});const w=await x.json(),v=[n];let C=0n;for(const[E,k]of m.legs.entries()){const F=w.data.find(O=>d.addressesEqual(O.poolAddress,k.poolAddress));if(!F||F.priceProviderStatus!=="healthy"||F.pauseLevel!==0)return null;if(typeof k.zeroForOne!="boolean"||!d.addressesEqual(v[E],k.tokenIn)||!d.addressesEqual(k.tokenIn,k.zeroForOne?F.token0:F.token1)||!d.addressesEqual(k.tokenOut,k.zeroForOne?F.token1:F.token0))throw new d.SpiceflowError("VENUE_API_ERROR","Invalid Metric pool path",{chainId:t});v.push(k.tokenOut),k.zeroForOne&&(C|=1n<<BigInt(E))}if(!d.addressesEqual(v[v.length-1],s))throw new d.SpiceflowError("VENUE_API_ERROR","Invalid Metric output token",{chainId:t});return{amountIn:f,amountOut:h,path:{tokens:v,pools:y,extensionDatas:y.map(()=>"0x"),zeroForOneBitMap:C}}}function Ti(e={}){const t=e.swapRouter??Wn.swapRouter;return{name:e.name??Wn.name,chainIds:e.chainIds??Wn.chainIds,resolve:async(n,s,r)=>{const o=await Fi(e,s,n.tokenIn,n.tokenOut,n.amountIn,"exact_in");if(!o)return null;const i=S.applySlippage(o.amountOut,n.maxSlippage??.02);return{venue:e.name??Wn.name,amountOut:o.amountOut,amountOutMinimum:i,calls:[{to:n.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[t,n.amountIn]})},{to:t,value:0n,data:N.encodeFunctionData({abi:Ei,functionName:"exactInput",args:[{...o.path,amountIn:n.amountIn,amountOutMinimum:i,recipient:r,deadline:BigInt(Math.floor(Date.now()/1e3)+1200)}]})}]}}}}function Ri(e={}){return{name:e.name??Wn.name,chainIds:e.chainIds??Wn.chainIds,resolve:async(t,n,s)=>{const r=await Fi(e,n,t.tokenIn,t.tokenOut,t.amountOut,"exact_out");if(!r)return null;const o=BigInt(Math.round((t.maxSlippage??.02)*1e4)),i=r.amountIn+(r.amountIn*o+9999n)/10000n;return{venue:e.name??Wn.name,amountIn:r.amountIn,amountInMax:i,amountOut:t.amountOut,calls:[{to:e.swapRouter??Wn.swapRouter,value:0n,data:N.encodeFunctionData({abi:Ei,functionName:"exactOutput",args:[{...r.path,amountOut:t.amountOut,amountInMaximum:i,recipient:s,deadline:BigInt(Math.floor(Date.now()/1e3)+1200)}]})}]}}}}const au={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",84532:"0x4200000000000000000000000000000000000006"},Bi=N.parseAbi(["function deposit() payable","function withdraw(uint256 wad)"]);function zo(e){return d.getChainConfig(e)?.wrappedNativeTokenAddress??au[e]}const Ho=(e,t)=>({to:e,value:t,data:N.encodeFunctionData({abi:Bi,functionName:"deposit"})}),Vo=(e,t)=>({to:e,value:0n,data:N.encodeFunctionData({abi:Bi,functionName:"withdraw",args:[t]})});function Qo(e,t,n){const s=S.isNativeToken(t),r=S.isNativeToken(n);if(!s&&!r)return null;const o=zo(e);return o?{weth:o,wrapIn:s,unwrapOut:r}:null}function Oi(e,t,n,s){const r=Qo(e,t,n);return!r||s<=0n?null:r.wrapIn&&!r.unwrapOut&&n.toLowerCase()===r.weth.toLowerCase()?[Ho(r.weth,s)]:r.unwrapOut&&!r.wrapIn&&t.toLowerCase()===r.weth.toLowerCase()?[Vo(r.weth,s)]:null}function iu(e){return{...e,resolve:async(t,n,s,r)=>{const o=Oi(n,t.tokenIn,t.tokenOut,t.amountIn);if(o)return{venue:"native-wrap",amountOut:t.amountIn,amountOutMinimum:t.amountIn,calls:o};const i=await e.resolve(t,n,s,r);if(i)return i;const a=Qo(n,t.tokenIn,t.tokenOut);if(!a)return null;const l=await e.resolve({...t,tokenIn:a.wrapIn?a.weth:t.tokenIn,tokenOut:a.unwrapOut?a.weth:t.tokenOut},n,s,r);return l?{...l,calls:[...a.wrapIn?[Ho(a.weth,t.amountIn)]:[],...l.calls,...a.unwrapOut?[Vo(a.weth,l.amountOutMinimum)]:[]]}:null}}}function cu(e){return{...e,resolve:async(t,n,s)=>{const r=Oi(n,t.tokenIn,t.tokenOut,t.amountOut);if(r)return{venue:"native-wrap",amountIn:t.amountOut,amountInMax:t.amountOut,amountOut:t.amountOut,calls:r};const o=await e.resolve(t,n,s);if(o)return o;const i=Qo(n,t.tokenIn,t.tokenOut);if(!i)return null;const a=await e.resolve({...t,tokenIn:i.wrapIn?i.weth:t.tokenIn,tokenOut:i.unwrapOut?i.weth:t.tokenOut},n,s);return a?{...a,calls:[...i.wrapIn?[Ho(i.weth,a.amountInMax)]:[],...a.calls,...i.unwrapOut?[Vo(i.weth,a.amountOut)]:[]]}:null}}}const ji=[100,500,3e3,1e4];function eo(e,t,n,s,r){const o=[];for(const i of n){const a=typeof i=="object"&&!Array.isArray(i)?i:void 0,l=a?a.tokens:Array.isArray(i)?i:[i];if(!l.length||l.length>2)throw new Error("A v3 route must have one or two intermediate tokens");const u=[e,...l,t];if(a&&(a.feeTiers.length!==u.length-1||a.feeTiers.some(f=>!f.length)))throw new Error("A v3 route needs fee tiers for every pool");if(new Set(u.map(f=>f.toLowerCase())).size!==u.length)continue;const m=(f,h)=>{if(f===u.length){o.push(r==="in"?h:Di(h));return}for(const y of a?.feeTiers[f-1]??s)m(f+1,N.concatHex([h,N.encodePacked(["uint24","address"],[y,u[f]])]))};m(1,u[0])}return[...new Set(o)]}function Di(e){const t=e.slice(2),n=[];for(let s=0;s<t.length;){const r=n.length%2===0?40:6;n.push(t.slice(s,s+r)),s+=r}return`0x${n.reverse().join("")}`}const lu=N.parseAbi(["function exactOutputSingle((address tokenIn, address tokenOut, uint24 fee, address recipient, uint256 amountOut, uint256 amountInMaximum, uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountIn)","function exactOutput((bytes path, address recipient, uint256 amountOut, uint256 amountInMaximum) params) payable returns (uint256 amountIn)"]),du=N.parseAbi(["function exactOutputSingle((address tokenIn, address tokenOut, uint24 fee, address recipient, uint256 deadline, uint256 amountOut, uint256 amountInMaximum, uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountIn)","function exactOutput((bytes path, address recipient, uint256 deadline, uint256 amountOut, uint256 amountInMaximum) params) payable returns (uint256 amountIn)"]),uu=1800;function Ni(e){const{config:t,route:n,tokenIn:s,tokenOut:r,recipient:o,amountOut:i}=e,a=e.amountInMaximum,l=e.routerHasDeadline?du:lu,u=e.routerHasDeadline?{deadline:BigInt(Math.floor(Date.now()/1e3)+uu)}:{},m=n.path?N.encodeFunctionData({abi:l,functionName:"exactOutput",args:[{path:n.path,recipient:o,...u,amountOut:i,amountInMaximum:a}]}):N.encodeFunctionData({abi:l,functionName:"exactOutputSingle",args:[{tokenIn:s,tokenOut:r,fee:n.fee,recipient:o,...u,amountOut:i,amountInMaximum:a,sqrtPriceLimitX96:0n}]});return{to:t.swapRouter,value:0n,data:m}}const pu=N.parseAbi(["function quoteExactInput(bytes path, uint256 amountIn) returns (uint256 amountOut, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)","function quoteExactOutput(bytes path, uint256 amountOut) returns (uint256 amountIn, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)"]);async function wr(e,t,n,s,r){const o=d.getClientForChain(e),{result:i}=await o.simulateContract({address:t.quoterV2,abi:pu,functionName:r==="in"?"quoteExactInput":"quoteExactOutput",args:[n,s]}),[a,,,l]=i;if(a<=0n)throw new Error("No liquidity along this path.");return{amount:a,gasEstimate:l}}async function fu(e){const{tokenIn:t,tokenOut:n,amountIn:s,fee:r,chainId:o,config:i}=e;if(s<=0n)throw new Error("amountIn must be greater than 0");const a=(await d.getClientForChain(o).simulateContract({address:i.quoterV2,abi:S.uniV3QuoterV2Abi,functionName:"quoteExactInputSingle",args:[{tokenIn:t,tokenOut:n,amountIn:s,fee:r,sqrtPriceLimitX96:0n}]})).result;if(a[0]<=0n)throw new Error("No liquidity found for this pair. The pool returned 0 output.");return{amountOut:a[0],sqrtPriceX96After:a[1],gasEstimate:a[3]}}async function Mi(e){const t=e.feeTiers??ji,n=eo(e.tokenIn,e.tokenOut,e.hubs??[],t,"in"),s=await Promise.allSettled([...t.map(async o=>({...await fu({...e,fee:o}),fee:o})),...n.map(async o=>{const i=await wr(e.chainId,e.config,o,e.amountIn,"in");return{amountOut:i.amount,sqrtPriceX96After:0n,gasEstimate:i.gasEstimate,fee:0,path:o}})]);let r=null;for(const o of s)o.status==="fulfilled"&&(!r||o.value.amountOut>r.amountOut)&&(r=o.value);if(!r)throw new Error("No liquidity found for this pair on any fee tier.");return r}const mu=[{inputs:[{components:[{name:"tokenIn",type:"address"},{name:"tokenOut",type:"address"},{name:"amount",type:"uint256"},{name:"fee",type:"uint24"},{name:"sqrtPriceLimitX96",type:"uint160"}],name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{name:"amountIn",type:"uint256"},{name:"sqrtPriceX96After",type:"uint160"},{name:"initializedTicksCrossed",type:"uint32"},{name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];async function hu(e){const{tokenIn:t,tokenOut:n,amountOut:s,fee:r,chainId:o,config:i}=e;if(s<=0n)throw new Error("amountOut must be greater than 0");const a=(await d.getClientForChain(o).simulateContract({address:i.quoterV2,abi:mu,functionName:"quoteExactOutputSingle",args:[{tokenIn:t,tokenOut:n,amount:s,fee:r,sqrtPriceLimitX96:0n}]})).result;if(a[0]<=0n)throw new Error("No liquidity found for this pair. The pool returned 0 input.");return{amountIn:a[0],sqrtPriceX96After:a[1],gasEstimate:a[3]}}async function Pi(e){const t=e.feeTiers??ji,n=eo(e.tokenIn,e.tokenOut,e.hubs??[],t,"out"),s=await Promise.allSettled([...t.map(async o=>({...await hu({...e,fee:o}),fee:o})),...n.map(async o=>{const i=await wr(e.chainId,e.config,o,e.amountOut,"out");return{amountIn:i.amount,sqrtPriceX96After:0n,gasEstimate:i.gasEstimate,fee:0,path:o}})]);let r=null;for(const o of s)o.status==="fulfilled"&&(!r||o.value.amountIn<r.amountIn)&&(r=o.value);if(!r)throw new Error("No liquidity found for this pair on any fee tier.");return r}function gu(e){return e.type==="swap"}const xr=.02,wu=[1,8453,42161,10,137,43114,56],xu="https://api.1inch.dev/swap/v6.0";function Go(e,t){return S.applySlippage(e,t)}function yu(e){const t=e?.baseUrl??xu;return{name:"1inch",chainIds:e?.chainIds??wu,resolve:async(n,s,r)=>{const o=n.maxSlippage??xr,i=o*100,a=S.isNativeToken(n.tokenIn)?S.NATIVE_TOKEN_ADDRESS:n.tokenIn,l=S.isNativeToken(n.tokenOut)?S.NATIVE_TOKEN_ADDRESS:n.tokenOut,u=S.isNativeToken(n.tokenIn);try{const m=new URL(`${t}/${s}/swap`);m.searchParams.set("src",a),m.searchParams.set("dst",l),m.searchParams.set("amount",n.amountIn.toString()),m.searchParams.set("from",r),m.searchParams.set("slippage",i.toString()),m.searchParams.set("disableEstimate","true"),m.searchParams.set("allowPartialFill","false");const f={Accept:"application/json"};e?.apiKey&&(f.Authorization=`Bearer ${e.apiKey}`);const h=await fetch(m.toString(),{headers:f});if(!h.ok)throw new d.SpiceflowError("VENUE_API_ERROR",`[1inchVenue] API returned ${h.status} for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}`,{venue:"1inch",chainId:s,tokenIn:n.tokenIn,tokenOut:n.tokenOut,amountIn:n.amountIn.toString(),cause:`HTTP ${h.status}`});const y=await h.json();if(!y.dstAmount||!y.tx)return console.warn(`[1inchVenue] No route data for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}`),null;const g=BigInt(y.dstAmount);if(g<=0n)return console.warn(`[1inchVenue] Zero output for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}`),null;const x=Go(g,o),w=[];return y.tx.to&&!u&&w.push({to:n.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[y.tx.to,n.amountIn]})}),w.push({to:y.tx.to,value:BigInt(y.tx.value||"0"),data:y.tx.data}),{venue:"1inch",amountOut:g,amountOutMinimum:x,calls:w}}catch(m){if(m instanceof d.SpiceflowError)throw m;const f=m instanceof Error?m.message:String(m);throw new d.SpiceflowError("VENUE_API_ERROR",`[1inchVenue] Exception for ${n.tokenIn} \u2192 ${n.tokenOut} on chain ${s}: ${f}`,{venue:"1inch",chainId:s,tokenIn:n.tokenIn,tokenOut:n.tokenOut,amountIn:n.amountIn.toString(),cause:f})}}}}const Ui=[4114,5115],Ko={name:"Satsuma",swapRouter:"0x565eD3D57fe40f78A46f348C220121AE093c3cF8",quoterV2:"0x428f20dd8926Eabe19653815Ed0BE7D6c36f8425",feeTiers:[3e3]},Wi={name:"Uniswap v3",swapRouter:"0x2626664c2603336E57B271c5C0b26F421741e481",quoterV2:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",chainIds:[8453],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x4200000000000000000000000000000000000006","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},qi={name:"Uniswap v3",swapRouter:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",quoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",chainIds:[1],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},Li={name:"Uniswap v3",swapRouter:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",quoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",chainIds:[42161],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x82aF49447D8a07e3bd95BD0d56f35241523fBab1","0xaf88d065e77c8cC2239327C5EDb3A432268e5831"]},bu={name:"Uniswap v3",swapRouter:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",quoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",chainIds:[137],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270","0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"]},vu={name:"Uniswap v3",swapRouter:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",quoterV2:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",chainIds:[56],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c","0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"]},Cu={name:"Uniswap v3",swapRouter:"0xfe31f71c1b106eac32f1a19239c9a9a72ddfb900",quoterV2:"0x661e93cca42afacb172121ef892830ca3b70f08d",chainIds:[143],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A","0x754704Bc059F8C67012fEd69BC8A327a5aafb603"]},zi={name:"Uniswap v3",swapRouter:"0xcaf681a66d020601342297493863e78c959e5cb2",quoterV2:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",chainIds:[4663],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x0bd7d308f8e1639fab988df18a8011f41eacad73","0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"]},Hi={name:"SushiSwap",swapRouter:"0x1e406484F1F204b23cE84B9901C0171a738fd406",quoterV2:"0x3E290e5E01818002A0b672148BdC7514D861C7B3",chainIds:[4663],feeTiers:[100,500,3e3,1e4],hubCurrencies:["0x0bd7d308f8e1639fab988df18a8011f41eacad73","0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"],routerHasDeadline:!0},Vi=N.parseAbi(["function exactInput((bytes path, address recipient, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]),Qi=N.parseAbi(["function exactInputSingle((address tokenIn, address tokenOut, uint24 fee, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum, uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountOut)","function exactInput((bytes path, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]),ku=N.parseAbi(["function exactInput((bytes path, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]),Iu=N.parseAbi(["function exactOutput((bytes path, address recipient, uint256 deadline, uint256 amountOut, uint256 amountInMaximum) params) payable returns (uint256 amountIn)"]),Yo=1800,Gi=[1,50,100,200,2e3],yr={name:"Aerodrome",swapRouter:"0xcbBb8035cAc7D4B3Ca7aBb74cF7BdF900215Ce0D",quoterV2:"0x3d4C22254F86f64B7eC90ab8F7aeC1FBFD271c6C",chainIds:[8453],hubCurrencies:["0x4200000000000000000000000000000000000006","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]};function br(e){const t=e.name??"Aerodrome",n=e.chainIds??[8453],s=e.tickSpacings??Gi;return{name:t,chainIds:n,resolve:async(r,o,i)=>{if(S.isNativeToken(r.tokenIn)||S.isNativeToken(r.tokenOut))return null;const a=r.maxSlippage??xr,l=[...s.map(w=>N.encodePacked(["address","uint24","address"],[r.tokenIn,w,r.tokenOut])),...eo(r.tokenIn,r.tokenOut,e.hubCurrencies??[],s,"in")],u={quoterV2:e.quoterV2},m=await Promise.allSettled(l.map(async w=>({path:w,amountOut:(await wr(o,u,w,r.amountIn,"in")).amount})));let f=null;for(const w of m)w.status==="fulfilled"&&(!f||w.value.amountOut>f.amountOut)&&(f=w.value);if(!f)return console.warn(`[AerodromeVenue] No viable route for ${r.tokenIn} \u2192 ${r.tokenOut} on chain ${o}.`),null;const h=Go(f.amountOut,a),y=e.deadline??BigInt(Math.floor(Date.now()/1e3)+Yo),g=N.encodeFunctionData({abi:ku,functionName:"exactInput",args:[{path:f.path,recipient:i,deadline:y,amountIn:r.amountIn,amountOutMinimum:h}]}),x=[{to:r.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.swapRouter,r.amountIn]})},{to:e.swapRouter,value:0n,data:g}];return{venue:t,amountOut:f.amountOut,amountOutMinimum:h,calls:x}}}}function Ki(e){const t=e.name??"Aerodrome",n=e.chainIds??[8453],s=e.tickSpacings??Gi;return{name:t,chainIds:n,resolve:async(r,o,i)=>{if(S.isNativeToken(r.tokenIn)||S.isNativeToken(r.tokenOut))return null;const a=r.maxSlippage??xr,l=[...s.map(x=>N.encodePacked(["address","uint24","address"],[r.tokenOut,x,r.tokenIn])),...eo(r.tokenIn,r.tokenOut,e.hubCurrencies??[],s,"out")],u={quoterV2:e.quoterV2},m=await Promise.allSettled(l.map(async x=>({path:x,amountIn:(await wr(o,u,x,r.amountOut,"out")).amount})));let f=null;for(const x of m)x.status==="fulfilled"&&(!f||x.value.amountIn<f.amountIn)&&(f=x.value);if(!f)return console.warn(`[AerodromeExactOutputVenue] No viable route for ${r.tokenIn} \u2192 ${r.tokenOut} on chain ${o}.`),null;const h=BigInt(Math.round(a*1e4)),y=f.amountIn+f.amountIn*h/10000n,g=e.deadline??BigInt(Math.floor(Date.now()/1e3)+Yo);return{venue:t,amountIn:f.amountIn,amountInMax:y,amountOut:r.amountOut,calls:[{to:e.swapRouter,value:0n,data:N.encodeFunctionData({abi:Iu,functionName:"exactOutput",args:[{path:f.path,recipient:i,deadline:g,amountOut:r.amountOut,amountInMaximum:y}]})}]}}}}function vr(e){const t=e.name??"Uniswap v3",n=e.chainIds??Ui;return{name:t,chainIds:n,resolve:async(s,r,o,i)=>{if(S.isNativeToken(s.tokenIn)||S.isNativeToken(s.tokenOut))return null;const a=s.maxSlippage??xr;let l;try{let g;if(i){if(i.venue!==t)return null;const x=i.calls.find(v=>v.to.toLowerCase()===e.swapRouter.toLowerCase());if(!x)return null;const w=N.decodeFunctionData({abi:e.routerHasDeadline?Qi:[...Vi,...S.uniV3SwapRouterAbi],data:x.data});if(w.functionName==="exactInput"){const{path:v}=w.args[0];if(v.slice(0,42).toLowerCase()!==s.tokenIn.toLowerCase()||`0x${v.slice(-40)}`.toLowerCase()!==s.tokenOut.toLowerCase())return null;g={path:v,fee:0}}else if(w.functionName==="exactInputSingle"){const{tokenIn:v,tokenOut:C,fee:E}=w.args[0];if(v.toLowerCase()!==s.tokenIn.toLowerCase()||C.toLowerCase()!==s.tokenOut.toLowerCase())return null;g={fee:E}}else return null}l=g?.path?{...g,amountOut:(await wr(r,e,g.path,s.amountIn,"in")).amount}:await Mi({tokenIn:s.tokenIn,tokenOut:s.tokenOut,amountIn:s.amountIn,chainId:r,config:{swapRouter:e.swapRouter,quoterV2:e.quoterV2},feeTiers:g?[g.fee]:e.feeTiers,hubs:g?[]:[...e.hubCurrencies??[],...e.hubPaths??[]]})}catch{return console.warn(`[UniV3Venue] No viable route for ${s.tokenIn} \u2192 ${s.tokenOut} on chain ${r}.`),null}const u=Go(l.amountOut,a),m=e.routerHasDeadline?{deadline:BigInt(Math.floor(Date.now()/1e3)+Yo)}:{},f=e.routerHasDeadline?Qi:l.path?Vi:S.uniV3SwapRouterAbi,h=l.path?N.encodeFunctionData({abi:f,functionName:"exactInput",args:[{path:l.path,recipient:o,...m,amountIn:s.amountIn,amountOutMinimum:u}]}):N.encodeFunctionData({abi:f,functionName:"exactInputSingle",args:[{tokenIn:s.tokenIn,tokenOut:s.tokenOut,fee:l.fee,recipient:o,...m,amountIn:s.amountIn,amountOutMinimum:u,sqrtPriceLimitX96:0n}]}),y=[{to:s.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.swapRouter,s.amountIn]})},{to:e.swapRouter,value:0n,data:h}];return{venue:t,amountOut:l.amountOut,amountOutMinimum:u,calls:y}}}}function Zo(e){const t=e.name??"Uniswap v3",n=e.chainIds??Ui;return{name:t,chainIds:n,resolve:async(s,r,o)=>{if(S.isNativeToken(s.tokenIn)||S.isNativeToken(s.tokenOut))return null;const i=s.maxSlippage??xr;let a;try{a=await Pi({tokenIn:s.tokenIn,tokenOut:s.tokenOut,amountOut:s.amountOut,chainId:r,config:{swapRouter:e.swapRouter,quoterV2:e.quoterV2},feeTiers:e.feeTiers,hubs:[...e.hubCurrencies??[],...e.hubPaths??[]]})}catch{return null}const l=BigInt(Math.round(i*1e4)),u=a.amountIn+a.amountIn*l/10000n;return{venue:t,amountIn:a.amountIn,amountInMax:u,amountOut:s.amountOut,calls:[Ni({config:{swapRouter:e.swapRouter,quoterV2:e.quoterV2},routerHasDeadline:e.routerHasDeadline,route:a,tokenIn:s.tokenIn,tokenOut:s.tokenOut,recipient:o,amountOut:s.amountOut,amountInMaximum:u})]}}}}function Yi(e){const t=[];e?.customVenues&&t.push(...e.customVenues),e?.satsuma&&t.push(vr(e.satsuma)),e?.aerodrome!==!1&&t.push(br(e?.aerodrome??yr)),t.push(yu(e?.oneInch));const n=t.map(iu);function s(i){return n.find(a=>a.chainIds.includes(i))}async function r(i,a,l,u){const m=n.filter(g=>g.chainIds.includes(a));if(m.length===0)throw new d.SpiceflowError("NO_VENUE_FOR_CHAIN",`No liquidity venue configured for chain ${a}. Cannot resolve swap ${i.tokenIn} \u2192 ${i.tokenOut}.`,{chainId:a,tokenIn:i.tokenIn,tokenOut:i.tokenOut,amountIn:i.amountIn.toString()});const f=await Promise.allSettled(m.map(g=>g.resolve(i,a,l,u)));let h=null;for(const g of f)u&&g.status==="fulfilled"&&g.value&&(g.value.venue!==u.venue||g.value.calls.length!==u.calls.length||g.value.calls.some((x,w)=>x.to.toLowerCase()!==u.calls[w].to.toLowerCase()||x.data.slice(0,10)!==u.calls[w].data.slice(0,10)))||g.status==="fulfilled"&&g.value&&(!h||g.value.amountOut>h.amountOut)&&(h=g.value);if(h)return h;const y=f.find(g=>g.status==="rejected");if(y)throw y.reason;return null}async function o(i,a,l){const u=[],m=[];for(const f of i){if(!gu(f)){u.push(f);continue}const h=await r(f,a,l);if(!h)throw new d.SpiceflowError("NO_LIQUIDITY",`No venue returned a quote for ${f.tokenIn} \u2192 ${f.tokenOut} on chain ${a}.`,{chainId:a,tokenIn:f.tokenIn,tokenOut:f.tokenOut,amountIn:f.amountIn.toString()});u.push(...h.calls),m.push(h)}return{calls:u,resolvedSwaps:m}}return{resolveSwapIntents:o,resolveSwap:r,getVenueForChain:s,venues:t}}const _n="0x0000000000000000000000000000000000000000",Xo=[{fee:100,tickSpacing:1},{fee:500,tickSpacing:10},{fee:3e3,tickSpacing:60},{fee:1e4,tickSpacing:200}],Zi=_n,Xi=.02,Su=1800,Ji={name:"Uniswap v4",quoter:"0x0d5e0f971ed27fbff6c2837bf31316121532048d",universalRouter:"0x6ff5693b99212da76ad316178a184ab56d299b43",permit2:"0x000000000022d473030f116ddee9f6b43ac78ba3",chainIds:[8453],hubCurrencies:["0x4200000000000000000000000000000000000006",_n,"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},$i={name:"Uniswap v4",quoter:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",universalRouter:"0x8876789976decbfcbbbe364623c63652db8c0904",permit2:"0x000000000022d473030f116ddee9f6b43ac78ba3",routerHasHopPrice:!0,chainIds:[4663],hubCurrencies:["0x0bd7d308f8e1639fab988df18a8011f41eacad73",_n,"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"]},_i=N.parseAbi(["struct PoolKey { address currency0; address currency1; uint24 fee; int24 tickSpacing; address hooks; }","struct PathKey { address intermediateCurrency; uint24 fee; int24 tickSpacing; address hooks; bytes hookData; }","struct QuoteExactSingleParams { PoolKey poolKey; bool zeroForOne; uint128 exactAmount; bytes hookData; }","struct QuoteExactParams { address exactCurrency; PathKey[] path; uint128 exactAmount; }","function quoteExactInputSingle(QuoteExactSingleParams params) returns (uint256 amountOut, uint256 gasEstimate)","function quoteExactInput(QuoteExactParams params) returns (uint256 amountOut, uint256 gasEstimate)","function quoteExactOutputSingle(QuoteExactSingleParams params) returns (uint256 amountIn, uint256 gasEstimate)","function quoteExactOutput(QuoteExactParams params) returns (uint256 amountIn, uint256 gasEstimate)"]),Au=N.parseAbi(["function approve(address token, address spender, uint160 amount, uint48 expiration)"]),Eu=N.parseAbi(["function execute(bytes commands, bytes[] inputs, uint256 deadline) payable"]),ec="0x10",Fu="04",Tu="06",Ru="07",Bu="08",Ou="09",to="0c",no="0e",ju=[{name:"currency0",type:"address"},{name:"currency1",type:"address"},{name:"fee",type:"uint24"},{name:"tickSpacing",type:"int24"},{name:"hooks",type:"address"}],Du=[{name:"intermediateCurrency",type:"address"},{name:"fee",type:"uint24"},{name:"tickSpacing",type:"int24"},{name:"hooks",type:"address"},{name:"hookData",type:"bytes"}],cs=(e,t)=>e.toLowerCase()===t.toLowerCase();function so(e){return S.isNativeToken(e)?_n:e}function Nu(e,t){return e.toLowerCase()<t.toLowerCase()?[e,t]:[t,e]}function tc(e,t,n,s,r){const o=[],[i,a]=Nu(e,t);for(const{fee:u,tickSpacing:m}of Xo)o.push({kind:"single",poolKey:{currency0:i,currency1:a,fee:u,tickSpacing:m,hooks:Zi},zeroForOne:cs(e,i)});const l=(u,m)=>!!r&&(cs(u,_n)&&cs(m,r)||cs(u,r)&&cs(m,_n));for(const u of n)if(!(cs(u,e)||cs(u,t))&&!(l(u,e)||l(u,t)))for(const m of Xo)for(const f of Xo){const h=(y,g)=>({intermediateCurrency:y,fee:g.fee,tickSpacing:g.tickSpacing,hooks:Zi,hookData:"0x"});o.push({kind:"multi",path:s==="in"?[h(u,m),h(t,f)]:[h(e,m),h(u,f)]})}return o}async function nc(e,t,n,s,r,o){const i=d.getClientForChain(e),a=(await Promise.allSettled(n.map(async l=>{const{result:u}=l.kind==="single"?await i.simulateContract({address:t.quoter,abi:_i,functionName:o==="in"?"quoteExactInputSingle":"quoteExactOutputSingle",args:[{poolKey:l.poolKey,zeroForOne:l.zeroForOne,exactAmount:r,hookData:"0x"}]}):await i.simulateContract({address:t.quoter,abi:_i,functionName:o==="in"?"quoteExactInput":"quoteExactOutput",args:[{exactCurrency:s,path:l.path,exactAmount:r}]}),m=u[0];if(m<=0n)throw new Error("zero quote");return{candidate:l,amount:m}}))).filter(l=>l.status==="fulfilled").map(l=>l.value);return a.length===0?null:(a.sort((l,u)=>l.amount<u.amount?-1:l.amount>u.amount?1:0),o==="in"?a[a.length-1]:a[0])}function sc(e){const{candidate:t,direction:n,currencyIn:s,currencyOut:r,recipient:o,exactAmount:i,limitAmount:a,deadline:l,routerHasHopPrice:u,sweepNativeTo:m}=e;let f,h;t.kind==="single"?(f=n==="in"?`0x${Tu}${to}${no}`:`0x${Bu}${to}${no}`,h=N.encodeAbiParameters([{type:"tuple",components:[{name:"poolKey",type:"tuple",components:ju},{name:"zeroForOne",type:"bool"},{name:n==="in"?"amountIn":"amountOut",type:"uint128"},{name:n==="in"?"amountOutMinimum":"amountInMaximum",type:"uint128"},...u?[{name:"minHopPriceX36",type:"uint256"}]:[],{name:"hookData",type:"bytes"}]}],[{poolKey:t.poolKey,zeroForOne:t.zeroForOne,[n==="in"?"amountIn":"amountOut"]:i,[n==="in"?"amountOutMinimum":"amountInMaximum"]:a,...u?{minHopPriceX36:0n}:{},hookData:"0x"}])):(f=n==="in"?`0x${Ru}${to}${no}`:`0x${Ou}${to}${no}`,h=N.encodeAbiParameters([{type:"tuple",components:[{name:n==="in"?"currencyIn":"currencyOut",type:"address"},{name:"path",type:"tuple[]",components:Du},...u?[{name:"minHopPriceX36",type:"uint256[]"}]:[],{name:n==="in"?"amountIn":"amountOut",type:"uint128"},{name:n==="in"?"amountOutMinimum":"amountInMaximum",type:"uint128"}]}],[{[n==="in"?"currencyIn":"currencyOut"]:n==="in"?s:r,path:t.path,...u?{minHopPriceX36:[]}:{},[n==="in"?"amountIn":"amountOut"]:i,[n==="in"?"amountOutMinimum":"amountInMaximum"]:a}]));const y=N.encodeAbiParameters([{type:"address"},{type:"uint256"}],[s,n==="in"?i:a]),g=N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"uint256"}],[r,o,0n]),x=N.encodeAbiParameters([{type:"bytes"},{type:"bytes[]"}],[f,[h,y,g]]),w=m?`${ec}${Fu}`:ec,v=m?[x,N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"uint256"}],[_n,m,0n])]:[x];return N.encodeFunctionData({abi:Eu,functionName:"execute",args:[w,v,l]})}function rc(){return BigInt(Math.floor(Date.now()/1e3)+Su)}function oc(e,t,n,s){return{to:e.permit2,value:0n,data:N.encodeFunctionData({abi:Au,functionName:"approve",args:[t,e.universalRouter,n,Number(s)]})}}function ac(e){const t=e.name??"Uniswap v4",n=e.v3?vr({...e.v3,chainIds:e.chainIds}):null;return{name:t,chainIds:e.chainIds,resolve:async(s,r,o)=>{const i=s.maxSlippage??Xi,a=so(s.tokenIn),l=so(s.tokenOut),u=S.isNativeToken(s.tokenIn),m=e.hubCurrencies??[_n];let f=null;if(!cs(a,l)&&s.amountIn>0n){const h=await nc(r,e,tc(a,l,m,"in",zo(r)),a,s.amountIn,"in").catch(()=>null);if(h){const y=S.applySlippage(h.amount,i),g=rc(),x=[];u||(x.push({to:s.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.permit2,s.amountIn]})}),x.push(oc(e,s.tokenIn,s.amountIn,g))),x.push({to:e.universalRouter,value:u?s.amountIn:0n,data:sc({candidate:h.candidate,direction:"in",currencyIn:a,currencyOut:l,recipient:o,exactAmount:s.amountIn,limitAmount:y,deadline:g,routerHasHopPrice:e.routerHasHopPrice})}),f={venue:t,amountOut:h.amount,amountOutMinimum:y,calls:x}}}return!f&&n?n.resolve(s,r,o):f}}}function ic(e){const t=e.name??"Uniswap v4";return{name:t,chainIds:e.chainIds,resolve:async(n,s,r)=>{const o=S.isNativeToken(n.tokenIn),i=so(n.tokenIn),a=so(n.tokenOut);if(cs(i,a)||n.amountOut<=0n)return null;const l=n.maxSlippage??Xi,u=e.hubCurrencies??[_n],m=await nc(s,e,tc(i,a,u,"out",zo(s)),a,n.amountOut,"out").catch(()=>null);if(!m)return null;const f=BigInt(Math.round(l*1e4)),h=m.amount+m.amount*f/10000n,y=rc();return{venue:t,amountIn:m.amount,amountInMax:h,amountOut:n.amountOut,calls:[...o?[]:[oc(e,n.tokenIn,h,y)],{to:e.universalRouter,value:o?h:0n,data:sc({candidate:m.candidate,direction:"out",currencyIn:i,currencyOut:a,recipient:r,exactAmount:n.amountOut,limitAmount:h,deadline:y,routerHasHopPrice:e.routerHasHopPrice,sweepNativeTo:o?r:void 0})}]}}}}const ro=[{...Ko,protocol:"uniswap-v3",chainId:4114},{...Ko,protocol:"uniswap-v3",chainId:5115},{...Wi,protocol:"uniswap-v3",chainId:8453},{...qi,protocol:"uniswap-v3",chainId:1},{...Li,protocol:"uniswap-v3",chainId:42161},{...bu,protocol:"uniswap-v3",chainId:137},{...vu,protocol:"uniswap-v3",chainId:56},{...Cu,protocol:"uniswap-v3",chainId:143},{...zi,protocol:"uniswap-v3",chainId:4663},{...Hi,protocol:"uniswap-v3",chainId:4663},{...Ji,protocol:"uniswap-v4",chainId:8453},{...$i,protocol:"uniswap-v4",chainId:4663},{...yr,protocol:"aerodrome-slipstream",chainId:8453},...Wn.chainIds.map(e=>({protocol:"metric",chainId:e}))];function js(e){const t=e?.metricApiUrl?[...ro.filter(o=>o.protocol!=="metric"),...ou.map(o=>({protocol:"metric",chainId:o}))]:ro,n=e?.includeDefaults===!1?e.venues??[]:[...t,...e?.venues??[]],s=[],r=[];for(const o of n){const i=[o.chainId];switch(o.protocol){case"metric":{const a={...o,apiUrl:o.apiUrl??e?.metricApiUrl,chainIds:i};s.push(Ti(a)),r.push(Ri(a));break}case"uniswap-v3":{const a={...o,chainIds:i};s.push(vr(a)),r.push(Zo(a));break}case"uniswap-v4":{const a={...o,chainIds:i};s.push(ac(a)),r.push(ic(a));break}case"aerodrome-slipstream":{const a={...o,chainIds:i};s.push(br(a)),r.push(Ki(a));break}default:{const a=o;throw new d.SpiceflowError("INVALID_PARAMS",`Unsupported liquidity venue protocol: ${a.protocol}`,{protocol:a.protocol})}}}return{input:s,output:r}}const Jo=new Set(["WBTC","CBTC"]),cc=new Set(["btc","wbtc","wcbtc","cbtc"]);function lc(e,t){return!e||!t?!1:e===t?!0:Jo.has(e)&&Jo.has(t)}function In(e){const[t,n,s]=e.split(":");if(t!=="evm"||!n||!s)return null;const r=Number(n);if(!Number.isFinite(r))return null;const o=s.startsWith("0x")?s.toLowerCase():`0x${s.toLowerCase()}`;return{chainId:r,address:o}}function oo(e){return(e??"").trim().replace(/^test\s+/i,"").replace(/^spice/i,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function Mu(e){return new Set([e.receiptTokenName,e.displaySymbol,e.symbol,e.displayName,e.name].map(oo).filter(Boolean))}function Pu(e,t){const n=Mu(e),s=[t.symbol,t.name,t.equivalenceGroup].map(oo);if(s.some(i=>i&&n.has(i)))return!0;const r=[...n].some(i=>cc.has(i)),o=s.some(i=>cc.has(i))||Jo.has(t.equivalenceGroup??"");return r&&o}function dc(e,t,n){const s=new Set(t.map(oo).filter(Boolean)),r=o=>{if(n&&d.addressesEqual(o.address,n))return 0;const i=[o.symbol,o.name,o.equivalenceGroup].map(oo).findIndex(a=>a&&s.has(a));return i===-1?4:i+1};return[...e].sort((o,i)=>{const a=r(o)-r(i);return a!==0?a:o.address.toLowerCase().localeCompare(i.address.toLowerCase())})}function Gs(e,t){const n=e.chainTokens?Object.keys(e.chainTokens):[],s=[];for(const r of n){const o=In(r);if(!o||o.chainId!==t)continue;const i=o.address,a=S.isNativeToken(i)?d.getChainConfig(t)?.nativeCurrency:void 0,l=S.getTokenByAddress(i,t)??(a?{...a}:void 0);l&&(!$o(e,i,t)&&!(e.isUniversal&&Pu(e,l))||s.some(u=>d.addressesEqual(u,i))||s.push(i))}return dc(s.map(r=>{const o=S.getTokenByAddress(r,t);return{address:r,symbol:o?.symbol,name:o?.name,equivalenceGroup:o?.equivalenceGroup}}),[e.receiptTokenName,e.displaySymbol,e.symbol,e.displayName,e.name],e.chainId===t&&!e.isUniversal?e.address:void 0).map(r=>r.address)}function $o(e,t,n){return e.chainId===n&&d.addressesEqual(e.address,t)?!0:kr(e.address,e.chainId,t,n)}async function uc(e,t){const n=d.getClientForChain(e),s=S.getEscrowContractAddress(e);return S.isNativeToken(t)?n.getBalance({address:s}):await n.readContract({address:t,abi:N.erc20Abi,functionName:"balanceOf",args:[s]})}function _o(e,t,n){const s=S.getTokensForChain(n),r=s.find(i=>d.addressesEqual(i.address,e));if(r&&(t===n||!S.isNativeToken(e)))return r;const o=S.getTokenByAddress(e,t);if(o)return dc(s.filter(i=>lc(i.equivalenceGroup,o.equivalenceGroup)),[o.symbol,o.name,o.equivalenceGroup])[0]}function Cr(e){return e.equivalenceGroup==="USDC"&&e.symbol.toUpperCase()!=="USDT"}function Ds(e){const t=S.getEscrowContract(e);if(!t||t===S.ZERO_ADDRESS)return;const n=S.getTokensForChain(e).filter(Cr);return n.find(s=>s.symbol.toUpperCase()==="USDC")??n[0]}function ea(e,t){if(e.chainId===t)return null;const n=S.getEscrowContract(e.chainId),s=S.getEscrowContract(t);if(!n||n===S.ZERO_ADDRESS||!s||s===S.ZERO_ADDRESS)return null;const r=!e.isNative&&!S.isNativeToken(e.address)?S.getTokenByAddress(e.address,e.chainId):void 0,o=r&&Cr(r)?_o(e.address,e.chainId,t):void 0,i=o?r:Ds(e.chainId),a=o??Ds(t);if(!i||!a)return null;const l=u=>({address:u.address,symbol:u.symbol,decimals:u.decimals,chainId:u.chainId});return{source:l(i),destination:l(a)}}async function pc(e,t,n){const s=S.getTokensForChain(e.chainId).filter(Cr),r=[s.find(a=>d.addressesEqual(a.address,t.address)),e,...s].filter((a,l,u)=>!!a&&u.findIndex(m=>m&&d.addressesEqual(m.address,a.address))===l);let o;for(const a of r){let l;try{l=await uc(e.chainId,a.address)}catch{continue}if(l<=0n)continue;const u={...a,address:a.address};let m;try{m=await n(u)}catch{m=null}if(d.addressesEqual(u.address,e.address)&&(o=m),m&&m.amount<=l)return{token:u,...m}}const i=o===void 0?await n(e):o;return i?{token:e,...i}:null}function Uu(e,t){return!!ea(e,t)}function Dn(e,t){if(e.chainId===t)return e.address;const n=_o(e.address,e.chainId,t);return n?n.address:null}async function es(e,t,n,s){const r=S.getTokenByAddress(t,n);return r?r.decimals:e?.chainId===n&&d.addressesEqual(e.address,t)&&!e.isUniversal?e.decimals:s?.chainId===n&&d.addressesEqual(s.address,t)?s.decimals:d.getTokenDecimals(n,t)}async function fc(e,t,n={}){const s=Dn(e,t),r=Gs(e,t);if(r.length===0)return s;if(r.length===1)return r[0];const o=n.requiredAmount??0n,i=a=>{const l=r.map(u=>({candidate:u,balance:a.get(S.isNativeToken(u)?"native":u.toLowerCase())??0n})).filter(u=>u.balance>0n).sort((u,m)=>u.balance===m.balance?0:u.balance>m.balance?-1:1);return l.length===0?null:((o>0n?l.find(u=>u.balance>=o):l[0])??l[0]).candidate};try{const a=await Promise.all(r.map(async m=>({key:S.isNativeToken(m)?"native":m.toLowerCase(),value:await uc(t,m)}))),l=new Map(a.map(({key:m,value:f})=>[m,f])),u=i(l);if(u)return u}catch{}return s}function kr(e,t,n,s){const r=S.getTokenByAddress(e,t),o=S.getTokenByAddress(n,s);return r&&o?lc(r.equivalenceGroup,o.equivalenceGroup):S.areEquivalent(e,n)}function ao(e,t){return kr(e.address,e.chainId,t.address,t.chainId)}const mc=.01;function hc(e,t=!1){const n=Number.isFinite(e.balanceUsd)&&e.balanceUsd>0;return e.isDiscovered?n&&e.balanceUsd>=mc:!t||!n||e.balanceUsd>=mc}function Ks(e,t=!1){return!!e&&e._source==="wallet"&&(e.location==="external"||e._fundingWallet==="external"||!e.location&&!e._fundingWallet&&t)}function ye(e){return e.positionId??`${e.owner?.toLowerCase()??""}:${e.location??e._source??""}:${e.chainId}:${e.receiptTokenId??S.normalizeNativeTokenAddress(e.address).toLowerCase()}`}function gc(e,t){if(!t?.length||e.symbol!==void 0&&d.isAssetAllowed({...e,symbol:e.symbol},t))return!0;const n=s=>t.some(r=>d.addressesEqual(S.normalizeNativeTokenAddress(r),S.normalizeNativeTokenAddress(s)));return n(e.address)||Object.keys(e.chainTokens??{}).some(s=>{const r=In(s);return r?n(r.address):!1})}function Yn(e,t,n,s,r,o){const i=(x,w=!1)=>({eligible:!1,reason:x,policyExcluded:w}),a=e._source==="wallet"||e.location==="external"||e.location==="embedded",l=t==="spend-source"&&a&&!!s&&e.chainId===s.chainId&&d.addressesEqual(S.normalizeNativeTokenAddress(e.address),S.normalizeNativeTokenAddress(s.address));if(n.isWhitelistGateActive||!l&&!d.isAssetAllowed(e,n.allowedTokens))return i("Asset excluded by client policy",!0);if(t!=="withdraw-destination"&&!l&&!hc(e))return i("Asset is unpriced or below the minimum value",!0);if(t==="holding")return{eligible:!0,reason:null};if(e.balanceError)return i(e.balanceError);if(!l&&!gc(e,r))return i("Asset excluded by action policy",!0);const u=new Set(s?[s.chainId]:[]);e._source!=="spice"&&e.location!=="rollup"&&u.add(e.chainId);for(const x of u)if(!d.getRpcUrlForChain(x,n.rpcOverrides)?.trim())return i(`Configure SpiceFlowProvider rpcOverrides[${x}] before using this asset.`);if(o?.requiresEscrow){const x=S.getTokenByAddress(e.address,e.chainId);if(!x||!Cr(x))return i("This asset has no supported escrow mapping")}if(!s)return{eligible:!0,reason:null};const m=n.liquidityVenues?.includeDefaults===!1?n.liquidityVenues.venues??[]:[...ro,...n.liquidityVenues?.venues??[]],f=x=>m.some(w=>w.chainId===x),h=a&&e.chainId!==s.chainId,y=h?ea(e,s.chainId):null;if(h&&!y)return i("No supported source route");if(y&&!d.addressesEqual(S.normalizeNativeTokenAddress(e.address),S.normalizeNativeTokenAddress(y.source.address))&&!f(e.chainId))return i("No conversion venue configured on the source chain");const g=y?.destination.address??Dn(e,s.chainId);return t==="withdraw-destination"?(e.chainTokens||e.receiptTokenId?Gs(e,s.chainId):g?[g]:[]).some(x=>d.addressesEqual(S.normalizeNativeTokenAddress(x),S.normalizeNativeTokenAddress(s.address)))?{eligible:!0,reason:null}:i("No supported withdrawal mapping"):g&&d.addressesEqual(S.normalizeNativeTokenAddress(g),S.normalizeNativeTokenAddress(s.address))?{eligible:!0,reason:null}:!g&&!Uu(e,s.chainId)?i("No supported destination route"):f(s.chainId)?{eligible:!0,reason:null}:i("No conversion venue configured on the destination chain")}function io(){const e=p.useContext(d.SpiceFlowProviderContext),[t]=p.useState(d.createInventoryStore);return e?.inventory??t}function ta(e,t,n,s,r){const o=io(),i=r??o,a=p.useMemo(()=>i.entry(e),[i,e]),[,l]=p.useState(0);p.useEffect(()=>{if(n)return a.subscribe(()=>l(m=>m+1),t,s)},[a,n,t,s]);const u=p.useCallback(()=>a.refresh(),[a]);return{...n?a.snapshot():d.EMPTY_INVENTORY,refresh:u}}var wc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA6lBMVEXc3NzX/v/1hRvZ2dnd3dzb29va7fpMaXHa1tPc3N35/v/c3Nzc3NzCrp/c3Nza2tp1PRbLsJzlr33uhSj0kTHcnWnUva7jdhuNX0B6Qhrsk0LOxMCFVDJ+RyGhfGTkeiGYVSHjdx3lij7khDPEsaPfoW/jgjLQuKXmgzB2PRb2hRvldhvjdRv4hhvpeRtwORb/ihryghvabhnsehrUaRjLXxXtfRt7PxXwexricRbRYhURFBeSTBe0XBrEZxmDRxiiVRrlgCbfzMAvLCmrWBgbMEh9UjBbOBe2pJi9byekk4nkgDHkgDJLNB7jlKArAAAAKXRSTlMzJv0TNSYsADUxKBwK/QUZ/URTx650/vqJ5YpMosxj3ezwkqa6/q3KrihQ98kAAAAJcEhZcwAACxMAAAsTAQCanBgAAATxSURBVHjapVeJcuI4EJXBdiRuw4JzDAFyzeIT22BsNgTIJNnM7Pz/90xLsmV5ChJm6SqqZOR+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6ZcXktUYBOkc/3GixsBvwA8neFGGGO7hdyeGAsMXeM/wBJ8ziLv6LwYeisD4f4lHhiAXmH9FvzYV3AchOw6At9gFKW4KANDbsttGoSyCKd1Ab4uxkzezhBQaRfQygHB3oj2FhjwT9QgifErM6jiOrQgAXe2UmcuiIKSuHG+mki2XCH0kYqzgF1vETyYszLFaxLBMNdsgDGNFAazRoUcwrDMlDYz28RS0newGcCRlDa8TK4YgxuORGj9x8NYVEsxjKQSp/pNAw5YRcJI/JP5nYeqxjAxeIfCeRQQDyWOos/y5xR2V4NIgYhRJVkjgpralBPcvQH4PsBxIX0DjJqKRdgYLtsYPUyqh60CsACXEQew7ECvAICZp7DqwQEIQXaR+CkzaoeKr3FewQdqg4mIy36VgLyZWz4G96N5vs8sKj0UPSlJGy4fAbWX88SgGQYgJVjDXi7JaaxYo9Oj4UQ0lrHCGdN25ceiEfNoZSfIomjhcKN26DarT0q4gaiyfe2C9u9hWNUBvRghbG+yd1AZNFFrjmu+ucXMF2j60OObE7f0m+mrv/5qQkimpO+IU8fKXQ9bDMe/5oPl81P3BsP183EeGu3GoLBw/WHnuLF20sXQ9X/ueL57PV99w+Z7P5Vvj8j3fXr7j9X/f/5Vsrv9/K3NM7mGXOq0AAAAASUVORK5CYII=",Ir="data:image/svg+xml,%3csvg width='8' height='11' viewBox='57 6 8 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M62.7081 13.27C62.742 13.27 62.7642 13.3057 62.7491 13.3362V13.336L61.1229 16.6083C61.0892 16.6761 60.9926 16.6759 60.959 16.6083L59.3382 13.336C59.3232 13.3057 59.3453 13.27 59.3792 13.27H62.7081Z' fill='%23EA4B4B'/%3e %3cpath d='M61.0026 9.71913C61.0194 9.68524 61.0678 9.68524 61.0845 9.71913L62.747 13.0897C62.762 13.12 62.7399 13.1557 62.706 13.1557H59.3763C59.3424 13.1557 59.3203 13.12 59.3353 13.0897L61.0026 9.71913Z' fill='%23EA4B4B'/%3e %3cpath d='M60.8426 9.63827C60.8766 9.63827 60.8987 9.6741 60.8835 9.70444L59.2164 13.0594C59.1995 13.0932 59.1513 13.0932 59.1345 13.0594L57.5001 9.77047C57.47 9.70962 57.5142 9.63827 57.5821 9.63827H60.8426Z' fill='%23EA4B4B'/%3e %3cpath d='M64.5036 9.63617C64.5715 9.63618 64.6157 9.70753 64.5855 9.76838H64.5854L62.9512 13.0573C62.9344 13.0911 62.8862 13.0912 62.8692 13.0573L61.2021 9.70235C61.187 9.672 61.2091 9.63617 61.2431 9.63617H64.5036Z' fill='%23EA4B4B'/%3e %3cpath d='M62.8284 6.18281C62.862 6.11518 62.9586 6.11518 62.9922 6.18281L64.5855 9.38969C64.6157 9.45054 64.5715 9.52189 64.5036 9.52189H61.2431C61.2091 9.52189 61.187 9.48605 61.2021 9.45571L62.8283 6.18265L62.8284 6.18281Z' fill='%23EA4B4B'/%3e %3cpath d='M62.3131 6.13196C62.381 6.13196 62.4252 6.20331 62.3951 6.26416C62.154 6.74935 61.9128 7.23455 61.6718 7.71975H61.6716C61.4225 8.22125 61.1733 8.72259 60.9242 9.22409C60.9074 9.25799 60.859 9.25799 60.8422 9.22409L60.6305 8.79587C60.6275 8.78957 60.6259 8.78263 60.6259 8.77553V6.22349C60.6259 6.17297 60.6668 6.13196 60.7173 6.13196H62.3131Z' fill='%23EA4B4B'/%3e%3c/svg%3e";const Sr=S.getChainMeta(1)?.logo??"",Lu=S.TOKENS.find(e=>e.symbol==="USDC")?.logo??"",bs=Object.fromEntries([...S.getMainnetChains(),...S.getTestnetChains()].map(e=>[e.id,e.logo])),Ar={metamask:wc,metaMask:wc,rabby:Wu,phantom:qu},na=Object.fromEntries(S.TOKENS.map(e=>[e.symbol.toUpperCase(),e.logo])),zu={usdc:[8453,1,42161,5115,4114],usdt:[1],btc:[4114,42161,1,5115],wbtc:[1],weth:[8453,1],eth:[8453,1,42161,4663,84532,46630],ctusd:[5115,4114],wcbtc:[5115,4114]},Hu={btc:["wcbtc","cbtc","wbtc"]};function co(e){return e.replace(/^test\s*/i,"").replace(/^spice/i,"").trim()}function ls(e){return co(e).toLowerCase()}function xc(e){return ls(e??"").replace(/[^a-z0-9]/g,"")}function sa(e){const t=ls(e);return[t,...Hu[t]??[]].filter(Boolean)}function Vu(e){try{return BigInt(e.balanceAvailable||"0")}catch{return 0n}}function yc(e){return Array.isArray(e.chainTokens)?e.chainTokens:Object.keys(e.chainTokens??{})}function bc(e,t){const n=d.getChainConfig(e),s=t.toLowerCase();return s===S.ZERO_ADDRESS.toLowerCase()?n?.nativeCurrency.decimals??18:n?.supportedTokens?.find(r=>r.address.toLowerCase()===s)?.decimals??18}function Qu(e,t,n,s=[]){const r=bc(t,n),o=e.filter(a=>vc(a,t,n,s));if(o.length===0)return null;const i=o.reduce((a,l)=>Math.min(a,l.decimals??r),r);return{chainDecimals:r,receiptDecimals:i}}function vc(e,t,n,s){if(yc(e).some(o=>{const i=In(o);return i&&kr(i.address,i.chainId,n,t)}))return!0;const r=new Set(s.map(xc).filter(Boolean));return r.size===0?!1:r.has(xc(e.tokenName||e.receiptToken))}function Cc(e,t,n,s=[]){const r=bc(t,n);return e.reduce((o,i)=>vc(i,t,n,s)?o+S.convertAmountBetweenDecimals(Vu(i),i.decimals??r,r):o,0n)}function kc(e,t){const n=new Set([...sa(t),...sa(co(t))]);return[...e].sort((s,r)=>{const o=ls(s.symbol),i=ls(r.symbol),a=ls(s.name),l=ls(r.name),u=n.has(o)?0:n.has(a)?1:2,m=n.has(i)?0:n.has(l)?1:2;return u!==m?u-m:s.address.toLowerCase().localeCompare(r.address.toLowerCase())})[0]}function Gu(e){const t=e&&e.length>0?e:Object.keys(d.CHAIN_CONFIGS).map(Number).filter(Number.isFinite),n=new Map;for(const s of t){const r=d.getChainConfig(s);if(!r)continue;const o=`${s}:${S.ZERO_ADDRESS.toLowerCase()}`;n.has(o)||n.set(o,{address:S.ZERO_ADDRESS,chainId:s,symbol:r.nativeCurrency.symbol,name:r.nativeCurrency.name,decimals:r.nativeCurrency.decimals,isNative:!0,logoURI:na[r.nativeCurrency.symbol.toUpperCase()]??r.logo});for(const i of r.supportedTokens??[]){const a=i.address.toLowerCase(),l=`${s}:${a}`;n.has(l)||n.set(l,{address:a,chainId:s,symbol:i.symbol,name:i.name,decimals:i.decimals,isNative:S.isNativeToken(a),logoURI:i.logo})}}return n}function Ku(e,t){const n=Gu(t),s=co(e.tokenName),r=ls(e.tokenName),o=sa(e.tokenName),i=Array.isArray(e.chainTokens)?e.chainTokens.map(g=>[g,void 0]):Object.entries(e.chainTokens??{}),a=i.map(([g])=>In(g)).filter(g=>g!==null),l=new Map;for(const[g,x]of i){const w=In(g);if(!w||!Number.isSafeInteger(w.chainId)||w.chainId<0||!/^evm:[0-9]+:(?:0x)?[0-9a-fA-F]{40}$/.test(g)){if(!Array.isArray(e.chainTokens))throw new Error("Invalid chain token metadata identity");continue}if(x!==void 0&&(!x||typeof x!="object"||Array.isArray(x)||x.name!==void 0&&typeof x.name!="string"||x.decimals!==void 0&&(!Number.isInteger(x.decimals)||x.decimals<0||x.decimals>255)))throw new Error("Invalid chain token metadata");const v=`${w.chainId}:${w.address.toLowerCase()}`;if(l.has(v)){const C=l.get(v);if(C?.name!==x?.name||C?.decimals!==x?.decimals)throw new Error("Conflicting chain token metadata")}l.set(v,x)}const u=(g,x)=>{const w=l.get(`${x.chainId}:${x.address.toLowerCase()}`);return{...g,name:typeof w?.name=="string"&&w.name.length>0?w.name:g.name,decimals:typeof w?.decimals=="number"?w.decimals:g.decimals}},m=a.map(g=>{const x=n.get(`${g.chainId}:${g.address.toLowerCase()}`);return x?u(x,g):void 0}).filter(g=>g!==void 0),f=zu[r]??[];if(f.length>0)for(const g of f){const x=m.filter(w=>w.chainId===g);if(x.length>0)return kc(x,e.tokenName)}if(m.length>0)return kc(m,e.tokenName);const h=Array.from(n.values()).filter(g=>o.includes(ls(g.symbol))||o.includes(ls(g.name)));if(f.length>0)for(const g of f){const x=h.find(w=>w.chainId===g);if(x)return x}if(h.length>0)return h[0];const y=a[0];if(y){const g=l.get(`${y.chainId}:${y.address.toLowerCase()}`);return{address:y.address,chainId:y.chainId,symbol:s||e.tokenName,name:typeof g?.name=="string"&&g.name.length>0?g.name:s||e.tokenName,decimals:typeof g?.decimals=="number"?g.decimals:e.decimals??18,isNative:S.isNativeToken(y.address),logoURI:void 0}}}function Yu(e,t){let n;try{n=BigInt(e.balanceAvailable||"0")}catch{return null}if(n<=0n)return null;if(t?.length){const g=yc(e).map(In).filter(x=>x!==null);if(g.length>0&&!g.some(x=>t.includes(x.chainId)))return null}let s;try{s=Ku(e,t)}catch{return null}const r=s?.decimals??e.decimals??18,o=e.decimals??r,i=S.convertAmountBetweenDecimals(n,o,r),a=s?.address??S.ZERO_ADDRESS,l=s?.chainId??0,u=co(e.tokenName),m=s?.symbol??u,f=s?.name??u,h=parseFloat(N.formatUnits(i,r)),y=e.tokenName==="spiceUSDC"?h:typeof e.balanceUsd=="number"?e.balanceUsd:typeof e.balanceUsd=="string"&&Number(e.balanceUsd)||0;return{address:a,symbol:m,name:f,decimals:r,chainId:l,balance:i,balanceFormatted:h,balanceUsd:y,isNative:s?.isNative??S.isNativeToken(a),logoURI:s?.logoURI,displaySymbol:u||m,displayName:u||f,displayChainName:"Spicenet",receiptTokenId:e.receiptToken,receiptTokenName:e.tokenName||f,receiptTokenDecimals:o,chainTokens:e.chainTokens&&!Array.isArray(e.chainTokens)?e.chainTokens:void 0,isUniversal:!0}}const ra=6e4,Zu=3e5,Ic="https://api.g.alchemy.com/prices/v1",Ys=new Map;function lo(e,t){try{const n=t??d.getRpcUrlForChain(e);if(typeof n!="string")return null;const{hostname:s,pathname:r}=new URL(n);if(!s.endsWith(".g.alchemy.com"))return null;const o=r.split("/").filter(Boolean).pop();return o?{network:s.slice(0,-14),key:o}:null}catch{return null}}const Er=(e,t)=>`${e.network}:${e.key}:${t.toLowerCase()}`;function Ns(e,t){const n=Ys.get(Er(e,t));if(!n?.price||n.updatedAt===void 0)return;const s=Date.now()-n.updatedAt;if(!(s>=Zu))return{price:n.price,stale:s>=ra}}function Sc(e){const t=Number(e.prices?.find(n=>n.currency==="usd")?.value);return Number.isFinite(t)&&t>0?t:0}async function Ac(e,t,n){const s=[],r=new Set,o=Date.now();for(const i of new Set(t.map(a=>a.toLowerCase()))){const a=Ys.get(Er(e,i));a?.pending?r.add(a.pending):(!a||o-a.attemptedAt>=ra&&(a.updatedAt===void 0||o-a.updatedAt>=ra))&&s.push(i)}for(let i=0;i<s.length;i+=25){const a=s.slice(i,i+25),l=Promise.resolve().then(async()=>{try{const u=await n(a);for(const m of a){const f=u.get(m);if(!f)continue;const h=Ys.get(Er(e,m));h.price=f,h.updatedAt=Date.now()}}catch{}finally{for(const u of a)Ys.get(Er(e,u)).pending=void 0}});for(const u of a){const m=Er(e,u);Ys.set(m,{...Ys.get(m),attemptedAt:o,pending:l})}r.add(l)}await Promise.all(r)}async function oa(e,t){return await Ac(e,t,async n=>{const s=await fetch(`${Ic}/${e.key}/tokens/by-address`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({addresses:n.map(i=>({network:e.network,address:i}))}),signal:AbortSignal.timeout(1e4)});if(!s.ok)throw new Error("Provider price request failed");const r=await s.json(),o=new Map;for(const i of r?.data??[]){if(i.network&&i.network!==e.network)continue;const a=String(i.address).toLowerCase();n.includes(a)&&o.set(a,Sc(i))}return o}),new Map(t.map(n=>[n.toLowerCase(),Ns(e,n)?.price??0]))}async function aa(e,t){const n=`native:${t}`;return await Ac(e,[n],async()=>{const s=await fetch(`${Ic}/${e.key}/tokens/by-symbol?symbols=${encodeURIComponent(t)}`,{signal:AbortSignal.timeout(1e4)});if(!s.ok)throw new Error("Provider native price request failed");const r=(await s.json())?.data?.find(o=>o.symbol?.toUpperCase()===t.toUpperCase());return new Map([[n.toLowerCase(),r?Sc(r):0]])}),Ns(e,n)?.price??0}async function Xu(e,t){const n=t.supportedChains,s=e.map(r=>{if(r.receiptTokenName==="spiceUSDC")return[];const o=Object.keys(r.chainTokens??{}).map(In).filter(i=>!!i&&N.isAddress(i.address)&&!!n?.includes(i.chainId));return o.sort((i,a)=>{const l=u=>u===t.nativeChainId?-1:n.indexOf(u);return l(i.chainId)-l(a.chainId)||+!d.addressesEqual(i.address,r.address)-+!d.addressesEqual(a.address,r.address)}),o.flatMap(i=>{const a=t.rpcOverrides?.[i.chainId];if(!a)return[];const l=lo(i.chainId,a);if(!l)return[];const u=S.isNativeToken(i.address)?d.getChainConfig(i.chainId)?.nativeCurrency.symbol:void 0,m=u?`native:${u}`:i.address;return[{rpc:l,token:m,address:i.address,nativeSymbol:u}]})});return(typeof document>"u"||!document.hidden)&&await Promise.all(s.map(async r=>{for(const o of r)if(o.nativeSymbol?await aa(o.rpc,o.nativeSymbol).catch(()=>0):await oa(o.rpc,[o.address]).catch(()=>new Map),Ns(o.rpc,o.token)?.stale===!1)break})),e.map((r,o)=>{if(r.receiptTokenName==="spiceUSDC")return{...r,balanceUsd:r.balanceFormatted,priceStatus:"fresh"};const i=s[o].map(l=>Ns(l.rpc,l.token)),a=i.find(l=>l&&!l.stale)??i.find(Boolean);return{...r,balanceUsd:a?r.balanceFormatted*a.price:Number.isFinite(r.balanceUsd)&&r.balanceUsd>0?r.balanceUsd:0,priceStatus:a?a.stale?"stale":"fresh":"unavailable"}})}function Ju(e,t,n){const s=p.useContext(d.SpiceFlowProviderContext),[r,o]=p.useState(()=>typeof document>"u"||!document.hidden);p.useEffect(()=>{const m=()=>o(!document.hidden);return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]);const i={supportedChains:n??s?.supportedChainIds,nativeChainId:s?.nativeChainId,rpcOverrides:s?.rpcOverrides},a=JSON.stringify([e,i],(m,f)=>typeof f=="bigint"?f.toString():f),l=p.useCallback(()=>Xu(e,i),[a]),u=ta(`prices:${a}`,l,t&&r&&e.length>0,6e4);return u.updatedAt?u.assets:e}function $u(e){const t=e.chainTokens??e.chainTokenConfig;if(Array.isArray(t))return t.filter(n=>typeof n=="string");if(t&&typeof t=="object")return t}const Ec=({address:e,supportedChains:t,enabled:n=!0,refetchInterval:s,priceEnabled:r=!1})=>{const o=p.useContext(d.SpiceFlowProviderContext),i=o?.apiUrl||d.RELAYER_API_URL,a=io(),l=o?.supportedChainIds??t,u=JSON.stringify([...l??[]].sort((O,I)=>O-I)),m=e?.toLowerCase(),f=p.useCallback(async()=>{const O=`${i}/wallets/${m}/balance`;let I,b;try{const A=await d.relayerFetch(O,{cache:"no-store"});if(I=A.status,b=A.requestId,!A.ok)throw new Error(`Failed to fetch balance: ${A.status}`);const R=await A.json();if(!Array.isArray(R.balances))throw new Error("Invalid balance response");return R.balances.map(B=>{const q=Yu({receiptToken:typeof B.receiptToken=="string"?B.receiptToken:void 0,tokenName:String(B.tokenName??""),balanceAvailable:String(B.balanceAvailable??"0"),chainTokens:$u(B),decimals:typeof B.decimals=="number"?B.decimals:void 0,balanceUsd:typeof B.balanceUsd=="number"||typeof B.balanceUsd=="string"?B.balanceUsd:null},l);return q?{...q,owner:m,location:"rollup",_source:"spice",positionId:`${m}:rollup:${q.receiptTokenId??q.address}`}:null}).filter(B=>B!==null)}catch(A){const R=A instanceof Error?A.name:void 0,B=I===429?"Balance refresh is temporarily busy. Wait a moment and try again.":I===408||I===504||R==="TimeoutError"?"Balance refresh timed out. Try again.":R==="AbortError"?"Balance refresh was interrupted. Try again.":"Balances are unavailable. Check your connection and try again.",q=new d.SpiceflowError("RELAYER_STATUS_ERROR",B,{endpoint:O,httpStatus:I,requestId:b,cause:A});throw d.sanitizeError(q),q}},[m,i,u,o?.nativeChainId,o?.rpcOverrides]),{assets:h,loading:y,refreshing:g,error:x,updatedAt:w}=ta(`rollup:${m}:${i}:${u}`,f,n&&!!m,s??0,a),v=JSON.stringify(t??[]),C=p.useMemo(()=>x?h.map(O=>({...O,balanceError:x,balanceStatus:"stale"})):h,[h,x]),E=Ju(C,n&&r,l),k=p.useMemo(()=>E.filter(O=>!t?.length||t.includes(O.chainId)||Object.keys(O.chainTokens??{}).some(I=>t.some(b=>I.startsWith(`evm:${b}:`)))),[E,v]),F=p.useCallback(O=>k.filter(I=>I.chainId===O),[k]);return{assets:k,loading:y,error:x,hasBalance:k.some(O=>O.balance>0n),refreshing:g,updatedAt:w,refetch:a.invalidate,getAssetsByChain:F}};async function _u(e,t,n){if(n)return{decimals:n.decimals,symbol:n.symbol,name:n.name,logoURI:n.logo};const[s,r,o]=await Promise.all([Kn.readContract(e,{address:t,abi:N.erc20Abi,functionName:"decimals"}),Kn.readContract(e,{address:t,abi:N.erc20Abi,functionName:"symbol"}).catch(()=>"TOKEN"),Kn.readContract(e,{address:t,abi:N.erc20Abi,functionName:"name"}).catch(()=>"TOKEN")]);if(!Number.isInteger(Number(s))||Number(s)<0||Number(s)>255)throw new Error("Invalid token decimals");return{decimals:Number(s),symbol:r,name:o,logoURI:void 0}}const Fc=async(e,t,n)=>{const s=d.getClientForChain(t,n),r=d.getChainConfig(t),o=await Kn.getBalance(s,{address:e}),i=r.nativeCurrency,a=r.supportedTokens?.find(l=>S.isNativeToken(l.address));return{address:S.ZERO_ADDRESS,name:i.name,symbol:i.symbol,decimals:i.decimals,balance:o,balanceFormatted:Number(N.formatUnits(o,i.decimals)),balanceUsd:0,priceStatus:"unavailable",logoURI:a?.logo||r.logo,isNative:!0,chainId:t}},ep=async(e,t,n,s,r,o,i)=>{try{if(!N.isAddress(n))return null;const a=N.getAddress(n),l=N.isAddress(e)?N.getAddress(e):e,u=d.getClientForChain(t,i),m=await Kn.readContract(u,{address:a,abi:N.erc20Abi,functionName:"balanceOf",args:[l]}),f=Number(N.formatUnits(m,o));return m>0n?{address:a,name:s,symbol:r,decimals:o,balance:m,balanceFormatted:f,balanceUsd:0,priceStatus:"unavailable",logoURI:void 0,isNative:!1,chainId:t}:null}catch(a){throw a}},Tc=(e,t)=>{const n=d.getChainConfig(t);if(!n)return e;const s=new Set(e.map(o=>o.address.toLowerCase())),r=e.some(o=>o.isNative);for(const o of n.supportedTokens||[])S.isNativeToken(o.address)&&r||s.has(o.address.toLowerCase())||e.push({address:o.address,name:o.name,symbol:o.symbol,decimals:o.decimals,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,priceStatus:"unavailable",logoURI:o.logo,isNative:S.isNativeToken(o.address),chainId:t});if(!e.find(o=>o.isNative)){const o=n.supportedTokens?.find(i=>S.isNativeToken(i.address));e.push({address:S.ZERO_ADDRESS,name:n.nativeCurrency.name,symbol:n.nativeCurrency.symbol,decimals:n.nativeCurrency.decimals,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,priceStatus:"unavailable",logoURI:o?.logo||n.logo,isNative:!0,chainId:t})}return e},tp=async(e,t,n)=>{const s=[],r=async a=>{for(const l of a){const u=await ep(e,t,l.address,l.name,l.symbol,l.decimals,n);u&&(u.logoURI=l.logo,s.push(u))}},o=await Fc(e,t,n);o.balance>0n&&s.push(o);const i=(d.getChainConfig(t)?.supportedTokens||[]).filter(a=>!S.isNativeToken(a.address));if(i.length>0)try{const a=d.getClientForChain(t,n),l=N.getAddress(e),u=i.filter(y=>N.isAddress(y.address)).map(y=>({address:N.getAddress(y.address),abi:N.erc20Abi,functionName:"balanceOf",args:[l]})),m=await a.multicall({contracts:u}),f=i.filter(y=>N.isAddress(y.address)),h=[];m.forEach((y,g)=>{if(y.status==="success"){const x=y.result;if(x&&x>0n){const w=f[g],v=Number(N.formatUnits(x,w.decimals));x>0n&&s.push({address:N.getAddress(w.address),name:w.name,symbol:w.symbol,decimals:w.decimals,balance:x,balanceFormatted:v,balanceUsd:0,priceStatus:"unavailable",logoURI:w.logo,isNative:!1,chainId:t})}}else h.push(f[g])}),await r(h)}catch{await r(i)}return{tokens:Tc(s,t),chainId:t}},np=async(e,t,n)=>{const s=new Map,r=lo(e,n?n[e]??"":void 0);if(!r)return s;const o=t.filter(u=>S.isNativeToken(u)),i=t.filter(u=>!S.isNativeToken(u)),[a,l]=await Promise.all([i.length?oa(r,i).catch(()=>new Map):new Map,o.length?aa(r,d.getChainConfig(e)?.nativeCurrency?.symbol??"ETH").catch(()=>0):0]);for(const[u,m]of a)m>0&&s.set(u,m);if(l>0)for(const u of o)s.set(u.toLowerCase(),l);return s},sp=async(e,t,n,s=!0,r)=>{const o=d.getClientForChain(t,r),i=N.getAddress(e),a=[];let l;do{const x=await o.request({method:"alchemy_getTokenBalances",params:[i,"erc20",l?{pageKey:l}:{}]});a.push(...x.tokenBalances),l=x.pageKey||void 0}while(l);const u=a.filter(x=>N.isAddress(x.contractAddress)&&!!x.tokenBalance&&BigInt(x.tokenBalance)>0n),m=d.getChainConfig(t)?.supportedTokens||[],f=x=>m.find(w=>w.address.toLowerCase()===x.toLowerCase()),h=[],y=await Fc(e,t,r),[g]=await Promise.all([Promise.all(u.map(async x=>{const w=f(x.contractAddress);return w?{name:w.name,symbol:w.symbol,decimals:w.decimals,logo:w.logo??null}:await o.request({method:"alchemy_getTokenMetadata",params:[x.contractAddress]})})),s?oa(n,u.map(x=>x.contractAddress)):void 0,s&&y.balanceFormatted>0?aa(n,y.symbol):void 0]);if(y.balance>0n){const x=Ns(n,`native:${y.symbol}`);h.push({...y,balanceUsd:(x?.price??0)*y.balanceFormatted,priceStatus:x?x.stale?"stale":"fresh":"unavailable"})}return u.forEach((x,w)=>{const v=g[w];if(!Number.isInteger(v.decimals)||v.decimals===null||v.decimals<0||v.decimals>255)throw new Error(`Invalid token metadata on chain ${t}`);const C=BigInt(x.tokenBalance),E=Number(N.formatUnits(C,v.decimals));if(C<=0n)return;const k=Ns(n,x.contractAddress),F=(k?.price??0)*E;h.push({address:N.getAddress(x.contractAddress),name:v.name||"Unknown",symbol:v.symbol||"UNKNOWN",decimals:v.decimals,balance:C,balanceFormatted:E,balanceUsd:F,priceStatus:k?k.stale?"stale":"fresh":"unavailable",isDiscovered:!f(x.contractAddress),logoURI:v.logo||void 0,isNative:!1,chainId:t})}),{tokens:Tc(h,t),chainId:t}},Rc=new Set,rp=async(e,t,n=!0,s)=>{try{const r=lo(t,s?s[t]??"":void 0);if(r)try{return await sp(e,t,r,n&&(typeof document>"u"||!document.hidden),s)}catch(o){Rc.has(t)||(Rc.add(t),console.warn(`Token discovery unavailable on chain ${t}; listing configured tokens only.`,o))}return await tp(e,t,s)}catch(r){throw r}},Zs=async(e,t,n=[],s)=>{if(!e)throw new Error("Wallet address is required");const r=d.getChainsForAssets(s),o=t?.length?[...new Set(t)]:Object.keys(r).map(Number),i=await Promise.allSettled(o.map(l=>rp(e,l,!0,s))),a={};return i.forEach((l,u)=>{const m=o[u];a[m]=l.status==="fulfilled"?l.value:{chainId:m,tokens:[],error:`Unable to refresh balances on chain ${m}`}}),(await Promise.allSettled(n.map(async l=>{const u=a[l.chainId];if(!u||u.error||u.tokens.some(w=>S.normalizeNativeTokenAddress(w.address).toLowerCase()===S.normalizeNativeTokenAddress(l.address).toLowerCase()))return;const m=d.getClientForChain(l.chainId,s),f=await _u(m,l.address,l.decimals!==void 0&&l.symbol?{decimals:l.decimals,symbol:l.symbol,name:l.name||l.symbol,logo:l.logoURI}:void 0),h=await Kn.readContract(m,{address:l.address,abi:N.erc20Abi,functionName:"balanceOf",args:[e]});await np(l.chainId,[l.address],s);const y=Number(N.formatUnits(h,f.decimals)),g=lo(l.chainId,s?s[l.chainId]??"":void 0),x=g?Ns(g,l.address):void 0;u.tokens.push({...f,...l,name:f.name,symbol:f.symbol,decimals:f.decimals,balance:h,balanceFormatted:y,balanceUsd:(x?.price??0)*y,priceStatus:x?x.stale?"stale":"fresh":"unavailable",isNative:!1})}))).forEach((l,u)=>{if(l.status==="rejected"){const m=a[n[u].chainId];m&&(m.error=`Unable to refresh token balances on chain ${m.chainId}`)}}),a},Fr=({address:e,supportedChains:t,fetchBalances:n=Zs,additionalTokens:s=[],enabled:r=!0,refreshInterval:o=0,priceEnabled:i=!0})=>{const a=p.useContext(d.SpiceFlowProviderContext),l=io(),u=e?.toLowerCase(),m=JSON.stringify([...a?.supportedChainIds??t??[]].sort((C,E)=>C-E)),f=JSON.stringify(s);p.useEffect(()=>l.registerTokens(s),[l,f]);const h=u&&u===a?.embeddedWalletAddress?.toLowerCase()?"embedded":"external",y=`wallet:${JSON.stringify([a?.network,a?.apiUrl,a?.rpcOverrides])}:${u}:${h}:${m}:${l.fetcherId(n)}`,g=p.useCallback(async()=>{let C;try{C=await n(u,JSON.parse(m),l.tokens(),a?.rpcOverrides)}catch(O){const I=O instanceof Error?O.message:"Unable to refresh balances";C=Object.fromEntries(JSON.parse(m).map(b=>[b,{chainId:b,tokens:[],error:I}]))}const E=l.entry(y).snapshot().assets,k=JSON.parse(m).map(O=>C[O]??{chainId:O,tokens:[],error:`Unable to refresh balances on chain ${O}`}),F=k.flatMap(O=>O.error?[O.error]:[]);return{assets:k.flatMap(O=>O.error?E.filter(I=>I.chainId===O.chainId).map(I=>({...I,balanceError:O.error,balanceStatus:"stale"})):O.tokens.map(I=>({...I,owner:u,location:h,_fundingWallet:h,_source:"wallet",positionId:`${u}:${h}:${O.chainId}:${S.normalizeNativeTokenAddress(I.address).toLowerCase()}`}))),error:F.length?F.join("; "):null}},[l,u,m,n,h,y]),x=ta(y,g,r&&!!u,o,l),w=JSON.stringify(t&&[...t].sort((C,E)=>C-E)),v=p.useMemo(()=>t?x.assets.filter(C=>t.includes(C.chainId)):x.assets,[x.assets,w]);return p.useEffect(()=>{i&&r&&u&&x.refresh()},[i]),{...x,assets:v,refreshAssets:l.invalidate,getAssetsByChain:p.useCallback(C=>v.filter(E=>E.chainId===C),[v]),getNativeAssets:p.useCallback(()=>v.filter(C=>C.isNative),[v])}};function Ms(e){const t=p.useContext(d.SpiceFlowProviderContext),n=io(),s=e.owner??((t?.mode||"7702")!=="7702"?t?.externalWalletAddress:t?.embeddedWalletAddress),r=s?.toLowerCase()!==t?.embeddedWalletAddress?.toLowerCase(),o=e.sourceChains??t?.supportedChainIds??[],i=(e.enabled??!0)&&!t?.isWhitelistGateActive,a=p.useMemo(()=>{const h=[...t?.additionalSourceTokens??[],...e.additionalSourceTokens??[],...e.destination?[e.destination]:[]];for(const y of e.supportedSourceAssets??[])for(const g of o){const x=d.getChainConfig(g)?.supportedTokens?.find(w=>d.isAssetAllowed(w,[y]));x&&h.push({...x,address:x.address,chainId:g,logoURI:x.logo})}return h},[e.destination,JSON.stringify(t?.additionalSourceTokens),JSON.stringify(e.additionalSourceTokens),JSON.stringify(e.supportedSourceAssets),JSON.stringify(o)]),l=Fr({address:s,supportedChains:o,fetchBalances:Zs,additionalTokens:a,enabled:i&&e.includeWalletAssets!==!1,refreshInterval:3e4}),u=Ec({address:s,supportedChains:o,enabled:i&&e.includeRollupAssets!==!1&&!!s&&s.toLowerCase()===t?.embeddedWalletAddress?.toLowerCase(),priceEnabled:i,refetchInterval:3e4}),m=p.useMemo(()=>i?[...(e.includeWalletAssets===!1?[]:l.assets).map(h=>({...h,owner:h.owner??s,location:h.location??(r?"external":"embedded"),_source:"wallet"})),...(e.includeRollupAssets===!1||s?.toLowerCase()!==t?.embeddedWalletAddress?.toLowerCase()?[]:u.assets).map(h=>({...h,owner:h.owner??s,location:"rollup",_source:"spice"}))]:[],[i,l.assets,u.assets,e.includeWalletAssets,e.includeRollupAssets,s,r,t?.embeddedWalletAddress]),f=p.useMemo(()=>m.map(h=>({asset:h,...Yn(h,e.role??"holding",{allowedTokens:t?.allowedTokens,rpcOverrides:t?.rpcOverrides,liquidityVenues:t?.liquidityVenues,isWhitelistGateActive:!!t?.isWhitelistGateActive},e.destination,e.supportedSourceAssets,{requiresEscrow:e.requiresEscrow})})),[m,t?.allowedTokens,t?.rpcOverrides,t?.liquidityVenues,t?.isWhitelistGateActive,e.role,e.destination,e.supportedSourceAssets,e.requiresEscrow]);return{positions:f,assets:p.useMemo(()=>f.filter(h=>h.eligible&&h.asset.balance>0n).map(h=>h.asset),[f]),walletAssets:p.useMemo(()=>m.filter(h=>h._source==="wallet"),[m]),rollupAssets:p.useMemo(()=>m.filter(h=>h._source==="spice"),[m]),loading:l.loading||u.loading,refreshing:l.refreshing||u.refreshing,error:l.error||u.error,refresh:n.invalidate}}function uo(e,t=!0,n){const s=n?.pendingOnly===!0,r=d.relayerService.getBaseUrl(),o=`${r}:${e?.toLowerCase()??""}:${s}`,[i,a]=p.useState({scope:o,actions:[],error:null,loading:t&&!!e,updatedAt:null,revision:0}),[l,u]=p.useState(0),m=p.useCallback(()=>u(h=>h+1),[]);p.useEffect(()=>{if(!t||!e){a(w=>w.scope===o&&w.actions.length===0&&!w.error&&!w.loading&&!w.updatedAt&&w.revision===0?w:{scope:o,actions:[],error:null,loading:!1,updatedAt:null,revision:0});return}const h=new AbortController,y=new d.RelayerService;y.setBaseUrl(r);let g;a(w=>({scope:o,actions:w.scope===o?w.actions:[],error:w.scope===o?w.error:null,loading:!0,updatedAt:w.scope===o?w.updatedAt:null,revision:w.scope===o?w.revision:0}));const x=async()=>{try{const w=await y.getWalletActions(e,{pendingOnly:s,signal:h.signal});h.signal.aborted||a(v=>({scope:o,actions:w,error:null,loading:!1,updatedAt:new Date().toISOString(),revision:v.scope===o?v.revision+1:1}))}catch(w){if(h.signal.aborted)return;const v=w instanceof d.SpiceflowError&&w.context.httpStatus===404;a(v&&!s?C=>({scope:o,actions:[],error:null,loading:!1,updatedAt:new Date().toISOString(),revision:C.scope===o?C.revision+1:1}):C=>({scope:o,actions:C.scope===o?C.actions:[],error:"Activity is temporarily unavailable. Refresh to check again.",loading:!1,updatedAt:C.scope===o?C.updatedAt:null,revision:C.scope===o?C.revision:0}))}h.signal.aborted||(g=setTimeout(x,5e3))};return x(),window.addEventListener("online",m),()=>{h.abort(),g&&clearTimeout(g),window.removeEventListener("online",m)}},[r,e,t,o,s,l,m]);const f=i.scope===o;return{actions:t&&e&&f?i.actions:[],error:f?i.error:null,loading:t&&!!e&&(!f||i.loading),updatedAt:f?i.updatedAt:null,revision:f?i.revision:0,refresh:m}}function ia(e){const t=p.useRef(0),n=p.useRef(null),s=p.useRef(e.run);s.current=e.run;const r=p.useRef(e.onSkip);r.current=e.onSkip;const o=p.useRef(e.onCleanup);o.current=e.onCleanup,p.useEffect(()=>{if(!e.shouldRun){t.current+=1,n.current?.abort(),r.current?.();return}let i=!1,a=!1;const l=async h=>{if(h&&a)return;n.current?.abort();const y=new AbortController;n.current=y;const g=++t.current;a=!0;try{await s.current({isBackground:h,isCurrent:()=>!i&&t.current===g,signal:y.signal})}finally{a=!1}},u=window.setTimeout(()=>void l(!1),e.delayMs??250),m=()=>{document.hidden||l(!0)},f=e.backgroundIntervalMs?window.setInterval(m,e.backgroundIntervalMs):void 0;return f!==void 0&&document.addEventListener("visibilitychange",m),()=>{i=!0,n.current?.abort(),clearTimeout(u),f!==void 0&&(window.clearInterval(f),document.removeEventListener("visibilitychange",m)),o.current?.()}},[e.shouldRun,e.delayMs,e.backgroundIntervalMs,...e.deps])}function Bc(e,t){if(e.length!==t.length)return!1;const n=S.hashChainBatches(e),s=S.hashChainBatches(t);return n.every((r,o)=>r.hash===s[o]?.hash)}const qn=e=>new Promise(t=>setTimeout(t,e)),op="0xa9059cbb";function Oc(e){const t=e.findIndex(r=>S.isSpicenetChainId(r.chainId));if(t<=0)return[];const n=new Map,s=(r,o,i)=>{if(i<=0n)return;const a=`${r}:${o.toLowerCase()}`,l=n.get(a);l?l.amount+=i:n.set(a,{chainId:r,token:o,amount:i})};for(const r of e.slice(0,t)){const o=S.getEscrowContract(r.chainId);if(!(!o||o===S.ZERO_ADDRESS)){for(const i of r.calls)if(i.value&&i.value>0n&&d.addressesEqual(i.to,o)&&s(r.chainId,S.ZERO_ADDRESS,i.value),!!i.data?.startsWith(op))try{const a=N.decodeFunctionData({abi:N.erc20Abi,data:i.data});if(a.functionName!=="transfer")continue;const[l,u]=a.args;d.addressesEqual(l,o)&&s(r.chainId,i.to,u)}catch{}}}return[...n.values()]}function jc(e){const t=S.getTokenByAddress(e.token,e.chainId);return[t?.equivalenceGroup,t?.symbol,t?.name]}function Dc(e,t){return Cc(e,t.chainId,t.token,jc(t))}function ap(e,t){const n=Qu(e,t.chainId,t.token,jc(t));return!n||n.receiptDecimals>=n.chainDecimals?t.amount:S.convertAmountBetweenDecimals(S.convertAmountBetweenDecimals(t.amount,n.chainDecimals,n.receiptDecimals),n.receiptDecimals,n.chainDecimals)}async function Nc(e){const{deposits:t,baseline:n,fetchEntries:s,timeoutMs:r=12e4,intervalMs:o,signal:i,wait:a=qn}=e;if(t.length===0)return!0;const l=new Map(t.map(f=>[f,Dc(n,f)])),u=Date.now(),m=u+r;for(;!i?.aborted;){try{const g=await s();if(t.every(x=>Dc(g,x)-l.get(x)>=ap(g,x)))return!0}catch{}const f=Date.now();if(f>=m)return!1;const h=f-u,y=o??(h<5e3?250:h<15e3?1e3:3e3);await a(Math.min(y,m-f))}return!1}function ca(e,t){const n=S.hashChainBatches(e).map(s=>s.hash);return N.keccak256(N.encodeAbiParameters([{type:"string"},{type:"uint256"},{type:"uint256"},{type:"bytes32[]"}],["ecdsa",0n,t,n]))}async function la(e,t,n,s,r){if(s?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");const o={raw:ca(t,n)},i=r?await e.signMessage(o,r):await e.signMessage(o);console.debug("[SpiceFlow:execution]",{phase:"signature-returned",at:Date.now()});const a=typeof i=="string"?i:i.signature;if(!a)throw new d.SpiceflowError("SIGNATURE_FAILED","Failed to sign intent authorization. The wallet returned an empty signature.");return a}function ip(e){return e.domain==="spicenet"||S.isSpicenetChainId(e.chainId)}const Mc=0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n;async function cp(e,t,n){const s=(m,f)=>new d.SpiceflowError("SIGNATURE_FAILED","The wallet returned an invalid authorization. Review the action and try again.",{chainId:t.chainId,reason:m,...f?{cause:f}:{}});if(!e||typeof e!="object")throw s("missing-authorization");const r=e;for(const m of["address","contractAddress"])if(r[m]!==void 0&&(typeof r[m]!="string"||r[m].toLowerCase()!==t.address.toLowerCase()))throw s("authorization-target-mismatch");for(const m of["chainId","nonce"]){const f=r[m];if(f!==void 0&&(typeof f=="bigint"?f!==BigInt(t[m]):typeof f!="number"||!Number.isSafeInteger(f)||f!==t[m]))throw s(`authorization-${m}-mismatch`)}const{r:o,s:i,yParity:a}=r;if(typeof o!="string"||typeof i!="string"||!/^0x[0-9a-fA-F]{64}$/.test(o)||!/^0x[0-9a-fA-F]{64}$/.test(i)||a!==0&&a!==1||BigInt(o)===0n||BigInt(o)>=Mc||BigInt(i)===0n||BigInt(i)>Mc/2n)throw s("invalid-signature");const l={...t,r:o,s:i,yParity:a};let u;try{u=await N.recoverAddress({hash:N.keccak256(N.concatHex(["0x05",N.toRlp([N.toHex(t.chainId),t.address,t.nonce===0?"0x":N.toHex(t.nonce)])])),signature:l})}catch(m){throw s("invalid-signature",m)}if(u.toLowerCase()!==n.toLowerCase())throw s("authorization-signer-mismatch");return l}async function da(e){const{chainBatches:t,signingAddress:n,actions:s,cache:r,signal:o,onSignatureRequested:i,beforeSign:a}=e;if(o?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");if(typeof n!="string"||!N.isAddress(n,{strict:!1})||n.toLowerCase()===N.zeroAddress)throw new d.SpiceflowError("INVALID_PARAMS","A valid signing address is required.");for(const h of t)if(!Number.isSafeInteger(h.chainId)||h.chainId<=0)throw new d.SpiceflowError("INVALID_PARAMS","A valid authorization chain is required.");const l=[...new Set(t.filter(h=>!ip(h)).map(h=>h.chainId))].map(h=>{const y=d.getDelegateContractAddress(h);if(!N.isAddress(y,{strict:!1})||y.toLowerCase()===N.zeroAddress)throw new d.SpiceflowError("INVALID_PARAMS","A valid delegation target is required.");return{chainId:h,client:d.getClientForChain(h),delegateContract:y}}),[u]=await Promise.all([Promise.all(l.map(async({chainId:h,client:y,delegateContract:g})=>{const x=Number(await S.getAccountNonce(n,y));if(!Number.isSafeInteger(x)||x<0)throw new d.SpiceflowError("INVALID_PARAMS","The authorization nonce is invalid.");const w=[n.toLowerCase(),h,g.toLowerCase(),x].join(":");return{chainId:h,delegateContract:g,nonce:x,cacheKey:w,cached:r?.get(w)}})),l.length?s.prepareSigning?.():void 0]);if(await a?.(),o?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");const m=[];let f=!1;for(const{chainId:h,delegateContract:y,nonce:g,cacheKey:x,cached:w}of u){if(w===void 0&&f&&await a?.(),o?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");const v=w===void 0?await s.signAuthorization({contractAddress:y,chainId:h,nonce:g},i):w;let C;try{C=await cp(v,{address:y,chainId:h,nonce:g},n)}catch(E){throw r?.delete(x),E}if(o?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");f=!0,r?.set(x,C),m.push(C)}return m}const Pc=15;function lp(e){return e.now-e.lastProgressAt>=e.pollTimeoutMs}function Uc(e,t){return{intentId:e,steps:t.map(n=>({...n,status:"pending"})),overallStatus:"processing"}}function po(e,t,n){const s=e.steps.map(a=>({...a})),r=s[t];if(!r)return e;n.status==="success"||n.status==="completed"?(s[t]={...r,status:"success",transactionHash:n.transactionHash},t+1<s.length&&s[t+1].status==="pending"&&(s[t+1]={...s[t+1],status:"processing"})):n.status==="reverted"||n.status==="error"?s[t]={...r,status:"failed",transactionHash:n.transactionHash,error:n.error}:s[t]={...r,status:"processing"};const o=s.some(a=>a.status==="failed"),i=s.every(a=>a.status==="success");return{...e,steps:s,overallStatus:o?"failed":i?"success":"processing"}}function dp({checkStepStatus:e,retryStep:t,maxRetries:n=3,pollingInterval:s=2500,pollTimeoutMs:r=3e5}){const[o,i]=p.useState(null),a=p.useRef(null),l=p.useRef(null),u=p.useRef(!1),m=p.useRef(!1),f=p.useRef(0),h=p.useRef({}),y=p.useRef(0),g=p.useCallback(k=>{a.current=k,i(k)},[]),x=p.useCallback(()=>{l.current&&(clearInterval(l.current),l.current=null)},[]),w=p.useCallback(()=>{f.current=0,h.current={},y.current=0,u.current=!0,x(),g(null)},[x,g]),v=p.useCallback((k,F)=>{x(),u.current=!1,g(Uc(k,F))},[x,g]),C=p.useCallback((k,F)=>{const O=a.current;O&&g(po(O,k,F))},[g]),E=p.useCallback((k,F)=>{x(),u.current=!1,m.current=!1,f.current=0,h.current={},y.current=Date.now(),g(Uc(k,F));const O=async()=>{if(!(u.current||m.current||!e)){m.current=!0;try{if(lp({now:Date.now(),lastProgressAt:y.current,pollTimeoutMs:r})){const A=a.current;A&&g({...A,steps:A.steps.map(R=>R.status==="success"?R:{...R,status:"failed",error:"Taking longer than expected. It may still complete - check the explorer, then refresh."}),overallStatus:"failed"}),u.current=!0,x();return}const I=a.current;if(!I)return;const b=I.steps.findIndex(A=>A.status!=="success");if(b===-1){u.current=!0,x();return}if(!(b===0||I.steps[b-1].status==="success"))return;try{const A=I.steps[b].stepId,{data:R}=await e(k,A);if(f.current=0,R.status==="success"&&(y.current=Date.now()),R.status==="reverted"){const q=h.current[A]||0;if(t&&q<n){h.current[A]=q+1;try{await t(k,A)}catch(j){console.error(`[intentStatus] retry failed for step ${A}:`,j)}g(po(a.current,b,{status:"executing"}));return}}const B=po(a.current,b,R);g(B),B.overallStatus!=="processing"&&(u.current=!0,x())}catch(A){f.current+=1,console.error(`[intentStatus] poll error (${f.current}/${Pc}):`,A),f.current>=Pc&&(g(po(a.current,b,{status:"error"})),u.current=!0,x())}}finally{m.current=!1}}};O(),l.current=setInterval(O,s)},[e,t,n,s,r,x,g]);return p.useEffect(()=>()=>x(),[x]),{intentStatus:o,startStatusPolling:E,beginStatusTracking:v,applyStepUpdate:C,stopStatusPolling:x,clearStatus:w}}function up(e,t){return(t||"").trim()||`Transaction ${e}. The transaction was rejected on-chain. This may be due to insufficient balance, price changes, or health factor constraints. Please verify your positions and try again.`}const pp=350,fp=2500;async function Wc(e){const{actionId:t,intentIndex:n,intentId:s,stepIndex:r,maxPolls:o=48,maxExecuteAttempts:i=3,pollsBeforeRetry:a=5,maxConsecutiveStatusErrors:l=15,onStatusMessage:u,onStepUpdate:m,signal:f,chainId:h,startWithExecute:y=!0,observeOnly:g=!1,relayer:x=d.relayerService,completeOnExecution:w=!1}=e;if(f?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");let v="pending",C,E,k=e.initialExecuteAttempts??0,F=0,O,I;const b=new Promise((R,B)=>{O=R,I=()=>B(new d.SpiceflowError("ABORT","Execution transaction aborted"))}),A=()=>{k++,e.onExecuteAttempt?.(k),x.executeStep(t,n,r,{action:"execute"}).then(R=>{R.transactionHash&&(C=R.transactionHash),R.status==="success"&&O({status:R.status,transactionHash:R.transactionHash})}).catch(R=>{const B=R instanceof Error?R.message:String(R);console.warn(`[execution] executeStep ${r} attempt ${k} error (will poll):`,B)})};f?.addEventListener("abort",I,{once:!0});try{y&&!g&&k<i&&A();for(let R=0;R<o;R++){const B=R===0?pp:fp;try{const j=await Promise.race([qn(B).then(()=>{}),b]);if(f?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");const P=j??await Promise.race([x.checkStepStatus(s,r,w).then(M=>M.data),b]);if(f?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");F=0,v=P.status,E=P.error;const D=P.transactionHash;D&&(C=D),w&&/^0x[0-9a-f]{64}$/i.test(D??"")&&(P.executionStatus==="success"||P.executionStatus==="reverted")&&(v=P.executionStatus,E=void 0),m?.({status:v,transactionHash:C,error:E})}catch(j){if(j instanceof Error&&(j.name==="AbortError"||j instanceof d.SpiceflowError&&j.code==="ABORT"))throw j;if(F++,F>=l){if(!g)throw j;u?.("Status is temporarily unavailable. The backend continues this action.",C)}continue}if(!g&&v==="created"&&R>=k*a&&k<i&&A(),v==="reverted"||v==="error")throw new d.SpiceflowError("ON_CHAIN_REVERT",up(v,E),{status:v,txHash:C,actionId:t,intentId:s,stepId:r,chainId:h});if(v==="success"||v==="completed")return C;let q="Waiting for solver...";v==="executing"?q="Transaction executing...":v==="submitted"?q="Transaction submitted...":v==="created"&&(q="Waiting for relayer..."),u?.(q,C)}throw new d.SpiceflowError("POLLING_EXHAUSTED",`Transaction is still processing (status: ${v}). This doesn't mean it failed \u2014 the solver may still complete it. Check your positions in a few minutes, or try refreshing the page.`,{actionId:t,intentId:s,stepId:r,lastStatus:v,pollAttempts:o,maxPolls:o,txHash:C})}finally{f?.removeEventListener("abort",I)}}async function mp(e){const{actionId:t,intentIndex:n,intentId:s,totalSteps:r,observeOnly:o,delayBeforeSpicenetStepMs:i=5e3,isSpicenetStep:a,beforeStep:l,maxExecuteAttemptsForStep:u,maxPolls:m=48,onStatusMessage:f,onStepUpdate:h,signal:y}=e;let g;for(let x=e.startStep??0;x<r;x++){if(!o&&x>0&&a?.(x)&&i>0&&await qn(i),o||await l?.(x),y?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");const w=u?.(x)??3,v=await Wc({actionId:t,intentIndex:n,intentId:s,stepIndex:x,observeOnly:o,startWithExecute:e.startWithExecute,relayer:e.relayer,maxPolls:m,maxExecuteAttempts:w,initialExecuteAttempts:e.executeAttempts?.get(x),onExecuteAttempt:C=>e.executeAttempts?.set(x,C),maxConsecutiveStatusErrors:w===6?5:15,onStatusMessage:f,onStepUpdate:h?C=>h(x,C):void 0,signal:y,completeOnExecution:x===r-1&&a?.(x)===!1});v&&(g=v)}return g}const hp="0xa9059cbb",gp=[S.SPICE_COMBINED_FEE_RECIPIENT,S.SPICE_GAS_FEE_RECIPIENT,S.SPICE_PLATFORM_FEE_RECIPIENT];function qc(e){return gp.some(t=>d.addressesEqual(e,t))}function fo(e,t){return e.map(n=>{if(n.domain==="spicenet"||S.isSpicenetChainId(n.chainId)||n.calls.length===0)return n;const s=new Set((n.tokenTransfers??[]).filter(i=>(i.from==="escrow"||i.from==="solver")&&d.addressesEqual(i.to,t)).map(i=>i.token.toLowerCase()));if(s.size===0)return n;const r=[...s].some(S.isNativeToken);let o=0;for(const i of n.calls){if(r&&i.value>0n&&i.data==="0x"&&qc(i.to)){o+=1;continue}if(!i.data?.startsWith(hp))break;try{const a=N.decodeFunctionData({abi:N.erc20Abi,data:i.data});if(a.functionName!=="transfer")break;const[l]=a.args;if(!qc(l)||!s.has(i.to.toLowerCase()))break;o+=1}catch{break}}return o===0?n:{...n,calls:n.calls.slice(o)}})}async function ua(e,t,n){if(!t||!/^0x[0-9a-f]{64}$/i.test(t))throw new Error("The destination receipt is not available yet; reconcile the existing action before retrying.");const s=()=>new d.SpiceflowError("ABORT","Execution observation retired");if(n?.aborted)throw s();const r=await new Promise((o,i)=>{const a=()=>i(s());n?.addEventListener("abort",a,{once:!0}),Promise.resolve().then(()=>e.waitForTransactionReceipt({hash:t,timeout:12e4,pollingInterval:2e3,confirmations:1})).then(o,i).finally(()=>n?.removeEventListener("abort",a))});if(n?.aborted)throw s();if(r.transactionHash?.toLowerCase()===t.toLowerCase()&&r.status==="reverted")throw new d.SpiceflowError("ON_CHAIN_REVERT","The destination transaction reverted.",{status:"reverted",txHash:t});if(r.transactionHash?.toLowerCase()!==t.toLowerCase()||r.status!=="success")throw new Error("The destination transaction has not been confirmed successfully. Reconcile the existing action before retrying.");return t}async function mo(e){let t=e.hash,n=!1;const s=Date.now()+12e4,r=i=>i.transactionHash&&i.transactionHash.toLowerCase()!==t.toLowerCase();let o=await e.client.waitForTransactionReceipt({hash:t,timeout:12e4,pollingInterval:2e3,confirmations:1,onReplaced:i=>{const a=i.transaction,l=i.replacedTransaction;if(!(i.reason==="repriced"&&l?.hash?.toLowerCase()===t.toLowerCase()&&l?.to?.toLowerCase()===e.call.to.toLowerCase()&&(l.input??"0x").toLowerCase()===e.call.data.toLowerCase()&&BigInt(l.value??0)===e.call.value&&l?.from&&l.nonce!==void 0&&/^0x[0-9a-f]{64}$/i.test(a?.hash??"")&&a?.to?.toLowerCase()===e.call.to.toLowerCase()&&(a.input??"0x").toLowerCase()===e.call.data.toLowerCase()&&BigInt(a.value??0)===e.call.value&&a.from?.toLowerCase()===l?.from?.toLowerCase()&&a.nonce===l?.nonce)){n=!0,e.onCancelled?.();return}t=a.hash,e.onRepriced?.(t)}});if(n)throw new Error("Transaction was cancelled or replaced with a different action; retry the unfinished action");if((e.confirmations??1)>1&&!r(o)&&o.status==="success"&&(o=await e.client.waitForTransactionReceipt({hash:t,timeout:Math.max(s-Date.now(),1),pollingInterval:2e3,confirmations:e.confirmations})),r(o))throw new Error("Unexpected transaction receipt; recover the submitted transaction before retrying");return{receipt:o,hash:t}}const pa=10n,Lc=["0x718dE8f0A0DC14D5BC6c560C192F02AE6Af036c7","0x737680c45F88A8b1b389e354dde11419f89BAdd6"],wp=5;function ho(e,t,n){return n?.calls.length&&n.amountOutMinimum>0n?[{chainId:e,token:t,amount:n.amountOutMinimum}]:[]}function fa(e){return e.map(t=>({...t,calls:[...t.calls],tokenTransfers:t.tokenTransfers?[...t.tokenTransfers]:void 0}))}function go({token:e,recipient:t,amount:n}){return{to:e,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[t,n]})}}function xp({chainBatches:e,token:t,amount:n}){const s=fa(e),r=s[s.length-1];if(!r)return s;const o=S.getEscrowContractAddress(r.chainId);return r.calls=[...r.calls,go({token:t,recipient:o,amount:n})],s}function zc({chainBatches:e,user:t,token:n,grossAmount:s,gasFee:r,policy:o}){const i=fa(e),a=i[i.length-1];if(!a)throw new d.SpiceflowError("INVALID_PARAMS","Action-output escrow funding requires at least one chain batch.");const l=d.calculateBpsFee(s,BigInt(o?.platformBps??pa)),u=r+l;if(u>=s)throw new d.SpiceflowError("INVALID_PARAMS","Borrow amount is too small after gas and Spicenet fees.",{grossAmount:s.toString(),gasFee:r.toString(),spicenetFee:l.toString()});const m=s-u,f=S.getEscrowContractAddress(a.chainId),h=[];return r>0n&&h.push(go({token:n,recipient:o?.gasRecipient??S.SPICE_GAS_FEE_RECIPIENT,amount:r})),l>0n&&h.push(go({token:n,recipient:o?.platformRecipient??S.SPICE_PLATFORM_FEE_RECIPIENT,amount:l})),a.calls=[...a.calls,...h,go({token:n,recipient:f,amount:m})],a.tokenTransfers=[...a.tokenTransfers??[],...r>0n?[{from:t,to:S.SPICE_GAS_FEE_RECIPIENT,token:n,amount:r}]:[],...l>0n?[{from:t,to:S.SPICE_PLATFORM_FEE_RECIPIENT,token:n,amount:l}]:[],{from:t,to:f,token:n,amount:m}],{chainBatches:i,gasFee:r,spicenetFee:l,netEscrowAmount:m,outputCredit:{chainId:a.chainId,token:n,amount:s}}}async function Hc({chainBatches:e,user:t,token:n,grossAmount:s,chainAuthorizations:r}){let o=0n,i,a=zc({chainBatches:e,user:t,token:n,grossAmount:s,gasFee:o});for(let l=0;l<wp;l+=1){const u=S.hashChainBatches(a.chainBatches),m=await d.relayerService.estimateBatchGas({user:t,outputToken:n,chainBatches:a.chainBatches.map((h,y)=>({...h,hash:u[y].hash})),chainAuthorizations:r}),f=m.gasFee;if(f===o&&JSON.stringify(m.policy)===JSON.stringify(i))return a;i=m.policy,o=f,a=zc({chainBatches:e,user:t,token:n,grossAmount:s,gasFee:o,policy:i})}throw new d.SpiceflowError("INVALID_PARAMS","Action-output fee estimate did not converge. Please retry.")}function ts(e){return S.isSpicenetChainId(e.chainId)}const yp="0xa9059cbb";function Tr(e,t){return`${e}:${S.normalizeNativeTokenAddress(t).toLowerCase()}`}function Vc(e,t){if(t===S.ZERO_ADDRESS.toLowerCase()){const n=S.getChainMeta(e)?.nativeCurrency;return{symbol:n?.symbol??d.getChainName(e),decimals:n?.decimals??18}}return S.getTokenByAddress(t,e)??{symbol:"tokens",decimals:18}}function bp(e,t){const n=S.getTokenByAddress(t,e);return[n?.equivalenceGroup,n?.symbol,n?.name]}async function ma(e){return d.getWalletBalanceEntries(e)}async function ha(e,t,n){const s=new Map,r=new Map,o=[...n?.walletFundingRequirement?[n.walletFundingRequirement]:[],...n?.walletFundingRequirements??[]];for(const f of o){if(f.amount<0n)throw new Error("Accepted wallet funding must not be negative");const h=Tr(f.chainId,f.token);r.set(h,(r.get(h)??0n)+f.amount),s.set(h,0n)}const i=new Map,a=new Map,l=new Map,u=new Map;for(const f of n?.actionOutputCredits??[]){const h=Tr(f.chainId,f.token);u.set(h,(u.get(h)??0n)+f.amount)}for(const f of e){if(ts(f))continue;for(const g of f.tokenTransfers??[]){if(g.from!=="escrow"&&g.from!=="solver"||!d.addressesEqual(g.to,t))continue;const x=BigInt(g.amount??0);if(x<=0n)continue;const w=Tr(f.chainId,g.token);i.set(w,(i.get(w)??0n)+x),g.from==="escrow"&&a.set(w,(a.get(w)??0n)+x)}const h=S.getEscrowContract(f.chainId),y=g=>!!h&&h!==S.ZERO_ADDRESS&&d.addressesEqual(g,h);for(const g of f.calls){if(g.value&&g.value>0n){const x=Tr(f.chainId,S.ZERO_ADDRESS);s.set(x,(s.get(x)??0n)+g.value),y(g.to)&&l.set(x,(l.get(x)??0n)+g.value)}if(g.data?.startsWith(yp))try{const x=N.decodeFunctionData({abi:N.erc20Abi,data:g.data});if(x.functionName!=="transfer")continue;const[w,v]=x.args,C=g.to.toLowerCase(),E=Tr(f.chainId,C);s.set(E,(s.get(E)??0n)+v),y(w)&&l.set(E,(l.get(E)??0n)+v)}catch{}}}let m=null;for(const[f,h]of a){const y=h-(l.get(f)??0n);if(y<=0n)continue;const[g,x]=f.split(":"),w=Number(g),v=Vc(w,x);m??(m=await ma(t));const C=Cc(m,w,x,bp(w,x));if(!(C>=y))throw new d.SpiceflowError("INVALID_PARAMS",`Insufficient Spice ${v.symbol}: needs ${N.formatUnits(y,v.decimals)}, has ${N.formatUnits(C,v.decimals)}.`,{chainId:w,token:x,userAddress:t,requiredAmount:y.toString(),balance:C.toString(),balanceSource:"spice"})}for(const[f,h]of s){const[y,g]=f.split(":"),x=Number(y);let w=h-(i.get(f)??0n)-(u.get(f)??0n);const v=r.get(f)??0n;if(v>w&&(w=v),w<=0n)continue;const C=d.getClientForChain(x),E=g===S.ZERO_ADDRESS.toLowerCase()?await C.getBalance({address:t}):await C.readContract({address:g,abi:N.erc20Abi,functionName:"balanceOf",args:[t]});if(E>=w)continue;const k=Vc(x,g);throw new d.SpiceflowError("INVALID_PARAMS",`Insufficient ${k.symbol} on ${d.getChainName(x)}: needs ${N.formatUnits(w,k.decimals)}, has ${N.formatUnits(E,k.decimals)}.`,{chainId:x,token:g,userAddress:t,requiredAmount:w.toString(),balance:E.toString(),balanceSource:"wallet"})}}function vp({chainBatches:e,tokenAddress:t,tokenTransferAmount:n,useCustomTransfers:s}){if(!(e.some(ts)||!(s?e.some(r=>ts(r)?!1:(r.tokenTransfers??[]).some(o=>o.from==="escrow"&&BigInt(o.amount??0)>0n)):n>0n)))throw new d.SpiceflowError("INVALID_PARAMS","Payouts funded from Spice balance require a Spicenet funding batch before the destination chain batch. Deposits into Spice balance and gas-only actions do not need one.",{tokenAddress:t,tokenTransferAmount:n.toString(),useCustomTransfers:!!s})}function Cp(e,t,n,s){t.forEach((r,o)=>{if(!r.to||!r.from||!r.token||r.amount===void 0)throw new d.SpiceflowError("INVALID_TOKEN_TRANSFER",`tokenTransfers[${o}] on chain ${e} is missing required fields (to/from/token/amount). This usually means the embedded wallet wasn't ready when the intent was built \u2014 please retry.`,{chainId:e,transferIndex:o,transfer:{from:r.from,to:r.to,token:r.token,amount:r.amount?.toString()},signingAddress:n,useCustomTransfers:s})})}function wo({user:e,chainBatches:t,tokenAddress:n,tokenTransferAmount:s,exp:r,signature:o,chainAuthorizations:i,useCustomTransfers:a}){const l=t,u=S.hashChainBatches(l),m=l.filter(f=>!ts(f)).length;if(vp({chainBatches:l,tokenAddress:n,tokenTransferAmount:s,useCustomTransfers:a}),!a&&s>0n&&m>1)throw new d.SpiceflowError("INVALID_PARAMS","Multiple non-Spicenet batches require explicit tokenTransfers. Pass useCustomTransfers with per-batch transfers instead of relying on the default escrow payout injection.",{nonSpicenetBatchCount:m,tokenAddress:n,tokenTransferAmount:s.toString()});return{user:e,...i?{chainAuthorizations:i}:{},intents:[{mode:"7702",signatureType:"ecdsa",signature:o,nbf:0,exp:r,chainBatches:u.map((f,h)=>{const y=l[h],g=ts(y)?[]:a?y.tokenTransfers??[]:s>0n?[{from:"escrow",to:e,token:n,amount:s}]:[];return Cp(Number(f.chainId),g,e,a),{hash:f.hash,chainId:Number(f.chainId),tokenTransfers:g,calls:f.calls}})}]}}function Qc(e,t){const n=t?.depositToEscrow?.gasFundingSource==="action-output"?t.depositToEscrow:null,s=t?.depositToEscrow&&!n?xp({chainBatches:e,token:t.depositToEscrow.token,amount:t.depositToEscrow.amount}):fa(e);return{actionOutputDeposit:n,batches:s}}let ga=!1;function Xs(){const{address:e,isConnected:t,isAuthenticated:n,actions:s}=d.useWallet(),r=p.useRef(null),o=p.useRef(0),i=p.useRef(null),{intentStatus:a,startStatusPolling:l,beginStatusTracking:u,applyStepUpdate:m,clearStatus:f}=dp({checkStepStatus:(E,k)=>d.relayerService.checkStepStatus(E,k),retryStep:async(E,k)=>{const[F,O]=E.split("/"),I=parseInt(O||"0",10);await d.relayerService.executeStep(F,I,k,{action:"execute"})}}),h=p.useCallback(()=>{o.current++,i.current=null,f()},[f]),y=p.useRef(s),g=p.useRef(new Map);y.current=s;const x=p.useCallback((E,k,F,O,I)=>da({chainBatches:E,signingAddress:k,actions:y.current,cache:g.current,signal:F,onSignatureRequested:O,beforeSign:I}),[]),w=p.useCallback((E,k,F,O)=>la(y.current,E,k,F,O),[]),v=p.useCallback(async(E,k,F,O,I,b)=>{let A={},R={};const B=(j,P,D)=>{D?.actionId&&(A={actionId:D.actionId,intentId:D.intentId,intentIndex:D.intentIndex,totalSteps:D.totalSteps,autoContinue:D.autoContinue,user:b?.userOverride||e}),O?.({step:j,message:P,...R,...A,...D})};if(ga)throw new d.SpiceflowError("CONCURRENT_EXECUTION","A execution transaction is already in progress. Please wait.");ga=!0;const q=o.current;try{if(!e)throw new d.SpiceflowError("WALLET_DISCONNECTED","No wallet connected. Please log in first.");const j=b?.userOverride||e,P=d.relayerService.getBaseUrl(),D=i.current;if(D&&d.addressesEqual(D.user,j)&&D.apiUrl===P){if(D.resume)return await D.resume(E,k,F,I,O,b);throw D.error}i.current=null;const M=ve=>S.hashConditionalExecutionPlan(ve.map(We=>({...We,tokenTransfers:We.tokenTransfers??[]})),[]),L=M(E),T=ve=>new Map(Object.entries(ve??{}).filter(([We,be])=>We!=="signal"&&(typeof be!="function"||["prepareForSigning","adjustBatchesForEstimate","resolveActionOutputCredits"].includes(We))).map(([We,be])=>[We,typeof be=="function"?be:JSON.stringify(be,(Pe,ue)=>typeof ue=="bigint"?ue.toString():ue)])),H=T(b),V=await d.relayerService.supportsAutomaticContinuation({signal:I}),{actionOutputDeposit:te,batches:Z}=Qc(E,b);let K=Z,Y=[],J=b?.useCustomTransfers,we=Oc(K),me=null;const xe=async()=>{(b?.walletFundingRequirement||b?.walletFundingRequirements?.length)&&await ha([],j,{walletFundingRequirement:b?.walletFundingRequirement,walletFundingRequirements:b?.walletFundingRequirements});for(let ve=0;we.length>0&&ve<3;ve++)try{me=await ma(j);break}catch(We){if(I?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");if(ve===2)throw new d.SpiceflowError("RELAYER_ERROR","Unable to read your Spice balance. Please try again before submitting the transaction.",{cause:We});await qn(1e3)}await b?.validateBeforeSubmit?.(K)};B("building","Preparing your wallet and transaction...");const Ce=await x(K,j,I,()=>B("signing-delegation","Confirm the authorization in your wallet..."),xe);if(B("building","Checking transaction fees and balances..."),I?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");const ne=BigInt(Math.floor(Date.now()/1e3)+3600);if(te){const ve=await Hc({chainBatches:E,user:j,token:te.token,grossAmount:te.amount,chainAuthorizations:Ce});K=ve.chainBatches,Y=[ve.outputCredit],J=!0}if(!b?.skipPreSubmitFeeEstimate){let ve=!1;if(b?.feeExecutionMode==="user-transfer"&&b.adjustBatchesForEstimate&&d.relayerService.canValidateActionFees()){const We=await d.relayerService.validateActionFees(wo({user:j,chainBatches:K,tokenAddress:k,tokenTransferAmount:F,exp:Number(ne),signature:"0x00",chainAuthorizations:Ce,useCustomTransfers:J}),{signal:I});r.current=We;const be=await b.adjustBatchesForEstimate({feeEstimate:We,chainBatches:K});ve=!be||Bc(K,be),be&&(K=be)}for(let We=0;!ve&&We<10;We++){const be=b?.feeExecutionMode==="user-transfer"?fo(K,j):K,Pe=wo({user:j,chainBatches:be,tokenAddress:k,tokenTransferAmount:F,exp:Number(ne),signature:"0x00",chainAuthorizations:Ce,useCustomTransfers:J}),ue=await d.relayerService.estimateActionFees(Pe,{signal:I});r.current=ue;const Ke=await b?.adjustBatchesForEstimate?.({feeEstimate:ue,chainBatches:K}),ft=!!Ke&&Bc(K,Ke);if(!Ke||ft){ve=!0;break}K=Ke}if(!ve)throw new d.SpiceflowError("INVALID_PARAMS","Fee estimate did not converge. Please retry.")}if(b?.prepareForSigning){const ve=await b.prepareForSigning(K);if(ve.length!==K.length||ve.some((We,be)=>We.chainId!==K[be].chainId||We.domain!==K[be].domain))throw new Error("The funded route changed before signing");K=ve}b?.resolveActionOutputCredits&&(Y=await b.resolveActionOutputCredits()),(!b?.skipUserFundingPreflight||b.walletFundingRequirement||b.walletFundingRequirements?.length)&&await ha(b?.skipUserFundingPreflight?[]:K,j,{actionOutputCredits:Y,walletFundingRequirement:b?.walletFundingRequirement,walletFundingRequirements:b?.walletFundingRequirements}),we=Oc(K),we.length&&!me&&(me=await d.getWalletBalanceEntries(j)),await b?.validateBeforeSubmit?.(K),B("building","Preparing the signing request...");const _=await w(K,ne,I,()=>B("signing-intent","Confirm the transaction in your wallet..."));if(I?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");if(P!==d.relayerService.getBaseUrl())throw new d.SpiceflowError("RELAYER_ERROR","The network changed before submission. Review your balances before trying again.");const de=wo({user:j,chainBatches:K,tokenAddress:k,tokenTransferAmount:F,exp:Number(ne),signature:_,chainAuthorizations:Ce,useCustomTransfers:J});let W=K.length-1;for(;W>=0&&ts(K[W]);)W--;R={totalSteps:K.length},W>=0&&(R={...R,destinationChainId:Number(K[W].chainId),destinationStepIndex:W});const je=Date.now();if(B("submitting","Submitting to relayer..."),await b?.validateBeforeSubmit?.(K),I?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");if(P!==d.relayerService.getBaseUrl())throw new d.SpiceflowError("RELAYER_ERROR","The network changed before submission. Review your balances before trying again.");console.debug("[SpiceFlow:execution]",{phase:"submit-check-complete",at:Date.now(),durationMs:Date.now()-je});const Ae=K.length;let z;try{z=await d.relayerService.createAction({...de,...b?.externalExecution?{externalExecution:b.externalExecution}:{}},{autoContinue:V,idempotencyKey:b?.idempotencyKey,signal:I,onAccepted:ve=>{const[We,be="0"]=ve.intentIds[0].split("/"),Pe=parseInt(be,10);B("executing","Executing on chain...",{actionId:We,intentId:`${We}/${Pe}`,intentIndex:Pe,totalSteps:Ae,autoContinue:ve.autoContinue===!0})}})}catch(ve){throw q===o.current&&ve instanceof d.SpiceflowError&&ve.context.submissionStatus==="unknown"&&(i.current={user:j,apiUrl:P,error:ve}),ve}const[Q,se]=z.intentIds[0].split("/"),ce=parseInt(se||"0",10),X=`${Q}/${ce}`;B("executing","Executing on chain..."),B("executing","Executing on chain...",{actionId:Q,intentId:X,intentIndex:ce,totalSteps:K.length,autoContinue:z.autoContinue===!0});const oe=new d.RelayerService;oe.setBaseUrl(P);let Oe,Ne=0;const he=new Map,Se=async(ve,We=O,be=!1)=>{const Pe=(ue,Ke,ft)=>We?.({step:ue,message:Ke,...ft});try{if((!be||!Oe)&&(Oe=await mp({actionId:Q,intentIndex:ce,intentId:X,totalSteps:Ae,signal:ve,observeOnly:z.autoContinue===!0,startWithExecute:!be,startStep:be?Ne:0,executeAttempts:he,onStepUpdate:(ue,Ke)=>{(Ke.status==="success"||Ke.status==="completed")&&(Ne=Math.max(Ne,ue+1))},relayer:z.autoContinue||be?oe:d.relayerService,...me?{delayBeforeSpicenetStepMs:0}:{},isSpicenetStep:ue=>ts(K[ue]),beforeStep:async ue=>{if(z.autoContinue===!0||!me||!ts(K[ue]))return;const Ke=await Nc({deposits:we,baseline:me,fetchEntries:()=>ma(j),signal:ve});if(ve?.aborted)throw new d.SpiceflowError("ABORT","Execution transaction aborted");if(!Ke)throw new d.SpiceflowError("POLLING_EXHAUSTED","Your deposit is still waiting for Spice credit. Check this transaction's status before trying again.",{actionId:Q,intentId:X,stepId:ue})},maxExecuteAttemptsForStep:ue=>ts(K[ue])?6:3,maxPolls:z.autoContinue?Number.POSITIVE_INFINITY:180,onStatusMessage:(ue,Ke)=>{Pe("executing",ue,{txHash:Ke,actionId:Q,intentId:X,intentIndex:ce,totalSteps:Ae,autoContinue:z.autoContinue===!0})}})),b?.requireDestinationReceipt){const ue=[...K].reverse().find(Ke=>!ts(Ke));if(!ue)throw new Error("The action has no destination transaction to verify.");await ua(d.getClientForChain(ue.chainId),Oe,ve)}return Pe("success","Transaction successful!",{txHash:Oe,actionId:Q,intentId:X,intentIndex:ce,totalSteps:Ae,autoContinue:z.autoContinue===!0}),i.current?.resume===Te&&(i.current=null),Oe||Q}catch(ue){if(ue instanceof d.SpiceflowError&&ue.code==="ON_CHAIN_REVERT"&&ue.context.status==="reverted"&&(ue.context.stepId===0||Ae===1))throw i.current?.resume===Te&&(i.current=null),ue;const Ke=new d.SpiceflowError(ue instanceof d.SpiceflowError?ue.code:"RELAYER_STATUS_ERROR",ue instanceof d.SpiceflowError&&ue.code==="ON_CHAIN_REVERT"?ue.message:`Your action was accepted, but its completion could not be confirmed. Check the original action before trying again. ${ue instanceof Error?ue.message:""}`.trim(),{...ue instanceof d.SpiceflowError?ue.context:{},submissionStatus:"accepted",actionId:Q,intentId:X,txHash:Oe,cause:ue});throw q===o.current&&(i.current={user:j,apiUrl:P,error:Ke,resume:Te}),Ke}},Te=async(ve,We,be,Pe,ue,Ke)=>{const ft=T(Ke);if(L!==M(ve)||H.size!==ft.size||[...H].some(([tt,$e])=>ft.get(tt)!==$e)||!d.addressesEqual(k,We)||F!==be)throw i.current.error;return Se(Pe,ue,!0)};return await Se(I,O)}catch(j){throw console.error("[Execution] Error:",j),B("error",j.message||"Transaction failed",{error:j.message,...j?.context?.submissionStatus==="unknown"?{submissionStatus:"unknown",...typeof j.context.idempotencyKey=="string"&&/^0x[0-9a-f]{64}$/i.test(j.context.idempotencyKey)?{idempotencyKey:j.context.idempotencyKey}:{},...typeof j.context.user=="string"&&/^0x[0-9a-f]{40}$/i.test(j.context.user)?{user:j.context.user}:{}}:{}}),j}finally{ga=!1}},[e,n,x,w]),C=p.useCallback(async(E,k,F,O)=>{if(!e&&(!O?.userOverride||O.signAuthorizationsForEstimate))throw new d.SpiceflowError("WALLET_DISCONNECTED","No wallet connected. Please log in first.");const I=O?.userOverride||e,b=O?.validateFeeCalls===!0&&O.feeExecutionMode==="user-transfer"&&d.relayerService.canValidateActionFees(),{actionOutputDeposit:A,batches:R}=Qc(E,O);let B=R;const q=O?.feeExecutionMode==="user-transfer"&&!b?fo(B,I):B,j=O?.signAuthorizationsForEstimate?await x(q,I):void 0;let P=O?.useCustomTransfers;A&&(B=(await Hc({chainBatches:E,user:I,token:A.token,grossAmount:A.amount,chainAuthorizations:j})).chainBatches,P=!0);const D=O?.feeExecutionMode==="user-transfer"&&!b?fo(B,I):B,M=wo({user:I,chainBatches:D,tokenAddress:k,tokenTransferAmount:F,exp:Math.floor(Date.now()/1e3)+3600,signature:"0x00",chainAuthorizations:j,useCustomTransfers:P}),L=await(b?d.relayerService.validateActionFees(M,{signal:O?.signal}):d.relayerService.estimateActionFees(M,{signal:O?.signal,withdrawalSourceBudget:O?.withdrawalSourceBudget}));return r.current=L,L},[e,x]);return{execute:v,estimate:C,lastFeeEstimate:r.current,hasEmbeddedWallet:t&&n,intentStatus:a,startStatusPolling:l,beginStatusTracking:u,applyStepUpdate:m,clearStatus:h}}function Lt(e,t,n,s){if(t===n)return e;if(t<n)return e*10n**BigInt(n-t);const r=10n**BigInt(t-n);return s==="ceil"?(e+r-1n)/r:e/r}function dn(e,t){if(!Number.isInteger(t)||t<0||t>255)throw new Error("Invalid token decimals");if(!/^\d+(?:\.\d*)?$/.test(e))throw new Error("Enter a valid amount.");if((e.split(".")[1]?.replace(/0+$/,"")??"").length>t)throw new Error(`Use at most ${t} decimal places for this source.`);return N.parseUnits(e,t)}function nn(e,t,n){const s=Lt(e,t,n,"floor");if(Lt(s,n,t,"floor")!==e)throw new Error(`Use at most ${n} decimal places for this delivered token.`);return s}function kp(e){return`0x77${e.slice(4)}`}function Js({userAddress:e,destinationChainId:t,deliveryToken:n,deliveryAmount:s,withdrawalAmount:r,deliveryRecipient:o,deliveryTransfers:i,requestTimestampMs:a,expiresAt:l,metadata:u,requestNonce:m}){if(l!==void 0&&(!Number.isSafeInteger(l)||l<=0))throw new Error("Withdrawal expiry must be a positive Unix timestamp in seconds");const f=i?.length?i:[{token:n,recipient:o,amount:r??s}],h=f.reduce((v,C)=>v+C.amount,0n);if(h<=0n)return null;const y=a??Date.now(),g=BigInt(Math.floor(y/1e3)),x=e??o,w=kp(N.keccak256(N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},...m?[{type:"bytes32"}]:[]],[x,n,o,h,BigInt(t),BigInt(y),...m?[m]:[]])));return{chainId:S.SPICENET_NATIVE_CHAIN_ID,domain:"spicenet",tokenTransfers:[],calls:[{to:S.ZERO_ADDRESS,value:0n,data:N.encodeFunctionData({abi:S.spicenetAbi,functionName:"createWithdrawalRequest",args:[{chainId:`evm:${t}`,idempotenceKey:w,nbf:0n,exp:l===void 0?g+3600n:BigInt(l),metadata:u??"{}",transfers:f.map(v=>({token:N.getAddress(v.token).toLowerCase(),to:N.getAddress(v.recipient).toLowerCase(),amount:v.amount}))}]})}]}}const wa=e=>{const[t,n]=p.useState(!1),s=p.useContext(d.SpiceFlowProviderContext),{dark:r,dk:o}=d.useSpiceBrand();if(p.useEffect(()=>{n(!0)},[]),!t)return c.jsx("div",{className:e.className,children:c.jsx("button",{disabled:!0,style:{padding:"12px 24px",fontSize:"16px",backgroundColor:r?o.hoverBg:"#ccc",color:r?o.textSecondary:"white",border:r?`1px solid ${o.buttonBorder}`:"none",borderRadius:"4px",cursor:"not-allowed"},children:"Loading..."})});if(!s){const i='ProviderLogin must be used within SpiceFlowProvider. Please wrap your app with <SpiceFlowProvider provider="privy">.';return c.jsx("div",{className:e.className,children:c.jsx("button",{onClick:()=>{e.onAuthError&&e.onAuthError(i)},style:{padding:"12px 24px",fontSize:"16px",backgroundColor:r?o.errorBg:"#dc2626",color:r?o.errorText:"white",border:r?`1px solid ${o.errorBorder}`:"none",borderRadius:"4px",cursor:"pointer"},children:"Provider Not Found"})})}return c.jsx(d.PrivyLogin,{...e})},Rr=({size:e=20,strokeWidth:t=2,color:n="currentColor",style:s})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:s,children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Br=(e,t,n,s)=>({width:e,height:e,fill:"none",className:t,"aria-hidden":n??!0,style:s}),$s=({size:e=16,color:t="currentColor",strokeWidth:n=2,direction:s="down",className:r,style:o,"aria-hidden":i})=>c.jsx("svg",{...Br(e,r,i,{transform:s==="up"?"rotate(180deg)":void 0,transition:"transform 0.3s ease",...o}),viewBox:"0 0 16 16",children:c.jsx("path",{d:"M4 6L8 10L12 6",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Ip=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsxs("svg",{...Br(e,s,o,r),viewBox:"0 0 24 24",children:[c.jsx("circle",{cx:"11",cy:"11",r:"8",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"m21 21-4.3-4.3",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})]}),Sp=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsx("svg",{...Br(e,s,o,r),viewBox:"0 0 24 24",children:c.jsx("path",{d:"m6 9 6 6 6-6",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Ap=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsx("svg",{...Br(e,s,o,r),viewBox:"0 0 24 24",children:c.jsx("path",{d:"m9 18 6-6-6-6",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Gc=({size:e=14,color:t="currentColor",strokeWidth:n=2,className:s,style:r,"aria-hidden":o})=>c.jsx("svg",{...Br(e,s,o,r),viewBox:"0 0 16 16",children:c.jsx("path",{d:"M3 8L6.5 11.5L13 5",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})}),Kc=({isSuccess:e,type:t,chainName:n,explorerUrl:s,txHash:r,dark:o=!1,successBg:i="#d1fae5",successBorder:a="#6ee7b7",successText:l="#065f46",errorBg:u="#fee2e2",errorBorder:m="#fca5a5",errorText:f="#dc2626",textSecondary:h="#6b7280"})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",borderRadius:"8px",backgroundColor:e?i:u,border:e?`1px solid ${a}`:`1px solid ${m}`},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[c.jsx("div",{style:{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:e?"#10b981":"#ef4444",display:"flex",alignItems:"center",justifyContent:"center"},children:e?c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M11.6667 3.5L5.25 9.91667L2.33333 7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),c.jsxs("div",{children:[c.jsx("p",{style:{margin:0,fontSize:"14px",fontWeight:600,fontFamily:d.font.mono,letterSpacing:"0.5px",color:e?l:f},children:e?`${t.toUpperCase()} CONFIRMED`:`${t.toUpperCase()} FAILED`}),c.jsxs("p",{style:{margin:"2px 0 0 0",fontSize:"12px",color:h},children:["on ",n]})]})]}),s&&r&&c.jsxs("a",{href:`${s}/tx/${r}`,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"13px",color:h,textDecoration:"none",whiteSpace:"nowrap"},children:["View on explorer",c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[c.jsx("path",{d:"M9 6.5V9.5C9 9.76522 8.89464 10.0196 8.70711 10.2071C8.51957 10.3946 8.26522 10.5 8 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V4C1.5 3.73478 1.60536 3.48043 1.79289 3.29289C1.98043 3.10536 2.23478 3 2.5 3H5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M7.5 1.5H10.5V4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M5 7L10.5 1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]}),Yc=`
|
|
3
3
|
@keyframes slideUp {
|
|
4
4
|
from { transform: translateY(100%); }
|
|
5
5
|
to { transform: translateY(0); }
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
from { opacity: 0; transform: translateY(4px); }
|
|
13
13
|
to { opacity: 1; transform: translateY(0); }
|
|
14
14
|
}
|
|
15
|
-
`,Yc=({title:e,showChevron:t,expanded:n,onToggleDetails:s,showClose:r,onClose:o,fontFamily:i,labelColor:a,textPrimary:d,closeHoverBg:u,closePressedBg:m})=>{const[f,h]=p.useState(!1),[y,g]=p.useState(!1);return c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"16px"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:s?"pointer":"default"},onClick:s,children:[c.jsxs("span",{style:{fontSize:"13px",fontWeight:500,color:a,fontFamily:i},children:[e," "]}),t&&c.jsx($s,{color:a,direction:n?"up":"down"})]}),r&&c.jsx("button",{onClick:o,onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),style:{background:y?m:f?u:"none",border:"none",borderRadius:"4px",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:f||y?d:a,transform:y?"scale(0.9)":f?"scale(1.1)":"scale(1)",transition:l.transition.interactive},children:c.jsx(Rr,{size:16})})]})},Zc=({chainName:e,bg:t,border:n,textPrimary:s,labelColor:r,primaryColor:o})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"20px 16px",borderRadius:"8px",backgroundColor:t,border:`1px solid ${n}`,gap:"12px"},children:[c.jsx(l.Spinner,{size:24,borderWidth:3,color:o}),c.jsxs("div",{children:[c.jsx("p",{style:{margin:0,fontSize:"14px",fontWeight:600,fontFamily:l.font.mono,letterSpacing:"0.5px",color:s},children:"PROCESSING TRANSACTION"}),c.jsxs("p",{style:{margin:"2px 0 0 0",fontSize:"12px",color:r},children:["on ",e]})]})]}),Xc=({bg:e,border:t,left:n,right:s})=>c.jsxs("div",{style:{padding:"10px 12px",borderRadius:"6px",backgroundColor:e,border:`1px solid ${t}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[n,s]}),ya=({isOpen:e,onClose:t,onComplete:n,closeOnComplete:s=!1,type:r,results:o,chainId:i,chainName:a,explorerUrl:d,theme:u,styles:m,dark:f,intentStatus:h,onRetry:y,onNewTx:g,onRetryTx:x,asOverlay:w=!0,isProcessing:v=!1,showStepBreakdown:C=!0})=>{const{theme:E,primaryColor:k,dark:F,dk:j}=l.useSpiceBrand(m,f),I=u||E,[b,A]=p.useState(!1),R=a??(i?l.getChainName(i):"Network"),B=d??(i&&l.getExplorerUrl(i,"").replace(/\/tx\/.*$/,"")||void 0),q=F?j.cardBg:"#ffffff",O=F?"0 4px 20px rgba(0, 0, 0, 0.4)":"0 4px 20px rgba(0, 0, 0, 0.1)",P=F?"0 -4px 8px -2px rgba(0, 0, 0, 0.4)":"0 -4px 8px -2px rgba(0, 0, 0, 0.15)",D=j.textSecondary,M=F?j.textPrimary:"#374151",L=F?j.inputBg:"#f9fafb",T=F?j.inputBorder:"#e5e7eb",H=F?j.inputBg:"#f3f4f6",V=F?j.inputBorder:"#e5e7eb",[te,Z]=p.useState(!0),K=F?j.inputBg:"#f9fafb",Y=F?j.hoverBg:"#f3f4f6",J=F?{successBg:j.successBg,successBorder:j.successBorder,successText:j.successText,errorBg:j.errorBg,errorBorder:j.errorBorder,errorText:j.errorText}:{},ge=h?.steps.find(le=>le.status==="failed")?.error;p.useEffect(()=>{!e&&!h&&A(!1)},[e,h]);const pe=()=>{A(!0),setTimeout(()=>{window.dispatchEvent(new CustomEvent("tx-complete",{detail:{type:r,results:o}})),window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:{type:r,status:"success",results:o}})),n?.(),s&&t()},300)},we=()=>{Z(!te)};if(h){const{steps:le,overallStatus:W}=h,De=W==="processing",Ae=W==="success",z=W==="failed",Q=le.filter(oe=>oe.transactionHash)[0],se=le.length>1?le.map(oe=>oe.chainName).filter(Boolean).join(" and "):R!=="Network"?R:le[0]?.chainName||R,ie=B||(Q?l.getExplorerUrl(Q.chainId,Q.transactionHash||"").replace(/\/tx\/.*$/,""):void 0),X=c.jsxs(c.Fragment,{children:[c.jsx(Yc,{title:De?`Processing ${r.charAt(0).toUpperCase()+r.slice(1)}`:`${r.charAt(0).toUpperCase()+r.slice(1)} results`,showChevron:C,expanded:te,onToggleDetails:we,showClose:!De,onClose:t,fontFamily:m?.fontFamily||I.typography.fontFamily,labelColor:D,textPrimary:M,closeHoverBg:K,closePressedBg:Y}),c.jsx("div",{style:{marginBottom:"16px"},children:De?c.jsx(Zc,{chainName:se,bg:H,border:V,textPrimary:M,labelColor:D,primaryColor:k}):c.jsx(Gc,{isSuccess:Ae,type:r,chainName:se,explorerUrl:ie,txHash:Q?.transactionHash,dark:F,...J,textSecondary:D})}),C&&c.jsx("div",{style:{overflow:"hidden",maxHeight:te?"300px":"0px",opacity:te?1:0,transition:"max-height 0.3s ease, opacity 0.3s ease",marginBottom:te?"16px":"0"},children:c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:le.map((oe,je)=>{const Me=oe.transactionHash?l.getExplorerUrl(oe.chainId,oe.transactionHash):null;return c.jsx(Xc,{bg:L,border:T,left:c.jsx("span",{style:{fontSize:"13px",color:M},children:oe.chainName?`On ${oe.chainName}`:oe.description||`Step ${je+1}`}),right:c.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"12px",color:oe.status==="success"?"#10b981":oe.status==="failed"?"#ef4444":D,fontWeight:500},children:[Me&&c.jsx("a",{href:Me,target:"_blank",rel:"noopener noreferrer",style:{color:F?j.infoText:"#2563eb",textDecoration:"none"},onClick:me=>me.stopPropagation(),children:"View"}),oe.status==="success"?"\u2713":oe.status==="failed"?"\u2717":"\u25CB"]})},je)})})}),!De&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[z&&y&&c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:y,theme:I,styles:m,dark:F,children:"TRY AGAIN"}),g&&c.jsxs(l.Button,{variant:"outline",fullWidth:!0,onClick:g,theme:I,styles:m,dark:F,children:["NEW ",r.toUpperCase()," \u2192"]})]})]});return w?c.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,zIndex:10,animation:b?"slideDown 0.3s ease-in forwards":"slideUp 0.3s ease-out forwards",pointerEvents:"auto"},children:[c.jsx("div",{style:{backgroundColor:q,borderRadius:"12px 12px 0 0",width:"100%",padding:"18px 24px 24px",boxShadow:P},children:X}),c.jsx("style",{children:Kc})]}):c.jsx("div",{style:{backgroundColor:q,borderRadius:"12px",padding:"24px",width:"100%",boxShadow:O},children:X})}if(!e&&!v||!v&&(!o||o.length===0))return null;const ve=o?o.every(le=>le.success):!1,ne=o?.[0],_=[...o??[]].reverse().find(le=>le.txHash)?.txHash||ne?.txHash;return c.jsxs("div",{style:{position:w?"absolute":"relative",bottom:w?0:void 0,left:w?0:void 0,right:w?0:void 0,zIndex:w?10:void 0,animation:w?b?"slideDown 0.3s ease-in forwards":"slideUp 0.3s ease-out forwards":void 0,pointerEvents:"auto",width:"100%"},children:[c.jsx("div",{style:{backgroundColor:q,borderRadius:w?"12px 12px 0 0":"12px",width:"100%",padding:"18px 0 24px",boxShadow:w?P:O},children:c.jsxs("div",{style:{width:"100%",boxSizing:"border-box",padding:"0 24px"},children:[c.jsx(Yc,{title:v?`Processing ${r.charAt(0).toUpperCase()+r.slice(1)}`:`${r.charAt(0).toUpperCase()+r.slice(1)} results`,showChevron:!v&&C,expanded:te,onToggleDetails:v?void 0:we,showClose:!v,onClose:t,fontFamily:m?.fontFamily||I.typography.fontFamily,labelColor:D,textPrimary:M,closeHoverBg:K,closePressedBg:Y}),c.jsx("div",{style:{marginBottom:"16px",animation:"statusFadeIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both"},children:v?c.jsx(Zc,{chainName:R,bg:H,border:V,textPrimary:M,labelColor:D,primaryColor:k}):c.jsx(Gc,{isSuccess:ve,type:r,chainName:R,explorerUrl:B,txHash:_,dark:F,...J,textSecondary:D})},v?"processing":ve?"success":"error"),!v&&C&&o&&o.length>1&&c.jsx("div",{style:{overflow:"hidden",maxHeight:te?"200px":"0px",opacity:te?1:0,transition:"max-height 0.3s ease, opacity 0.3s ease",marginBottom:te?"16px":"0"},children:c.jsx("div",{style:{maxHeight:"180px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"8px"},children:o.map((le,W)=>c.jsx(Xc,{bg:L,border:T,left:c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx("span",{style:{fontWeight:600,fontSize:"13px",color:j.textPrimary,fontFamily:l.font.mono},children:le.asset.symbol}),le.amount&&c.jsx("span",{style:{fontSize:"12px",color:D},children:le.amount})]}),right:c.jsx("span",{style:{fontSize:"12px",color:le.success?"#10b981":"#ef4444",fontWeight:500},children:le.success?"\u2713":"\u2717"})},W))})}),!v&&!ve&&o&&c.jsx("div",{style:{padding:"12px",backgroundColor:j.errorBg,border:`1px solid ${j.errorBorder}`,borderRadius:"8px",marginBottom:"16px"},children:c.jsx("p",{style:{fontSize:"13px",color:j.errorText,margin:0,lineHeight:1.5},children:ge||o.find(le=>!le.success)?.error||`${r.charAt(0).toUpperCase()+r.slice(1)} failed. Please try again.`})}),!v&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[!ve&&x&&c.jsxs(l.Button,{variant:"outline",fullWidth:!0,onClick:x,theme:I,styles:m,dark:F,children:["TRY AGAIN ",r.toUpperCase()]}),ve&&c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:pe,theme:I,styles:m,dark:F,children:"DONE"})]})]})}),c.jsx("style",{children:Kc})]})};function Ap(e,t){switch(e){case"success":return{bg:t.successBg,border:t.successBorder,text:t.successText};case"warning":return{bg:t.warningBg,border:t.warningBorder,text:t.warningText};case"error":return{bg:t.errorBg,border:t.errorBorder,text:t.errorText};case"info":return{bg:t.infoBg,border:t.infoBorder,text:t.infoText}}}const vn=({variant:e,palette:t,children:n,icon:s,style:r,fontFamily:o,size:i="default"})=>{const a=Ap(e,t),d=i==="compact";return c.jsxs("div",{role:e==="error"?"alert":"status",style:{backgroundColor:a.bg,border:`1px solid ${a.border}`,borderRadius:d?"7px":"8px",padding:d?"8px 10px":"12px 16px",color:a.text,fontSize:d?"12px":"13px",lineHeight:d?1.4:1.5,display:"flex",alignItems:"flex-start",gap:d?"6px":"8px",fontFamily:o,...r},children:[s&&c.jsx("span",{style:{flexShrink:0,display:"flex",alignItems:"center"},children:s}),c.jsx("span",{style:{minWidth:0,overflowWrap:"anywhere"},children:n})]})};function xo({activity:e,palette:t,onRefresh:n}){return c.jsxs(c.Fragment,{children:[e.actions.length>0&&c.jsx(vn,{variant:"info",palette:t,style:{marginTop:12,marginBottom:12},children:c.jsxs("details",{children:[c.jsx("summary",{children:"Recent wallet activity"}),e.actions.map(s=>{const r=s.intents.flatMap(a=>a.steps),o=r.filter(a=>["success","completed"].includes(a.status)).length,i=r.some(a=>["error","reverted"].includes(a.status));return c.jsxs("p",{children:[s.actionId,": ",o,"/",r.length," steps completed.",i?" Remaining work stopped; completed transfers are retained.":o<r.length?" Awaiting backend confirmation.":" Completed."]},s.actionId)}),c.jsx("button",{type:"button",onClick:()=>{e.refresh(),n?.()},children:n?"Refresh activity and balances":"Refresh activity"})]})}),e.error&&c.jsx(vn,{variant:"warning",palette:t,children:e.error})]})}const Jc=l.font.mono,zn=({label:e,value:t,palette:n,valueColor:s,labelColor:r,style:o})=>c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"12px",...o},children:[c.jsx("span",{style:{fontSize:"12px",color:r??n.textSecondary,fontFamily:Jc,fontWeight:500,letterSpacing:"0.03em",flexShrink:0,whiteSpace:"nowrap"},children:e}),c.jsx("span",{style:{fontSize:"13px",color:s??n.textPrimary,fontWeight:500,fontFamily:Jc,minWidth:0,textAlign:"right",overflowWrap:"anywhere"},children:t})]});var $c="data:image/svg+xml,%3csvg width='108' height='22' viewBox='0 0 108 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1.9916 11.9854V11.2041H3.98379C4.48835 11.2041 4.87897 11.0739 5.15566 10.8135C5.43236 10.5498 5.5707 10.1868 5.5707 9.72461V9.71484C5.5707 9.24935 5.43236 8.88639 5.15566 8.62598C4.87897 8.36556 4.48835 8.23535 3.98379 8.23535H1.9916V7.4541H4.2084C4.65111 7.4541 5.04173 7.5485 5.38027 7.7373C5.71882 7.92611 5.98411 8.18978 6.17617 8.52832C6.37148 8.86686 6.46914 9.25911 6.46914 9.70508V9.71484C6.46914 10.1608 6.37148 10.5547 6.17617 10.8965C5.98411 11.2383 5.71882 11.5052 5.38027 11.6973C5.04173 11.8893 4.65111 11.9854 4.2084 11.9854H1.9916ZM1.55215 14.5V7.4541H2.43106V14.5H1.55215ZM9.51875 14.5928C9.0207 14.5928 8.58939 14.4837 8.2248 14.2656C7.86348 14.0443 7.58353 13.7301 7.38496 13.3232C7.18965 12.9163 7.09199 12.4329 7.09199 11.873V11.8633C7.09199 11.3001 7.18965 10.8151 7.38496 10.4082C7.58353 10.0013 7.86348 9.6888 8.2248 9.4707C8.58939 9.2526 9.0207 9.14355 9.51875 9.14355C10.0201 9.14355 10.4514 9.2526 10.8127 9.4707C11.174 9.6888 11.4523 10.0013 11.6477 10.4082C11.8462 10.8151 11.9455 11.3001 11.9455 11.8633V11.873C11.9455 12.4329 11.8462 12.9163 11.6477 13.3232C11.4523 13.7301 11.174 14.0443 10.8127 14.2656C10.4514 14.4837 10.0201 14.5928 9.51875 14.5928ZM9.51875 13.8408C9.85078 13.8408 10.1324 13.7627 10.3635 13.6064C10.5946 13.4502 10.7704 13.2256 10.8908 12.9326C11.0145 12.6396 11.0764 12.2865 11.0764 11.873V11.8633C11.0764 11.4466 11.0145 11.0918 10.8908 10.7988C10.7704 10.5059 10.5946 10.2829 10.3635 10.1299C10.1324 9.97363 9.85078 9.89551 9.51875 9.89551C9.18672 9.89551 8.90514 9.97363 8.67402 10.1299C8.4429 10.2829 8.26549 10.5059 8.1418 10.7988C8.02135 11.0918 7.96113 11.4466 7.96113 11.8633V11.873C7.96113 12.2865 8.02135 12.6396 8.1418 12.9326C8.26549 13.2256 8.4429 13.4502 8.67402 13.6064C8.90514 13.7627 9.18672 13.8408 9.51875 13.8408ZM13.7842 14.5L12.3096 9.23633H13.1592L14.1943 13.4453H14.2725L15.4492 9.23633H16.2549L17.4316 13.4453H17.5098L18.5449 9.23633H19.3896L17.915 14.5H17.0605L15.8838 10.4277H15.8057L14.6338 14.5H13.7842ZM22.1658 14.5928C21.6645 14.5928 21.2332 14.4821 20.8719 14.2607C20.5138 14.0394 20.2371 13.7269 20.0418 13.3232C19.8497 12.9163 19.7537 12.4378 19.7537 11.8877V11.8828C19.7537 11.3392 19.8497 10.8623 20.0418 10.4521C20.2371 10.042 20.5122 9.72135 20.867 9.49023C21.2218 9.25911 21.6368 9.14355 22.1121 9.14355C22.5906 9.14355 23.0008 9.25423 23.3426 9.47559C23.6876 9.69694 23.9513 10.0062 24.1336 10.4033C24.3191 10.7972 24.4119 11.2562 24.4119 11.7803V12.1123H20.1932V11.4336H23.9773L23.5574 12.0537V11.7168C23.5574 11.3034 23.4956 10.9632 23.3719 10.6963C23.2482 10.4294 23.0773 10.2308 22.8592 10.1006C22.6411 9.96712 22.3904 9.90039 22.1072 9.90039C21.824 9.90039 21.5701 9.97038 21.3455 10.1104C21.1242 10.2471 20.9484 10.4505 20.8182 10.7207C20.688 10.9909 20.6229 11.3229 20.6229 11.7168V12.0537C20.6229 12.4281 20.6863 12.7487 20.8133 13.0156C20.9402 13.2793 21.1209 13.4827 21.3553 13.626C21.5896 13.766 21.8663 13.8359 22.1854 13.8359C22.423 13.8359 22.6297 13.8034 22.8055 13.7383C22.9813 13.6732 23.1261 13.5902 23.24 13.4893C23.354 13.3883 23.4337 13.2858 23.4793 13.1816L23.4988 13.1377H24.3484L24.3387 13.1768C24.2931 13.3558 24.2117 13.5299 24.0945 13.6992C23.9806 13.8652 23.8325 14.0166 23.6502 14.1533C23.4679 14.2868 23.2514 14.3942 23.0008 14.4756C22.7534 14.5537 22.4751 14.5928 22.1658 14.5928ZM25.4303 14.5V9.23633H26.2799V10.0176H26.358C26.4589 9.74089 26.6298 9.52604 26.8707 9.37305C27.1116 9.22005 27.4094 9.14355 27.7643 9.14355C27.8456 9.14355 27.9254 9.14844 28.0035 9.1582C28.0849 9.16471 28.1467 9.17122 28.1891 9.17773V10.0029C28.1012 9.98665 28.0149 9.97526 27.9303 9.96875C27.8489 9.95898 27.761 9.9541 27.6666 9.9541C27.3964 9.9541 27.1572 10.0078 26.9488 10.1152C26.7405 10.2227 26.5761 10.3724 26.4557 10.5645C26.3385 10.7565 26.2799 10.9811 26.2799 11.2383V14.5H25.4303ZM30.9408 14.5928C30.4395 14.5928 30.0082 14.4821 29.6469 14.2607C29.2888 14.0394 29.0121 13.7269 28.8168 13.3232C28.6247 12.9163 28.5287 12.4378 28.5287 11.8877V11.8828C28.5287 11.3392 28.6247 10.8623 28.8168 10.4521C29.0121 10.042 29.2872 9.72135 29.642 9.49023C29.9968 9.25911 30.4118 9.14355 30.8871 9.14355C31.3656 9.14355 31.7758 9.25423 32.1176 9.47559C32.4626 9.69694 32.7263 10.0062 32.9086 10.4033C33.0941 10.7972 33.1869 11.2562 33.1869 11.7803V12.1123H28.9682V11.4336H32.7523L32.3324 12.0537V11.7168C32.3324 11.3034 32.2706 10.9632 32.1469 10.6963C32.0232 10.4294 31.8523 10.2308 31.6342 10.1006C31.4161 9.96712 31.1654 9.90039 30.8822 9.90039C30.599 9.90039 30.3451 9.97038 30.1205 10.1104C29.8992 10.2471 29.7234 10.4505 29.5932 10.7207C29.463 10.9909 29.3979 11.3229 29.3979 11.7168V12.0537C29.3979 12.4281 29.4613 12.7487 29.5883 13.0156C29.7152 13.2793 29.8959 13.4827 30.1303 13.626C30.3646 13.766 30.6413 13.8359 30.9604 13.8359C31.198 13.8359 31.4047 13.8034 31.5805 13.7383C31.7563 13.6732 31.9011 13.5902 32.015 13.4893C32.129 13.3883 32.2087 13.2858 32.2543 13.1816L32.2738 13.1377H33.1234L33.1137 13.1768C33.0681 13.3558 32.9867 13.5299 32.8695 13.6992C32.7556 13.8652 32.6075 14.0166 32.4252 14.1533C32.2429 14.2868 32.0264 14.3942 31.7758 14.4756C31.5284 14.5537 31.2501 14.5928 30.9408 14.5928ZM36.1486 14.5928C35.7059 14.5928 35.3186 14.4805 34.9865 14.2559C34.6545 14.0312 34.3973 13.7155 34.215 13.3086C34.0328 12.8984 33.9416 12.4199 33.9416 11.873V11.8633C33.9416 11.3132 34.0328 10.8346 34.215 10.4277C34.3973 10.0208 34.6529 9.70508 34.9816 9.48047C35.3137 9.25586 35.7027 9.14355 36.1486 9.14355C36.3895 9.14355 36.6158 9.18262 36.8273 9.26074C37.0422 9.33561 37.2326 9.44141 37.3986 9.57812C37.5647 9.71484 37.6949 9.8776 37.7893 10.0664H37.8674V7.14648H38.717V14.5H37.8674V13.6602H37.7893C37.6818 13.8555 37.5467 14.0231 37.384 14.1631C37.2212 14.2998 37.0357 14.4056 36.8273 14.4805C36.619 14.5553 36.3928 14.5928 36.1486 14.5928ZM36.3439 13.8408C36.663 13.8408 36.938 13.7611 37.1691 13.6016C37.4003 13.4421 37.5777 13.2158 37.7014 12.9229C37.8251 12.6266 37.8869 12.2767 37.8869 11.873V11.8633C37.8869 11.4564 37.8251 11.1064 37.7014 10.8135C37.5777 10.5205 37.4003 10.2943 37.1691 10.1348C36.938 9.97526 36.663 9.89551 36.3439 9.89551C36.0249 9.89551 35.7499 9.97526 35.5188 10.1348C35.2909 10.291 35.1151 10.5156 34.9914 10.8086C34.871 11.1016 34.8107 11.4531 34.8107 11.8633V11.873C34.8107 12.2799 34.871 12.6315 34.9914 12.9277C35.1151 13.2207 35.2909 13.4469 35.5188 13.6064C35.7499 13.7627 36.0249 13.8408 36.3439 13.8408ZM45.1775 14.5928C44.9334 14.5928 44.7072 14.5553 44.4988 14.4805C44.2905 14.4056 44.1049 14.2998 43.9422 14.1631C43.7794 14.0231 43.6443 13.8555 43.5369 13.6602H43.4588V14.5H42.6092V7.14648H43.4588V10.0664H43.5369C43.6346 9.8776 43.7648 9.71484 43.9275 9.57812C44.0936 9.44141 44.2824 9.33561 44.4939 9.26074C44.7088 9.18262 44.9367 9.14355 45.1775 9.14355C45.6235 9.14355 46.0109 9.25586 46.3396 9.48047C46.6717 9.70508 46.9288 10.0208 47.1111 10.4277C47.2934 10.8346 47.3846 11.3132 47.3846 11.8633V11.873C47.3846 12.4199 47.2934 12.8984 47.1111 13.3086C46.9288 13.7155 46.6717 14.0312 46.3396 14.2559C46.0109 14.4805 45.6235 14.5928 45.1775 14.5928ZM44.9822 13.8408C45.3045 13.8408 45.5796 13.7627 45.8074 13.6064C46.0353 13.4469 46.2094 13.2207 46.3299 12.9277C46.4536 12.6315 46.5154 12.2799 46.5154 11.873V11.8633C46.5154 11.4531 46.4536 11.1016 46.3299 10.8086C46.2094 10.5156 46.0353 10.291 45.8074 10.1348C45.5796 9.97526 45.3045 9.89551 44.9822 9.89551C44.6632 9.89551 44.3881 9.97526 44.157 10.1348C43.9259 10.2943 43.7485 10.5205 43.6248 10.8135C43.5011 11.1064 43.4393 11.4564 43.4393 11.8633V11.873C43.4393 12.2767 43.5011 12.6266 43.6248 12.9229C43.7485 13.2158 43.9259 13.4421 44.157 13.6016C44.3881 13.7611 44.6632 13.8408 44.9822 13.8408ZM48.6568 16.3457C48.6015 16.3457 48.5396 16.3424 48.4713 16.3359C48.4029 16.3327 48.3395 16.3262 48.2809 16.3164V15.6182C48.3329 15.6279 48.3899 15.6344 48.4518 15.6377C48.5136 15.641 48.5738 15.6426 48.6324 15.6426C48.8733 15.6426 49.0702 15.5807 49.2232 15.457C49.3795 15.3333 49.5048 15.1201 49.5992 14.8174L49.6969 14.5049L47.7486 9.23633H48.6568L50.2779 14.0996L49.941 13.5674H50.3414L50.0045 14.0996L51.6207 9.23633H52.5143L50.4586 14.8223C50.3154 15.2161 50.164 15.5238 50.0045 15.7451C49.845 15.9665 49.6578 16.1211 49.443 16.209C49.2314 16.3001 48.9693 16.3457 48.6568 16.3457Z' fill='%230E0D0B'/%3e%3cpath d='M62.7081 13.27C62.742 13.27 62.7642 13.3057 62.7491 13.3362V13.336L61.1229 16.6083C61.0892 16.6761 60.9926 16.6759 60.959 16.6083L59.3382 13.336C59.3232 13.3057 59.3453 13.27 59.3792 13.27H62.7081Z' fill='%23EA4B4B'/%3e%3cpath d='M61.0026 9.71913C61.0194 9.68524 61.0678 9.68524 61.0845 9.71913L62.747 13.0897C62.762 13.12 62.7399 13.1557 62.706 13.1557H59.3763C59.3424 13.1557 59.3203 13.12 59.3353 13.0897L61.0026 9.71913Z' fill='%23EA4B4B'/%3e%3cpath d='M60.8426 9.63827C60.8766 9.63827 60.8987 9.6741 60.8835 9.70444L59.2164 13.0594C59.1995 13.0932 59.1513 13.0932 59.1345 13.0594L57.5001 9.77047C57.47 9.70962 57.5142 9.63827 57.5821 9.63827H60.8426Z' fill='%23EA4B4B'/%3e%3cpath d='M64.5036 9.63617C64.5715 9.63618 64.6157 9.70753 64.5855 9.76838H64.5854L62.9512 13.0573C62.9344 13.0911 62.8862 13.0912 62.8692 13.0573L61.2021 9.70235C61.187 9.672 61.2091 9.63617 61.2431 9.63617H64.5036Z' fill='%23EA4B4B'/%3e%3cpath d='M62.8284 6.18281C62.862 6.11518 62.9586 6.11518 62.9922 6.18281L64.5855 9.38969C64.6157 9.45054 64.5715 9.52189 64.5036 9.52189H61.2431C61.2091 9.52189 61.187 9.48605 61.2021 9.45571L62.8283 6.18265L62.8284 6.18281Z' fill='%23EA4B4B'/%3e%3cpath d='M62.3131 6.13196C62.381 6.13196 62.4252 6.20331 62.3951 6.26416C62.154 6.74935 61.9128 7.23455 61.6718 7.71975H61.6716C61.4225 8.22125 61.1733 8.72259 60.9242 9.22409C60.9074 9.25799 60.859 9.25799 60.8422 9.22409L60.6305 8.79587C60.6275 8.78957 60.6259 8.78263 60.6259 8.77553V6.22349C60.6259 6.17297 60.6668 6.13196 60.7173 6.13196H62.3131Z' fill='%23EA4B4B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M74.8537 10.0096C75.2721 10.0096 75.654 10.1125 75.9993 10.3184C76.3513 10.5177 76.6303 10.8032 76.8361 11.1751C77.0487 11.547 77.1549 11.9953 77.1549 12.52V12.6495C77.1549 13.1675 77.052 13.6158 76.8461 13.9943C76.6402 14.3729 76.3613 14.6618 76.0093 14.861C75.664 15.0603 75.2788 15.1599 74.8537 15.1599C74.515 15.1599 74.2261 15.1134 73.9871 15.0204C73.7546 14.9341 73.5653 14.8212 73.4192 14.6817C73.2731 14.5423 73.1602 14.3995 73.0805 14.2534H72.941V16.9659L72.1541 16.0013V10.1491H72.9211V10.956H73.0352C73.2729 10.6733 73.3893 10.4911 73.6683 10.2985C73.9538 10.1059 74.349 10.0096 74.8537 10.0096ZM74.6445 10.7069C74.1464 10.7069 73.7347 10.8696 73.4092 11.195C73.0905 11.5138 72.9311 11.9621 72.9311 12.5399V12.6296C72.9311 13.2074 73.0905 13.659 73.4092 13.9844C73.7347 14.3032 74.1464 14.4626 74.6445 14.4626C75.1492 14.4626 75.5577 14.3032 75.8698 13.9844C76.1886 13.659 76.348 13.2074 76.348 12.6296V12.5399C76.348 11.9621 76.1886 11.5138 75.8698 11.195C75.5577 10.8696 75.1492 10.7069 74.6445 10.7069Z' fill='%230E0D0B'/%3e%3cpath d='M78.5848 11.9583L78.5555 15.4596L77.7681 14.4846V10.9583L78.5848 11.9583Z' fill='%230E0D0B'/%3e%3cpath d='M101.588 10.2986H102.444L103 10.986H101.588V10.9867H100.802L101.588 11.9623V14.1937C101.588 14.3929 101.685 14.4926 101.877 14.4926H102.379L102.928 15.17H101.668C101.389 15.17 101.173 15.0936 101.021 14.9409C100.874 14.7881 100.801 14.5789 100.801 14.3133V10.986H99.8799L99.3217 10.2986H100.801V9.13501H101.588V10.2986Z' fill='%230E0D0B'/%3e%3cpath d='M69.0133 7.90764C69.4848 7.90764 69.9065 7.99068 70.2784 8.15671C70.6569 8.3161 70.9525 8.55517 71.165 8.87395C71.3842 9.18609 71.4938 9.58126 71.4938 10.0594V10.4778H70.667V10.0594C70.667 9.72072 70.5939 9.44842 70.4477 9.24254C70.3083 9.03666 70.1124 8.88392 69.86 8.7843C69.6143 8.68469 69.332 8.63487 69.0133 8.63487C68.555 8.63487 68.1864 8.7378 67.9075 8.94367C67.6286 9.14291 67.4891 9.4285 67.4891 9.80041C67.4891 10.0461 67.5488 10.2453 67.6684 10.3981C67.7879 10.5508 67.9573 10.677 68.1764 10.7767C68.3956 10.8696 68.658 10.9527 68.9635 11.0257L69.4815 11.1552C69.8866 11.2416 70.2485 11.3611 70.5673 11.5138C70.8927 11.6599 71.1517 11.8625 71.3443 12.1215C71.5369 12.3739 71.6332 12.706 71.6332 13.1177C71.6332 13.5295 71.5303 13.8881 71.3244 14.1936C71.1185 14.4991 70.8263 14.7382 70.4477 14.9109C70.0758 15.0769 69.6375 15.1599 69.1328 15.1599C68.6281 15.1599 68.1765 15.0702 67.778 14.8909C67.3795 14.7116 67.0641 14.4426 66.8316 14.084C66.6058 13.7187 66.4929 13.2638 66.4929 12.7192V12.51H67.3197V12.7192C67.3197 13.297 67.4891 13.7287 67.8278 14.0143C68.1665 14.2932 68.6015 14.4327 69.1328 14.4327C69.6774 14.4327 70.0924 14.3098 70.378 14.0641C70.6636 13.8183 70.8064 13.5095 70.8064 13.1376C70.8064 12.8786 70.74 12.6727 70.6072 12.52C70.481 12.3673 70.3017 12.2444 70.0692 12.1514C69.8368 12.0518 69.5645 11.9655 69.2523 11.8924L68.7343 11.7629C68.3292 11.6566 67.9706 11.5271 67.6584 11.3744C67.3463 11.2216 67.1006 11.0224 66.9213 10.7767C66.7486 10.5243 66.6623 10.2022 66.6623 9.81035C66.6623 9.41852 66.7585 9.07981 66.9511 8.79424C67.1504 8.50866 67.426 8.28953 67.778 8.13678C68.1366 7.98404 68.5484 7.90764 69.0133 7.90764Z' fill='%230E0D0B'/%3e%3cpath d='M81.6544 10.0096C82.1193 10.0096 82.5145 10.0959 82.8399 10.2686C83.1719 10.4412 83.431 10.6704 83.6169 10.956C83.8095 11.2415 83.9324 11.5471 83.9855 11.8725L83.2185 12.0318C83.1853 11.7928 83.1056 11.5736 82.9794 11.3744C82.8598 11.1752 82.6905 11.0158 82.4713 10.8962C82.2521 10.7767 81.9832 10.7169 81.6644 10.7169C81.339 10.7169 81.0468 10.7899 80.7877 10.936C80.5354 11.0821 80.3328 11.2914 80.1801 11.5637C80.034 11.836 79.9609 12.1614 79.9609 12.5399V12.6296C79.9609 13.0081 80.034 13.3335 80.1801 13.6058C80.3328 13.8781 80.5354 14.0873 80.7877 14.2334C81.0468 14.3795 81.339 14.4526 81.6644 14.4526C82.1492 14.4526 82.5178 14.3264 82.7702 14.0741C83.0292 13.8217 83.1886 13.5095 83.2483 13.1376L84.0254 13.307C83.9523 13.6257 83.8195 13.9279 83.6269 14.2135C83.4343 14.4991 83.172 14.7282 82.8399 14.9009C82.5145 15.0735 82.1193 15.1599 81.6544 15.1599C81.1829 15.1599 80.7579 15.0603 80.3793 14.861C80.0074 14.6551 79.7119 14.363 79.4927 13.9844C79.2802 13.6059 79.1739 13.1575 79.1739 12.6395V12.5299C79.1739 12.0053 79.2802 11.557 79.4927 11.1851C79.7119 10.8066 80.0074 10.5177 80.3793 10.3184C80.7579 10.1126 81.1829 10.0096 81.6544 10.0096Z' fill='%230E0D0B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M86.7515 10.0096C87.2097 10.0096 87.6149 10.1092 87.9668 10.3084C88.3188 10.501 88.5944 10.78 88.7937 11.1452C88.9929 11.5105 89.0925 11.9389 89.0925 12.4304V12.7889H85.1177C85.1377 13.3136 85.3071 13.7254 85.6258 14.0243C85.9446 14.3165 86.3431 14.4626 86.8212 14.4626C87.2396 14.4626 87.5617 14.3663 87.7875 14.1737C88.0133 13.9811 88.186 13.752 88.3056 13.4863L88.983 13.815C88.8833 14.0209 88.7439 14.2268 88.5646 14.4327C88.3919 14.6386 88.1628 14.8113 87.8772 14.9507C87.5983 15.0902 87.2396 15.1599 86.8013 15.1599C86.3099 15.1599 85.8782 15.057 85.5063 14.8511C85.1344 14.6386 84.8455 14.343 84.6396 13.9645C84.4337 13.5859 84.3307 13.1476 84.3307 12.6495V12.5299C84.3307 12.0252 84.4337 11.5836 84.6396 11.205C84.8455 10.8265 85.1311 10.5342 85.4963 10.3284C85.8616 10.1159 86.28 10.0096 86.7515 10.0096ZM86.7515 10.7069C86.3066 10.7069 85.9413 10.8331 85.6557 11.0855C85.3701 11.3378 85.1941 11.6898 85.1277 12.1414H88.2956C88.269 11.6898 88.113 11.3378 87.8274 11.0855C87.5485 10.8331 87.1898 10.7069 86.7515 10.7069Z' fill='%230E0D0B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M97.1624 10.0096C97.6207 10.0096 98.0258 10.1092 98.3778 10.3084C98.7298 10.501 99.0054 10.78 99.2046 11.1452C99.4039 11.5105 99.5035 11.9389 99.5035 12.4304V12.7889H95.5287C95.5487 13.3136 95.718 13.7254 96.0368 14.0243C96.3555 14.3165 96.754 14.4626 97.2322 14.4626C97.6505 14.4626 97.9727 14.3663 98.1985 14.1737C98.4243 13.9811 98.5969 13.752 98.7165 13.4863L99.3939 13.815C99.2943 14.0209 99.1548 14.2268 98.9755 14.4327C98.8028 14.6386 98.5737 14.8113 98.2881 14.9507C98.0092 15.0902 97.6506 15.1599 97.2123 15.1599C96.7208 15.1599 96.2892 15.057 95.9172 14.8511C95.5453 14.6386 95.2564 14.343 95.0505 13.9645C94.8446 13.5859 94.7417 13.1476 94.7417 12.6495V12.5299C94.7417 12.0252 94.8446 11.5836 95.0505 11.205C95.2564 10.8265 95.542 10.5342 95.9073 10.3284C96.2725 10.1158 96.6909 10.0096 97.1624 10.0096ZM97.1624 10.7069C96.7175 10.7069 96.3522 10.8331 96.0666 11.0855C95.7811 11.3378 95.6051 11.6898 95.5387 12.1414H98.7066C98.68 11.6898 98.5239 11.3378 98.2383 11.0855C97.9594 10.8331 97.6008 10.7069 97.1624 10.7069Z' fill='%230E0D0B'/%3e%3cpath d='M92.2484 10.0594C92.6137 10.0594 92.9391 10.1358 93.2247 10.2885C93.5169 10.4413 93.7494 10.6671 93.9221 10.966C94.0947 11.2648 94.1811 11.6334 94.1811 12.0717V15.1458H93.394V12.1315C93.394 11.6467 93.2712 11.2947 93.0255 11.0755C92.7864 10.8564 92.461 10.7468 92.0492 10.7468C91.5777 10.7468 91.1925 10.8995 90.8936 11.205C90.6014 11.5105 90.4553 11.9655 90.4553 12.5698V15.1458H89.6683V10.1491H90.4354V10.9582H90.5361C90.7355 10.7018 90.8604 10.5342 91.1128 10.3483C91.3718 10.1557 91.7503 10.0594 92.2484 10.0594Z' fill='%230E0D0B'/%3e%3cpath d='M78.5932 10.9581H77.7681V10.1514H78.6L78.5932 10.9581Z' fill='%230E0D0B'/%3e%3c/svg%3e";const _c=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Hn=({isOpen:e,onClose:t,title:n,subtitle:s,children:r,overlayContent:o,overlayDimmed:i=!0,styles:a,theme:d,maxWidth:u="522px",dark:m,footerLinkText:f,bannerSrc:h,bannerAlt:y,closeOnBackdropClick:g=!1})=>{const{theme:x,dark:w,dk:v,palette:C}=l.useSpiceBrand(a,m),E=m??w,k=d||x,F=a?.fontFamily||k.typography.fontFamily||l.font.ui,j=a?.primaryColor||k.colors.primary,I=p.useRef(null),b=p.useRef(null),A=p.useRef(null),R=p.useId(),[B,q]=p.useState(!1),[O,P]=p.useState(!1),D=p.useRef(t);if(p.useEffect(()=>{D.current=t},[t]),p.useEffect(()=>{if(!e){P(!1);return}b.current=document.activeElement;const T=document.body.style.overflow;document.body.style.overflow="hidden";const H=requestAnimationFrame(()=>{const K=requestAnimationFrame(()=>P(!0));A.current=K}),V=()=>{const K=I.current;K&&(K.querySelectorAll(_c)[0]??K).focus({preventScroll:!0})},te=K=>{if(K.key==="Escape"){K.stopPropagation(),D.current();return}if(K.key!=="Tab")return;const Y=I.current;if(!Y)return;const J=Array.from(Y.querySelectorAll(_c)).filter(ve=>!ve.hasAttribute("aria-hidden"));if(J.length===0){K.preventDefault(),Y.focus();return}const ge=J[0],pe=J[J.length-1],we=document.activeElement;K.shiftKey&&we===ge?(K.preventDefault(),pe.focus()):!K.shiftKey&&we===pe&&(K.preventDefault(),ge.focus())},Z=requestAnimationFrame(V);return document.addEventListener("keydown",te),()=>{cancelAnimationFrame(Z),cancelAnimationFrame(H),A.current&&cancelAnimationFrame(A.current),document.removeEventListener("keydown",te),document.body.style.overflow=T;const K=b.current;K&&typeof K.focus=="function"&&K.focus({preventScroll:!0})}},[e]),!e)return null;const M=!!h&&!B,L=y??"";return c.jsx("div",{onMouseDown:T=>{g&&T.target===T.currentTarget&&D.current()},style:{position:"fixed",inset:0,backgroundColor:E?"rgba(0,0,0,0.72)":"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"clamp(16px, 4vw, 48px)",zIndex:l.z.modal,opacity:O?1:0,transition:`opacity ${l.duration.normal} ${l.easing.out}`},children:c.jsx("div",{ref:I,role:"dialog","aria-modal":"true","aria-labelledby":R,tabIndex:-1,style:{backgroundColor:C.shellBorder,borderRadius:"12px",padding:"5px",width:"100%",maxWidth:u,boxSizing:"border-box",boxShadow:"0 16px 48px rgba(0, 0, 0, 0.4)",outline:"none",transform:O?"scale(1)":"scale(0.96)",transition:`transform ${l.duration.slow} ${l.easing.out}`,display:"flex",flexDirection:"column",maxHeight:"100%"},children:c.jsxs("div",{style:{backgroundColor:C.shell,border:`1px solid ${C.shellInnerBorder}`,borderRadius:"9px",width:"100%",padding:"0",display:"flex",flexDirection:"column",position:"relative",flex:"0 1 auto",minHeight:0,overflowY:"auto",overflowX:"hidden"},children:[o&&i&&c.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:5,pointerEvents:"none",borderRadius:"12px"},"aria-hidden":"true"}),M&&c.jsxs("div",{style:{position:"relative",width:"100%"},children:[c.jsx("img",{src:h,style:{width:"100%",height:"auto",display:"block",borderRadius:"6px 6px 0 0"},alt:L,"aria-hidden":L===""?"true":void 0,onError:()=>q(!0)}),c.jsx("button",{type:"button",onClick:t,"aria-label":"Close dialog",style:{position:"absolute",top:"8px",right:"8px",minWidth:"44px",minHeight:"44px",color:C.textPrimary,padding:"8px",backgroundColor:"transparent",borderRadius:"9999px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1},children:c.jsx(Rr,{size:28,strokeWidth:2.5})})]}),c.jsxs("div",{style:{padding:"28px 28px 0 28px",position:"relative"},children:[!M&&c.jsx("button",{type:"button",onClick:t,"aria-label":"Close dialog",style:{position:"absolute",top:"10px",right:"10px",minWidth:"44px",minHeight:"44px",color:C.textSecondary,padding:"10px",backgroundColor:"transparent",borderRadius:"50%",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s",fontSize:"18px",fontWeight:"600"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor=E?`${j}1a`:"#f3f4f6"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent"},children:c.jsx(Rr,{size:24,strokeWidth:2.4})}),c.jsx("h2",{id:R,style:{fontSize:"22px",fontWeight:"700",color:C.textPrimary,margin:"0",fontFamily:F,lineHeight:"1.12"},children:n})]}),s&&c.jsx("div",{style:{padding:"11px 28px 13px 28px",fontSize:"12px",color:C.textSecondary,margin:"0",lineHeight:"1.35",fontFamily:F,borderBottom:E?`1px solid ${v.cardBorder}`:"1px solid #cdcfd1"},children:s}),r,c.jsxs("div",{style:{padding:"12px 28px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("img",{src:$c,alt:"","aria-hidden":"true",width:108,height:22,decoding:"async",style:{width:"108px",height:"22px",opacity:E?.85:1,filter:E?"brightness(0) invert(1)":"none",margin:0,display:"block"}}),c.jsx("a",{href:"https://spiceflow-docs.spicenet.io",target:"_blank",rel:"noopener noreferrer",style:{fontSize:"10px",color:C.textSecondary,textDecoration:"none",display:"flex",alignItems:"center",gap:"4px",fontFamily:F,lineHeight:"1"},children:c.jsx("span",{style:{color:j,textDecoration:"underline",fontWeight:"500"},children:f??"Learn more \u2192"})})]}),o]})})})};function el(e){const t=new Set(S.getEquivalentAddresses(e).map(n=>n.toLowerCase()));return t.add(e.toLowerCase()),t}const Ep=["USDC","USDT","WETH","WBTC"];function tl(e,t){const n=l.getChainConfig(t);if(!n)return;if(n.nativeCurrency.symbol.toUpperCase()===e.toUpperCase())return{address:S.ZERO_ADDRESS,symbol:n.nativeCurrency.symbol,decimals:n.nativeCurrency.decimals,chainId:t};const s=n.supportedTokens?.find(r=>r.symbol.toUpperCase()===e.toUpperCase());if(s)return{address:s.address.toLowerCase(),symbol:s.symbol,decimals:s.decimals,chainId:t}}function ls(e,t,n){const s=l.getChainConfig(t);if(!s)return;if(n!==void 0){if(S.isNativeToken(e)&&!S.getTokenByAddress(e,n))return;const i=ea(e,n,t);return i?{address:i.address.toLowerCase(),symbol:i.symbol,decimals:i.decimals,chainId:t}:void 0}if(S.isNativeToken(e))return;const r=el(e),o=s.supportedTokens?.find(i=>r.has(i.address.toLowerCase()));if(o)return{address:o.address.toLowerCase(),symbol:o.symbol,decimals:o.decimals,chainId:t}}function Fp(e){const{sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,intermediaryCandidates:o=Ep}=e;if(ao(t,n))return{strategy:"direct",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} fronted directly`};if(s===r&&(S.isNativeToken(t.address)||!S.getTokenByAddress(t.address,s)))return{strategy:"direct-swap",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} \u2192 ${n.symbol} on chain ${s}, no escrow`};if(ls(t.address,r,s))return{strategy:"direct",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} fronted on destination, swapped to ${n.symbol}`};if(ls(n.address,s,r))return{strategy:"source-swap",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} \u2192 ${n.symbol} on source chain, then fronted`};for(const i of o){const a=tl(i,s);if(!a||ao(t,a)||ao(n,a))continue;const d=tl(i,r);if(d&&ao(a,d))return{strategy:"intermediary",sourceAsset:t,outputAsset:n,intermediaryAsset:d,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} \u2192 ${i} on source, fronted, then ${i} \u2192 ${n.symbol} on destination`}}throw new l.SpiceflowError("ROUTE_STRATEGY_ERROR",`No viable cross-chain route found from ${t.symbol} (chain ${s}) to ${n.symbol} (chain ${r}). No intermediary asset is available on both chains.`,{sourceAsset:t.symbol,outputAsset:n.symbol,sourceChainId:s,destinationChainId:r,candidatesChecked:o})}async function Tp(e){const{route:t,sourceAmount:n,userAddress:s,registry:r,actionCalls:o,slippage:i}=e;async function a(d,u,m,f){const h=await r.resolveSwap({type:"swap",tokenIn:u,tokenOut:m,amountIn:f,maxSlippage:i},d,s);if(!h)throw new l.SpiceflowError("NO_LIQUIDITY",`No venue returned a quote for ${u} \u2192 ${m} on chain ${d}. No liquidity available for this pair.`,{chainId:d,tokenIn:u,tokenOut:m,amountIn:f.toString()});return h}switch(t.strategy){case"direct-swap":{const d=await a(t.destinationChainId,t.sourceAsset.address,t.outputAsset.address,n);return{chainBatches:[{chainId:t.destinationChainId,calls:[...d.calls,...o]}],solverFrontToken:t.outputAsset,solverFrontAmount:0n,resolvedSwaps:{sourceSwap:d}}}case"direct":{const d=ls(t.sourceAsset.address,t.destinationChainId,t.sourceChainId)||t.sourceAsset;if(el(d.address).has(t.outputAsset.address.toLowerCase()))return{chainBatches:[{chainId:t.destinationChainId,calls:o}],solverFrontToken:d,solverFrontAmount:n,resolvedSwaps:{}};const u=await a(t.destinationChainId,d.address,t.outputAsset.address,n);return{chainBatches:[{chainId:t.destinationChainId,calls:[...u.calls,...o]}],solverFrontToken:d,solverFrontAmount:n,resolvedSwaps:{destinationSwap:u}}}case"source-swap":{const d=ls(t.outputAsset.address,t.sourceChainId,t.destinationChainId);if(!d)throw new l.SpiceflowError("ROUTE_TOKEN_NOT_FOUND",`Output asset ${t.outputAsset.symbol} (${t.outputAsset.address}) not found on source chain ${t.sourceChainId}`,{token:t.outputAsset.symbol,address:t.outputAsset.address,chainId:t.sourceChainId,side:"source"});const u=ls(t.outputAsset.address,t.destinationChainId,t.destinationChainId);if(!u)throw new l.SpiceflowError("ROUTE_TOKEN_NOT_FOUND",`Output asset ${t.outputAsset.symbol} (${t.outputAsset.address}) not found on destination chain ${t.destinationChainId}`,{token:t.outputAsset.symbol,address:t.outputAsset.address,chainId:t.destinationChainId,side:"destination"});const m=await a(t.sourceChainId,t.sourceAsset.address,d.address,n);return{chainBatches:[{chainId:t.sourceChainId,calls:m.calls},{chainId:t.destinationChainId,calls:o}],solverFrontToken:u,solverFrontAmount:m.amountOutMinimum,resolvedSwaps:{sourceSwap:m}}}case"intermediary":{if(!t.intermediaryAsset)throw new l.SpiceflowError("ROUTE_STRATEGY_ERROR","Intermediary strategy requires an intermediary asset but none was provided in the route plan.",{strategy:t.strategy});const d=ls(t.intermediaryAsset.address,t.sourceChainId,t.destinationChainId);if(!d)throw new l.SpiceflowError("ROUTE_TOKEN_NOT_FOUND",`Intermediary ${t.intermediaryAsset.symbol} (${t.intermediaryAsset.address}) not found on source chain ${t.sourceChainId}`,{token:t.intermediaryAsset.symbol,address:t.intermediaryAsset.address,chainId:t.sourceChainId,side:"source"});const u=await a(t.sourceChainId,t.sourceAsset.address,d.address,n),m=await a(t.destinationChainId,t.intermediaryAsset.address,t.outputAsset.address,u.amountOutMinimum);return{chainBatches:[{chainId:t.sourceChainId,calls:u.calls},{chainId:t.destinationChainId,calls:[...m.calls,...o]}],solverFrontToken:t.intermediaryAsset,solverFrontAmount:u.amountOutMinimum,resolvedSwaps:{sourceSwap:u,destinationSwap:m}}}default:throw new l.SpiceflowError("ROUTE_STRATEGY_ERROR",`Unknown route strategy: ${t.strategy}`,{strategy:t.strategy})}}function Rp(e,t,n){if(!e||!t)return null;if(e._source==="wallet"){if(t===e.chainId)return{address:e.address,symbol:e.symbol,name:e.name||e.symbol,decimals:e.decimals,logoURI:e.logoURI};const f=S.getTokensForChain(t).find(h=>h.equivalenceGroup==="USDC"&&h.symbol.toUpperCase()==="USDC");return!f||n.length>0&&!n.some(h=>l.addressesEqual(h.address,f.address))?null:{address:f.address,symbol:"USDC",name:f.name||"USD Coin",decimals:f.decimals,logoURI:f.logo}}const s=Ks(e,t),r=Object.entries(e.chainTokens??{}).flatMap(([f,h])=>{const y=Sn(f);return y?.chainId===t?[{parsed:y,detail:h}]:[]}),o=f=>n.find(h=>l.addressesEqual(h.address,f))??null,i=f=>{const h=r.find(({parsed:x})=>l.addressesEqual(x.address,f));if(!h)return null;const y=l.getChainConfig(t);if(S.isNativeToken(f))return y?{address:S.ZERO_ADDRESS,symbol:y.nativeCurrency.symbol,name:y.nativeCurrency.name,decimals:y.nativeCurrency.decimals,logoURI:e.logoURI}:null;const g=y?.supportedTokens?.find(x=>l.addressesEqual(x.address,f));return!g||!_o(e,f,t)?null:{address:h.parsed.address,symbol:g.symbol,name:g.name||h.detail?.name||e.displayName||e.name||e.symbol,decimals:g.decimals,logoURI:g.logo||e.logoURI}},a=r.map(({parsed:f})=>f.address).filter(S.isNativeToken);for(const f of[...s,...a]){if(S.isNativeToken(f)){const g=i(f);if(g)return g}const h=o(f);if(h)return h;const y=i(f);if(y)return y}if(e.chainTokens||e.receiptTokenId)return null;const d=Mn(e,t);if(d){const f=o(d);if(f)return f}const u=ls(e.address,t,e.chainId);return u?o(u.address)||(n.length>0?null:{address:u.address,symbol:u.symbol||e.symbol,name:e.displayName||e.name||e.symbol,decimals:u.decimals??e.decimals,logoURI:e.logoURI}):null}function Bp(e){const t=e.find(n=>S.isSpicenetChainId(n.chainId))?.calls?.[0]?.data;if(!t)return null;try{const n=N.decodeFunctionData({abi:S.spicenetAbi,data:t});return n.functionName!=="createWithdrawalRequest"?null:n.args[0].transfers.map(s=>({token:s.token,recipient:s.to,amount:s.amount}))}catch{return null}}function Op(e,t){if(!e||e.length!==t.length)return!1;const n=s=>s.reduce((r,o)=>r+o.amount,0n);return n(e)!==n(t)?!1:e.every((s,r)=>{const o=t[r];return s.token.toLowerCase()!==o.token.toLowerCase()||s.recipient.toLowerCase()!==o.recipient.toLowerCase()?!1:s.recipient.toLowerCase()===S.SPICE_GAS_FEE_RECIPIENT.toLowerCase()?l.amountsWithinBps(s.amount,o.amount,100n):s.recipient.toLowerCase()!==S.SPICE_PLATFORM_FEE_RECIPIENT.toLowerCase()||s.amount===o.amount})}function jp(e,t){const n=e.intents.flatMap(o=>o.batches).filter(o=>{const i=l.getBatchFees(o);return BigInt(o.quotedAmount)>0n||BigInt(o.totalDebit)>0n||i.totalFee>0n}),s=n.filter(o=>o.chainId===t),r=s.length>0?s:n;return r.length===1?r[0]:null}function Dp(e){const t=new Map;for(const n of e){if(n.amount<=0n)continue;const s=n.token.toLowerCase(),r=n.recipient.toLowerCase(),o=`${s}:${r}`,i=t.get(o);i?i.amount+=n.amount:t.set(o,{...n})}return[...t.values()]}function nl(e,t){if(!e.token||!e.recipient||e.chainId===null)return null;const n=jp(t,e.chainId);if(!n)return null;const{gasFee:s,bridgeFee:r,spicenetFee:o}=l.getBatchFees(n),i=s+r,a=e.grossAmountRaw-i-o;if(a<=0n)throw new Error("Withdrawal amount does not cover the network fee.");const d=[{token:e.token.address,recipient:e.recipient,amount:a}];return i>0n&&d.push({token:e.token.address,recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:i}),o>0n&&d.push({token:e.token.address,recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:o}),Dp(d)}function Np(e,t,n){const s=nl(e,t);return!s||Op(Bp(n),s)?null:e.buildWithdrawBatches(s)}async function sl(e){if(e.executionContextRef.current){await rl(e);return}if(!e.batches.length||!e.walletAddress||!e.recipient)return;const t=l.relayerService.getBaseUrl();e.ui.setIsExecuting(!0),e.ui.setExecutionError(null),e.ui.setExecutionProgress(null),e.executionContextRef.current=null,e.ui.setLockedGasFee(e.gasFee);try{let n=e.batches;if(e.isNon7702&&e.onWithdrawExecute)await e.onWithdrawExecute(e.amount);else{if(!e.isNon7702&&!n.some(o=>S.isSpicenetChainId(o.chainId)))throw new Error("Spice withdrawals must include a Spicenet funding batch before the destination chain batch.");const s=e.token?.address||"",r={useCustomTransfers:!0};if(e.buildSpicenetBatch){const o=e.feeEstimate??await e.execution.estimate(n,s,0n,r),i=nl(e,o);i&&(n=e.buildWithdrawBatches(i));const a=o.intents[0]?.batches.find(d=>d.chainId===e.chainId)??o.intents[0]?.batches[0]??null;a&&e.ui.setLockedGasFee(l.getBatchFees(a).totalFee)}else{const o=(e.feeEstimate??await e.execution.estimate(n,s,0n,r)).intents[0]?.batches[0]??null;o&&e.ui.setLockedGasFee(l.getBatchFees(o).totalFee)}await e.execution.execute(n,s,0n,o=>{o.actionId&&o.intentId&&typeof o.intentIndex=="number"&&typeof o.totalSteps=="number"&&(e.executionContextRef.current={actionId:o.actionId,intentId:o.intentId,intentIndex:o.intentIndex,totalSteps:o.totalSteps,autoContinue:o.autoContinue,apiUrl:t,finish:()=>ba(e)}),e.ui.setExecutionProgress(o)},void 0,e.buildSpicenetBatch?{...r,adjustBatchesForEstimate:({feeEstimate:o,chainBatches:i})=>Np(e,o,i)}:{...r,skipPreSubmitFeeEstimate:!0})}await ba(e)}catch(n){const s=n instanceof Error?n.message:"Withdraw failed";e.ui.setExecutionError(s)}finally{e.ui.setIsExecuting(!1)}}async function ba(e){window.dispatchEvent(new CustomEvent("withdraw-completed")),await e.onWithdrawSuccess?.({token:e.token?.symbol||"",amount:e.amount,chainId:e.chainId})}async function rl(e){const t=e.executionContextRef.current;if(!t){if(e.isNon7702&&e.onWithdrawExecute){await sl(e);return}e.ui.setExecutionError("The previous withdrawal action is unavailable. Reconcile it before starting another.");return}const n=t.apiUrl?new l.RelayerService:l.relayerService;t.apiUrl&&n.setBaseUrl(t.apiUrl),e.ui.setIsExecuting(!0),e.ui.setExecutionError(null),e.ui.setExecutionProgress({step:"executing",message:"Resuming existing action...",actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps});try{let s=t.totalSteps;for(let r=0;r<t.totalSteps;r++)if((await n.checkStepStatus(t.intentId,r)).data.status!=="success"){s=r;break}if(s>=t.totalSteps)e.ui.setExecutionProgress(r=>({...r||{step:"success",message:"Transaction successful!",actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps},step:"success",message:"Transaction successful!"}));else for(let r=s;r<t.totalSteps;r++){const o=await Wc({actionId:t.actionId,intentIndex:t.intentIndex,intentId:t.intentId,stepIndex:r,chainId:e.chainId??void 0,observeOnly:t.autoContinue,maxPolls:t.autoContinue?Number.POSITIVE_INFINITY:void 0,relayer:n,completeOnExecution:!e.isNon7702&&r===t.totalSteps-1,onStatusMessage:(i,a)=>{e.isMountedRef.current&&e.ui.setExecutionProgress({step:"executing",message:i,txHash:a,actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps})}});if(!e.isMountedRef.current)return;e.ui.setExecutionProgress({step:r===t.totalSteps-1?"success":"executing",message:r===t.totalSteps-1?"Transaction successful!":"Executing remaining steps...",txHash:o,actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps})}await(t.finish?.()??ba(e))}catch(s){const r=s instanceof Error?s.message:"Withdraw failed";e.ui.setExecutionError(r)}finally{e.ui.setIsExecuting(!1)}}async function Mp(e){const t=await e.estimate(e.batches,e.tokenAddress,0n,{useCustomTransfers:!0,signal:e.signal}),n=t.intents.flatMap(r=>r.batches).filter(r=>l.getBatchFees(r).totalFee>0n),s=n.filter(r=>r.chainId===e.chainId)[0]??n[0]??t.intents[0]?.batches[0];if(!s)throw new Error("No gas fee estimate was returned for this withdraw.");return{gasFee:l.getBatchFees(s).totalFee,feeEstimate:t}}function va(e,t){return N.formatUnits(e,t).replace(/(\.\d*?[1-9])0+$|\.0+$/,"$1")}function Pp(e,t,n){return Kt(e,t,n,"floor")}function ol(e,t,n=!1){if(e<=0)return"$0";if(!t||!Number.isFinite(t)||t<=0)return"\u2014";const s=e*t;return`$${s>=1?s.toFixed(3).replace(/0+$/,"").replace(/\.$/,""):s.toFixed(4).replace(/0+$/,"").replace(/\.$/,"")}${n?" (stale)":""}`}function Up(e,t){return t?JSON.stringify({tokenAddress:t.toLowerCase(),batches:e.map(n=>({chainId:n.chainId,calls:n.calls.map(s=>({to:s.to.toLowerCase(),value:s.value.toString(),data:s.data})),tokenTransfers:(n.tokenTransfers??[]).map(s=>({from:s.from,to:s.to.toLowerCase(),token:s.token.toLowerCase(),amount:s.amount.toString()}))}))}):null}function Wp(e){const t=new Map;for(const n of e){if(n.amount<=0n)continue;const s=N.getAddress(n.token),r=N.getAddress(n.to),o=`${s.toLowerCase()}:${r.toLowerCase()}`,i=t.get(o);i?i.amount+=n.amount:t.set(o,{token:s,to:r,amount:n.amount})}return[...t.values()]}function qp(e,t){return`0x${t}${e.slice(4)}`}function al(e,t,n,s){if(e.some(f=>f.domain==="spicenet"))return e;const r=n?.intents.flatMap(f=>f.batches),o=f=>f.from==="escrow",i=e.map(f=>{const h=r?.find(b=>b.chainId===f.chainId);if(!h)return f;const y=l.getBatchFees(h),g=y.totalFee;if(g<=0n)return f;const x=(f.tokenTransfers??[]).filter(b=>o(b)&&N.getAddress(b.to).toLowerCase()===t.toLowerCase()),w=x.find(b=>!S.isNativeToken(N.getAddress(b.token)))??x[0];if(!w)return f;const v=N.getAddress(w.token),C=S.isNativeToken(v);let E=!1;const k=(f.tokenTransfers??[]).map(b=>E||!o(b)||N.getAddress(b.to).toLowerCase()!==t.toLowerCase()||N.getAddress(b.token).toLowerCase()!==v.toLowerCase()?b:(E=!0,{...b,amount:s?.payoutAlreadyGross?BigInt(b.amount):BigInt(b.amount)+g}));if(!E)return f;const F=(b,A)=>C?{to:b,value:A,data:"0x"}:{to:v,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[b,A]})},j=[];y.spicenetFee>0n&&j.push(F(S.SPICE_PLATFORM_FEE_RECIPIENT,y.spicenetFee));const I=y.gasFee+y.bridgeFee;return I>0n&&j.push(F(S.SPICE_GAS_FEE_RECIPIENT,I)),{...f,tokenTransfers:k,calls:[...j,...f.calls]}}),a=i.flatMap(f=>(f.tokenTransfers??[]).filter(o).map(h=>{const y=N.getAddress(h.token),g=N.getAddress(h.to),x=[{token:y,to:g,amount:BigInt(h.amount)}];return{chainId:f.chainId,transfers:Wp(x)}}));if(a.length===0)return e;const d=s?.requestTimestampMs??Date.now(),u=BigInt(Math.floor(d/1e3));if(s?.expiresAt!==void 0&&(!Number.isSafeInteger(s.expiresAt)||s.expiresAt<=Number(u)))throw new Error("Funding expiry must be a future Unix timestamp");const m=s?.expiresAt===void 0?u+3600n:BigInt(s.expiresAt);return[{chainId:S.SPICENET_NATIVE_CHAIN_ID,domain:"spicenet",tokenTransfers:[],calls:a.map((f,h)=>{const y=N.keccak256(N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"}],[t,f.transfers[0].token,f.transfers.reduce((x,w)=>x+w.amount,0n),BigInt(f.chainId),BigInt(d+h)])),g=qp(y,"77");return{to:"0x0000000000000000000000000000000000000000",value:0n,data:N.encodeFunctionData({abi:S.spicenetAbi,functionName:"createWithdrawalRequest",args:[{chainId:`evm:${f.chainId}`,idempotenceKey:g,nbf:0n,exp:m,metadata:"{}",transfers:f.transfers.map(x=>({token:x.token.toLowerCase(),to:x.to,amount:x.amount}))}]})}})},...i]}function ds(e,t,n,s){const r=e.filter(i=>i.domain!=="spicenet"),o=i=>(i.tokenTransfers??[]).some(a=>a.from==="escrow");return[...r.filter(i=>!o(i)),...al(r.filter(o),t,n,s)]}class vs extends Error{constructor(t,n){super("The selected balance cannot cover the fee funding amount"),this.requiredAmount=t,this.balance=n,this.name="InsufficientFeeFundingBalanceError"}}function Ca(e,t,n,s,r){const o=e[e.length-1];if(!o?.calls.length||o.domain==="spicenet")throw new Error("Proceeds fees require a final destination action");const i=[{to:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:r},{to:S.SPICE_GAS_FEE_RECIPIENT,amount:s}].filter(a=>a.amount>0n);return e.map(a=>a===o?{...a,calls:[...a.calls,...i.map(d=>({to:n,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[d.to,d.amount]})}))],tokenTransfers:[...a.tokenTransfers??[],...i.map(d=>({from:t,to:d.to,token:n,amount:d.amount}))]}:a)}async function ka(e,t,n,s,r){const o=S.hashChainBatches(e),i=await l.relayerService.estimateBatchGas({user:t,outputToken:n,signal:s,requireSimulation:!0,includePlatformFee:r!==void 0,chainBatches:e.map((a,d)=>({...a,hash:o[d].hash}))});if(i.gasQuoteSource!=="estimated"||!i.simulationVerified)throw new Error("Action proceeds require a successful live batch simulation; fallback gas pricing is not sufficient");if(r!==void 0&&(i.platformFee===void 0||i.platformFee>r))throw new Error("Fee conversion platform price changed; refresh before retrying");return i.gasFee}async function il(e){if(e.proceeds.token.toLowerCase()!==e.token.toLowerCase())throw new Error("Action proceeds must use the destination fee token");const t=await e.proceeds.resolve(e.signal);if(e.signal?.aborted)throw new Error("Action proceeds quote was cancelled");if(t<0n)throw new Error("Action proceeds cannot be negative");const n=await e.baseline();if(!n?.preview)throw new Error("Action fee quote is unavailable");let s=n.preview.gasFee;const r=n.preview.spicenetFee,o=n.preview.bridgeFee??0n;for(let i=0;i<5;i++){const a=s+r+o,d=t<a?t:a,u=a-d;if(u>0n&&e.fundShortfall===!1)throw new vs(a,t);const m=u>0n?(u*110n+99n)/100n+2n:0n;let f=m,h;const y=ds(await e.buildBatches(m,{actionAmountOverride:e.actionAmountFor?.(a),actionOutputFee:d,onSourceSpend:w=>{f=w},onActionCalls:w=>{h=w}}),e.owner,void 0,{expiresAt:e.expiresAt}),g=Ca(y,e.owner,e.token,s+o,r),x=await ka(g,e.owner,e.token,e.signal);if(x<=s&&(s-x)*100n<=x*15n)return{preview:{...n.preview,grossAmount:m,netAmount:0n,gasFee:s,totalFee:a,gasQuoteSource:"estimated"},feeEstimate:n.feeEstimate,grossFundingAmount:m,proceedsAvailable:t,proceedsUsed:d,fundingBatches:g,sourceSpendCap:f,destinationAmount:0n,actionDefinition:h};s=x}throw new Error("Action proceeds fee estimate did not converge")}function cl(e,t){if(!(!e||e==="output")){if("token"in e)return e;if(t)return{token:t,resolve:async n=>{const s=await e.resolve(n);if(n?.aborted)throw new Error("Action proceeds quote was cancelled");if(s.some(r=>r.amount<0n))throw new Error("Action proceeds cannot be negative");return s.filter(r=>r.token.toLowerCase()===t.toLowerCase()).reduce((r,o)=>r+o.amount,0n)}}}}function yo(e,t,n){const s=n.filter(r=>r.amount>0n);return{chainId:e,domain:"evm",tokenTransfers:[],calls:S.isNativeToken(t)?s.map(r=>({to:r.recipient,value:r.amount,data:"0x"})):s.map(r=>({to:t,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[r.recipient,r.amount]})}))}}new Set([S.SPICE_GAS_FEE_RECIPIENT,S.SPICE_PLATFORM_FEE_RECIPIENT].map(e=>e.toLowerCase()));async function us(e,t,n){const s=await l.getWalletBalanceEntries(e),r=S.getTokenByAddress(n,t)?.decimals,o=s.filter(m=>!Array.isArray(m.chainTokens)&&Object.keys(m.chainTokens??{}).some(f=>f.toLowerCase()===`evm:${t}:${n.toLowerCase()}`));if(o.length>1)throw new Error("Order cash receipt identity is ambiguous");const i=new Map;for(const m of o){const f=Object.entries(m.chainTokens??{}).find(([h])=>h.toLowerCase()===`evm:${t}:${n.toLowerCase()}`)?.[1];if(!m.receiptToken||i.has(m.receiptToken)||!/^\d{1,78}$/.test(m.balanceAvailable)||!Number.isInteger(m.decimals)||m.decimals<0||m.decimals>36||typeof f!="object"||r===void 0||f.decimals!==r)throw new Error("Order cash metadata could not be verified");i.set(m.receiptToken,{amount:BigInt(m.balanceAvailable),decimals:m.decimals})}const a=new Set,d=new Set;let u;for(let m=0;m<20;m++){const f=await l.relayerService.listLimitOrders(e,u);if(!Array.isArray(f.orders)||f.orders.length>100)throw new Error("Order reservations could not be verified");for(const h of f.orders){if(!/^ord_[0-9a-f]{64}$/.test(h.id)||a.has(h.id)||!l.addressesEqual(h.user,e)||!/^\d{1,78}$/.test(h.reservedAmount)||!["open","executing","needs_attention","filled","cancelled","expired","failed"].includes(h.status))throw new Error("Order reservations could not be verified");if(a.add(h.id),!["open","executing","needs_attention"].includes(h.status))continue;const y=i.get(h.receiptToken);if(!y&&h.chainId===t&&l.addressesEqual(h.tokenIn,n))throw new Error("Active order cash could not be verified");y&&(y.amount-=BigInt(h.reservedAmount))}if(f.nextCursor===null){let h=0n;for(const y of i.values()){if(y.amount<0n)throw new Error("Order reservations exceed the current cash balance");h+=S.convertAmountBetweenDecimals(y.amount,y.decimals,r)}return{available:h,entries:s}}if(typeof f.nextCursor!="string"||!/^ord_[0-9a-f]{64}$/.test(f.nextCursor)||d.has(f.nextCursor))throw new Error("Order history is incomplete");u=f.nextCursor,d.add(u)}throw new Error("Order history is incomplete")}const ll="spiceflow-limit-order:v1",Ps=N.parseAbi(["function exactInput((bytes path, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]);function Lp(e){if(!/^ord_[0-9a-f]{64}$/.test(e))throw new Error("Invalid limit order ID");return`Spice Flow limit order cancellation v1
|
|
16
|
-
Order: ${e}`}function Ia(e){const t=e.intents[0];if(e.intents.length!==1||t.mode!=="7702")throw new Error("Invalid order intent");return`ord_${la(t.chainBatches,BigInt(t.exp)).slice(2)}`}function zp(e){if(!Number.isSafeInteger(e.expiresAt)||e.minimumOutput<=0n||e.amountIn<=0n||e.platformFee<0n||e.gasBridgeFee<0n||e.amountIn+e.platformFee+e.gasBridgeFee!==e.grossAmount)throw new Error("Invalid limit order amounts or expiry");const t=Tr({userAddress:e.user,destinationChainId:e.chainId,deliveryToken:e.tokenIn,deliveryAmount:e.grossAmount,deliveryRecipient:e.user,requestTimestampMs:e.requestTimestampMs,expiresAt:e.expiresAt,metadata:e.conditional?"":e.replacesOrderId?`${ll}:amend:${e.replacesOrderId}`:ll,requestNonce:e.requestNonce});if(!t)throw new Error("Order requires a positive cash balance");const n=[...yo(e.chainId,e.tokenIn,[{recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:e.platformFee},{recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:e.gasBridgeFee}]).calls,{to:e.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.router,e.amountIn]})},{to:e.router,value:0n,data:N.encodeFunctionData({abi:Ps,functionName:"exactInput",args:[{path:e.path,recipient:e.user,deadline:BigInt(e.expiresAt),amountIn:e.amountIn,amountOutMinimum:e.minimumOutput}]})}],s=S.hashChainBatches([t,{chainId:e.chainId,calls:n}]);return{user:e.user,amountMode:"gross_input",intents:[{mode:"7702",signatureType:"ecdsa",signature:"0x00",nbf:0,exp:e.expiresAt,chainBatches:s.map((r,o)=>({...r,chainId:Number(r.chainId),tokenTransfers:o===0?[]:[{from:"escrow",to:e.user,token:e.tokenIn,amount:e.grossAmount}]}))}]}}const Hp=36;function _s(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=Hp}function Or(e){return!e.balanceError&&e.balanceStatus!=="stale"&&e.balance>=0n&&_s(e.decimals)&&!e.isNative&&!S.isNativeToken(e.address)}function Sa(e,t){if(!e.chainTokens||Array.isArray(e.chainTokens))return null;let n;for(const[s,r]of Object.entries(e.chainTokens)){const o=Sn(s);if(!(!o||o.chainId!==t)){if(n)return null;n={address:o.address,decimals:r?.decimals}}}return n??null}function Aa(e,t,n){if(e<0n)return null;const s=S.convertAmountBetweenDecimals(e,t,n);return S.convertAmountBetweenDecimals(s,n,t)===e?s:null}function Cs(e,t){return _s(e.receiptTokenDecimals)&&Aa(t,e.decimals,e.receiptTokenDecimals)!==null}function Vp(e,t){if(!_s(e.receiptTokenDecimals))return-1n;const n=S.convertAmountBetweenDecimals(t,e.decimals,e.receiptTokenDecimals),s=S.convertAmountBetweenDecimals(n,e.receiptTokenDecimals,e.decimals);return s<=t?s:-1n}function bo(e,t){return e.owner?.toLowerCase()===t.toLowerCase()}function Qp(e,t,n,s,r){if(!e)return[];const o=[];for(const i of Array.isArray(e)?e:[e]){if(i.amount<0n||!bo(i.asset,s)||i.asset.chainId!==r)return null;const a=xe(i.asset);if(a!==xe(t)&&a!==xe(n))return null;const d=o.find(u=>u.positionId===a);d?d.amount+=i.amount:o.push({positionId:a,amount:i.amount})}return o}function jr(e,t,n,s,r,o){if(!n||!/^0x[0-9a-f]{40}$/i.test(n)||!bo(e,n)||e.chainId!==s||!Or(e))return;let i,a,d;if(e.location==="embedded"&&e._source!=="spice"){i=e,d=e.address;const E=t.filter(k=>{const F=Sa(k,s);return k.location==="rollup"&&k._source!=="wallet"&&bo(k,n)&&k.chainId===s&&Or(k)&&!!k.receiptTokenId&&!!F&&l.addressesEqual(F.address,d)});if(E.length!==1)return;[a]=E}else if(e.location==="rollup"&&e._source!=="wallet"&&e.receiptTokenId){a=e;const E=Sa(e,s);if(!E)return;d=E.address;const k=t.filter(F=>F.location==="embedded"&&F._source!=="spice"&&bo(F,n)&&F.chainId===s&&Or(F)&&l.addressesEqual(F.address,d));if(k.length!==1)return;[i]=k}else return;if(!i||!a||!d||!Or(i)||!Or(a)||i.location!=="embedded"||a.location!=="rollup"||!a.receiptTokenId||!_s(i.decimals)||i.decimals!==a.decimals||!_s(a.receiptTokenDecimals))return;const u=Sa(a,s);if(!u||!l.addressesEqual(u.address,d)||u.decimals!==void 0&&u.decimals!==i.decimals)return;const m=xe(i),f=xe(a);if(m===f||t.filter(E=>xe(E)===m).length!==1||t.filter(E=>xe(E)===f).length!==1)return;let h=i.balance,y=r??a.balance;if(y<0n||y>a.balance)return;const g=Qp(o,i,a,n,s);if(g===null)return;for(const E of g)if(E.positionId===m){if(E.amount>h)return;h-=E.amount}else{if(E.amount>y||!Cs(a,E.amount))return;y-=E.amount}const x=xe(e),w=e.decimals;if(!_s(w))return;const v=Aa(h,i.decimals,w),C=Aa(y,a.decimals,w);if(!(v===null||C===null))return{wallet:i,escrow:a,owner:n,chainId:s,token:d,decimals:i.decimals,representativePositionId:x,representativeDecimals:w,walletAvailable:h,escrowAvailable:y,availableBalance:v+C,...g.length===1?{reserve:g[0]}:{},reserves:g}}function dl(e,t,n,s){const r=xe(e);return{positionId:r,asset:e,amount:t,reservedAmount:n.find(o=>o.positionId===r)?.amount??0n,availableAmount:s}}function Ea(e,t,n,s){if(t<=0n)throw new RangeError("Enter an amount within the available balance.");const r=s?.quoteOnly===!0;if(!r&&t>e.availableBalance)throw new RangeError("Enter an amount within the available balance.");let o,i,a=0n,d=0n,u=0n;if(n==="escrow"){const m=t<e.escrowAvailable?t:e.escrowAvailable;if(i=Vp(e.escrow,m),i<0n)throw new RangeError("Enter an amount within the available balance.");if(a=t-i,o=a,d=t,!r&&a>e.walletAvailable||!Cs(e.escrow,a)||!Cs(e.escrow,d))throw new RangeError("Enter an amount within the available balance.")}else if(o=t<e.walletAvailable?t:e.walletAvailable,u=o,d=t-o,i=d,!r&&d>e.escrowAvailable||!Cs(e.escrow,d))throw new RangeError("Enter an amount within the available balance.");return{owner:e.owner,chainId:e.chainId,token:e.token,decimals:e.decimals,representativePositionId:e.representativePositionId,representativeDecimals:e.representativeDecimals,route:n,grossAmount:t,insufficient:o>e.walletAvailable||i>e.escrowAvailable,positions:[dl(e.wallet,o,e.reserves,e.walletAvailable),dl(e.escrow,i,e.reserves,e.escrowAvailable)],walletDeposit:a,escrowWithdrawal:d,walletInPlace:u}}function vo(e,t,n,s,r){if(!e.positions.find(m=>m.positionId===e.representativePositionId))throw new Error("The source balance changed. Review the available amount before continuing.");const o=t.filter(m=>xe(m)===e.representativePositionId);if(o.length!==1)throw new Error("The source balance changed. Review the available amount before continuing.");if(e.insufficient)throw new Error("The source balance changed. Review the available amount before continuing.");const i=e.positions.filter(m=>m.reservedAmount>0n).map(m=>({asset:m.asset,amount:m.reservedAmount})),a=jr(o[0],t,n,s,r,i);if(!a||a.representativePositionId!==e.representativePositionId||a.representativeDecimals!==e.representativeDecimals||a.owner.toLowerCase()!==e.owner.toLowerCase()||a.chainId!==e.chainId||!l.addressesEqual(a.token,e.token)||a.decimals!==e.decimals)throw new Error("The source balance changed. Review the available amount before continuing.");if(e.grossAmount<=0n||e.positions.length!==2)throw new Error("The source balance changed. Review the available amount before continuing.");const d=e.positions.find(m=>m.positionId===xe(a.wallet)),u=e.positions.find(m=>m.positionId===xe(a.escrow));if(!d||!u||d.positionId===u.positionId||d.amount<0n||u.amount<0n||d.reservedAmount<0n||u.reservedAmount<0n)throw new Error("The source balance changed. Review the available amount before continuing.");if(e.route==="escrow"){if(e.walletDeposit!==d.amount||e.walletInPlace!==0n||e.escrowWithdrawal!==e.grossAmount||d.amount+u.amount!==e.grossAmount||!Cs(a.escrow,u.amount)||!Cs(a.escrow,d.amount)||!Cs(a.escrow,e.escrowWithdrawal))throw new Error("The source balance changed. Review the available amount before continuing.")}else if(e.walletDeposit!==0n||e.walletInPlace!==d.amount||e.escrowWithdrawal!==u.amount||d.amount+u.amount!==e.grossAmount||!Cs(a.escrow,u.amount))throw new Error("The source balance changed. Review the available amount before continuing.");if(d.amount>a.walletAvailable||u.amount>a.escrowAvailable)throw new Error("The source balance changed. Review the available amount before continuing.");for(const m of e.positions){const f=t.find(h=>xe(h)===m.positionId);if(!f||f.decimals!==m.asset.decimals||f.receiptTokenDecimals!==m.asset.receiptTokenDecimals||f.receiptTokenId!==m.asset.receiptTokenId)throw new Error("The source balance changed. Review the available amount before continuing.")}}function Gp(e,t){const n=t.feePolicy;if(!n||t.feeExecutionMode!=="user-transfer"||!t.feeBreakdown)return e;const s=t.feeToken??t.destinationToken,r=[{recipient:n.platformRecipient,amount:t.feeBreakdown.spicenetFee},{recipient:n.gasRecipient,amount:t.feeBreakdown.gasFee+t.feeBreakdown.bridgeFee}],o=[];for(const{recipient:i,amount:a}of r){const d=l.addressesEqual(i,n.gasRecipient)?[i,S.SPICE_GAS_FEE_RECIPIENT,"0x718dE8f0A0DC14D5BC6c560C192F02AE6Af036c7","0x737680c45F88A8b1b389e354dde11419f89BAdd6"]:[i],u=g=>d.some(x=>l.addressesEqual(g,x));let m;const f=(g,x)=>{if(m&&!l.addressesEqual(m,g))throw new Error("Action fee calls use mixed gas fee recipients");m=g,h=!0,y+=x};let h=!1,y=0n;for(const g of e)if(S.isNativeToken(s))u(g.to)&&g.data==="0x"&&f(g.to,g.value);else if(l.addressesEqual(g.to,s)&&g.value===0n){let x;try{x=N.decodeFunctionData({abi:N.erc20Abi,data:g.data})}catch{continue}if(x.functionName==="transfer"&&u(x.args[0])){if(N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:x.args}).toLowerCase()!==g.data.toLowerCase())throw new Error("Action fee transfer is not canonical");f(x.args[0],x.args[1])}}if(h){if(y!==a)throw new Error("Action fee calls differ from the accepted fee plan")}else a>0n&&o.push(S.isNativeToken(s)?{to:i,value:a,data:"0x"}:{to:s,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[i,a]})})}return[...o,...e]}function ul(e,t){let n,s;if(S.isNativeToken(t)){if(e.data!=="0x")return null;n=e.to,s=e.value}else{if(!l.addressesEqual(e.to,t))return null;try{const r=N.decodeFunctionData({abi:N.erc20Abi,data:e.data});if(r.functionName!=="transfer")return null;[n,s]=r.args}catch{return null}}return l.addressesEqual(n,S.SPICE_GAS_FEE_RECIPIENT)?{gas:s,platform:0n}:l.addressesEqual(n,S.SPICE_PLATFORM_FEE_RECIPIENT)?{gas:0n,platform:s}:null}async function Kp(e,t,n){const s=l.getClientForChain(e);return S.isNativeToken(n)?s.getBalance({address:t}):s.readContract({address:n,abi:N.erc20Abi,functionName:"balanceOf",args:[t]})}function er(e,t,n){return e.map(s=>s.chainId===t?{...s,calls:s.calls.filter(r=>!ul(r,n))}:s)}function pl(e,t,n){if(!e.feeOnlyAction)return{};const s=e.embeddedWalletAddress??e.providerEmbeddedAddress;if(e.feeQuote?.preview.feePayer==="relayer"){const m=async f=>{e.validateFeeQuote?.(),await ka(f,s,t,e.signal),e.validateFeeQuote?.()};return{prepareForSigning:async f=>(await m(f),f),validateBeforeSubmit:m}}const r=e.feeQuote?.fundingSource,o=r&&r.kind!=="proceeds"?void 0:e.actionProceeds,i=r&&(r.kind==="input"||r.kind==="balance"&&r.asset?._source==="wallet")?r:void 0;if(o||e.feeQuote?.fundingConversion||i){const m=e.feeQuote?.fundingConversion,f=o??{token:t,resolve:async()=>0n},h=e.feeQuote?.preview,y=e.feeQuote?.proceedsUsed,g=m?.fromProceeds?m.tokenIn:t;if(!h||y===void 0||!i&&f.token.toLowerCase()!==g.toLowerCase())throw new Error("Refresh the action proceeds quote");const x=h.gasFee+(h.bridgeFee??0n),w=h.spicenetFee,v=i?async()=>{e.validateFeeQuote?.();const E=await Kp(e.resolvedChainId,s,i.token);e.validateFeeQuote?.();const k=i.kind==="input"?i.amount:(m?.amountInMax??y)+(i.reservedAmount??0n);if(e.signal?.aborted||E<k||m&&m.amountOut<x+w)throw new Error("The fee funding balance changed; refresh before retrying");return m?[{chainId:e.resolvedChainId,token:t,amount:m.amountOut}]:[]}:async()=>{e.validateFeeQuote?.();const E=await f.resolve(e.signal);if(e.validateFeeQuote?.(),e.signal?.aborted||(m?.fromProceeds?E<m.amountInMax||m.amountOut<x+w:E<y||E+(m?.amountOut??n)<x+w))throw new Error("Action proceeds changed; refresh before retrying");return m?.fromProceeds?[{chainId:e.resolvedChainId,token:m.tokenIn,amount:m.amountInMax},{chainId:e.resolvedChainId,token:t,amount:m.amountOut}]:[{chainId:e.resolvedChainId,token:t,amount:y+(m?.amountOut??0n)}]},C=async E=>{await v();const k=await ka(E,s,t,e.signal,m?w:void 0);if(await v(),(k>h.gasFee?k-h.gasFee:h.gasFee-k)*100n>k*15n)throw new Error("Action gas quote changed; refresh before retrying")};return{resolveActionOutputCredits:v,prepareForSigning:async E=>{if(e.feeQuote?.sourceAllocation||e.feeQuote?.feeSourceAllocation)return await C(E),E;const k=er(E,e.resolvedChainId,t).map(j=>({...j,tokenTransfers:j.tokenTransfers?.filter(I=>!(typeof I.from=="string"&&l.addressesEqual(I.from,s)&&(l.addressesEqual(I.to,S.SPICE_GAS_FEE_RECIPIENT)||l.addressesEqual(I.to,S.SPICE_PLATFORM_FEE_RECIPIENT))))})),F=Ca(k,s,t,x,w);return await C(F),F},validateBeforeSubmit:C}}const a=S.getTokenByAddress(t,e.resolvedChainId),d={chainId:e.resolvedChainId,tokenAddress:t,symbol:a?.symbol??e.destinationToken.symbol,decimals:e.executionTokenDecimals??a?.decimals??e.destinationToken.decimals},u=async m=>{e.validateFeeQuote?.();const f=er(m,e.resolvedChainId,t),h=await e.execution.estimate(f,t,n,{userOverride:s,useCustomTransfers:!0,feeExecutionMode:"backend-transfer"});e.validateFeeQuote?.();const y=l.getSupplyFeePreview(h,d);if(!y||y.chainId!==e.resolvedChainId)throw new Error("The fee service did not return the destination action's fee quote");if(y.gasFee+y.spicenetFee+(y.bridgeFee??0n)+2n>n)throw new Error("Fees exceed the displayed maximum funding; refresh the quote before retrying");return{raw:f,feeEstimate:h,fees:y}};return{prepareForSigning:async m=>{const{raw:f,feeEstimate:h}=await u(m);return e.feeQuote?.sourceAllocation||e.feeQuote?.feeSourceAllocation?m:ds(f,s,h,{payoutAlreadyGross:!0})},validateBeforeSubmit:async m=>{const{fees:f}=await u(m);let h=0n,y=0n;for(const x of m)if(x.chainId===e.resolvedChainId)for(const w of x.calls){const v=ul(w,t);v&&(h+=v.gas,y+=v.platform)}if(h+y+2n>n)throw new Error("Signed fees exceed the displayed maximum funding");const g=f.gasFee+(f.bridgeFee??0n);if((h>g?h-g:g-h)*100n>g*15n||y!==f.spicenetFee)throw new Error("The signed gas quote changed materially; refresh before retrying")}}}const Yp="0xa9059cbb";function Us(e,t,n){return S.isNativeToken(e)?{to:n,value:t,data:"0x"}:{to:e,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[n,t]})}}function Fa(e,t,n){return{chainId:n,calls:[Us(e,t,S.getEscrowContractAddress(n))]}}function Zp(e,t,n,s){const r=t.source.chainId;return{chainId:r,calls:[...e.calls,Us(t.source.address,n,S.getEscrowContractAddress(r)),...s>0n?[Us(t.source.address,s,S.SPICE_GAS_FEE_RECIPIENT)]:[]]}}function fl(e,t){const n=e.amountOutMinimum-t;if(n<=0n)throw new Error("Amount is too small to cover fees. Increase the amount and retry.");return n}function ml(e,t,n){return e?.asset?._source==="wallet"&&e?.asset.chainId===n}function hl(e){return e.isNative||S.isNativeToken(e.address)?!0:!S.getTokenByAddress(e.address,e.chainId)}function gl(e,t,n,s){return t!=="user-transfer"||!n||e.length===0||e[0]?.to.toLowerCase()!==s.toLowerCase()||!e[0]?.data.startsWith(Yp)?{feeCall:null,remainingCalls:e}:{feeCall:e[0],remainingCalls:e.slice(1)}}async function tr(e,t,n,s){const r=await(t??Tr)({...n,requestTimestampMs:s});return r?[r,e]:[e]}function nr(e,t){const n=(e.tokenTransfers??[]).filter(s=>s.from==="escrow").map(s=>({token:S.normalizeNativeTokenAddress(s.token),recipient:s.to,amount:BigInt(s.amount)})).filter(s=>s.amount>0n);return t!==void 0&&n.length===1&&(n[0]={...n[0],amount:t}),n.length>0?n:void 0}function sr(e,t,n){return Kt(e,t,n,"ceil")}function wl(e){const t=e.selectedAsset?.asset;return e.isPayMode&&!!t&&t._source==="wallet"&&t.chainId!==e.resolvedChainId&&!!e.pivot}function Ta(e){const t=e.selectedAsset?.asset;return!e.isPayMode&&!!t&&t._source==="wallet"&&t.chainId!==e.resolvedChainId&&!!e.sourceSwap&&!!e.pivot}function Dr(e,t){if(t?.sourceSpendCap!==void 0&&e>t.sourceSpendCap)throw new Error("The source amount increased. Review the updated quote before submitting.");t?.onSourceSpend?.(e)}async function xl(e,t,n){let s;const r=await e({...t,buildActionCalls:async(o,i)=>{s=o;const a=Gp(await t.buildActionCalls(o,i),i);return n?.onActionCalls?.({amount:o,context:i,calls:a}),a}},n);if(s!==void 0){if(n?.minimumDestinationAmount!==void 0&&s<n.minimumDestinationAmount)throw new Error("The destination amount decreased. Review the refreshed quote before submitting.");n?.onDestinationAmount?.(s)}return r}const rr=(e,t)=>xl(Xp,e,t),Co=async(e,t)=>{const n=await xl(Jp,e,t),s=t?.actionContextOverride?.feeBreakdown,r=n[n.length-1];if(t?.actionContextOverride?.feePolicy||e.feeExecutionMode!=="user-transfer"||!s||!r)return n;const o=e.needsSwap&&e.resolvedTokenIn?e.resolvedTokenIn:e.destinationToken.address,[i]=er([r],e.resolvedChainId,o),a=yo(e.resolvedChainId,o,[{recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:s.spicenetFee},{recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:s.gasFee+(s.bridgeFee??0n)}]).calls,d=r.calls.filter(u=>!i.calls.includes(u));return d.length===a.length&&a.every(u=>d.some(m=>m.to.toLowerCase()===u.to.toLowerCase()&&m.value===u.value&&m.data===u.data))?n:[...n.slice(0,-1),{...i,calls:[...a,...i.calls]}]};async function Xp(e,t){const{currentPaymentAmount:n,destinationToken:s,embeddedWalletAddress:r,providerEmbeddedAddress:o,address:i,isNon7702:a,resolvedChainId:d,buildActionCalls:u,feeExecutionMode:m,buildSpicenetBatch:f,needsSwap:h,exactOutputSwap:y,resolvedTokenIn:g,requestTimestampMs:x}=e,w=t?.sourceAssetOverride?{asset:t.sourceAssetOverride}:e.selectedAsset,v=t?.fundingTokenOverride??g,C=ln(n,s.decimals),E=t?.actionAmountOverride??(e.feeOnlyAction?0n:C),k=!!e.feeOnlyAction&&(t?.fundingAmountOverride??0n)>0n,F=r||o||i;if(!F)throw new Error("Embedded wallet address is not available. Please sign in and try again.");const j={userAddress:e.recipient??F,executorAddress:F,beneficiary:e.recipient??F,outputRecipient:h?F:void 0,chainId:d,destinationToken:s.address,grossAmount:t?.fundingAmountOverride??C,netAmount:E,combinedFeeAmount:t?.actionContextOverride?.combinedFeeAmount,feeExecutionMode:m,feeBreakdown:t?.actionContextOverride?.feeBreakdown,...t?.actionContextOverride},I=()=>{h&&y&&t?.onSwap?.({...y,amountOutMinimum:y.amountOut},y.amountInMax)},b=await u(E,j),A={chainId:d,calls:b},R=!!w&&w.asset._source!=="wallet",B=ml(w??null,a,d),q=R||B&&!!w&&!hl(w.asset),O=(M,L)=>({token:S.normalizeNativeTokenAddress(M),from:"escrow",to:F,amount:L}),P=(M,L,T)=>B?[Fa(M,L,d),...T]:T;if(C===0n&&!k)return[A];const D=t?.combinedSourceGroupOverride===null?void 0:t?.combinedSourceGroupOverride??e.combinedSourceGroup;if(D&&(!h||v?.toLowerCase()===D.token.toLowerCase())){if(h&&!y)throw new Error("The action quote is unavailable.");I();const M=h?{...A,calls:[...y.calls,...b]}:A,L=t?.fundingAmountOverride??(h?y?.amountInMax??0n:C),T=Ea(D,L,"in-place",{quoteOnly:!0});if(t?.onSourceAllocation?.(T),Dr(nn(L,D.decimals,D.representativeDecimals),t),T.escrowWithdrawal===0n)return[M];const H={...M,tokenTransfers:[O(D.token,T.escrowWithdrawal)]};return tr(H,f,{userAddress:F,destinationChainId:d,deliveryToken:D.token,deliveryAmount:T.escrowWithdrawal,deliveryRecipient:F,deliveryTransfers:nr(H),sourceAsset:D.escrow},x)}if(w?.asset._source==="wallet"&&w.asset.chainId!==d&&!e.pivot)throw new Error("A current source-to-destination funding route is required");if(e.feeOnlyAction&&t?.fundingTokenOverride&&B)return Dr(t.fundingAmountOverride??0n,t),[A];if(wl(e)){if(h&&!y)throw new Error("Swap quote not available yet");const M=t?.fundingAmountOverride??(y?y.amountInMax:C),L=t?.sourceGasSkimOverride??0n,T=Kt(M,e.pivot.destination.decimals,e.pivot.source.decimals,"ceil"),H=T+L,V=e.sourceExactOutputSwap,te=V&&(t?.reuseQuotedSourceSwap||V.amountOut>=H)?V:e.resolveSourceExactOutputSwap?await e.resolveSourceExactOutputSwap(H):null;if(!te)throw new Error("Swap quote not available yet");Dr(te.amountInMax,t);const Z=w.asset;if(te.amountInMax>Z.balance)throw new Error(`Insufficient ${Z.symbol} for this payment. Required ${N.formatUnits(te.amountInMax,Z.decimals)} ${Z.symbol}; available ${N.formatUnits(Z.balance,Z.decimals)} ${Z.symbol}.`);const K=te.amountOut>=H?T:te.amountOut-L;if(K<=0n)throw new Error("Amount is too small to cover fees. Increase the amount and retry.");const Y={chainId:e.pivot.source.chainId,calls:[...te.calls,Us(e.pivot.source.address,K,S.getEscrowContractAddress(e.pivot.source.chainId)),...L>0n?[Us(e.pivot.source.address,L,S.SPICE_GAS_FEE_RECIPIENT)]:[]]};I();const J={chainId:d,calls:[...y?.calls??[],...b],tokenTransfers:[O(e.pivot.destination.address,M),...A.tokenTransfers??[]]},ge=await tr(J,f,{userAddress:F,destinationChainId:d,deliveryToken:e.pivot.destination.address,deliveryAmount:M,deliveryRecipient:F,deliveryTransfers:nr(J),sourceAsset:w.asset},x);return[Y,...ge]}if(w){const M=t?.fundingAmountOverride??y?.amountInMax??C;Dr(sr(M,await es(w.asset,v??w.asset.address,d,s),w.asset.decimals),t)}if(h&&y){const M=v??Mn(w.asset,d)??w.asset.address,L=t?.fundingAmountOverride??y.amountInMax,T=q?[O(M,L)]:[];I();const H={chainId:d,calls:[...y.calls,...b],tokenTransfers:[...T,...A.tokenTransfers??[]]};if(!q)return[H];const V=await tr(H,f,{userAddress:F,destinationChainId:d,deliveryToken:M,deliveryAmount:L,deliveryRecipient:F,deliveryTransfers:nr(H),sourceAsset:w.asset},x);return P(M,L,V)}if(q){const M=v??Mn(w.asset,d)??s.address;if(B&&!e.feeOnlyAction&&M.toLowerCase()===s.address.toLowerCase())return[A];const L=t?.fundingAmountOverride??C,T={...A,tokenTransfers:[O(M,L),...A.tokenTransfers??[]]},H=await tr(T,f,{userAddress:F,destinationChainId:d,deliveryToken:M,deliveryAmount:L,deliveryRecipient:F,deliveryTransfers:nr(T),sourceAsset:w.asset},x);return P(M,L,H)}return[A]}async function Jp(e,t){const{selectedAsset:n,embeddedWalletAddress:s,recipient:r,resolvedChainId:o,destinationToken:i,buildActionCalls:a,feeExecutionMode:d,buildSpicenetBatch:u,isPayMode:m,isNon7702:f,needsSwap:h,resolvedSwap:y,quoteAmountOut:g,resolvedTokenIn:x,requestTimestampMs:w}=e;if(!n?.asset||!s)return[];const v=r??s;if(!v)return[];const C=Ta(e);let E=e.sourceSwap,k=ln(n.amount,n.asset.decimals),F=C?e.sourceSwap.amountOutMinimum:null;if(C&&e.isFeeInclusiveInput&&(F=fl(e.sourceSwap,t?.sourceGasSkimOverride??0n)),C&&!e.isFeeInclusiveInput&&(t?.fundingAmountOverride!==void 0||(t?.sourceGasSkimOverride??0n)>0n)){F=t?.fundingAmountOverride!==void 0?sr(t.fundingAmountOverride,e.pivot.destination.decimals,e.pivot.source.decimals):e.sourceSwap.amountOutMinimum;const we=F+(t?.sourceGasSkimOverride??0n);if(!e.resolveSourceExactOutputSwap)throw new Error("The source quote cannot include fees yet.");const ve=await e.resolveSourceExactOutputSwap(we);if(ve.amountOut<we)throw new Error("The source quote does not cover the accepted funding amount.");k=ve.amountInMax,E={...ve,amountOutMinimum:ve.amountOut}}const j=C?e.pivot.destination.address:x??Mn(n.asset,o)??i.address,I=C?e.pivot.destination.decimals:await es(n.asset,j,o,i),b=t?.fundingAmountOverride??t?.actionAmountOverride??(C?Kt(F,e.pivot.source.decimals,I,"floor"):nn(ln(n.amount,n.asset.decimals),n.asset.decimals,I)),A=t?.fundingAmountOverride??b,R=t?.combinedSourceGroupOverride===null?void 0:t?.combinedSourceGroupOverride??e.combinedSourceGroup,B=R&&!C?Ea(R,A,"escrow",{quoteOnly:!0}):void 0;B&&t?.onSourceAllocation?.(B);const q=B?.walletDeposit??t?.sourceFundingAmountOverride??sr(b,I,n.asset.decimals);Dr(B&&R?nn(A,R.decimals,R.representativeDecimals):C?k:q,t);const O=t?.deliveryAmountOverride??(d==="user-transfer"?A:t?.actionContextOverride?.netAmount??A),P=t?.withdrawalAmountOverride??O,D=t?.actionAmountOverride??t?.actionContextOverride?.netAmount??b;let M=y;if(h&&!m&&(t?.actionContextOverride?.netAmount!==void 0||C&&(t?.sourceGasSkimOverride??0n)>0n&&!t?.reuseQuotedSourceSwap)){if(!e.resolveInputSwap)throw new Error("Swap quote cannot be refreshed for the amount after fees.");const we=t?.actionContextOverride?.netAmount??D;(!M||e.swapInputAmount!==we)&&(M=await e.resolveInputSwap(we,y??void 0))}const L=M?.amountOutMinimum??g,T={userAddress:v,executorAddress:s,beneficiary:v,outputRecipient:h?s:void 0,chainId:o,destinationToken:i.address,feeToken:d==="user-transfer"&&h&&x?x:i.address,grossAmount:A,netAmount:D,combinedFeeAmount:t?.actionContextOverride?.combinedFeeAmount,feeExecutionMode:d,feeBreakdown:t?.actionContextOverride?.feeBreakdown,...t?.actionContextOverride},H=()=>a(D,T),V=n.asset?._source==="wallet";if(!m&&V&&n.asset.chainId===o&&hl(n.asset)){if(h){if(!x)throw new Error("Swap input token could not be resolved");if(!M||L===null)throw new Error("Swap quote not available yet")}if(h&&M&&L){t?.onSwap?.(M,t?.actionContextOverride?.netAmount??e.swapInputAmount??D);const we=await a(t?.actionAmountOverride??L,{...T,netAmount:t?.actionAmountOverride??L}),{feeCall:ve,remainingCalls:ne}=gl(we,d,h,T.feeToken);return[{chainId:o,calls:[...ve?[ve]:[],...M.calls,...ne]}]}return[{chainId:o,calls:await H()}]}if(!m&&V&&n.asset.chainId!==o&&!C)throw new Error("A current source-to-destination funding route is required");const te=n.asset._source!=="wallet",Z=ml(n,f,o);if(!(te||Z||C))return[{chainId:o,calls:await H()}];const K=C?Zp(E,e.pivot,F,t?.sourceGasSkimOverride??0n):B&&R?B.walletDeposit>0n?Fa(R.token,B.walletDeposit,o):null:Z?Fa(x??S.normalizeNativeTokenAddress(n.asset.address),q,o):null,Y=(we,ve)=>({token:S.normalizeNativeTokenAddress(we),from:"escrow",to:s,amount:ve});if(h){if(!x)throw new Error("Swap input token could not be resolved");if(!M||L===null)throw new Error("Swap quote not available yet")}if(h&&M&&L&&x){t?.onSwap?.(M,t?.actionContextOverride?.netAmount??e.swapInputAmount??D);const we=await a(t?.actionAmountOverride??L,{...T,netAmount:t?.actionAmountOverride??L}),{feeCall:ve,remainingCalls:ne}=gl(we,d,h,T.feeToken),_={chainId:o,calls:[...ve?[ve]:[],...M.calls,...ne],tokenTransfers:[Y(x,O)]},le=await tr(_,u,{userAddress:s,destinationChainId:o,deliveryToken:x,deliveryAmount:O,withdrawalAmount:P,deliveryRecipient:s,deliveryTransfers:nr(_,P),sourceAsset:n.asset},w);return K?[K,...le]:le}const J=x??Mn(n.asset,o)??i.address,ge={chainId:o,calls:await H(),tokenTransfers:[Y(J,O)]},pe=await tr(ge,u,{userAddress:s,destinationChainId:o,deliveryToken:J,deliveryAmount:O,withdrawalAmount:P,deliveryRecipient:s,deliveryTransfers:nr(ge,P),sourceAsset:n.asset},w);return K?[K,...pe]:pe}async function $p(e,t,n,s,r){let o=e;for(let i=0;i<4;i++){const a=await t(o),d=await s(a,n,o,r),u=l.getSingleNetOutput(d);if(u===null||u>=e)return o;const m=o-u,f=e+m;if(f<=o)return o;o=f}return o}function _p(e){return{...e,resolve:async(t,n,s)=>{const r=await e.resolve(t,n,s),o=r?.calls[0]?.to;return!r||!o||S.isNativeToken(t.tokenIn)?r:{...r,calls:[{to:t.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[o,r.amountInMax]})},...r.calls]}}}}function Nr(e){const t=(e?.customVenues??[]).map(s=>iu(_p(s)));async function n(s,r,o){const i=t.filter(u=>u.chainIds.includes(r));if(i.length===0)throw new l.SpiceflowError("NO_SWAP_ROUTE",`No exact-output venue supports chain ${r}`,{chainId:r,tokenIn:s.tokenIn,tokenOut:s.tokenOut});const a=(await Promise.allSettled(i.map(async u=>({venue:u,quote:await u.resolve(s,r,o)})))).filter(u=>u.status==="fulfilled").map(u=>u.value).filter(u=>u.quote!==null);if(a.length===0)throw new l.SpiceflowError("NO_SWAP_ROUTE",`All aggregators failed for ${s.tokenIn} \u2192 ${s.tokenOut} on chain ${r}`,{chainId:r,tokenIn:s.tokenIn,tokenOut:s.tokenOut,amountOut:s.amountOut.toString()});const d=a.find(u=>u.venue.preferred);return d?d.quote:(a.sort((u,m)=>u.quote.amountIn<m.quote.amountIn?-1:u.quote.amountIn>m.quote.amountIn?1:0),a[0].quote)}return{getQuote:n,venues:t}}function yl(e,t,n){if(e._source==="wallet")return e.chainId===t?e.address:null;const s=Ks(e,t);return s.find(r=>r.toLowerCase()===n.toLowerCase())??s[0]??null}async function Ra(e,t,n,s){const r=S.hashChainBatches(s),o=await l.relayerService.estimateBatchGas({user:t,outputToken:n,requireSimulation:!0,includePlatformFee:!0,signal:e.signal,chainBatches:s.map((i,a)=>({...i,hash:r[a].hash}))});if(!o.simulationVerified||o.gasQuoteSource!=="estimated"||o.platformFee===void 0||o.gasFee<=0n)throw new Error("Fee funding requires verified gas and platform pricing");return o}async function Mr(e,t){const n=e.selectedAsset?.asset,s=!t&&!!e.actionProceeds&&e.actionProceeds.token.toLowerCase()!==e.destinationToken.address.toLowerCase(),r=!!t||s,o=e.embeddedWalletAddress||e.providerEmbeddedAddress;if(!o||!r&&(!n||n._source!=="spice"&&!(n._source==="wallet"&&n.chainId===e.resolvedChainId)))throw new Error("A local embedded or Spice balance is required for fee conversion");const i=t?t.token:s?e.actionProceeds.token:yl(n,e.resolvedChainId,e.destinationToken.address);if(!i)throw new Error("This receipt has no registered destination withdrawal token");const a=S.getTokenByAddress(i,e.resolvedChainId)?.decimals??(S.isNativeToken(i)?18:r?await l.getClientForChain(e.resolvedChainId).readContract({address:i,abi:N.erc20Abi,functionName:"decimals"}):n?._source==="wallet"?n.decimals:void 0);if(a===void 0)throw new Error("Fee funding token metadata is unavailable");const d=e.destinationToken.address;if(e.actionProceeds&&!s&&e.actionProceeds.token.toLowerCase()!==d.toLowerCase())throw new Error("Action proceeds must use the destination fee token");const u=t?t.amount:e.actionProceeds?await e.actionProceeds.resolve(e.signal):0n;if(u<0n||e.signal?.aborted)throw new Error("Action proceeds quote was cancelled or invalid");const m=Nr({customVenues:[...e.resolveExactOutputSwap?[{name:"consumer-exact-output",chainIds:[e.resolvedChainId],preferred:!0,resolve:e.resolveExactOutputSwap}]:[],...js(e.liquidityVenues).output]}),f=y=>Ra(e,o,d,y);let h=await f(await e.buildPayChainBatches({fundingAmountOverride:0n}));for(let y=0;y<8;y++){const g=h.gasFee+h.platformFee,x=r?0n:u<g?u:g,w=g-x,v=w>0n?(w*110n+99n)/100n+2n:0n,C=v>0n?await m.getQuote({tokenIn:i,tokenOut:d,amountOut:v,maxSlippage:e.maxSlippage},e.resolvedChainId,o):null;if(e.signal?.aborted)throw new Error("Fee conversion quote was cancelled");if(C&&(C.amountOut!==v||C.amountInMax<=0n||C.amountInMax<C.amountIn||!C.calls.length))throw new Error("Invalid exact-output fee conversion quote");const E=C?.amountInMax??0n,k=r?0n:sr(E,a,n.decimals);if(r&&E>u)throw new vs(E,u);if(!r&&k>n.balance)throw new vs(k,n.balance);let F,j=ds(await e.buildPayChainBatches({fundingAmountOverride:r?0n:E,...r?{}:{fundingTokenOverride:i},...t?{actionAmountOverride:t.amount-E}:{},...s?{actionOutputFee:E}:{},onActionCalls:b=>{F=b}}),o,void 0,{expiresAt:e.expiresAt});if(C){const b=j.length-1;j=j.map((A,R)=>R===b?{...A,calls:[...A.calls,...C.calls]}:A)}j=Ca(j,o,d,h.gasFee,h.platformFee);const I=await f(j).catch(b=>{throw C&&b instanceof l.SpiceflowError&&b.code==="RELAYER_ERROR"&&b.context.endpoint==="/actions/gas/estimate"&&b.context.httpStatus===400&&/^Execution reverted\b/i.test(b.message)?new l.SpiceflowError("NO_SWAP_ROUTE",b.message,b.context):b});if(I.gasFee<=h.gasFee&&(h.gasFee-I.gasFee)*100n<=I.gasFee*15n&&I.platformFee===h.platformFee){const b={tokenIn:i,tokenOut:d,amountInMax:E,amountOut:v,sourceAmountMax:k,...s?{fromProceeds:!0}:{},...t?{fromInput:!0}:{}};return{feeEstimate:null,preview:{symbol:e.destinationToken.symbol,decimals:e.destinationToken.decimals,grossAmount:r?0n:v,netAmount:0n,gasFee:h.gasFee,spicenetFee:h.platformFee,totalFee:g,gasQuoteSource:"estimated"},grossFundingAmount:r?0n:E,proceedsAvailable:u,proceedsUsed:r?g:x,fundingConversion:b,fundingBatches:j,sourceSpendCap:k,destinationAmount:0n,actionDefinition:F}}h=I}throw new Error("Fee conversion pricing did not converge")}const ko=["input","proceeds","balance"];function bl(e){if(e.reserve&&e.reserve.amount<0n)throw new Error("Fee funding reserve cannot be negative");if(e.reserves?.some(a=>a.amount<0n))throw new Error("Fee funding reserve cannot be negative");const t=a=>l.addressesEqual(a,e.feeToken),n=(a,d)=>Number(a.swap)-Number(d.swap),s={input:[],proceeds:[],balance:[]};for(const a of e.inputs??[])a.amount>0n&&s.input.push({kind:"input",...a,swap:!t(a.token)});s.input.sort(n);for(const a of Array.isArray(e.proceeds)?e.proceeds:e.proceeds?[e.proceeds]:[])a.amount>0n&&s.proceeds.push({kind:"proceeds",...a,swap:!t(a.token)});s.proceeds.sort(n);const r=e.balances.filter(a=>a._source==="wallet"&&a.chainId===e.chainId&&a.location!=="external"),o=e.balances.filter(a=>a._source==="spice"),i=a=>{const d=[];for(const u of a){const m=[...e.reserves??[],...e.reserve?[e.reserve]:[]].filter(g=>xe(u)===xe(g.asset)).reduce((g,x)=>x.amount>g?x.amount:g,0n),f=u.balance-m;if(f<=0n)continue;const h=m>0n?{...u,balance:f,balanceFormatted:Number(N.formatUnits(f,u.decimals)),balanceUsd:u.balanceUsd*Number(f)/Number(u.balance)}:u,y=yl(h,e.chainId,e.feeToken);y&&(e.inputs?.some(g=>l.addressesEqual(g.token,y)&&![...e.reserves??[],...e.reserve?[e.reserve]:[]].some(x=>l.addressesEqual(x.asset.address,g.token)))||d.push({kind:"balance",token:y,amount:h.balance,asset:h,...m>0n?{reservedAmount:m}:{},swap:!t(y)}))}return d.sort((u,m)=>n(u,m)||m.asset.balanceUsd-u.asset.balanceUsd)};return s.balance=[...i(r),...i(o)],(e.order??ko).flatMap(a=>s[a])}function ef(e){return e instanceof vs||e instanceof l.SpiceflowError&&e.code==="NO_SWAP_ROUTE"}async function Ba(e,t){const n=e.embeddedWalletAddress||e.providerEmbeddedAddress;if(!n||!e.ready||!e.authenticated)return null;const s=e.destinationToken.address;let r;const o=()=>r??(r=(async()=>{const u=await Ra(e,n,s,await e.buildPayChainBatches({fundingAmountOverride:0n}));return{feeEstimate:null,preview:{symbol:e.destinationToken.symbol,decimals:e.destinationToken.decimals,gasFee:u.gasFee,spicenetFee:u.platformFee,bridgeFee:0n,totalFee:u.gasFee+u.platformFee,grossAmount:0n,netAmount:0n,gasQuoteSource:"estimated"}}})()),i=(u,m)=>e.buildPayChainBatches({...m,fundingAmountOverride:u}),a=(u,m,f=!1)=>il({proceeds:{token:s,resolve:async()=>u},owner:n,token:s,signal:e.signal,baseline:o,buildBatches:(h,y)=>i(h,{...y,actionOutputFee:f?y?.actionOutputFee:void 0}),fundShortfall:!1,expiresAt:e.expiresAt,actionAmountFor:m}),d=async u=>{if(u.kind==="input")return u.swap?Mr({...e,actionProceeds:void 0},u):a(u.amount,g=>u.amount-g);if(u.kind==="proceeds"){const g={token:u.token,resolve:async()=>u.amount};return u.swap?Mr({...e,actionProceeds:g}):a(u.amount,void 0,!0)}const m=u.asset;if(m._source==="wallet"&&!u.swap)return a(m.balance);let f=!u.swap&&m._source==="spice"?e.getCombinedSourceGroup?.(m):void 0;if(f){const g=[xe(f.wallet),xe(f.escrow)],x=[...e.feeFundingReserves??[],...e.feeFundingReserve?[e.feeFundingReserve]:[]].filter(w=>g.includes(xe(w.asset)));x.length&&(f=e.getCombinedSourceGroup?.(m,x))}const h={...e,selectedAsset:{asset:m,amount:"0"},combinedSourceGroup:f,resolvedTokenIn:u.token,actionInput:void 0,actionProceeds:void 0,buildPayChainBatches:g=>e.buildPayChainBatches({...g,sourceAssetOverride:m,combinedSourceGroupOverride:f??null,fundingTokenOverride:g?.fundingTokenOverride??u.token})};if(u.swap)return Mr(h);const y=await t(h);if(y&&(y.sourceSpendCap??0n)>(f?.availableBalance??m.balance))throw new vs(y.sourceSpendCap,f?.availableBalance??m.balance);return y};for(const u of e.feeFunding??ko){const m=u!=="proceeds"?[]:e.actionProceedsCandidates?await e.actionProceedsCandidates(e.signal):e.actionProceeds?[{token:e.actionProceeds.token,amount:await e.actionProceeds.resolve(e.signal)}]:[];if(e.signal?.aborted)throw new Error("Fee funding quote was cancelled");if(m.some(h=>h.amount<0n))throw new Error("Action proceeds cannot be negative");const f=bl({feeToken:s,chainId:e.resolvedChainId,inputs:e.actionInput,proceeds:[...m.reduce((h,y)=>{const g=y.token.toLowerCase(),x=h.get(g);return h.set(g,{token:y.token,amount:(x?.amount??0n)+y.amount}),h},new Map).values()],balances:e.feeFundingBalances??[],order:[u],reserve:e.feeFundingReserve,reserves:e.feeFundingReserves});for(const h of f)try{const y=await d(h);if(!y)continue;const{swap:g,...x}=h;return{...y,fundingSource:x}}catch(y){if(e.signal?.aborted||!ef(y))throw y}}if(!e.isNon7702&&e.allowRelayerFeeFallback!==!1){if(e.feeFundingError)throw new Error(e.feeFundingError);let u;const m=await e.buildPayChainBatches({fundingAmountOverride:0n,onActionCalls:f=>{u=f}});if(m.every(f=>f.domain!=="spicenet"&&!f.tokenTransfers?.length)){const f=await Ra(e,n,s,m);if(e.signal?.aborted)throw new Error("Fee funding quote was cancelled");return{feeEstimate:null,actionDefinition:u,batches:m,sourceSpendCap:0n,grossFundingAmount:0n,preview:{feePayer:"relayer",symbol:e.destinationToken.symbol,decimals:e.destinationToken.decimals,gasFee:f.gasFee,spicenetFee:f.platformFee,bridgeFee:0n,totalFee:f.gasFee+f.platformFee,grossAmount:0n,netAmount:0n,gasQuoteSource:"estimated"}}}}throw new Error(`No available balance can cover this action's ${e.destinationToken.symbol} execution cost`)}async function vl(e,t,n,s=!1){const r=e.selectedAsset,o=e.embeddedWalletAddress||e.providerEmbeddedAddress;if(!r||!o||!e.ready||!e.authenticated||e.isQuoting)return null;if(!e.combinedSourceGroup&&r.asset._source!=="wallet"||r.asset.chainId!==e.resolvedChainId||!Ys(r.asset)&&r.asset.owner&&!l.addressesEqual(r.asset.owner,o))throw new Error("Funded fee hierarchy requires principal on the action chain in the executing wallet.");if(s&&(e.isPayMode||!e.isFeeInclusiveInput||t.recipient&&!l.addressesEqual(t.recipient,o)))throw new Error("Output-funded actions require an input-inclusive amount left in the executing wallet.");if(e.isPayMode&&e.needsSwap&&!e.exactOutputSwap)return null;const i=e.isPayMode?ln(e.currentPaymentAmount,e.destinationToken.decimals):void 0;if(e.isPayMode&&e.needsSwap&&e.exactOutputSwap.amountOut!==i)throw new Error("Wait for the payment quote for the current amount.");const a=S.getTokensForChain(e.resolvedChainId).find(F=>F.equivalenceGroup==="USDC");if(!a)throw new Error("Configure the execution fee token for this chain.");const d={...a,address:a.address,chainId:e.resolvedChainId},u=i!==void 0?e.needsSwap?e.exactOutputSwap.amountInMax:i:ln(r.amount,r.asset.decimals);if(u<=0n||u>(e.combinedSourceGroup?.availableBalance??r.asset.balance))throw new Error("Enter an amount within the available balance.");if(!e.isPayMode&&e.needsSwap&&t.swapInputAmount!=null&&t.swapInputAmount!==u)throw new Error("Wait for the action quote for the current amount.");const m=i??(e.needsSwap?t.resolvedSwap?.amountOutMinimum??0n:u);let f=t.resolvedSwap??void 0,h=u,y=m;const g=e.combinedSourceGroup?Ea(e.combinedSourceGroup,u,"in-place"):void 0,x={...e,feeOnlyAction:!0,selectedAsset:null,isPayMode:!0,isFeeInclusiveInput:!1,parsedAmount:0,currentPaymentAmount:"0",destinationToken:d,resolvedTokenIn:d.address,executionTokenAddress:d.address,needsSwap:!1,resolvedSwap:null,isDirect:!0,actionInput:!e.isPayMode&&e.isFeeInclusiveInput?[{token:r.asset.address,amount:u}]:void 0,actionProceeds:s?{token:e.destinationToken.address,resolve:async()=>m>0n?m-1n:0n}:e.actionProceeds,feeFundingBalances:e.feeFundingBalances?.filter(F=>!F.balanceError&&!(e.feeFundingReserve&&xe(e.feeFundingReserve.asset)!==xe(r.asset)&&xe(F)===xe(e.feeFundingReserve.asset))&&!Ys(F)&&(!F.owner||l.addressesEqual(F.owner,o))),feeFundingReserves:g?.positions.map(F=>({asset:F.asset,amount:F.amount})),feeFundingReserve:g?void 0:{asset:r.asset,amount:e.feeFundingReserve&&xe(e.feeFundingReserve.asset)===xe(r.asset)&&e.feeFundingReserve.amount>u?e.feeFundingReserve.amount:u},buildPayChainBatches:async F=>{const j=F?.actionAmountOverride??u;if(j<=0n)throw new vs(u+1n,u);const I=!e.isPayMode&&e.needsSwap?j===u?t.resolvedSwap:await t.resolveInputSwap?.(j,t.resolvedSwap??void 0):null,b=e.needsSwap?e.isPayMode?e.exactOutputSwap:I:null;if(e.needsSwap&&!b)throw new Error("The action quote is unavailable.");f=I??(e.isPayMode&&b?{...b,amountOutMinimum:b.amountOut}:void 0),h=j;const A=i??f?.amountOutMinimum??j,R=s?F?.actionOutputFee??0n:0n;if(R<0n)throw new Error("Output fee cannot be negative");if(R>=A)throw new vs(R+1n,A);y=A-R;const B={userAddress:t.recipient??o,executorAddress:o,beneficiary:t.recipient??o,outputRecipient:o,chainId:e.resolvedChainId,destinationToken:e.destinationToken.address,grossAmount:m,netAmount:y,feeToken:d.address,feeExecutionMode:"backend-transfer"},q=await t.buildActionCalls(y,B),O={amount:y,context:B,calls:q},P=[...b?.calls??[],...q];let D=await rr({...t,selectedAsset:null,combinedSourceGroup:void 0,feeOnlyAction:!0,isPayMode:!0,isFeeInclusiveInput:!1,currentPaymentAmount:"0",destinationToken:d,resolvedTokenIn:d.address,needsSwap:!1,resolvedSwap:null,exactOutputSwap:null,quoteAmountOut:null,feeExecutionMode:"backend-transfer",buildActionCalls:()=>P},{...F,onActionCalls:()=>F?.onActionCalls?.(O)});if(g?.escrowWithdrawal){const M=[...D].reverse().findIndex(T=>T.domain!=="spicenet"&&T.chainId===e.resolvedChainId),L=M<0?-1:D.length-M-1;if(L<0)throw new Error("The action quote is unavailable.");D[L]={...D[L],tokenTransfers:[...D[L].tokenTransfers??[],{token:g.token,from:"escrow",to:o,amount:g.escrowWithdrawal}]},D=ds(D,o,void 0,{payoutAlreadyGross:!0,requestTimestampMs:t.requestTimestampMs,expiresAt:e.expiresAt})}return D}},w=await Ba(x,n);if(!w)return null;const v=s&&w.fundingSource?.kind==="proceeds"?w.fundingConversion?.amountInMax??w.proceedsUsed??0n:0n;if(y<=0n)throw new Error("Not enough action output remains after execution costs.");let C=g;const E=C&&w.sourceAllocation&&C.positions.every(F=>w.sourceAllocation.positions.some(j=>j.positionId===F.positionId)),k=w.sourceAllocation&&!E?w.sourceAllocation:void 0;if(C){const F=w.sourceAllocation?.positions??[],j=w.fundingSource?.kind==="balance"&&w.fundingSource.asset&&xe(w.fundingSource.asset)===xe(e.combinedSourceGroup.wallet)?w.fundingConversion?.amountInMax??w.proceedsUsed??0n:0n,I=F.find(A=>A.positionId===xe(e.combinedSourceGroup.wallet))?.amount??j,b=F.find(A=>A.positionId===xe(e.combinedSourceGroup.escrow))?.amount??(w.fundingSource?.kind==="balance"&&w.fundingSource.asset&&xe(w.fundingSource.asset)===xe(e.combinedSourceGroup.escrow)?w.sourceSpendCap??0n:0n);C={...C,grossAmount:u+I+b,walletInPlace:C.walletInPlace+I,escrowWithdrawal:C.escrowWithdrawal+b,positions:C.positions.map(A=>({...A,amount:A.amount+(A.asset.location==="embedded"?I:b),reservedAmount:0n}))}}return{...w,preview:l.addressesEqual(e.destinationToken.address,d.address)?{...w.preview,netAmount:y,grossAmount:y+(w.preview.feePayer==="relayer"?0n:w.preview.gasFee+w.preview.spicenetFee+(w.preview.bridgeFee??0n))}:w.preview,fundedFeeToken:d,batches:w.fundingBatches??w.batches,destinationSwap:f,swapInputAmount:h,destinationAmount:y,actionOutputCredits:ho(e.resolvedChainId,e.destinationToken.address,f&&{...f,amountOutMinimum:f.amountOutMinimum-v}),sourceAllocation:C,feeSourceAllocation:k,sourceSpendCap:C?.grossAmount??u+(w.fundingSource?.kind==="balance"&&w.fundingSource.asset&&xe(w.fundingSource.asset)===xe(r.asset)?w.fundingConversion?.amountInMax??w.proceedsUsed??0n:0n)}}function Oa(e,t){const n=new Map,s=(i,a,d)=>{if(d<0n)throw new Error("Accepted wallet funding must not be negative");if(!d)return;if(!Number.isInteger(i)||i<=0)throw new Error("Accepted wallet funding chain is unavailable");a=S.normalizeNativeTokenAddress(a);const u=`${i}:${a.toLowerCase()}`,m=n.get(u);n.set(u,{chainId:i,token:a,amount:(m?.amount??0n)+d})},r=[e.sourceAllocation,e.feeSourceAllocation];if(e.fundingPlan)for(const i of e.fundingPlan.sources)i.asset.location==="embedded"&&s(i.chainId,i.token,i.sourceSpendCap);else{if(e.sourceAllocation)for(const a of e.sourceAllocation.positions)a.asset.location==="embedded"&&s(e.sourceAllocation.chainId,e.sourceAllocation.token,a.amount);else t?.asset._source==="wallet"&&e.sourceSpendCap!==void 0&&s(t.asset.chainId,t.asset.address,e.sourceSpendCap);if(e.feeSourceAllocation)for(const a of e.feeSourceAllocation.positions)a.asset.location==="embedded"&&s(e.feeSourceAllocation.chainId,e.feeSourceAllocation.token,a.amount);const i=e.fundingSource;if(i?.kind==="balance"&&i.asset?._source==="wallet"){const a=xe(i.asset),d=r.some(m=>m?.positions.some(f=>f.positionId===a)),u=!!e.fundedFeeToken&&!!t&&a===xe(t.asset);!d&&!u&&s(i.asset.chainId,i.token,e.fundingConversion?.amountInMax??e.proceedsUsed??0n)}if(i?.kind==="input"&&!e.fundedFeeToken){const a=e.batches??e.fundingBatches??[],d=e.actionDefinition?.context.chainId??[...a].reverse().find(u=>u.domain!=="spicenet")?.chainId;s(d??0,i.token,i.amount)}}const o=e.externalGasReserve?.fundingSource;return o&&s(o.asset.chainId,o.token,o.amount),[...n.values()]}async function tf(e,t){const n=e.externalGasRecipient,s=e.embeddedWalletAddress||e.providerEmbeddedAddress,r=e.resolvedChainId,o=t.batches,i=o.map(v=>v.chainId).lastIndexOf(r);if(i<0)throw new Error("Destination gas quote is unavailable.");const[a,d]=await Promise.all([l.relayerService.estimateBatchGas({user:s,outputToken:S.ZERO_ADDRESS,chainBatches:o,stepIndex:i,signal:e.signal}),l.getClientForChain(r).getBalance({address:n})]);if(e.signal?.aborted)throw new Error("Fee estimation cancelled");if(a.gasQuoteSource!=="estimated"||a.gasFee<=0n)throw new Error("A native gas quote is required for the external wallet.");const u=o[i].calls.reduce((v,C)=>l.addressesEqual(C.to,n)&&C.data==="0x"?v+C.value:v,0n),m=3n*a.gasFee,f=await e.externalGasCalls?.(t)??[],h=f.reduce((v,C)=>v+C.value,0n),y=(3n+BigInt(f.length))*m+h,g=d+u<y?y-d-u:0n,x={chainId:r,recipient:n,balance:d,incoming:u,transactionGas:m,nativeAmount:g,currentTransactions:f.length,currentValue:h,feeAmount:0n,calls:[]};if(g===0n)return x;const w=e.executionTokenAddress;if(S.isNativeToken(w))x.feeAmount=g;else{const v=Nr({customVenues:[...e.resolveExactOutputSwap?[{name:"consumer-exact-output",chainIds:[r],preferred:!0,resolve:e.resolveExactOutputSwap}]:[],...js(e.liquidityVenues).output]}),C=k=>v.getQuote({tokenIn:k,tokenOut:S.ZERO_ADDRESS,amountOut:g,maxSlippage:e.maxSlippage},r,s),E=k=>{if(k.amountOut!==g||k.amountInMax<=0n||!k.calls.length)throw new Error("The external gas purchase could not be quoted.");if(e.signal?.aborted)throw new Error("Fee estimation cancelled");return k};try{const k=E(await C(w));x.feeAmount=k.amountInMax,x.calls=k.calls}catch(k){if(e.signal?.aborted||!(k instanceof l.SpiceflowError)||k.code!=="NO_SWAP_ROUTE")throw k;const F=Oa(t,e.selectedAsset),j=(e.feeFundingBalances??[]).filter(b=>b._source==="wallet"&&b.chainId===r&&!Ys(b)&&b.location!=="rollup"&&!b.balanceError&&!b.balanceStatus&&(!b.owner||l.addressesEqual(b.owner,s))&&!l.addressesEqual(b.address,w)),I=bl({feeToken:S.ZERO_ADDRESS,chainId:r,balances:j,order:["balance"],reserves:[...e.feeFundingReserves??[],...e.feeFundingReserve?[e.feeFundingReserve]:[],...j.flatMap(b=>F.filter(A=>A.chainId===r&&l.addressesEqual(A.token,S.normalizeNativeTokenAddress(b.address))).map(A=>({asset:b,amount:A.amount})))]});for(const b of I){if(e.signal?.aborted)throw new Error("Fee estimation cancelled");try{const A=S.isNativeToken(b.token)?void 0:E(await C(b.token)),R=A?.amountInMax??g;if(R>b.amount)continue;const B=j.find(q=>xe(q)===xe(b.asset));x.fundingSource={asset:B,token:b.token,amount:R},x.calls=A?.calls??[];break}catch(A){if(e.signal?.aborted||!(A instanceof l.SpiceflowError)||A.code!=="NO_SWAP_ROUTE")throw A}}if(!x.fundingSource)throw k}}return x.calls=[...x.calls,{to:n,value:g,data:"0x"}],x}function Io(e,t){if(!t?.nativeAmount)return e;const n=e.map(s=>s.chainId).lastIndexOf(t.chainId);if(n<0)throw new Error("The gas reserve destination changed.");return e.map((s,r)=>r===n?{...s,calls:[...s.calls,...t.calls]}:s)}function Cl(e,t){if(e&&e.nativeAmount>0n){const n=t.filter(r=>r.chainId===e.chainId).slice(-1)[0],s=n?.calls.slice(-e.calls.length);if(!s||s.length!==e.calls.length||s.some((r,o)=>{const i=e.calls[o];return!l.addressesEqual(r.to,i.to)||r.value!==i.value||r.data!==i.data}))throw new Error("The external gas purchase changed. Refresh the quote before submitting.");if(n.calls.slice(0,-e.calls.length).reduce((r,o)=>l.addressesEqual(o.to,e.recipient)&&o.data==="0x"?r+o.value:r,0n)<e.incoming)throw new Error("The native result changed. Refresh the gas reserve quote before submitting.")}}async function kl(e,t){if(!e)return;t&&Cl(e,t);const n=await l.getClientForChain(e.chainId).getBalance({address:e.recipient});if(e.nativeAmount>0n?n!==e.balance:n+e.incoming<(3n+BigInt(e.currentTransactions))*e.transactionGas+e.currentValue)throw new Error("The external wallet gas balance changed. Refresh the quote before submitting.")}async function nf(e){const t=e.selectedAsset.asset;if(t.chainId!==e.destinationToken.chainId||!l.addressesEqual(S.normalizeNativeTokenAddress(t.address),S.normalizeNativeTokenAddress(e.destinationToken.address)))throw new Error("Direct execution requires the destination token on its own chain.");if(t.decimals!==e.destinationToken.decimals)throw new Error("Source and destination token decimals do not match.");const n=ln(e.paymentAmount??e.selectedAsset.amount,t.decimals);if(n<=0n)throw new Error("Enter a positive action amount.");const s={userAddress:e.beneficiary??e.account,executorAddress:e.account,beneficiary:e.beneficiary??e.account,chainId:e.destinationToken.chainId,destinationToken:e.destinationToken.address,feeToken:t.address,grossAmount:n,netAmount:n,combinedFeeAmount:0n,feeExecutionMode:e.feeExecutionMode,feeBreakdown:{spicenetFee:0n,gasFee:0n,bridgeFee:0n}},r=await e.buildActionCalls(n,s);if(!r.length)throw new Error("No action calls configured.");if(S.isNativeToken(t.address)&&r.reduce((o,i)=>o+i.value,0n)>n)throw new Error("The native action exceeds the accepted source amount.");return{actionDefinition:{amount:n,context:s,calls:r},actionContext:s,batches:[{chainId:s.chainId,calls:r}],fundingAmount:n,sourceSpendCap:n,destinationAmount:n,feeEstimate:null,preview:{symbol:t.symbol,decimals:t.decimals,grossAmount:n,netAmount:n,totalFee:0n,gasFee:0n,spicenetFee:0n,bridgeFee:0n,gasQuoteSource:"static_zero"}}}async function Il(e){const[t]=await e.buildSupplyChainBatches({sourceGasSkimOverride:1n,reuseQuotedSourceSwap:!0});if(!t)throw new Error("Swap quote not available yet");const{gasFee:n}=await l.relayerService.estimateBatchGas({user:e.user,outputToken:e.pivot.source.address,stepIndex:0,chainBatches:[t],signal:e.signal});return n}const ja=(e,t)=>(e+t-1n)/t;function So(e,t,n=0n){return e.intents.length===0?t:{...e,intents:e.intents.map(s=>({...s,batches:s.batches.map(r=>{const o=t.intents.find(d=>d.intentIndex===s.intentIndex)?.batches.find(d=>d.chainId===r.chainId);if(!o&&n===0n)return r;const i={...r.feeBreakdown};let a=0n;for(const d of["gasFee","bridgeFee"]){const u=BigInt(i[d]??"0"),m=BigInt(o?.feeBreakdown[d]??"0"),f=u>m?u+ja(u*n,10000n):m;f>u&&(i[d]=f.toString(),a+=f-u)}return{...r,feeBreakdown:i,totalDebit:(BigInt(r.totalDebit)+a).toString()}})}))}}async function Sl(e){if(e.options.signal?.aborted)throw new Error("Fee estimation cancelled");if(!l.relayerService.canValidateActionFees())throw new Error("This withdrawal requires signed fee validation. Refresh the quote before submitting.");const[t,n]=await Promise.all([e.signedEstimate??e.estimate(e.batches,e.tokenAddress,e.fundingAmount,{...e.options,feeExecutionMode:"user-transfer",validateFeeCalls:!0}),e.estimate(e.pricingBatches,e.tokenAddress,e.fundingAmount,{...e.options,feeExecutionMode:"backend-transfer",validateFeeCalls:!1})]);if(e.options.signal?.aborted)throw new Error("Fee estimation cancelled");const s=r=>r.intents.flatMap(o=>o.batches.map(i=>`${o.intentIndex}:${i.chainId}`)).sort().join(",");if(!s(n)||s(n)!==s(t))throw new Error("Unable to validate the signed withdrawal fees.");return{intents:n.intents.map(r=>({...r,batches:r.batches.map(o=>{const i=t.intents.find(u=>u.intentIndex===r.intentIndex)?.batches.find(u=>u.chainId===o.chainId);if(!i)throw new Error("Unable to validate the signed withdrawal fees.");const a={...o.feeBreakdown};let d=0n;for(const u of["gasFee","bridgeFee"]){const m=BigInt(a[u]??"0"),f=BigInt(i.feeBreakdown[u]??"0");f>m&&(a[u]=f.toString(),d+=f-m)}return{...o,feeBreakdown:a,totalDebit:(BigInt(o.totalDebit)+d).toString()}})}))}}function sf(e,t){const n=e.spicenetFee+(e.bridgeFee??0n);return e.grossAmount<=n?t+e.gasFee+n:ja((t+e.gasFee)*e.grossAmount,e.grossAmount-n)+2n}async function Al(e){const{requiredNetFunding:t}=e;if(e.feeOnlyAction){const u=e.executionOptions?.userOverride;if(!u||t!==0n)throw new Error("Fee-only estimates require a zero action amount and its embedded executor");let m=1n,f;for(let h=0;h<8;h++){const y=ds(await e.buildBatches(m),u,f,{payoutAlreadyGross:!0,expiresAt:e.expiresAt}),g=await e.estimate(er(y,e.tokenDescriptor.chainId,e.fundingToken),e.fundingToken,m,{...e.executionOptions,feeExecutionMode:"backend-transfer"}),x=l.getSupplyFeePreview(g,e.tokenDescriptor);if(!x)throw new Error("The fee service did not return a fee quote for this action");const w=x.gasFee+x.spicenetFee+(x.bridgeFee??0n);if(f&&w+2n<=m)return{preview:{...x,grossAmount:m,netAmount:0n},feeEstimate:g,grossFundingAmount:m};m=(w*110n+99n)/100n+2n,f=g}throw new Error("Fee-only funding did not converge; refresh the fee quote before retrying")}const n=await e.buildBatches(t),s=await e.estimate(n,e.fundingToken,t,e.executionOptions),r=l.getSupplyFeePreview(s,e.tokenDescriptor);if(!r)return{preview:l.getEscrowFreeFeePreview(n,e.tokenDescriptor,t),feeEstimate:s,grossFundingAmount:t};const o=sf(r,t),i=u=>r.grossAmount>0n?ja(u*o,r.grossAmount):u,a=i(r.spicenetFee),d=i(r.bridgeFee??0n);return{preview:{...r,grossAmount:o,netAmount:t,spicenetFee:a,bridgeFee:d,totalFee:r.gasFee+a+d},feeEstimate:s,grossFundingAmount:o}}async function El(e){if(e.balance<=0n)throw new Error("No spendable balance remains after source gas.");let t=e.balance;for(let n=0;n<8;n++){const s=await e.planForAmount(t);if(!s||s.sourceSpendCap===void 0||s.sourceSpendCap<=0n)throw new Error("Max requires a current route and fee estimate.");if(s.sourceSpendCap<=e.balance)return l.formatRawTokenInput(t,e.decimals);const r=t*e.balance/s.sourceSpendCap;if(r<=0n||r>=t)throw new Error("The balance cannot cover this action and its fees.");t=r}throw new Error("Max fees did not converge. Refresh the quote before retrying.")}async function rf(e){if(e.isPayMode||e.needsSwap||e.isQuoting||e.pivot||!e.embeddedWalletAddress)return null;const t=e.asset,n=S.getTokenByAddress(e.executionTokenAddress,t.chainId);return!n||t.balance<=0n?null:El({balance:t.balance,decimals:t.decimals,planForAmount:s=>ns({selectedAsset:{asset:t,amount:l.formatRawTokenInput(s,t.decimals)},isPayMode:!1,isNon7702:!1,isFeeInclusiveInput:!1,parsedAmount:Number(l.formatRawTokenInput(s,t.decimals)),currentPaymentAmount:"0",destinationToken:{...n,address:e.executionTokenAddress,chainId:t.chainId},resolvedChainId:t.chainId,resolvedTokenIn:e.executionTokenAddress,executionTokenAddress:e.executionTokenAddress,embeddedWalletAddress:e.embeddedWalletAddress,providerEmbeddedAddress:e.embeddedWalletAddress,address:e.embeddedWalletAddress,isConnected:!0,ready:!0,authenticated:!0,isDirect:!0,isSourceDestToken:!0,needsSwap:!1,isQuoting:!1,resolvedSwap:null,exactOutputSwap:null,buildPayChainBatches:async()=>[],buildSupplyChainBatches:r=>e.buildSupplyChainBatches({...r,actionAmountOverride:s}),estimate:e.estimate,feeExecutionMode:e.feeExecutionMode})})}async function ns(e){const t=await Fl(e);if(!e.externalGasRecipient||!t?.batches?.length)return t;const n=await tf(e,t);if(!n.nativeAmount)return{...t,externalGasReserve:n};const s=await Fl({...e,externalGasReserve:n,initialFeeEstimate:void 0,buildPayChainBatches:async r=>Io(await e.buildPayChainBatches(r),n),buildSupplyChainBatches:async r=>Io(await e.buildSupplyChainBatches({...r,...e.feeExecutionMode!=="user-transfer"&&r?.actionContextOverride?.netAmount!==void 0?{deliveryAmountOverride:r.actionContextOverride.netAmount+n.feeAmount}:{}}),n)});if(!s)return null;if(Cl(n,s.batches??[]),n.fundingSource){const r=n.fundingSource,o=Oa({...s,externalGasReserve:n},e.selectedAsset).find(i=>i.chainId===r.asset.chainId&&l.addressesEqual(i.token,r.token));if(!o||o.amount>r.asset.balance)throw new Error("The gas reserve source cannot cover the action and fees. Refresh the quote.")}return{...s,externalGasReserve:n,preview:{...s.preview,gasFee:s.preview.gasFee+n.feeAmount,totalFee:(s.preview.totalFee??0n)+(e.isPayMode?n.feeAmount:0n),...e.isPayMode?{netAmount:s.preview.netAmount-n.feeAmount}:{}}}}async function Fl(e){const{signal:t,selectedAsset:n,isPayMode:s,isFeeInclusiveInput:r=!1,parsedAmount:o,needsSwap:i,exactOutputSwap:a,isNon7702:d,currentPaymentAmount:u,destinationToken:m,feeExecutionMode:f,resolvedTokenIn:h,embeddedWalletAddress:y,providerEmbeddedAddress:g,resolvedChainId:x,isConnected:w,address:v,ready:C,authenticated:E,isDirect:k,resolvedSwap:F,sourceSwap:j,pivot:I,isQuoting:b,executionTokenAddress:A,buildPayChainBatches:R,buildSupplyChainBatches:B,estimate:q}=e;if(e.feeOnlyAction&&!n&&e.feeFunding?.length!==0)return Ba(e,ns);if(e.feeOnlyAction&&e.actionProceeds&&e.actionProceeds.token.toLowerCase()!==m.address.toLowerCase()||e.feeOnlyAction&&n&&(n.asset._source==="spice"||n.asset._source==="wallet"&&n.asset.chainId===x)&&(h?h.toLowerCase()!==m.address.toLowerCase():n.asset.receiptTokenId||n.asset.chainTokens))return Mr(e);if(e.actionProceeds&&e.feeOnlyAction){const Y=y||g;if(!Y||!C||!E)return null;if(h&&h.toLowerCase()!==m.address.toLowerCase())throw new Error("Action proceeds require a matching fee-token source");return il({proceeds:e.actionProceeds,owner:Y,token:m.address,signal:t,buildBatches:(J,ge)=>R({...ge,fundingAmountOverride:J}),baseline:()=>ns({...e,actionProceeds:void 0,selectedAsset:n??{amount:"0",asset:{...m,name:m.symbol,balance:0n,balanceFormatted:0,balanceUsd:0,isNative:!1,_source:"spice"}}})})}if(!n?.asset)return null;if(s){if(!y&&!g||o<=0&&!e.feeOnlyAction||i&&!a&&!e.feeOnlyAction)return null;const Y=ln(u,m.decimals),J=h||Mn(n.asset,x)||n.asset.address||m.address,ge={chainId:x,tokenAddress:J,symbol:S.getTokenByAddress(J,x)?.symbol??n.asset.symbol,decimals:await es(n.asset,J,x,m)};if(!e.quoteOnly&&(!w||!v||!C||!E))return null;const pe=y||g||v,we=(i?a?.amountInMax??0n:Y)+(e.externalGasReserve?.feeAmount??0n);if(we===0n&&!e.feeOnlyAction)return null;const ve=I?await Il({user:pe,pivot:I,buildSupplyChainBatches:ie=>R({...ie,sourceGasSkimOverride:1n}),signal:t}):0n,ne=Date.now();let _=await Al({requiredNetFunding:we,expiresAt:e.expiresAt,feeOnlyAction:e.feeOnlyAction,buildBatches:ie=>R({fundingAmountOverride:ie,sourceGasSkimOverride:ve}).then(X=>ds(X,pe,void 0,{requestTimestampMs:ne,expiresAt:e.expiresAt})),fundingToken:J,estimate:q,executionOptions:{userOverride:pe,useCustomTransfers:!0,feeExecutionMode:f,signal:t},tokenDescriptor:ge});if(!_.preview)return null;let le=0n,W,De,Ae,z=[],Q=!1;for(let ie=0;ie<8;ie++){if(t?.aborted)throw new Error("Fee estimation cancelled");if(Ae=void 0,z=ds(await R({fundingAmountOverride:_.grossFundingAmount,sourceGasSkimOverride:ve,onSourceSpend:be=>{le=be},onSwap:be=>{Ae=be},onSourceAllocation:be=>{W=be},onActionCalls:be=>{De=be}}),pe,_.feeEstimate,{payoutAlreadyGross:!0,requestTimestampMs:ne,expiresAt:e.expiresAt}),W){const be=l.getSupplyFeePreview(_.feeEstimate,ge);if(!be)throw new Error("The action quote is unavailable.");const qe=yo(x,J,[{recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:be.gasFee+(be.bridgeFee??0n)},{recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:be.spicenetFee}]).calls;z=er(z,x,J);const ye=[...z].reverse().findIndex(de=>de.domain!=="spicenet"&&de.chainId===x),Ue=ye<0?-1:z.length-ye-1;if(Ue<0)throw new Error("The action quote is unavailable.");z[Ue]={...z[Ue],calls:[...qe,...z[Ue].calls]}}if(e.feeOnlyAction){Q=!0;break}const X=await q(z,J,_.grossFundingAmount,{userOverride:pe,useCustomTransfers:!0,feeExecutionMode:f,signal:t}),oe=f==="user-transfer"?So(X,_.feeEstimate):X,je=l.getSupplyFeePreview(oe,ge)??l.getEscrowFreeFeePreview(z,ge,we);if(!je)return null;const Me=we+je.gasFee+je.spicenetFee+(je.bridgeFee??0n),me=l.getSupplyFeePreview(_.feeEstimate,ge),Se=(me?.gasFee??0n)===je.gasFee&&(me?.spicenetFee??0n)===je.spicenetFee&&(me?.bridgeFee??0n)===(je.bridgeFee??0n),Te=_.grossFundingAmount===Me&&Se;if(_={feeEstimate:oe,grossFundingAmount:Me,preview:{...je,grossAmount:Me,netAmount:we}},Te){Q=!0;break}}if(!Q)throw new Error("Payment fees did not converge. Refresh the quote before submitting.");if(!_.preview)return null;const se=I?Kt(ve,I.source.decimals,I.destination.decimals,"ceil"):0n;return{..._,batches:z,sourceSpendCap:le,sourceAllocation:W,actionDefinition:De,destinationAmount:Y,actionOutputCredits:ho(x,m.address,Ae),preview:{..._.preview,grossAmount:_.preview.grossAmount+se,gasFee:_.preview.gasFee+se,totalFee:(_.preview.totalFee??0n)+se},...I?{sourceGasSkim:ve}:{}}}if(o<=0||!y)return null;const O=y||g;if(I&&!j)return null;const P=Ta({isPayMode:s,selectedAsset:n,resolvedChainId:x,sourceSwap:j,pivot:I});if(!(!s&&!d&&n.asset?._source==="wallet"&&n.asset.chainId!==x)&&!k&&!F&&!b||b)return null;let D=await B();if(D.length===0)return null;const M={chainId:x,tokenAddress:A,symbol:S.getTokenByAddress(A,x)?.symbol??(n.asset.chainId===x&&l.addressesEqual(n.asset.address,A)?n.asset.symbol:m.symbol),decimals:await es(n.asset,A,x,m)},L=P&&e.initialFeeEstimate!==void 0&&e.initialSourceGasSkim!==void 0,T=P?L?e.initialSourceGasSkim:await Il({user:O,pivot:I,buildSupplyChainBatches:B,signal:t}):0n;P&&T>0n&&(D=await B({sourceGasSkimOverride:T}));const H=P?Kt(r?fl(j,T):j.amountOutMinimum,I.source.decimals,I.destination.decimals,"floor"):Kt(ln(n.amount,n.asset.decimals),n.asset.decimals,M.decimals,"floor"),V=e.quotedInclusivePlatformFee&&f==="user-transfer",te={userOverride:O,useCustomTransfers:!0,feeExecutionMode:f,signal:t,...P?{skipUserFundingPreflight:!0}:{}};let Z=H,K=e.initialFeeEstimate??await q(D,A,Z,V?{...te,feeExecutionMode:"backend-transfer"}:te);V&&!e.initialFeeEstimate&&(K=So(K,{intents:[]},100n));for(let Y=0;Y<8;Y++){if(t?.aborted)throw new Error("Fee estimation cancelled");const J=l.getSupplyFeePreview(K,M)??l.getEscrowFreeFeePreview(D,M,Z);if(!J)return null;const ge=Da(J,H,r,f,e.externalGasReserve?.feeAmount,e.quotedInclusivePlatformFee);Z=ge.grossAmount;let pe,we,ve,ne,_,le;const W=await B({fundingAmountOverride:Z,sourceGasSkimOverride:T,actionContextOverride:ge,onDestinationAmount:X=>{pe=X},onSourceSpend:X=>{we=X},onSourceAllocation:X=>{ve=X},onSwap:(X,oe)=>{ne=X,_=oe},onActionCalls:X=>{le=X}}),De=V?er(await B({fundingAmountOverride:Z,sourceGasSkimOverride:T,actionContextOverride:ge,deliveryAmountOverride:ge.netAmount,withdrawalAmountOverride:ge.netAmount}).then(X=>{if(X.length!==W.length)throw new Error("The withdrawal fee route changed. Refresh the quote before submitting.");return X.map((oe,je)=>{const Me=W[je];if(!Me||Me.chainId!==oe.chainId||Me.domain!==oe.domain)throw new Error("The withdrawal fee route changed. Refresh the quote before submitting.");return oe.domain==="spicenet"?oe:{...oe,calls:Me.calls}})}),x,A):void 0,[Ae,z]=await Promise.all([De?Sl({estimate:q,batches:W,pricingBatches:De,tokenAddress:A,fundingAmount:Z,options:te}):q(W,A,Z,{...te,validateFeeCalls:e.initialFeeEstimate!==void 0}),L?l.relayerService.estimateBatchGas({user:O,outputToken:I.source.address,stepIndex:0,chainBatches:[W[0]],signal:t}):void 0]);if(z&&!(f==="user-transfer"?l.feeAmountsWithinTolerance(T,z.gasFee,e.feeToleranceBps):z.gasFee===T))throw new Error("Source gas changed. Prepare a fresh fee quote.");const Q=f==="user-transfer"?So(Ae,K,V?100n:0n):Ae,se=l.getSupplyFeePreview(Q,M)??l.getEscrowFreeFeePreview(W,M,Z);if(!se)return null;const ie=Da(se,H,r,f,e.externalGasReserve?.feeAmount,e.quotedInclusivePlatformFee);if(JSON.stringify(ge,(X,oe)=>typeof oe=="bigint"?oe.toString():oe)===JSON.stringify(ie,(X,oe)=>typeof oe=="bigint"?oe.toString():oe)||f==="user-transfer"&&(!V||ge.feeBreakdown.spicenetFee===ie.feeBreakdown.spicenetFee)&&l.feeBreakdownsWithinTolerance(ge.feeBreakdown,ie.feeBreakdown,e.feeToleranceBps)){const X=f==="user-transfer"?J:se,oe=P?Kt(T,I.source.decimals,I.destination.decimals,"ceil"):0n;return{batches:W,feePricingBatches:De,fundingAmount:Z,actionContext:ge,sourceSpendCap:we,sourceAllocation:ve,destinationAmount:pe,destinationSwap:ne,swapInputAmount:_,actionDefinition:le,actionOutputCredits:ho(x,m.address,ne),feeEstimate:f==="user-transfer"?K:Q,sourceGasSkim:T,preview:{...X,grossAmount:Z+oe,netAmount:ge.netAmount,gasFee:X.gasFee+oe,spicenetFee:ge.feeBreakdown.spicenetFee,totalFee:ge.combinedFeeAmount+oe}}}K=Q,D=W}throw new Error("Fees did not converge. Refresh the quote before submitting.")}class Ao extends Error{constructor(t){super("Amount is too small to cover fees. Increase the amount and retry."),this.preview=t,this.name="FeeShortfallError"}}function Da(e,t,n,s,r=0n,o=!1){const i=BigInt(e.feePolicy?.platformBps??fa),a=e.feePolicy?{feePolicy:e.feePolicy}:{},d=e.gasFee+(e.bridgeFee??0n)+r;if(e.gasQuoteSource==="static_zero"&&r===0n)return{...a,grossAmount:t,netAmount:t,combinedFeeAmount:0n,feeExecutionMode:s??"backend-transfer",feeBreakdown:{gasFee:0n,bridgeFee:0n,spicenetFee:0n}};if(n&&o){const f=d+e.spicenetFee;if(t<=f)throw new Ao({...e,grossAmount:t,netAmount:0n,totalFee:f});return{...a,grossAmount:t,netAmount:t-f,combinedFeeAmount:f,feeExecutionMode:s??"backend-transfer",feeBreakdown:{gasFee:e.gasFee,bridgeFee:e.bridgeFee??0n,spicenetFee:e.spicenetFee}}}const u=n?l.splitFeeInclusiveAmount(t,d,i):null;if(u&&!u.coversFees)throw new Ao({...e,grossAmount:t,netAmount:0n,spicenetFee:0n,totalFee:d});const m=u?.spicenetFee??(s==="user-transfer"?l.calculateBpsFee(t,i):e.spicenetFee);return{...a,grossAmount:u?.grossAmount??t+m+d,netAmount:u?.netAmount??t,combinedFeeAmount:m+d,feeExecutionMode:s??"backend-transfer",feeBreakdown:{gasFee:e.gasFee,bridgeFee:e.bridgeFee??0n,spicenetFee:m}}}async function of(e,t){if(e.feeQuote?.sourceAllocation){e.validateFeeQuote?.();const d=e.feeQuote.sourceAllocation;vo(d,d.positions.map(u=>u.asset),e.embeddedWalletAddress??e.providerEmbeddedAddress??void 0,e.resolvedChainId);return}const n=e.selectedAsset?.asset;if(!n||n?._source!=="wallet")return;const s=Mn(n,e.resolvedChainId);if(!s||!l.addressesEqual(s,e.executionTokenAddress))return;const r=await es(n,e.executionTokenAddress,e.resolvedChainId,e.destinationToken),o=sr(t,r,n.decimals);if(o<=n.balance)return;const i=N.formatUnits(o,n.decimals),a=N.formatUnits(n.balance,n.decimals);throw new Error(`Insufficient ${n.symbol} for this total amount. Required ${i} ${n.symbol}; available ${a} ${n.symbol}.`)}function af(e){const t=S.getTokenByAddress(e.executionTokenAddress,e.resolvedChainId);return{chainId:e.resolvedChainId,tokenAddress:e.executionTokenAddress,symbol:t?.symbol??e.destinationToken.symbol,decimals:t?.decimals??e.destinationToken.decimals}}function cf(e){const t=e.selectedAsset.asset,n=ln(e.selectedAsset.amount,t.decimals);if(n<=t.balance)return n;throw new Error(`Insufficient ${t.symbol} for this total amount. Required ${N.formatUnits(n,t.decimals)} ${t.symbol}; available ${N.formatUnits(t.balance,t.decimals)} ${t.symbol}.`)}function Tl(e,t,n,s){const r=af(t),o=l.getSupplyFeePreview(e,r)??l.getEscrowFreeFeePreview(s,r,n);if(o)return Da(o,n,!!t.isFeeInclusiveInput,t.feeExecutionMode,0n,t.quotedInclusivePlatformFee)}function Rl(e,t,n){let s=0n,r=0n;const o=n.toLowerCase();for(const i of e)if(i.chainId===t){for(const a of i.calls??[])if(a.to.toLowerCase()===o)try{const d=N.decodeFunctionData({abi:N.erc20Abi,data:a.data});if(d.functionName!=="transfer")continue;const u=d.args[0].toLowerCase(),m=d.args[1];u===S.SPICE_PLATFORM_FEE_RECIPIENT.toLowerCase()?s+=m:u===S.SPICE_GAS_FEE_RECIPIENT.toLowerCase()&&(r+=m)}catch{continue}}return{spicenetFee:s,gasFee:r}}function lf(e,t,n,s){const r=t.feeExecutionMode==="user-transfer"&&t.needsSwap&&t.resolvedTokenIn?t.resolvedTokenIn:t.executionTokenAddress,o=Rl(e,t.resolvedChainId,r);return o.spicenetFee===0n&&n.feeBreakdown.spicenetFee>0n||o.gasFee===0n&&n.feeBreakdown.gasFee>0n?!1:l.feeAmountsWithinTolerance(o.spicenetFee,n.feeBreakdown.spicenetFee,t.feeToleranceBps)&&l.feeAmountsWithinTolerance(o.gasFee,n.feeBreakdown.gasFee,t.feeToleranceBps)&&l.feeAmountsWithinTolerance(s.feeBreakdown.bridgeFee,n.feeBreakdown.bridgeFee,t.feeToleranceBps)}function df(e,t,n){return e?l.amountsWithinBps(e.grossAmount,t.grossAmount,100n)&&l.feeBreakdownsWithinTolerance(e.feeBreakdown,t.feeBreakdown,n):!1}function uf(e,t){const n=S.getTokenByAddress(t,e.resolvedChainId);return{chainId:e.resolvedChainId,tokenAddress:t,symbol:n?.symbol??e.selectedAsset?.asset.symbol??"",decimals:n?.decimals??e.selectedAsset?.asset.decimals??e.destinationToken.decimals}}async function pf(e,t){const n=e.feeQuote;return n?.feeEstimate&&n.grossFundingAmount!==void 0?{grossFundingAmount:n.grossFundingAmount,feeEstimate:n.feeEstimate}:Al({...t,feeOnlyAction:e.feeOnlyAction,estimate:e.execution.estimate,tokenDescriptor:uf(e,t.fundingToken)})}function Bl(e,t){const n=t instanceof Error?t:new Error(String(t));if(n.name==="AbortError"||n instanceof l.SpiceflowError&&n.code==="ABORT"){e.ui.setStep("idle");return}const s=n.message||"Transaction failed";e.ui.setStep("error"),e.ui.setStatusMsg(s),e.ui.setError(s)}function Ol(e,t){const n=l.sanitizeError(t,"Payment failed. Please try again.");e.ui.setError(n),e.ui.setPaymentResult({status:"failed",error:n})}async function jl(e){e.ui.setIsExecuting(!0),e.ui.setError(null),e.ui.setStep("executing"),e.ui.setStatusMsg("Confirm the transaction in your external wallet..."),e.ui.setTxHash(null),e.isPayMode&&(e.ui.setShowStatusPanel(!0),e.ui.setPaymentResult({status:"processing"}));try{if(e.validateFeeQuote?.(),!e.feeQuote?.batches||!e.feeQuote.actionDefinition)throw new Error("Review the direct action plan before submitting.");const t=await e.execution.execute(e.feeQuote.batches,e.destinationToken.address,0n,e.execution.onProgress);e.ui.setTxHash(t),e.ui.setStep("success"),e.ui.setStatusMsg("Transaction confirmed"),e.isPayMode&&e.ui.setPaymentResult({status:"success",txHash:t})}catch(t){e.isPayMode?Ol(e,t):Bl(e,t)}finally{e.ui.setIsExecuting(!1)}}async function Dl(e,t,n){e.validateFeeQuote?.();const s=e.feeQuote;if(!s.batches||s.sourceSpendCap===void 0||!s.fundingSource&&s.preview.feePayer!=="relayer")throw new Error("Refresh the action before submitting.");const r=s.fundedFeeToken,o=s.grossFundingAmount??0n,i=pl({...e,signal:n,feeOnlyAction:!0,destinationToken:r,actionProceeds:e.actionProceeds??{token:s.fundingSource?.token??r.address,resolve:async()=>s.proceedsAvailable??0n}},r.address,o);return e.execution.execute(s.batches,s.fundingConversion?.tokenIn??s.fundingSource?.token??r.address,o,t,n,{...i,userOverride:e.embeddedWalletAddress||e.providerEmbeddedAddress,useCustomTransfers:!0,feeExecutionMode:"backend-transfer",skipPreSubmitFeeEstimate:!0})}async function Nl(e){if(!e.selectedAsset?.asset&&!e.feeQuote?.fundingPlan||e.parsedAmount<=0){e.ui.setError("Select an asset and enter an amount");return}if(e.isInsufficientBalance){e.ui.setError("Insufficient balance");return}if(e.directExternalAction)return jl(e);if(!e.embeddedWalletAddress){e.ui.setError("Wallet not ready");return}e.ui.setIsExecuting(!0),e.ui.setError(null),e.ui.setStep("signing-delegation"),e.ui.setStatusMsg("Building transaction..."),e.ui.setTxHash(null),e.refs.spiceDepositSubmittedRef.current=!1;const t=new AbortController;e.refs.abortControllerRef.current=t;try{const n=e.embeddedWalletAddress||e.providerEmbeddedAddress,s=e.feeQuote;if(s?.fundingPlan){e.validateFeeQuote?.();const g=s.fundingPlan;if(!s.batches?.length||!s.feeEstimate||s.fundingAmount===void 0)throw new Error("Review the combined funding plan before submitting.");const x=[...new Set(g.sources.filter(E=>E.asset.location==="embedded").map(E=>E.chainId))];for(const[E,k]of x.entries()){const F=g.sources.filter(A=>A.asset.location==="embedded"&&A.chainId===k),j=s.batches[E];if(!j||j.chainId!==k)throw new Error("The accepted source funding vector changed.");const I=await l.relayerService.estimateBatchGas({user:g.owner,outputToken:F[0].pivotToken.address,stepIndex:0,chainBatches:[j]});e.validateFeeQuote?.();const b=F.reduce((A,R)=>A+R.gasFeeAmount,0n);if(I.gasFee<0n||!l.feeAmountsWithinTolerance(b,I.gasFee,e.feeToleranceBps))throw new Error("Source funding fees changed. Refresh before submitting this purchase.")}const w={chainId:g.token.chainId,tokenAddress:g.token.address,symbol:g.token.symbol,decimals:g.token.decimals},v=l.getSupplyFeePreview(s.feeEstimate,w);if(!v)throw new Error("The accepted purchase fees are unavailable.");const C=await e.execution.execute(s.batches,g.token.address,s.fundingAmount,e.execution.onProgress,t.signal,{userOverride:g.owner,useCustomTransfers:!0,skipUserFundingPreflight:!0,feeExecutionMode:"user-transfer",adjustBatchesForEstimate:({feeEstimate:E})=>{const k=l.getSupplyFeePreview(E,w);if(!k||!l.feeBreakdownsWithinTolerance(v,k,e.feeToleranceBps))throw new Error("Transaction fees changed. Refresh the quote before submitting.");return null}});e.ui.setTxHash(C),e.ui.setStep("success"),e.ui.setStatusMsg("Transaction confirmed");return}if(s?.fundedFeeToken){const g=await Dl(e,e.execution.onProgress,t.signal);e.ui.setTxHash(g),e.ui.setStep("success"),e.ui.setStatusMsg("Transaction confirmed");return}const r=Ta(e);r&&cf(e);const o=e.feeQuote?.batches?e.feeQuote:await ns({...e,feeExecutionMode:e.feeExecutionMode,isDirect:!e.needsSwap,isQuoting:!1,resolvedSwap:null,buildPayChainBatches:e.execution.buildPayChainBatches,buildSupplyChainBatches:e.execution.buildSupplyChainBatches,estimate:e.execution.estimate});if(!o?.batches||o.fundingAmount===void 0||!o.actionContext)throw new Error("A current action plan is required. Refresh the quote before submitting.");const i=e.isFeeInclusiveInput?o.actionContext.grossAmount:o.actionContext.netAmount;let a=o.batches;const d=a.some(g=>g.tokenTransfers?.length),u={userOverride:n,useCustomTransfers:d,feeExecutionMode:e.feeExecutionMode,...r?{skipUserFundingPreflight:!0}:{}},m=o.fundingAmount,f=o.actionContext;await of(e,m);const h=f,y=await e.execution.execute(a,e.executionTokenAddress,d?m:0n,e.execution.onProgress,t.signal,e.feeExecutionMode==="user-transfer"?{...u,skipUserFundingPreflight:!0,adjustBatchesForEstimate:async({feeEstimate:g,chainBatches:x})=>{if(o.feePricingBatches){e.validateFeeQuote?.();const E=await Sl({estimate:e.execution.estimate,batches:x,pricingBatches:o.feePricingBatches,tokenAddress:e.executionTokenAddress,fundingAmount:m,options:{...u,signal:t.signal},signedEstimate:g});e.validateFeeQuote?.();const k=Tl(E,e,i,x),F=h.feeBreakdown,j=Rl(x,e.resolvedChainId,e.executionTokenAddress);if(!k||!l.feeBreakdownsWithinTolerance(F,k.feeBreakdown,e.feeToleranceBps)||j.spicenetFee!==F.spicenetFee||j.gasFee!==F.gasFee+F.bridgeFee)throw new Error("Transaction fees changed. Refresh the quote before submitting.");return null}const w=Tl(o.feeEstimate?So(g,o.feeEstimate):g,e,i,x);if(!w)throw new Error("Unable to validate the accepted fees. Refresh the quote before submitting.");const v=df(h,w,e.feeToleranceBps),C=lf(x,e,w,h);if(v||C)return null;throw new Error("Transaction fees changed. Refresh the quote before submitting.")}}:{...u,skipPreSubmitFeeEstimate:!0});e.ui.setTxHash(y),e.ui.setStep("success"),e.ui.setStatusMsg("Deposit confirmed")}catch(n){Bl(e,n)}finally{e.ui.setIsExecuting(!1)}}async function Ml(e){if(e.parsedAmount<0){e.ui.setError("Enter a valid payment amount");return}const t=e.parsedAmount===0;if(!e.selectedAsset?.asset&&!t){e.ui.setError("Select a payment source");return}if(e.isInsufficientBalance){e.ui.setError("Insufficient balance");return}if(e.parsedAmount>0&&e.needsSwap&&!e.exactOutputSwap){e.ui.setError("Swap quote not available. Try a different asset.");return}if(e.directExternalAction)return jl(e);const n=wl(e)&&!t,s=n?e.feeQuote?.sourceGasSkim??0n:0n,r=i=>e.execution.buildPayChainBatches(n?{...i,sourceGasSkimOverride:s}:i);if(!e.isConnected||!e.address){e.ui.setError("Please connect your wallet to continue");return}if(!e.ready||!e.authenticated){e.ui.setError(`Please authenticate with ${e.provider||"wallet provider"} to continue`);return}e.ui.setIsExecuting(!0),e.ui.setError(null),e.ui.setShowStatusPanel(!0),e.ui.setPaymentResult({status:"processing"});const o=new AbortController;e.refs.abortControllerRef.current=o;try{if(e.feeQuote?.fundedFeeToken){const F=await Dl(e,j=>{e.execution.onProgress(j),j.txHash&&(e.ui.setTxHash(j.txHash),e.ui.setPaymentResult({status:"processing",txHash:j.txHash}))},o.signal);e.ui.setPaymentResult(j=>({status:"success",txHash:j?.txHash||F}));return}const i=ln(e.currentPaymentAmount,e.destinationToken.decimals),a={useCustomTransfers:!0,feeExecutionMode:e.feeExecutionMode,...n?{skipUserFundingPreflight:!0}:{}};if(t&&!e.feeOnlyAction){const F=await r(),j=await e.execution.execute(F,e.executionTokenAddress,0n,I=>{e.execution.onProgress(I),I.txHash&&(e.ui.setPaymentResult(b=>({...b??{status:"processing"},txHash:I.txHash})),e.ui.setTxHash(I.txHash))},o.signal,a);e.ui.setPaymentResult(I=>({status:"success",txHash:I?.txHash||j}));return}const d=e.selectedAsset?.asset,u=e.feeQuote?.fundingSource,m=e.feeQuote?.preview.feePayer==="relayer";if(!d&&!e.actionProceeds&&!u&&!m)throw new Error("Select a payment source");const f=e.feeQuote?.fundingConversion?.tokenIn||u?.token||e.resolvedTokenIn||d?.address||e.destinationToken.address,h=e.needsSwap?e.exactOutputSwap?.amountInMax??0n:i,y=e.embeddedWalletAddress||e.providerEmbeddedAddress||e.address,g=m||!!e.feeQuote?.fundingConversion||!!u&&(u.kind!=="balance"||u.asset?._source==="wallet"),{grossFundingAmount:x,feeEstimate:w}=g?{grossFundingAmount:e.feeQuote.grossFundingAmount??0n,feeEstimate:void 0}:await pf(e,{requiredNetFunding:h,buildBatches:F=>e.execution.buildPayChainBatches({fundingAmountOverride:F}).then(j=>ds(j,y)),fundingToken:f,executionOptions:a});let v=e.feeQuote?.fundingBatches??e.feeQuote?.batches??ds(await r({fundingAmountOverride:x}),y,e.actionProceeds?void 0:w,{payoutAlreadyGross:!0});const C=pl(e,e.feeQuote?.fundingConversion?.tokenOut??f,x);C.prepareForSigning&&(v=await C.prepareForSigning(v));const E=v.some(F=>F.tokenTransfers?.length),k=await e.execution.execute(v,f,E?x:0n,F=>{e.execution.onProgress(F),F.txHash&&(e.ui.setPaymentResult(j=>({...j,txHash:F.txHash})),e.ui.setTxHash(F.txHash))},o.signal,{...a,...C,skipPreSubmitFeeEstimate:!0});e.ui.setPaymentResult(F=>({status:"success",txHash:F?.txHash||k}))}catch(i){Ol(e,i)}finally{e.ui.setIsExecuting(!1)}}async function Pl(e){const{quote:t,recipient:n,chainId:s,token:r}=e,o=t.batches?Ul(t.batches,r,s,n):0n;if(o<=0n)throw new Error("The route does not deliver the action amount to the external wallet.");const i={userAddress:n,executorAddress:n,beneficiary:e.beneficiary??n,chainId:s,destinationToken:r,feeToken:r,grossAmount:o,netAmount:o,combinedFeeAmount:0n,feeExecutionMode:e.feeExecutionMode,feeBreakdown:{spicenetFee:0n,gasFee:0n,bridgeFee:0n}},a=await e.buildCalls(o,i);if(!a.length)throw new Error("No action calls configured.");return{amount:o,context:i,calls:a.map(d=>({...d}))}}function ff(e,t,n){const s=[],r=(o,i,a)=>{a>0n&&s.push(S.isNativeToken(o)?{to:i,value:a,data:"0x"}:{to:o,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[i,a]})})};return t.feeExecutionMode==="user-transfer"&&t.feeBreakdown&&(r(t.feeToken??t.destinationToken,S.SPICE_PLATFORM_FEE_RECIPIENT,t.feeBreakdown.spicenetFee),r(t.feeToken??t.destinationToken,S.SPICE_GAS_FEE_RECIPIENT,t.feeBreakdown.gasFee+t.feeBreakdown.bridgeFee)),r(t.destinationToken,n,e),s}function Ul(e,t,n,s){let r=0n;for(const o of e)if(o.chainId===n){for(const i of o.calls)if(l.addressesEqual(i.to,t))try{const a=N.decodeFunctionData({abi:N.erc20Abi,data:i.data});a.functionName==="transfer"&&l.addressesEqual(a.args[0],s)&&(r+=a.args[1])}catch{}}return r}async function mf(e){if(!/^0x[0-9a-f]{64}$/i.test(e.hash))throw new Error("The external delivery receipt is unavailable.");const t=l.getClientForChain(e.chainId),n=await t.getTransactionReceipt({hash:e.hash});if(n.status!=="success"||!l.addressesEqual(n.transactionHash,e.hash))throw new Error("The external delivery receipt was not successful.");let s=0n;for(const r of n.logs)if(l.addressesEqual(r.address,e.token))try{const o=N.decodeEventLog({abi:N.erc20Abi,eventName:"Transfer",data:r.data,topics:r.topics});l.addressesEqual(o.args.to,e.recipient)&&l.addressesEqual(o.args.from,e.sender)&&(s+=o.args.value)}catch{}if(s!==e.amount)throw new Error("The received external amount does not match the accepted action.");if(await t.readContract({address:e.token,abi:N.erc20Abi,functionName:"balanceOf",args:[e.recipient]})<e.amount)throw new Error("The external wallet no longer holds the delivered action amount.")}async function Wl(e,t,n){let s=null;try{const r=await e.request({method:"eth_chainId"});s=parseInt(r,16)}catch{s=null}s!==t&&(n?.(),await l.ensureWalletOnChain(e,t))}function Na(e){let t=e;const n=new Set;for(;t&&typeof t=="object"&&!n.has(t);){if(n.add(t),t.code===4001)return!0;t=t.cause}return!1}async function Ma(e){const t=e.provider??await e.wallet?.getEthereumProvider();if(!t)throw new Error("External wallet provider not available");await Wl(t,e.chainId,e.onSwitch);const n=await t.request({method:"eth_accounts"});if(!Array.isArray(n)||!n.some(r=>typeof r=="string"&&r.toLowerCase()===e.account.toLowerCase()))throw new Error("The connected source wallet changed. Reconnect the selected account before funding.");const s=l.getChainConfig(e.chainId)?.viemChain;return{extWc:N.createWalletClient({account:e.account,chain:s,transport:N.custom(t)}),viemChain:s}}async function ql(e,t,n){const s=Date.now()+1e4;for(;Date.now()<s;){let r,o;try{r=await Promise.race([Promise.all([t.getBlockNumber({cacheTime:0}),e.request({method:"eth_blockNumber"}).then(BigInt)]),new Promise(i=>{o=setTimeout(()=>i(null),Math.max(0,s-Date.now()))})])}catch{return}finally{clearTimeout(o)}if(!r||Date.now()>=s||r.every(i=>i>=n))return;await new Promise(i=>setTimeout(i,Math.min(250,s-Date.now())))}}async function hf(e){let t;for(const[n,s]of e.calls.entries()){await e.observer?.onSending?.(n);let r;try{r=await e.extWc.sendTransaction({to:s.to,data:s.data,value:s.value,chain:e.viemChain,...e.nonce!==void 0?{nonce:e.nonce}:{}})}catch(a){throw Na(a)&&e.observer?.onRejected?.(n),a}await e.observer?.onSubmitted?.(n,r);const o=await mo({client:e.client,hash:r,call:s,onRepriced:()=>{},onCancelled:()=>e.observer?.onReverted?.(n,r)});o.hash!==r&&await e.observer?.onSubmitted?.(n,o.hash),r=o.hash;const i=o.receipt;if(i.status!=="success")throw e.observer?.onReverted?.(n,r),new Error(e.errorMessage);await ql(e.extWc,e.client,i.blockNumber),e.observer?.onConfirmed?.(n,r),t=r}return t}async function Ll(e){const t=await e.client.estimateFeesPerGas(),n=t.maxFeePerGas??t.gasPrice;if(typeof n!="bigint"||n<=0n)throw new Error("Network gas could not be priced.");let s=0n;for(const r of e.calls){const o=await e.client.estimateGas({account:e.account,...r});s+=(o*n*120n+99n)/100n}return s}async function Pa(e){const{definition:t,account:n,chainId:s}=e,{calls:r}=t;if(!l.addressesEqual(t.context.executorAddress,n)||t.context.chainId!==s||!r.length)throw new Error("The direct action no longer matches its wallet or chain.");const o=l.getClientForChain(s);let i;const a=e.originalAction,d=f=>{if(f.chainId!==s||!l.addressesEqual(f.executor,n)||f.calls.length!==r.length||f.calls.some((h,y)=>!l.addressesEqual(h.to,r[y].to)||h.data.toLowerCase()!==r[y].data.toLowerCase()||BigInt(h.value)!==r[y].value))throw Error("The original external action no longer matches its accepted calls.");return f};let u=a?d(await a.service.getExternalExecution(a.actionId)):void 0,m=u?.executionMode==="wallet-envelope";if(a?.resume&&m)throw Error("Wallet-envelope recovery is unavailable. Check wallet activity; this original action will not be resent.");for(const[f,h]of r.entries()){if(await e.assertCurrent(),u&&!m){const C=u.calls[f];if(C.status==="confirmed"&&C.transactionHash){i=C.transactionHash;continue}if(C.status!=="unsubmitted"&&!(a?.resume&&["prepared","submitted","reverted"].includes(C.status)))throw Error(C.status==="reverted"||C.status==="conflict"?"The original wallet action failed or its nonce was used by another transaction.":"The original wallet transaction is being reconciled. Check its status before continuing.")}let y;if(a&&!m){if(u=d(await a.service.prepareExternalExecutionCall(a.actionId,f,a.resume&&u?.calls[f]?.status==="reverted"?u.calls[f].transactionHash??void 0:void 0)),m=u.executionMode==="wallet-envelope",a.resume&&m)throw Error("Wallet-envelope recovery is unavailable. Check wallet activity; this original action will not be resent.");a.resume&&u.calls[f]?.status==="reverted"&&u.calls[f]?.transactionHash&&(u=d(await a.service.prepareExternalExecutionCall(a.actionId,f,u.calls[f].transactionHash)));const C=u.calls[f];if(!m&&C.status==="confirmed"&&C.transactionHash){i=C.transactionHash;continue}if(!m&&C.status!=="prepared")throw Error("The original wallet call could not be prepared.");if(u.executionMode!=="wallet-envelope"){if(C.nonce===null)throw Error("The original wallet nonce is unavailable.");y=C.nonce;const[E,k]=await Promise.all([o.getTransactionCount({address:n,blockTag:"latest"}),o.getTransactionCount({address:n,blockTag:"pending"})]);if(E!==y||k!==y)throw Error("The original wallet nonce is pending or changed. Check its status before continuing.")}await e.assertCurrent()}const[g,x]=await Promise.all([Ll({client:o,account:n,calls:[h]}),o.getBalance({address:n})]);if(x<h.value+g)throw new Error("The external wallet has insufficient native balance for this transaction and network gas.");await e.assertCurrent();const{extWc:w,viemChain:v}=await Ma({wallet:e.wallet,account:n,chainId:s});if(await e.assertCurrent(),i=await hf({extWc:w,viemChain:v,client:o,calls:[h],errorMessage:"The external transaction reverted. Retry the unfinished action when ready.",...y!==void 0?{nonce:y}:{},...a?{observer:{onSubmitted:async(C,E)=>{try{u=d(await a.service.recordExternalExecutionHash(a.actionId,f,E))}catch(k){if(u?.executionMode!=="wallet-envelope")throw k}}}}:{}}),a&&i){try{u=d(await a.service.recordExternalExecutionHash(a.actionId,f,i))}catch(C){if(u?.executionMode!=="wallet-envelope")throw C}if(u?.executionMode!=="wallet-envelope"&&u?.calls[f]?.status!=="confirmed")throw Error("The original wallet transaction is confirmed on chain and awaiting backend reconciliation.")}}if(!i)throw new Error("The direct action has no confirmed receipt.");return i}function Pr(e,t,n){if(!l.addressesEqual(e.owner,t)||e.balanceError||e.balanceStatus==="stale"||e._wrapFromNative||!Number.isInteger(e.decimals)||e.decimals<0||e.decimals>36)return!1;if(e.location==="embedded"&&e._source==="wallet"){const r=Ds(e.chainId);return!!r&&(!l.addressesEqual(e.address,r.address)||e.decimals===r.decimals)}if(e.location!=="rollup"||e._source!=="spice"||!e.receiptTokenId||!e.chainTokens||Array.isArray(e.chainTokens))return!1;const s=Object.entries(e.chainTokens).filter(([r])=>Sn(r)?.chainId===n.chainId);return s.length===1&&l.addressesEqual(Sn(s[0][0])?.address,n.address)&&(s[0][1].decimals===void 0||s[0][1].decimals===n.decimals)}async function zl(e){const{owner:t,token:n}=e,s=Ds(n.chainId);if(!s||!l.addressesEqual(s.address,n.address)||s.decimals!==n.decimals||e.destinationToken.chainId!==n.chainId)throw new Error("Combined funding requires the destination chain's supported USDC token.");if(e.budget!=="max"&&e.budget<=0n)throw new Error("Enter a positive purchase budget.");const r=()=>{if(e.signal?.aborted)throw new Error("Fee estimation cancelled")},o=(I,b=0n,A=0n,R=0n)=>new Ao({symbol:n.symbol,decimals:n.decimals,grossAmount:I,netAmount:0n,gasFee:b,spicenetFee:A,bridgeFee:R,totalFee:b+A+R,gasQuoteSource:"estimated"}),i=new Set,a=new Set,d=[],u=I=>I.location==="rollup"?0:l.addressesEqual(I.address,Ds(I.chainId)?.address)?I.chainId===n.chainId?1:3:I.chainId===n.chainId?2:4,m=[...e.sources].sort((I,b)=>u(I.asset)-u(b.asset));let f=0n;for(const I of m){r();const{asset:b,availableAmount:A,reservedAmount:R}=I,B=xe(b),q=b.location==="rollup"?`${t.toLowerCase()}:rollup:${b.receiptTokenId}`:`${t.toLowerCase()}:${b.location}:${b.chainId}:${S.normalizeNativeTokenAddress(b.address).toLowerCase()}`;if(i.has(B)||a.has(q))throw new Error("A funding position was included more than once.");if(i.add(B),a.add(q),!Pr(b,t,n)||typeof A!="bigint"||typeof R!="bigint"||A<0n||R<0n||A+R>b.balance)throw new Error("A funding position or its available balance cannot be verified.");if(A===0n||e.budget!=="max"&&f>=e.budget)continue;const O=b.location==="rollup"?n:{...Ds(b.chainId),chainId:b.chainId},P=b.location==="rollup"||l.addressesEqual(b.address,O.address)?void 0:await e.resolveSourceInput(b,O,A);if(r(),P&&(P.amountOutMinimum<=0n||P.amountOutMinimum>P.amountOut||!P.calls.length))throw new Error("A funding conversion has no guaranteed output.");b.location==="rollup"&&b.receiptTokenDecimals!==void 0&&nn(A,b.decimals,b.receiptTokenDecimals);const D=P?.amountOutMinimum??nn(A,b.decimals,O.decimals),M=nn(Kt(D,O.decimals,n.decimals,"floor"),n.decimals,O.decimals);M!==0n&&(f+=nn(M,O.decimals,n.decimals),d.push({positionId:B,asset:b,owner:t,chainId:b.chainId,token:b.address,decimals:b.decimals,sourceSpendCap:A,quotedAvailable:A,reservedAmount:R,pivotToken:O,amountOutMinimum:M,gasFeeAmount:0n,...P?{swap:P}:{}}))}const h=d.reduce((I,b)=>I+nn(b.amountOutMinimum,b.pivotToken.decimals,n.decimals),0n);let y=e.budget==="max"?h:e.budget;if(e.budget==="max"&&y===0n)throw o(0n);if(y<=0n||y>h)throw new Error("The available funding positions cannot cover this purchase budget.");const g=[];let x=y;for(const I of d){if(x===0n)break;const b=nn(I.amountOutMinimum,I.pivotToken.decimals,n.decimals),A=b<x?b:x,R=nn(A,n.decimals,I.pivotToken.decimals);if(A===b)g.push(I);else if(I.swap){const B=await e.resolveSourceOutput(I.asset,I.pivotToken,R);if(r(),!B||B.amountInMax<=0n||B.amountIn<0n||B.amountIn>B.amountInMax||B.amountInMax>I.quotedAvailable||B.amountOut<R||!B.calls.length)throw new Error("The funding conversion cannot fit its accepted source balance.");g.push({...I,sourceSpendCap:B.amountInMax,amountOutMinimum:R,swap:{venue:B.venue,calls:B.calls,amountOut:B.amountOut,amountOutMinimum:R}})}else{const B=nn(R,I.pivotToken.decimals,I.decimals);I.asset.location==="rollup"&&I.asset.receiptTokenDecimals!==void 0&&nn(B,I.decimals,I.asset.receiptTokenDecimals),g.push({...I,sourceSpendCap:B,amountOutMinimum:R})}x-=A}const w=new Map;for(const I of g){if(I.asset.location==="rollup")continue;const b=w.get(I.chainId)??[];b.push(I),w.set(I.chainId,b)}const v=new Map,C=(I=!1)=>[...w].map(([b,A])=>{const R=A[0].pivotToken,B=A.reduce((O,P)=>O+P.amountOutMinimum,0n),q=v.get(b)??(I?1n:0n);if(B<=q&&!I)throw o(y,Kt(q,R.decimals,n.decimals,"ceil"));return{chainId:b,calls:[...A.flatMap(O=>O.swap?.calls??[]),Us(R.address,B>q?B-q:0n,S.getEscrowContractAddress(b)),...q>0n?[Us(R.address,q,S.SPICE_GAS_FEE_RECIPIENT)]:[]]}});for(let I=0;I<8&&w.size>0;I++){const b=C(!0);let A=!1;for(const[R,[B,q]]of[...w].entries()){r();const O=await l.relayerService.estimateBatchGas({user:t,outputToken:q[0].pivotToken.address,stepIndex:0,chainBatches:[b[R]],signal:e.signal});if(O.gasFee<0n)throw new Error("The source gas quote is invalid.");const P=q[0].pivotToken,D=nn(Kt(O.gasFee,P.decimals,n.decimals,"ceil"),n.decimals,P.decimals),M=v.get(B),L=M!==void 0&&M>D?M:D,T=q.reduce((H,V)=>H+V.amountOutMinimum,0n);if(L>=T){if(e.budget!=="max")return zl({...e,sources:e.sources.filter(H=>H.asset.location==="rollup"||H.asset.chainId!==B)});y-=nn(T,P.decimals,n.decimals),w.delete(B);for(const H of q)g.splice(g.indexOf(H),1);A=!0;continue}(M===void 0||L!==M)&&(A=!0),v.set(B,L)}if(!A)break;if(I===7)throw new Error("Source fees did not converge. Refresh the quote before submitting.")}let E=0n;for(const[I,b]of w){const A=v.get(I);b[0].gasFeeAmount=A,E+=nn(A,b[0].pivotToken.decimals,n.decimals)}const k=y-E;if(k<=0n)throw o(y,E);let F={gasFee:0n,spicenetFee:0n,bridgeFee:0n},j="estimated";for(let I=0;I<8;I++){r();const b=F.gasFee+F.spicenetFee+F.bridgeFee,A={grossAmount:k,netAmount:k-b,combinedFeeAmount:b,feeExecutionMode:"user-transfer",feeBreakdown:F},R=A.netAmount;if(R<=0n)throw o(y,E+F.gasFee,F.spicenetFee,F.bridgeFee);const B=l.addressesEqual(n.address,e.destinationToken.address)?void 0:await e.resolveDestinationInput(R);if(r(),B&&(B.amountOutMinimum<=0n||B.amountOutMinimum>B.amountOut||!B.calls.length))throw new Error("The purchase conversion has no guaranteed output.");const q=B?.amountOutMinimum??nn(R,n.decimals,e.destinationToken.decimals),O={...A,userAddress:e.beneficiary??t,executorAddress:t,beneficiary:e.beneficiary??t,chainId:n.chainId,destinationToken:e.destinationToken.address,feeToken:n.address,grossAmount:y,netAmount:q,combinedFeeAmount:A.combinedFeeAmount+E},P=await e.buildActionCalls(q,O);if(!P.length&&!B?.calls.length)throw new Error("No action calls configured.");const D={intents:[{intentIndex:0,batches:[{chainId:n.chainId,quotedAmount:R.toString(),totalDebit:k.toString(),gasQuoteSource:j,feeBreakdown:{gasFee:F.gasFee.toString(),spicenetFee:F.spicenetFee.toString(),bridgeFee:F.bridgeFee.toString()}}]}]},M={chainId:n.chainId,calls:[...B?.calls??[],...P],tokenTransfers:[{from:"escrow",to:t,token:n.address,amount:k}]},L=[...C(),...al([M],t,D,{payoutAlreadyGross:!0,requestTimestampMs:e.requestTimestampMs})],T=await e.estimate(L,n.address,k,{userOverride:t,useCustomTransfers:!0,feeExecutionMode:"user-transfer",signal:e.signal,skipUserFundingPreflight:!0}),H=T.intents.flatMap(K=>K.batches);if(T.intents.length!==1||T.intents[0].intentIndex!==0||H.length!==1||H[0].chainId!==n.chainId)throw new Error("The destination fee quote is missing or ambiguous.");const V=l.getSupplyFeePreview(T,{...n,tokenAddress:n.address});if(!V)throw new Error("The destination fee quote cannot be verified.");const te=l.getBatchFees(H[0]);if(te.gasFee<0n||te.spicenetFee<0n||te.bridgeFee<0n)throw new Error("The destination fee quote is invalid.");if(te.spicenetFee>l.calculateBpsFee(k,10n))throw new Error("The destination platform fee exceeds the supported purchase fee.");const Z={gasFee:te.gasFee>F.gasFee?te.gasFee:F.gasFee,bridgeFee:te.bridgeFee>F.bridgeFee?te.bridgeFee:F.bridgeFee,spicenetFee:te.spicenetFee>F.spicenetFee?te.spicenetFee:F.spicenetFee};if(I>0&&Z.gasFee===F.gasFee&&Z.bridgeFee===F.bridgeFee&&Z.spicenetFee===F.spicenetFee)return{fundingPlan:{owner:t,token:n,totalBudget:y,sources:g},batches:L,feeEstimate:D,actionDefinition:{amount:q,context:O,calls:P},actionContext:O,fundingAmount:k,destinationAmount:q,destinationSwap:B,swapInputAmount:R,actionOutputCredits:ho(n.chainId,e.destinationToken.address,B),preview:{symbol:n.symbol,decimals:n.decimals,grossAmount:y,netAmount:R,totalFee:A.combinedFeeAmount+E,gasFee:F.gasFee+E,spicenetFee:A.feeBreakdown.spicenetFee,bridgeFee:F.bridgeFee,gasQuoteSource:j}};F=Z,j=V.gasQuoteSource}throw new Error("Fees did not converge. Refresh the quote before submitting.")}function Eo(e,t,n,s){return n?{to:e,value:s,data:"0x"}:{to:t,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[e,s]})}}async function Hl(e){const t=Eo(e.recipient,e.token,e.isNative,e.amount),[n,s]=await Promise.all([e.client.estimateGas({account:e.account,...t}),e.client.estimateFeesPerGas()]),r=s.maxFeePerGas??s.gasPrice;if(typeof r!="bigint"||r<=0n)throw new Error("Source transaction gas could not be priced.");return(n*r*120n+99n)/100n}function Ua(e,t){return t.isNative?e.sendTransaction({to:t.recipient,value:t.amount,chain:t.viemChain}):e.sendTransaction({to:t.tokenAddr,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[t.recipient,t.amount]}),chain:t.viemChain})}async function gf(e){const{extWc:t,sourceClient:n,recipient:s,tokenAddr:r,isNative:o,amount:i}=e;if(i<=0n)return;await e.observer?.onSending?.(0);let a;try{a=await Ua(t,{recipient:s,tokenAddr:r,isNative:o,amount:i,viemChain:e.viemChain})}catch(m){throw Na(m)&&e.observer?.onRejected?.(0),m}e.observer?.onSubmitted?.(0,a);const d=await mo({client:n,hash:a,call:Eo(s,r,o,i),onRepriced:m=>e.observer?.onSubmitted?.(0,m),onCancelled:()=>e.observer?.onReverted?.(0,a)});a=d.hash;const u=d.receipt;if(u.status!=="success")throw e.observer?.onReverted?.(0,a),new Error("Embedded wallet funding failed");await ql(t,n,u.blockNumber),e.observer?.onConfirmed?.(0,a)}async function Vl(e){const{asset:t,embedded:n,external:s,amount:r}=e;if(!s||!e.externalWallet)throw new Error("Connect the source wallet before funding.");if(r<=0n)return;const o=l.getClientForChain(t.chainId),i=t.isNative||S.isNativeToken(t.address),[a,d]=await Promise.all([Hl({client:o,account:s,recipient:n,token:t.address,isNative:i,amount:r}),o.getBalance({address:s})]);if(d<a+(i?r:0n))throw new Error("The source wallet has insufficient native balance for funding and gas.");const{extWc:u,viemChain:m}=await Ma({wallet:e.externalWallet,account:s,chainId:t.chainId});await gf({extWc:u,sourceClient:o,recipient:n,tokenAddr:t.address,isNative:i,amount:r,viemChain:m,observer:{...e.observer,onSending:async f=>{await e.assertCurrent(),await e.observer?.onSending?.(f)}}})}function Ql(e){const t=p.useContext(l.SpiceFlowProviderContext),n=l.getChainConfig(e.chainId),s=e.address??n?.supportedTokens?.find(g=>g.symbol.toLowerCase()===e.symbol?.toLowerCase())?.address,r=e.symbol??(s&&S.isNativeToken(s)?n?.nativeCurrency?.symbol:n?.supportedTokens?.find(g=>!!s&&l.addressesEqual(g.address,s))?.symbol),o=l.getRpcUrlForChain(e.chainId,t?.rpcOverrides),[i,a]=p.useState(0),d=`${e.chainId}:${s?.toLowerCase()}:${o}:${e.decimals??""}:${r??""}:${i}`,[u,m]=p.useState(null);p.useEffect(()=>{let g=!1;if(!(!e.enabled||!s||!o?.trim()))return Promise.all([e.decimals??l.getTokenDecimals(e.chainId,s,t?.rpcOverrides),r??Kn.readContract(l.getClientForChain(e.chainId,t?.rpcOverrides),{address:s,abi:N.erc20Abi,functionName:"symbol"}).catch(()=>{})]).then(([x,w])=>{if(!Number.isInteger(x)||x<0||x>255)throw new Error("Invalid destination token decimals");g||m({key:d,decimals:x,symbol:w})}).catch(x=>{g||m({key:d,error:x.message})}),()=>{g=!0}},[e.enabled,d]);const f=u?.key===d?u:null,h=p.useMemo(()=>({address:s??S.ZERO_ADDRESS,chainId:e.chainId,decimals:f?.decimals??0,symbol:r??f?.symbol??(s?l.truncateAddress(s):""),logoURI:e.logoURI}),[s,e.chainId,f?.decimals,f?.symbol,r,e.logoURI]),y=e.enabled?s?o?.trim()?f?.error??null:`Configure SpiceFlowProvider rpcOverrides[${e.chainId}] before continuing.`:"Configure the destination token address before continuing.":null;return{token:h,error:y,ready:e.enabled&&!!s&&!!o?.trim()&&f?.decimals!==void 0,refresh:p.useCallback(()=>a(g=>g+1),[])}}function Fo(e,t){const n=!!e&&e.symbol!==void 0&&e.decimals!==void 0,s=Ql({enabled:t&&!!e&&!n,chainId:e?.chainId??0,address:e?.address,decimals:e?.decimals,symbol:e?.symbol,logoURI:e?.logoURI});return{token:e?n?e:s.ready?s.token:void 0:void 0,error:s.error}}const To={address:S.ZERO_ADDRESS,symbol:"",decimals:18,chainId:0};function Gl(e,t,n){return l.addressesEqual(e.address,t)&&e.chainId===n?e._source==="wallet"?0:1:2}function wf(e,t,n,s){const r=Gl(e,n,s)-Gl(t,n,s);return r!==0?r:(t.balanceUsd||0)-(e.balanceUsd||0)}const xf=gc;function Kl(e){const t=p.useContext(l.SpiceFlowProviderContext),n=l.useProviderWallets(),s=t?.embeddedWalletAddress||n.embeddedAddress,r=t?.externalWalletAddress||n.externalAddress,o=(t?.mode||"7702")!=="7702",i=e.destinationToken??To,a=e.enabled&&!!e.destinationToken,d=Ms({...e,owner:s,enabled:a&&!!s&&(!o||e.includeCrossChainEmbeddedAssets!==!1),role:"spend-source",destination:e.destinationToken}),u=Ms({...e,owner:r,enabled:a&&!!r&&(o||e.includeExternalWalletAssets!==!1),role:"spend-source",destination:e.destinationToken});return{displayAssets:p.useMemo(()=>[...d.assets,...u.assets].sort((m,f)=>wf(m,f,i.address,i.chainId)),[d.assets,u.assets,i.address,i.chainId]),filteredSpiceAssets:d.rollupAssets,walletAssets:[...d.walletAssets,...u.walletAssets],embeddedWalletAddress:s,externalAddress:r,isNon7702:o,refreshSpiceAssets:d.refresh,refreshWalletAssets:d.refresh,loading:d.loading||u.loading,refreshing:d.refreshing||u.refreshing,error:d.error||u.error}}function yf(e,t){return!e||e._source!=="wallet"?null:ta(e,t)}function Wa(e){return Yi({aerodrome:!1,oneInch:{chainIds:[]},customVenues:e})}const qa=js(),bf=Wa(qa.input);function Yl(e){return{venue:"mapped-transfer",amountOut:e,amountOutMinimum:e,calls:[]}}function Zl(e){return{venue:"mapped-transfer",amountIn:e,amountInMax:e,amountOut:e,calls:[]}}async function Ur(e){if(l.addressesEqual(e.tokenIn,e.tokenOut))return Yl(e.amountIn);if(e.resolveInputSwap){const n=await e.resolveInputSwap({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:e.amountIn,maxSlippage:e.maxSlippage},e.chainId,e.recipient);if(n)return n}const t=await(e.liquidityVenues?Wa(js(e.liquidityVenues).input):bf).resolveSwap({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:e.amountIn,maxSlippage:e.maxSlippage},e.chainId,e.recipient,e.selectedSwap);if(!t)throw new Error("No liquidity for this pair.");return t}async function Xl(e){return l.addressesEqual(e.tokenIn,e.tokenOut)?Zl(e.amountOut):Nr({customVenues:e.liquidityVenues?js(e.liquidityVenues).output:qa.output}).getQuote({tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountOut:e.amountOut,maxSlippage:e.maxSlippage},e.chainId,e.recipient)}function Jl(e){const{enabled:t=!0,direction:n,selectedAsset:s,destinationToken:r,chainId:o=r.chainId,recipient:i,paymentAmount:a,maxSlippage:d,refreshIntervalMs:u,resolveInputSwap:m,resolveExactOutputSwap:f}=e,h=p.useContext(l.SpiceFlowProviderContext),y=h?.liquidityVenues,g=JSON.stringify([h?.network,h?.apiUrl,h?.rpcOverrides]),[x,w]=p.useState(!1),[v,C]=p.useState(null),[E,k]=p.useState(null),[F,j]=p.useState(null),[I,b]=p.useState(null),[A,R]=p.useState(null),[B,q]=p.useState(null),[O,P]=p.useState(null),[D,M]=p.useState(null),[L,T]=p.useState(null),[H,V]=p.useState(null),[te,Z]=p.useState(null),[K,Y]=p.useState(null),[J,ge]=p.useState(null),[pe,we]=p.useState(null),[ve,ne]=p.useState(0),[_,le]=p.useState(null),[W,De]=p.useState(null),Ae=p.useRef(null),z=p.useRef(null),Q=p.useRef(0),se=p.useRef(new Map),ie=p.useCallback(()=>{Q.current++,se.current.clear(),De(null),ne(ae=>ae+1)},[]),X=u&&u>0?u:null,oe=y?JSON.stringify(y):"",je=p.useMemo(()=>y?js(y):qa,[oe]),Me=p.useMemo(()=>Wa(je.input),[je]),me=p.useMemo(()=>Nr({customVenues:[...f?[{name:"consumer-exact-output",chainIds:[o],preferred:!0,resolve:f}]:[],...je.output]}),[f,o,je]);p.useEffect(()=>{se.current.clear()},[me]);const Se=p.useMemo(()=>t?yf(s?.asset,o):null,[t,s?.asset,o]),Te=p.useMemo(()=>{if(!t||!s?.asset)return null;if(Se)return Se.destination.address;const ae=Mn(s.asset,o);if(ae)return ae;const dt=ls(s.asset.address,o,s.asset.chainId);return dt?dt.address:null},[t,s?.asset,o,Se]),be=p.useMemo(()=>t&&s?.asset?Ks(s.asset,o):[],[t,s?.asset,o]),qe=p.useMemo(()=>be.map(ae=>ae.toLowerCase()).join(","),[be]),ye=JSON.stringify([t,g,s?.asset.owner,s?.asset.location,s?.asset.receiptTokenId,s?.asset.address,s?.asset.chainId,s?.asset.decimals,s?.amount,o,qe,n,a]);p.useEffect(()=>{let ae=!1;if(z.current&&(clearTimeout(z.current),z.current=null),!t||!s?.asset||Se||be.length<=1){ge(null),we(null);return}return z.current=setTimeout(async()=>{const dt=n==="input"?s.amount:a||"0";let ut=0n;try{ut=n==="input"?ln(dt,s.asset.decimals):0n}catch{ut=0n}try{const Pe=await fc(s.asset,o,{requiredAmount:ut});ae||(ge(Pe),we(ye))}catch{ae||ge(null)}},400),()=>{ae=!0,z.current&&(clearTimeout(z.current),z.current=null)}},[ye]);const Ue=p.useMemo(()=>(pe===ye?J:null)??Te,[J,pe,ye,Te]),de=p.useMemo(()=>!s?.asset||!Ue?[]:[Ue,...be.filter(ae=>ae.toLowerCase()!==Ue.toLowerCase())],[s?.asset,Ue,be]),Ye=p.useMemo(()=>!s?.asset||!Cr(s.asset.address,s.asset.chainId,r.address,r.chainId)||!Ue?!1:l.addressesEqual(Ue,r.address),[s,r.address,r.chainId,Ue]),pt=Ue?l.addressesEqual(Ue,r.address):!1,tt=n==="output"&&parseFloat(a||"0")===0,$e=t&&!!s?.asset&&!Ye&&!pt&&!tt,Ge=JSON.stringify([t,oe,n,$e,g,s?.asset.owner,s?.asset.location,s?.asset.receiptTokenId,s?.asset.address,s?.asset.chainId,s?.asset.decimals,n==="input"?s?.amount:a,de.map(ae=>ae.toLowerCase()),o,r.address.toLowerCase(),r.chainId,r.decimals,i?.toLowerCase(),d,X,Se?.source.address.toLowerCase()??""]),Fe=p.useMemo(()=>({}),[Ge,Me,me,m,ve]),Ie=W?.request===Fe&&(!X||W.expiresAt>Date.now());p.useEffect(()=>{if(!X||W?.request!==Fe)return;const ae=setTimeout(ie,Math.max(0,W.expiresAt-Date.now()));return()=>clearTimeout(ae)},[X,W,Fe,ie]),p.useEffect(()=>{Ae.current&&clearTimeout(Ae.current),le(Fe),De(null),C(null);const ae=n==="input"?s?.amount:a,dt=parseFloat(ae||"0");if(!t||!Number.isFinite(dt)||dt<=0||!s?.asset||!i||de.length===0){Q.current++,k(null),j(null),b(null),R(null),q(null),P(null),M(null),Y(null),C(null),w(!1);return}const ut=s.asset.decimals;let Pe;try{Pe=n==="input"?ln(s.amount,ut):ln(a||"0",r.decimals)}catch(ot){Q.current++,C(ot instanceof Error?ot.message:"Invalid amount or token precision"),w(!1);return}const vt=++Q.current,Tt=()=>vt!==Q.current;w(!0);const Jt=n==="output"?150:100,St=async(ot,ze,at,rt={chainId:o,tokenOut:r.address,amountIn:Pe},wt=de)=>{for(const ee of wt){const ft=`${g}:${oe}:${n}:${rt.chainId}:${ee.toLowerCase()}:${rt.tokenOut.toLowerCase()}:${rt.amountIn.toString()}:${i.toLowerCase()}:${d??"default"}:${X??"default"}`,Re=se.current.get(ft),He=Re&&Re.expiresAt>Date.now()?ot(Re):void 0;if(He)return{quote:He,tokenIn:ee,expiresAt:Re.expiresAt};const et=await at(ee);if(Tt())return"stale";if(!et)continue;const it=Date.now()+Math.min(X??3e4,3e4);return se.current.set(ft,{expiresAt:it,direction:n,...ze(et)}),{quote:et,tokenIn:ee,expiresAt:it}}return null},dn=ot=>St(ze=>ze.resolvedSwap,ze=>({resolvedSwap:ze}),async ze=>{const at=!Se&&ot.chainId===o&&s.asset._source!=="wallet",rt=at?await es(s.asset,ze,ot.chainId,r):ut;if(Tt())return null;const wt=at?nn(ot.amountIn,ut,rt):ot.amountIn;if(l.addressesEqual(ze,ot.tokenOut))return Yl(wt);const ee={type:"swap",tokenIn:ze,tokenOut:ot.tokenOut,amountIn:wt,maxSlippage:d};if(m){const ft=await m(ee,ot.chainId,i);if(ft)return ft}return Me.resolveSwap(ee,ot.chainId,i)},ot,ot.candidates);return Ae.current=setTimeout(async()=>{try{if(n==="input"){let ot=null,ze=Pe;if(Se){if(ot=await dn({chainId:Se.source.chainId,tokenOut:Se.source.address,amountIn:Pe,candidates:[s.asset.address]}),ot==="stale"||Tt())return;if(!ot)throw new Error("No liquidity for this pair");ze=Kt(ot.quote.amountOutMinimum,Se.source.decimals,Se.destination.decimals,"floor")}let at=Se,rt=null;if(Se){const it=await pc(Se.destination,r,async Qe=>{const At=Kt(ze,Se.destination.decimals,Qe.decimals,"floor"),mt=await dn({chainId:o,tokenOut:r.address,amountIn:At,candidates:[Qe.address]});return mt&&mt!=="stale"?{amount:At,value:mt}:null});if(Tt())return;if(!it)throw new Error("No liquidity for this pair");at={...Se,destination:it.token},ze=it.amount,rt=it.value}else rt=await dn({chainId:o,tokenOut:r.address,amountIn:ze,candidates:de});const wt=at?!l.addressesEqual(at.destination.address,r.address):$e;if(rt==="stale"||Tt())return;if(!rt)throw new Error("No liquidity for this pair");const ee=rt?rt.quote.amountOut:ze,ft=Math.min(rt?.expiresAt??1/0,ot?.expiresAt??1/0),Re=at?.destination.decimals??await es(s.asset,rt.tokenIn,o,r),He=!Se&&s.asset._source!=="wallet"?nn(ze,ut,Re):ze;if(Tt())return;Y(rt?.tokenIn??at?.destination.address??null),Z(at),De({request:Fe,key:`${N.keccak256(N.toHex(Ge))}:${vt}`,expiresAt:ft}),M(ee),T(He),V(Re),b(wt?rt?.quote??null:null),R(ot?.quote??null),q(null),P(null);const et=parseFloat(N.formatUnits(ee,r.decimals));k(et<.01?et.toPrecision(4):et.toLocaleString(void 0,{maximumFractionDigits:6})),j(null),C(null)}else{const ot=Re=>St(He=>He.exactOutputSwap,He=>({exactOutputSwap:He}),async He=>{try{return l.addressesEqual(He,Re.tokenOut)?Zl(Re.amountOut):await me.getQuote({tokenIn:He,tokenOut:Re.tokenOut,amountOut:Re.amountOut,maxSlippage:d},Re.chainId,i)}catch{return null}},{chainId:Re.chainId,tokenOut:Re.tokenOut,amountIn:Re.amountOut},Re.candidates);let ze=Se,at=null;if(Se){const Re=await pc(Se.destination,r,async He=>{const et=await ot({chainId:o,tokenOut:r.address,amountOut:Pe,candidates:[He.address]});return et&&et!=="stale"?{amount:et.quote.amountInMax,value:et}:null});if(Tt())return;if(!Re)throw new Error("No liquidity for this pair");ze={...Se,destination:Re.token},at=Re.value}else at=await ot({chainId:o,tokenOut:r.address,amountOut:Pe,candidates:de});if(at==="stale"||Tt())return;if(!at)throw new Error("No liquidity for this pair");const rt=!ze||!l.addressesEqual(ze.destination.address,r.address);let wt=null;if(Se){const Re=at?at.quote.amountInMax:Pe;if(wt=await ot({chainId:Se.source.chainId,tokenOut:Se.source.address,amountOut:Kt(Re,ze.destination.decimals,Se.source.decimals,"ceil"),candidates:[s.asset.address]}),wt==="stale"||Tt())return;if(!wt)throw new Error("No liquidity for this pair")}const ee=wt?ut:await es(s.asset,at.tokenIn,o,r);if(Tt())return;Y(at?.tokenIn??ze?.destination.address??null),Z(ze),De({request:Fe,key:`${N.keccak256(N.toHex(Ge))}:${vt}`,expiresAt:Math.min(at?.expiresAt??1/0,wt?.expiresAt??1/0)}),P(rt?at?.quote??null:null),q(wt?.quote??null),b(null),R(null),M(null);const ft=wt?.quote.amountIn??at.quote.amountIn;j(N.formatUnits(ft,ee)),k(null),C(null)}}catch(ot){if(Tt())return;const ze=ot instanceof Error?ot.message:"Failed to get quote";C(ze),k(null),j(null),b(null),R(null),q(null),P(null),M(null),Y(null)}finally{Tt()||w(!1)}},$e||Se?Jt:0),()=>{Q.current++,Ae.current&&clearTimeout(Ae.current)}},[Fe]);const lt=Ie?K??Ue:Ue,_e=lt?l.addressesEqual(lt,r.address):pt;return{inputAmount:Ie&&n==="input"?L:null,inputDecimals:Ie&&n==="input"?H:null,quoteKey:Ie?W.key:null,quoteExpiresAt:Ie?W.expiresAt:null,refreshQuote:ie,isQuoting:_===Fe?x:$e||!!Se,quoteError:_===Fe?v:null,estimatedOutput:Ie?E:null,estimatedInput:Ie?F:null,resolvedSwap:Ie?I:null,exactOutputSwap:Ie?O:null,quoteAmountOut:Ie?D:null,resolvedTokenIn:lt,isDirect:_e,needsSwap:Ie?!_e:$e,selectedIsEquivalent:Ye,sourceSwap:Ie?A:null,sourceExactOutputSwap:Ie?B:null,pivot:Ie?te:Se}}function Wr(e){const{enabled:t=!0,destinationToken:n,selectedAsset:s,paymentAmount:r="0",sourceChains:o,supportedSourceAssets:i,buildActionCalls:a,feeExecutionMode:d="user-transfer",buildSpicenetBatch:u,onPayExecute:m,resolveExactOutputSwap:f,amountDirection:h=e.feeOnlyAction?"output":e.fundingSources?"input-inclusive":"input",onSuccess:y,onError:g}=e,x=Fo(n,t),w=x.token??To,v=!!e.fundingSources,C=!!e.combineSourceBalances||v,E=Fo(e.fundingSources?.token,t&&v),k=E.token??To,F=t&&!!x.token,j=h==="output",I=h==="input-inclusive",b=e.feeFunding?.length!==0&&(e.actionProceeds==="output"||!!e.feeFunding?.length),A=j?"output":"input",R=w.chainId,B=p.useContext(l.SpiceFlowProviderContext),q=l.resolveFeeToleranceBps(B?.feeToleranceBps),O=B?.mode||"7702",P=!1,D=!!B?.isWhitelistGateActive,M=!!B?.isWhitelistConfigured&&B?.isUserWhitelisted!==!0,L=p.useMemo(()=>o??B?.supportedChainIds??[],[o,B?.supportedChainIds]),T=i,{address:H,isConnected:V,isReady:te,isAuthenticated:Z,provider:K}=l.useWallet(),{execute:Y,estimate:J,clearStatus:ge}=Js(),{externalWallet:pe,embeddedAddress:we,activeWallet:ve,activeAddress:ne}=l.useProviderWallets(),_=B?.externalWalletAddress,le=B?.embeddedWalletAddress||we,W=s,De=Ys(W?.asset,O!=="7702"),Ae=!!W&&W.asset.chainId===w.chainId&&l.addressesEqual(S.normalizeNativeTokenAddress(W.asset.address),S.normalizeNativeTokenAddress(w.address)),z=!e.quoteOnlyAccount&&(O!=="7702"||e.actionExecution?.wallet==="external")&&De&&Ae&&(!j||Number(r)>0)&&!e.feeOnlyAction&&!e.actionProceeds,Q=De&&!z,se=e.actionExecution?.wallet==="external"&&!z,ie=se?[w.chainId,...W?.asset._source==="wallet"?[W.asset.chainId]:[]].find(U=>!B?.rpcOverrides?.[U]):void 0,X=v&&(h!=="input-inclusive"||W||e.feeOnlyAction||e.actionInput||e.actionProceeds||e.actionExecution||O!=="7702")?"Combined funding supports an input-inclusive account purchase without a selected token.":v&&E.error?E.error:x.error?x.error:m?"Move onPayExecute protocol calls to buildActionCalls and application updates to onSuccess before continuing.":se&&(j&&!(Number(r)>0)||e.feeOnlyAction||e.actionProceeds||e.prependSourceEscrow||S.isNativeToken(w.address))?"External wallet execution requires a positive ERC20 supply or payment with SDK-managed funding.":ie!==void 0?`Configure rpcOverrides for chain ${ie} before routing to the external caller.`:null,oe=p.useMemo(()=>se&&_?(U,G)=>ff(U,G,_):a,[se,_,a]),{displayAssets:je,filteredSpiceAssets:Me,walletAssets:me,embeddedWalletAddress:Se,refreshSpiceAssets:Te,refreshWalletAssets:be,loading:qe,refreshing:ye,error:Ue}=Kl({address:H,destinationToken:w,supportedSourceAssets:T,sourceChains:L,additionalSourceTokens:[...e.additionalSourceTokens??[],...W?.asset._source==="wallet"?[{address:W.asset.address,chainId:W.asset.chainId,decimals:W.asset.decimals,symbol:W.asset.symbol,name:W.asset.name,logoURI:W.asset.logoURI}]:[]],includeExternalWalletAssets:e.includeExternalWalletAssets,includeCrossChainEmbeddedAssets:e.includeCrossChainEmbeddedAssets,enabled:F&&(!!e.quoteOnlyAccount||(O!=="7702"?!!_:!!le))}),de=e.quoteOnlyAccount??Se,Ye=[...me,...Me].filter(U=>!v||U.location!=="external"&&l.addressesEqual(U.owner,le)),pt=JSON.stringify(Ye,(U,G)=>typeof G=="bigint"?G.toString():G),tt=p.useMemo(()=>Ye,[pt]),$e=JSON.stringify([C,le,R,tt.map(U=>[xe(U),U.balance.toString(),U.decimals,U.receiptTokenDecimals,U.balanceStatus,U.balanceError,U.chainTokens])]),[Ge,Fe]=p.useState(null),Ie=p.useCallback(U=>C?jr(U,tt,le??void 0,R):void 0,[C,tt,le,R]);p.useEffect(()=>{if(!C||!F||!le)return;let U=!1;Fe(null);const G=new Map;for(const $ of tt){const he=Ie($);if(he)G.set(xe(he.escrow),he);else if($.location==="rollup"&&$.owner?.toLowerCase()===le.toLowerCase()&&$.chainId===R&&!$.balanceError&&$.balanceStatus!=="stale"){const ue=Object.entries($.chainTokens??{}).filter(([Ce])=>Ce.toLowerCase().startsWith(`evm:${R}:`));ue.length===1&&ue[0][1].decimals!==void 0&&G.set(xe($),{owner:$.owner,chainId:R,token:ue[0][0].split(":")[2],decimals:ue[0][1].decimals,escrow:$})}}return Promise.allSettled([...G].map(async([$,he])=>{const ue=await us(he.owner,he.chainId,he.token);if(!ue.entries.some(Ce=>Ce.receiptToken===he.escrow.receiptTokenId&&Ce.decimals===he.escrow.receiptTokenDecimals))throw new Error("The cash receipt mapping changed. Refresh before submitting.");return[$,Kt(ue.available,he.decimals,he.escrow.decimals,"floor")]})).then($=>{const he=$.flatMap(ue=>ue.status==="fulfilled"?[ue.value]:[]);U||Fe({scope:$e,balances:Object.fromEntries(he)})}),()=>{U=!0}},[C,F,le,$e,Ie]);const lt=p.useCallback(U=>!C||U.owner?.toLowerCase()!==le?.toLowerCase()||U.chainId!==R?!1:tt.some(G=>G.owner?.toLowerCase()===U.owner?.toLowerCase()&&G.chainId===R&&(U.location==="embedded"&&G.location==="rollup"&&Object.keys(G.chainTokens??{}).some($=>$.toLowerCase()===`evm:${R}:${U.address.toLowerCase()}`)||U.location==="rollup"&&G.location==="embedded"&&Object.keys(U.chainTokens??{}).some($=>$.toLowerCase()===`evm:${R}:${G.address.toLowerCase()}`))),[C,le,R,tt]),_e=p.useCallback((U,G)=>{const $=tt.find(Ce=>xe(Ce)===xe(U));if(!$)return;const he=Ie($);if(!he||Ge?.scope!==$e)return;const ue=Ge.balances[xe(he.escrow)];if(ue!==void 0)return jr($,tt,le??void 0,R,ue,G)},[Ie,Ge,$e,tt,le,R]),ae=p.useCallback(U=>{if(!C)return U.balance;const G=tt.find($=>xe($)===xe(U));if(!(!G||G.balanceError||G.balanceStatus==="stale")&&!(C&&G.location!=="external"&&G.owner?.toLowerCase()!==le?.toLowerCase()))return lt(G)?_e(G)?.availableBalance:C&&G.location==="rollup"?Ge?.scope===$e?Ge.balances[xe(G)]:void 0:G.balance},[tt,lt,_e,C,Ge,$e,le]),dt=p.useMemo(()=>{if(!C)return je;const U=new Set;return je.filter(G=>{const $=Ie(G);if(!$)return!0;const he=xe($.escrow);return U.has(he)?!1:(U.add(he),!0)})},[je,C,Ie]),ut=JSON.stringify(e.fundingSources?.positionIds??[]),Pe=p.useMemo(()=>{if(!v||!E.token||!le)return[];const U=new Set(JSON.parse(ut));return tt.filter(G=>U.has(xe(G))&&Pr(G,le,k)&&(G.location==="rollup"||L.includes(G.chainId))&&Yn(G,"spend-source",{...B,isWhitelistGateActive:D},k,T).eligible)},[v,E.token,le,ut,tt,k,L,B,T]),vt=p.useMemo(()=>Pe.flatMap(U=>{const G=U.location==="rollup"?Ge?.scope===$e?Ge.balances[xe(U)]:void 0:U.balance;return G===void 0||G<=0n||G>U.balance?[]:[{asset:U,availableAmount:G,reservedAmount:U.balance-G}]}),[Pe,Ge,$e]),Tt=JSON.stringify(vt,(U,G)=>typeof G=="bigint"?G.toString():G),Jt=e.feeFunding===void 0&&O==="7702"&&!z&&!se&&W?.asset._source==="wallet"&&W.asset.chainId===R&&!_e(W.asset),St=b||Jt||e.feeFunding?.length!==0&&j&&!!W&&!!_e(W.asset),dn=p.useMemo(()=>e.feeOnlyAction||St||se?je.filter(U=>U.balance>0n&&U.location!=="external"&&(U._source==="spice"||U._source==="wallet"&&U.chainId===R)).flatMap(U=>{if(!C||U.location!=="rollup")return[U];const G=Ge?.scope===$e?Ge.balances[xe(U)]:void 0;return G===void 0?[]:[{...U,balance:G}]}):[],[je,e.feeOnlyAction,St,se,R,C,Ge,$e]),ot=!!e.feeOnlyAction||St||se,ze=ot&&qe,at=ot?dn.map(U=>`${xe(U)}:${U.balance}:${U.balanceError??""}:${U.balanceStatus??""}`).sort().join(",")+`:${Ue??""}`:"",rt=W?[...me,...Me].find(U=>xe(U)===xe(W.asset)):void 0,wt=p.useMemo(()=>W&&rt?{...W,asset:rt}:W,[W,rt]),ee=W?Yn(rt??W.asset,"spend-source",{allowedTokens:B?.allowedTokens,rpcOverrides:B?.rpcOverrides,liquidityVenues:B?.liquidityVenues,isWhitelistGateActive:D},w,T):null,ft=W&&rt?_e(rt):void 0,Re=C?W&&rt?ae(rt):void 0:W?.asset.balance,He=C&&W&&(lt(W.asset)||W.asset.location==="rollup")?Re??0n:rt?rt.balance<(W?.asset.balance??0n)?rt.balance:W.asset.balance:0n,[et,it]=p.useState(!1),[Qe,At]=p.useState(!1),mt=p.useRef(!1),Mt=p.useRef(!1),ht=p.useRef(!0);p.useLayoutEffect(()=>(ht.current=!0,()=>{ht.current=!1,wn.current.accepted&&ke.current?.abort()}),[]);const[An,un]=p.useState(null),[Cn,Zn]=p.useState(null),gn=p.useRef(0),wn=p.useRef({accepted:!1}),$t=p.useRef(g);$t.current=g;const Ft=p.useCallback(U=>{un(U),typeof U=="string"&&U&&$t.current?.(new Error(U),l.getRelayerErrorDetail(U))},[]),[Pt,Ut]=p.useState("idle"),[Ht,Rt]=p.useState(""),[Ze,It]=p.useState(null),[En,en]=p.useState(!1),[sn,rn]=p.useState(null),[xn,Yt]=p.useState(null),[Fn,Ke]=p.useState(!1),[yn,pn]=p.useState(!1),Xn=p.useRef(null),[kn,Tn]=p.useState(null),Jn=p.useRef(W),fe=p.useRef(!1),ke=p.useRef(null),Be=p.useRef(null),gt=de||we||H,Dt=l.relayerService.getBaseUrl(),Ee=`${Dt}:${gt?.toLowerCase()??""}`,Zt=p.useRef(Ee);Zt.current=Ee;const[xt,Qt]=p.useState({scope:Ee,checking:!1,supported:null,pending:!1,error:null}),fn=p.useRef(0),Wt=p.useRef(null),Vt=p.useRef(0),Nt=p.useRef({scope:Ee,supported:null,terminal:new Map}),_t=p.useRef(null),qt=p.useRef(null),Rn=p.useRef(null),mn=p.useRef(null),nt=p.useRef(null),Gt=p.useRef(y),ps=p.useRef(null),Ss=p.useRef(!1),[Ls,fs]=p.useState(null),[Vn,zs]=p.useState(null),[re,Oe]=p.useState(!1),[Ct,Ve]=p.useState(0),We=sn?.status==="success"?sn.txHash:Pt==="success"?Ze:null,st=!!We&&Ls!==We,bn=p.useRef(st);bn.current=st;const Pn=p.useCallback(async(U,G=!1)=>{if(Wt.current?.scope===Ee&&Wt.current.version===Vt.current&&!G)return!1;const $=Be.current?.scope===Ee?Be.current.progress:void 0;if(z&&!$?.actionId&&$?.submissionStatus!=="unknown"||!gt)return!0;const he=++fn.current,ue=()=>ht.current&&Zt.current===Ee&&fn.current===he,Ce=new l.RelayerService;Ce.setBaseUrl(Dt),Qt(ce=>({...ce.scope===Ee?ce:{supported:null,pending:!1},scope:Ee,checking:!0,error:null}));try{Nt.current.scope!==Ee&&(Nt.current={scope:Ee,supported:null,terminal:new Map});const ce=Nt.current,Ne=U&&ce.supported!==null?ce.supported:await Ce.supportsAutomaticContinuation();if(!ue())return!1;ce.supported=Ne;const yt=Be.current?.scope===Ee?Be.current:null;let ct=yt?.progress;if(ct?.submissionStatus==="unknown"&&!ct.actionId){const jt=ct.idempotencyKey;if(!jt)throw new Error("The original submission identity is unavailable.");const bt=await Ce.getActionBySubmission(gt,jt);if(!ue())return!1;if(!bt)return Qt({scope:Ee,supported:Ne,checking:!1,pending:!0,error:null}),!1;const[zt,kt="0"]=bt.intentIds[0].split("/");ct={...ct,actionId:zt,intentId:bt.intentIds[0],intentIndex:Number(kt),autoContinue:bt.autoContinue===!0,submissionStatus:void 0},yt&&(yt.progress=ct)}const os=Ne?U??await Ce.getWalletActions(gt,{pendingOnly:!0}):[];if(!ue())return!1;let In=!1,cn,$n,xs=0;const ys=new Set([...ct?.actionId?[ct.actionId]:[],...os.map(jt=>jt.actionId)]);for(const jt of ce.terminal.keys())ys.has(jt)||ce.terminal.delete(jt);for(const jt of ys){const bt=os.find(Je=>Je.actionId===jt);if(bt&&bt.intents.length!==1){In=!0,cn??(cn=bt);break}const zt=ct?.actionId===jt,kt=zt&&yt?.routedExternal||!!bt?.externalExecution&&bt.externalExecution.recoveryKey===e.actionExecution?.recoveryKey&&!!_&&l.addressesEqual(bt.externalExecution.executor,_);let Xt;if(kt){if(Xt=await Ce.getExternalExecution(jt),!ue())return!1;if(Xt.recoveryKey!==e.actionExecution?.recoveryKey||!_||!l.addressesEqual(Xt.executor,_))throw Error("The original external action belongs to another wallet or application action.");if(Xt.executionMode==="wallet-envelope"){if(zt&&ct?.step!=="success"){In=!0,cn??(cn=bt),$n={actionId:jt,state:Xt};break}continue}if(Xt.status!=="complete"){if(Xt.calls.some(Je=>Je.status==="conflict"))throw Error("The original external wallet action failed. Check wallet activity before starting another action.");In=!0,cn??(cn=bt),$n={actionId:jt,state:Xt};break}}const Wn=zt?ct.intentIndex??0:0,Os=`${jt}/${Wn}`;let tn=ce.terminal.get(jt)??"unresolved";if(Ne&&tn==="unresolved"){if(xs===4){In=!0,cn??(cn=bt);break}xs++,tn=await Ce.getIntentRecoveryStatus(jt,Wn)}else!Ne&&zt&&ct?.totalSteps&&(await Promise.all(Array.from({length:ct.totalSteps},(Je,Dn)=>Ce.checkStepStatus(Os,Dn,!0)))).every(Je=>Je.data.status==="success")&&(tn="completed");if(!ue())return!1;if(tn==="unresolved"){In=!0,cn??(cn=bt);break}if(ce.terminal.set(jt,tn),ce.terminal.size>100&&ce.terminal.delete(ce.terminal.keys().next().value),!(!zt||!yt)){if(tn==="completed"&&ct?.step!=="success"&&mt.current){In=!0;break}if(tn==="completed"&&ct?.step!=="success"&&!mt.current){let Je;if(yt.routedExternal){const Dn=Xt??await Ce.getExternalExecution(jt),Nn=Dn.calls[Dn.calls.length-1];if(Dn.status!=="complete"||!Nn?.transactionHash)throw Error("The original external wallet action is not confirmed yet.");Je=await pa(l.getClientForChain(Dn.chainId),Nn.transactionHash)}else{const Dn=yt.batches;let Nn=ct?.destinationStepIndex,Gs=ct?.destinationChainId;if(Nn===void 0||Gs===void 0){if(ct?.totalSteps!==Dn?.length)throw new Error("The original destination is unavailable. Check this action's status before continuing.");for(Nn=(Dn?.length??0)-1;Nn>=0&&S.isSpicenetChainId(Dn[Nn].chainId);)Nn--;Gs=Dn?.[Nn]?.chainId}if(!Number.isSafeInteger(Nn)||Nn<0||Nn>=(ct?.totalSteps??0)||!Number.isSafeInteger(Gs)||!Gs||S.isSpicenetChainId(Gs))throw new Error("The original destination is unavailable. Check this action's status before continuing.");const Qd=await Ce.checkStepStatus(Os,Nn,!0);if(!ue())return!1;Je=await pa(l.getClientForChain(Gs),Qd.data.transactionHash)}if(!ue())return!1;ct={...ct,step:"success",message:"Transaction confirmed",txHash:Je,submissionStatus:void 0},yt.progress=ct,It(Je),Ut("success"),un(null),Rt("Transaction confirmed"),rn(Dn=>Dn&&{status:"success",txHash:Je})}else tn==="cancelled"&&(yt.progress=void 0)}}return Qt({scope:Ee,supported:Ne,checking:!1,pending:In,error:null,action:cn,...$n?{externalExecution:$n.state,externalActionId:$n.actionId}:{}}),!In}catch(ce){return ue()&&Qt(Ne=>({...Ne,scope:Ee,supported:Nt.current.scope===Ee?Nt.current.supported:null,checking:!1,pending:!0,error:l.sanitizeError(ce,"The original action status is unavailable. Check again before submitting.")})),!1}},[z,gt,Ee,Dt,_,e.actionExecution?.recoveryKey]),on=Be.current?.scope===Ee?Be.current.progress:void 0,As=!!gt&&(!z||on?.submissionStatus==="unknown"||!!on?.actionId&&on.step!=="success"),Un=xt.scope===Ee,Qn=As&&Un&&xt.pending,an=uo(gt,As&&Un&&xt.supported===!0&&(F||Qn),{pendingOnly:!0}),zr=p.useRef({scope:Ee,...an});zr.current={scope:Ee,...an};const Hr=p.useRef(null),ss=p.useCallback(async()=>{await Pn(),an.error&&an.refresh()},[Pn,an.refresh,an.error]),ms=As&&(Un?xt.checking||xt.supported===null&&!xt.error||an.loading:!0),Es=As&&Un?xt.error??an.error:null,Fd=!As||Un&&!ms&&!Qn&&!Es;p.useEffect(()=>{if(!(!F&&!on?.actionId&&on?.submissionStatus!=="unknown"))return Pn(),()=>{fn.current++,Wt.current?.scope===Ee&&(Wt.current=null)}},[Ee,F,Pn]),p.useEffect(()=>{if(!an.updatedAt||an.loading||an.error||Wt.current?.scope===Ee&&Wt.current.version===Vt.current)return;const U=Hr.current;U?.scope===Ee&&U.revision===an.revision||(Hr.current={scope:Ee,revision:an.revision},Pn(an.actions))},[an.revision,an.loading,an.error,Qe,Ee,Pn]),p.useEffect(()=>{Jn.current=W},[W]);const Bt=z?_:de||we||H,Bn=F&&!et&&Pt==="idle"&&!X&&!M&&!!Bt&&!z&&!j&&I&&d==="user-transfer"&&!e.feeOnlyAction&&!e.actionInput&&!e.actionProceeds&&!!W&&Number(W.amount||"0")===0&&!!ee?.eligible&&He>0n,ir=p.useMemo(()=>{if(!Bn||!W)return W;const U=10n**BigInt(W.asset.decimals);return{...W,amount:N.formatUnits(He<U?He:U,W.asset.decimals)}},[Bn,W,He]),Vr=Jl({enabled:F&&!M&&!z&&!v,direction:A,selectedAsset:ir,destinationToken:w,chainId:R,recipient:Bt,paymentAmount:r,resolveExactOutputSwap:f,resolveInputSwap:e.resolveInputSwap,maxSlippage:e.maxSlippage}),Hs=z?{...Vr,quoteKey:"direct-external",quoteExpiresAt:null,quoteAmountOut:null,inputAmount:null,inputDecimals:W?.asset.decimals??null,isQuoting:!1,quoteError:null,isDirect:!0,needsSwap:!1,selectedIsEquivalent:!0,resolvedTokenIn:w.address,resolvedSwap:null,exactOutputSwap:null,sourceSwap:null,sourceExactOutputSwap:null,pivot:null,estimatedInput:j?r:W?.amount??null,estimatedOutput:j?r:W?.amount??null}:Vr,Et=Hs,{isQuoting:ri,resolvedSwap:Qr,exactOutputSwap:Gr,quoteAmountOut:oi,resolvedTokenIn:On,isDirect:ai,needsSwap:rs,selectedIsEquivalent:Td,sourceSwap:Kr,sourceExactOutputSwap:Yr,pivot:Ot}=Hs,Gn=j||v?parseFloat(r||"0"):parseFloat(W?.amount||"")||0,Rd=W?.asset?._source==="wallet",Bd=!!W?.asset&&Rd&&W.asset.chainId!==R,Od=W?Number(N.formatUnits(He,W.asset.decimals)):0,jd=p.useMemo(()=>{if(!W||j)return!1;try{return ln(W.amount||"0",W.asset.decimals)>He}catch{return!0}},[W,j,He]);p.useEffect(()=>{if(!F){gn.current++,Zn(null),ge?.(),Ft(null),it(!1);const U=on?.submissionStatus==="unknown"||!!on?.actionId&&on.step!=="success";!st&&!Qn&&!U&&(Ut("idle"),Rt(""),It(null),en(!1),rn(null),Be.current?.scope===Ee&&(Be.current.progress=void 0)),Yt(null),Ke(!1),pn(!1),Tn(null),fe.current=!1,ke.current&&!Qn&&!U&&(ke.current.abort(),ke.current=null)}},[F,st,Qn,Ee]);const ii=p.useCallback(U=>{if(!ht.current||Zt.current!==Ee||U.user&&!l.addressesEqual(U.user,gt))return;const G=Be.current;G?.scope===Ee&&(U.actionId||U.submissionStatus==="unknown")&&((!G.progress?.actionId&&U.actionId||!G.progress?.submissionStatus&&U.submissionStatus==="unknown")&&fn.current++,G.progress={...G.progress,...U},Qt($=>({...$,scope:Ee,checking:!1,pending:U.step!=="success",error:null}))),Ut({building:"building","signing-delegation":"signing-delegation","signing-intent":"signing-intent",submitting:"submitting",executing:"executing",success:"success",error:"error"}[U.step]||"executing"),Rt(U.message),U.txHash&&It(U.txHash)},[Ee,gt]),Fs=p.useMemo(()=>({currentPaymentAmount:r,isFeeInclusiveInput:I,feeOnlyAction:e.feeOnlyAction,swapInputAmount:Hs.inputAmount,destinationToken:w,embeddedWalletAddress:de,providerEmbeddedAddress:we,externalWalletAddress:_,address:H,recipient:e.recipient??(O!=="7702"?_:void 0),isNon7702:P,isPayMode:j,resolvedChainId:R,buildActionCalls:oe,feeExecutionMode:d,buildSpicenetBatch:u,selectedAsset:W,combinedSourceGroup:ft,needsSwap:rs,resolvedSwap:Qr,exactOutputSwap:Gr,quoteAmountOut:oi,resolvedTokenIn:On,sourceSwap:Kr,sourceExactOutputSwap:Yr,pivot:Ot,resolveSourceExactOutputSwap:async U=>{if(!Ot||!Bt)throw new Error("Swap route is not ready.");const G=await Xl({chainId:Ot.source.chainId,recipient:Bt,tokenIn:W.asset.address,tokenOut:Ot.source.address,amountOut:U,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage}).catch(()=>null);if(!G)throw new Error("No liquidity for this pair.");return G},resolveInputSwap:async(U,G)=>{if(!On||!Bt)throw new Error("Swap route is not ready.");return Ur({chainId:R,recipient:Bt,tokenIn:On,tokenOut:w.address,amountIn:U,selectedSwap:G,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage,resolveInputSwap:e.resolveInputSwap})}}),[r,ft,w,de,we,_,H,e.recipient,e.feeOnlyAction,e.maxSlippage,e.resolveInputSwap,Hs.inputAmount,I,O,P,j,R,oe,d,u,W,ft,rs,Qr,Gr,oi,On,Kr,Yr,Ot,Bt,B?.liquidityVenues]),cr=p.useMemo(()=>v?k.address:W?.asset?Ot?Ot.destination.address:rs&&On?On:W.asset.chainId===R?W.asset.address:On??Mn(W.asset,R)??w.address:w.address,[v,k,W,w.address,rs,R,On,Ot]),jn=JSON.stringify([v&&[k,ut],W&&xe(W.asset),h,e.quoteOnlyAccount,e.actionExecution?.wallet,w.address,w.chainId,w.decimals,e.recipient,O,v?void 0:_,z?_:de,B?.apiUrl,B?.rpcOverrides,e.maxSlippage,d,q,e.feeOnlyAction,e.quotedInclusivePlatformFee,C,e.actionProceeds==="output"?"output":e.actionProceeds&&"token"in e.actionProceeds?e.actionProceeds.token:e.actionProceeds?"multiple":void 0,e.feeFunding,e.actionInput?.map(U=>[U.token,U.amount.toString()]),e.feeFundingReserve&&xe(e.feeFundingReserve.asset),e.feeFundingReserve?.amount.toString(),B?.liquidityVenues,B?.allowedTokens,D,T,L,e.actionInput,e.actionProceeds,e.feeFunding,R,cr,Et.pivot?.source.address,Et.pivot?.destination.address],(U,G)=>typeof G=="bigint"?G.toString():G),ci=p.useRef(null);ci.current=F&&!et&&!X&&!M?jn:null,p.useEffect(()=>()=>{mn.current?.controller.abort(),mn.current=null},[jn,F,et,X,M]);const hn=N.keccak256(N.stringToHex(JSON.stringify([jn,W?.amount,r]))),hs=JSON.stringify([H,le,we,v?void 0:_,v?le:ne,te,Z,V,K]),Wo=JSON.stringify([hs,B?.apiUrl,B?.network]),Zr=Cn===Wo;p.useEffect(()=>()=>{gn.current++,wn.current.accepted&&(ke.current?.abort(),mt.current=!1,ht.current&&(At(!1),it(!1),Ut("idle"),Rt(""),It(null),un(null),en(!1),rn(null))),ge?.()},[Wo]);const Xe=p.useRef({key:hn,enabled:F,quoteOnly:!!e.quoteOnlyAccount,sourceBalance:He,physicalAssets:tt,combinedCash:Ge,combinationScope:$e,sourceEligible:ee?.eligible,externalSignerReady:!!pe&&!!_,owner:Bt,walletScope:hs,policyAvailable:!X&&!M});(Xe.current.key!==hn||Xe.current.enabled!==F||Xe.current.quoteOnly!==!!e.quoteOnlyAccount||Xe.current.owner!==Bt||Xe.current.walletScope!==hs||Xe.current.policyAvailable!==(!X&&!M))&&Vt.current++,Xe.current={key:hn,enabled:F,quoteOnly:!!e.quoteOnlyAccount,sourceBalance:He,physicalAssets:tt,combinedCash:Ge,combinationScope:$e,sourceEligible:ee?.eligible,externalSignerReady:!!pe&&!!_,owner:Bt,walletScope:hs,policyAvailable:!X&&!M};const Ts=p.useRef(!1),li=p.useRef(e.onSubmit);li.current=e.onSubmit;const di=p.useRef(e.beforeSubmit);di.current=e.beforeSubmit;const Xr=p.useCallback(async U=>{if(!Ts.current||mt.current)return;mt.current=!0,Ts.current=!1;const G=nt.current,$=Xe.current,he=Vt.current,ue=gn.current,Ce={accepted:!1};wn.current=Ce;const ce=()=>!Ce.accepted||ht.current&&ue===gn.current&&Xe.current.enabled&&Xe.current.walletScope===$.walletScope,Ne=zt=>(...kt)=>{ce()&&zt(...kt)},yt={...G,execution:{...G.execution,onProgress:Ne(G.execution.onProgress)},ui:{setError:Ne(G.ui.setError),setStep:Ne(G.ui.setStep),setStatusMsg:Ne(G.ui.setStatusMsg),setTxHash:Ne(G.ui.setTxHash),setIsExecuting:Ne(G.ui.setIsExecuting),setShowStatusPanel:Ne(G.ui.setShowStatusPanel),setPaymentResult:Ne(G.ui.setPaymentResult)}},ct=yt.feeQuote,os=ct?.fundingSource,In=JSON.stringify(os,(zt,kt)=>typeof kt=="bigint"?kt.toString():kt),cn=JSON.stringify([ct?.sourceAllocation,ct?.feeSourceAllocation,ct?.fundingPlan,ct?.externalGasReserve],(zt,kt)=>typeof kt=="bigint"?kt.toString():kt),$n=li.current,xs=$t.current,ys={operationKey:$.key,feeQuote:ct,selectedAsset:yt.selectedAsset};At(!0),un(null);const jt=zr.current.revision;Hr.current={scope:Ee,revision:jt};const bt={scope:Ee,version:he};Wt.current=bt;try{try{const zt="The original action status is pending or unavailable. Check its status before submitting.";if(!await Pn(void 0,!0))throw new Error(zt);await di.current?.(ys);const kt=zr.current;if(kt.scope!==Ee||kt.loading||kt.error)throw new Error(kt.error??zt);if(kt.revision!==jt&&kt.updatedAt&&(Hr.current={scope:Ee,revision:kt.revision},!await Pn(kt.actions,!0)))throw new Error(zt);const Xt=zr.current;if(Xt.scope!==Ee||Xt.loading||Xt.error||Xt.revision!==jt&&Xt.actions.some(tn=>tn.intents.length!==1||Nt.current.scope!==Ee||!Nt.current.terminal.has(tn.actionId)))throw new Error(Xt.error??zt);const Wn=Xe.current,Os=nt.current;if(!ht.current||he!==Vt.current||!Wn.enabled||Wn.key!==$.key||Wn.owner!==$.owner||!Mt.current||Os?.feeQuote!==ct||ct?.fundingSource!==os||JSON.stringify(ct?.fundingSource,(tn,Je)=>typeof Je=="bigint"?Je.toString():Je)!==In||JSON.stringify([ct?.sourceAllocation,ct?.feeSourceAllocation,ct?.fundingPlan,ct?.externalGasReserve],(tn,Je)=>typeof Je=="bigint"?Je.toString():Je)!==cn)throw new Error("The wallet, policy or accepted action quote changed. Review again before submitting.");yt.validateFeeQuote?.(),$n?.(),Gt.current=yt.onSuccess,Be.current={key:$.key,quote:ct,scope:Ee,routedExternal:se}}catch(zt){const kt=l.sanitizeError(zt,"Unable to prepare this action");ht.current&&(un(kt),Ut("idle")),xs?.(new Error(kt),l.getRelayerErrorDetail(kt));return}finally{Wt.current===bt&&(Wt.current=null)}await(U?Ml(yt):Nl(yt))}finally{wn.current===Ce&&(mt.current=!1,ht.current&&At(!1))}},[Pn,Ee,se]),ui=p.useCallback(()=>Xr(!1),[Xr]),Jr=z,qo=M,pi=!qt.current?.quote.fundedFeeToken&&(I||!!Ot)&&!!xn&&xn.netAmount===0n,lr=p.useMemo(()=>!!e.feeOnlyAction||v&&Gn>0||(!!W?.asset||!!e.actionProceeds)&&Gn>0,[W,Gn,e.actionProceeds,e.feeOnlyAction,v]),gs=p.useMemo(()=>!F||!lr||!W?.asset&&!e.actionProceeds&&!e.feeOnlyAction&&!v?null:[hn,at,v?Tt:"",C?`${$e}:${Ge?.scope===$e?JSON.stringify(Ge.balances,(U,G)=>typeof G=="bigint"?G.toString():G):"pending"}`:"",j?"pay":"supply",h,W?xe(W.asset):"sdk-funded",e.actionInput?.map(U=>`${U.token.toLowerCase()}:${U.amount}`).join(",")??"",e.feeFunding?.join(",")??"",e.quoteOnlyAccount??"executable",e.quotedInclusivePlatformFee?"quoted-inclusive-fee":"split-inclusive-fee",JSON.stringify(B?.rpcOverrides),B?.apiUrl,e.recipient,W?.asset.address.toLowerCase(),W?.asset.chainId,W?.amount,r,w.address.toLowerCase(),w.chainId,R,Et.resolvedTokenIn?.toLowerCase()??"",Et.quoteKey,Et.needsSwap?"swap":"direct",Et.isDirect?"direct-token":"routed-token","7702",Ae?"source-dest":"cross-chain",Et.isQuoting?"quoting":"quoted",Et.exactOutputSwap?.amountIn?.toString()??"",Et.exactOutputSwap?.amountInMax?.toString()??"",Et.exactOutputSwap?.venue??"",Et.resolvedSwap?.amountOut?.toString()??"",Et.quoteAmountOut?.toString()??"",Et.sourceSwap?.amountOutMinimum?.toString()??"",Et.sourceExactOutputSwap?.amountInMax?.toString()??"",Et.pivot?.source.address.toLowerCase()??"",de??"",we??"",H??""].join("|"),[F,C,$e,Ge,hn,v,Tt,at,e.actionProceeds,e.feeOnlyAction,e.actionInput,e.feeFunding,e.quotedInclusivePlatformFee,e.quoteOnlyAccount,et,Pt,lr,Jr,W,j,h,r,w,R,Et,P,Ae,de,we,H]),fi=(U,G)=>{const $=G.filter(he=>he.location==="rollup"&&Pr(he,Bt,k));for(const he of U){if(he.location!=="embedded")continue;const ue=Ds(he.chainId);for(const Ce of $){const ce=Object.entries(Ce.chainTokens??{}).filter(([Ne])=>Sn(Ne)?.chainId===he.chainId);if(ce.length&&(ce.length!==1||!l.addressesEqual(Sn(ce[0][0])?.address,ue?.address)||ce[0][1].decimals!==void 0&&ce[0][1].decimals!==ue?.decimals))throw new Error("The source funding receipt mapping changed. Refresh before submitting.")}}},$r=p.useCallback(async(U,G)=>{if(!v||!E.token||!Bt||X)throw new Error(X??"The account funding route is not ready.");if(Pe.some($=>$.location==="rollup"&&(Ge?.scope!==$e||Ge.balances[xe($)]===void 0)))throw new Error("The cash reservations are unavailable. Refresh before submitting.");return fi(vt.map($=>$.asset),tt),zl({owner:Bt,token:k,budget:U,sources:vt,destinationToken:w,beneficiary:e.recipient,buildActionCalls:oe,requestTimestampMs:Date.now(),signal:G,resolveSourceInput:($,he,ue)=>Ur({chainId:$.chainId,recipient:Bt,tokenIn:S.normalizeNativeTokenAddress($.address),tokenOut:he.address,amountIn:ue,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage}),resolveSourceOutput:($,he,ue)=>Xl({chainId:$.chainId,recipient:Bt,tokenIn:S.normalizeNativeTokenAddress($.address),tokenOut:he.address,amountOut:ue,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage}),resolveDestinationInput:$=>Ur({chainId:k.chainId,recipient:Bt,tokenIn:k.address,tokenOut:w.address,amountIn:$,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage,resolveInputSwap:e.resolveInputSwap}),estimate:J})},[v,E.token,Bt,X,k,vt,Pe,tt,Ge,$e,w,e.recipient,oe,B?.liquidityVenues,e.maxSlippage,e.resolveInputSwap,J]),Dd=p.useMemo(()=>{if(!v||!E.token||qe||Ue)return;const U=new Set(JSON.parse(ut));if(tt.some($=>U.has(xe($))&&($.balanceStatus==="stale"||!!$.balanceError)))return;let G=0;for(const $ of Pe){const he=$.location==="rollup"?Ge?.scope===$e?Ge.balances[xe($)]:void 0:$.balance;if(he===void 0)return;if(he===0n)continue;const ue=Number(N.formatUnits($.balance,$.decimals)),Ce=Number(N.formatUnits(he,$.decimals));if($.priceStatus!=="fresh"||!Number.isFinite($.balanceUsd)||$.balanceUsd<=0||!Number.isFinite(ue)||ue<=0)return;G+=$.balanceUsd*Ce/ue}if(!(!Number.isFinite(G)||G<0||G>=1e15))return ln(G.toFixed(k.decimals),k.decimals)},[v,E.token,qe,Ue,ut,tt,Pe,Ge,$e,k.decimals]),Nd=p.useCallback(async()=>{if(!v||!F||M||X)return null;const U=Xe.current;try{const G=await $r("max");return!ht.current||!Xe.current.enabled||Xe.current.key!==U.key||Xe.current.owner!==U.owner?null:G.fundingPlan?N.formatUnits(G.fundingPlan.totalBudget,k.decimals):null}catch{return null}},[v,F,M,X,$r,k.decimals]),dr=p.useCallback(async(U,G,$)=>{if(v)return $r(ln(r,k.decimals),U);if(z){if(!_||!W)throw new Error("Connect the external wallet before continuing.");return nf({selectedAsset:G?.selectedAsset??W,destinationToken:w,paymentAmount:j?r:void 0,account:_,beneficiary:e.recipient,buildActionCalls:oe,feeExecutionMode:d})}const he={...$??{...Fs,selectedAsset:ir},requestTimestampMs:Date.now()};if(C&&W&<(W.asset)&&!ft)throw new Error("The combined source balance and reservations are unavailable. Refresh before submitting.");const ue={combineSourceBalances:C,combinedSourceGroup:ft,getCombinedSourceGroup:_e,signal:U,feeToleranceBps:q,externalGasRecipient:se?_:void 0,externalGasCalls:se?async ce=>(await Pl({quote:ce,recipient:_,beneficiary:e.recipient,chainId:w.chainId,token:w.address,feeExecutionMode:d,buildCalls:a})).calls:void 0,feeOnlyAction:e.feeOnlyAction,actionInput:e.actionInput,actionProceeds:cl(e.actionProceeds),actionProceedsCandidates:e.actionProceeds&&e.actionProceeds!=="output"&&!("token"in e.actionProceeds)?e.actionProceeds.resolve:void 0,feeFunding:e.feeFunding,feeFundingBalances:dn,feeFundingError:Ue,feeFundingReserve:e.feeFundingReserve,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage,resolveExactOutputSwap:f,selectedAsset:ir,isPayMode:j,isFeeInclusiveInput:I,quotedInclusivePlatformFee:e.quotedInclusivePlatformFee,parsedAmount:Bn?Number(ir.amount):Gn,needsSwap:Et.needsSwap,exactOutputSwap:Et.exactOutputSwap,isNon7702:P,isSourceDestToken:Ae,currentPaymentAmount:r,destinationToken:w,feeExecutionMode:d,resolvedTokenIn:Et.resolvedTokenIn,embeddedWalletAddress:de,providerEmbeddedAddress:we,resolvedChainId:R,isConnected:V,address:H,ready:te,authenticated:Z,quoteOnly:!!e.quoteOnlyAccount,isDirect:Et.isDirect,resolvedSwap:Et.resolvedSwap,sourceSwap:Et.sourceSwap,sourceExactOutputSwap:Et.sourceExactOutputSwap,pivot:Et.pivot,isQuoting:Et.isQuoting,executionTokenAddress:cr,buildPayChainBatches:ce=>rr(he,ce),buildSupplyChainBatches:ce=>Co(he,ce),estimate:J,...G},Ce=!ue.feeOnlyAction&&ue.selectedAsset&&St&&(ue.selectedAsset.asset._source==="wallet"||!!ue.combinedSourceGroup)&&ue.selectedAsset.asset.chainId===R;if(St&&!ue.feeOnlyAction&&ue.selectedAsset&&!Ce&&e.feeFunding&&e.feeFunding.join(",")!==ko.join(","))throw new Error("Fee-source overrides require a wallet source on the action chain.");if(Ce&&Jt&&!b){const ce=await ns(ue);if(ce&&ce.preview.gasFee+ce.preview.spicenetFee+(ce.preview.bridgeFee??0n)>0n)return ce}return Ce||St&&e.actionProceeds==="output"?vl(ue,he,ns,e.actionProceeds==="output"):ns(ue)},[v,$r,k.decimals,W,e.quoteOnlyAccount,St,Jt,b,C,ft,_e,lt,ir,Bn,z,se,a,_,e.recipient,oe,e.feeOnlyAction,e.actionInput,e.actionProceeds,e.feeFunding,e.quotedInclusivePlatformFee,dn,Ue,e.feeFundingReserve,e.maxSlippage,f,q,B?.liquidityVenues,j,I,Gn,Et,P,Ae,r,w,d,de,we,Fs,J,R,V,H,te,Z,cr]);p.useEffect(()=>{_t.current=dr},[dr]);const Lo=p.useCallback(async U=>{if(j)return null;if(!W||xe(U)!==xe(W.asset)||!Bt||!On)throw new Error("Select a source before calculating Max.");let G=ae(U);if(G===void 0)throw new Error("This source is unavailable.");if(z){if(!U.isNative&&!S.isNativeToken(U.address))return N.formatUnits(G,U.decimals);const $=l.getClientForChain(U.chainId),he=_;let ue=G;for(let Ce=0;Ce<8;Ce++){const ce=await dr(void 0,{selectedAsset:{asset:U,amount:N.formatUnits(Ce===0?1n:ue,U.decimals)}});if(!ce?.actionDefinition)throw new Error("The direct action could not be sized.");const Ne=await Ll({client:$,account:he,calls:ce.actionDefinition.calls}),yt=G>Ne?G-Ne:0n;if(yt===0n)return"0";if(Ce>0&&ue<=yt)return N.formatUnits(ue,U.decimals);ue=yt}throw new Error("Network gas could not be reserved for Max. Enter a smaller amount.")}if(Q&&(U.isNative||S.isNativeToken(U.address))){if(!_)throw new Error("Connect the source wallet before calculating Max.");const $=await Hl({client:l.getClientForChain(U.chainId),account:_,recipient:Bt,token:U.address,isNative:!0,amount:1n});G-=$}return b&&I&&U._source==="wallet"&&U.chainId===R?N.formatUnits(G>0n?G:0n,U.decimals):El({balance:G,decimals:U.decimals,planForAmount:async $=>{const he={...Fs,requestTimestampMs:Date.now(),selectedAsset:{asset:U,amount:N.formatUnits($,U.decimals)}};let ue=$;Ot?(he.sourceSwap=await Ur({chainId:U.chainId,recipient:Bt,tokenIn:U.address,tokenOut:Ot.source.address,amountIn:$,maxSlippage:e.maxSlippage,liquidityVenues:B?.liquidityVenues,resolveInputSwap:e.resolveInputSwap}),ue=Kt(he.sourceSwap.amountOutMinimum,Ot.source.decimals,Ot.destination.decimals,"floor")):ue=nn($,U.decimals,await es(U,On,R,w)),he.resolvedSwap=rs?await he.resolveInputSwap(ue):null,he.swapInputAmount=ue,he.quoteAmountOut=he.resolvedSwap?.amountOut??ue;const Ce=St&&U._source==="wallet"&&U.chainId===R,ce=await dr(void 0,{selectedAsset:he.selectedAsset,...Ce?{isFeeInclusiveInput:!0}:{},parsedAmount:Number(he.selectedAsset.amount),sourceSwap:he.sourceSwap,resolvedSwap:he.resolvedSwap,isQuoting:!1,buildSupplyChainBatches:Ne=>Co(he,Ne)},he);return Ce&&ce?.fundingSource?.kind==="input"&&!I?{...ce,sourceSpendCap:$+($-ce.swapInputAmount)}:ce}})},[W,St,b,Fs,j,z,Bt,On,R,w,Q,_,Ot,rs,dr,ae,e.maxSlippage,e.resolveInputSwap,e.actionProceeds,e.feeFunding,e.quotedInclusivePlatformFee,I,B?.liquidityVenues]),Md=JSON.stringify([jn,hs,pt,W?.asset,e.feeFundingReserve,e.actionExecution?.recoveryKey,rs,On,Ot,F,X,M],(U,G)=>typeof G=="bigint"?G.toString():G),mi=p.useRef(Lo);p.useLayoutEffect(()=>{mi.current=Lo},[Lo]);const hi=p.useCallback(U=>mi.current(U),[Md,oe,u,f,e.resolveInputSwap,typeof e.actionProceeds=="object"?e.actionProceeds.resolve:void 0,J]);ca({shouldRun:F&&!et&&Pt==="idle"&&(lr||Bn)&&!Et.isQuoting&&!ze&&(!!gs||Bn),deps:[F,et,Pt,lr,Jr,Et.isQuoting,gs,ze,Bn,jn],onSkip:()=>{if(!F){Rn.current=null,Ke(!1),pn(!1),Tn(null),Yt(null);return}if(et||Pt!=="idle"){Ke(!1);return}if(!lr){Yt(null),Ke(!1),pn(!1),Tn(null);return}Et.isQuoting&&(Ke(!1),pn(!1))},onCleanup:()=>Ke(!1),delayMs:Et.needsSwap||Et.pivot?0:100,backgroundIntervalMs:3e4,run:async({isBackground:U,isCurrent:G,signal:$})=>{if(Bn){const ue=Rn.current;if(ue?.scope===jn&&Date.now()-ue.at<3e4||mn.current?.scope===jn&&Date.now()-mn.current.at<3e4)return;mn.current?.controller.abort();const Ce=new AbortController,ce=_t.current?.(Ce.signal).then(Ne=>{Ce.signal.aborted||ci.current!==jn||!Ne?.feeEstimate||(Rn.current={scope:jn,at:Date.now(),feeEstimate:Ne.feeEstimate,sourceGasSkim:Ne.sourceGasSkim})}).catch(Ne=>{Ce.signal.aborted||console.debug("[SpiceSupply] fee prewarm unavailable:",Ne)})??Promise.resolve();mn.current={scope:jn,at:Date.now(),controller:Ce,promise:ce},await ce;return}const he=gs;U||(Tn(null),Ke(!0));try{if(mn.current?.scope===jn&&await mn.current.promise,$.aborted||!G())return;const ue=Rn.current,Ce=!j&&ue?.scope===jn&&Date.now()-ue.at<3e4?ue:void 0;let ce;try{ce=await _t.current?.($,Ce?{initialFeeEstimate:Ce.feeEstimate,initialSourceGasSkim:Ce.sourceGasSkim}:void 0)}catch(Ne){if(!Ce||$.aborted||!G())throw Ne;ce=await _t.current?.($)}if(!G())return;if(ce&&he){const Ne=se?await Pl({quote:ce,recipient:_,beneficiary:e.recipient,chainId:w.chainId,token:w.address,feeExecutionMode:d,buildCalls:a}):void 0;if(Ne&&ce.externalGasReserve?.nativeAmount&&(Ne.calls.length>ce.externalGasReserve.currentTransactions||Ne.calls.reduce((yt,ct)=>yt+ct.value,0n)>ce.externalGasReserve.currentValue))throw new Error("The external action gas requirement changed. Refresh the quote.");if($.aborted||!G())return;qt.current={key:he,quote:ce,externalAction:Ne},ce.feeEstimate&&(Rn.current={scope:jn,at:Date.now(),feeEstimate:ce.feeEstimate,sourceGasSkim:ce.sourceGasSkim}),Yt(ce.preview),pn(!0)}else qt.current=null,Yt(null),pn(!1);Tn(null)}catch(ue){if(!G())return;if(U&&qt.current?.key===he){console.warn("[SpiceSupply] fee refresh failed:",ue);return}const Ce=l.sanitizeError(ue,"Unable to calculate fees for this action.");qt.current=null,Yt(ue instanceof Ao?ue.preview:null),pn(!1),Xn.current=he,Tn(Ce)}finally{G()&&Ke(!1)}}});const gi=p.useCallback(()=>Xr(!0),[Xr]);p.useEffect(()=>{if(!We||ps.current===We)return;ps.current=We;const U=Gt.current;Ss.current=!0,Oe(!0),zs(null),Promise.resolve().then(()=>U?.(We)).then(()=>{fs(We),Te(),be()}).catch(G=>{zs(`Transaction confirmed; application update needs retry: ${l.sanitizeError(G,"Unable to finalize the action")}`)}).finally(()=>{Ss.current=!1,Oe(!1)})},[We,Ct]);const wi=st&&!Vn,Pd=p.useCallback(()=>{!bn.current||Ss.current||(ps.current=null,Ve(U=>U+1))},[]),Ud=p.useCallback(()=>{if(bn.current)return;const U=Be.current?.progress;U?.submissionStatus==="unknown"||U?.actionId&&U.step!=="success"||(en(!1),rn(null),fe.current=!1,Te(),be())},[Te,be]),Le=gs&&qt.current?.key===gs?qt.current.quote:null,Rs=Le?qt.current?.externalAction:void 0,Wd=Vt.current,Bs=(U=!0)=>{if(X)throw new Error(X);if(!ht.current||!Xe.current.enabled||Xe.current.key!==hn||Vt.current!==Wd||Xe.current.walletScope!==hs||!Xe.current.policyAvailable)throw new Error("The source, amount, beneficiary or configuration changed. Review the form before continuing.");if(se&&!Xe.current.externalSignerReady)throw new Error("Connect the external wallet before funding.");const G=Le?.externalGasReserve?.fundingSource;if(U&&G){const $=Xe.current.physicalAssets.find(he=>xe(he)===xe(G.asset));if(!$||$.balanceError||$.balanceStatus||$.balance<G.amount||$._source!=="wallet"||Ys($)||$.owner&&!l.addressesEqual($.owner,Xe.current.owner))throw new Error("The gas reserve source balance changed. Refresh the quote before submitting.")}if((W||e.feeOnlyAction||v)&&!Le)throw new Error("A current action plan is required. Refresh the quote before submitting.");if(U&&Le?.fundingPlan){const $=Le.fundingPlan;if(fi($.sources.map(Ce=>Ce.asset),Xe.current.physicalAssets),!l.addressesEqual($.owner,Xe.current.owner)||!l.addressesEqual($.token.address,k.address)||$.token.chainId!==k.chainId||$.token.decimals!==k.decimals||$.totalBudget!==ln(r,k.decimals))throw new Error("The accepted account funding plan changed. Review again.");for(const Ce of Le.batches??[])if(!(Ce.domain!=="spicenet"&&!S.isSpicenetChainId(Ce.chainId)))for(const ce of Ce.calls){const Ne=N.decodeFunctionData({abi:S.spicenetAbi,data:ce.data});if(Ne.functionName!=="createWithdrawalRequest"||Ne.args[0].exp<=BigInt(Math.floor(Date.now()/1e3)))throw new Error("The accepted withdrawal expired. Refresh before funding this purchase.")}const he=new Set(JSON.parse(ut)),ue=new Set;for(const Ce of $.sources){const ce=Xe.current.physicalAssets.find(yt=>xe(yt)===Ce.positionId),Ne=ce?.location==="rollup"?Xe.current.combinedCash?.scope===Xe.current.combinationScope?Xe.current.combinedCash.balances[Ce.positionId]:void 0:ce?.balance;if(!ce||ue.has(Ce.positionId)||!he.has(Ce.positionId)||!Pr(ce,$.owner,$.token)||!Yn(ce,"spend-source",{...B,isWhitelistGateActive:D},k,T).eligible||ce.chainId!==Ce.chainId||ce.decimals!==Ce.decimals||!l.addressesEqual(ce.address,Ce.token)||!l.addressesEqual(Ce.owner,$.owner)||Ce.sourceSpendCap<=0n||Ne===void 0||Ce.sourceSpendCap>Ne)throw new Error("A funding source balance, owner or policy changed. Review again.");ue.add(Ce.positionId)}if(!ue.size)throw new Error("The accepted funding sources are unavailable.")}if(U)for(const $ of[Le?.sourceAllocation,Le?.feeSourceAllocation]){if(!$)continue;const he=$.positions.find(Ce=>Ce.asset.location==="rollup"),ue=Xe.current.combinedCash?.balances[he.positionId];if(ue===void 0||Xe.current.combinedCash?.scope!==Xe.current.combinationScope)throw new Error("The combined source reservations are unavailable. Refresh before submitting.");vo($,Xe.current.physicalAssets,Xe.current.owner??void 0,R,ue)}if(z&&W?.asset.owner&&!l.addressesEqual(W.asset.owner,_))throw new Error("Reconnect the external wallet that owns the selected asset.");if(U&&W&&(Le?.sourceSpendCap??0n)>Xe.current.sourceBalance)throw new Error("The source balance changed. Review the available amount before continuing.");if(U&&W&&!Xe.current.sourceEligible)throw new Error(ee?.reason??"This source is unavailable.");if(U)for(const $ of[Le?.sourceAllocation,Le?.feeSourceAllocation])$&&vo($,Xe.current.physicalAssets,Xe.current.owner??void 0,R)},xi=async()=>{if(Bs(),Le?.fundingPlan){const G=Le.fundingPlan;for(const $ of G.sources){if($.asset.location!=="rollup")continue;const he=await us(G.owner,G.token.chainId,G.token.address);if(Bs(),!he.entries.some(ue=>ue.receiptToken===$.asset.receiptTokenId&&ue.decimals===$.asset.receiptTokenDecimals)||Kt(he.available,G.token.decimals,$.decimals,"floor")<$.sourceSpendCap)throw new Error("The cash receipt balance or reservations changed. Review again.")}return}const U=Le?.sourceAllocation;for(const G of[U,Le?.feeSourceAllocation]){if(!G)continue;const $=await us(G.owner,G.chainId,G.token);Bs();const he=await l.getClientForChain(G.chainId).readContract({address:G.token,abi:N.erc20Abi,functionName:"balanceOf",args:[G.owner]});Bs();const ue=Xe.current.physicalAssets.map(ce=>ce.location==="embedded"&&xe(ce)===G.positions.find(Ne=>Ne.asset.location==="embedded")?.positionId?{...ce,balance:he}:ce),Ce=G.positions.find(ce=>ce.asset.location==="rollup");if(!$.entries.some(ce=>ce.receiptToken===Ce.asset.receiptTokenId&&ce.decimals===Ce.asset.receiptTokenDecimals))throw new Error("The cash receipt mapping changed. Refresh before submitting.");vo(G,ue,G.owner,G.chainId,Kt($.available,G.decimals,Ce.asset.decimals,"floor"))}if(!U){const G=W?.asset.location==="rollup"?W.asset:Le?.fundingSource?.asset?.location==="rollup"?Le.fundingSource.asset:void 0;if(!C||!G)return;const $=Mn(G,R);if(!$)throw new Error("The cash receipt mapping is unavailable. Refresh before submitting.");const he=await us(Bt,R,$),ue=await es(G,$,R,w);Bs();const Ce=Le?.fundedFeeToken&&Le.fundingSource?.asset?.location==="rollup"?Kt(Le.grossFundingAmount??0n,Le.fundedFeeToken.decimals,G.decimals,"ceil"):Le?.sourceSpendCap??0n;if(!he.entries.some(ce=>ce.receiptToken===G.receiptTokenId&&ce.decimals===G.receiptTokenDecimals)||Kt(he.available,ue,G.decimals,"floor")<Ce)throw new Error("The cash balance or reservations changed. Refresh before submitting.");return}},ur=async()=>xi(),yi=U=>({...U,sourceSpendCap:Le?.sourceSpendCap,minimumDestinationAmount:Le?.destinationAmount}),_r=Le?.sourceAllocation?.insufficient||Le?.feeSourceAllocation?.insufficient?!0:W&&Le?.sourceSpendCap!==void 0?Le.sourceSpendCap>He:jd,bi={...Fs,resolvedSwap:Le?.destinationSwap??Fs.resolvedSwap,swapInputAmount:Le?.swapInputAmount??Fs.swapInputAmount};let Vs=!1;nt.current={selectedAsset:W,parsedAmount:Gn,currentPaymentAmount:r,isInsufficientBalance:_r,isPayMode:j,isFeeInclusiveInput:I,quotedInclusivePlatformFee:e.quotedInclusivePlatformFee,feeOnlyAction:e.feeOnlyAction,actionProceeds:cl(e.actionProceeds,Le?.fundingSource?.kind==="proceeds"?Le.fundingSource.token:void 0),validateFeeQuote:()=>Bs(!Vs),isNon7702:P,directExternalAction:z,isSourceDestToken:Ae,needsSwap:rs,exactOutputSwap:Gr,selectedIsEquivalent:Td,resolvedTokenIn:On,sourceSwap:Kr,sourceExactOutputSwap:Yr,pivot:Ot,embeddedWalletAddress:de,providerEmbeddedAddress:we,externalWallet:pe,externalWalletAddress:_,activeSignerWallet:ve,activeSignerAddress:ne,address:H,isConnected:V,ready:te,authenticated:Z,provider:K,resolvedChainId:R,executionTokenAddress:cr,destinationToken:w,buildActionCalls:oe,feeExecutionMode:d,feeToleranceBps:q,buildSpicenetBatch:u,onPayExecute:m,onSuccess:y,feeQuote:Le,execution:{estimate:(U,G,$,he)=>J(U,G,$,{...he,userOverride:Bt}),execute:async(U,G,$,he,ue,Ce)=>{const ce=gn.current,Ne=wn.current;let yt;const ct=he;if(he=bt=>{bt.actionId&&(Ne.accepted=!0,yt=bt.actionId),ct?.(bt)},!ue){const bt=new AbortController;ke.current=bt,ue=bt.signal}const os=ue,In=()=>ht.current&&Xe.current.enabled&&Xe.current.walletScope===hs&&gn.current===ce&&!os.aborted,cn=()=>new l.SpiceflowError("ABORT","Execution observation retired"),$n=async bt=>{if(Ne.accepted&&!In())throw cn();return new Promise((zt,kt)=>{const Xt=()=>{Ne.accepted&&kt(cn())};os.addEventListener("abort",Xt,{once:!0}),bt().then(Wn=>{!Ne.accepted||In()?zt(Wn):kt(cn())},kt).finally(()=>os.removeEventListener("abort",Xt))})},xs=async()=>Vs?Bs(!1):xi();if(await ur(),await kl(Le?.externalGasReserve),se&&!Rs)throw new Error("The external action plan is unavailable.");if(z){if(!Le?.actionDefinition)throw new Error("The direct action plan is unavailable.");return Pa({definition:Le.actionDefinition,account:_,chainId:w.chainId,wallet:pe,assertCurrent:ur})}const ys=new l.RelayerService;if(ys.setBaseUrl(Dt),se&&!await ys.supportsExternalExecution())throw Error("This API cannot yet record the external wallet action. No source funds were sent.");let jt=!1;try{Q&&W&&(Rt("Transfer the selected source to your embedded wallet"),await Vl({asset:W.asset,embedded:Bt,external:_,externalWallet:pe,amount:Le?.sourceSpendCap??0n,assertCurrent:ur,observer:{onSending:()=>{jt=!0},onRejected:()=>{jt=!1},onReverted:()=>{jt=!1}}}),Vs=!0,await xs()),Be.current?.scope===Ee&&(Be.current.batches=U.map(Je=>({...Je})));const bt=[U,G,$,se?Je=>he?.(Je.step==="success"?{...Je,step:"executing",message:"Funds delivered. Confirm the action in your external wallet.",txHash:void 0}:{...Je,txHash:void 0}):he,ue,{...Ce,userOverride:Bt,requireDestinationReceipt:!0,...se?{externalExecution:{chainId:w.chainId,executor:_,inputToken:w.address,inputAmount:Rs.amount.toString(),recoveryKey:e.actionExecution.recoveryKey,calls:Rs.calls.map(Je=>({to:Je.to,data:Je.data,value:Je.value.toString()}))}}:{},resolveActionOutputCredits:async()=>[...await Ce?.resolveActionOutputCredits?.()??[],...Le?.actionOutputCredits??[],...Le?.fundingPlan?.sources.flatMap(Je=>Je.asset.location==="embedded"&&Je.swap?[{chainId:Je.chainId,token:Je.pivotToken.address,amount:Je.amountOutMinimum}]:[])??[],...Le?.externalGasReserve?.nativeAmount&&!S.isNativeToken(Le.externalGasReserve.fundingSource?.token??cr)?[{chainId:R,token:S.ZERO_ADDRESS,amount:Le.externalGasReserve.nativeAmount}]:[]],walletFundingRequirements:Le?Oa(Le,W):void 0,validateBeforeSubmit:async Je=>{if(await xs(),await kl(Le?.externalGasReserve,Je),await Ce?.validateBeforeSubmit?.(Je),se&&Ul(Je,w.address,w.chainId,_)!==Rs.amount)throw new Error("The external delivery changed. Review the quote before continuing.")}}],zt=()=>Y(...bt);let kt,Xt=0;for(;;)try{kt=await $n(zt);break}catch(Je){if(Ne.accepted&&!In())throw cn();if(!(Je instanceof l.SpiceflowError)||Je.context.submissionStatus!=="accepted"||Je.code==="ON_CHAIN_REVERT"||Je.code==="ABORT")throw Je;Ne.accepted=!0,he?.({step:"executing",message:"Your action was accepted. Confirming the original transaction...",actionId:Je.context.actionId,intentId:Je.context.intentId}),await $n(()=>Ln(Math.min(1e3*2**Math.min(Xt++,5),3e4)))}if(!se)return kt;Vs=!0;const Wn=async()=>{if(ue?.aborted)throw new Error("Execution transaction aborted");await xs()};if(await Wn(),await mf({hash:kt,token:w.address,chainId:w.chainId,recipient:_,sender:Bt,amount:Rs.amount}),await Wn(),!yt)throw Error("The original external action identity is unavailable. Check its status before continuing.");const Os=await Pa({definition:Rs,account:_,chainId:w.chainId,wallet:pe,assertCurrent:Wn,originalAction:{actionId:yt,service:ys}}),tn=Be.current;return tn?.scope===Ee&&tn.progress&&(tn.progress={...tn.progress,step:"success",txHash:Os,message:"Transaction confirmed"},ii(tn.progress)),Os}catch(bt){const zt=bt instanceof l.SpiceflowError&&(bt.context.submissionStatus==="unknown"||bt.context.submissionStatus==="accepted");throw ht.current&&Xe.current.enabled&&gn.current===ce&&Xe.current.walletScope===hs&&(zt||Vs||jt)&&Zn(Wo),jt&&!Vs?new l.SpiceflowError("SUBMISSION_UNKNOWN","The wallet transfer outcome is unknown. Close this action and check your activity and balances before continuing.",{submissionStatus:"unknown",cause:bt}):(l.sanitizeError(bt),bt)}},buildPayChainBatches:async U=>Io(await rr(bi,yi(U)),Le?.externalGasReserve),buildSupplyChainBatches:async U=>Io(await Co(bi,yi(U)),Le?.externalGasReserve),onProgress:ii},ui:{setError:Ft,setStep:Ut,setStatusMsg:Rt,setTxHash:It,setIsExecuting:it,setShowStatusPanel:en,setPaymentResult:rn},refs:{spiceDepositSubmittedRef:fe,abortControllerRef:ke}};const Qs=!!e.isZeroAmountPay&&!e.feeOnlyAction&&j&&Gn===0,qd=v?Gn>0&&!!Le?.fundingPlan&&!!Le.batches?.length&&!et&&yn&&!kn&&!qo:j?(Qs||!!W?.asset||!!e.actionProceeds||!!e.feeOnlyAction)&&Gn>=0&&!_r&&!et&&(Qs||Jr||yn)&&!kn&&(Qs||e.feeOnlyAction||!rs||!!Gr)&&(Qs||e.feeOnlyAction||!Ot||!!Yr)&&!qo:!!W?.asset&&Gn>0&&!_r&&!et&&(z||yn)&&!kn&&!pi&&(Ot?!!Kr&&!ri&&(ai||!!Qr):Bd||ai||!!Qr&&!ri)&&!qo,vi=!e.quoteOnlyAccount&&(z||te&&Z&&V&&!!H)&&!X&&!Zr&&!!Bt&&(!se||!!Rs&&!!pe&&!!_)&&(!z||!!pe&&(!W?.asset.owner||l.addressesEqual(W.asset.owner,_)))&&(O==="7702"||!!_)&&!st&&!re&&!Vn&&F&&qd&&(Qs||v&&!!Le?.fundingPlan||!W&&(!!e.actionProceeds||!!e.feeOnlyAction)||!!ee?.eligible)&&!(We&&Be.current?.key===hn)&&!Hs.quoteError&&(Qs||!!gs&&qt.current?.key===gs);Mt.current=vi;const Ld=vi&&Fd&&!e.submitDisabled&&!Qe&&!mt.current,pr=p.useCallback(async()=>{if(Xe.current.quoteOnly||mt.current||bn.current)return;const U=Be.current?.scope===Ee?Be.current:void 0,G=xt.scope===Ee?xt.externalActionId??(U?.routedExternal?U.progress?.actionId:void 0):void 0;if(!G||!pe||!_||!e.actionExecution)return;const $=gn.current,he=Xe.current.walletScope,ue=()=>{if(!ht.current||!Xe.current.enabled||Xe.current.quoteOnly||Xe.current.walletScope!==he||gn.current!==$||Zt.current!==Ee||!Xe.current.policyAvailable)throw Error("The original action wallet or application scope changed. Check status before continuing.")};mt.current=!0,Ts.current=!1,it(!0),en(!0),un(null),Rt("Checking your transaction and wallet balances...");const Ce=new l.RelayerService;Ce.setBaseUrl(Dt);try{ue(),await be(),ue();const ce=await Ce.getExternalExecution(G);if(ue(),ce.recoveryKey!==e.actionExecution.recoveryKey||ce.chainId!==R||!l.addressesEqual(ce.executor,_))throw Error("The original external action belongs to another wallet, chain or application action.");const Ne=await Pa({definition:{amount:BigInt(ce.inputAmount),context:{userAddress:_,executorAddress:_,chainId:ce.chainId,destinationToken:ce.inputToken},calls:ce.calls.map(yt=>({to:yt.to,data:yt.data,value:BigInt(yt.value)}))},account:_,chainId:ce.chainId,wallet:pe,assertCurrent:ue,originalAction:{actionId:G,service:Ce,resume:!0}});ue(),Gt.current=y,It(Ne),Ut("success"),Rt("Transaction confirmed"),rn(yt=>yt&&{status:"success",txHash:Ne}),U?.progress&&(U.progress={...U.progress,step:"success",txHash:Ne,submissionStatus:void 0}),Qt(yt=>({...yt,scope:Ee,pending:!1,error:null,externalExecution:void 0,externalActionId:void 0}))}catch(ce){if(ht.current&&Zt.current===Ee){const Ne=l.sanitizeError(ce,"Unable to continue the original wallet action");un(Ne),Ut("error"),$t.current?.(new Error(Ne),l.getRelayerErrorDetail(Ne))}}finally{mt.current=!1,ht.current&&Zt.current===Ee&&(it(!1),await ss())}},[xt.scope,xt.externalActionId,Ee,Dt,pe,_,e.actionExecution?.recoveryKey,R,y,ss,be]),ws=e.enabled!==!1&&!e.quoteOnlyAccount&&F&&!X&&!st&&!re&&!Vn&&Un&&!!xt.externalActionId&&!ms&&!et&&!Qe&&!!pe&&!!_&&!!e.actionExecution&&!!xt.externalExecution&&xt.externalExecution.executionMode!=="wallet-envelope"&&["unsubmitted","prepared","submitted","reverted"].includes(xt.externalExecution.calls.find(U=>U.status!=="confirmed")?.status??""),Ci=(Ld||ws)&&!e.submitDisabled&&!mt.current&&!bn.current;Ts.current=Ci;const ki=p.useCallback(async()=>{if(ws){Ts.current&&await pr();return}await ui(),Be.current?.routedExternal&&await ss()},[ws,pr,ui,ss]),Ii=p.useCallback(async()=>{if(ws){Ts.current&&await pr();return}await gi(),Be.current?.routedExternal&&await ss()},[ws,pr,gi,ss]),fr=p.useCallback(()=>{if(bn.current||Zr)return;const U=Be.current?.scope===Ee?Be.current.progress:void 0;if(Qn||ms||Es||U?.submissionStatus==="unknown"||U?.actionId&&U.step!=="success"){ss();return}Ts.current=!1,qt.current=null,pn(!1),Vr.refreshQuote(),Ut("idle"),Ft(null),Rt(""),rn(null),en(!1)},[Vr.refreshQuote,Ft,Qn,ms,Es,Ee,ss,Zr]);p.useEffect(()=>{We&&!st&&!re&&!et&&Be.current&&Be.current.key!==hn&&!Qn&&!ms&&!Es&&(fr(),It(null))},[We,st,re,et,hn,Qn,ms,Es,fr]);const Si=p.useRef(hn);p.useEffect(()=>{const U=Si.current!==hn;Si.current=hn,(U||l.isUserRejection(An))&&Pt==="error"&&!et&&Be.current&&Be.current.key!==hn&&fr()},[hn,Pt,et,An,fr]);const zd=p.useCallback(()=>{en(!1)},[]),Hd=p.useCallback(()=>{if(bn.current)return;const U=Be.current?.progress;U?.submissionStatus==="unknown"||U?.actionId&&U.step!=="success"||(Ut("idle"),It(null),Te())},[Te]),Lt=Le??(qt.current?.key.startsWith(`${hn}|`)?qt.current.quote:null)??(Be.current?.key===hn?Be.current.quote:null),Vd=async U=>{if(e.quoteOnlyAccount)throw new Error("A preview cannot fund an action.");if(Zr)throw new Error("Check your activity and balances before funding another action.");if(z)throw new Error("This source executes directly from the external wallet; submit the action without embedded funding.");if(!(!Q||!W)){if(!Le||U!==Le.sourceSpendCap)throw new Error("Use the displayed source funding maximum before preparing this action.");await ur(),await Vl({asset:W.asset,embedded:Bt,external:_,externalWallet:pe,amount:U,assertCurrent:ur})}};return{operationKey:hn,feeQuote:Lt,selectedAsset:wt,capability:ee,assets:{getAvailableBalance:ae,fundingSources:Pe,selectable:dt,displayAssets:dt,filteredSpiceAssets:Me,embeddedWalletAddress:de,externalAddress:_,isNon7702:O!=="7702",refreshSpiceAssets:Te,refreshWalletAssets:be,loading:qe,refreshing:ye,error:Ue},quote:{...Hs,...Bn?{quoteKey:null,quoteExpiresAt:null,quoteError:null,isQuoting:!1,estimatedInput:null,estimatedOutput:null,quoteAmountOut:null,inputAmount:null,resolvedSwap:null,sourceSwap:null,exactOutputSwap:null,sourceExactOutputSwap:null}:{},hasSourceConversion:!!Ot,executionInput:Ot&&Lt?{address:Ot.destination.address,chainId:Ot.destination.chainId,decimals:Ot.destination.decimals,amount:Lt.preview.netAmount}:null,...Lt?.destinationSwap?{resolvedSwap:Lt.destinationSwap,inputAmount:Lt.swapInputAmount,estimatedOutput:N.formatUnits(Lt.destinationSwap.amountOut,w.decimals)}:{},...Lt?.fundedFeeToken&&Lt.destinationAmount!==void 0?{estimatedOutput:N.formatUnits(Lt.destinationAmount+(Lt.destinationSwap?Lt.destinationSwap.amountOut-Lt.destinationSwap.amountOutMinimum:0n),w.decimals)}:{}},fees:{externalGasReserve:Lt?.externalGasReserve,fundingConversion:Lt?.fundingConversion,fundingSource:Lt?.fundingSource,proceedsUsed:Lt?.proceedsUsed,fundingShortfall:Lt?.grossFundingAmount,source:Ot&&Lt?{address:Ot.source.address,chainId:Ot.source.chainId,symbol:Ot.source.symbol,decimals:Ot.source.decimals,gasFee:Lt.sourceGasSkim??0n,spicenetFee:0n}:null,destinationAmount:Lt?.destinationAmount,sourceSpendCap:Lt?.sourceSpendCap,preview:Bn?null:Lt?.preview??xn,isLoading:!Bn&&(Fn||ze),ready:!Bn&&!!Le,error:Bn||ze||ot&&Xn.current!==gs?null:kn},amount:{availableBalance:v?Dd:Re,sourceRequiredAmount:Lt?.sourceSpendCap??null,parsed:Gn,isInsufficientBalance:_r,sourceBalance:Od,feesExceedAmount:pi},status:{activity:an,pending:Qn,recoveryChecking:ms,recoveryError:Es,canResumeExternalAction:ws,canRetry:ws,actionId:on?.actionId??(Un?xt.action?.actionId:void 0),intentId:on?.intentId??(Un?xt.action?.intents[0]?.intentId:void 0),autoContinue:on?.autoContinue??(Un?xt.action?.autoContinue:void 0),submissionStatus:on?.submissionStatus,idempotencyKey:on?.submissionStatus==="unknown"?on.idempotencyKey:void 0,user:on?.user??(Un?xt.action?.user:void 0),finalizing:re||wi,finalizationError:Vn,step:st&&Pt==="success"?"executing":Pt,statusMsg:ws?"Try again to finish with the funds already in your wallet.":ms?"Checking previous action status...":Qn?Es??"A previous transaction is still pending. Check its status before submitting again.":st?Vn??"Transaction confirmed. Updating application...":Ht,txHash:Ze,isExecuting:et||Qe||wi,error:X||Vn||An||ee?.reason||null,showStatusPanel:En,paymentResult:st&&sn?.status==="success"?{...sn,status:"processing"}:sn},flags:{directExecutionFeeNote:Jr},retryFinalization:Pd,refreshStatus:ss,resumeExternalAction:pr,fundEmbeddedSource:Vd,canExecute:Ci,submit:j?Ii:ki,submitSupply:ki,submitPay:Ii,retrySupply:fr,dismissPaymentStatus:zd,resolveMaxAmount:hi,max:()=>v?Nd():W?hi(W.asset):Promise.resolve(null),resetAfterSuccess:Hd,resetPaymentState:Ud}}function vf(e){const{asset:t,amount:n,recipient:s,owner:r,onSuccess:o}=e,i=!!t&&!!e.destination&&e.destination.chainId!==t.chainId,a=e.destination?.chainId??t?.chainId??e.sourceChains?.[0]??0,d=p.useMemo(()=>S.getTokensForChain(a).find(C=>C.equivalenceGroup==="USDC"),[a]),u=p.useCallback((C,E)=>{const k=!i&&C===0n?n:C;if(!t||n<=0n||n>t.balance||!i&&k>n||!s||!r||l.addressesEqual(r,s))throw new Error("Enter a valid withdrawal amount and recipient.");if(E.chainId!==a||!l.addressesEqual(E.executorAddress??E.userAddress,r))throw new Error("The withdrawal wallet or network changed. Review the withdrawal again.");if(i&&(!e.destination||e.destination.symbol!=="USDC"||C<=0n))throw new Error("A USDC withdrawal quote is required for this network.");return yo(a,i?e.destination.address:t.address,[{recipient:s,amount:k}]).calls},[t?.address,t?.chainId,t?.balance,n,s,r,a,i,e.destination?.address,e.destination?.symbol]),m=p.useMemo(()=>t?[{address:t.address,chainId:t.chainId,symbol:t.symbol,decimals:t.decimals,logoURI:t.logoURI}]:void 0,[t?.address,t?.chainId,t?.symbol,t?.decimals,t?.logoURI]),f=Wr({enabled:e.enabled&&!!d&&!!t&&n>0n&&!!s&&!!r&&!l.addressesEqual(r,s),amountDirection:"input-inclusive",quotedInclusivePlatformFee:!0,feeFunding:ko,destinationToken:e.destination??{address:t?.address??S.ZERO_ADDRESS,symbol:t?.symbol??"",decimals:t?.decimals??6,chainId:a},recipient:s,selectedAsset:t?{asset:t,amount:N.formatUnits(n,t.decimals)}:null,additionalSourceTokens:m,sourceChains:e.sourceChains,includeCrossChainEmbeddedAssets:!0,includeExternalWalletAssets:!1,feeExecutionMode:i?"user-transfer":"backend-transfer",buildActionCalls:u,buildSpicenetBatch:Tr,onError:(C,E)=>e.onError?.(C.message,E),onSuccess:async()=>{if(!t)return;const C=f.fees.destinationAmount;if(i&&(C==null||C<=0n))throw new Error("The confirmed withdrawal amount is unavailable.");window.dispatchEvent(new CustomEvent("withdraw-completed")),await o?.({token:i?"USDC":t.symbol,amount:N.formatUnits(i?C:n,i?e.destination.decimals:t.decimals),chainId:a})}}),h=`${e.enabled}:${t?.chainId}:${t?.address}:${n}:${s}:${r}:${a}:${e.destination?.address}`,y=p.useRef(h);p.useEffect(()=>{y.current===h||f.status.isExecuting||(y.current=h,(f.status.step==="success"||f.status.paymentResult?.status==="success")&&f.resetAfterSuccess())},[h,f.status.isExecuting,f.status.step,f.status.paymentResult?.status,f.resetAfterSuccess]);const g=f.fees.fundingSource,x=g?.kind==="input"?f.fees.fundingConversion?.amountInMax??f.fees.proceedsUsed??0n:0n,w=g?.kind==="input"?t:g?.asset,v=w?w._source==="wallet"?f.fees.fundingConversion?.amountInMax??f.fees.proceedsUsed:f.amount.sourceRequiredAmount:null;return{supply:f,source:w,maximumFeeFunding:v,feeFromAmount:x}}const $l=l.font.ui,Cf=({label:e,loading:t,balance:n,dark:s,dk:r})=>{const o=s?r.textSecondary:"#7D7C7B",i=s?r.textSecondary:"#71757A";return c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:{fontFamily:$l,fontSize:"17px",fontWeight:500,color:o,lineHeight:"24px"},children:e}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontFamily:$l,fontSize:"13px",fontWeight:500,color:i,lineHeight:"16px"},children:["Balance:"," ",t?"...":n===null?"\u2014":l.formatBalance(n)]})]})};function kf(e,t=40,n=18){const s=e.length,r=[{maxLength:7,shrink:0},{maxLength:10,shrink:6},{maxLength:13,shrink:12},{maxLength:16,shrink:16},{maxLength:20,shrink:19}].find(o=>s<=o.maxLength);return Math.max(n,t-(r?.shrink??22))}const Ws=({value:e,element:t="span",placeholder:n,ariaLabel:s,ariaInvalid:r,disabled:o,onChange:i,inputMode:a="decimal",autoComplete:d="off",dataSpiceflowFocus:u,fontFamily:m,fontWeight:f=700,color:h,textAlign:y,lineHeight:g=1,maxFontSize:x=40,minFontSize:w=18,overflow:v="ellipsis",title:C,style:E})=>{const k=p.useRef(null),[F,j]=p.useState(),I=kf(e||n||"",x,w),b=e||n||"";p.useEffect(()=>{const B=k.current;if(!B||v!=="ellipsis"){j(void 0);return}let q=!0,O=null;const P=()=>{if(!q)return;const M=getComputedStyle(B),L=B.clientWidth-parseFloat(M.paddingLeft||"0")-parseFloat(M.paddingRight||"0");if(!(L>0))return;if(!O){try{O=document.createElement("canvas").getContext("2d")}catch{return}if(!O)return}O.font=`${M.fontStyle} ${M.fontWeight} ${I}px ${M.fontFamily}`;const T=O.measureText(b),H=Math.max(T.width,(T.actualBoundingBoxLeft||0)+(T.actualBoundingBoxRight||0))+(parseFloat(M.letterSpacing)||0)*Math.max(0,b.length-1),V=H>L?I*Math.max(0,L-1)/H:void 0;j(te=>te===V?te:V)};P();const D=typeof ResizeObserver>"u"?void 0:new ResizeObserver(P);return D?.observe(B),D||window.addEventListener("resize",P),document.fonts?.addEventListener("loadingdone",P),()=>{q=!1,D?.disconnect(),D||window.removeEventListener("resize",P),document.fonts?.removeEventListener("loadingdone",P)}},[b,I,m,f,v,t,E?.fontFamily,E?.fontStyle,E?.fontWeight,E?.letterSpacing,E?.paddingLeft,E?.paddingRight]);const A=v==="wrap"?{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"normal"}:v==="ellipsis"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},R={fontFamily:m,fontSize:`${Math.min(I,F??I)}px`,fontWeight:f,color:h,lineHeight:g,letterSpacing:0,textAlign:y,minWidth:0,maxWidth:"100%",...A,...E};return t==="input"?c.jsx("input",{ref:k,type:"text",inputMode:a,autoComplete:d,"aria-label":s,"aria-invalid":r||void 0,"data-spiceflow-focus":u||void 0,value:e,onChange:i,placeholder:n,disabled:o,title:C,style:{backgroundColor:"transparent",border:"none",outline:"none",padding:0,width:"100%",...R}}):c.jsx(t,{ref:k,title:C,style:R,children:e})},_l=({isOpen:e,position:t,title:n,items:s,selectedId:r,onSelect:o,portalAttribute:i})=>{const{dark:a,dk:d,primaryColor:u}=l.useSpiceBrand(),[m,f]=p.useState(null),[h,y]=p.useState(!1);return p.useEffect(()=>{if(!e){y(!1);return}const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>y(!0))});return()=>cancelAnimationFrame(g)},[e]),!e||!t||s.length===0?null:hr.createPortal(c.jsxs("div",{[`data-${i}-popover`]:"true",style:{position:"fixed",top:`${t.top}px`,left:`${t.left}px`,opacity:h?1:0,transform:h?"scale(1) translateY(0)":"scale(0.96) translateY(-6px)",transition:`opacity 200ms ${l.easing.out}, transform 200ms ${l.easing.out}`,backgroundColor:a?d.shell:"#ffffff",borderRadius:"10px",padding:"10px 12px",boxShadow:a?"0 16px 48px rgba(0,0,0,0.45)":"0 12px 32px rgba(0,0,0,0.12)",border:`1px solid ${d.cardBorder}`,minWidth:"220px",zIndex:l.z.dropdown,fontFamily:l.font.mono},children:[c.jsx("div",{style:{marginBottom:"6px"},children:c.jsx("span",{style:{fontSize:"11px",fontWeight:500,color:a?d.textPrimary:"#0e0d0b",textTransform:"uppercase",letterSpacing:"1px"},children:n})}),c.jsx("div",{style:{borderBottom:`1px solid ${d.cardBorder}`,marginBottom:"6px"}}),c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:s.map(g=>{const x=r===g.id,w=m===g.id;return c.jsxs("button",{onClick:v=>{v.stopPropagation(),o(g.id)},onMouseEnter:()=>f(g.id),onMouseLeave:()=>f(null),style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 4px",borderRadius:"8px",border:"none",cursor:"pointer",backgroundColor:x?a?d.hoverBg:"#f3f4f6":w?a?d.cardBg:"#f9fafb":"transparent",transition:"background-color 0.15s",width:"100%",fontFamily:l.font.mono},children:[g.icon&&c.jsx("img",{src:g.icon,alt:g.label,style:{width:"22px",height:"22px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:"13px",fontWeight:x?700:500,textTransform:"uppercase",color:a?d.textPrimary:"#0e0d0b",letterSpacing:"0.5px",flex:1,textAlign:"left"},children:g.label}),g.detail&&c.jsx("span",{style:{fontSize:"11px",fontWeight:500,color:d.textSecondary},children:g.detail}),x&&c.jsx(Qc,{color:u,style:{flexShrink:0}})]},g.id)})})]}),document.body)},Ro=l.font.ui,If=l.font.mono,Sf=170,Af=({header:e,amount:t,receiveAmountDisplay:n,receiveUsdEstimate:s,selectedDestToken:r,destTokenSymbol:o,destChainName:i,destChainLogo:a,compatibleDestinationChains:d,networkSwitchRef:u,onOpenNetworkPopover:m,showNetworkPopover:f,setShowNetworkPopover:h,networkPopoverPos:y,selectedChainId:g,setSelectedChainId:x,dark:w,dk:v})=>{const C=w?v.cardBg:"#E9E9E9",E=w?v.cardBorder:"#C6C6C6",k=w?v.textSecondary:"#71757A",F=w?v.textPrimary:"#0E0D0B",j=w?v.cardBorder:"#C5C5C4",I=w?"rgba(255,255,255,0.08)":"#D4D3D3",b=o.length>8?"14px":o.length>6?"16px":"18px";return c.jsxs("div",{style:{backgroundColor:C,border:`1px solid ${E}`,borderRadius:"7px",padding:"14px 16px 12px 16px",minHeight:"138px",display:"flex",flexDirection:"column",gap:"6px"},children:[e,c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"12px",flex:1},children:[c.jsxs("div",{style:{flex:1,minWidth:0,alignSelf:"flex-start",paddingTop:"4px"},children:[c.jsx(Ws,{element:"div",value:n,title:n,fontFamily:Ro,color:t?F:"#A8A8A7",lineHeight:"0.95",maxFontSize:54,minFontSize:32,overflow:"wrap"}),c.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:k,fontFamily:Ro,marginTop:"10px"},children:s})]}),c.jsxs("div",{style:{width:`${Sf}px`,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"stretch",gap:"8px"},children:[c.jsxs("div",{style:{backgroundColor:"transparent",border:`1px solid ${j}`,borderRadius:"8px",overflow:"hidden",width:"100%",display:"flex",flexDirection:"column",boxSizing:"border-box"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"9px 10px 8px 10px"},children:[c.jsx("img",{src:r?.logoURI||qu,alt:o,style:{width:"24px",height:"24px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:b,fontWeight:500,color:F,lineHeight:"1.3",fontFamily:Ro,flex:1,minWidth:0,letterSpacing:0},children:o})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"5px 10px",backgroundColor:I,borderTop:`1px solid ${j}`},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[a&&c.jsx("img",{src:a,alt:i,style:{width:"13px",height:"13px",borderRadius:"50%",flexShrink:0}}),c.jsx("span",{style:{fontSize:"11px",fontWeight:400,color:F,fontFamily:Ro,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textTransform:"uppercase"},children:i})]}),c.jsx("button",{ref:u,onClick:A=>{A.stopPropagation(),m(u.current)},style:{background:"none",border:"none",cursor:d.length>1?"pointer":"not-allowed",padding:"0 0 0 8px",fontSize:"9.5px",fontFamily:If,color:k,textDecoration:"underline",fontWeight:600,opacity:d.length>1?1:.45},children:"Switch"}),c.jsx(_l,{isOpen:f,position:y,title:"SELECT NETWORK",portalAttribute:"network",items:d.map(A=>{const R=l.getChainConfig(A);return{id:String(A),label:R?.displayName||String(A),icon:bs[A]||Ir}}),selectedId:g!==null?String(g):null,onSelect:A=>{x(Number(A)),h(!1)}})]})]}),c.jsx("div",{style:{minHeight:"14px"}})]})]})]})},Ef=l.font.ui,ks=l.font.mono,Ff=({show:e,onToggle:t,showCustomAddress:n,setShowCustomAddress:s,customRecipient:r,setCustomRecipient:o,externalAddress:i,recipientAddress:a,destChainName:d,destChainLogo:u,compatibleDestinationChains:m,txDetailsChainSwitchRef:f,onOpenNetworkPopover:h,sourceChainLabel:y,sourceDetailsLogo:g,sourceTokenLabel:x,amount:w,totalSourceDebitDisplay:v,receiveAmountDisplay:C,destTokenSymbol:E,shouldQuoteWithdrawGas:k,estimatingFee:F,feeError:j,displayedGasFee:I,selectedDestToken:b,theme:A,styles:R,dark:B,dk:q})=>{const O=B?q.textSecondary:"#71757A",P=B?q.textPrimary:"#0E0D0B",D=m.length>1,M=n&&r?N.isAddress(r)?l.truncateAddress(r):r:a?l.truncateAddress(a):"\u2014";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{onClick:t,style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:e?"10px":"0",cursor:"pointer",userSelect:"none"},children:[c.jsx("span",{style:{fontSize:"13px",color:O,fontFamily:Ef,fontWeight:600},children:"Transaction Details"}),c.jsx(Ip,{size:12,color:O,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]}),e&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"7px"},children:[c.jsxs("div",{children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:{fontSize:"12px",color:O,fontFamily:ks,fontWeight:500,letterSpacing:"0.03em"},children:"TO"}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx("span",{style:{fontSize:"13px",color:P,fontFamily:ks,fontWeight:500},children:M}),c.jsx("button",{onClick:()=>{s(L=>!L),!n&&i&&o(i)},style:{background:"none",border:"none",cursor:"pointer",padding:"0",fontSize:"9.5px",fontFamily:ks,color:O,textDecoration:"underline",fontWeight:600},children:n?"Reset":"Switch"})]})]}),n&&c.jsxs("div",{style:{marginTop:"6px"},children:[c.jsx("div",{style:{marginBottom:"6px",padding:"7px 9px",borderRadius:"6px",border:"1px solid rgba(239, 68, 68, 0.55)",backgroundColor:"rgba(239, 68, 68, 0.12)",color:"#ef4444",fontSize:"10px",lineHeight:1.35,fontFamily:ks,fontWeight:700,letterSpacing:0,textTransform:"uppercase"},children:"CAUTION: ENTERING AN INCORRECT ADDRESS WILL RESULT IN LOSS OF FUNDS"}),c.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address","aria-invalid":r&&!N.isAddress(r)?!0:void 0,"data-spiceflow-focus":!0,value:r,onChange:L=>o(L.target.value),placeholder:"0x...",style:{width:"100%",padding:"8px 10px",borderRadius:"6px",border:`1px solid ${r&&!N.isAddress(r)?B?q.errorBorder:"#fca5a5":B?q.inputBorder:"#d1d5db"}`,backgroundColor:B?q.inputBg:"#f9fafb",color:B?q.inputText:"#111827",fontSize:"12px",fontFamily:ks,outline:"none",boxSizing:"border-box"}}),r&&!N.isAddress(r)&&c.jsx("span",{style:{fontSize:"11px",color:q.errorText,marginTop:"3px",display:"block"},children:"Invalid address"})]})]}),c.jsx(zn,{palette:q,labelColor:O,valueColor:P,label:"RECEIVING CHAIN",value:c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"7px"},children:[u&&c.jsx("img",{src:u,alt:d,style:{width:"14px",height:"14px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:"13px",color:P,fontWeight:500,fontFamily:ks,textTransform:"uppercase"},children:d}),c.jsx("button",{ref:f,onClick:L=>{L.stopPropagation(),h(f.current)},style:{background:"none",border:"none",cursor:D?"pointer":"not-allowed",padding:"0",fontSize:"9.5px",fontFamily:ks,color:O,textDecoration:"underline",fontWeight:600,opacity:D?1:.45},children:"Switch"})]})}),c.jsx(zn,{palette:q,labelColor:O,valueColor:P,label:"REQUESTED WITHDRAWAL",value:c.jsxs(La,{logo:g||null,alt:y,primaryText:P,children:[w||"0"," ",x]})}),k&&c.jsx(zn,{palette:q,labelColor:O,valueColor:P,label:"TOTAL SOURCE DEBIT",value:c.jsxs(La,{logo:g||null,alt:y,primaryText:P,children:[v," ",x]})}),c.jsx(zn,{palette:q,labelColor:O,valueColor:P,label:"YOU RECEIVE",value:c.jsxs(La,{logo:u,alt:d,primaryText:P,gap:"4px",children:[C," ",E]})}),k&&c.jsxs(c.Fragment,{children:[c.jsx(zn,{palette:q,labelColor:O,label:"EST. NETWORK FEE",valueColor:j?"#f87171":P,value:F?"Estimating...":j?"Unavailable":I!==null&&b?`${va(I,b.decimals)} ${b.symbol}`:"Estimating..."}),j&&c.jsx(vn,{variant:"error",size:"compact",palette:q,fontFamily:R?.fontFamily||A.typography.fontFamily,children:j})]})]})]})},Tf=p.memo(Ff),La=({logo:e,alt:t,primaryText:n,gap:s="6px",children:r})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:s},children:[e&&c.jsx("img",{src:e,alt:t,style:{width:"13px",height:"13px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:"13px",color:n,fontWeight:500,fontFamily:ks},children:r})]}),za=({pct:e,isMax:t,primaryColor:n,dark:s,fillColor:r})=>{const o=e/100;return c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",children:[c.jsx("circle",{cx:"7",cy:"7",r:"6.84375",fill:t?n:"none",stroke:t?n:s?"#4a5568":"#3C3E42",strokeWidth:"0.3125"}),!t&&o>0&&c.jsx("path",{d:`M 7 7 L 7 0.15625 A 6.84375 6.84375 0 ${o>.5?1:0} 1 ${7+6.84375*Math.sin(o*2*Math.PI)} ${7-6.84375*Math.cos(o*2*Math.PI)} Z`,fill:r})]})},qr=l.font.ui,Rf=170,Bf=({header:e,amount:t,setAmount:n,isInsufficient:s,sourceAmountDecimals:r,selectedSourceAsset:o,resolvedSelectedSourceAsset:i,spiceAssets:a,setSelectedSourceAsset:d,sourceUsdEstimate:u,sourceTokenLabel:m,sourceChainLabel:f,totalSelectedBalance:h,showSourceTokenPopover:y,setShowSourceTokenPopover:g,tokenPopoverPos:x,setTokenPopoverPos:w,tokenTriggerRef:v,primaryColor:C,dark:E,dk:k})=>{const F=l.useAssetDisplay(),j=i?F({...i,logoURI:i._source==="wallet"?i.logoURI:kr}).logoURI:kr,I=E?k.cardBg:"#E9E9E9",b=E?k.cardBorder:"#C6C6C6",A=E?k.textSecondary:"#71757A",R=E?k.textPrimary:"#0E0D0B",B=E?k.cardBorder:"#C5C5C4",q=E?"rgba(255,255,255,0.08)":"#D4D3D3",O=m.length>8?"14px":m.length>6?"16px":"18px";return c.jsxs("div",{style:{backgroundColor:I,border:`1px solid ${b}`,borderRadius:"7px",padding:"14px 16px 12px 16px",minHeight:"138px",display:"flex",flexDirection:"column",gap:"6px",position:"relative"},children:[e,c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"12px",flex:1},children:[c.jsxs("div",{style:{flex:1,minWidth:0,alignSelf:"flex-start",paddingTop:"4px"},children:[c.jsx(Ws,{element:"input",ariaLabel:"Withdraw amount",ariaInvalid:s,dataSpiceflowFocus:!0,value:t,onChange:P=>{const D=P.target.value;if(D===""){n("");return}/^\d*\.?\d*$/.test(D)&&n(l.parseNumericInput(D.startsWith(".")?`0${D}`:D,r??o?.decimals))},placeholder:"0.0",fontFamily:qr,color:s?"#ef4444":t?R:"#A8A8A7",lineHeight:"0.95",maxFontSize:54,minFontSize:32,style:{width:"100%"}}),c.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:A,fontFamily:qr,marginTop:"10px"},children:u})]}),c.jsx("div",{style:{width:`${Rf}px`,flexShrink:0},children:c.jsxs("div",{style:{backgroundColor:"transparent",border:`1px solid ${B}`,borderRadius:"8px",overflow:"hidden",width:"100%",display:"flex",flexDirection:"column",boxSizing:"border-box"},children:[c.jsxs("div",{ref:v,onClick:P=>{if(P.stopPropagation(),!y&&v.current){const D=v.current.getBoundingClientRect(),M=220,L=16;w({top:D.bottom+8,left:Math.min(Math.max(L,D.right-M),window.innerWidth-M-L)})}g(D=>!D)},style:{display:"flex",alignItems:"center",gap:"6px",padding:"9px 10px 8px 10px",cursor:"pointer"},children:[j&&c.jsx("img",{src:j,alt:m,style:{width:"24px",height:"24px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:O,fontWeight:500,color:R,lineHeight:"1.3",fontFamily:qr,flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",letterSpacing:0},children:m}),c.jsx($s,{size:15,color:R,strokeWidth:2.25})]}),c.jsx(_l,{isOpen:y,position:x,title:"SELECT TOKEN",portalAttribute:"token",items:(a||[]).map(P=>({id:xe(P),label:F({...P,displaySymbol:P.displaySymbol||(P._source==="wallet"?P.symbol:P.receiptTokenName)}).symbol,icon:F({...P,logoURI:P._source==="wallet"?P.logoURI:kr}).logoURI||void 0,detail:`${l.formatBalance(P.balanceFormatted)} \xB7 ${P._source==="wallet"?l.getChainConfig(P.chainId)?.displayName||P.chainId:"Spicenet"}`})),selectedId:i?xe(i):null,onSelect:P=>{const D=(a||[]).find(M=>xe(M)===P);D&&(d(D),n("")),g(!1)}}),c.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"5px 10px",backgroundColor:q,borderTop:`1px solid ${B}`},children:c.jsx("span",{style:{fontSize:"11px",fontWeight:400,color:R,fontFamily:qr,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textTransform:"uppercase"},children:f})})]})})]}),c.jsxs("div",{style:{minHeight:"18px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[s?c.jsx("span",{style:{fontSize:"12px",color:k.errorText,fontFamily:qr,fontWeight:500},children:"Insufficient Balance"}):c.jsx("span",{}),c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0px",minHeight:"32px",marginRight:"-9px"},children:[0,25,50,75,100].map((P,D)=>{const M=D===4,L=parseFloat(t)||0,T=h>0&&Math.abs(L/h*100-P)<1;return c.jsx("button",{type:"button","aria-label":`Set amount to ${P}%`,"aria-pressed":T,onClick:()=>{const H=i?.balance??0n;n(P===0?"":N.formatUnits(H*BigInt(P)/100n,r??o?.decimals??6))},title:`${P}%`,disabled:h===0,"data-spiceflow-focus":!0,style:{width:"32px",height:"32px",padding:"9px",border:"none",backgroundColor:"transparent",cursor:h===0?"not-allowed":"pointer",opacity:T?1:.5,transition:"opacity 0.15s ease",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:c.jsx(za,{pct:P,isMax:M,primaryColor:C,dark:E,fillColor:E?k.textSecondary:"#3C3E42"})},P)})})]})]})};var Ha="data:image/svg+xml,%3csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 4.99995V6.99995M5 3.31245V3.31189M9.5 5C9.5 7.48528 7.48528 9.5 5 9.5C2.51472 9.5 0.5 7.48528 0.5 5C0.5 2.51472 2.51472 0.5 5 0.5C7.48528 0.5 9.5 2.51472 9.5 5Z' stroke='black' stroke-opacity='0.4' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const Of=({dark:e,dk:t})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[c.jsx("img",{src:Ha,alt:"","aria-hidden":"true",style:{width:"13px",height:"13px",flexShrink:0,...e?{filter:"invert(0.6)"}:{}}}),c.jsx("p",{style:{fontSize:"13px",color:e?t.textSecondary:"#979AA0",margin:"0",lineHeight:"1.4",fontFamily:l.font.ui},children:"Withdraw collateral from your account to 10+ EVM blockchains."})]}),jf=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,styles:s,onWithdrawExecute:r,onWithdrawSuccess:o,onWithdrawError:i,availableTokens:a,initialSourceAssetId:d,walletAssets:u,buildSpicenetBatch:m=Tr})=>{const f=p.useContext(l.SpiceFlowProviderContext);if(!f)return c.jsx("div",{children:"Error: SpiceWithdraw must be used within SpiceFlowProvider"});const h=f.mode||"7702",y=h==="presign"||h==="ondemand",g=f.supportedChainIds,x=f.allowedTokens,w=u?.initialAsset,v=p.useMemo(()=>[...u?.extraAssets??[],...w?[w]:[]].map(fe=>({address:fe.address,chainId:fe.chainId,symbol:fe.symbol,decimals:fe.decimals})),[u?.extraAssets,w]),C=f.isWhitelistGateActive,{theme:E,dark:k,dk:F}=l.useSpiceBrand(s),j=l.useAssetDisplay(),I=f.network,b=()=>y?"select":"provider-login",[A,R]=p.useState(b()),[B,q]=p.useState(!1),[O,P]=p.useState(null),[D,M]=p.useState(null),[L,T]=p.useState(""),[H,V]=p.useState(!1),[te,Z]=p.useState(!1),[K,Y]=p.useState(!1),[J,ge]=p.useState(""),[pe,we]=p.useState(!0),ve=p.useRef(null),ne=p.useRef(null),_=p.useRef(null),[le,W]=p.useState(null),[De,Ae]=p.useState(null),z=l.useWallet(),{isReady:Q,isAuthenticated:se,address:ie}=z,X=f?.embeddedWalletAddress,{address:oe,chainId:je}=as.useAccount(),Me=[f.externalWalletAddress,oe].find(fe=>fe&&!l.addressesEqual(fe,X));p.useEffect(()=>{e&&!Me&&Y(!0)},[e,Me]);const[me,Se]=p.useState(!1),[Te,be]=p.useState(null),qe=p.useRef(i);qe.current=i;const ye=p.useCallback(fe=>{be(fe),typeof fe=="string"&&fe&&qe.current?.(fe,l.getRelayerErrorDetail(fe))},[]),[Ue,de]=p.useState(null),Ye=p.useRef(null),pt=p.useRef(!0),tt=p.useRef(null);p.useEffect(()=>(pt.current=!0,()=>{pt.current=!1}),[]);const{execute:$e,estimate:Ge,clearStatus:Fe}=Js(),Ie=uo(ie,e),[lt,_e]=p.useState(null),[ae,dt]=p.useState(null),[ut,Pe]=p.useState(!1),[vt,Tt]=p.useState(null),{assets:Jt,loading:St,error:dn,refresh:ot}=Ms({owner:X,role:"holding",includeWalletAssets:!0,additionalSourceTokens:v,enabled:e&&!!X}),ze=p.useMemo(()=>{if(C)return[];const fe=(ke,Be)=>(Be.balanceUsd||0)-(ke.balanceUsd||0);return(Jt??[]).filter(ke=>ke.balance>0n&&Yn(ke,"holding",{allowedTokens:x,isWhitelistGateActive:C}).eligible).sort(fe)},[Jt,x,C]),at=p.useMemo(()=>[...new Set([...g??[],...Object.keys(a??{}).map(Number),...(ze||[]).map(fe=>fe.chainId),...(ze||[]).flatMap(fe=>Object.keys(fe.chainTokens??{}).map(ke=>{const[,Be]=ke.split(":"),gt=Number(Be);return Number.isFinite(gt)?gt:null}).filter(ke=>ke!==null))])].filter(fe=>l.getChainConfig(fe)?.network===I),[g,a,ze,I]),rt=p.useMemo(()=>{if(a)return a;const fe={};for(const ke of ze||[]){const Be=Object.entries(ke.chainTokens??{});if(Be.length>0){for(const[gt,Dt]of Be){const[Ee,Zt,xt]=gt.split(":");if(Ee!=="evm"||!Zt||!xt)continue;const Qt=Number(Zt);if(!Number.isFinite(Qt))continue;const fn=xt.startsWith("0x")?xt.toLowerCase():`0x${xt.toLowerCase()}`,Wt=l.getChainConfig(Qt)?.supportedTokens?.find(Vt=>l.addressesEqual(Vt.address,fn));Wt&&_o(ke,fn,Qt)&&(fe[Qt]||(fe[Qt]=[]),fe[Qt].find(Vt=>l.addressesEqual(Vt.address,fn))||fe[Qt].push({address:fn,symbol:Wt?.symbol||Dt?.name||ke.symbol,name:Wt?.name||Dt?.name||ke.displayName||ke.name||ke.symbol,decimals:Wt?.decimals??Dt?.decimals??ke.decimals,logoURI:Wt?.logo||ke.logoURI}))}continue}fe[ke.chainId]||(fe[ke.chainId]=[]),fe[ke.chainId].find(gt=>l.addressesEqual(gt.address,ke.address))||fe[ke.chainId].push({address:ke.address,symbol:ke.symbol,name:ke.displayName||ke.name||ke.symbol,decimals:ke.decimals,logoURI:ke.logoURI})}return fe},[a,ze]),wt=p.useCallback((fe,ke)=>{const Be=Rp(fe,ke,ke?fe?._source==="wallet"?a?.[ke]??[]:rt[ke]??[]:[]);return!fe||!Be||!ke?null:fe._source==="wallet"||Yn(fe,"withdraw-destination",f,{...Be,chainId:ke}).eligible?Be:null},[rt,a,f.allowedTokens,f.rpcOverrides,f.isWhitelistGateActive]),ee=p.useMemo(()=>O?ze.find(fe=>xe(fe)===xe(O))??null:null,[O,ze]),ft=ee?ee.balanceError:dn,Re=ee?._source==="wallet",He=p.useMemo(()=>{if(!ee)return[];const fe=Object.keys(ee.chainTokens??{}).map(ke=>Sn(ke)?.chainId??null).filter(ke=>ke!==null);return Array.from(new Set([...fe,ee.chainId,...at].filter(Number.isFinite))).filter(ke=>l.getChainConfig(ke)?.network===I&&(ee._source==="wallet"||wt(ee,ke)!==null))},[ee,at,wt,I]),et=p.useMemo(()=>{if(!ee||typeof window>"u")return null;const fe=`spiceflow:withdraw-chain:${ee.receiptTokenId||ee.address.toLowerCase()}`,ke=window.localStorage.getItem(fe),Be=ke?Number(ke):null;return Be!==null&&Number.isFinite(Be)&&He.includes(Be)?Be:null},[ee,He]),it=p.useMemo(()=>ee?ee._source==="wallet"?ee.chainId:et!==null?et:je&&He.includes(je)?je:ee.chainId&&He.includes(ee.chainId)?ee.chainId:He[0]??null:at[0]??null,[ee,et,je,He,at]),Qe=p.useMemo(()=>wt(ee,D),[wt,ee,D]);p.useEffect(()=>{e&&(P(null),T(""))},[e,d,w?.address,w?.chainId]),p.useEffect(()=>{if(!e||!ze.length||O)return;const fe=w?ze.find(ke=>ke.chainId===w.chainId&&l.addressesEqual(ke.address,w.address)&&ke._source==="wallet"):d?ze.find(ke=>ke.receiptTokenId===d):ze[0];P(fe??null),T("")},[e,ze,O,d,w]);const At=p.useRef(null);p.useEffect(()=>{if(!ee){At.current=null;return}const fe=xe(ee),ke=At.current!==fe;At.current=fe,(ke&&ee._source==="wallet"||D===null||!He.includes(D))&&M(it)},[ee,D,it,He]),p.useEffect(()=>{if(!H&&!te)return;const fe=ke=>{const Be=ke.target;H&&!ve.current?.contains(Be)&&!ne.current?.contains(Be)&&!Be?.closest?.("[data-network-popover]")&&V(!1),te&&!_.current?.contains(Be)&&!Be?.closest?.("[data-token-popover]")&&Z(!1)};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},[H,te]);const mt=p.useCallback(fe=>{if(!fe||He.length<=1)return;const ke=fe.getBoundingClientRect(),Be=220,gt=16;W({top:ke.bottom+8,left:Math.min(Math.max(gt,ke.right-Be),window.innerWidth-Be-gt)}),V(Dt=>!Dt)},[He.length]),Mt=p.useCallback(()=>we(fe=>!fe),[]);p.useEffect(()=>{if(!ee||D===null||typeof window>"u")return;const fe=`spiceflow:withdraw-chain:${ee.receiptTokenId||ee.address.toLowerCase()}`;window.localStorage.setItem(fe,String(D))},[ee,D]);const ht=K?N.isAddress(J)?J:void 0:Me,An=Ms({owner:ht,role:"holding",includeRollupAssets:!1,sourceChains:D?[D]:[],additionalSourceTokens:Qe&&D?[{...Qe,chainId:D}]:[],enabled:e&&!!ht&&!!Qe&&!!D}),un=An.walletAssets.find(fe=>l.addressesEqual(fe.owner,ht)&&fe.chainId===D&&l.addressesEqual(fe.address,Qe?.address)),Cn=ee?.balanceFormatted??0,Zn=ee?j(Re?ee:{...ee,displaySymbol:ee.displaySymbol||ee.receiptTokenName,logoURI:kr}):void 0,gn=Zn?.symbol||"Select token",wn=ee?.displayChainName||(Re?l.getChainConfig(ee.chainId)?.displayName:"Spicenet")||"Network",$t=ee?.receiptTokenDecimals??ee?.decimals,Ft=p.useMemo(()=>{if(!Qe||$t===void 0)return 0n;try{return ln(L||"0",$t)}catch{return 0n}},[L,Qe,$t]),Pt=p.useMemo(()=>!Qe||$t===void 0?0n:Pp(Ft,$t,Qe.decimals),[Qe,$t,Ft]),Ut=ae??lt,Ht=Ft,Rt=vf({enabled:e&&Re&&!!Qe,destination:Qe&&D?{...Qe,chainId:D}:null,asset:Re?ee:null,amount:Ft,recipient:ht,owner:X,sourceChains:g,onSuccess:o,onError:i}),Ze=Rt.supply,It=Re&&D!==ee?.chainId,En=Re?Ze.fees.ready?Ze.fees.destinationAmount??0n:0n:Pt>(Ut??0n)?Pt-(Ut??0n):0n,en=Re&&D?Qe?Yn(ee,"spend-source",f,{...Qe,chainId:D}).reason:"USDC withdrawal is unavailable on this network. Choose another network.":null,sn=me||Re&&(Ze.status.isExecuting||Ze.status.finalizing),rn=Ze.status.step==="success"||Ze.status.paymentResult?.status==="success",xn=p.useCallback(fe=>{if(Re||!D||!Qe)return[];if(Ft===0n||Pt===0n||!ht)return[];const ke=Array.isArray(fe)?fe.filter(Ee=>Ee.amount>0n):[{token:Qe.address,recipient:ht,amount:fe??Pt}],Be=ke.reduce((Ee,Zt)=>Ee+Zt.amount,0n);if(Be<=0n)return[];const gt={chainId:D,calls:[],tokenTransfers:ke.map(Ee=>({from:"escrow",to:Ee.recipient,token:Ee.token,amount:Ee.amount}))},Dt=m({destinationChainId:D,deliveryToken:Qe.address,deliveryAmount:Be,deliveryRecipient:ht,deliveryTransfers:ke,requestTimestampMs:tt.current??Date.now()});return Dt?[Dt,gt]:[gt]},[Re,D,Qe,Ft,Pt,ht,m]),Yt=p.useMemo(()=>xn(),[xn]),Fn=p.useMemo(()=>Up(Yt,Qe?.address),[Yt,Qe?.address]),Ke=p.useRef(null),yn=!Re&&e&&!y&&!me&&!!Qe&&!!D&&Ft!==0n;ca({shouldRun:yn&&Yt.length>0&&!!Fn,deps:[yn,Yt.length>0,Fn],delayMs:500,onSkip:()=>{Ke.current=null,_e(null),Tt(null),Pe(yn&&Yt.length===0)},onCleanup:()=>Pe(!1),run:async({isCurrent:fe,signal:ke})=>{const Be=Fn;Pe(!0),Tt(null);try{const gt=await Mp({batches:Yt,tokenAddress:Qe.address,chainId:D,estimate:Ge,signal:ke});if(!fe())return;Ke.current={key:Be,quote:gt},_e(gt.gasFee)}catch(gt){if(!fe())return;Ke.current=null,_e(null),Tt(gt instanceof Error?gt.message:"Failed to estimate gas fee")}finally{fe()&&Pe(!1)}}}),p.useEffect(()=>{me||dt(null)},[me,L,D,Qe?.address]);const pn=p.useCallback(()=>{q(!0),R("select")},[]),Xn=p.useCallback(()=>{sn||t()},[t,sn]),kn=p.useRef(null);kn.current={batches:Yt,walletAddress:ie,recipient:ht,token:Qe,chainId:D,amount:L,grossAmountRaw:Pt,gasFee:lt,feeEstimate:Fn&&Ke.current?.key===Fn?Ke.current.quote.feeEstimate:null,isNon7702:y,buildWithdrawBatches:xn,execution:{estimate:Ge,execute:$e},ui:{setIsExecuting:Se,setExecutionError:ye,setExecutionProgress:de,setLockedGasFee:dt},executionContextRef:Ye,isMountedRef:pt,onWithdrawExecute:r,onWithdrawSuccess:o,buildSpicenetBatch:m};const Tn=p.useCallback(()=>(tt.current=Date.now(),sl(kn.current)),[]),Jn=p.useCallback(()=>rl(kn.current),[]);if(p.useEffect(()=>{if(!e){Fe?.();const fe=setTimeout(()=>{R(b()),q(!1),P(null),M(null),T(""),V(!1),Z(!1),Y(!1),ge(""),Se(!1),ye(null),de(null),Ye.current=null},300);return()=>clearTimeout(fe)}},[e,y]),p.useEffect(()=>{if(!y&&e&&A==="provider-login"&&Q&&se&&X&&!B){const fe=setTimeout(()=>{q(!0),R("select")},100);return()=>clearTimeout(fe)}},[y,e,A,Q,se,X,B]),!e)return null;if(A==="provider-login"&&!y)return c.jsx(xa,{onAuthSuccess:pn,autoTrigger:!0});if(A==="select"){const fe=parseFloat(L)||0,ke=$t?va(Ht,$t):L||"0",Be=!!ee&&Ht>ee.balance,gt=(D?l.getChainConfig(D):null)?.displayName||"Network",Dt=D?bs[D]||Ir:null,Ee=Qe?.symbol||"\u2014",Zt=gn,xt=Qe?va(En,Qe.decimals):"0",Qt=ee&&ee.balanceFormatted>0?ee.balanceUsd/ee.balanceFormatted:void 0,fn=ee?.priceStatus==="stale",Wt=ol(fe,Qt,fn),Vt=ol(parseFloat(xt)||0,It?void 0:Qt,fn),Nt=(!K||N.isAddress(J))&&(!Re||!l.addressesEqual(ht,X)),_t=!y&&!Re&&fe>0&&Qe!==null,qt=!_t||lt!==null&&!ut&&!vt,Rn=fe>0&&!Be&&!St&&!ft&&ee!==null&&D!==null&&Qe!==null&&!en&&ht&&Nt&&qt&&En>0n&&(!Re||Ze.canExecute&&!rn),mn=!Rn,nt=St?"LOADING BALANCES":ft?"BALANCES UNAVAILABLE":ee===null?"NO BALANCE":fe===0?"ENTER AMOUNT":Be?"INSUFFICIENT BALANCE":_t&&!qt?vt?"GAS UNAVAILABLE":"ESTIMATING GAS":_t&&En===0n?"AMOUNT TOO SMALL":Re&&!Ze.canExecute?"REVIEW FEES":"WITHDRAW",Gt=!!Ue&&(Ue.step==="success"||Ue.step==="error"),ps=s?.primaryColor||E.colors.primary,Ss=402,Ls=(fs,Vn,zs)=>c.jsx(Cf,{label:fs,loading:zs,balance:Vn,dark:k,dk:F});return c.jsx(Hn,{isOpen:!0,onClose:Xn,title:"Withdraw",subtitle:c.jsx(Of,{dark:k,dk:F}),styles:s,theme:E,dark:k,maxWidth:"486px",footerLinkText:"Spicenet accounts \u2192",overlayDimmed:!1,closeOnBackdropClick:n,overlayContent:Gt?c.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",justifyContent:"flex-end",pointerEvents:"none",zIndex:20},children:c.jsx("div",{style:{pointerEvents:"auto"},children:c.jsx(ya,{type:"withdraw",isOpen:!0,isProcessing:sn,onRetryTx:()=>{Jn()},onNewTx:()=>{de(null),T(""),ye(null),Ye.current=null},onClose:()=>{de(null),ye(null),Se(!1),Ye.current=null},onComplete:()=>{de(null),ye(null),Se(!1),Ye.current=null},results:[{asset:{symbol:Qe?.symbol||"Token",address:Qe?.address||""},txHash:Ue?.txHash||"",success:Ue?.step==="success",error:Ue?.error,amount:L}],chainId:D??void 0,theme:E})})}):null,children:c.jsxs("fieldset",{disabled:sn,style:{border:0,minWidth:0,width:"calc(100% - 32px)",maxWidth:`${Ss}px`,margin:"0 auto",padding:"0 0 4px 0",position:"relative"},children:[c.jsx(xo,{activity:Ie,palette:F,onRefresh:()=>{ot()}}),c.jsxs("div",{style:{marginTop:"16px",marginBottom:"16px",display:"flex",flexDirection:"column",gap:"16px"},children:[c.jsx(Bf,{header:Ls("Source",Cn,St),amount:L,setAmount:T,isInsufficient:Be,sourceAmountDecimals:$t,selectedSourceAsset:ee,resolvedSelectedSourceAsset:ee,spiceAssets:ze,setSelectedSourceAsset:P,sourceUsdEstimate:Wt,sourceTokenLabel:Zt,sourceChainLabel:wn,totalSelectedBalance:Cn,showSourceTokenPopover:te,setShowSourceTokenPopover:Z,tokenPopoverPos:De,setTokenPopoverPos:Ae,tokenTriggerRef:_,primaryColor:ps,dark:k,dk:F}),c.jsx(Af,{header:Ls("Destination",un?.balanceFormatted??null,An.loading),amount:L,receiveAmountDisplay:xt,receiveUsdEstimate:Vt,selectedDestToken:Qe,destTokenSymbol:Ee,destChainName:gt,destChainLogo:Dt,compatibleDestinationChains:He,networkSwitchRef:ve,onOpenNetworkPopover:mt,showNetworkPopover:H,setShowNetworkPopover:V,networkPopoverPos:le,selectedChainId:D,setSelectedChainId:M,dark:k,dk:F})]}),c.jsxs("div",{style:{marginBottom:E.spacing.sm},children:[c.jsx(Tf,{show:pe,onToggle:Mt,showCustomAddress:K,setShowCustomAddress:Y,customRecipient:J,setCustomRecipient:ge,externalAddress:Me,recipientAddress:ht,destChainName:gt,destChainLogo:Dt,compatibleDestinationChains:He,txDetailsChainSwitchRef:ne,onOpenNetworkPopover:mt,sourceChainLabel:wn,sourceDetailsLogo:ee?Zn?.logoURI:kr,sourceTokenLabel:Zt,amount:L,totalSourceDebitDisplay:ke,receiveAmountDisplay:xt,destTokenSymbol:Ee,shouldQuoteWithdrawGas:_t,estimatingFee:ut,feeError:vt,displayedGasFee:Ut,selectedDestToken:Qe,theme:E,styles:s,dark:k,dk:F}),It&&c.jsx(vn,{variant:"info",size:"compact",palette:F,children:Ze.fees.ready?`You receive ${xt} USDC on ${gt}`:`USDC on ${gt} \u2014 ${en||Ze.fees.error||Ze.quote.quoteError||"waiting for quote"}`}),Re&&Ze.fees.ready&&c.jsxs(c.Fragment,{children:[c.jsx(zn,{palette:F,label:"TOTAL SOURCE DEBIT",value:`${ke} ${Zt}`}),c.jsx(zn,{palette:F,label:"MINIMUM RECEIVED",value:`${xt} ${Ee}`}),c.jsx(zn,{palette:F,label:It?"DESTINATION FEES":"EST. FEE",value:Ze.fees.preview?.totalFee!==void 0?`${N.formatUnits(Ze.fees.preview.totalFee,Ze.fees.preview.decimals)} ${Ze.fees.preview.symbol}`:"Unavailable"})]}),It&&Ze.fees.ready&&Ze.fees.source&&c.jsx(zn,{palette:F,label:"SOURCE NETWORK FEE",value:`${N.formatUnits(Ze.fees.source.gasFee,Ze.fees.source.decimals)} ${Ze.fees.source.symbol}`}),en&&c.jsx(vn,{variant:"warning",size:"compact",palette:F,children:en}),Re&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[!It&&c.jsx(zn,{palette:F,label:"FEE ASSET",value:Ze.fees.isLoading?"Estimating...":Rt.source?`${j(Rt.source).symbol} \xB7 ${Rt.source._source==="spice"?"Spicenet":l.getChainConfig(Rt.source.chainId)?.displayName}`:"Unavailable"}),!It&&c.jsx(zn,{palette:F,label:"MAXIMUM FEE FUNDING",value:Ze.fees.isLoading?"Estimating...":Ze.fees.ready&&Rt.source&&Rt.maximumFeeFunding!=null?`${N.formatUnits(Rt.maximumFeeFunding,Rt.source.decimals)} ${j(Rt.source).symbol}`:"Unavailable"}),!rn&&(Ze.status.error||Ze.fees.error||Ze.quote?.quoteError)&&c.jsx(vn,{variant:"error",size:"compact",palette:F,children:Ze.status.error||Ze.fees.error||Ze.quote?.quoteError}),!rn&&Ze.status.finalizationError&&c.jsx(l.Button,{variant:"outline",dark:k,disabled:Ze.status.finalizing,onClick:()=>void Ze.retryFinalization(),children:"Retry application update"}),!rn&&Ze.status.step==="error"&&Ze.status.error==="Transaction fees changed. Refresh the quote before submitting."&&c.jsx(l.Button,{variant:"outline",dark:k,disabled:Ze.status.isExecuting,onClick:Ze.retrySupply,children:"Refresh quote"}),Ze.status.statusMsg&&c.jsx("span",{role:"status",children:Ze.status.statusMsg})]}),ee&&!St&&He.length===0&&c.jsx(vn,{variant:"warning",size:"compact",palette:F,children:"No withdrawal networks are available for this asset."}),Te&&c.jsx(vn,{variant:"error",size:"compact",palette:F,fontFamily:s?.fontFamily||E.typography.fontFamily,style:{marginBottom:"12px"},children:Te}),ft&&c.jsxs(vn,{variant:"error",size:"compact",palette:F,children:["Unable to load this balance. Please try again."," ",c.jsx("button",{type:"button",onClick:()=>void ot(),children:"Retry"})]}),c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:()=>{if(Rn)if(Re){if(It&&En<=0n)return;Ze.submitSupply()}else Tn()},disabled:mn||sn,theme:E,dark:k,styles:s,style:{marginTop:"8px"},children:sn?"EXECUTING...":Re&&rn?"WITHDRAWN":nt})]})]})})}return null},Va=jf,Df=({onDepositClick:e,onWithdrawClick:t,depositDisabled:n=!1,withdrawDisabled:s=!1,primaryColor:r="#EA4B4B",buttonStyles:o,dark:i=!1})=>{if(!e&&!t)return null;const a={button:{backgroundColor:r,...o}};return c.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e&&c.jsx(l.Button,{variant:"outline",onClick:e,disabled:n,dark:i,styles:a,style:{flex:1,height:"44px",fontSize:"12px"},children:"Deposit"}),t&&c.jsx(l.Button,{variant:"outline",onClick:()=>t(),disabled:s,dark:i,styles:a,style:{flex:1,height:"44px",fontSize:"12px"},children:"Withdraw"})]})},Nf=p.memo(Df),Mf=({section:e,dk:t,dark:n=!1})=>{const s=r=>{switch(r){case"green":return"#10b981";case"red":return"#ef4444";default:return t.textPrimary}};return c.jsxs("div",{children:[c.jsx("div",{style:{fontSize:"11px",fontWeight:600,letterSpacing:"1px",color:t.textSecondary,marginBottom:"8px",textTransform:"uppercase"},children:e.title}),c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:e.items.map((r,o)=>c.jsxs("div",{role:r.onClick?"button":void 0,tabIndex:r.onClick?0:void 0,onClick:r.onClick,onKeyDown:r.onClick?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),r.onClick?.())}:void 0,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",backgroundColor:t.cardBg,border:n?`1px solid ${t.cardBorder}`:"1px solid #e5e7eb",borderRadius:"8px"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.tokenLogoURI?c.jsx("img",{src:r.tokenLogoURI,alt:r.tokenSymbol,style:{width:"20px",height:"20px",borderRadius:"50%"}}):c.jsx("div",{style:{width:"20px",height:"20px",borderRadius:"50%",backgroundColor:n?t.hoverBg:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:600,color:t.textSecondary},children:r.tokenSymbol.charAt(0)}),c.jsxs("div",{children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:t.textPrimary},children:r.tokenSymbol}),c.jsx("div",{style:{fontSize:"11px",color:t.textSecondary},children:r.label})]})]}),c.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:s(r.valueColor)},children:r.displayValue})]},o))})]})},Pf=p.memo(Mf);var Uf="data:image/svg+xml,%3csvg width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='black' stroke-opacity='0.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3e%3cpolyline points='17 1 21 5 17 9' /%3e%3cpath d='M3 11V9a4 4 0 0 1 4-4h14' /%3e%3cpolyline points='7 23 3 19 7 15' /%3e%3cpath d='M21 13v2a4 4 0 0 1-4 4H3' /%3e%3c/svg%3e";const Qa=({color:e})=>c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[c.jsx("circle",{cx:"7",cy:"7",r:"6.5",stroke:e,strokeWidth:"1.2"}),c.jsx("path",{d:"M7 6v4",stroke:e,strokeWidth:"1.2",strokeLinecap:"round"}),c.jsx("circle",{cx:"7",cy:"4.5",r:"0.7",fill:e})]}),ed=({content:e,label:t="More info",textColor:n="#f9fafb",backgroundColor:s="#111827",borderColor:r="rgba(255,255,255,0.08)",accentColor:o="#9ca3af",children:i})=>{const a=p.useId(),[d,u]=p.useState(!1),m=p.useRef(null),[f,h]=p.useState(!1),[y,g]=p.useState(null);p.useEffect(()=>{h(!0)},[]),p.useLayoutEffect(()=>{if(!d||!m.current)return;const w=()=>{if(!m.current)return;const v=m.current.getBoundingClientRect(),C=Math.min(220,window.innerWidth-48),E=Math.min(Math.max(v.left+v.width/2,24+C/2),window.innerWidth-24-C/2),k=v.top>84;g({top:k?v.top-10:v.bottom+10,left:E,placement:k?"top":"bottom"})};return w(),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[d]);const x=d&&f&&y?hr.createPortal(c.jsxs("span",{id:a,role:"tooltip",style:{position:"fixed",left:y.left,top:y.top,transform:y.placement==="top"?"translate(-50%, -100%)":"translate(-50%, 0)",width:"220px",maxWidth:"min(220px, calc(100vw - 48px))",padding:"10px 12px",borderRadius:"10px",backgroundColor:s,color:n,border:`1px solid ${r}`,boxShadow:"0 18px 45px rgba(0,0,0,0.28)",fontSize:"11px",lineHeight:"1.45",fontWeight:500,textAlign:"left",zIndex:l.z.tooltip,pointerEvents:"none"},children:[e,c.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:"50%",width:"10px",height:"10px",transform:"translateX(-50%) rotate(45deg)",backgroundColor:s,...y.placement==="top"?{bottom:"-6px",borderRight:`1px solid ${r}`,borderBottom:`1px solid ${r}`}:{top:"-6px",borderTop:`1px solid ${r}`,borderLeft:`1px solid ${r}`}}})]}),document.body):null;return c.jsxs(c.Fragment,{children:[c.jsx("span",{ref:m,style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:c.jsx("button",{type:"button","aria-label":t,"aria-describedby":d?a:void 0,onFocus:()=>u(!0),onBlur:()=>u(!1),style:{width:"18px",height:"18px",borderRadius:"999px",display:"inline-flex",alignItems:"center",justifyContent:"center",border:`1px solid ${r}`,backgroundColor:"transparent",color:o,cursor:"help",padding:0,outline:"none",boxShadow:d?`0 0 0 2px ${o}26`:"none",transition:"border-color 120ms ease, box-shadow 120ms ease, color 120ms ease"},children:i||c.jsx(Qa,{color:o})})}),x]})},Wf=({appName:e,status:t,statusLabel:n,totalUsdValue:s,breakdownSubtitle:r,showUsdSummary:o=!0,address:i,dk:a,dark:d=!1,showModeToggle:u,isEmbeddedMode:m=!0,onModeToggle:f})=>{const[h,y]=p.useState(!1),g=async()=>{i&&await l.copyToClipboard(i)&&(y(!0),setTimeout(()=>y(!1),2e3))},x=t==="active",w=n||(x?"Active":"Inactive"),v=x?"#10b981":"#9ca3af",C=c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[c.jsxs("div",{children:[c.jsx("strong",{children:"Embedded:"})," Deposit assets into ",e," account and use them here."]}),c.jsxs("div",{children:[c.jsx("strong",{children:"External:"})," Use assets from your connected wallet here."]})]});return c.jsxs("div",{children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[c.jsxs("div",{style:{fontSize:"13px",fontWeight:600,color:a.textPrimary},children:[e," Account"]}),u?c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsxs("button",{onClick:f,style:{display:"flex",alignItems:"center",gap:"4px",padding:"2px 8px",borderRadius:"9999px",backgroundColor:d?a.hoverBg:"#f3f4f6",border:d?`1px solid ${a.cardBorder}`:"1px solid #e5e7eb",cursor:"pointer",fontSize:"11px",fontWeight:600,fontFamily:l.font.mono,color:a.textSecondary,transition:"background-color 150ms ease, border-color 150ms ease, color 150ms ease",letterSpacing:"0.02em"},children:[c.jsx("span",{children:m?"Embedded":"External"}),c.jsx("img",{src:Uf,alt:"","aria-hidden":"true",style:{width:"11px",height:"11px",display:"block",...d?{filter:"invert(0.65)"}:{}}})]}),c.jsx(ed,{content:C,label:"Account mode info",textColor:d?a.textPrimary:"#f9fafb",backgroundColor:d?a.cardBg:"#111827",borderColor:d?a.cardBorder:"rgba(255,255,255,0.08)",accentColor:d?a.textSecondary:"#6b7280",children:c.jsx("img",{src:Ha,alt:"","aria-hidden":"true",style:{width:"12px",height:"12px",display:"block",...d?{filter:"invert(0.65)"}:{}}})})]}):c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",padding:"2px 8px",borderRadius:"9999px",backgroundColor:d?a.hoverBg:x?"#ecfdf5":"#f3f4f6",border:d?`1px solid ${a.cardBorder}`:x?"1px solid #a7f3d0":"1px solid #e5e7eb"},children:[c.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:v}}),c.jsx("span",{style:{fontSize:"11px",fontWeight:500,color:d?a.textSecondary:x?"#065f46":"#6b7280"},children:w})]})]}),o&&c.jsx("div",{style:{fontSize:"28px",fontWeight:700,color:a.textPrimary,lineHeight:1.2,marginBottom:"2px"},children:l.formatUsd(s)}),o&&r&&c.jsx("div",{style:{fontSize:"12px",color:a.textSecondary,marginBottom:"8px"},children:r}),i&&c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsx("span",{style:{fontSize:"12px",fontFamily:l.font.mono,color:d?a.textSecondary:"#9ca3af"},children:l.truncateAddress(i)}),c.jsx("button",{onClick:g,style:{padding:"2px 6px",fontSize:"10px",fontWeight:500,backgroundColor:"transparent",color:d?a.textSecondary:"#9ca3af",border:"none",cursor:"pointer",borderRadius:"4px",transition:"background-color 150ms ease, color 150ms ease"},title:"Copy address",children:h?"Copied":"Copy"})]})]})},qf=p.memo(Wf),Lf={1:"ethereum",56:"binance-smart-chain",137:"polygon-pos",143:"monad",4114:"citrea",4663:"robinhood",8453:"base",42161:"arbitrum-one"},zf=6e4,Lr=new Map;function td(e,t){return Lr.get(e)?.logos?.get(t.toLowerCase())}function Hf(e,t){const n=Lf[e];if(!n||S.isNativeToken(t))return;const s=Lr.get(e);if(s?.logos||s?.pending)return s.pending;if(s?.failedAt!==void 0&&Date.now()-s.failedAt<zf)return;const r=Promise.resolve().then(async()=>{try{const o=await fetch(`https://tokens.coingecko.com/${n}/all.json`,{signal:AbortSignal.timeout(1e4)});if(!o.ok)throw new Error("Token list request failed");const i=await o.json(),a=new Map;for(const d of i?.tokens??[])d?.address&&d?.logoURI&&a.set(String(d.address).toLowerCase(),d.logoURI);Lr.set(e,{logos:a})}catch(o){console.warn(`[tokenLogos] Token list unavailable for chain ${e}`,o),Lr.set(e,{failedAt:Date.now()})}});return Lr.set(e,{...s,pending:r}),r}function Ga(e,t,n){const[s,r]=p.useState(),o=e||e===null||t===void 0||!n?void 0:`${t}:${n.toLowerCase()}`,i=o?td(t,n):void 0;return p.useEffect(()=>{if(!o||i||t===void 0||!n)return;let a=!0;const d=()=>{const m=td(t,n);a&&m&&r({token:o,logo:m})},u=Hf(t,n);return u?u.then(d):d(),()=>{a=!1}},[o,i,t,n]),e||i||(s&&s.token===o?s.logo:void 0)}const Vf=({asset:e,label:t,logo:n,dk:s,dark:r})=>{const o=Ga(n,e.chainId,e.tokenAddress),[i,a]=p.useState();return n===null?null:o&&o!==i?c.jsx("img",{src:o,alt:t,onError:()=>a(o),style:{width:"24px",height:"24px",borderRadius:"50%"}}):c.jsx("div",{style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:r?s.hoverBg:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",fontWeight:600,color:s.textSecondary},children:t.charAt(0)})},Qf=e=>`${e.tokenAddress}-${e.chainId}`,Gf=({spiceAssets:e,loading:t,dk:n,dark:s=!1,canDirectWithdraw:r=!1,onDirectWithdraw:o,directWithdrawState:i,onWithdrawClick:a,limit:d})=>{const u=l.useAssetDisplay(),[m,f]=p.useState(!1),h=d!==void 0&&!m?Math.max(e.length-d,0):0,y=h>0?e.slice(0,d):e,g={fontSize:"11px",fontWeight:600,letterSpacing:"1px",color:n.textSecondary,marginBottom:"8px",textTransform:"uppercase"},x={backgroundColor:n.cardBg,border:s?`1px solid ${n.cardBorder}`:"1px solid #e5e7eb",borderRadius:"8px"};return t?c.jsxs("div",{children:[c.jsx("div",{style:g,children:"Idle Balances"}),[1,2].map(w=>c.jsx("div",{style:{...x,padding:"12px",marginBottom:"6px",height:"48px",animation:"pulse 1.5s ease-in-out infinite",opacity:.5}},w))]}):e.length===0?c.jsxs("div",{children:[c.jsx("div",{style:g,children:"Idle Balances"}),c.jsx("div",{style:{...x,padding:"16px",textAlign:"center",fontSize:"13px",color:s?n.textSecondary:"#9ca3af"},children:"No assets yet. Deposit to get started."})]}):c.jsxs("div",{children:[c.jsx("div",{style:g,children:"Idle Balances"}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[y.map(w=>{const v=l.getChainConfig(w.chainId),C=w.chainDisplayName||v?.displayName||`Chain ${w.chainId}`,E=u({symbol:w.tokenSymbol,displaySymbol:w.tokenDisplaySymbol||w.tokenDisplayName,displayName:w.tokenDisplayName,receiptTokenId:w.receiptTokenId,receiptTokenName:w.receiptTokenName,location:w.location,logoURI:w.logoURI}),k=E.symbol,F=Qf(w),j=w.receiptTokenId&&a,I=j||r&&w.directWithdraw&&!!o,b=!j&&i?.key===F?i:null,A=b?.step==="pending";return c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",...x},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Vf,{asset:w,label:k,logo:E.logoURI,dk:n,dark:s}),c.jsxs("div",{children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:n.textPrimary},children:k}),c.jsx("div",{style:{fontSize:"11px",color:s?n.textSecondary:"#9ca3af"},children:C})]})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[c.jsxs("div",{style:{textAlign:"right"},children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:n.textPrimary},children:l.formatAssetBalance({balance:BigInt(w.balance),decimals:w.tokenDecimals})}),c.jsx("div",{style:{fontSize:"11px",color:b?.step==="error"?n.errorText:s?n.textSecondary:"#9ca3af"},children:b?.step==="error"?b.message||"Withdraw failed":!Number.isFinite(w.usdValue)||w.usdValue<=0?"\u2014":`${l.formatUsd(w.usdValue)}${w.priceStatus==="stale"?" (stale)":""}`})]}),I&&c.jsx("button",{onClick:()=>{A||(j?j(w.receiptTokenId):o(w))},disabled:A,title:j?"Choose withdrawal network":"Withdraw to external wallet",style:{padding:"6px 10px",borderRadius:"6px",border:s?`1px solid ${n.cardBorder}`:"1px solid #e5e7eb",backgroundColor:s?n.hoverBg:"#ffffff",color:n.textPrimary,fontSize:"11px",fontWeight:600,cursor:A?"default":"pointer",opacity:A?.6:1,whiteSpace:"nowrap"},children:A?"Withdrawing\u2026":"Withdraw"})]})]},w.positionId??`${w.owner??""}:${w.location??""}:${w.receiptTokenId??`${w.tokenAddress}-${w.chainId}`}`)}),d!==void 0&&e.length>d&&c.jsxs("button",{onClick:()=>f(!m),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",width:"100%",padding:"8px 12px",...x,cursor:"pointer",color:n.textSecondary,fontSize:"12px",fontWeight:500},children:[c.jsx("span",{children:m?"Show less":`Show ${h} more`}),c.jsx("span",{style:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease",fontSize:"10px"},children:"\u25BE"})]})]})]})},Kf=p.memo(Gf),Yf=({appName:e,status:t,statusLabel:n,totalUsdValue:s,breakdownSubtitle:r,showUsdSummary:o,address:i,spiceAssets:a,spiceAssetsLoading:d,customSections:u,notice:m,onDepositClick:f,onWithdrawClick:h,depositDisabled:y,primaryColor:g,buttonStyles:x,dk:w,dark:v=!1,showModeToggle:C,isEmbeddedMode:E,onModeToggle:k,showConnectExternalCta:F,onConnectExternalWallet:j,connectExternalError:I,showHowItWorks:b=!0,canDirectWithdraw:A,onDirectWithdraw:R,directWithdrawState:B,idleBalancesLimit:q})=>{const[O,P]=p.useState(!1);return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",padding:"16px",maxHeight:"calc(80vh - 32px)",overflowY:"auto"},children:[c.jsx(qf,{appName:e,status:t,statusLabel:n,totalUsdValue:s,breakdownSubtitle:r,showUsdSummary:o,address:i,dk:w,dark:v,showModeToggle:C,isEmbeddedMode:E,onModeToggle:k}),m&&c.jsx("div",{style:{padding:"10px 12px",borderRadius:"8px",backgroundColor:m.tone==="warning"?v?"rgba(245, 158, 11, 0.12)":"#fffbeb":m.tone==="success"?v?"rgba(16, 185, 129, 0.12)":"#ecfdf5":w.cardBg,border:m.tone==="warning"?v?"1px solid rgba(245, 158, 11, 0.35)":"1px solid #fde68a":m.tone==="success"?v?"1px solid rgba(16, 185, 129, 0.35)":"1px solid #a7f3d0":v?`1px solid ${w.cardBorder}`:"1px solid #e5e7eb",color:m.tone==="warning"?v?"#fbbf24":"#92400e":m.tone==="success"?v?"#34d399":"#047857":w.textSecondary,fontSize:"12px",lineHeight:1.45,fontWeight:500},children:m.message}),F&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[c.jsx("button",{onClick:j,style:{width:"100%",padding:"10px 14px",borderRadius:"8px",backgroundColor:g||"#EA4B4B",color:"#ffffff",border:"none",cursor:"pointer",fontSize:"13px",fontWeight:600,fontFamily:l.font.ui,transition:"opacity 150ms ease"},children:"Connect External Wallet"}),I&&c.jsx("span",{style:{fontSize:"11px",color:v?w.errorText:"#b91c1c",lineHeight:1.4},children:I})]}),c.jsx("div",{style:{height:"1px",backgroundColor:v?"#2d2d2d":"#e5e7eb"}}),c.jsx(Nf,{onDepositClick:f,onWithdrawClick:h,depositDisabled:y,primaryColor:g,buttonStyles:x,dark:v}),b&&c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>P(!O),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"8px 12px",backgroundColor:w.cardBg,border:v?`1px solid ${w.cardBorder}`:"1px solid #e5e7eb",borderRadius:"8px",cursor:"pointer",color:w.textSecondary,fontSize:"12px",fontWeight:500},children:[c.jsx("span",{children:"How It Works"}),c.jsx("span",{style:{transform:O?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease",fontSize:"10px"},children:"\u25BE"})]}),O&&c.jsxs("div",{style:{marginTop:"6px",padding:"10px 12px",backgroundColor:v?w.cardBg:"#f0fdf4",border:v?`1px solid ${w.cardBorder}`:"1px solid #bbf7d0",borderRadius:"8px",fontSize:"12px",lineHeight:1.5,color:v?w.textSecondary:"#374151"},children:["Fund your ",e," Account from any supported chain. Once funded, transact gas-free and asset-abstracted on ",e,"."]})]}),c.jsx(Kf,{spiceAssets:a,loading:d,dk:w,dark:v,canDirectWithdraw:A,onDirectWithdraw:R,directWithdrawState:B,onWithdrawClick:h,limit:q}),u.map((D,M)=>c.jsx(Pf,{section:D,dk:w,dark:v},M))]})},Zf=p.memo(Yf);function Xf({dark:e,onSuccess:t,onError:n}){const{disconnect:s}=as.useDisconnect(),{logout:r}=mr.usePrivy(),[o,i]=p.useState(!1);return c.jsx(l.Button,{variant:"ghost",fullWidth:!0,dark:e,loading:o,onClick:async()=>{i(!0);try{s(),await r(),t()}catch(a){n(l.sanitizeError(a,"Unable to disconnect. Please try again."))}finally{i(!1)}},children:"Disconnect"})}const Ka=380,qs=8,Jf=[],$f={};function nd(e){return e?.trim().replace(/^spice/i,"").replace(/[^a-z0-9]/gi,"").toUpperCase()||void 0}function _f(e,t){const n=new Map;Object.entries(t).forEach(([r,o])=>{if(!Number.isFinite(o)||o<=0)return;n.set(r,o),n.set(r.toUpperCase(),o);const i=nd(r);i&&n.set(i,o)});const s=[e.symbol,e.displaySymbol,e.receiptTokenName,e.name,e.displayName];for(const r of s){if(!r)continue;const o=n.get(r)??n.get(r.toUpperCase());if(o!==void 0)return o;const i=nd(r);if(!i)continue;const a=n.get(i);if(a!==void 0)return a}return 0}const sd=({appName:e,status:t="active",statusLabel:n,customSections:s=Jf,extraAssets:r=[],tokenPrices:o={},tokenLogos:i=$f,breakdownLabels:a=[],notice:d,styles:u,dark:m,onDepositClick:f,onWithdrawClick:h,showModeToggle:y=!1,defaultMode:g,showUsdSummary:x=!0,alwaysShowEmbeddedIdle:w=!1,idleBalancesLimit:v,showDisconnect:C=!1})=>{const E=p.useContext(l.SpiceFlowProviderContext),k=E?.mode!=="7702",F=!!E?.isWhitelistGateActive,j=!!E?.isWhitelistConfigured&&E?.isUserWhitelisted!==!0,I=p.useRef(!1);p.useEffect(()=>{if(!I.current){if(l.hasStoredSpiceFlowMode()){I.current=!0;return}g&&E?.setMode&&(E.setMode(g==="non7702"?"ondemand":"7702"),I.current=!0)}},[E,g]);const[b,A]=p.useState(!1),[R,B]=p.useState({top:0,bottom:0,left:0,placement:"below"}),q=p.useRef(null),O=p.useRef(null),{address:P,isConnected:D}=l.useWallet(),M=E?.embeddedWalletAddress,L=E?.externalWalletAddress,{embeddedAddress:T}=l.useProviderWallets(),{brand:H,dark:V,primaryColor:te,dk:Z}=l.useSpiceBrand(u,m),K=e??H?.appName??"Spice",Y=k&&!L,J=!k||w,ge=J?M||T:P,pe=p.useMemo(()=>E?.supportedChainIds??S.getChainIdsByNetwork("mainnet"),[E?.supportedChainIds]),we=Ms({owner:J?ge:L,role:"holding",sourceChains:pe,additionalSourceTokens:r.filter(Fe=>!Fe.receiptTokenId&&(!Fe.owner||l.addressesEqual(Fe.owner,J?ge:L))).map(Fe=>({address:Fe.tokenAddress,chainId:Fe.chainId,decimals:Fe.tokenDecimals,symbol:Fe.tokenSymbol,logoURI:Fe.logoURI})),includeRollupAssets:J,enabled:J?!!ge:!!L}),ve=we.assets.filter(Fe=>Fe._source==="spice"),ne=we.walletAssets,_=we.loading,le=we.refresh,W=J?ge:L,De=p.useMemo(()=>r.filter(Fe=>!Fe.owner||Fe.owner.toLowerCase()===W?.toLowerCase()).map(Fe=>({...Fe,owner:Fe.owner??W,location:Fe.location??(Fe.receiptTokenId?"rollup":J?"embedded":"external")})),[r,W,J]),Ae=p.useMemo(()=>{const Fe=new Map(Object.entries(o).filter(([,Ie])=>Number.isFinite(Ie)&&Ie>0).map(([Ie,lt])=>[Ie.toLowerCase(),lt]));return ne.map(Ie=>({owner:Ie.owner,location:Ie.location,positionId:xe(Ie),tokenAddress:Ie.address,tokenSymbol:Ie.symbol,tokenDecimals:Ie.decimals,chainId:Ie.chainId,chainDisplayName:l.getChainName(Ie.chainId),balance:Ie.balance.toString(),balanceFormatted:Ie.balanceFormatted,usdValue:Ie.balanceUsd||(Fe.get(`${Ie.chainId}:${Ie.address.toLowerCase()}`)??0)*Ie.balanceFormatted,logoURI:Ie.logoURI||i[Ie.symbol],directWithdraw:J}))},[ne,De,i,o,J]),z=p.useMemo(()=>{const Fe=J?ve.map(ae=>{const dt=ae.balanceUsd||0,ut=Number.isFinite(ae.balanceFormatted)?ae.balanceFormatted:0,Pe=_f(ae,o),vt=ae.priceStatus&&Pe>0?Pe*ut:dt>0?dt:Pe*ut;return{owner:ae.owner,location:ae.location,positionId:xe(ae),tokenAddress:ae.address,tokenSymbol:ae.symbol,tokenDisplaySymbol:l.getAssetDisplaySymbol(ae),tokenDisplayName:l.getAssetDisplayName(ae),tokenDecimals:ae.decimals,chainId:ae.chainId,chainDisplayName:l.getAssetDisplayChainName(ae),balance:ae.balance.toString(),balanceFormatted:ae.balanceFormatted,usdValue:vt,priceStatus:Pe>0?void 0:ae.priceStatus,logoURI:ae.logoURI,receiptTokenId:ae.receiptTokenId,receiptTokenName:ae.receiptTokenName}}):[],Ie=ae=>`${ae.owner?.toLowerCase()}:${ae.location}:${ae.chainId}:${ae.receiptTokenId??S.normalizeNativeTokenAddress(ae.tokenAddress).toLowerCase()}`,lt=new Map([...we.rollupAssets,...ne].map(ae=>[Ie({...ae,tokenAddress:ae.address}),ae])),_e=new Map([...Fe,...Ae].map(ae=>[Ie(ae),ae]));for(const ae of Y?[]:De){const dt=Ie(ae),ut=_e.get(dt);_e.set(dt,ut?{...ae,...ut,logoURI:ae.logoURI??ut.logoURI,tokenDisplayName:ae.tokenDisplayName??ut.tokenDisplayName,tokenDisplaySymbol:ae.tokenDisplaySymbol??ut.tokenDisplaySymbol}:ae)}return[..._e.values()].filter(ae=>BigInt(ae.balance)>0n&&hc({isDiscovered:lt.get(Ie(ae))?.isDiscovered,balanceUsd:ae.usdValue},!0)&&l.isAssetAllowed(lt.get(Ie(ae))??{address:ae.tokenAddress,symbol:ae.tokenSymbol,displaySymbol:ae.tokenDisplaySymbol},E?.allowedTokens)).sort((ae,dt)=>dt.usdValue-ae.usdValue)},[J,Y,ve,we.rollupAssets,o,Ae,De,E?.allowedTokens]),Q=p.useMemo(()=>z.reduce((Fe,Ie)=>Fe+Ie.usdValue,0),[z]),se=p.useMemo(()=>s.reduce((Fe,Ie)=>Fe+(Ie.totalValue??0),0),[s]),ie=Q+se,X=p.useMemo(()=>{const Fe=[];Q>0&&Fe.push(`${l.formatUsd(Q)} idle`);for(const Ie of s){const lt=a.find(_e=>_e.sectionTitle===Ie.title)?.label||Ie.title.toLowerCase();Fe.push(`${l.formatUsd(Ie.totalValue??0)} ${lt}`)}return Fe.join(" \xB7 ")},[Q,s,a]),oe=p.useCallback(()=>{if(!q.current)return;const Fe=q.current.getBoundingClientRect(),Ie=window.innerHeight-Fe.bottom-qs,lt=Fe.top-qs,_e=Ie>=400||Ie>=lt?"below":"above",ae=Math.max(qs,Math.min(Fe.right-Ka,window.innerWidth-Ka-qs)),dt=_e==="below"?Fe.bottom+qs:Fe.top-qs,ut=_e==="above"?window.innerHeight-dt:0;B({top:dt,bottom:ut,left:ae,placement:_e})},[]);p.useLayoutEffect(()=>{b&&oe()},[b,oe]),p.useEffect(()=>{if(!b)return;const Fe=_e=>{q.current&&!q.current.contains(_e.target)&&O.current&&!O.current.contains(_e.target)&&A(!1)},Ie=_e=>{_e.key==="Escape"&&A(!1)},lt=()=>oe();return document.addEventListener("mousedown",Fe),document.addEventListener("keydown",Ie),window.addEventListener("scroll",lt,{passive:!0}),window.addEventListener("resize",oe),()=>{document.removeEventListener("mousedown",Fe),document.removeEventListener("keydown",Ie),window.removeEventListener("scroll",lt),window.removeEventListener("resize",oe)}},[b,oe]);const je=J?M||T||P:L||P,Me=p.useCallback(()=>{E?.setMode&&E.setMode(k?"7702":"ondemand")},[E,k]),[me,Se]=p.useState(null);let Te=null;try{Te=mr.useConnectWallet({onSuccess:()=>Se(null),onError:Fe=>Se(l.sanitizeError(Fe,"Failed to connect wallet."))}).connectWallet}catch{Te=null}const be=p.useCallback(()=>{Te&&(A(!1),Se(null),Te({walletChainType:"ethereum-only"}))},[Te]),qe=!L&&!!Te,ye=p.useCallback(()=>{A(!1),f?.()},[f]),Ue=p.useCallback(Fe=>{A(!1),h?.(Fe)},[h]),[de,Ye]=p.useState(null),pt=J&&!!L&&!l.addressesEqual(W,L),tt=p.useCallback(Fe=>{const Ie=ne.find(lt=>lt.chainId===Fe.chainId&&l.addressesEqual(lt.address,Fe.tokenAddress));Ie&&(A(!1),Ye(Ie))},[ne]);if(typeof window>"u")return null;const $e=c.jsxs("button",{ref:q,onClick:()=>A(!b),style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"8px 14px",borderRadius:"9999px",backgroundColor:V?Z.hoverBg:"#ffffff",border:V?`1px solid ${Z.cardBorder}`:"1px solid #e5e7eb",cursor:"pointer",fontSize:"13px",fontWeight:500,fontFamily:l.font.ui,color:V?Z.textPrimary:"#111827",transition:"background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease",boxShadow:V?"none":"0 1px 2px rgba(0,0,0,0.05)"},children:[c.jsxs("span",{children:[K," Account"]}),D&&x&&c.jsxs("span",{style:{color:V?Z.textSecondary:"#6b7280"},children:["\xB7 ",l.formatUsd(ie)]}),c.jsx("span",{style:{fontSize:"10px",color:V?Z.textSecondary:"#9ca3af",transform:b?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:"\u25BE"})]}),Ge=b?hr.createPortal(c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.08)",zIndex:l.z.popover},onClick:()=>A(!1)}),c.jsxs("div",{ref:O,style:{position:"fixed",top:R.placement==="below"?`${R.top}px`:"auto",bottom:R.placement==="above"?`${R.bottom}px`:"auto",left:`${R.left}px`,width:`${Ka}px`,maxWidth:`calc(100vw - ${qs*2}px)`,maxHeight:"80vh",backgroundColor:V?Z.shell:"#ffffff",border:V?`1px solid ${Z.cardBorder}`:"1px solid #e5e7eb",borderRadius:"12px",boxShadow:V?"0 10px 40px rgba(0, 0, 0, 0.5)":"0 10px 40px rgba(0, 0, 0, 0.12)",zIndex:l.z.popover+1,overflow:"hidden",animation:`accountDisplayFadeIn 200ms ${l.easing.out}`},children:[c.jsx(Zf,{appName:K,status:t,statusLabel:n,totalUsdValue:ie,breakdownSubtitle:X,showUsdSummary:x,address:J?je:P,spiceAssets:z,spiceAssetsLoading:_,customSections:s,notice:d,onDepositClick:f?ye:void 0,onWithdrawClick:h?Ue:void 0,depositDisabled:j,primaryColor:te,buttonStyles:u?.button,dk:Z,dark:V,showModeToggle:y,isEmbeddedMode:!k,onModeToggle:Me,showConnectExternalCta:qe,onConnectExternalWallet:be,connectExternalError:me,showHowItWorks:!F,canDirectWithdraw:pt,onDirectWithdraw:tt,idleBalancesLimit:v}),C&&D&&c.jsx("div",{style:{padding:"0 16px 16px"},children:c.jsx(Xf,{dark:V,onSuccess:()=>A(!1),onError:Se})})]}),c.jsx("style",{children:`
|
|
15
|
+
`,Zc=({title:e,showChevron:t,expanded:n,onToggleDetails:s,showClose:r,onClose:o,fontFamily:i,labelColor:a,textPrimary:l,closeHoverBg:u,closePressedBg:m})=>{const[f,h]=p.useState(!1),[y,g]=p.useState(!1);return c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"16px"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:s?"pointer":"default"},onClick:s,children:[c.jsxs("span",{style:{fontSize:"13px",fontWeight:500,color:a,fontFamily:i},children:[e," "]}),t&&c.jsx($s,{color:a,direction:n?"up":"down"})]}),r&&c.jsx("button",{onClick:o,onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),style:{background:y?m:f?u:"none",border:"none",borderRadius:"4px",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:f||y?l:a,transform:y?"scale(0.9)":f?"scale(1.1)":"scale(1)",transition:d.transition.interactive},children:c.jsx(Rr,{size:16})})]})},Xc=({chainName:e,bg:t,border:n,textPrimary:s,labelColor:r,primaryColor:o})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"20px 16px",borderRadius:"8px",backgroundColor:t,border:`1px solid ${n}`,gap:"12px"},children:[c.jsx(d.Spinner,{size:24,borderWidth:3,color:o}),c.jsxs("div",{children:[c.jsx("p",{style:{margin:0,fontSize:"14px",fontWeight:600,fontFamily:d.font.mono,letterSpacing:"0.5px",color:s},children:"PROCESSING TRANSACTION"}),c.jsxs("p",{style:{margin:"2px 0 0 0",fontSize:"12px",color:r},children:["on ",e]})]})]}),Jc=({bg:e,border:t,left:n,right:s})=>c.jsxs("div",{style:{padding:"10px 12px",borderRadius:"6px",backgroundColor:e,border:`1px solid ${t}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[n,s]}),xa=({isOpen:e,onClose:t,onComplete:n,closeOnComplete:s=!1,type:r,results:o,chainId:i,chainName:a,explorerUrl:l,theme:u,styles:m,dark:f,intentStatus:h,onRetry:y,onNewTx:g,onRetryTx:x,asOverlay:w=!0,isProcessing:v=!1,showStepBreakdown:C=!0})=>{const{theme:E,primaryColor:k,dark:F,dk:O}=d.useSpiceBrand(m,f),I=u||E,[b,A]=p.useState(!1),R=a??(i?d.getChainName(i):"Network"),B=l??(i&&d.getExplorerUrl(i,"").replace(/\/tx\/.*$/,"")||void 0),q=F?O.cardBg:"#ffffff",j=F?"0 4px 20px rgba(0, 0, 0, 0.4)":"0 4px 20px rgba(0, 0, 0, 0.1)",P=F?"0 -4px 8px -2px rgba(0, 0, 0, 0.4)":"0 -4px 8px -2px rgba(0, 0, 0, 0.15)",D=O.textSecondary,M=F?O.textPrimary:"#374151",L=F?O.inputBg:"#f9fafb",T=F?O.inputBorder:"#e5e7eb",H=F?O.inputBg:"#f3f4f6",V=F?O.inputBorder:"#e5e7eb",[te,Z]=p.useState(!0),K=F?O.inputBg:"#f9fafb",Y=F?O.hoverBg:"#f3f4f6",J=F?{successBg:O.successBg,successBorder:O.successBorder,successText:O.successText,errorBg:O.errorBg,errorBorder:O.errorBorder,errorText:O.errorText}:{},we=h?.steps.find(de=>de.status==="failed")?.error;p.useEffect(()=>{!e&&!h&&A(!1)},[e,h]);const me=()=>{A(!0),setTimeout(()=>{window.dispatchEvent(new CustomEvent("tx-complete",{detail:{type:r,results:o}})),window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:{type:r,status:"success",results:o}})),n?.(),s&&t()},300)},xe=()=>{Z(!te)};if(h){const{steps:de,overallStatus:W}=h,je=W==="processing",Ae=W==="success",z=W==="failed",Q=de.filter(oe=>oe.transactionHash)[0],se=de.length>1?de.map(oe=>oe.chainName).filter(Boolean).join(" and "):R!=="Network"?R:de[0]?.chainName||R,ce=B||(Q?d.getExplorerUrl(Q.chainId,Q.transactionHash||"").replace(/\/tx\/.*$/,""):void 0),X=c.jsxs(c.Fragment,{children:[c.jsx(Zc,{title:je?`Processing ${r.charAt(0).toUpperCase()+r.slice(1)}`:`${r.charAt(0).toUpperCase()+r.slice(1)} results`,showChevron:C,expanded:te,onToggleDetails:xe,showClose:!je,onClose:t,fontFamily:m?.fontFamily||I.typography.fontFamily,labelColor:D,textPrimary:M,closeHoverBg:K,closePressedBg:Y}),c.jsx("div",{style:{marginBottom:"16px"},children:je?c.jsx(Xc,{chainName:se,bg:H,border:V,textPrimary:M,labelColor:D,primaryColor:k}):c.jsx(Kc,{isSuccess:Ae,type:r,chainName:se,explorerUrl:ce,txHash:Q?.transactionHash,dark:F,...J,textSecondary:D})}),C&&c.jsx("div",{style:{overflow:"hidden",maxHeight:te?"300px":"0px",opacity:te?1:0,transition:"max-height 0.3s ease, opacity 0.3s ease",marginBottom:te?"16px":"0"},children:c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:de.map((oe,Oe)=>{const Ne=oe.transactionHash?d.getExplorerUrl(oe.chainId,oe.transactionHash):null;return c.jsx(Jc,{bg:L,border:T,left:c.jsx("span",{style:{fontSize:"13px",color:M},children:oe.chainName?`On ${oe.chainName}`:oe.description||`Step ${Oe+1}`}),right:c.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"12px",color:oe.status==="success"?"#10b981":oe.status==="failed"?"#ef4444":D,fontWeight:500},children:[Ne&&c.jsx("a",{href:Ne,target:"_blank",rel:"noopener noreferrer",style:{color:F?O.infoText:"#2563eb",textDecoration:"none"},onClick:he=>he.stopPropagation(),children:"View"}),oe.status==="success"?"\u2713":oe.status==="failed"?"\u2717":"\u25CB"]})},Oe)})})}),!je&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[z&&y&&c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:y,theme:I,styles:m,dark:F,children:"TRY AGAIN"}),g&&c.jsxs(d.Button,{variant:"outline",fullWidth:!0,onClick:g,theme:I,styles:m,dark:F,children:["NEW ",r.toUpperCase()," \u2192"]})]})]});return w?c.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,zIndex:10,animation:b?"slideDown 0.3s ease-in forwards":"slideUp 0.3s ease-out forwards",pointerEvents:"auto"},children:[c.jsx("div",{style:{backgroundColor:q,borderRadius:"12px 12px 0 0",width:"100%",padding:"18px 24px 24px",boxShadow:P},children:X}),c.jsx("style",{children:Yc})]}):c.jsx("div",{style:{backgroundColor:q,borderRadius:"12px",padding:"24px",width:"100%",boxShadow:j},children:X})}if(!e&&!v||!v&&(!o||o.length===0))return null;const Ce=o?o.every(de=>de.success):!1,ne=o?.[0],_=[...o??[]].reverse().find(de=>de.txHash)?.txHash||ne?.txHash;return c.jsxs("div",{style:{position:w?"absolute":"relative",bottom:w?0:void 0,left:w?0:void 0,right:w?0:void 0,zIndex:w?10:void 0,animation:w?b?"slideDown 0.3s ease-in forwards":"slideUp 0.3s ease-out forwards":void 0,pointerEvents:"auto",width:"100%"},children:[c.jsx("div",{style:{backgroundColor:q,borderRadius:w?"12px 12px 0 0":"12px",width:"100%",padding:"18px 0 24px",boxShadow:w?P:j},children:c.jsxs("div",{style:{width:"100%",boxSizing:"border-box",padding:"0 24px"},children:[c.jsx(Zc,{title:v?`Processing ${r.charAt(0).toUpperCase()+r.slice(1)}`:`${r.charAt(0).toUpperCase()+r.slice(1)} results`,showChevron:!v&&C,expanded:te,onToggleDetails:v?void 0:xe,showClose:!v,onClose:t,fontFamily:m?.fontFamily||I.typography.fontFamily,labelColor:D,textPrimary:M,closeHoverBg:K,closePressedBg:Y}),c.jsx("div",{style:{marginBottom:"16px",animation:"statusFadeIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both"},children:v?c.jsx(Xc,{chainName:R,bg:H,border:V,textPrimary:M,labelColor:D,primaryColor:k}):c.jsx(Kc,{isSuccess:Ce,type:r,chainName:R,explorerUrl:B,txHash:_,dark:F,...J,textSecondary:D})},v?"processing":Ce?"success":"error"),!v&&C&&o&&o.length>1&&c.jsx("div",{style:{overflow:"hidden",maxHeight:te?"200px":"0px",opacity:te?1:0,transition:"max-height 0.3s ease, opacity 0.3s ease",marginBottom:te?"16px":"0"},children:c.jsx("div",{style:{maxHeight:"180px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"8px"},children:o.map((de,W)=>c.jsx(Jc,{bg:L,border:T,left:c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx("span",{style:{fontWeight:600,fontSize:"13px",color:O.textPrimary,fontFamily:d.font.mono},children:de.asset.symbol}),de.amount&&c.jsx("span",{style:{fontSize:"12px",color:D},children:de.amount})]}),right:c.jsx("span",{style:{fontSize:"12px",color:de.success?"#10b981":"#ef4444",fontWeight:500},children:de.success?"\u2713":"\u2717"})},W))})}),!v&&!Ce&&o&&c.jsx("div",{style:{padding:"12px",backgroundColor:O.errorBg,border:`1px solid ${O.errorBorder}`,borderRadius:"8px",marginBottom:"16px"},children:c.jsx("p",{style:{fontSize:"13px",color:O.errorText,margin:0,lineHeight:1.5},children:we||o.find(de=>!de.success)?.error||`${r.charAt(0).toUpperCase()+r.slice(1)} failed. Please try again.`})}),!v&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[!Ce&&x&&c.jsxs(d.Button,{variant:"outline",fullWidth:!0,onClick:x,theme:I,styles:m,dark:F,children:["TRY AGAIN ",r.toUpperCase()]}),Ce&&c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:me,theme:I,styles:m,dark:F,children:"DONE"})]})]})}),c.jsx("style",{children:Yc})]})};function Ep(e,t){switch(e){case"success":return{bg:t.successBg,border:t.successBorder,text:t.successText};case"warning":return{bg:t.warningBg,border:t.warningBorder,text:t.warningText};case"error":return{bg:t.errorBg,border:t.errorBorder,text:t.errorText};case"info":return{bg:t.infoBg,border:t.infoBorder,text:t.infoText}}}const vn=({variant:e,palette:t,children:n,icon:s,style:r,fontFamily:o,size:i="default"})=>{const a=Ep(e,t),l=i==="compact";return c.jsxs("div",{role:e==="error"?"alert":"status",style:{backgroundColor:a.bg,border:`1px solid ${a.border}`,borderRadius:l?"7px":"8px",padding:l?"8px 10px":"12px 16px",color:a.text,fontSize:l?"12px":"13px",lineHeight:l?1.4:1.5,display:"flex",alignItems:"flex-start",gap:l?"6px":"8px",fontFamily:o,...r},children:[s&&c.jsx("span",{style:{flexShrink:0,display:"flex",alignItems:"center"},children:s}),c.jsx("span",{style:{minWidth:0,overflowWrap:"anywhere"},children:n})]})};function xo({activity:e,palette:t,onRefresh:n}){return c.jsxs(c.Fragment,{children:[e.actions.length>0&&c.jsx(vn,{variant:"info",palette:t,style:{marginTop:12,marginBottom:12},children:c.jsxs("details",{children:[c.jsx("summary",{children:"Recent wallet activity"}),e.actions.map(s=>{const r=s.intents.flatMap(a=>a.steps),o=r.filter(a=>["success","completed"].includes(a.status)).length,i=r.some(a=>["error","reverted"].includes(a.status));return c.jsxs("p",{children:[s.actionId,": ",o,"/",r.length," steps completed.",i?" Remaining work stopped; completed transfers are retained.":o<r.length?" Awaiting backend confirmation.":" Completed."]},s.actionId)}),c.jsx("button",{type:"button",onClick:()=>{e.refresh(),n?.()},children:n?"Refresh activity and balances":"Refresh activity"})]})}),e.error&&c.jsx(vn,{variant:"warning",palette:t,children:e.error})]})}const $c=d.font.mono,Ln=({label:e,value:t,palette:n,valueColor:s,labelColor:r,style:o})=>c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"12px",...o},children:[c.jsx("span",{style:{fontSize:"12px",color:r??n.textSecondary,fontFamily:$c,fontWeight:500,letterSpacing:"0.03em",flexShrink:0,whiteSpace:"nowrap"},children:e}),c.jsx("span",{style:{fontSize:"13px",color:s??n.textPrimary,fontWeight:500,fontFamily:$c,minWidth:0,textAlign:"right",overflowWrap:"anywhere"},children:t})]});var _c="data:image/svg+xml,%3csvg width='108' height='22' viewBox='0 0 108 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1.9916 11.9854V11.2041H3.98379C4.48835 11.2041 4.87897 11.0739 5.15566 10.8135C5.43236 10.5498 5.5707 10.1868 5.5707 9.72461V9.71484C5.5707 9.24935 5.43236 8.88639 5.15566 8.62598C4.87897 8.36556 4.48835 8.23535 3.98379 8.23535H1.9916V7.4541H4.2084C4.65111 7.4541 5.04173 7.5485 5.38027 7.7373C5.71882 7.92611 5.98411 8.18978 6.17617 8.52832C6.37148 8.86686 6.46914 9.25911 6.46914 9.70508V9.71484C6.46914 10.1608 6.37148 10.5547 6.17617 10.8965C5.98411 11.2383 5.71882 11.5052 5.38027 11.6973C5.04173 11.8893 4.65111 11.9854 4.2084 11.9854H1.9916ZM1.55215 14.5V7.4541H2.43106V14.5H1.55215ZM9.51875 14.5928C9.0207 14.5928 8.58939 14.4837 8.2248 14.2656C7.86348 14.0443 7.58353 13.7301 7.38496 13.3232C7.18965 12.9163 7.09199 12.4329 7.09199 11.873V11.8633C7.09199 11.3001 7.18965 10.8151 7.38496 10.4082C7.58353 10.0013 7.86348 9.6888 8.2248 9.4707C8.58939 9.2526 9.0207 9.14355 9.51875 9.14355C10.0201 9.14355 10.4514 9.2526 10.8127 9.4707C11.174 9.6888 11.4523 10.0013 11.6477 10.4082C11.8462 10.8151 11.9455 11.3001 11.9455 11.8633V11.873C11.9455 12.4329 11.8462 12.9163 11.6477 13.3232C11.4523 13.7301 11.174 14.0443 10.8127 14.2656C10.4514 14.4837 10.0201 14.5928 9.51875 14.5928ZM9.51875 13.8408C9.85078 13.8408 10.1324 13.7627 10.3635 13.6064C10.5946 13.4502 10.7704 13.2256 10.8908 12.9326C11.0145 12.6396 11.0764 12.2865 11.0764 11.873V11.8633C11.0764 11.4466 11.0145 11.0918 10.8908 10.7988C10.7704 10.5059 10.5946 10.2829 10.3635 10.1299C10.1324 9.97363 9.85078 9.89551 9.51875 9.89551C9.18672 9.89551 8.90514 9.97363 8.67402 10.1299C8.4429 10.2829 8.26549 10.5059 8.1418 10.7988C8.02135 11.0918 7.96113 11.4466 7.96113 11.8633V11.873C7.96113 12.2865 8.02135 12.6396 8.1418 12.9326C8.26549 13.2256 8.4429 13.4502 8.67402 13.6064C8.90514 13.7627 9.18672 13.8408 9.51875 13.8408ZM13.7842 14.5L12.3096 9.23633H13.1592L14.1943 13.4453H14.2725L15.4492 9.23633H16.2549L17.4316 13.4453H17.5098L18.5449 9.23633H19.3896L17.915 14.5H17.0605L15.8838 10.4277H15.8057L14.6338 14.5H13.7842ZM22.1658 14.5928C21.6645 14.5928 21.2332 14.4821 20.8719 14.2607C20.5138 14.0394 20.2371 13.7269 20.0418 13.3232C19.8497 12.9163 19.7537 12.4378 19.7537 11.8877V11.8828C19.7537 11.3392 19.8497 10.8623 20.0418 10.4521C20.2371 10.042 20.5122 9.72135 20.867 9.49023C21.2218 9.25911 21.6368 9.14355 22.1121 9.14355C22.5906 9.14355 23.0008 9.25423 23.3426 9.47559C23.6876 9.69694 23.9513 10.0062 24.1336 10.4033C24.3191 10.7972 24.4119 11.2562 24.4119 11.7803V12.1123H20.1932V11.4336H23.9773L23.5574 12.0537V11.7168C23.5574 11.3034 23.4956 10.9632 23.3719 10.6963C23.2482 10.4294 23.0773 10.2308 22.8592 10.1006C22.6411 9.96712 22.3904 9.90039 22.1072 9.90039C21.824 9.90039 21.5701 9.97038 21.3455 10.1104C21.1242 10.2471 20.9484 10.4505 20.8182 10.7207C20.688 10.9909 20.6229 11.3229 20.6229 11.7168V12.0537C20.6229 12.4281 20.6863 12.7487 20.8133 13.0156C20.9402 13.2793 21.1209 13.4827 21.3553 13.626C21.5896 13.766 21.8663 13.8359 22.1854 13.8359C22.423 13.8359 22.6297 13.8034 22.8055 13.7383C22.9813 13.6732 23.1261 13.5902 23.24 13.4893C23.354 13.3883 23.4337 13.2858 23.4793 13.1816L23.4988 13.1377H24.3484L24.3387 13.1768C24.2931 13.3558 24.2117 13.5299 24.0945 13.6992C23.9806 13.8652 23.8325 14.0166 23.6502 14.1533C23.4679 14.2868 23.2514 14.3942 23.0008 14.4756C22.7534 14.5537 22.4751 14.5928 22.1658 14.5928ZM25.4303 14.5V9.23633H26.2799V10.0176H26.358C26.4589 9.74089 26.6298 9.52604 26.8707 9.37305C27.1116 9.22005 27.4094 9.14355 27.7643 9.14355C27.8456 9.14355 27.9254 9.14844 28.0035 9.1582C28.0849 9.16471 28.1467 9.17122 28.1891 9.17773V10.0029C28.1012 9.98665 28.0149 9.97526 27.9303 9.96875C27.8489 9.95898 27.761 9.9541 27.6666 9.9541C27.3964 9.9541 27.1572 10.0078 26.9488 10.1152C26.7405 10.2227 26.5761 10.3724 26.4557 10.5645C26.3385 10.7565 26.2799 10.9811 26.2799 11.2383V14.5H25.4303ZM30.9408 14.5928C30.4395 14.5928 30.0082 14.4821 29.6469 14.2607C29.2888 14.0394 29.0121 13.7269 28.8168 13.3232C28.6247 12.9163 28.5287 12.4378 28.5287 11.8877V11.8828C28.5287 11.3392 28.6247 10.8623 28.8168 10.4521C29.0121 10.042 29.2872 9.72135 29.642 9.49023C29.9968 9.25911 30.4118 9.14355 30.8871 9.14355C31.3656 9.14355 31.7758 9.25423 32.1176 9.47559C32.4626 9.69694 32.7263 10.0062 32.9086 10.4033C33.0941 10.7972 33.1869 11.2562 33.1869 11.7803V12.1123H28.9682V11.4336H32.7523L32.3324 12.0537V11.7168C32.3324 11.3034 32.2706 10.9632 32.1469 10.6963C32.0232 10.4294 31.8523 10.2308 31.6342 10.1006C31.4161 9.96712 31.1654 9.90039 30.8822 9.90039C30.599 9.90039 30.3451 9.97038 30.1205 10.1104C29.8992 10.2471 29.7234 10.4505 29.5932 10.7207C29.463 10.9909 29.3979 11.3229 29.3979 11.7168V12.0537C29.3979 12.4281 29.4613 12.7487 29.5883 13.0156C29.7152 13.2793 29.8959 13.4827 30.1303 13.626C30.3646 13.766 30.6413 13.8359 30.9604 13.8359C31.198 13.8359 31.4047 13.8034 31.5805 13.7383C31.7563 13.6732 31.9011 13.5902 32.015 13.4893C32.129 13.3883 32.2087 13.2858 32.2543 13.1816L32.2738 13.1377H33.1234L33.1137 13.1768C33.0681 13.3558 32.9867 13.5299 32.8695 13.6992C32.7556 13.8652 32.6075 14.0166 32.4252 14.1533C32.2429 14.2868 32.0264 14.3942 31.7758 14.4756C31.5284 14.5537 31.2501 14.5928 30.9408 14.5928ZM36.1486 14.5928C35.7059 14.5928 35.3186 14.4805 34.9865 14.2559C34.6545 14.0312 34.3973 13.7155 34.215 13.3086C34.0328 12.8984 33.9416 12.4199 33.9416 11.873V11.8633C33.9416 11.3132 34.0328 10.8346 34.215 10.4277C34.3973 10.0208 34.6529 9.70508 34.9816 9.48047C35.3137 9.25586 35.7027 9.14355 36.1486 9.14355C36.3895 9.14355 36.6158 9.18262 36.8273 9.26074C37.0422 9.33561 37.2326 9.44141 37.3986 9.57812C37.5647 9.71484 37.6949 9.8776 37.7893 10.0664H37.8674V7.14648H38.717V14.5H37.8674V13.6602H37.7893C37.6818 13.8555 37.5467 14.0231 37.384 14.1631C37.2212 14.2998 37.0357 14.4056 36.8273 14.4805C36.619 14.5553 36.3928 14.5928 36.1486 14.5928ZM36.3439 13.8408C36.663 13.8408 36.938 13.7611 37.1691 13.6016C37.4003 13.4421 37.5777 13.2158 37.7014 12.9229C37.8251 12.6266 37.8869 12.2767 37.8869 11.873V11.8633C37.8869 11.4564 37.8251 11.1064 37.7014 10.8135C37.5777 10.5205 37.4003 10.2943 37.1691 10.1348C36.938 9.97526 36.663 9.89551 36.3439 9.89551C36.0249 9.89551 35.7499 9.97526 35.5188 10.1348C35.2909 10.291 35.1151 10.5156 34.9914 10.8086C34.871 11.1016 34.8107 11.4531 34.8107 11.8633V11.873C34.8107 12.2799 34.871 12.6315 34.9914 12.9277C35.1151 13.2207 35.2909 13.4469 35.5188 13.6064C35.7499 13.7627 36.0249 13.8408 36.3439 13.8408ZM45.1775 14.5928C44.9334 14.5928 44.7072 14.5553 44.4988 14.4805C44.2905 14.4056 44.1049 14.2998 43.9422 14.1631C43.7794 14.0231 43.6443 13.8555 43.5369 13.6602H43.4588V14.5H42.6092V7.14648H43.4588V10.0664H43.5369C43.6346 9.8776 43.7648 9.71484 43.9275 9.57812C44.0936 9.44141 44.2824 9.33561 44.4939 9.26074C44.7088 9.18262 44.9367 9.14355 45.1775 9.14355C45.6235 9.14355 46.0109 9.25586 46.3396 9.48047C46.6717 9.70508 46.9288 10.0208 47.1111 10.4277C47.2934 10.8346 47.3846 11.3132 47.3846 11.8633V11.873C47.3846 12.4199 47.2934 12.8984 47.1111 13.3086C46.9288 13.7155 46.6717 14.0312 46.3396 14.2559C46.0109 14.4805 45.6235 14.5928 45.1775 14.5928ZM44.9822 13.8408C45.3045 13.8408 45.5796 13.7627 45.8074 13.6064C46.0353 13.4469 46.2094 13.2207 46.3299 12.9277C46.4536 12.6315 46.5154 12.2799 46.5154 11.873V11.8633C46.5154 11.4531 46.4536 11.1016 46.3299 10.8086C46.2094 10.5156 46.0353 10.291 45.8074 10.1348C45.5796 9.97526 45.3045 9.89551 44.9822 9.89551C44.6632 9.89551 44.3881 9.97526 44.157 10.1348C43.9259 10.2943 43.7485 10.5205 43.6248 10.8135C43.5011 11.1064 43.4393 11.4564 43.4393 11.8633V11.873C43.4393 12.2767 43.5011 12.6266 43.6248 12.9229C43.7485 13.2158 43.9259 13.4421 44.157 13.6016C44.3881 13.7611 44.6632 13.8408 44.9822 13.8408ZM48.6568 16.3457C48.6015 16.3457 48.5396 16.3424 48.4713 16.3359C48.4029 16.3327 48.3395 16.3262 48.2809 16.3164V15.6182C48.3329 15.6279 48.3899 15.6344 48.4518 15.6377C48.5136 15.641 48.5738 15.6426 48.6324 15.6426C48.8733 15.6426 49.0702 15.5807 49.2232 15.457C49.3795 15.3333 49.5048 15.1201 49.5992 14.8174L49.6969 14.5049L47.7486 9.23633H48.6568L50.2779 14.0996L49.941 13.5674H50.3414L50.0045 14.0996L51.6207 9.23633H52.5143L50.4586 14.8223C50.3154 15.2161 50.164 15.5238 50.0045 15.7451C49.845 15.9665 49.6578 16.1211 49.443 16.209C49.2314 16.3001 48.9693 16.3457 48.6568 16.3457Z' fill='%230E0D0B'/%3e%3cpath d='M62.7081 13.27C62.742 13.27 62.7642 13.3057 62.7491 13.3362V13.336L61.1229 16.6083C61.0892 16.6761 60.9926 16.6759 60.959 16.6083L59.3382 13.336C59.3232 13.3057 59.3453 13.27 59.3792 13.27H62.7081Z' fill='%23EA4B4B'/%3e%3cpath d='M61.0026 9.71913C61.0194 9.68524 61.0678 9.68524 61.0845 9.71913L62.747 13.0897C62.762 13.12 62.7399 13.1557 62.706 13.1557H59.3763C59.3424 13.1557 59.3203 13.12 59.3353 13.0897L61.0026 9.71913Z' fill='%23EA4B4B'/%3e%3cpath d='M60.8426 9.63827C60.8766 9.63827 60.8987 9.6741 60.8835 9.70444L59.2164 13.0594C59.1995 13.0932 59.1513 13.0932 59.1345 13.0594L57.5001 9.77047C57.47 9.70962 57.5142 9.63827 57.5821 9.63827H60.8426Z' fill='%23EA4B4B'/%3e%3cpath d='M64.5036 9.63617C64.5715 9.63618 64.6157 9.70753 64.5855 9.76838H64.5854L62.9512 13.0573C62.9344 13.0911 62.8862 13.0912 62.8692 13.0573L61.2021 9.70235C61.187 9.672 61.2091 9.63617 61.2431 9.63617H64.5036Z' fill='%23EA4B4B'/%3e%3cpath d='M62.8284 6.18281C62.862 6.11518 62.9586 6.11518 62.9922 6.18281L64.5855 9.38969C64.6157 9.45054 64.5715 9.52189 64.5036 9.52189H61.2431C61.2091 9.52189 61.187 9.48605 61.2021 9.45571L62.8283 6.18265L62.8284 6.18281Z' fill='%23EA4B4B'/%3e%3cpath d='M62.3131 6.13196C62.381 6.13196 62.4252 6.20331 62.3951 6.26416C62.154 6.74935 61.9128 7.23455 61.6718 7.71975H61.6716C61.4225 8.22125 61.1733 8.72259 60.9242 9.22409C60.9074 9.25799 60.859 9.25799 60.8422 9.22409L60.6305 8.79587C60.6275 8.78957 60.6259 8.78263 60.6259 8.77553V6.22349C60.6259 6.17297 60.6668 6.13196 60.7173 6.13196H62.3131Z' fill='%23EA4B4B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M74.8537 10.0096C75.2721 10.0096 75.654 10.1125 75.9993 10.3184C76.3513 10.5177 76.6303 10.8032 76.8361 11.1751C77.0487 11.547 77.1549 11.9953 77.1549 12.52V12.6495C77.1549 13.1675 77.052 13.6158 76.8461 13.9943C76.6402 14.3729 76.3613 14.6618 76.0093 14.861C75.664 15.0603 75.2788 15.1599 74.8537 15.1599C74.515 15.1599 74.2261 15.1134 73.9871 15.0204C73.7546 14.9341 73.5653 14.8212 73.4192 14.6817C73.2731 14.5423 73.1602 14.3995 73.0805 14.2534H72.941V16.9659L72.1541 16.0013V10.1491H72.9211V10.956H73.0352C73.2729 10.6733 73.3893 10.4911 73.6683 10.2985C73.9538 10.1059 74.349 10.0096 74.8537 10.0096ZM74.6445 10.7069C74.1464 10.7069 73.7347 10.8696 73.4092 11.195C73.0905 11.5138 72.9311 11.9621 72.9311 12.5399V12.6296C72.9311 13.2074 73.0905 13.659 73.4092 13.9844C73.7347 14.3032 74.1464 14.4626 74.6445 14.4626C75.1492 14.4626 75.5577 14.3032 75.8698 13.9844C76.1886 13.659 76.348 13.2074 76.348 12.6296V12.5399C76.348 11.9621 76.1886 11.5138 75.8698 11.195C75.5577 10.8696 75.1492 10.7069 74.6445 10.7069Z' fill='%230E0D0B'/%3e%3cpath d='M78.5848 11.9583L78.5555 15.4596L77.7681 14.4846V10.9583L78.5848 11.9583Z' fill='%230E0D0B'/%3e%3cpath d='M101.588 10.2986H102.444L103 10.986H101.588V10.9867H100.802L101.588 11.9623V14.1937C101.588 14.3929 101.685 14.4926 101.877 14.4926H102.379L102.928 15.17H101.668C101.389 15.17 101.173 15.0936 101.021 14.9409C100.874 14.7881 100.801 14.5789 100.801 14.3133V10.986H99.8799L99.3217 10.2986H100.801V9.13501H101.588V10.2986Z' fill='%230E0D0B'/%3e%3cpath d='M69.0133 7.90764C69.4848 7.90764 69.9065 7.99068 70.2784 8.15671C70.6569 8.3161 70.9525 8.55517 71.165 8.87395C71.3842 9.18609 71.4938 9.58126 71.4938 10.0594V10.4778H70.667V10.0594C70.667 9.72072 70.5939 9.44842 70.4477 9.24254C70.3083 9.03666 70.1124 8.88392 69.86 8.7843C69.6143 8.68469 69.332 8.63487 69.0133 8.63487C68.555 8.63487 68.1864 8.7378 67.9075 8.94367C67.6286 9.14291 67.4891 9.4285 67.4891 9.80041C67.4891 10.0461 67.5488 10.2453 67.6684 10.3981C67.7879 10.5508 67.9573 10.677 68.1764 10.7767C68.3956 10.8696 68.658 10.9527 68.9635 11.0257L69.4815 11.1552C69.8866 11.2416 70.2485 11.3611 70.5673 11.5138C70.8927 11.6599 71.1517 11.8625 71.3443 12.1215C71.5369 12.3739 71.6332 12.706 71.6332 13.1177C71.6332 13.5295 71.5303 13.8881 71.3244 14.1936C71.1185 14.4991 70.8263 14.7382 70.4477 14.9109C70.0758 15.0769 69.6375 15.1599 69.1328 15.1599C68.6281 15.1599 68.1765 15.0702 67.778 14.8909C67.3795 14.7116 67.0641 14.4426 66.8316 14.084C66.6058 13.7187 66.4929 13.2638 66.4929 12.7192V12.51H67.3197V12.7192C67.3197 13.297 67.4891 13.7287 67.8278 14.0143C68.1665 14.2932 68.6015 14.4327 69.1328 14.4327C69.6774 14.4327 70.0924 14.3098 70.378 14.0641C70.6636 13.8183 70.8064 13.5095 70.8064 13.1376C70.8064 12.8786 70.74 12.6727 70.6072 12.52C70.481 12.3673 70.3017 12.2444 70.0692 12.1514C69.8368 12.0518 69.5645 11.9655 69.2523 11.8924L68.7343 11.7629C68.3292 11.6566 67.9706 11.5271 67.6584 11.3744C67.3463 11.2216 67.1006 11.0224 66.9213 10.7767C66.7486 10.5243 66.6623 10.2022 66.6623 9.81035C66.6623 9.41852 66.7585 9.07981 66.9511 8.79424C67.1504 8.50866 67.426 8.28953 67.778 8.13678C68.1366 7.98404 68.5484 7.90764 69.0133 7.90764Z' fill='%230E0D0B'/%3e%3cpath d='M81.6544 10.0096C82.1193 10.0096 82.5145 10.0959 82.8399 10.2686C83.1719 10.4412 83.431 10.6704 83.6169 10.956C83.8095 11.2415 83.9324 11.5471 83.9855 11.8725L83.2185 12.0318C83.1853 11.7928 83.1056 11.5736 82.9794 11.3744C82.8598 11.1752 82.6905 11.0158 82.4713 10.8962C82.2521 10.7767 81.9832 10.7169 81.6644 10.7169C81.339 10.7169 81.0468 10.7899 80.7877 10.936C80.5354 11.0821 80.3328 11.2914 80.1801 11.5637C80.034 11.836 79.9609 12.1614 79.9609 12.5399V12.6296C79.9609 13.0081 80.034 13.3335 80.1801 13.6058C80.3328 13.8781 80.5354 14.0873 80.7877 14.2334C81.0468 14.3795 81.339 14.4526 81.6644 14.4526C82.1492 14.4526 82.5178 14.3264 82.7702 14.0741C83.0292 13.8217 83.1886 13.5095 83.2483 13.1376L84.0254 13.307C83.9523 13.6257 83.8195 13.9279 83.6269 14.2135C83.4343 14.4991 83.172 14.7282 82.8399 14.9009C82.5145 15.0735 82.1193 15.1599 81.6544 15.1599C81.1829 15.1599 80.7579 15.0603 80.3793 14.861C80.0074 14.6551 79.7119 14.363 79.4927 13.9844C79.2802 13.6059 79.1739 13.1575 79.1739 12.6395V12.5299C79.1739 12.0053 79.2802 11.557 79.4927 11.1851C79.7119 10.8066 80.0074 10.5177 80.3793 10.3184C80.7579 10.1126 81.1829 10.0096 81.6544 10.0096Z' fill='%230E0D0B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M86.7515 10.0096C87.2097 10.0096 87.6149 10.1092 87.9668 10.3084C88.3188 10.501 88.5944 10.78 88.7937 11.1452C88.9929 11.5105 89.0925 11.9389 89.0925 12.4304V12.7889H85.1177C85.1377 13.3136 85.3071 13.7254 85.6258 14.0243C85.9446 14.3165 86.3431 14.4626 86.8212 14.4626C87.2396 14.4626 87.5617 14.3663 87.7875 14.1737C88.0133 13.9811 88.186 13.752 88.3056 13.4863L88.983 13.815C88.8833 14.0209 88.7439 14.2268 88.5646 14.4327C88.3919 14.6386 88.1628 14.8113 87.8772 14.9507C87.5983 15.0902 87.2396 15.1599 86.8013 15.1599C86.3099 15.1599 85.8782 15.057 85.5063 14.8511C85.1344 14.6386 84.8455 14.343 84.6396 13.9645C84.4337 13.5859 84.3307 13.1476 84.3307 12.6495V12.5299C84.3307 12.0252 84.4337 11.5836 84.6396 11.205C84.8455 10.8265 85.1311 10.5342 85.4963 10.3284C85.8616 10.1159 86.28 10.0096 86.7515 10.0096ZM86.7515 10.7069C86.3066 10.7069 85.9413 10.8331 85.6557 11.0855C85.3701 11.3378 85.1941 11.6898 85.1277 12.1414H88.2956C88.269 11.6898 88.113 11.3378 87.8274 11.0855C87.5485 10.8331 87.1898 10.7069 86.7515 10.7069Z' fill='%230E0D0B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M97.1624 10.0096C97.6207 10.0096 98.0258 10.1092 98.3778 10.3084C98.7298 10.501 99.0054 10.78 99.2046 11.1452C99.4039 11.5105 99.5035 11.9389 99.5035 12.4304V12.7889H95.5287C95.5487 13.3136 95.718 13.7254 96.0368 14.0243C96.3555 14.3165 96.754 14.4626 97.2322 14.4626C97.6505 14.4626 97.9727 14.3663 98.1985 14.1737C98.4243 13.9811 98.5969 13.752 98.7165 13.4863L99.3939 13.815C99.2943 14.0209 99.1548 14.2268 98.9755 14.4327C98.8028 14.6386 98.5737 14.8113 98.2881 14.9507C98.0092 15.0902 97.6506 15.1599 97.2123 15.1599C96.7208 15.1599 96.2892 15.057 95.9172 14.8511C95.5453 14.6386 95.2564 14.343 95.0505 13.9645C94.8446 13.5859 94.7417 13.1476 94.7417 12.6495V12.5299C94.7417 12.0252 94.8446 11.5836 95.0505 11.205C95.2564 10.8265 95.542 10.5342 95.9073 10.3284C96.2725 10.1158 96.6909 10.0096 97.1624 10.0096ZM97.1624 10.7069C96.7175 10.7069 96.3522 10.8331 96.0666 11.0855C95.7811 11.3378 95.6051 11.6898 95.5387 12.1414H98.7066C98.68 11.6898 98.5239 11.3378 98.2383 11.0855C97.9594 10.8331 97.6008 10.7069 97.1624 10.7069Z' fill='%230E0D0B'/%3e%3cpath d='M92.2484 10.0594C92.6137 10.0594 92.9391 10.1358 93.2247 10.2885C93.5169 10.4413 93.7494 10.6671 93.9221 10.966C94.0947 11.2648 94.1811 11.6334 94.1811 12.0717V15.1458H93.394V12.1315C93.394 11.6467 93.2712 11.2947 93.0255 11.0755C92.7864 10.8564 92.461 10.7468 92.0492 10.7468C91.5777 10.7468 91.1925 10.8995 90.8936 11.205C90.6014 11.5105 90.4553 11.9655 90.4553 12.5698V15.1458H89.6683V10.1491H90.4354V10.9582H90.5361C90.7355 10.7018 90.8604 10.5342 91.1128 10.3483C91.3718 10.1557 91.7503 10.0594 92.2484 10.0594Z' fill='%230E0D0B'/%3e%3cpath d='M78.5932 10.9581H77.7681V10.1514H78.6L78.5932 10.9581Z' fill='%230E0D0B'/%3e%3c/svg%3e";const el=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),zn=({isOpen:e,onClose:t,title:n,subtitle:s,children:r,overlayContent:o,overlayDimmed:i=!0,styles:a,theme:l,maxWidth:u="522px",dark:m,footerLinkText:f,bannerSrc:h,bannerAlt:y,closeOnBackdropClick:g=!1})=>{const{theme:x,dark:w,dk:v,palette:C}=d.useSpiceBrand(a,m),E=m??w,k=l||x,F=a?.fontFamily||k.typography.fontFamily||d.font.ui,O=a?.primaryColor||k.colors.primary,I=p.useRef(null),b=p.useRef(null),A=p.useRef(null),R=p.useId(),[B,q]=p.useState(!1),[j,P]=p.useState(!1),D=p.useRef(t);if(p.useEffect(()=>{D.current=t},[t]),p.useEffect(()=>{if(!e){P(!1);return}b.current=document.activeElement;const T=document.body.style.overflow;document.body.style.overflow="hidden";const H=requestAnimationFrame(()=>{const K=requestAnimationFrame(()=>P(!0));A.current=K}),V=()=>{const K=I.current;K&&(K.querySelectorAll(el)[0]??K).focus({preventScroll:!0})},te=K=>{if(K.key==="Escape"){K.stopPropagation(),D.current();return}if(K.key!=="Tab")return;const Y=I.current;if(!Y)return;const J=Array.from(Y.querySelectorAll(el)).filter(Ce=>!Ce.hasAttribute("aria-hidden"));if(J.length===0){K.preventDefault(),Y.focus();return}const we=J[0],me=J[J.length-1],xe=document.activeElement;K.shiftKey&&xe===we?(K.preventDefault(),me.focus()):!K.shiftKey&&xe===me&&(K.preventDefault(),we.focus())},Z=requestAnimationFrame(V);return document.addEventListener("keydown",te),()=>{cancelAnimationFrame(Z),cancelAnimationFrame(H),A.current&&cancelAnimationFrame(A.current),document.removeEventListener("keydown",te),document.body.style.overflow=T;const K=b.current;K&&typeof K.focus=="function"&&K.focus({preventScroll:!0})}},[e]),!e)return null;const M=!!h&&!B,L=y??"";return c.jsx("div",{onMouseDown:T=>{g&&T.target===T.currentTarget&&D.current()},style:{position:"fixed",inset:0,backgroundColor:E?"rgba(0,0,0,0.72)":"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"clamp(16px, 4vw, 48px)",zIndex:d.z.modal,opacity:j?1:0,transition:`opacity ${d.duration.normal} ${d.easing.out}`},children:c.jsx("div",{ref:I,role:"dialog","aria-modal":"true","aria-labelledby":R,tabIndex:-1,style:{backgroundColor:C.shellBorder,borderRadius:"12px",padding:"5px",width:"100%",maxWidth:u,boxSizing:"border-box",boxShadow:"0 16px 48px rgba(0, 0, 0, 0.4)",outline:"none",transform:j?"scale(1)":"scale(0.96)",transition:`transform ${d.duration.slow} ${d.easing.out}`,display:"flex",flexDirection:"column",maxHeight:"100%"},children:c.jsxs("div",{style:{backgroundColor:C.shell,border:`1px solid ${C.shellInnerBorder}`,borderRadius:"9px",width:"100%",padding:"0",display:"flex",flexDirection:"column",position:"relative",flex:"0 1 auto",minHeight:0,overflowY:"auto",overflowX:"hidden"},children:[o&&i&&c.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:5,pointerEvents:"none",borderRadius:"12px"},"aria-hidden":"true"}),M&&c.jsxs("div",{style:{position:"relative",width:"100%"},children:[c.jsx("img",{src:h,style:{width:"100%",height:"auto",display:"block",borderRadius:"6px 6px 0 0"},alt:L,"aria-hidden":L===""?"true":void 0,onError:()=>q(!0)}),c.jsx("button",{type:"button",onClick:t,"aria-label":"Close dialog",style:{position:"absolute",top:"8px",right:"8px",minWidth:"44px",minHeight:"44px",color:C.textPrimary,padding:"8px",backgroundColor:"transparent",borderRadius:"9999px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1},children:c.jsx(Rr,{size:28,strokeWidth:2.5})})]}),c.jsxs("div",{style:{padding:"28px 28px 0 28px",position:"relative"},children:[!M&&c.jsx("button",{type:"button",onClick:t,"aria-label":"Close dialog",style:{position:"absolute",top:"10px",right:"10px",minWidth:"44px",minHeight:"44px",color:C.textSecondary,padding:"10px",backgroundColor:"transparent",borderRadius:"50%",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s",fontSize:"18px",fontWeight:"600"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor=E?`${O}1a`:"#f3f4f6"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent"},children:c.jsx(Rr,{size:24,strokeWidth:2.4})}),c.jsx("h2",{id:R,style:{fontSize:"22px",fontWeight:"700",color:C.textPrimary,margin:"0",fontFamily:F,lineHeight:"1.12"},children:n})]}),s&&c.jsx("div",{style:{padding:"11px 28px 13px 28px",fontSize:"12px",color:C.textSecondary,margin:"0",lineHeight:"1.35",fontFamily:F,borderBottom:E?`1px solid ${v.cardBorder}`:"1px solid #cdcfd1"},children:s}),r,c.jsxs("div",{style:{padding:"12px 28px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("img",{src:_c,alt:"","aria-hidden":"true",width:108,height:22,decoding:"async",style:{width:"108px",height:"22px",opacity:E?.85:1,filter:E?"brightness(0) invert(1)":"none",margin:0,display:"block"}}),c.jsx("a",{href:"https://spiceflow-docs.spicenet.io",target:"_blank",rel:"noopener noreferrer",style:{fontSize:"10px",color:C.textSecondary,textDecoration:"none",display:"flex",alignItems:"center",gap:"4px",fontFamily:F,lineHeight:"1"},children:c.jsx("span",{style:{color:O,textDecoration:"underline",fontWeight:"500"},children:f??"Learn more \u2192"})})]}),o]})})})};function Fp(e){const t=new Set(S.getEquivalentAddresses(e).map(n=>n.toLowerCase()));return t.add(e.toLowerCase()),t}const Tp=["USDC","USDT","WETH","WBTC"];function tl(e,t){const n=d.getChainConfig(t);if(!n)return;if(n.nativeCurrency.symbol.toUpperCase()===e.toUpperCase())return{address:S.ZERO_ADDRESS,symbol:n.nativeCurrency.symbol,decimals:n.nativeCurrency.decimals,chainId:t};const s=n.supportedTokens?.find(r=>r.symbol.toUpperCase()===e.toUpperCase());if(s)return{address:s.address.toLowerCase(),symbol:s.symbol,decimals:s.decimals,chainId:t}}function ds(e,t,n){const s=d.getChainConfig(t);if(!s)return;if(n!==void 0){if(S.isNativeToken(e)&&!S.getTokenByAddress(e,n))return;const a=_o(e,n,t);return a?{address:a.address.toLowerCase(),symbol:a.symbol,decimals:a.decimals,chainId:t}:void 0}if(S.isNativeToken(e))return;const r=S.getEquivalenceGroup(e);if(!r)return;const o=Fp(e),i=s.supportedTokens?.find(a=>a.equivalenceGroup===r&&o.has(a.address.toLowerCase()));if(i)return{address:i.address.toLowerCase(),symbol:i.symbol,decimals:i.decimals,chainId:t}}function Rp(e){const{sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,intermediaryCandidates:o=Tp}=e;if(ao(t,n))return{strategy:"direct",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} fronted directly`};if(s===r&&(S.isNativeToken(t.address)||!S.getTokenByAddress(t.address,s)))return{strategy:"direct-swap",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} \u2192 ${n.symbol} on chain ${s}, no escrow`};if(ds(t.address,r,s))return{strategy:"direct",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} fronted on destination, swapped to ${n.symbol}`};if(ds(n.address,s,r))return{strategy:"source-swap",sourceAsset:t,outputAsset:n,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} \u2192 ${n.symbol} on source chain, then fronted`};for(const i of o){const a=tl(i,s);if(!a||ao(t,a)||ao(n,a))continue;const l=tl(i,r);if(l&&ao(a,l))return{strategy:"intermediary",sourceAsset:t,outputAsset:n,intermediaryAsset:l,sourceChainId:s,destinationChainId:r,summary:`${t.symbol} \u2192 ${i} on source, fronted, then ${i} \u2192 ${n.symbol} on destination`}}throw new d.SpiceflowError("ROUTE_STRATEGY_ERROR",`No viable cross-chain route found from ${t.symbol} (chain ${s}) to ${n.symbol} (chain ${r}). No intermediary asset is available on both chains.`,{sourceAsset:t.symbol,outputAsset:n.symbol,sourceChainId:s,destinationChainId:r,candidatesChecked:o})}async function Bp(e){const{route:t,sourceAmount:n,userAddress:s,registry:r,actionCalls:o,slippage:i}=e;async function a(l,u,m,f){const h=await r.resolveSwap({type:"swap",tokenIn:u,tokenOut:m,amountIn:f,maxSlippage:i},l,s);if(!h)throw new d.SpiceflowError("NO_LIQUIDITY",`No venue returned a quote for ${u} \u2192 ${m} on chain ${l}. No liquidity available for this pair.`,{chainId:l,tokenIn:u,tokenOut:m,amountIn:f.toString()});return h}switch(t.strategy){case"direct-swap":{const l=await a(t.destinationChainId,t.sourceAsset.address,t.outputAsset.address,n);return{chainBatches:[{chainId:t.destinationChainId,calls:[...l.calls,...o]}],solverFrontToken:t.outputAsset,solverFrontAmount:0n,resolvedSwaps:{sourceSwap:l}}}case"direct":{const l=ds(t.sourceAsset.address,t.destinationChainId,t.sourceChainId)||t.sourceAsset,u=Lt(n,t.sourceAsset.decimals,l.decimals,"floor");if(d.addressesEqual(l.address,t.outputAsset.address))return{chainBatches:[{chainId:t.destinationChainId,calls:o}],solverFrontToken:l,solverFrontAmount:u,resolvedSwaps:{}};const m=await a(t.destinationChainId,l.address,t.outputAsset.address,u);return{chainBatches:[{chainId:t.destinationChainId,calls:[...m.calls,...o]}],solverFrontToken:l,solverFrontAmount:u,resolvedSwaps:{destinationSwap:m}}}case"source-swap":{const l=ds(t.outputAsset.address,t.sourceChainId,t.destinationChainId);if(!l)throw new d.SpiceflowError("ROUTE_TOKEN_NOT_FOUND",`Output asset ${t.outputAsset.symbol} (${t.outputAsset.address}) not found on source chain ${t.sourceChainId}`,{token:t.outputAsset.symbol,address:t.outputAsset.address,chainId:t.sourceChainId,side:"source"});const u=ds(t.outputAsset.address,t.destinationChainId,t.destinationChainId);if(!u)throw new d.SpiceflowError("ROUTE_TOKEN_NOT_FOUND",`Output asset ${t.outputAsset.symbol} (${t.outputAsset.address}) not found on destination chain ${t.destinationChainId}`,{token:t.outputAsset.symbol,address:t.outputAsset.address,chainId:t.destinationChainId,side:"destination"});const m=await a(t.sourceChainId,t.sourceAsset.address,l.address,n);return{chainBatches:[{chainId:t.sourceChainId,calls:m.calls},{chainId:t.destinationChainId,calls:o}],solverFrontToken:u,solverFrontAmount:Lt(m.amountOutMinimum,l.decimals,u.decimals,"floor"),resolvedSwaps:{sourceSwap:m}}}case"intermediary":{if(!t.intermediaryAsset)throw new d.SpiceflowError("ROUTE_STRATEGY_ERROR","Intermediary strategy requires an intermediary asset but none was provided in the route plan.",{strategy:t.strategy});const l=ds(t.intermediaryAsset.address,t.sourceChainId,t.destinationChainId);if(!l)throw new d.SpiceflowError("ROUTE_TOKEN_NOT_FOUND",`Intermediary ${t.intermediaryAsset.symbol} (${t.intermediaryAsset.address}) not found on source chain ${t.sourceChainId}`,{token:t.intermediaryAsset.symbol,address:t.intermediaryAsset.address,chainId:t.sourceChainId,side:"source"});const u=await a(t.sourceChainId,t.sourceAsset.address,l.address,n),m=Lt(u.amountOutMinimum,l.decimals,t.intermediaryAsset.decimals,"floor"),f=await a(t.destinationChainId,t.intermediaryAsset.address,t.outputAsset.address,m);return{chainBatches:[{chainId:t.sourceChainId,calls:u.calls},{chainId:t.destinationChainId,calls:[...f.calls,...o]}],solverFrontToken:t.intermediaryAsset,solverFrontAmount:m,resolvedSwaps:{sourceSwap:u,destinationSwap:f}}}default:throw new d.SpiceflowError("ROUTE_STRATEGY_ERROR",`Unknown route strategy: ${t.strategy}`,{strategy:t.strategy})}}function Op(e,t,n){if(!e||!t)return null;if(e._source==="wallet"){if(t===e.chainId)return{address:e.address,symbol:e.symbol,name:e.name||e.symbol,decimals:e.decimals,logoURI:e.logoURI};const f=S.getTokensForChain(t).find(h=>h.equivalenceGroup==="USDC"&&h.symbol.toUpperCase()==="USDC");return!f||n.length>0&&!n.some(h=>d.addressesEqual(h.address,f.address))?null:{address:f.address,symbol:"USDC",name:f.name||"USD Coin",decimals:f.decimals,logoURI:f.logo}}const s=Gs(e,t),r=Object.entries(e.chainTokens??{}).flatMap(([f,h])=>{const y=In(f);return y?.chainId===t?[{parsed:y,detail:h}]:[]}),o=f=>n.find(h=>d.addressesEqual(h.address,f))??null,i=f=>{const h=r.find(({parsed:x})=>d.addressesEqual(x.address,f));if(!h)return null;const y=d.getChainConfig(t);if(S.isNativeToken(f))return y?{address:S.ZERO_ADDRESS,symbol:y.nativeCurrency.symbol,name:y.nativeCurrency.name,decimals:y.nativeCurrency.decimals,logoURI:e.logoURI}:null;const g=y?.supportedTokens?.find(x=>d.addressesEqual(x.address,f));return!g||!$o(e,f,t)?null:{address:h.parsed.address,symbol:g.symbol,name:g.name||h.detail?.name||e.displayName||e.name||e.symbol,decimals:g.decimals,logoURI:g.logo||e.logoURI}},a=r.map(({parsed:f})=>f.address).filter(S.isNativeToken);for(const f of[...s,...a]){if(S.isNativeToken(f)){const g=i(f);if(g)return g}const h=o(f);if(h)return h;const y=i(f);if(y)return y}if(e.chainTokens||e.receiptTokenId)return null;const l=Dn(e,t);if(l){const f=o(l);if(f)return f}const u=ds(e.address,t,e.chainId);return u?o(u.address)||(n.length>0?null:{address:u.address,symbol:u.symbol||e.symbol,name:e.displayName||e.name||e.symbol,decimals:u.decimals??e.decimals,logoURI:e.logoURI}):null}function jp(e){const t=e.find(n=>S.isSpicenetChainId(n.chainId))?.calls?.[0]?.data;if(!t)return null;try{const n=N.decodeFunctionData({abi:S.spicenetAbi,data:t});return n.functionName!=="createWithdrawalRequest"?null:n.args[0].transfers.map(s=>({token:s.token,recipient:s.to,amount:s.amount}))}catch{return null}}function Dp(e,t){if(!e||e.length!==t.length)return!1;const n=s=>s.reduce((r,o)=>r+o.amount,0n);return n(e)!==n(t)?!1:e.every((s,r)=>{const o=t[r];return s.token.toLowerCase()!==o.token.toLowerCase()||s.recipient.toLowerCase()!==o.recipient.toLowerCase()?!1:s.recipient.toLowerCase()===S.SPICE_GAS_FEE_RECIPIENT.toLowerCase()?d.amountsWithinBps(s.amount,o.amount,100n):s.recipient.toLowerCase()!==S.SPICE_PLATFORM_FEE_RECIPIENT.toLowerCase()||s.amount===o.amount})}function Np(e,t){const n=e.intents.flatMap(o=>o.batches).filter(o=>{const i=d.getBatchFees(o);return BigInt(o.quotedAmount)>0n||BigInt(o.totalDebit)>0n||i.totalFee>0n}),s=n.filter(o=>o.chainId===t),r=s.length>0?s:n;return r.length===1?r[0]:null}function Mp(e){const t=new Map;for(const n of e){if(n.amount<=0n)continue;const s=n.token.toLowerCase(),r=n.recipient.toLowerCase(),o=`${s}:${r}`,i=t.get(o);i?i.amount+=n.amount:t.set(o,{...n})}return[...t.values()]}function nl(e,t){if(!e.token||!e.recipient||e.chainId===null)return null;const n=Np(t,e.chainId);if(!n)return null;const{gasFee:s,bridgeFee:r,spicenetFee:o}=d.getBatchFees(n),i=s+r,a=e.grossAmountRaw-i-o;if(a<=0n)throw new Error("Withdrawal amount does not cover the network fee.");const l=[{token:e.token.address,recipient:e.recipient,amount:a}];return i>0n&&l.push({token:e.token.address,recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:i}),o>0n&&l.push({token:e.token.address,recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:o}),Mp(l)}function Pp(e,t,n){const s=nl(e,t);return!s||Dp(jp(n),s)?null:e.buildWithdrawBatches(s)}async function sl(e){if(e.executionContextRef.current){await rl(e);return}if(!e.batches.length||!e.walletAddress||!e.recipient)return;const t=d.relayerService.getBaseUrl();e.ui.setIsExecuting(!0),e.ui.setExecutionError(null),e.ui.setExecutionProgress(null),e.executionContextRef.current=null,e.ui.setLockedGasFee(e.gasFee);try{let n=e.batches;if(e.isNon7702&&e.onWithdrawExecute)await e.onWithdrawExecute(e.amount);else{if(!e.isNon7702&&!n.some(o=>S.isSpicenetChainId(o.chainId)))throw new Error("Spice withdrawals must include a Spicenet funding batch before the destination chain batch.");const s=e.token?.address||"",r={useCustomTransfers:!0};if(e.buildSpicenetBatch){const o=e.feeEstimate??await e.execution.estimate(n,s,0n,e.withdrawalSourceBudget?{...r,withdrawalSourceBudget:!0}:r),i=nl(e,o);i&&(n=e.buildWithdrawBatches(i));const a=o.intents[0]?.batches.find(l=>l.chainId===e.chainId)??o.intents[0]?.batches[0]??null;a&&e.ui.setLockedGasFee(d.getBatchFees(a).totalFee)}else{const o=(e.feeEstimate??await e.execution.estimate(n,s,0n,r)).intents[0]?.batches[0]??null;o&&e.ui.setLockedGasFee(d.getBatchFees(o).totalFee)}await e.execution.execute(n,s,0n,o=>{o.actionId&&o.intentId&&typeof o.intentIndex=="number"&&typeof o.totalSteps=="number"&&(e.executionContextRef.current={actionId:o.actionId,intentId:o.intentId,intentIndex:o.intentIndex,totalSteps:o.totalSteps,autoContinue:o.autoContinue,apiUrl:t,finish:()=>ya(e)}),e.ui.setExecutionProgress(o)},void 0,e.buildSpicenetBatch?{...r,adjustBatchesForEstimate:({feeEstimate:o,chainBatches:i})=>Pp(e,o,i)}:{...r,skipPreSubmitFeeEstimate:!0})}await ya(e)}catch(n){const s=n instanceof Error?n.message:"Withdraw failed";e.ui.setExecutionError(s)}finally{e.ui.setIsExecuting(!1)}}async function ya(e){window.dispatchEvent(new CustomEvent("withdraw-completed")),await e.onWithdrawSuccess?.({token:e.token?.symbol||"",amount:e.amount,chainId:e.chainId})}async function rl(e){const t=e.executionContextRef.current;if(!t){if(e.isNon7702&&e.onWithdrawExecute){await sl(e);return}e.ui.setExecutionError("The previous withdrawal action is unavailable. Reconcile it before starting another.");return}const n=t.apiUrl?new d.RelayerService:d.relayerService;t.apiUrl&&n.setBaseUrl(t.apiUrl),e.ui.setIsExecuting(!0),e.ui.setExecutionError(null),e.ui.setExecutionProgress({step:"executing",message:"Resuming existing action...",actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps});try{let s=t.totalSteps;for(let r=0;r<t.totalSteps;r++)if((await n.checkStepStatus(t.intentId,r)).data.status!=="success"){s=r;break}if(s>=t.totalSteps)e.ui.setExecutionProgress(r=>({...r||{step:"success",message:"Transaction successful!",actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps},step:"success",message:"Transaction successful!"}));else for(let r=s;r<t.totalSteps;r++){const o=await Wc({actionId:t.actionId,intentIndex:t.intentIndex,intentId:t.intentId,stepIndex:r,chainId:e.chainId??void 0,observeOnly:t.autoContinue,maxPolls:t.autoContinue?Number.POSITIVE_INFINITY:void 0,relayer:n,completeOnExecution:!e.isNon7702&&r===t.totalSteps-1,onStatusMessage:(i,a)=>{e.isMountedRef.current&&e.ui.setExecutionProgress({step:"executing",message:i,txHash:a,actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps})}});if(!e.isMountedRef.current)return;e.ui.setExecutionProgress({step:r===t.totalSteps-1?"success":"executing",message:r===t.totalSteps-1?"Transaction successful!":"Executing remaining steps...",txHash:o,actionId:t.actionId,intentId:t.intentId,intentIndex:t.intentIndex,totalSteps:t.totalSteps})}await(t.finish?.()??ya(e))}catch(s){const r=s instanceof Error?s.message:"Withdraw failed";e.ui.setExecutionError(r)}finally{e.ui.setIsExecuting(!1)}}async function Up(e){const t=await e.estimate(e.batches,e.tokenAddress,0n,{useCustomTransfers:!0,...e.withdrawalSourceBudget?{withdrawalSourceBudget:!0}:{},signal:e.signal}),n=t.intents.flatMap(r=>r.batches).filter(r=>d.getBatchFees(r).totalFee>0n),s=n.filter(r=>r.chainId===e.chainId)[0]??n[0]??t.intents[0]?.batches[0];if(!s)throw new Error("No gas fee estimate was returned for this withdraw.");return{gasFee:d.getBatchFees(s).totalFee,feeEstimate:t}}function ba(e,t){return N.formatUnits(e,t).replace(/(\.\d*?[1-9])0+$|\.0+$/,"$1")}function Wp(e,t,n){return Lt(e,t,n,"floor")}function ol(e,t,n=!1){if(e<=0)return"$0";if(!t||!Number.isFinite(t)||t<=0)return"\u2014";const s=e*t;return`$${s>=1?s.toFixed(3).replace(/0+$/,"").replace(/\.$/,""):s.toFixed(4).replace(/0+$/,"").replace(/\.$/,"")}${n?" (stale)":""}`}function qp(e,t,n=!1){return t?JSON.stringify({tokenAddress:t.toLowerCase(),withdrawalSourceBudget:n,batches:e.map(s=>({chainId:s.chainId,calls:s.calls.map(r=>({to:r.to.toLowerCase(),value:r.value.toString(),data:r.data})),tokenTransfers:(s.tokenTransfers??[]).map(r=>({from:r.from,to:r.to.toLowerCase(),token:r.token.toLowerCase(),amount:r.amount.toString()}))}))}):null}function Lp(e){const t=new Map;for(const n of e){if(n.amount<=0n)continue;const s=N.getAddress(n.token),r=N.getAddress(n.to),o=`${s.toLowerCase()}:${r.toLowerCase()}`,i=t.get(o);i?i.amount+=n.amount:t.set(o,{token:s,to:r,amount:n.amount})}return[...t.values()]}function zp(e,t){return`0x${t}${e.slice(4)}`}function al(e,t,n,s){if(e.some(f=>f.domain==="spicenet"))return e;const r=n?.intents.flatMap(f=>f.batches),o=f=>f.from==="escrow",i=e.map(f=>{const h=r?.find(b=>b.chainId===f.chainId);if(!h)return f;const y=d.getBatchFees(h),g=y.totalFee;if(g<=0n)return f;const x=(f.tokenTransfers??[]).filter(b=>o(b)&&N.getAddress(b.to).toLowerCase()===t.toLowerCase()),w=x.find(b=>!S.isNativeToken(N.getAddress(b.token)))??x[0];if(!w)return f;const v=N.getAddress(w.token),C=S.isNativeToken(v);let E=!1;const k=(f.tokenTransfers??[]).map(b=>E||!o(b)||N.getAddress(b.to).toLowerCase()!==t.toLowerCase()||N.getAddress(b.token).toLowerCase()!==v.toLowerCase()?b:(E=!0,{...b,amount:s?.payoutAlreadyGross?BigInt(b.amount):BigInt(b.amount)+g}));if(!E)return f;const F=(b,A)=>C?{to:b,value:A,data:"0x"}:{to:v,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[b,A]})},O=[];y.spicenetFee>0n&&O.push(F(S.SPICE_PLATFORM_FEE_RECIPIENT,y.spicenetFee));const I=y.gasFee+y.bridgeFee;return I>0n&&O.push(F(S.SPICE_GAS_FEE_RECIPIENT,I)),{...f,tokenTransfers:k,calls:[...O,...f.calls]}}),a=i.flatMap(f=>(f.tokenTransfers??[]).filter(o).map(h=>{const y=N.getAddress(h.token),g=N.getAddress(h.to),x=[{token:y,to:g,amount:BigInt(h.amount)}];return{chainId:f.chainId,transfers:Lp(x)}}));if(a.length===0)return e;const l=s?.requestTimestampMs??Date.now(),u=BigInt(Math.floor(l/1e3));if(s?.expiresAt!==void 0&&(!Number.isSafeInteger(s.expiresAt)||s.expiresAt<=Number(u)))throw new Error("Funding expiry must be a future Unix timestamp");const m=s?.expiresAt===void 0?u+3600n:BigInt(s.expiresAt);return[{chainId:S.SPICENET_NATIVE_CHAIN_ID,domain:"spicenet",tokenTransfers:[],calls:a.map((f,h)=>{const y=N.keccak256(N.encodeAbiParameters([{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"}],[t,f.transfers[0].token,f.transfers.reduce((x,w)=>x+w.amount,0n),BigInt(f.chainId),BigInt(l+h)])),g=zp(y,"77");return{to:"0x0000000000000000000000000000000000000000",value:0n,data:N.encodeFunctionData({abi:S.spicenetAbi,functionName:"createWithdrawalRequest",args:[{chainId:`evm:${f.chainId}`,idempotenceKey:g,nbf:0n,exp:m,metadata:"{}",transfers:f.transfers.map(x=>({token:x.token.toLowerCase(),to:x.to,amount:x.amount}))}]})}})},...i]}function us(e,t,n,s){const r=e.filter(i=>i.domain!=="spicenet"),o=i=>(i.tokenTransfers??[]).some(a=>a.from==="escrow");return[...r.filter(i=>!o(i)),...al(r.filter(o),t,n,s)]}class vs extends Error{constructor(t,n){super("The selected balance cannot cover the fee funding amount"),this.requiredAmount=t,this.balance=n,this.name="InsufficientFeeFundingBalanceError"}}function va(e,t,n,s,r){const o=e[e.length-1];if(!o?.calls.length||o.domain==="spicenet")throw new Error("Proceeds fees require a final destination action");const i=[{to:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:r},{to:S.SPICE_GAS_FEE_RECIPIENT,amount:s}].filter(a=>a.amount>0n);return e.map(a=>a===o?{...a,calls:[...a.calls,...i.map(l=>({to:n,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[l.to,l.amount]})}))],tokenTransfers:[...a.tokenTransfers??[],...i.map(l=>({from:t,to:l.to,token:n,amount:l.amount}))]}:a)}async function Ca(e,t,n,s,r){const o=S.hashChainBatches(e),i=await d.relayerService.estimateBatchGas({user:t,outputToken:n,signal:s,requireSimulation:!0,includePlatformFee:r!==void 0,chainBatches:e.map((a,l)=>({...a,hash:o[l].hash}))});if(i.gasQuoteSource!=="estimated"||!i.simulationVerified)throw new Error("Action proceeds require a successful live batch simulation; fallback gas pricing is not sufficient");if(r!==void 0&&(i.platformFee===void 0||i.platformFee>r))throw new Error("Fee conversion platform price changed; refresh before retrying");return i.gasFee}async function il(e){if(e.proceeds.token.toLowerCase()!==e.token.toLowerCase())throw new Error("Action proceeds must use the destination fee token");const t=await e.proceeds.resolve(e.signal);if(e.signal?.aborted)throw new Error("Action proceeds quote was cancelled");if(t<0n)throw new Error("Action proceeds cannot be negative");const n=await e.baseline();if(!n?.preview)throw new Error("Action fee quote is unavailable");let s=n.preview.gasFee;const r=n.preview.spicenetFee,o=n.preview.bridgeFee??0n;for(let i=0;i<5;i++){const a=s+r+o,l=t<a?t:a,u=a-l;if(u>0n&&e.fundShortfall===!1)throw new vs(a,t);const m=u>0n?(u*110n+99n)/100n+2n:0n;let f=m,h;const y=us(await e.buildBatches(m,{actionAmountOverride:e.actionAmountFor?.(a),actionOutputFee:l,onSourceSpend:w=>{f=w},onActionCalls:w=>{h=w}}),e.owner,void 0,{expiresAt:e.expiresAt}),g=va(y,e.owner,e.token,s+o,r),x=await Ca(g,e.owner,e.token,e.signal);if(x<=s&&(s-x)*100n<=x*15n)return{preview:{...n.preview,grossAmount:m,netAmount:0n,gasFee:s,totalFee:a,gasQuoteSource:"estimated"},feeEstimate:n.feeEstimate,grossFundingAmount:m,proceedsAvailable:t,proceedsUsed:l,fundingBatches:g,sourceSpendCap:f,destinationAmount:0n,actionDefinition:h};s=x}throw new Error("Action proceeds fee estimate did not converge")}function cl(e,t){if(!(!e||e==="output")){if("token"in e)return e;if(t)return{token:t,resolve:async n=>{const s=await e.resolve(n);if(n?.aborted)throw new Error("Action proceeds quote was cancelled");if(s.some(r=>r.amount<0n))throw new Error("Action proceeds cannot be negative");return s.filter(r=>r.token.toLowerCase()===t.toLowerCase()).reduce((r,o)=>r+o.amount,0n)}}}}function yo(e,t,n){const s=n.filter(r=>r.amount>0n);return{chainId:e,domain:"evm",tokenTransfers:[],calls:S.isNativeToken(t)?s.map(r=>({to:r.recipient,value:r.amount,data:"0x"})):s.map(r=>({to:t,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[r.recipient,r.amount]})}))}}new Set([S.SPICE_GAS_FEE_RECIPIENT,S.SPICE_PLATFORM_FEE_RECIPIENT].map(e=>e.toLowerCase()));async function ps(e,t,n){const s=await d.getWalletBalanceEntries(e),r=S.getTokenByAddress(n,t)?.decimals,o=s.filter(m=>!Array.isArray(m.chainTokens)&&Object.keys(m.chainTokens??{}).some(f=>f.toLowerCase()===`evm:${t}:${n.toLowerCase()}`));if(o.length>1)throw new Error("Order cash receipt identity is ambiguous");const i=new Map;for(const m of o){const f=Object.entries(m.chainTokens??{}).find(([h])=>h.toLowerCase()===`evm:${t}:${n.toLowerCase()}`)?.[1];if(!m.receiptToken||i.has(m.receiptToken)||!/^\d{1,78}$/.test(m.balanceAvailable)||!Number.isInteger(m.decimals)||m.decimals<0||m.decimals>36||typeof f!="object"||r===void 0||f.decimals!==r)throw new Error("Order cash metadata could not be verified");i.set(m.receiptToken,{amount:BigInt(m.balanceAvailable),decimals:m.decimals})}const a=new Set,l=new Set;let u;for(let m=0;m<20;m++){const f=await d.relayerService.listLimitOrders(e,u);if(!Array.isArray(f.orders)||f.orders.length>100)throw new Error("Order reservations could not be verified");for(const h of f.orders){if(!/^ord_[0-9a-f]{64}$/.test(h.id)||a.has(h.id)||!d.addressesEqual(h.user,e)||!/^\d{1,78}$/.test(h.reservedAmount)||!["open","executing","needs_attention","filled","cancelled","expired","failed"].includes(h.status))throw new Error("Order reservations could not be verified");if(a.add(h.id),!["open","executing","needs_attention"].includes(h.status))continue;const y=i.get(h.receiptToken);if(!y&&h.chainId===t&&d.addressesEqual(h.tokenIn,n))throw new Error("Active order cash could not be verified");y&&(y.amount-=BigInt(h.reservedAmount))}if(f.nextCursor===null){let h=0n;for(const y of i.values()){if(y.amount<0n)throw new Error("Order reservations exceed the current cash balance");h+=S.convertAmountBetweenDecimals(y.amount,y.decimals,r)}return{available:h,entries:s}}if(typeof f.nextCursor!="string"||!/^ord_[0-9a-f]{64}$/.test(f.nextCursor)||l.has(f.nextCursor))throw new Error("Order history is incomplete");u=f.nextCursor,l.add(u)}throw new Error("Order history is incomplete")}const ll="spiceflow-limit-order:v1",Ps=N.parseAbi(["function exactInput((bytes path, address recipient, uint256 deadline, uint256 amountIn, uint256 amountOutMinimum) params) payable returns (uint256 amountOut)"]);function Hp(e){if(!/^ord_[0-9a-f]{64}$/.test(e))throw new Error("Invalid limit order ID");return`Spice Flow limit order cancellation v1
|
|
16
|
+
Order: ${e}`}function ka(e){const t=e.intents[0];if(e.intents.length!==1||t.mode!=="7702")throw new Error("Invalid order intent");return`ord_${ca(t.chainBatches,BigInt(t.exp)).slice(2)}`}function Vp(e){if(!Number.isSafeInteger(e.expiresAt)||e.minimumOutput<=0n||e.amountIn<=0n||e.platformFee<0n||e.gasBridgeFee<0n||e.amountIn+e.platformFee+e.gasBridgeFee!==e.grossAmount)throw new Error("Invalid limit order amounts or expiry");const t=Js({userAddress:e.user,destinationChainId:e.chainId,deliveryToken:e.tokenIn,deliveryAmount:e.grossAmount,deliveryRecipient:e.user,requestTimestampMs:e.requestTimestampMs,expiresAt:e.expiresAt,metadata:e.conditional?"":e.replacesOrderId?`${ll}:amend:${e.replacesOrderId}`:ll,requestNonce:e.requestNonce});if(!t)throw new Error("Order requires a positive cash balance");const n=[...yo(e.chainId,e.tokenIn,[{recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:e.platformFee},{recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:e.gasBridgeFee}]).calls,{to:e.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.router,e.amountIn]})},{to:e.router,value:0n,data:N.encodeFunctionData({abi:Ps,functionName:"exactInput",args:[{path:e.path,recipient:e.user,deadline:BigInt(e.expiresAt),amountIn:e.amountIn,amountOutMinimum:e.minimumOutput}]})}],s=S.hashChainBatches([t,{chainId:e.chainId,calls:n}]);return{user:e.user,amountMode:"gross_input",intents:[{mode:"7702",signatureType:"ecdsa",signature:"0x00",nbf:0,exp:e.expiresAt,chainBatches:s.map((r,o)=>({...r,chainId:Number(r.chainId),tokenTransfers:o===0?[]:[{from:"escrow",to:e.user,token:e.tokenIn,amount:e.grossAmount}]}))}]}}const Qp=36;function _s(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=Qp}function Or(e){return!e.balanceError&&e.balanceStatus!=="stale"&&e.balance>=0n&&_s(e.decimals)&&!e.isNative&&!S.isNativeToken(e.address)}function Ia(e,t){if(!e.chainTokens||Array.isArray(e.chainTokens))return null;let n;for(const[s,r]of Object.entries(e.chainTokens)){const o=In(s);if(!(!o||o.chainId!==t)){if(n)return null;n={address:o.address,decimals:r?.decimals}}}return n??null}function Sa(e,t,n){if(e<0n)return null;const s=S.convertAmountBetweenDecimals(e,t,n);return S.convertAmountBetweenDecimals(s,n,t)===e?s:null}function Cs(e,t){return _s(e.receiptTokenDecimals)&&Sa(t,e.decimals,e.receiptTokenDecimals)!==null}function Gp(e,t){if(!_s(e.receiptTokenDecimals))return-1n;const n=S.convertAmountBetweenDecimals(t,e.decimals,e.receiptTokenDecimals),s=S.convertAmountBetweenDecimals(n,e.receiptTokenDecimals,e.decimals);return s<=t?s:-1n}function bo(e,t){return e.owner?.toLowerCase()===t.toLowerCase()}function Kp(e,t,n,s,r){if(!e)return[];const o=[];for(const i of Array.isArray(e)?e:[e]){if(i.amount<0n||!bo(i.asset,s)||i.asset.chainId!==r)return null;const a=ye(i.asset);if(a!==ye(t)&&a!==ye(n))return null;const l=o.find(u=>u.positionId===a);l?l.amount+=i.amount:o.push({positionId:a,amount:i.amount})}return o}function jr(e,t,n,s,r,o){if(!n||!/^0x[0-9a-f]{40}$/i.test(n)||!bo(e,n)||e.chainId!==s||!Or(e))return;let i,a,l;if(e.location==="embedded"&&e._source!=="spice"){i=e,l=e.address;const E=t.filter(k=>{const F=Ia(k,s);return k.location==="rollup"&&k._source!=="wallet"&&bo(k,n)&&k.chainId===s&&Or(k)&&!!k.receiptTokenId&&!!F&&d.addressesEqual(F.address,l)});if(E.length!==1)return;[a]=E}else if(e.location==="rollup"&&e._source!=="wallet"&&e.receiptTokenId){a=e;const E=Ia(e,s);if(!E)return;l=E.address;const k=t.filter(F=>F.location==="embedded"&&F._source!=="spice"&&bo(F,n)&&F.chainId===s&&Or(F)&&d.addressesEqual(F.address,l));if(k.length!==1)return;[i]=k}else return;if(!i||!a||!l||!Or(i)||!Or(a)||i.location!=="embedded"||a.location!=="rollup"||!a.receiptTokenId||!_s(i.decimals)||i.decimals!==a.decimals||!_s(a.receiptTokenDecimals))return;const u=Ia(a,s);if(!u||!d.addressesEqual(u.address,l)||u.decimals!==void 0&&u.decimals!==i.decimals)return;const m=ye(i),f=ye(a);if(m===f||t.filter(E=>ye(E)===m).length!==1||t.filter(E=>ye(E)===f).length!==1)return;let h=i.balance,y=r??a.balance;if(y<0n||y>a.balance)return;const g=Kp(o,i,a,n,s);if(g===null)return;for(const E of g)if(E.positionId===m){if(E.amount>h)return;h-=E.amount}else{if(E.amount>y||!Cs(a,E.amount))return;y-=E.amount}const x=ye(e),w=e.decimals;if(!_s(w))return;const v=Sa(h,i.decimals,w),C=Sa(y,a.decimals,w);if(!(v===null||C===null))return{wallet:i,escrow:a,owner:n,chainId:s,token:l,decimals:i.decimals,representativePositionId:x,representativeDecimals:w,walletAvailable:h,escrowAvailable:y,availableBalance:v+C,...g.length===1?{reserve:g[0]}:{},reserves:g}}function dl(e,t,n,s){const r=ye(e);return{positionId:r,asset:e,amount:t,reservedAmount:n.find(o=>o.positionId===r)?.amount??0n,availableAmount:s}}function Aa(e,t,n,s){if(t<=0n)throw new RangeError("Enter an amount within the available balance.");const r=s?.quoteOnly===!0;if(!r&&t>e.availableBalance)throw new RangeError("Enter an amount within the available balance.");let o,i,a=0n,l=0n,u=0n;if(n==="escrow"){const m=t<e.escrowAvailable?t:e.escrowAvailable;if(i=Gp(e.escrow,m),i<0n)throw new RangeError("Enter an amount within the available balance.");if(a=t-i,o=a,l=t,!r&&a>e.walletAvailable||!Cs(e.escrow,a)||!Cs(e.escrow,l))throw new RangeError("Enter an amount within the available balance.")}else if(o=t<e.walletAvailable?t:e.walletAvailable,u=o,l=t-o,i=l,!r&&l>e.escrowAvailable||!Cs(e.escrow,l))throw new RangeError("Enter an amount within the available balance.");return{owner:e.owner,chainId:e.chainId,token:e.token,decimals:e.decimals,representativePositionId:e.representativePositionId,representativeDecimals:e.representativeDecimals,route:n,grossAmount:t,insufficient:o>e.walletAvailable||i>e.escrowAvailable,positions:[dl(e.wallet,o,e.reserves,e.walletAvailable),dl(e.escrow,i,e.reserves,e.escrowAvailable)],walletDeposit:a,escrowWithdrawal:l,walletInPlace:u}}function vo(e,t,n,s,r){if(!e.positions.find(m=>m.positionId===e.representativePositionId))throw new Error("The source balance changed. Review the available amount before continuing.");const o=t.filter(m=>ye(m)===e.representativePositionId);if(o.length!==1)throw new Error("The source balance changed. Review the available amount before continuing.");if(e.insufficient)throw new Error("The source balance changed. Review the available amount before continuing.");const i=e.positions.filter(m=>m.reservedAmount>0n).map(m=>({asset:m.asset,amount:m.reservedAmount})),a=jr(o[0],t,n,s,r,i);if(!a||a.representativePositionId!==e.representativePositionId||a.representativeDecimals!==e.representativeDecimals||a.owner.toLowerCase()!==e.owner.toLowerCase()||a.chainId!==e.chainId||!d.addressesEqual(a.token,e.token)||a.decimals!==e.decimals)throw new Error("The source balance changed. Review the available amount before continuing.");if(e.grossAmount<=0n||e.positions.length!==2)throw new Error("The source balance changed. Review the available amount before continuing.");const l=e.positions.find(m=>m.positionId===ye(a.wallet)),u=e.positions.find(m=>m.positionId===ye(a.escrow));if(!l||!u||l.positionId===u.positionId||l.amount<0n||u.amount<0n||l.reservedAmount<0n||u.reservedAmount<0n)throw new Error("The source balance changed. Review the available amount before continuing.");if(e.route==="escrow"){if(e.walletDeposit!==l.amount||e.walletInPlace!==0n||e.escrowWithdrawal!==e.grossAmount||l.amount+u.amount!==e.grossAmount||!Cs(a.escrow,u.amount)||!Cs(a.escrow,l.amount)||!Cs(a.escrow,e.escrowWithdrawal))throw new Error("The source balance changed. Review the available amount before continuing.")}else if(e.walletDeposit!==0n||e.walletInPlace!==l.amount||e.escrowWithdrawal!==u.amount||l.amount+u.amount!==e.grossAmount||!Cs(a.escrow,u.amount))throw new Error("The source balance changed. Review the available amount before continuing.");if(l.amount>a.walletAvailable||u.amount>a.escrowAvailable)throw new Error("The source balance changed. Review the available amount before continuing.");for(const m of e.positions){const f=t.find(h=>ye(h)===m.positionId);if(!f||f.decimals!==m.asset.decimals||f.receiptTokenDecimals!==m.asset.receiptTokenDecimals||f.receiptTokenId!==m.asset.receiptTokenId)throw new Error("The source balance changed. Review the available amount before continuing.")}}function Yp(e,t){const n=t.feePolicy;if(!n||t.feeExecutionMode!=="user-transfer"||!t.feeBreakdown)return e;const s=t.feeToken??t.destinationToken,r=[{recipient:n.platformRecipient,amount:t.feeBreakdown.spicenetFee},{recipient:n.gasRecipient,amount:t.feeBreakdown.gasFee+t.feeBreakdown.bridgeFee}],o=[];for(const{recipient:i,amount:a}of r){const l=d.addressesEqual(i,n.gasRecipient)?[i,S.SPICE_GAS_FEE_RECIPIENT,...Lc]:[i],u=g=>l.some(x=>d.addressesEqual(g,x));let m;const f=(g,x)=>{if(m&&!d.addressesEqual(m,g))throw new Error("Action fee calls use mixed gas fee recipients");m=g,h=!0,y+=x};let h=!1,y=0n;for(const g of e)if(S.isNativeToken(s))u(g.to)&&g.data==="0x"&&f(g.to,g.value);else if(d.addressesEqual(g.to,s)&&g.value===0n){let x;try{x=N.decodeFunctionData({abi:N.erc20Abi,data:g.data})}catch{continue}if(x.functionName==="transfer"&&u(x.args[0])){if(N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:x.args}).toLowerCase()!==g.data.toLowerCase())throw new Error("Action fee transfer is not canonical");f(x.args[0],x.args[1])}}if(h){if(y!==a)throw new Error("Action fee calls differ from the accepted fee plan")}else a>0n&&o.push(S.isNativeToken(s)?{to:i,value:a,data:"0x"}:{to:s,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[i,a]})})}return[...o,...e]}function ul(e,t){let n,s;if(S.isNativeToken(t)){if(e.data!=="0x")return null;n=e.to,s=e.value}else{if(!d.addressesEqual(e.to,t))return null;try{const r=N.decodeFunctionData({abi:N.erc20Abi,data:e.data});if(r.functionName!=="transfer")return null;[n,s]=r.args}catch{return null}}return d.addressesEqual(n,S.SPICE_GAS_FEE_RECIPIENT)?{gas:s,platform:0n}:d.addressesEqual(n,S.SPICE_PLATFORM_FEE_RECIPIENT)?{gas:0n,platform:s}:null}async function Zp(e,t,n){const s=d.getClientForChain(e);return S.isNativeToken(n)?s.getBalance({address:t}):s.readContract({address:n,abi:N.erc20Abi,functionName:"balanceOf",args:[t]})}function er(e,t,n){return e.map(s=>s.chainId===t?{...s,calls:s.calls.filter(r=>!ul(r,n))}:s)}function pl(e,t,n){if(!e.feeOnlyAction)return{};const s=e.embeddedWalletAddress??e.providerEmbeddedAddress;if(e.feeQuote?.preview.feePayer==="relayer"){const m=async f=>{e.validateFeeQuote?.(),await Ca(f,s,t,e.signal),e.validateFeeQuote?.()};return{prepareForSigning:async f=>(await m(f),f),validateBeforeSubmit:m}}const r=e.feeQuote?.fundingSource,o=r&&r.kind!=="proceeds"?void 0:e.actionProceeds,i=r&&(r.kind==="input"||r.kind==="balance"&&r.asset?._source==="wallet")?r:void 0;if(o||e.feeQuote?.fundingConversion||i){const m=e.feeQuote?.fundingConversion,f=o??{token:t,resolve:async()=>0n},h=e.feeQuote?.preview,y=e.feeQuote?.proceedsUsed,g=m?.fromProceeds?m.tokenIn:t;if(!h||y===void 0||!i&&f.token.toLowerCase()!==g.toLowerCase())throw new Error("Refresh the action proceeds quote");const x=h.gasFee+(h.bridgeFee??0n),w=h.spicenetFee,v=i?async()=>{e.validateFeeQuote?.();const E=await Zp(e.resolvedChainId,s,i.token);e.validateFeeQuote?.();const k=i.kind==="input"?i.amount:(m?.amountInMax??y)+(i.reservedAmount??0n);if(e.signal?.aborted||E<k||m&&m.amountOut<x+w)throw new Error("The fee funding balance changed; refresh before retrying");return m?[{chainId:e.resolvedChainId,token:t,amount:m.amountOut}]:[]}:async()=>{e.validateFeeQuote?.();const E=await f.resolve(e.signal);if(e.validateFeeQuote?.(),e.signal?.aborted||(m?.fromProceeds?E<m.amountInMax||m.amountOut<x+w:E<y||E+(m?.amountOut??n)<x+w))throw new Error("Action proceeds changed; refresh before retrying");return m?.fromProceeds?[{chainId:e.resolvedChainId,token:m.tokenIn,amount:m.amountInMax},{chainId:e.resolvedChainId,token:t,amount:m.amountOut}]:[{chainId:e.resolvedChainId,token:t,amount:y+(m?.amountOut??0n)}]},C=async E=>{await v();const k=await Ca(E,s,t,e.signal,m?w:void 0);if(await v(),(k>h.gasFee?k-h.gasFee:h.gasFee-k)*100n>k*15n)throw new Error("Action gas quote changed; refresh before retrying")};return{resolveActionOutputCredits:v,prepareForSigning:async E=>{if(e.feeQuote?.sourceAllocation||e.feeQuote?.feeSourceAllocation)return await C(E),E;const k=er(E,e.resolvedChainId,t).map(O=>({...O,tokenTransfers:O.tokenTransfers?.filter(I=>!(typeof I.from=="string"&&d.addressesEqual(I.from,s)&&(d.addressesEqual(I.to,S.SPICE_GAS_FEE_RECIPIENT)||d.addressesEqual(I.to,S.SPICE_PLATFORM_FEE_RECIPIENT))))})),F=va(k,s,t,x,w);return await C(F),F},validateBeforeSubmit:C}}const a=S.getTokenByAddress(t,e.resolvedChainId),l={chainId:e.resolvedChainId,tokenAddress:t,symbol:a?.symbol??e.destinationToken.symbol,decimals:e.executionTokenDecimals??a?.decimals??e.destinationToken.decimals},u=async m=>{e.validateFeeQuote?.();const f=er(m,e.resolvedChainId,t),h=await e.execution.estimate(f,t,n,{userOverride:s,useCustomTransfers:!0,feeExecutionMode:"backend-transfer"});e.validateFeeQuote?.();const y=d.getSupplyFeePreview(h,l);if(!y||y.chainId!==e.resolvedChainId)throw new Error("The fee service did not return the destination action's fee quote");if(y.gasFee+y.spicenetFee+(y.bridgeFee??0n)+2n>n)throw new Error("Fees exceed the displayed maximum funding; refresh the quote before retrying");return{raw:f,feeEstimate:h,fees:y}};return{prepareForSigning:async m=>{const{raw:f,feeEstimate:h}=await u(m);return e.feeQuote?.sourceAllocation||e.feeQuote?.feeSourceAllocation?m:us(f,s,h,{payoutAlreadyGross:!0})},validateBeforeSubmit:async m=>{const{fees:f}=await u(m);let h=0n,y=0n;for(const x of m)if(x.chainId===e.resolvedChainId)for(const w of x.calls){const v=ul(w,t);v&&(h+=v.gas,y+=v.platform)}if(h+y+2n>n)throw new Error("Signed fees exceed the displayed maximum funding");const g=f.gasFee+(f.bridgeFee??0n);if((h>g?h-g:g-h)*100n>g*15n||y!==f.spicenetFee)throw new Error("The signed gas quote changed materially; refresh before retrying")}}}const Xp="0xa9059cbb";function Us(e,t,n){return S.isNativeToken(e)?{to:n,value:t,data:"0x"}:{to:e,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[n,t]})}}function Ea(e,t,n){return{chainId:n,calls:[Us(e,t,S.getEscrowContractAddress(n))]}}function Jp(e,t,n,s){const r=t.source.chainId;return{chainId:r,calls:[...e.calls,Us(t.source.address,n,S.getEscrowContractAddress(r)),...s>0n?[Us(t.source.address,s,S.SPICE_GAS_FEE_RECIPIENT)]:[]]}}function fl(e,t){const n=e.amountOutMinimum-t;if(n<=0n)throw new Error("Amount is too small to cover fees. Increase the amount and retry.");return n}function ml(e,t,n){return e?.asset?._source==="wallet"&&e?.asset.chainId===n}function hl(e){return e.isNative||S.isNativeToken(e.address)?!0:!S.getTokenByAddress(e.address,e.chainId)}function gl(e,t,n,s){return t!=="user-transfer"||!n||e.length===0||e[0]?.to.toLowerCase()!==s.toLowerCase()||!e[0]?.data.startsWith(Xp)?{feeCall:null,remainingCalls:e}:{feeCall:e[0],remainingCalls:e.slice(1)}}async function tr(e,t,n,s){const r=await(t??Js)({...n,requestTimestampMs:s});return r?[r,e]:[e]}function nr(e,t){const n=(e.tokenTransfers??[]).filter(s=>s.from==="escrow").map(s=>({token:S.normalizeNativeTokenAddress(s.token),recipient:s.to,amount:BigInt(s.amount)})).filter(s=>s.amount>0n);return t!==void 0&&n.length===1&&(n[0]={...n[0],amount:t}),n.length>0?n:void 0}function sr(e,t,n){return Lt(e,t,n,"ceil")}function wl(e){const t=e.selectedAsset?.asset;return e.isPayMode&&!!t&&t._source==="wallet"&&t.chainId!==e.resolvedChainId&&!!e.pivot}function Fa(e){const t=e.selectedAsset?.asset;return!e.isPayMode&&!!t&&t._source==="wallet"&&t.chainId!==e.resolvedChainId&&!!e.sourceSwap&&!!e.pivot}function Dr(e,t){if(t?.sourceSpendCap!==void 0&&e>t.sourceSpendCap)throw new Error("The source amount increased. Review the updated quote before submitting.");t?.onSourceSpend?.(e)}async function xl(e,t,n){let s;const r=await e({...t,buildActionCalls:async(o,i)=>{s=o;const a=Yp(await t.buildActionCalls(o,i),i);return n?.onActionCalls?.({amount:o,context:i,calls:a}),a}},n);if(s!==void 0){if(n?.minimumDestinationAmount!==void 0&&s<n.minimumDestinationAmount)throw new Error("The destination amount decreased. Review the refreshed quote before submitting.");n?.onDestinationAmount?.(s)}return r}const rr=(e,t)=>xl($p,e,t),Co=async(e,t)=>{const n=await xl(_p,e,t),s=t?.actionContextOverride?.feeBreakdown,r=n[n.length-1];if(t?.actionContextOverride?.feePolicy||e.feeExecutionMode!=="user-transfer"||!s||!r)return n;const o=e.needsSwap&&e.resolvedTokenIn?e.resolvedTokenIn:e.destinationToken.address,[i]=er([r],e.resolvedChainId,o),a=yo(e.resolvedChainId,o,[{recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:s.spicenetFee},{recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:s.gasFee+(s.bridgeFee??0n)}]).calls,l=r.calls.filter(u=>!i.calls.includes(u));return l.length===a.length&&a.every(u=>l.some(m=>m.to.toLowerCase()===u.to.toLowerCase()&&m.value===u.value&&m.data===u.data))?n:[...n.slice(0,-1),{...i,calls:[...a,...i.calls]}]};async function $p(e,t){const{currentPaymentAmount:n,destinationToken:s,embeddedWalletAddress:r,providerEmbeddedAddress:o,address:i,isNon7702:a,resolvedChainId:l,buildActionCalls:u,feeExecutionMode:m,buildSpicenetBatch:f,needsSwap:h,exactOutputSwap:y,resolvedTokenIn:g,requestTimestampMs:x}=e,w=t?.sourceAssetOverride?{asset:t.sourceAssetOverride}:e.selectedAsset,v=t?.fundingTokenOverride??g,C=dn(n,s.decimals),E=t?.actionAmountOverride??(e.feeOnlyAction?0n:C),k=!!e.feeOnlyAction&&(t?.fundingAmountOverride??0n)>0n,F=r||o||i;if(!F)throw new Error("Embedded wallet address is not available. Please sign in and try again.");const O={userAddress:e.recipient??F,executorAddress:F,beneficiary:e.recipient??F,outputRecipient:h?F:void 0,chainId:l,destinationToken:s.address,grossAmount:t?.fundingAmountOverride??C,netAmount:E,combinedFeeAmount:t?.actionContextOverride?.combinedFeeAmount,feeExecutionMode:m,feeBreakdown:t?.actionContextOverride?.feeBreakdown,...t?.actionContextOverride},I=()=>{h&&y&&t?.onSwap?.({...y,amountOutMinimum:y.amountOut},y.amountInMax)},b=await u(E,O),A={chainId:l,calls:b},R=!!w&&w.asset._source!=="wallet",B=ml(w??null,a,l),q=R||B&&!!w&&!hl(w.asset),j=(M,L)=>({token:S.normalizeNativeTokenAddress(M),from:"escrow",to:F,amount:L}),P=(M,L,T)=>B?[Ea(M,L,l),...T]:T;if(C===0n&&!k)return[A];const D=t?.combinedSourceGroupOverride===null?void 0:t?.combinedSourceGroupOverride??e.combinedSourceGroup;if(D&&(!h||v?.toLowerCase()===D.token.toLowerCase())){if(h&&!y)throw new Error("The action quote is unavailable.");I();const M=h?{...A,calls:[...y.calls,...b]}:A,L=t?.fundingAmountOverride??(h?y?.amountInMax??0n:C),T=Aa(D,L,"in-place",{quoteOnly:!0});if(t?.onSourceAllocation?.(T),Dr(nn(L,D.decimals,D.representativeDecimals),t),T.escrowWithdrawal===0n)return[M];const H={...M,tokenTransfers:[j(D.token,T.escrowWithdrawal)]};return tr(H,f,{userAddress:F,destinationChainId:l,deliveryToken:D.token,deliveryAmount:T.escrowWithdrawal,deliveryRecipient:F,deliveryTransfers:nr(H),sourceAsset:D.escrow},x)}if(w?.asset._source==="wallet"&&w.asset.chainId!==l&&!e.pivot)throw new Error("A current source-to-destination funding route is required");if(e.feeOnlyAction&&t?.fundingTokenOverride&&B)return Dr(t.fundingAmountOverride??0n,t),[A];if(wl(e)){if(h&&!y)throw new Error("Swap quote not available yet");const M=t?.fundingAmountOverride??(y?y.amountInMax:C),L=t?.sourceGasSkimOverride??0n,T=Lt(M,e.pivot.destination.decimals,e.pivot.source.decimals,"ceil"),H=T+L,V=e.sourceExactOutputSwap,te=V&&(t?.reuseQuotedSourceSwap||V.amountOut>=H)?V:e.resolveSourceExactOutputSwap?await e.resolveSourceExactOutputSwap(H):null;if(!te)throw new Error("Swap quote not available yet");Dr(te.amountInMax,t);const Z=w.asset;if(te.amountInMax>Z.balance)throw new Error(`Insufficient ${Z.symbol} for this payment. Required ${N.formatUnits(te.amountInMax,Z.decimals)} ${Z.symbol}; available ${N.formatUnits(Z.balance,Z.decimals)} ${Z.symbol}.`);const K=te.amountOut>=H?T:te.amountOut-L;if(K<=0n)throw new Error("Amount is too small to cover fees. Increase the amount and retry.");const Y={chainId:e.pivot.source.chainId,calls:[...te.calls,Us(e.pivot.source.address,K,S.getEscrowContractAddress(e.pivot.source.chainId)),...L>0n?[Us(e.pivot.source.address,L,S.SPICE_GAS_FEE_RECIPIENT)]:[]]};I();const J={chainId:l,calls:[...y?.calls??[],...b],tokenTransfers:[j(e.pivot.destination.address,M),...A.tokenTransfers??[]]},we=await tr(J,f,{userAddress:F,destinationChainId:l,deliveryToken:e.pivot.destination.address,deliveryAmount:M,deliveryRecipient:F,deliveryTransfers:nr(J),sourceAsset:w.asset},x);return[Y,...we]}if(w){const M=t?.fundingAmountOverride??y?.amountInMax??C;Dr(sr(M,await es(w.asset,v??w.asset.address,l,s),w.asset.decimals),t)}if(h&&y){const M=v??Dn(w.asset,l)??w.asset.address,L=t?.fundingAmountOverride??y.amountInMax,T=q?[j(M,L)]:[];I();const H={chainId:l,calls:[...y.calls,...b],tokenTransfers:[...T,...A.tokenTransfers??[]]};if(!q)return[H];const V=await tr(H,f,{userAddress:F,destinationChainId:l,deliveryToken:M,deliveryAmount:L,deliveryRecipient:F,deliveryTransfers:nr(H),sourceAsset:w.asset},x);return P(M,L,V)}if(q){const M=v??Dn(w.asset,l)??s.address;if(B&&!e.feeOnlyAction&&M.toLowerCase()===s.address.toLowerCase())return[A];const L=t?.fundingAmountOverride??C,T={...A,tokenTransfers:[j(M,L),...A.tokenTransfers??[]]},H=await tr(T,f,{userAddress:F,destinationChainId:l,deliveryToken:M,deliveryAmount:L,deliveryRecipient:F,deliveryTransfers:nr(T),sourceAsset:w.asset},x);return P(M,L,H)}return[A]}async function _p(e,t){const{selectedAsset:n,embeddedWalletAddress:s,recipient:r,resolvedChainId:o,destinationToken:i,buildActionCalls:a,feeExecutionMode:l,buildSpicenetBatch:u,isPayMode:m,isNon7702:f,needsSwap:h,resolvedSwap:y,quoteAmountOut:g,resolvedTokenIn:x,requestTimestampMs:w}=e;if(!n?.asset||!s)return[];const v=r??s;if(!v)return[];const C=Fa(e);let E=e.sourceSwap,k=dn(n.amount,n.asset.decimals),F=C?e.sourceSwap.amountOutMinimum:null;if(C&&e.isFeeInclusiveInput&&(F=fl(e.sourceSwap,t?.sourceGasSkimOverride??0n)),C&&!e.isFeeInclusiveInput&&(t?.fundingAmountOverride!==void 0||(t?.sourceGasSkimOverride??0n)>0n)){F=t?.fundingAmountOverride!==void 0?sr(t.fundingAmountOverride,e.pivot.destination.decimals,e.pivot.source.decimals):e.sourceSwap.amountOutMinimum;const xe=F+(t?.sourceGasSkimOverride??0n);if(!e.resolveSourceExactOutputSwap)throw new Error("The source quote cannot include fees yet.");const Ce=await e.resolveSourceExactOutputSwap(xe);if(Ce.amountOut<xe)throw new Error("The source quote does not cover the accepted funding amount.");k=Ce.amountInMax,E={...Ce,amountOutMinimum:Ce.amountOut}}const O=C?e.pivot.destination.address:x??Dn(n.asset,o)??i.address,I=C?e.pivot.destination.decimals:await es(n.asset,O,o,i),b=t?.fundingAmountOverride??t?.actionAmountOverride??(C?Lt(F,e.pivot.source.decimals,I,"floor"):nn(dn(n.amount,n.asset.decimals),n.asset.decimals,I)),A=t?.fundingAmountOverride??b,R=t?.combinedSourceGroupOverride===null?void 0:t?.combinedSourceGroupOverride??e.combinedSourceGroup,B=R&&!C?Aa(R,A,"escrow",{quoteOnly:!0}):void 0;B&&t?.onSourceAllocation?.(B);const q=B?.walletDeposit??t?.sourceFundingAmountOverride??sr(b,I,n.asset.decimals);Dr(B&&R?nn(A,R.decimals,R.representativeDecimals):C?k:q,t);const j=t?.deliveryAmountOverride??(l==="user-transfer"?A:t?.actionContextOverride?.netAmount??A),P=t?.withdrawalAmountOverride??j,D=t?.actionAmountOverride??t?.actionContextOverride?.netAmount??b;let M=y;if(h&&!m&&(t?.actionContextOverride?.netAmount!==void 0||C&&(t?.sourceGasSkimOverride??0n)>0n&&!t?.reuseQuotedSourceSwap)){if(!e.resolveInputSwap)throw new Error("Swap quote cannot be refreshed for the amount after fees.");const xe=t?.actionContextOverride?.netAmount??D;(!M||e.swapInputAmount!==xe)&&(M=await e.resolveInputSwap(xe,y??void 0))}const L=M?.amountOutMinimum??g,T={userAddress:v,executorAddress:s,beneficiary:v,outputRecipient:h?s:void 0,chainId:o,destinationToken:i.address,feeToken:l==="user-transfer"&&h&&x?x:i.address,grossAmount:A,netAmount:D,combinedFeeAmount:t?.actionContextOverride?.combinedFeeAmount,feeExecutionMode:l,feeBreakdown:t?.actionContextOverride?.feeBreakdown,...t?.actionContextOverride},H=()=>a(D,T),V=n.asset?._source==="wallet";if(!m&&V&&n.asset.chainId===o&&hl(n.asset)){if(h){if(!x)throw new Error("Swap input token could not be resolved");if(!M||L===null)throw new Error("Swap quote not available yet")}if(h&&M&&L){t?.onSwap?.(M,t?.actionContextOverride?.netAmount??e.swapInputAmount??D);const xe=await a(t?.actionAmountOverride??L,{...T,netAmount:t?.actionAmountOverride??L}),{feeCall:Ce,remainingCalls:ne}=gl(xe,l,h,T.feeToken);return[{chainId:o,calls:[...Ce?[Ce]:[],...M.calls,...ne]}]}return[{chainId:o,calls:await H()}]}if(!m&&V&&n.asset.chainId!==o&&!C)throw new Error("A current source-to-destination funding route is required");const te=n.asset._source!=="wallet",Z=ml(n,f,o);if(!(te||Z||C))return[{chainId:o,calls:await H()}];const K=C?Jp(E,e.pivot,F,t?.sourceGasSkimOverride??0n):B&&R?B.walletDeposit>0n?Ea(R.token,B.walletDeposit,o):null:Z?Ea(x??S.normalizeNativeTokenAddress(n.asset.address),q,o):null,Y=(xe,Ce)=>({token:S.normalizeNativeTokenAddress(xe),from:"escrow",to:s,amount:Ce});if(h){if(!x)throw new Error("Swap input token could not be resolved");if(!M||L===null)throw new Error("Swap quote not available yet")}if(h&&M&&L&&x){t?.onSwap?.(M,t?.actionContextOverride?.netAmount??e.swapInputAmount??D);const xe=await a(t?.actionAmountOverride??L,{...T,netAmount:t?.actionAmountOverride??L}),{feeCall:Ce,remainingCalls:ne}=gl(xe,l,h,T.feeToken),_={chainId:o,calls:[...Ce?[Ce]:[],...M.calls,...ne],tokenTransfers:[Y(x,j)]},de=await tr(_,u,{userAddress:s,destinationChainId:o,deliveryToken:x,deliveryAmount:j,withdrawalAmount:P,deliveryRecipient:s,deliveryTransfers:nr(_,P),sourceAsset:n.asset},w);return K?[K,...de]:de}const J=x??Dn(n.asset,o)??i.address,we={chainId:o,calls:await H(),tokenTransfers:[Y(J,j)]},me=await tr(we,u,{userAddress:s,destinationChainId:o,deliveryToken:J,deliveryAmount:j,withdrawalAmount:P,deliveryRecipient:s,deliveryTransfers:nr(we,P),sourceAsset:n.asset},w);return K?[K,...me]:me}async function ef(e,t,n,s,r){let o=e;for(let i=0;i<4;i++){const a=await t(o),l=await s(a,n,o,r),u=d.getSingleNetOutput(l);if(u===null||u>=e)return o;const m=o-u,f=e+m;if(f<=o)return o;o=f}return o}function tf(e){return{...e,resolve:async(t,n,s)=>{const r=await e.resolve(t,n,s),o=r?.calls[0]?.to;return!r||!o||S.isNativeToken(t.tokenIn)?r:{...r,calls:[{to:t.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[o,r.amountInMax]})},...r.calls]}}}}function Nr(e){const t=(e?.customVenues??[]).map(s=>cu(tf(s)));async function n(s,r,o){const i=t.filter(u=>u.chainIds.includes(r));if(i.length===0)throw new d.SpiceflowError("NO_SWAP_ROUTE",`No exact-output venue supports chain ${r}`,{chainId:r,tokenIn:s.tokenIn,tokenOut:s.tokenOut});const a=(await Promise.allSettled(i.map(async u=>({venue:u,quote:await u.resolve(s,r,o)})))).filter(u=>u.status==="fulfilled").map(u=>u.value).filter(u=>u.quote!==null);if(a.length===0)throw new d.SpiceflowError("NO_SWAP_ROUTE",`All aggregators failed for ${s.tokenIn} \u2192 ${s.tokenOut} on chain ${r}`,{chainId:r,tokenIn:s.tokenIn,tokenOut:s.tokenOut,amountOut:s.amountOut.toString()});const l=a.find(u=>u.venue.preferred);return l?l.quote:(a.sort((u,m)=>u.quote.amountIn<m.quote.amountIn?-1:u.quote.amountIn>m.quote.amountIn?1:0),a[0].quote)}return{getQuote:n,venues:t}}function yl(e,t,n){if(e._source==="wallet")return e.chainId===t?e.address:null;const s=Gs(e,t);return s.find(r=>r.toLowerCase()===n.toLowerCase())??s[0]??null}async function Ta(e,t,n,s){const r=S.hashChainBatches(s),o=await d.relayerService.estimateBatchGas({user:t,outputToken:n,requireSimulation:!0,includePlatformFee:!0,signal:e.signal,chainBatches:s.map((i,a)=>({...i,hash:r[a].hash}))});if(!o.simulationVerified||o.gasQuoteSource!=="estimated"||o.platformFee===void 0||o.gasFee<=0n)throw new Error("Fee funding requires verified gas and platform pricing");return o}async function Mr(e,t){const n=e.selectedAsset?.asset,s=!t&&!!e.actionProceeds&&e.actionProceeds.token.toLowerCase()!==e.destinationToken.address.toLowerCase(),r=!!t||s,o=e.embeddedWalletAddress||e.providerEmbeddedAddress;if(!o||!r&&(!n||n._source!=="spice"&&!(n._source==="wallet"&&n.chainId===e.resolvedChainId)))throw new Error("A local embedded or Spice balance is required for fee conversion");const i=t?t.token:s?e.actionProceeds.token:yl(n,e.resolvedChainId,e.destinationToken.address);if(!i)throw new Error("This receipt has no registered destination withdrawal token");const a=S.getTokenByAddress(i,e.resolvedChainId)?.decimals??(S.isNativeToken(i)?18:r?await d.getClientForChain(e.resolvedChainId).readContract({address:i,abi:N.erc20Abi,functionName:"decimals"}):n?._source==="wallet"?n.decimals:void 0);if(a===void 0)throw new Error("Fee funding token metadata is unavailable");const l=e.destinationToken.address;if(e.actionProceeds&&!s&&e.actionProceeds.token.toLowerCase()!==l.toLowerCase())throw new Error("Action proceeds must use the destination fee token");const u=t?t.amount:e.actionProceeds?await e.actionProceeds.resolve(e.signal):0n;if(u<0n||e.signal?.aborted)throw new Error("Action proceeds quote was cancelled or invalid");const m=Nr({customVenues:[...e.resolveExactOutputSwap?[{name:"consumer-exact-output",chainIds:[e.resolvedChainId],preferred:!0,resolve:e.resolveExactOutputSwap}]:[],...js(e.liquidityVenues).output]}),f=y=>Ta(e,o,l,y);let h=await f(await e.buildPayChainBatches({fundingAmountOverride:0n}));for(let y=0;y<8;y++){const g=h.gasFee+h.platformFee,x=r?0n:u<g?u:g,w=g-x,v=w>0n?(w*110n+99n)/100n+2n:0n,C=v>0n?await m.getQuote({tokenIn:i,tokenOut:l,amountOut:v,maxSlippage:e.maxSlippage},e.resolvedChainId,o):null;if(e.signal?.aborted)throw new Error("Fee conversion quote was cancelled");if(C&&(C.amountOut!==v||C.amountInMax<=0n||C.amountInMax<C.amountIn||!C.calls.length))throw new Error("Invalid exact-output fee conversion quote");const E=C?.amountInMax??0n,k=r?0n:sr(E,a,n.decimals);if(r&&E>u)throw new vs(E,u);if(!r&&k>n.balance)throw new vs(k,n.balance);let F,O=us(await e.buildPayChainBatches({fundingAmountOverride:r?0n:E,...r?{}:{fundingTokenOverride:i},...t?{actionAmountOverride:t.amount-E}:{},...s?{actionOutputFee:E}:{},onActionCalls:b=>{F=b}}),o,void 0,{expiresAt:e.expiresAt});if(C){const b=O.length-1;O=O.map((A,R)=>R===b?{...A,calls:[...A.calls,...C.calls]}:A)}O=va(O,o,l,h.gasFee,h.platformFee);const I=await f(O).catch(b=>{throw C&&b instanceof d.SpiceflowError&&b.code==="RELAYER_ERROR"&&b.context.endpoint==="/actions/gas/estimate"&&b.context.httpStatus===400&&/^Execution reverted\b/i.test(b.message)?new d.SpiceflowError("NO_SWAP_ROUTE",b.message,b.context):b});if(I.gasFee<=h.gasFee&&(h.gasFee-I.gasFee)*100n<=I.gasFee*15n&&I.platformFee===h.platformFee){const b={tokenIn:i,tokenOut:l,amountInMax:E,amountOut:v,sourceAmountMax:k,...s?{fromProceeds:!0}:{},...t?{fromInput:!0}:{}};return{feeEstimate:null,preview:{symbol:e.destinationToken.symbol,decimals:e.destinationToken.decimals,grossAmount:r?0n:v,netAmount:0n,gasFee:h.gasFee,spicenetFee:h.platformFee,totalFee:g,gasQuoteSource:"estimated"},grossFundingAmount:r?0n:E,proceedsAvailable:u,proceedsUsed:r?g:x,fundingConversion:b,fundingBatches:O,sourceSpendCap:k,destinationAmount:0n,actionDefinition:F}}h=I}throw new Error("Fee conversion pricing did not converge")}const ko=["input","proceeds","balance"];function bl(e){if(e.reserve&&e.reserve.amount<0n)throw new Error("Fee funding reserve cannot be negative");if(e.reserves?.some(a=>a.amount<0n))throw new Error("Fee funding reserve cannot be negative");const t=a=>d.addressesEqual(a,e.feeToken),n=(a,l)=>Number(a.swap)-Number(l.swap),s={input:[],proceeds:[],balance:[]};for(const a of e.inputs??[])a.amount>0n&&s.input.push({kind:"input",...a,swap:!t(a.token)});s.input.sort(n);for(const a of Array.isArray(e.proceeds)?e.proceeds:e.proceeds?[e.proceeds]:[])a.amount>0n&&s.proceeds.push({kind:"proceeds",...a,swap:!t(a.token)});s.proceeds.sort(n);const r=e.balances.filter(a=>a._source==="wallet"&&a.chainId===e.chainId&&a.location!=="external"),o=e.balances.filter(a=>a._source==="spice"),i=a=>{const l=[];for(const u of a){const m=[...e.reserves??[],...e.reserve?[e.reserve]:[]].filter(g=>ye(u)===ye(g.asset)).reduce((g,x)=>x.amount>g?x.amount:g,0n),f=u.balance-m;if(f<=0n)continue;const h=m>0n?{...u,balance:f,balanceFormatted:Number(N.formatUnits(f,u.decimals)),balanceUsd:u.balanceUsd*Number(f)/Number(u.balance)}:u,y=yl(h,e.chainId,e.feeToken);y&&(e.inputs?.some(g=>d.addressesEqual(g.token,y)&&![...e.reserves??[],...e.reserve?[e.reserve]:[]].some(x=>d.addressesEqual(x.asset.address,g.token)))||l.push({kind:"balance",token:y,amount:h.balance,asset:h,...m>0n?{reservedAmount:m}:{},swap:!t(y)}))}return l.sort((u,m)=>n(u,m)||m.asset.balanceUsd-u.asset.balanceUsd)};return s.balance=[...i(r),...i(o)],(e.order??ko).flatMap(a=>s[a])}function nf(e){return e instanceof vs||e instanceof d.SpiceflowError&&e.code==="NO_SWAP_ROUTE"}async function Ra(e,t){const n=e.embeddedWalletAddress||e.providerEmbeddedAddress;if(!n||!e.ready||!e.authenticated)return null;const s=e.destinationToken.address;let r;const o=()=>r??(r=(async()=>{const u=await Ta(e,n,s,await e.buildPayChainBatches({fundingAmountOverride:0n}));return{feeEstimate:null,preview:{symbol:e.destinationToken.symbol,decimals:e.destinationToken.decimals,gasFee:u.gasFee,spicenetFee:u.platformFee,bridgeFee:0n,totalFee:u.gasFee+u.platformFee,grossAmount:0n,netAmount:0n,gasQuoteSource:"estimated"}}})()),i=(u,m)=>e.buildPayChainBatches({...m,fundingAmountOverride:u}),a=(u,m,f=!1)=>il({proceeds:{token:s,resolve:async()=>u},owner:n,token:s,signal:e.signal,baseline:o,buildBatches:(h,y)=>i(h,{...y,actionOutputFee:f?y?.actionOutputFee:void 0}),fundShortfall:!1,expiresAt:e.expiresAt,actionAmountFor:m}),l=async u=>{if(u.kind==="input")return u.swap?Mr({...e,actionProceeds:void 0},u):a(u.amount,g=>u.amount-g);if(u.kind==="proceeds"){const g={token:u.token,resolve:async()=>u.amount};return u.swap?Mr({...e,actionProceeds:g}):a(u.amount,void 0,!0)}const m=u.asset;if(m._source==="wallet"&&!u.swap)return a(m.balance);let f=!u.swap&&m._source==="spice"?e.getCombinedSourceGroup?.(m):void 0;if(f){const g=[ye(f.wallet),ye(f.escrow)],x=[...e.feeFundingReserves??[],...e.feeFundingReserve?[e.feeFundingReserve]:[]].filter(w=>g.includes(ye(w.asset)));x.length&&(f=e.getCombinedSourceGroup?.(m,x))}const h={...e,selectedAsset:{asset:m,amount:"0"},combinedSourceGroup:f,resolvedTokenIn:u.token,actionInput:void 0,actionProceeds:void 0,buildPayChainBatches:g=>e.buildPayChainBatches({...g,sourceAssetOverride:m,combinedSourceGroupOverride:f??null,fundingTokenOverride:g?.fundingTokenOverride??u.token})};if(u.swap)return Mr(h);const y=await t(h);if(y&&(y.sourceSpendCap??0n)>(f?.availableBalance??m.balance))throw new vs(y.sourceSpendCap,f?.availableBalance??m.balance);return y};for(const u of e.feeFunding??ko){const m=u!=="proceeds"?[]:e.actionProceedsCandidates?await e.actionProceedsCandidates(e.signal):e.actionProceeds?[{token:e.actionProceeds.token,amount:await e.actionProceeds.resolve(e.signal)}]:[];if(e.signal?.aborted)throw new Error("Fee funding quote was cancelled");if(m.some(h=>h.amount<0n))throw new Error("Action proceeds cannot be negative");const f=bl({feeToken:s,chainId:e.resolvedChainId,inputs:e.actionInput,proceeds:[...m.reduce((h,y)=>{const g=y.token.toLowerCase(),x=h.get(g);return h.set(g,{token:y.token,amount:(x?.amount??0n)+y.amount}),h},new Map).values()],balances:e.feeFundingBalances??[],order:[u],reserve:e.feeFundingReserve,reserves:e.feeFundingReserves});for(const h of f)try{const y=await l(h);if(!y)continue;const{swap:g,...x}=h;return{...y,fundingSource:x}}catch(y){if(e.signal?.aborted||!nf(y))throw y}}if(!e.isNon7702&&e.allowRelayerFeeFallback!==!1){if(e.feeFundingError)throw new Error(e.feeFundingError);let u;const m=await e.buildPayChainBatches({fundingAmountOverride:0n,onActionCalls:f=>{u=f}});if(m.every(f=>f.domain!=="spicenet"&&!f.tokenTransfers?.length)){const f=await Ta(e,n,s,m);if(e.signal?.aborted)throw new Error("Fee funding quote was cancelled");return{feeEstimate:null,actionDefinition:u,batches:m,sourceSpendCap:0n,grossFundingAmount:0n,preview:{feePayer:"relayer",symbol:e.destinationToken.symbol,decimals:e.destinationToken.decimals,gasFee:f.gasFee,spicenetFee:f.platformFee,bridgeFee:0n,totalFee:f.gasFee+f.platformFee,grossAmount:0n,netAmount:0n,gasQuoteSource:"estimated"}}}}throw new Error(`No available balance can cover this action's ${e.destinationToken.symbol} execution cost`)}async function vl(e,t,n,s=!1){const r=e.selectedAsset,o=e.embeddedWalletAddress||e.providerEmbeddedAddress;if(!r||!o||!e.ready||!e.authenticated||e.isQuoting)return null;if(!e.combinedSourceGroup&&r.asset._source!=="wallet"||r.asset.chainId!==e.resolvedChainId||!Ks(r.asset)&&r.asset.owner&&!d.addressesEqual(r.asset.owner,o))throw new Error("Funded fee hierarchy requires principal on the action chain in the executing wallet.");if(s&&(e.isPayMode||!e.isFeeInclusiveInput||t.recipient&&!d.addressesEqual(t.recipient,o)))throw new Error("Output-funded actions require an input-inclusive amount left in the executing wallet.");if(e.isPayMode&&e.needsSwap&&!e.exactOutputSwap)return null;const i=e.isPayMode?dn(e.currentPaymentAmount,e.destinationToken.decimals):void 0;if(e.isPayMode&&e.needsSwap&&e.exactOutputSwap.amountOut!==i)throw new Error("Wait for the payment quote for the current amount.");const a=S.getTokensForChain(e.resolvedChainId).find(F=>F.equivalenceGroup==="USDC");if(!a)throw new Error("Configure the execution fee token for this chain.");const l={...a,address:a.address,chainId:e.resolvedChainId},u=i!==void 0?e.needsSwap?e.exactOutputSwap.amountInMax:i:dn(r.amount,r.asset.decimals);if(u<=0n||u>(e.combinedSourceGroup?.availableBalance??r.asset.balance))throw new Error("Enter an amount within the available balance.");if(!e.isPayMode&&e.needsSwap&&t.swapInputAmount!=null&&t.swapInputAmount!==u)throw new Error("Wait for the action quote for the current amount.");const m=i??(e.needsSwap?t.resolvedSwap?.amountOutMinimum??0n:u);let f=t.resolvedSwap??void 0,h=u,y=m;const g=e.combinedSourceGroup?Aa(e.combinedSourceGroup,u,"in-place"):void 0,x={...e,feeOnlyAction:!0,selectedAsset:null,isPayMode:!0,isFeeInclusiveInput:!1,parsedAmount:0,currentPaymentAmount:"0",destinationToken:l,resolvedTokenIn:l.address,executionTokenAddress:l.address,needsSwap:!1,resolvedSwap:null,isDirect:!0,actionInput:!e.isPayMode&&e.isFeeInclusiveInput?[{token:r.asset.address,amount:u}]:void 0,actionProceeds:s?{token:e.destinationToken.address,resolve:async()=>m>0n?m-1n:0n}:e.actionProceeds,feeFundingBalances:e.feeFundingBalances?.filter(F=>!F.balanceError&&!(e.feeFundingReserve&&ye(e.feeFundingReserve.asset)!==ye(r.asset)&&ye(F)===ye(e.feeFundingReserve.asset))&&!Ks(F)&&(!F.owner||d.addressesEqual(F.owner,o))),feeFundingReserves:g?.positions.map(F=>({asset:F.asset,amount:F.amount})),feeFundingReserve:g?void 0:{asset:r.asset,amount:e.feeFundingReserve&&ye(e.feeFundingReserve.asset)===ye(r.asset)&&e.feeFundingReserve.amount>u?e.feeFundingReserve.amount:u},buildPayChainBatches:async F=>{const O=F?.actionAmountOverride??u;if(O<=0n)throw new vs(u+1n,u);const I=!e.isPayMode&&e.needsSwap?O===u?t.resolvedSwap:await t.resolveInputSwap?.(O,t.resolvedSwap??void 0):null,b=e.needsSwap?e.isPayMode?e.exactOutputSwap:I:null;if(e.needsSwap&&!b)throw new Error("The action quote is unavailable.");f=I??(e.isPayMode&&b?{...b,amountOutMinimum:b.amountOut}:void 0),h=O;const A=i??f?.amountOutMinimum??O,R=s?F?.actionOutputFee??0n:0n;if(R<0n)throw new Error("Output fee cannot be negative");if(R>=A)throw new vs(R+1n,A);y=A-R;const B={userAddress:t.recipient??o,executorAddress:o,beneficiary:t.recipient??o,outputRecipient:o,chainId:e.resolvedChainId,destinationToken:e.destinationToken.address,grossAmount:m,netAmount:y,feeToken:l.address,feeExecutionMode:"backend-transfer"},q=await t.buildActionCalls(y,B),j={amount:y,context:B,calls:q},P=[...b?.calls??[],...q];let D=await rr({...t,selectedAsset:null,combinedSourceGroup:void 0,feeOnlyAction:!0,isPayMode:!0,isFeeInclusiveInput:!1,currentPaymentAmount:"0",destinationToken:l,resolvedTokenIn:l.address,needsSwap:!1,resolvedSwap:null,exactOutputSwap:null,quoteAmountOut:null,feeExecutionMode:"backend-transfer",buildActionCalls:()=>P},{...F,onActionCalls:()=>F?.onActionCalls?.(j)});if(g?.escrowWithdrawal){const M=[...D].reverse().findIndex(T=>T.domain!=="spicenet"&&T.chainId===e.resolvedChainId),L=M<0?-1:D.length-M-1;if(L<0)throw new Error("The action quote is unavailable.");D[L]={...D[L],tokenTransfers:[...D[L].tokenTransfers??[],{token:g.token,from:"escrow",to:o,amount:g.escrowWithdrawal}]},D=us(D,o,void 0,{payoutAlreadyGross:!0,requestTimestampMs:t.requestTimestampMs,expiresAt:e.expiresAt})}return D}},w=await Ra(x,n);if(!w)return null;const v=s&&w.fundingSource?.kind==="proceeds"?w.fundingConversion?.amountInMax??w.proceedsUsed??0n:0n;if(y<=0n)throw new Error("Not enough action output remains after execution costs.");let C=g;const E=C&&w.sourceAllocation&&C.positions.every(F=>w.sourceAllocation.positions.some(O=>O.positionId===F.positionId)),k=w.sourceAllocation&&!E?w.sourceAllocation:void 0;if(C){const F=w.sourceAllocation?.positions??[],O=w.fundingSource?.kind==="balance"&&w.fundingSource.asset&&ye(w.fundingSource.asset)===ye(e.combinedSourceGroup.wallet)?w.fundingConversion?.amountInMax??w.proceedsUsed??0n:0n,I=F.find(A=>A.positionId===ye(e.combinedSourceGroup.wallet))?.amount??O,b=F.find(A=>A.positionId===ye(e.combinedSourceGroup.escrow))?.amount??(w.fundingSource?.kind==="balance"&&w.fundingSource.asset&&ye(w.fundingSource.asset)===ye(e.combinedSourceGroup.escrow)?w.sourceSpendCap??0n:0n);C={...C,grossAmount:u+I+b,walletInPlace:C.walletInPlace+I,escrowWithdrawal:C.escrowWithdrawal+b,positions:C.positions.map(A=>({...A,amount:A.amount+(A.asset.location==="embedded"?I:b),reservedAmount:0n}))}}return{...w,preview:d.addressesEqual(e.destinationToken.address,l.address)?{...w.preview,netAmount:y,grossAmount:y+(w.preview.feePayer==="relayer"?0n:w.preview.gasFee+w.preview.spicenetFee+(w.preview.bridgeFee??0n))}:w.preview,fundedFeeToken:l,batches:w.fundingBatches??w.batches,destinationSwap:f,swapInputAmount:h,destinationAmount:y,actionOutputCredits:ho(e.resolvedChainId,e.destinationToken.address,f&&{...f,amountOutMinimum:f.amountOutMinimum-v}),sourceAllocation:C,feeSourceAllocation:k,sourceSpendCap:C?.grossAmount??u+(w.fundingSource?.kind==="balance"&&w.fundingSource.asset&&ye(w.fundingSource.asset)===ye(r.asset)?w.fundingConversion?.amountInMax??w.proceedsUsed??0n:0n)}}function Ba(e,t){const n=new Map,s=(i,a,l)=>{if(l<0n)throw new Error("Accepted wallet funding must not be negative");if(!l)return;if(!Number.isInteger(i)||i<=0)throw new Error("Accepted wallet funding chain is unavailable");a=S.normalizeNativeTokenAddress(a);const u=`${i}:${a.toLowerCase()}`,m=n.get(u);n.set(u,{chainId:i,token:a,amount:(m?.amount??0n)+l})},r=[e.sourceAllocation,e.feeSourceAllocation];if(e.fundingPlan)for(const i of e.fundingPlan.sources)i.asset.location==="embedded"&&s(i.chainId,i.token,i.sourceSpendCap);else{if(e.sourceAllocation)for(const a of e.sourceAllocation.positions)a.asset.location==="embedded"&&s(e.sourceAllocation.chainId,e.sourceAllocation.token,a.amount);else t?.asset._source==="wallet"&&e.sourceSpendCap!==void 0&&s(t.asset.chainId,t.asset.address,e.sourceSpendCap);if(e.feeSourceAllocation)for(const a of e.feeSourceAllocation.positions)a.asset.location==="embedded"&&s(e.feeSourceAllocation.chainId,e.feeSourceAllocation.token,a.amount);const i=e.fundingSource;if(i?.kind==="balance"&&i.asset?._source==="wallet"){const a=ye(i.asset),l=r.some(m=>m?.positions.some(f=>f.positionId===a)),u=!!e.fundedFeeToken&&!!t&&a===ye(t.asset);!l&&!u&&s(i.asset.chainId,i.token,e.fundingConversion?.amountInMax??e.proceedsUsed??0n)}if(i?.kind==="input"&&!e.fundedFeeToken){const a=e.batches??e.fundingBatches??[],l=e.actionDefinition?.context.chainId??[...a].reverse().find(u=>u.domain!=="spicenet")?.chainId;s(l??0,i.token,i.amount)}}const o=e.externalGasReserve?.fundingSource;return o&&s(o.asset.chainId,o.token,o.amount),[...n.values()]}async function sf(e,t){const n=e.externalGasRecipient,s=e.embeddedWalletAddress||e.providerEmbeddedAddress,r=e.resolvedChainId,o=t.batches,i=o.map(v=>v.chainId).lastIndexOf(r);if(i<0)throw new Error("Destination gas quote is unavailable.");const[a,l]=await Promise.all([d.relayerService.estimateBatchGas({user:s,outputToken:S.ZERO_ADDRESS,chainBatches:o,stepIndex:i,signal:e.signal}),d.getClientForChain(r).getBalance({address:n})]);if(e.signal?.aborted)throw new Error("Fee estimation cancelled");if(a.gasQuoteSource!=="estimated"||a.gasFee<=0n)throw new Error("A native gas quote is required for the external wallet.");const u=o[i].calls.reduce((v,C)=>d.addressesEqual(C.to,n)&&C.data==="0x"?v+C.value:v,0n),m=3n*a.gasFee,f=await e.externalGasCalls?.(t)??[],h=f.reduce((v,C)=>v+C.value,0n),y=(3n+BigInt(f.length))*m+h,g=l+u<y?y-l-u:0n,x={chainId:r,recipient:n,balance:l,incoming:u,transactionGas:m,nativeAmount:g,currentTransactions:f.length,currentValue:h,feeAmount:0n,calls:[]};if(g===0n)return x;const w=e.executionTokenAddress;if(S.isNativeToken(w))x.feeAmount=g;else{const v=Nr({customVenues:[...e.resolveExactOutputSwap?[{name:"consumer-exact-output",chainIds:[r],preferred:!0,resolve:e.resolveExactOutputSwap}]:[],...js(e.liquidityVenues).output]}),C=k=>v.getQuote({tokenIn:k,tokenOut:S.ZERO_ADDRESS,amountOut:g,maxSlippage:e.maxSlippage},r,s),E=k=>{if(k.amountOut!==g||k.amountInMax<=0n||!k.calls.length)throw new Error("The external gas purchase could not be quoted.");if(e.signal?.aborted)throw new Error("Fee estimation cancelled");return k};try{const k=E(await C(w));x.feeAmount=k.amountInMax,x.calls=k.calls}catch(k){if(e.signal?.aborted||!(k instanceof d.SpiceflowError)||k.code!=="NO_SWAP_ROUTE")throw k;const F=Ba(t,e.selectedAsset),O=(e.feeFundingBalances??[]).filter(b=>b._source==="wallet"&&b.chainId===r&&!Ks(b)&&b.location!=="rollup"&&!b.balanceError&&!b.balanceStatus&&(!b.owner||d.addressesEqual(b.owner,s))&&!d.addressesEqual(b.address,w)),I=bl({feeToken:S.ZERO_ADDRESS,chainId:r,balances:O,order:["balance"],reserves:[...e.feeFundingReserves??[],...e.feeFundingReserve?[e.feeFundingReserve]:[],...O.flatMap(b=>F.filter(A=>A.chainId===r&&d.addressesEqual(A.token,S.normalizeNativeTokenAddress(b.address))).map(A=>({asset:b,amount:A.amount})))]});for(const b of I){if(e.signal?.aborted)throw new Error("Fee estimation cancelled");try{const A=S.isNativeToken(b.token)?void 0:E(await C(b.token)),R=A?.amountInMax??g;if(R>b.amount)continue;const B=O.find(q=>ye(q)===ye(b.asset));x.fundingSource={asset:B,token:b.token,amount:R},x.calls=A?.calls??[];break}catch(A){if(e.signal?.aborted||!(A instanceof d.SpiceflowError)||A.code!=="NO_SWAP_ROUTE")throw A}}if(!x.fundingSource)throw k}}return x.calls=[...x.calls,{to:n,value:g,data:"0x"}],x}function Io(e,t){if(!t?.nativeAmount)return e;const n=e.map(s=>s.chainId).lastIndexOf(t.chainId);if(n<0)throw new Error("The gas reserve destination changed.");return e.map((s,r)=>r===n?{...s,calls:[...s.calls,...t.calls]}:s)}function Cl(e,t){if(e&&e.nativeAmount>0n){const n=t.filter(r=>r.chainId===e.chainId).slice(-1)[0],s=n?.calls.slice(-e.calls.length);if(!s||s.length!==e.calls.length||s.some((r,o)=>{const i=e.calls[o];return!d.addressesEqual(r.to,i.to)||r.value!==i.value||r.data!==i.data}))throw new Error("The external gas purchase changed. Refresh the quote before submitting.");if(n.calls.slice(0,-e.calls.length).reduce((r,o)=>d.addressesEqual(o.to,e.recipient)&&o.data==="0x"?r+o.value:r,0n)<e.incoming)throw new Error("The native result changed. Refresh the gas reserve quote before submitting.")}}async function kl(e,t){if(!e)return;t&&Cl(e,t);const n=await d.getClientForChain(e.chainId).getBalance({address:e.recipient});if(e.nativeAmount>0n?n!==e.balance:n+e.incoming<(3n+BigInt(e.currentTransactions))*e.transactionGas+e.currentValue)throw new Error("The external wallet gas balance changed. Refresh the quote before submitting.")}async function rf(e){const t=e.selectedAsset.asset;if(t.chainId!==e.destinationToken.chainId||!d.addressesEqual(S.normalizeNativeTokenAddress(t.address),S.normalizeNativeTokenAddress(e.destinationToken.address)))throw new Error("Direct execution requires the destination token on its own chain.");if(t.decimals!==e.destinationToken.decimals)throw new Error("Source and destination token decimals do not match.");const n=dn(e.paymentAmount??e.selectedAsset.amount,t.decimals);if(n<=0n)throw new Error("Enter a positive action amount.");const s={userAddress:e.beneficiary??e.account,executorAddress:e.account,beneficiary:e.beneficiary??e.account,chainId:e.destinationToken.chainId,destinationToken:e.destinationToken.address,feeToken:t.address,grossAmount:n,netAmount:n,combinedFeeAmount:0n,feeExecutionMode:e.feeExecutionMode,feeBreakdown:{spicenetFee:0n,gasFee:0n,bridgeFee:0n}},r=await e.buildActionCalls(n,s);if(!r.length)throw new Error("No action calls configured.");if(S.isNativeToken(t.address)&&r.reduce((o,i)=>o+i.value,0n)>n)throw new Error("The native action exceeds the accepted source amount.");return{actionDefinition:{amount:n,context:s,calls:r},actionContext:s,batches:[{chainId:s.chainId,calls:r}],fundingAmount:n,sourceSpendCap:n,destinationAmount:n,feeEstimate:null,preview:{symbol:t.symbol,decimals:t.decimals,grossAmount:n,netAmount:n,totalFee:0n,gasFee:0n,spicenetFee:0n,bridgeFee:0n,gasQuoteSource:"static_zero"}}}async function Il(e){const[t]=await e.buildSupplyChainBatches({sourceGasSkimOverride:1n,reuseQuotedSourceSwap:!0});if(!t)throw new Error("Swap quote not available yet");const{gasFee:n}=await d.relayerService.estimateBatchGas({user:e.user,outputToken:e.pivot.source.address,stepIndex:0,chainBatches:[t],signal:e.signal});return n}const Oa=(e,t)=>(e+t-1n)/t;function So(e,t,n=0n){return e.intents.length===0?t:{...e,intents:e.intents.map(s=>({...s,batches:s.batches.map(r=>{const o=t.intents.find(l=>l.intentIndex===s.intentIndex)?.batches.find(l=>l.chainId===r.chainId);if(!o&&n===0n)return r;const i={...r.feeBreakdown};let a=0n;for(const l of["gasFee","bridgeFee"]){const u=BigInt(i[l]??"0"),m=BigInt(o?.feeBreakdown[l]??"0"),f=u>m?u+Oa(u*n,10000n):m;f>u&&(i[l]=f.toString(),a+=f-u)}return{...r,feeBreakdown:i,totalDebit:(BigInt(r.totalDebit)+a).toString()}})}))}}async function Sl(e){if(e.options.signal?.aborted)throw new Error("Fee estimation cancelled");if(!d.relayerService.canValidateActionFees())throw new Error("This withdrawal requires signed fee validation. Refresh the quote before submitting.");const[t,n]=await Promise.all([e.signedEstimate??e.estimate(e.batches,e.tokenAddress,e.fundingAmount,{...e.options,feeExecutionMode:"user-transfer",validateFeeCalls:!0}),e.estimate(e.pricingBatches,e.tokenAddress,e.fundingAmount,{...e.options,feeExecutionMode:"backend-transfer",validateFeeCalls:!1})]);if(e.options.signal?.aborted)throw new Error("Fee estimation cancelled");const s=r=>r.intents.flatMap(o=>o.batches.map(i=>`${o.intentIndex}:${i.chainId}`)).sort().join(",");if(!s(n)||s(n)!==s(t))throw new Error("Unable to validate the signed withdrawal fees.");return{intents:n.intents.map(r=>({...r,batches:r.batches.map(o=>{const i=t.intents.find(u=>u.intentIndex===r.intentIndex)?.batches.find(u=>u.chainId===o.chainId);if(!i)throw new Error("Unable to validate the signed withdrawal fees.");const a={...o.feeBreakdown};let l=0n;for(const u of["gasFee","bridgeFee"]){const m=BigInt(a[u]??"0"),f=BigInt(i.feeBreakdown[u]??"0");f>m&&(a[u]=f.toString(),l+=f-m)}return{...o,feeBreakdown:a,totalDebit:(BigInt(o.totalDebit)+l).toString()}})}))}}function of(e,t){const n=e.spicenetFee+(e.bridgeFee??0n);return e.grossAmount<=n?t+e.gasFee+n:Oa((t+e.gasFee)*e.grossAmount,e.grossAmount-n)+2n}async function Al(e){const{requiredNetFunding:t}=e;if(e.feeOnlyAction){const u=e.executionOptions?.userOverride;if(!u||t!==0n)throw new Error("Fee-only estimates require a zero action amount and its embedded executor");let m=1n,f;for(let h=0;h<8;h++){const y=us(await e.buildBatches(m),u,f,{payoutAlreadyGross:!0,expiresAt:e.expiresAt}),g=await e.estimate(er(y,e.tokenDescriptor.chainId,e.fundingToken),e.fundingToken,m,{...e.executionOptions,feeExecutionMode:"backend-transfer"}),x=d.getSupplyFeePreview(g,e.tokenDescriptor);if(!x)throw new Error("The fee service did not return a fee quote for this action");const w=x.gasFee+x.spicenetFee+(x.bridgeFee??0n);if(f&&w+2n<=m)return{preview:{...x,grossAmount:m,netAmount:0n},feeEstimate:g,grossFundingAmount:m};m=(w*110n+99n)/100n+2n,f=g}throw new Error("Fee-only funding did not converge; refresh the fee quote before retrying")}const n=await e.buildBatches(t),s=await e.estimate(n,e.fundingToken,t,e.executionOptions),r=d.getSupplyFeePreview(s,e.tokenDescriptor);if(!r)return{preview:d.getEscrowFreeFeePreview(n,e.tokenDescriptor,t),feeEstimate:s,grossFundingAmount:t};const o=of(r,t),i=u=>r.grossAmount>0n?Oa(u*o,r.grossAmount):u,a=i(r.spicenetFee),l=i(r.bridgeFee??0n);return{preview:{...r,grossAmount:o,netAmount:t,spicenetFee:a,bridgeFee:l,totalFee:r.gasFee+a+l},feeEstimate:s,grossFundingAmount:o}}async function El(e){if(e.balance<=0n)throw new Error("No spendable balance remains after source gas.");let t=e.balance;for(let n=0;n<8;n++){const s=await e.planForAmount(t);if(!s||s.sourceSpendCap===void 0||s.sourceSpendCap<=0n)throw new Error("Max requires a current route and fee estimate.");if(s.sourceSpendCap<=e.balance)return d.formatRawTokenInput(t,e.decimals);const r=t*e.balance/s.sourceSpendCap;if(r<=0n||r>=t)throw new Error("The balance cannot cover this action and its fees.");t=r}throw new Error("Max fees did not converge. Refresh the quote before retrying.")}async function af(e){if(e.isPayMode||e.needsSwap||e.isQuoting||e.pivot||!e.embeddedWalletAddress)return null;const t=e.asset,n=S.getTokenByAddress(e.executionTokenAddress,t.chainId);return!n||t.balance<=0n?null:El({balance:t.balance,decimals:t.decimals,planForAmount:s=>ns({selectedAsset:{asset:t,amount:d.formatRawTokenInput(s,t.decimals)},isPayMode:!1,isNon7702:!1,isFeeInclusiveInput:!1,parsedAmount:Number(d.formatRawTokenInput(s,t.decimals)),currentPaymentAmount:"0",destinationToken:{...n,address:e.executionTokenAddress,chainId:t.chainId},resolvedChainId:t.chainId,resolvedTokenIn:e.executionTokenAddress,executionTokenAddress:e.executionTokenAddress,embeddedWalletAddress:e.embeddedWalletAddress,providerEmbeddedAddress:e.embeddedWalletAddress,address:e.embeddedWalletAddress,isConnected:!0,ready:!0,authenticated:!0,isDirect:!0,isSourceDestToken:!0,needsSwap:!1,isQuoting:!1,resolvedSwap:null,exactOutputSwap:null,buildPayChainBatches:async()=>[],buildSupplyChainBatches:r=>e.buildSupplyChainBatches({...r,actionAmountOverride:s}),estimate:e.estimate,feeExecutionMode:e.feeExecutionMode})})}async function ns(e){const t=await Fl(e);if(!e.externalGasRecipient||!t?.batches?.length)return t;const n=await sf(e,t);if(!n.nativeAmount)return{...t,externalGasReserve:n};const s=await Fl({...e,externalGasReserve:n,initialFeeEstimate:void 0,buildPayChainBatches:async r=>Io(await e.buildPayChainBatches(r),n),buildSupplyChainBatches:async r=>Io(await e.buildSupplyChainBatches({...r,...e.feeExecutionMode!=="user-transfer"&&r?.actionContextOverride?.netAmount!==void 0?{deliveryAmountOverride:r.actionContextOverride.netAmount+n.feeAmount}:{}}),n)});if(!s)return null;if(Cl(n,s.batches??[]),n.fundingSource){const r=n.fundingSource,o=Ba({...s,externalGasReserve:n},e.selectedAsset).find(i=>i.chainId===r.asset.chainId&&d.addressesEqual(i.token,r.token));if(!o||o.amount>r.asset.balance)throw new Error("The gas reserve source cannot cover the action and fees. Refresh the quote.")}return{...s,externalGasReserve:n,preview:{...s.preview,gasFee:s.preview.gasFee+n.feeAmount,totalFee:(s.preview.totalFee??0n)+(e.isPayMode?n.feeAmount:0n),...e.isPayMode?{netAmount:s.preview.netAmount-n.feeAmount}:{}}}}async function Fl(e){const{signal:t,selectedAsset:n,isPayMode:s,isFeeInclusiveInput:r=!1,parsedAmount:o,needsSwap:i,exactOutputSwap:a,isNon7702:l,currentPaymentAmount:u,destinationToken:m,feeExecutionMode:f,resolvedTokenIn:h,embeddedWalletAddress:y,providerEmbeddedAddress:g,resolvedChainId:x,isConnected:w,address:v,ready:C,authenticated:E,isDirect:k,resolvedSwap:F,sourceSwap:O,pivot:I,isQuoting:b,executionTokenAddress:A,buildPayChainBatches:R,buildSupplyChainBatches:B,estimate:q}=e;if(e.feeOnlyAction&&!n&&e.feeFunding?.length!==0)return Ra(e,ns);if(e.feeOnlyAction&&e.actionProceeds&&e.actionProceeds.token.toLowerCase()!==m.address.toLowerCase()||e.feeOnlyAction&&n&&(n.asset._source==="spice"||n.asset._source==="wallet"&&n.asset.chainId===x)&&(h?h.toLowerCase()!==m.address.toLowerCase():n.asset.receiptTokenId||n.asset.chainTokens))return Mr(e);if(e.actionProceeds&&e.feeOnlyAction){const Y=y||g;if(!Y||!C||!E)return null;if(h&&h.toLowerCase()!==m.address.toLowerCase())throw new Error("Action proceeds require a matching fee-token source");return il({proceeds:e.actionProceeds,owner:Y,token:m.address,signal:t,buildBatches:(J,we)=>R({...we,fundingAmountOverride:J}),baseline:()=>ns({...e,actionProceeds:void 0,selectedAsset:n??{amount:"0",asset:{...m,name:m.symbol,balance:0n,balanceFormatted:0,balanceUsd:0,isNative:!1,_source:"spice"}}})})}if(!n?.asset)return null;if(s){if(!y&&!g||o<=0&&!e.feeOnlyAction||i&&!a&&!e.feeOnlyAction)return null;const Y=dn(u,m.decimals),J=h||Dn(n.asset,x)||n.asset.address||m.address,we={chainId:x,tokenAddress:J,symbol:S.getTokenByAddress(J,x)?.symbol??n.asset.symbol,decimals:await es(n.asset,J,x,m)};if(!e.quoteOnly&&(!w||!v||!C||!E))return null;const me=y||g||v,xe=(i?a?.amountInMax??0n:Y)+(e.externalGasReserve?.feeAmount??0n);if(xe===0n&&!e.feeOnlyAction)return null;const Ce=I?await Il({user:me,pivot:I,buildSupplyChainBatches:ce=>R({...ce,sourceGasSkimOverride:1n}),signal:t}):0n,ne=Date.now();let _=await Al({requiredNetFunding:xe,expiresAt:e.expiresAt,feeOnlyAction:e.feeOnlyAction,buildBatches:ce=>R({fundingAmountOverride:ce,sourceGasSkimOverride:Ce}).then(X=>us(X,me,void 0,{requestTimestampMs:ne,expiresAt:e.expiresAt})),fundingToken:J,estimate:q,executionOptions:{userOverride:me,useCustomTransfers:!0,feeExecutionMode:f,signal:t},tokenDescriptor:we});if(!_.preview)return null;let de=0n,W,je,Ae,z=[],Q=!1;for(let ce=0;ce<8;ce++){if(t?.aborted)throw new Error("Fee estimation cancelled");if(Ae=void 0,z=us(await R({fundingAmountOverride:_.grossFundingAmount,sourceGasSkimOverride:Ce,onSourceSpend:ve=>{de=ve},onSwap:ve=>{Ae=ve},onSourceAllocation:ve=>{W=ve},onActionCalls:ve=>{je=ve}}),me,_.feeEstimate,{payoutAlreadyGross:!0,requestTimestampMs:ne,expiresAt:e.expiresAt}),W){const ve=d.getSupplyFeePreview(_.feeEstimate,we);if(!ve)throw new Error("The action quote is unavailable.");const We=yo(x,J,[{recipient:S.SPICE_GAS_FEE_RECIPIENT,amount:ve.gasFee+(ve.bridgeFee??0n)},{recipient:S.SPICE_PLATFORM_FEE_RECIPIENT,amount:ve.spicenetFee}]).calls;z=er(z,x,J);const be=[...z].reverse().findIndex(ue=>ue.domain!=="spicenet"&&ue.chainId===x),Pe=be<0?-1:z.length-be-1;if(Pe<0)throw new Error("The action quote is unavailable.");z[Pe]={...z[Pe],calls:[...We,...z[Pe].calls]}}if(e.feeOnlyAction){Q=!0;break}const X=await q(z,J,_.grossFundingAmount,{userOverride:me,useCustomTransfers:!0,feeExecutionMode:f,signal:t}),oe=f==="user-transfer"?So(X,_.feeEstimate):X,Oe=d.getSupplyFeePreview(oe,we)??d.getEscrowFreeFeePreview(z,we,xe);if(!Oe)return null;const Ne=xe+Oe.gasFee+Oe.spicenetFee+(Oe.bridgeFee??0n),he=d.getSupplyFeePreview(_.feeEstimate,we),Se=(he?.gasFee??0n)===Oe.gasFee&&(he?.spicenetFee??0n)===Oe.spicenetFee&&(he?.bridgeFee??0n)===(Oe.bridgeFee??0n),Te=_.grossFundingAmount===Ne&&Se;if(_={feeEstimate:oe,grossFundingAmount:Ne,preview:{...Oe,grossAmount:Ne,netAmount:xe}},Te){Q=!0;break}}if(!Q)throw new Error("Payment fees did not converge. Refresh the quote before submitting.");if(!_.preview)return null;const se=I?Lt(Ce,I.source.decimals,I.destination.decimals,"ceil"):0n;return{..._,batches:z,sourceSpendCap:de,sourceAllocation:W,actionDefinition:je,destinationAmount:Y,actionOutputCredits:ho(x,m.address,Ae),preview:{..._.preview,grossAmount:_.preview.grossAmount+se,gasFee:_.preview.gasFee+se,totalFee:(_.preview.totalFee??0n)+se},...I?{sourceGasSkim:Ce}:{}}}if(o<=0||!y)return null;const j=y||g;if(I&&!O)return null;const P=Fa({isPayMode:s,selectedAsset:n,resolvedChainId:x,sourceSwap:O,pivot:I});if(!(!s&&!l&&n.asset?._source==="wallet"&&n.asset.chainId!==x)&&!k&&!F&&!b||b)return null;let D=await B();if(D.length===0)return null;const M={chainId:x,tokenAddress:A,symbol:S.getTokenByAddress(A,x)?.symbol??(n.asset.chainId===x&&d.addressesEqual(n.asset.address,A)?n.asset.symbol:m.symbol),decimals:await es(n.asset,A,x,m)},L=P&&e.initialFeeEstimate!==void 0&&e.initialSourceGasSkim!==void 0,T=P?L?e.initialSourceGasSkim:await Il({user:j,pivot:I,buildSupplyChainBatches:B,signal:t}):0n;P&&T>0n&&(D=await B({sourceGasSkimOverride:T}));const H=P?Lt(r?fl(O,T):O.amountOutMinimum,I.source.decimals,I.destination.decimals,"floor"):Lt(dn(n.amount,n.asset.decimals),n.asset.decimals,M.decimals,"floor"),V=e.quotedInclusivePlatformFee&&f==="user-transfer",te={userOverride:j,useCustomTransfers:!0,feeExecutionMode:f,signal:t,...P?{skipUserFundingPreflight:!0}:{}};let Z=H,K=e.initialFeeEstimate??await q(D,A,Z,V?{...te,feeExecutionMode:"backend-transfer"}:te);V&&!e.initialFeeEstimate&&(K=So(K,{intents:[]},100n));for(let Y=0;Y<8;Y++){if(t?.aborted)throw new Error("Fee estimation cancelled");const J=d.getSupplyFeePreview(K,M)??d.getEscrowFreeFeePreview(D,M,Z);if(!J)return null;const we=ja(J,H,r,f,e.externalGasReserve?.feeAmount,e.quotedInclusivePlatformFee);Z=we.grossAmount;let me,xe,Ce,ne,_,de;const W=await B({fundingAmountOverride:Z,sourceGasSkimOverride:T,actionContextOverride:we,onDestinationAmount:X=>{me=X},onSourceSpend:X=>{xe=X},onSourceAllocation:X=>{Ce=X},onSwap:(X,oe)=>{ne=X,_=oe},onActionCalls:X=>{de=X}}),je=V?er(await B({fundingAmountOverride:Z,sourceGasSkimOverride:T,actionContextOverride:we,deliveryAmountOverride:we.netAmount,withdrawalAmountOverride:we.netAmount}).then(X=>{if(X.length!==W.length)throw new Error("The withdrawal fee route changed. Refresh the quote before submitting.");return X.map((oe,Oe)=>{const Ne=W[Oe];if(!Ne||Ne.chainId!==oe.chainId||Ne.domain!==oe.domain)throw new Error("The withdrawal fee route changed. Refresh the quote before submitting.");return oe.domain==="spicenet"?oe:{...oe,calls:Ne.calls}})}),x,A):void 0,[Ae,z]=await Promise.all([je?Sl({estimate:q,batches:W,pricingBatches:je,tokenAddress:A,fundingAmount:Z,options:te}):q(W,A,Z,{...te,validateFeeCalls:e.initialFeeEstimate!==void 0}),L?d.relayerService.estimateBatchGas({user:j,outputToken:I.source.address,stepIndex:0,chainBatches:[W[0]],signal:t}):void 0]);if(z&&!(f==="user-transfer"?d.feeAmountsWithinTolerance(T,z.gasFee,e.feeToleranceBps):z.gasFee===T))throw new Error("Source gas changed. Prepare a fresh fee quote.");const Q=f==="user-transfer"?So(Ae,K,V?100n:0n):Ae,se=d.getSupplyFeePreview(Q,M)??d.getEscrowFreeFeePreview(W,M,Z);if(!se)return null;const ce=ja(se,H,r,f,e.externalGasReserve?.feeAmount,e.quotedInclusivePlatformFee);if(JSON.stringify(we,(X,oe)=>typeof oe=="bigint"?oe.toString():oe)===JSON.stringify(ce,(X,oe)=>typeof oe=="bigint"?oe.toString():oe)||f==="user-transfer"&&(!V||we.feeBreakdown.spicenetFee===ce.feeBreakdown.spicenetFee)&&d.feeBreakdownsWithinTolerance(we.feeBreakdown,ce.feeBreakdown,e.feeToleranceBps)){const X=f==="user-transfer"?J:se,oe=P?Lt(T,I.source.decimals,I.destination.decimals,"ceil"):0n;return{batches:W,feePricingBatches:je,fundingAmount:Z,actionContext:we,sourceSpendCap:xe,sourceAllocation:Ce,destinationAmount:me,destinationSwap:ne,swapInputAmount:_,actionDefinition:de,actionOutputCredits:ho(x,m.address,ne),feeEstimate:f==="user-transfer"?K:Q,sourceGasSkim:T,preview:{...X,grossAmount:Z+oe,netAmount:we.netAmount,gasFee:X.gasFee+oe,spicenetFee:we.feeBreakdown.spicenetFee,totalFee:we.combinedFeeAmount+oe}}}K=Q,D=W}throw new Error("Fees did not converge. Refresh the quote before submitting.")}class Ao extends Error{constructor(t){super("Amount is too small to cover fees. Increase the amount and retry."),this.preview=t,this.name="FeeShortfallError"}}function ja(e,t,n,s,r=0n,o=!1){const i=BigInt(e.feePolicy?.platformBps??pa),a=e.feePolicy?{feePolicy:e.feePolicy}:{},l=e.gasFee+(e.bridgeFee??0n)+r;if(e.gasQuoteSource==="static_zero"&&r===0n)return{...a,grossAmount:t,netAmount:t,combinedFeeAmount:0n,feeExecutionMode:s??"backend-transfer",feeBreakdown:{gasFee:0n,bridgeFee:0n,spicenetFee:0n}};if(n&&o){const f=l+e.spicenetFee;if(t<=f)throw new Ao({...e,grossAmount:t,netAmount:0n,totalFee:f});return{...a,grossAmount:t,netAmount:t-f,combinedFeeAmount:f,feeExecutionMode:s??"backend-transfer",feeBreakdown:{gasFee:e.gasFee,bridgeFee:e.bridgeFee??0n,spicenetFee:e.spicenetFee}}}const u=n?d.splitFeeInclusiveAmount(t,l,i):null;if(u&&!u.coversFees)throw new Ao({...e,grossAmount:t,netAmount:0n,spicenetFee:0n,totalFee:l});const m=u?.spicenetFee??(s==="user-transfer"?d.calculateBpsFee(t,i):e.spicenetFee);return{...a,grossAmount:u?.grossAmount??t+m+l,netAmount:u?.netAmount??t,combinedFeeAmount:m+l,feeExecutionMode:s??"backend-transfer",feeBreakdown:{gasFee:e.gasFee,bridgeFee:e.bridgeFee??0n,spicenetFee:m}}}async function cf(e,t){if(e.feeQuote?.sourceAllocation){e.validateFeeQuote?.();const l=e.feeQuote.sourceAllocation;vo(l,l.positions.map(u=>u.asset),e.embeddedWalletAddress??e.providerEmbeddedAddress??void 0,e.resolvedChainId);return}const n=e.selectedAsset?.asset;if(!n||n?._source!=="wallet")return;const s=Dn(n,e.resolvedChainId);if(!s||!d.addressesEqual(s,e.executionTokenAddress))return;const r=await es(n,e.executionTokenAddress,e.resolvedChainId,e.destinationToken),o=sr(t,r,n.decimals);if(o<=n.balance)return;const i=N.formatUnits(o,n.decimals),a=N.formatUnits(n.balance,n.decimals);throw new Error(`Insufficient ${n.symbol} for this total amount. Required ${i} ${n.symbol}; available ${a} ${n.symbol}.`)}function lf(e){const t=S.getTokenByAddress(e.executionTokenAddress,e.resolvedChainId);return{chainId:e.resolvedChainId,tokenAddress:e.executionTokenAddress,symbol:t?.symbol??e.destinationToken.symbol,decimals:t?.decimals??e.destinationToken.decimals}}function df(e){const t=e.selectedAsset.asset,n=dn(e.selectedAsset.amount,t.decimals);if(n<=t.balance)return n;throw new Error(`Insufficient ${t.symbol} for this total amount. Required ${N.formatUnits(n,t.decimals)} ${t.symbol}; available ${N.formatUnits(t.balance,t.decimals)} ${t.symbol}.`)}function Tl(e,t,n,s){const r=lf(t),o=d.getSupplyFeePreview(e,r)??d.getEscrowFreeFeePreview(s,r,n);if(o)return ja(o,n,!!t.isFeeInclusiveInput,t.feeExecutionMode,0n,t.quotedInclusivePlatformFee)}function Rl(e,t,n){let s=0n,r=0n;const o=n.toLowerCase();for(const i of e)if(i.chainId===t){for(const a of i.calls??[])if(a.to.toLowerCase()===o)try{const l=N.decodeFunctionData({abi:N.erc20Abi,data:a.data});if(l.functionName!=="transfer")continue;const u=l.args[0].toLowerCase(),m=l.args[1];u===S.SPICE_PLATFORM_FEE_RECIPIENT.toLowerCase()?s+=m:u===S.SPICE_GAS_FEE_RECIPIENT.toLowerCase()&&(r+=m)}catch{continue}}return{spicenetFee:s,gasFee:r}}function uf(e,t,n,s){const r=t.feeExecutionMode==="user-transfer"&&t.needsSwap&&t.resolvedTokenIn?t.resolvedTokenIn:t.executionTokenAddress,o=Rl(e,t.resolvedChainId,r);return o.spicenetFee===0n&&n.feeBreakdown.spicenetFee>0n||o.gasFee===0n&&n.feeBreakdown.gasFee>0n?!1:d.feeAmountsWithinTolerance(o.spicenetFee,n.feeBreakdown.spicenetFee,t.feeToleranceBps)&&d.feeAmountsWithinTolerance(o.gasFee,n.feeBreakdown.gasFee,t.feeToleranceBps)&&d.feeAmountsWithinTolerance(s.feeBreakdown.bridgeFee,n.feeBreakdown.bridgeFee,t.feeToleranceBps)}function pf(e,t,n){return e?d.amountsWithinBps(e.grossAmount,t.grossAmount,100n)&&d.feeBreakdownsWithinTolerance(e.feeBreakdown,t.feeBreakdown,n):!1}function ff(e,t){const n=S.getTokenByAddress(t,e.resolvedChainId);return{chainId:e.resolvedChainId,tokenAddress:t,symbol:n?.symbol??e.selectedAsset?.asset.symbol??"",decimals:n?.decimals??e.selectedAsset?.asset.decimals??e.destinationToken.decimals}}async function mf(e,t){const n=e.feeQuote;return n?.feeEstimate&&n.grossFundingAmount!==void 0?{grossFundingAmount:n.grossFundingAmount,feeEstimate:n.feeEstimate}:Al({...t,feeOnlyAction:e.feeOnlyAction,estimate:e.execution.estimate,tokenDescriptor:ff(e,t.fundingToken)})}function Bl(e,t){const n=t instanceof Error?t:new Error(String(t));if(n.name==="AbortError"||n instanceof d.SpiceflowError&&n.code==="ABORT"){e.ui.setStep("idle");return}const s=n.message||"Transaction failed";e.ui.setStep("error"),e.ui.setStatusMsg(s),e.ui.setError(s)}function Ol(e,t){const n=d.sanitizeError(t,"Payment failed. Please try again.");e.ui.setError(n),e.ui.setPaymentResult({status:"failed",error:n})}async function jl(e){e.ui.setIsExecuting(!0),e.ui.setError(null),e.ui.setStep("executing"),e.ui.setStatusMsg("Confirm the transaction in your external wallet..."),e.ui.setTxHash(null),e.isPayMode&&(e.ui.setShowStatusPanel(!0),e.ui.setPaymentResult({status:"processing"}));try{if(e.validateFeeQuote?.(),!e.feeQuote?.batches||!e.feeQuote.actionDefinition)throw new Error("Review the direct action plan before submitting.");const t=await e.execution.execute(e.feeQuote.batches,e.destinationToken.address,0n,e.execution.onProgress);e.ui.setTxHash(t),e.ui.setStep("success"),e.ui.setStatusMsg("Transaction confirmed"),e.isPayMode&&e.ui.setPaymentResult({status:"success",txHash:t})}catch(t){e.isPayMode?Ol(e,t):Bl(e,t)}finally{e.ui.setIsExecuting(!1)}}async function Dl(e,t,n){e.validateFeeQuote?.();const s=e.feeQuote;if(!s.batches||s.sourceSpendCap===void 0||!s.fundingSource&&s.preview.feePayer!=="relayer")throw new Error("Refresh the action before submitting.");const r=s.fundedFeeToken,o=s.grossFundingAmount??0n,i=pl({...e,signal:n,feeOnlyAction:!0,destinationToken:r,actionProceeds:e.actionProceeds??{token:s.fundingSource?.token??r.address,resolve:async()=>s.proceedsAvailable??0n}},r.address,o);return e.execution.execute(s.batches,s.fundingConversion?.tokenIn??s.fundingSource?.token??r.address,o,t,n,{...i,userOverride:e.embeddedWalletAddress||e.providerEmbeddedAddress,useCustomTransfers:!0,feeExecutionMode:"backend-transfer",skipPreSubmitFeeEstimate:!0})}async function Nl(e){if(!e.selectedAsset?.asset&&!e.feeQuote?.fundingPlan||e.parsedAmount<=0){e.ui.setError("Select an asset and enter an amount");return}if(e.isInsufficientBalance){e.ui.setError("Insufficient balance");return}if(e.directExternalAction)return jl(e);if(!e.embeddedWalletAddress){e.ui.setError("Wallet not ready");return}e.ui.setIsExecuting(!0),e.ui.setError(null),e.ui.setStep("signing-delegation"),e.ui.setStatusMsg("Building transaction..."),e.ui.setTxHash(null),e.refs.spiceDepositSubmittedRef.current=!1;const t=new AbortController;e.refs.abortControllerRef.current=t;try{const n=e.embeddedWalletAddress||e.providerEmbeddedAddress,s=e.feeQuote;if(s?.fundingPlan){e.validateFeeQuote?.();const g=s.fundingPlan;if(!s.batches?.length||!s.feeEstimate||s.fundingAmount===void 0)throw new Error("Review the combined funding plan before submitting.");const x=[...new Set(g.sources.filter(E=>E.asset.location==="embedded").map(E=>E.chainId))];for(const[E,k]of x.entries()){const F=g.sources.filter(A=>A.asset.location==="embedded"&&A.chainId===k),O=s.batches[E];if(!O||O.chainId!==k)throw new Error("The accepted source funding vector changed.");const I=await d.relayerService.estimateBatchGas({user:g.owner,outputToken:F[0].pivotToken.address,stepIndex:0,chainBatches:[O]});e.validateFeeQuote?.();const b=F.reduce((A,R)=>A+R.gasFeeAmount,0n);if(I.gasFee<0n||!d.feeAmountsWithinTolerance(b,I.gasFee,e.feeToleranceBps))throw new Error("Source funding fees changed. Refresh before submitting this purchase.")}const w={chainId:g.token.chainId,tokenAddress:g.token.address,symbol:g.token.symbol,decimals:g.token.decimals},v=d.getSupplyFeePreview(s.feeEstimate,w);if(!v)throw new Error("The accepted purchase fees are unavailable.");const C=await e.execution.execute(s.batches,g.token.address,s.fundingAmount,e.execution.onProgress,t.signal,{userOverride:g.owner,useCustomTransfers:!0,skipUserFundingPreflight:!0,feeExecutionMode:"user-transfer",adjustBatchesForEstimate:({feeEstimate:E})=>{const k=d.getSupplyFeePreview(E,w);if(!k||!d.feeBreakdownsWithinTolerance(v,k,e.feeToleranceBps))throw new Error("Transaction fees changed. Refresh the quote before submitting.");return null}});e.ui.setTxHash(C),e.ui.setStep("success"),e.ui.setStatusMsg("Transaction confirmed");return}if(s?.fundedFeeToken){const g=await Dl(e,e.execution.onProgress,t.signal);e.ui.setTxHash(g),e.ui.setStep("success"),e.ui.setStatusMsg("Transaction confirmed");return}const r=Fa(e);r&&df(e);const o=e.feeQuote?.batches?e.feeQuote:await ns({...e,feeExecutionMode:e.feeExecutionMode,isDirect:!e.needsSwap,isQuoting:!1,resolvedSwap:null,buildPayChainBatches:e.execution.buildPayChainBatches,buildSupplyChainBatches:e.execution.buildSupplyChainBatches,estimate:e.execution.estimate});if(!o?.batches||o.fundingAmount===void 0||!o.actionContext)throw new Error("A current action plan is required. Refresh the quote before submitting.");const i=e.isFeeInclusiveInput?o.actionContext.grossAmount:o.actionContext.netAmount;let a=o.batches;const l=a.some(g=>g.tokenTransfers?.length),u={userOverride:n,useCustomTransfers:l,feeExecutionMode:e.feeExecutionMode,...r?{skipUserFundingPreflight:!0}:{}},m=o.fundingAmount,f=o.actionContext;await cf(e,m);const h=f,y=await e.execution.execute(a,e.executionTokenAddress,l?m:0n,e.execution.onProgress,t.signal,e.feeExecutionMode==="user-transfer"?{...u,skipUserFundingPreflight:!0,adjustBatchesForEstimate:async({feeEstimate:g,chainBatches:x})=>{if(o.feePricingBatches){e.validateFeeQuote?.();const E=await Sl({estimate:e.execution.estimate,batches:x,pricingBatches:o.feePricingBatches,tokenAddress:e.executionTokenAddress,fundingAmount:m,options:{...u,signal:t.signal},signedEstimate:g});e.validateFeeQuote?.();const k=Tl(E,e,i,x),F=h.feeBreakdown,O=Rl(x,e.resolvedChainId,e.executionTokenAddress);if(!k||!d.feeBreakdownsWithinTolerance(F,k.feeBreakdown,e.feeToleranceBps)||O.spicenetFee!==F.spicenetFee||O.gasFee!==F.gasFee+F.bridgeFee)throw new Error("Transaction fees changed. Refresh the quote before submitting.");return null}const w=Tl(o.feeEstimate?So(g,o.feeEstimate):g,e,i,x);if(!w)throw new Error("Unable to validate the accepted fees. Refresh the quote before submitting.");const v=pf(h,w,e.feeToleranceBps),C=uf(x,e,w,h);if(v||C)return null;throw new Error("Transaction fees changed. Refresh the quote before submitting.")}}:{...u,skipPreSubmitFeeEstimate:!0});e.ui.setTxHash(y),e.ui.setStep("success"),e.ui.setStatusMsg("Deposit confirmed")}catch(n){Bl(e,n)}finally{e.ui.setIsExecuting(!1)}}async function Ml(e){if(e.parsedAmount<0){e.ui.setError("Enter a valid payment amount");return}const t=e.parsedAmount===0;if(!e.selectedAsset?.asset&&!t){e.ui.setError("Select a payment source");return}if(e.isInsufficientBalance){e.ui.setError("Insufficient balance");return}if(e.parsedAmount>0&&e.needsSwap&&!e.exactOutputSwap){e.ui.setError("Swap quote not available. Try a different asset.");return}if(e.directExternalAction)return jl(e);const n=wl(e)&&!t,s=n?e.feeQuote?.sourceGasSkim??0n:0n,r=i=>e.execution.buildPayChainBatches(n?{...i,sourceGasSkimOverride:s}:i);if(!e.isConnected||!e.address){e.ui.setError("Please connect your wallet to continue");return}if(!e.ready||!e.authenticated){e.ui.setError(`Please authenticate with ${e.provider||"wallet provider"} to continue`);return}e.ui.setIsExecuting(!0),e.ui.setError(null),e.ui.setShowStatusPanel(!0),e.ui.setPaymentResult({status:"processing"});const o=new AbortController;e.refs.abortControllerRef.current=o;try{if(e.feeQuote?.fundedFeeToken){const F=await Dl(e,O=>{e.execution.onProgress(O),O.txHash&&(e.ui.setTxHash(O.txHash),e.ui.setPaymentResult({status:"processing",txHash:O.txHash}))},o.signal);e.ui.setPaymentResult(O=>({status:"success",txHash:O?.txHash||F}));return}const i=dn(e.currentPaymentAmount,e.destinationToken.decimals),a={useCustomTransfers:!0,feeExecutionMode:e.feeExecutionMode,...n?{skipUserFundingPreflight:!0}:{}};if(t&&!e.feeOnlyAction){const F=await r(),O=await e.execution.execute(F,e.executionTokenAddress,0n,I=>{e.execution.onProgress(I),I.txHash&&(e.ui.setPaymentResult(b=>({...b??{status:"processing"},txHash:I.txHash})),e.ui.setTxHash(I.txHash))},o.signal,a);e.ui.setPaymentResult(I=>({status:"success",txHash:I?.txHash||O}));return}const l=e.selectedAsset?.asset,u=e.feeQuote?.fundingSource,m=e.feeQuote?.preview.feePayer==="relayer";if(!l&&!e.actionProceeds&&!u&&!m)throw new Error("Select a payment source");const f=e.feeQuote?.fundingConversion?.tokenIn||u?.token||e.resolvedTokenIn||l?.address||e.destinationToken.address,h=e.needsSwap?e.exactOutputSwap?.amountInMax??0n:i,y=e.embeddedWalletAddress||e.providerEmbeddedAddress||e.address,g=m||!!e.feeQuote?.fundingConversion||!!u&&(u.kind!=="balance"||u.asset?._source==="wallet"),{grossFundingAmount:x,feeEstimate:w}=g?{grossFundingAmount:e.feeQuote.grossFundingAmount??0n,feeEstimate:void 0}:await mf(e,{requiredNetFunding:h,buildBatches:F=>e.execution.buildPayChainBatches({fundingAmountOverride:F}).then(O=>us(O,y)),fundingToken:f,executionOptions:a});let v=e.feeQuote?.fundingBatches??e.feeQuote?.batches??us(await r({fundingAmountOverride:x}),y,e.actionProceeds?void 0:w,{payoutAlreadyGross:!0});const C=pl(e,e.feeQuote?.fundingConversion?.tokenOut??f,x);C.prepareForSigning&&(v=await C.prepareForSigning(v));const E=v.some(F=>F.tokenTransfers?.length),k=await e.execution.execute(v,f,E?x:0n,F=>{e.execution.onProgress(F),F.txHash&&(e.ui.setPaymentResult(O=>({...O,txHash:F.txHash})),e.ui.setTxHash(F.txHash))},o.signal,{...a,...C,skipPreSubmitFeeEstimate:!0});e.ui.setPaymentResult(F=>({status:"success",txHash:F?.txHash||k}))}catch(i){Ol(e,i)}finally{e.ui.setIsExecuting(!1)}}async function Pl(e){const{quote:t,recipient:n,chainId:s,token:r}=e,o=t.batches?Ul(t.batches,r,s,n):0n;if(o<=0n)throw new Error("The route does not deliver the action amount to the external wallet.");const i={userAddress:n,executorAddress:n,beneficiary:e.beneficiary??n,chainId:s,destinationToken:r,feeToken:r,grossAmount:o,netAmount:o,combinedFeeAmount:0n,feeExecutionMode:e.feeExecutionMode,feeBreakdown:{spicenetFee:0n,gasFee:0n,bridgeFee:0n}},a=await e.buildCalls(o,i);if(!a.length)throw new Error("No action calls configured.");return{amount:o,context:i,calls:a.map(l=>({...l}))}}function hf(e,t,n){const s=[],r=(o,i,a)=>{a>0n&&s.push(S.isNativeToken(o)?{to:i,value:a,data:"0x"}:{to:o,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[i,a]})})};return t.feeExecutionMode==="user-transfer"&&t.feeBreakdown&&(r(t.feeToken??t.destinationToken,S.SPICE_PLATFORM_FEE_RECIPIENT,t.feeBreakdown.spicenetFee),r(t.feeToken??t.destinationToken,S.SPICE_GAS_FEE_RECIPIENT,t.feeBreakdown.gasFee+t.feeBreakdown.bridgeFee)),r(t.destinationToken,n,e),s}function Ul(e,t,n,s){let r=0n;for(const o of e)if(o.chainId===n){for(const i of o.calls)if(d.addressesEqual(i.to,t))try{const a=N.decodeFunctionData({abi:N.erc20Abi,data:i.data});a.functionName==="transfer"&&d.addressesEqual(a.args[0],s)&&(r+=a.args[1])}catch{}}return r}async function gf(e){if(!/^0x[0-9a-f]{64}$/i.test(e.hash))throw new Error("The external delivery receipt is unavailable.");const t=d.getClientForChain(e.chainId),n=await t.getTransactionReceipt({hash:e.hash});if(n.status!=="success"||!d.addressesEqual(n.transactionHash,e.hash))throw new Error("The external delivery receipt was not successful.");let s=0n;for(const r of n.logs)if(d.addressesEqual(r.address,e.token))try{const o=N.decodeEventLog({abi:N.erc20Abi,eventName:"Transfer",data:r.data,topics:r.topics});d.addressesEqual(o.args.to,e.recipient)&&d.addressesEqual(o.args.from,e.sender)&&(s+=o.args.value)}catch{}if(s!==e.amount)throw new Error("The received external amount does not match the accepted action.");if(await t.readContract({address:e.token,abi:N.erc20Abi,functionName:"balanceOf",args:[e.recipient]})<e.amount)throw new Error("The external wallet no longer holds the delivered action amount.")}async function Wl(e,t,n){let s=null;try{const r=await e.request({method:"eth_chainId"});s=parseInt(r,16)}catch{s=null}s!==t&&(n?.(),await d.ensureWalletOnChain(e,t))}function Da(e){let t=e;const n=new Set;for(;t&&typeof t=="object"&&!n.has(t);){if(n.add(t),t.code===4001)return!0;t=t.cause}return!1}async function Na(e){const t=e.provider??await e.wallet?.getEthereumProvider();if(!t)throw new Error("External wallet provider not available");await Wl(t,e.chainId,e.onSwitch);const n=await t.request({method:"eth_accounts"});if(!Array.isArray(n)||!n.some(r=>typeof r=="string"&&r.toLowerCase()===e.account.toLowerCase()))throw new Error("The connected source wallet changed. Reconnect the selected account before funding.");const s=d.getChainConfig(e.chainId)?.viemChain;return{extWc:N.createWalletClient({account:e.account,chain:s,transport:N.custom(t)}),viemChain:s}}async function ql(e,t,n){const s=Date.now()+1e4;for(;Date.now()<s;){let r,o;try{r=await Promise.race([Promise.all([t.getBlockNumber({cacheTime:0}),e.request({method:"eth_blockNumber"}).then(BigInt)]),new Promise(i=>{o=setTimeout(()=>i(null),Math.max(0,s-Date.now()))})])}catch{return}finally{clearTimeout(o)}if(!r||Date.now()>=s||r.every(i=>i>=n))return;await new Promise(i=>setTimeout(i,Math.min(250,s-Date.now())))}}async function wf(e){let t;for(const[n,s]of e.calls.entries()){await e.observer?.onSending?.(n);let r;try{r=await e.extWc.sendTransaction({to:s.to,data:s.data,value:s.value,chain:e.viemChain,...e.nonce!==void 0?{nonce:e.nonce}:{}})}catch(a){throw Da(a)&&e.observer?.onRejected?.(n),a}await e.observer?.onSubmitted?.(n,r);const o=await mo({client:e.client,hash:r,call:s,onRepriced:()=>{},onCancelled:()=>e.observer?.onReverted?.(n,r)});o.hash!==r&&await e.observer?.onSubmitted?.(n,o.hash),r=o.hash;const i=o.receipt;if(i.status!=="success")throw e.observer?.onReverted?.(n,r),new Error(e.errorMessage);await ql(e.extWc,e.client,i.blockNumber),e.observer?.onConfirmed?.(n,r),t=r}return t}async function Ll(e){const t=await e.client.estimateFeesPerGas(),n=t.maxFeePerGas??t.gasPrice;if(typeof n!="bigint"||n<=0n)throw new Error("Network gas could not be priced.");let s=0n;for(const r of e.calls){const o=await e.client.estimateGas({account:e.account,...r});s+=(o*n*120n+99n)/100n}return s}async function Ma(e){const{definition:t,account:n,chainId:s}=e,{calls:r}=t;if(!d.addressesEqual(t.context.executorAddress,n)||t.context.chainId!==s||!r.length)throw new Error("The direct action no longer matches its wallet or chain.");const o=d.getClientForChain(s);let i;const a=e.originalAction,l=f=>{if(f.chainId!==s||!d.addressesEqual(f.executor,n)||f.calls.length!==r.length||f.calls.some((h,y)=>!d.addressesEqual(h.to,r[y].to)||h.data.toLowerCase()!==r[y].data.toLowerCase()||BigInt(h.value)!==r[y].value))throw Error("The original external action no longer matches its accepted calls.");return f};let u=a?l(await a.service.getExternalExecution(a.actionId)):void 0,m=u?.executionMode==="wallet-envelope";if(a?.resume&&m)throw Error("Wallet-envelope recovery is unavailable. Check wallet activity; this original action will not be resent.");for(const[f,h]of r.entries()){if(await e.assertCurrent(),u&&!m){const C=u.calls[f];if(C.status==="confirmed"&&C.transactionHash){i=C.transactionHash;continue}if(C.status!=="unsubmitted"&&!(a?.resume&&["prepared","submitted","reverted"].includes(C.status)))throw Error(C.status==="reverted"||C.status==="conflict"?"The original wallet action failed or its nonce was used by another transaction.":"The original wallet transaction is being reconciled. Check its status before continuing.")}let y;if(a&&!m){if(u=l(await a.service.prepareExternalExecutionCall(a.actionId,f,a.resume&&u?.calls[f]?.status==="reverted"?u.calls[f].transactionHash??void 0:void 0)),m=u.executionMode==="wallet-envelope",a.resume&&m)throw Error("Wallet-envelope recovery is unavailable. Check wallet activity; this original action will not be resent.");a.resume&&u.calls[f]?.status==="reverted"&&u.calls[f]?.transactionHash&&(u=l(await a.service.prepareExternalExecutionCall(a.actionId,f,u.calls[f].transactionHash)));const C=u.calls[f];if(!m&&C.status==="confirmed"&&C.transactionHash){i=C.transactionHash;continue}if(!m&&C.status!=="prepared")throw Error("The original wallet call could not be prepared.");if(u.executionMode!=="wallet-envelope"){if(C.nonce===null)throw Error("The original wallet nonce is unavailable.");y=C.nonce;const[E,k]=await Promise.all([o.getTransactionCount({address:n,blockTag:"latest"}),o.getTransactionCount({address:n,blockTag:"pending"})]);if(E!==y||k!==y)throw Error("The original wallet nonce is pending or changed. Check its status before continuing.")}await e.assertCurrent()}const[g,x]=await Promise.all([Ll({client:o,account:n,calls:[h]}),o.getBalance({address:n})]);if(x<h.value+g)throw new Error("The external wallet has insufficient native balance for this transaction and network gas.");await e.assertCurrent();const{extWc:w,viemChain:v}=await Na({wallet:e.wallet,account:n,chainId:s});if(await e.assertCurrent(),i=await wf({extWc:w,viemChain:v,client:o,calls:[h],errorMessage:"The external transaction reverted. Retry the unfinished action when ready.",...y!==void 0?{nonce:y}:{},...a?{observer:{onSubmitted:async(C,E)=>{try{u=l(await a.service.recordExternalExecutionHash(a.actionId,f,E))}catch(k){if(u?.executionMode!=="wallet-envelope")throw k}}}}:{}}),a&&i){try{u=l(await a.service.recordExternalExecutionHash(a.actionId,f,i))}catch(C){if(u?.executionMode!=="wallet-envelope")throw C}if(u?.executionMode!=="wallet-envelope"&&u?.calls[f]?.status!=="confirmed")throw Error("The original wallet transaction is confirmed on chain and awaiting backend reconciliation.")}}if(!i)throw new Error("The direct action has no confirmed receipt.");return i}function Pr(e,t,n){if(!d.addressesEqual(e.owner,t)||e.balanceError||e.balanceStatus==="stale"||e._wrapFromNative||!Number.isInteger(e.decimals)||e.decimals<0||e.decimals>36)return!1;if(e.location==="embedded"&&e._source==="wallet"){const r=Ds(e.chainId);return!!r&&(!d.addressesEqual(e.address,r.address)||e.decimals===r.decimals)}if(e.location!=="rollup"||e._source!=="spice"||!e.receiptTokenId||!e.chainTokens||Array.isArray(e.chainTokens))return!1;const s=Object.entries(e.chainTokens).filter(([r])=>In(r)?.chainId===n.chainId);return s.length===1&&d.addressesEqual(In(s[0][0])?.address,n.address)&&(s[0][1].decimals===void 0||s[0][1].decimals===n.decimals)}async function zl(e){const{owner:t,token:n}=e,s=Ds(n.chainId);if(!s||!d.addressesEqual(s.address,n.address)||s.decimals!==n.decimals||e.destinationToken.chainId!==n.chainId)throw new Error("Combined funding requires the destination chain's supported USDC token.");if(e.budget!=="max"&&e.budget<=0n)throw new Error("Enter a positive purchase budget.");const r=()=>{if(e.signal?.aborted)throw new Error("Fee estimation cancelled")},o=(I,b=0n,A=0n,R=0n)=>new Ao({symbol:n.symbol,decimals:n.decimals,grossAmount:I,netAmount:0n,gasFee:b,spicenetFee:A,bridgeFee:R,totalFee:b+A+R,gasQuoteSource:"estimated"}),i=new Set,a=new Set,l=[],u=I=>I.location==="rollup"?0:d.addressesEqual(I.address,Ds(I.chainId)?.address)?I.chainId===n.chainId?1:3:I.chainId===n.chainId?2:4,m=[...e.sources].sort((I,b)=>u(I.asset)-u(b.asset));let f=0n;for(const I of m){r();const{asset:b,availableAmount:A,reservedAmount:R}=I,B=ye(b),q=b.location==="rollup"?`${t.toLowerCase()}:rollup:${b.receiptTokenId}`:`${t.toLowerCase()}:${b.location}:${b.chainId}:${S.normalizeNativeTokenAddress(b.address).toLowerCase()}`;if(i.has(B)||a.has(q))throw new Error("A funding position was included more than once.");if(i.add(B),a.add(q),!Pr(b,t,n)||typeof A!="bigint"||typeof R!="bigint"||A<0n||R<0n||A+R>b.balance)throw new Error("A funding position or its available balance cannot be verified.");if(A===0n||e.budget!=="max"&&f>=e.budget)continue;const j=b.location==="rollup"?n:{...Ds(b.chainId),chainId:b.chainId},P=b.location==="rollup"||d.addressesEqual(b.address,j.address)?void 0:await e.resolveSourceInput(b,j,A);if(r(),P&&(P.amountOutMinimum<=0n||P.amountOutMinimum>P.amountOut||!P.calls.length))throw new Error("A funding conversion has no guaranteed output.");b.location==="rollup"&&b.receiptTokenDecimals!==void 0&&nn(A,b.decimals,b.receiptTokenDecimals);const D=P?.amountOutMinimum??nn(A,b.decimals,j.decimals),M=nn(Lt(D,j.decimals,n.decimals,"floor"),n.decimals,j.decimals);M!==0n&&(f+=nn(M,j.decimals,n.decimals),l.push({positionId:B,asset:b,owner:t,chainId:b.chainId,token:b.address,decimals:b.decimals,sourceSpendCap:A,quotedAvailable:A,reservedAmount:R,pivotToken:j,amountOutMinimum:M,gasFeeAmount:0n,...P?{swap:P}:{}}))}const h=l.reduce((I,b)=>I+nn(b.amountOutMinimum,b.pivotToken.decimals,n.decimals),0n);let y=e.budget==="max"?h:e.budget;if(e.budget==="max"&&y===0n)throw o(0n);if(y<=0n||y>h)throw new Error("The available funding positions cannot cover this purchase budget.");const g=[];let x=y;for(const I of l){if(x===0n)break;const b=nn(I.amountOutMinimum,I.pivotToken.decimals,n.decimals),A=b<x?b:x,R=nn(A,n.decimals,I.pivotToken.decimals);if(A===b)g.push(I);else if(I.swap){const B=await e.resolveSourceOutput(I.asset,I.pivotToken,R);if(r(),!B||B.amountInMax<=0n||B.amountIn<0n||B.amountIn>B.amountInMax||B.amountInMax>I.quotedAvailable||B.amountOut<R||!B.calls.length)throw new Error("The funding conversion cannot fit its accepted source balance.");g.push({...I,sourceSpendCap:B.amountInMax,amountOutMinimum:R,swap:{venue:B.venue,calls:B.calls,amountOut:B.amountOut,amountOutMinimum:R}})}else{const B=nn(R,I.pivotToken.decimals,I.decimals);I.asset.location==="rollup"&&I.asset.receiptTokenDecimals!==void 0&&nn(B,I.decimals,I.asset.receiptTokenDecimals),g.push({...I,sourceSpendCap:B,amountOutMinimum:R})}x-=A}const w=new Map;for(const I of g){if(I.asset.location==="rollup")continue;const b=w.get(I.chainId)??[];b.push(I),w.set(I.chainId,b)}const v=new Map,C=(I=!1)=>[...w].map(([b,A])=>{const R=A[0].pivotToken,B=A.reduce((j,P)=>j+P.amountOutMinimum,0n),q=v.get(b)??(I?1n:0n);if(B<=q&&!I)throw o(y,Lt(q,R.decimals,n.decimals,"ceil"));return{chainId:b,calls:[...A.flatMap(j=>j.swap?.calls??[]),Us(R.address,B>q?B-q:0n,S.getEscrowContractAddress(b)),...q>0n?[Us(R.address,q,S.SPICE_GAS_FEE_RECIPIENT)]:[]]}});for(let I=0;I<8&&w.size>0;I++){const b=C(!0);let A=!1;for(const[R,[B,q]]of[...w].entries()){r();const j=await d.relayerService.estimateBatchGas({user:t,outputToken:q[0].pivotToken.address,stepIndex:0,chainBatches:[b[R]],signal:e.signal});if(j.gasFee<0n)throw new Error("The source gas quote is invalid.");const P=q[0].pivotToken,D=nn(Lt(j.gasFee,P.decimals,n.decimals,"ceil"),n.decimals,P.decimals),M=v.get(B),L=M!==void 0&&M>D?M:D,T=q.reduce((H,V)=>H+V.amountOutMinimum,0n);if(L>=T){if(e.budget!=="max")return zl({...e,sources:e.sources.filter(H=>H.asset.location==="rollup"||H.asset.chainId!==B)});y-=nn(T,P.decimals,n.decimals),w.delete(B);for(const H of q)g.splice(g.indexOf(H),1);A=!0;continue}(M===void 0||L!==M)&&(A=!0),v.set(B,L)}if(!A)break;if(I===7)throw new Error("Source fees did not converge. Refresh the quote before submitting.")}let E=0n;for(const[I,b]of w){const A=v.get(I);b[0].gasFeeAmount=A,E+=nn(A,b[0].pivotToken.decimals,n.decimals)}const k=y-E;if(k<=0n)throw o(y,E);let F={gasFee:0n,spicenetFee:0n,bridgeFee:0n},O="estimated";for(let I=0;I<8;I++){r();const b=F.gasFee+F.spicenetFee+F.bridgeFee,A={grossAmount:k,netAmount:k-b,combinedFeeAmount:b,feeExecutionMode:"user-transfer",feeBreakdown:F},R=A.netAmount;if(R<=0n)throw o(y,E+F.gasFee,F.spicenetFee,F.bridgeFee);const B=d.addressesEqual(n.address,e.destinationToken.address)?void 0:await e.resolveDestinationInput(R);if(r(),B&&(B.amountOutMinimum<=0n||B.amountOutMinimum>B.amountOut||!B.calls.length))throw new Error("The purchase conversion has no guaranteed output.");const q=B?.amountOutMinimum??nn(R,n.decimals,e.destinationToken.decimals),j={...A,userAddress:e.beneficiary??t,executorAddress:t,beneficiary:e.beneficiary??t,chainId:n.chainId,destinationToken:e.destinationToken.address,feeToken:n.address,grossAmount:y,netAmount:q,combinedFeeAmount:A.combinedFeeAmount+E},P=await e.buildActionCalls(q,j);if(!P.length&&!B?.calls.length)throw new Error("No action calls configured.");const D={intents:[{intentIndex:0,batches:[{chainId:n.chainId,quotedAmount:R.toString(),totalDebit:k.toString(),gasQuoteSource:O,feeBreakdown:{gasFee:F.gasFee.toString(),spicenetFee:F.spicenetFee.toString(),bridgeFee:F.bridgeFee.toString()}}]}]},M={chainId:n.chainId,calls:[...B?.calls??[],...P],tokenTransfers:[{from:"escrow",to:t,token:n.address,amount:k}]},L=[...C(),...al([M],t,D,{payoutAlreadyGross:!0,requestTimestampMs:e.requestTimestampMs})],T=await e.estimate(L,n.address,k,{userOverride:t,useCustomTransfers:!0,feeExecutionMode:"user-transfer",signal:e.signal,skipUserFundingPreflight:!0}),H=T.intents.flatMap(K=>K.batches);if(T.intents.length!==1||T.intents[0].intentIndex!==0||H.length!==1||H[0].chainId!==n.chainId)throw new Error("The destination fee quote is missing or ambiguous.");const V=d.getSupplyFeePreview(T,{...n,tokenAddress:n.address});if(!V)throw new Error("The destination fee quote cannot be verified.");const te=d.getBatchFees(H[0]);if(te.gasFee<0n||te.spicenetFee<0n||te.bridgeFee<0n)throw new Error("The destination fee quote is invalid.");if(te.spicenetFee>d.calculateBpsFee(k,10n))throw new Error("The destination platform fee exceeds the supported purchase fee.");const Z={gasFee:te.gasFee>F.gasFee?te.gasFee:F.gasFee,bridgeFee:te.bridgeFee>F.bridgeFee?te.bridgeFee:F.bridgeFee,spicenetFee:te.spicenetFee>F.spicenetFee?te.spicenetFee:F.spicenetFee};if(I>0&&Z.gasFee===F.gasFee&&Z.bridgeFee===F.bridgeFee&&Z.spicenetFee===F.spicenetFee)return{fundingPlan:{owner:t,token:n,totalBudget:y,sources:g},batches:L,feeEstimate:D,actionDefinition:{amount:q,context:j,calls:P},actionContext:j,fundingAmount:k,destinationAmount:q,destinationSwap:B,swapInputAmount:R,actionOutputCredits:ho(n.chainId,e.destinationToken.address,B),preview:{symbol:n.symbol,decimals:n.decimals,grossAmount:y,netAmount:R,totalFee:A.combinedFeeAmount+E,gasFee:F.gasFee+E,spicenetFee:A.feeBreakdown.spicenetFee,bridgeFee:F.bridgeFee,gasQuoteSource:O}};F=Z,O=V.gasQuoteSource}throw new Error("Fees did not converge. Refresh the quote before submitting.")}function Eo(e,t,n,s){return n?{to:e,value:s,data:"0x"}:{to:t,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[e,s]})}}async function Hl(e){const t=Eo(e.recipient,e.token,e.isNative,e.amount),[n,s]=await Promise.all([e.client.estimateGas({account:e.account,...t}),e.client.estimateFeesPerGas()]),r=s.maxFeePerGas??s.gasPrice;if(typeof r!="bigint"||r<=0n)throw new Error("Source transaction gas could not be priced.");return(n*r*120n+99n)/100n}function Pa(e,t){return t.isNative?e.sendTransaction({to:t.recipient,value:t.amount,chain:t.viemChain}):e.sendTransaction({to:t.tokenAddr,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[t.recipient,t.amount]}),chain:t.viemChain})}async function xf(e){const{extWc:t,sourceClient:n,recipient:s,tokenAddr:r,isNative:o,amount:i}=e;if(i<=0n)return;await e.observer?.onSending?.(0);let a;try{a=await Pa(t,{recipient:s,tokenAddr:r,isNative:o,amount:i,viemChain:e.viemChain})}catch(m){throw Da(m)&&e.observer?.onRejected?.(0),m}e.observer?.onSubmitted?.(0,a);const l=await mo({client:n,hash:a,call:Eo(s,r,o,i),onRepriced:m=>e.observer?.onSubmitted?.(0,m),onCancelled:()=>e.observer?.onReverted?.(0,a)});a=l.hash;const u=l.receipt;if(u.status!=="success")throw e.observer?.onReverted?.(0,a),new Error("Embedded wallet funding failed");await ql(t,n,u.blockNumber),e.observer?.onConfirmed?.(0,a)}async function Vl(e){const{asset:t,embedded:n,external:s,amount:r}=e;if(!s||!e.externalWallet)throw new Error("Connect the source wallet before funding.");if(r<=0n)return;const o=d.getClientForChain(t.chainId),i=t.isNative||S.isNativeToken(t.address),[a,l]=await Promise.all([Hl({client:o,account:s,recipient:n,token:t.address,isNative:i,amount:r}),o.getBalance({address:s})]);if(l<a+(i?r:0n))throw new Error("The source wallet has insufficient native balance for funding and gas.");const{extWc:u,viemChain:m}=await Na({wallet:e.externalWallet,account:s,chainId:t.chainId});await xf({extWc:u,sourceClient:o,recipient:n,tokenAddr:t.address,isNative:i,amount:r,viemChain:m,observer:{...e.observer,onSending:async f=>{await e.assertCurrent(),await e.observer?.onSending?.(f)}}})}function Ql(e){const t=p.useContext(d.SpiceFlowProviderContext),n=d.getChainConfig(e.chainId),s=e.address??n?.supportedTokens?.find(g=>g.symbol.toLowerCase()===e.symbol?.toLowerCase())?.address,r=e.symbol??(s&&S.isNativeToken(s)?n?.nativeCurrency?.symbol:n?.supportedTokens?.find(g=>!!s&&d.addressesEqual(g.address,s))?.symbol),o=d.getRpcUrlForChain(e.chainId,t?.rpcOverrides),[i,a]=p.useState(0),l=`${e.chainId}:${s?.toLowerCase()}:${o}:${e.decimals??""}:${r??""}:${i}`,[u,m]=p.useState(null);p.useEffect(()=>{let g=!1;if(!(!e.enabled||!s||!o?.trim()))return Promise.all([e.decimals??d.getTokenDecimals(e.chainId,s,t?.rpcOverrides),r??Kn.readContract(d.getClientForChain(e.chainId,t?.rpcOverrides),{address:s,abi:N.erc20Abi,functionName:"symbol"}).catch(()=>{})]).then(([x,w])=>{if(!Number.isInteger(x)||x<0||x>255)throw new Error("Invalid destination token decimals");g||m({key:l,decimals:x,symbol:w})}).catch(x=>{g||m({key:l,error:x.message})}),()=>{g=!0}},[e.enabled,l]);const f=u?.key===l?u:null,h=p.useMemo(()=>({address:s??S.ZERO_ADDRESS,chainId:e.chainId,decimals:f?.decimals??0,symbol:r??f?.symbol??(s?d.truncateAddress(s):""),logoURI:e.logoURI}),[s,e.chainId,f?.decimals,f?.symbol,r,e.logoURI]),y=e.enabled?s?o?.trim()?f?.error??null:`Configure SpiceFlowProvider rpcOverrides[${e.chainId}] before continuing.`:"Configure the destination token address before continuing.":null;return{token:h,error:y,ready:e.enabled&&!!s&&!!o?.trim()&&f?.decimals!==void 0,refresh:p.useCallback(()=>a(g=>g+1),[])}}function Fo(e,t){const n=!!e&&e.symbol!==void 0&&e.decimals!==void 0,s=Ql({enabled:t&&!!e&&!n,chainId:e?.chainId??0,address:e?.address,decimals:e?.decimals,symbol:e?.symbol,logoURI:e?.logoURI});return{token:e?n?e:s.ready?s.token:void 0:void 0,error:s.error}}const To={address:S.ZERO_ADDRESS,symbol:"",decimals:18,chainId:0};function Gl(e,t,n){return d.addressesEqual(e.address,t)&&e.chainId===n?e._source==="wallet"?0:1:2}function yf(e,t,n,s){const r=Gl(e,n,s)-Gl(t,n,s);return r!==0?r:(t.balanceUsd||0)-(e.balanceUsd||0)}const bf=gc;function Kl(e){const t=p.useContext(d.SpiceFlowProviderContext),n=d.useProviderWallets(),s=t?.embeddedWalletAddress||n.embeddedAddress,r=t?.externalWalletAddress||n.externalAddress,o=(t?.mode||"7702")!=="7702",i=e.destinationToken??To,a=e.enabled&&!!e.destinationToken,l=Ms({...e,owner:s,enabled:a&&!!s&&(!o||e.includeCrossChainEmbeddedAssets!==!1),role:"spend-source",destination:e.destinationToken}),u=Ms({...e,owner:r,enabled:a&&!!r&&(o||e.includeExternalWalletAssets!==!1),role:"spend-source",destination:e.destinationToken});return{displayAssets:p.useMemo(()=>[...l.assets,...u.assets].sort((m,f)=>yf(m,f,i.address,i.chainId)),[l.assets,u.assets,i.address,i.chainId]),filteredSpiceAssets:l.rollupAssets,walletAssets:[...l.walletAssets,...u.walletAssets],embeddedWalletAddress:s,externalAddress:r,isNon7702:o,refreshSpiceAssets:l.refresh,refreshWalletAssets:l.refresh,loading:l.loading||u.loading,refreshing:l.refreshing||u.refreshing,error:l.error||u.error}}function vf(e,t){return!e||e._source!=="wallet"?null:ea(e,t)}function Ua(e){return Yi({aerodrome:!1,oneInch:{chainIds:[]},customVenues:e})}const Wa=js(),Cf=Ua(Wa.input);function Yl(e){return{venue:"mapped-transfer",amountOut:e,amountOutMinimum:e,calls:[]}}function Zl(e){return{venue:"mapped-transfer",amountIn:e,amountInMax:e,amountOut:e,calls:[]}}async function Ur(e){if(d.addressesEqual(e.tokenIn,e.tokenOut))return Yl(e.amountIn);if(e.resolveInputSwap){const n=await e.resolveInputSwap({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:e.amountIn,maxSlippage:e.maxSlippage},e.chainId,e.recipient);if(n)return n}const t=await(e.liquidityVenues?Ua(js(e.liquidityVenues).input):Cf).resolveSwap({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:e.amountIn,maxSlippage:e.maxSlippage},e.chainId,e.recipient,e.selectedSwap);if(!t)throw new Error("No liquidity for this pair.");return t}async function Xl(e){return d.addressesEqual(e.tokenIn,e.tokenOut)?Zl(e.amountOut):Nr({customVenues:e.liquidityVenues?js(e.liquidityVenues).output:Wa.output}).getQuote({tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountOut:e.amountOut,maxSlippage:e.maxSlippage},e.chainId,e.recipient)}function Jl(e){const{enabled:t=!0,direction:n,selectedAsset:s,destinationToken:r,chainId:o=r.chainId,recipient:i,paymentAmount:a,maxSlippage:l,refreshIntervalMs:u,resolveInputSwap:m,resolveExactOutputSwap:f}=e,h=p.useContext(d.SpiceFlowProviderContext),y=h?.liquidityVenues,g=JSON.stringify([h?.network,h?.apiUrl,h?.rpcOverrides]),[x,w]=p.useState(!1),[v,C]=p.useState(null),[E,k]=p.useState(null),[F,O]=p.useState(null),[I,b]=p.useState(null),[A,R]=p.useState(null),[B,q]=p.useState(null),[j,P]=p.useState(null),[D,M]=p.useState(null),[L,T]=p.useState(null),[H,V]=p.useState(null),[te,Z]=p.useState(null),[K,Y]=p.useState(null),[J,we]=p.useState(null),[me,xe]=p.useState(null),[Ce,ne]=p.useState(0),[_,de]=p.useState(null),[W,je]=p.useState(null),Ae=p.useRef(null),z=p.useRef(null),Q=p.useRef(0),se=p.useRef(new Map),ce=p.useCallback(()=>{Q.current++,se.current.clear(),je(null),ne(ae=>ae+1)},[]),X=u&&u>0?u:null,oe=y?JSON.stringify(y):"",Oe=p.useMemo(()=>y?js(y):Wa,[oe]),Ne=p.useMemo(()=>Ua(Oe.input),[Oe]),he=p.useMemo(()=>Nr({customVenues:[...f?[{name:"consumer-exact-output",chainIds:[o],preferred:!0,resolve:f}]:[],...Oe.output]}),[f,o,Oe]);p.useEffect(()=>{se.current.clear()},[he]);const Se=p.useMemo(()=>t?vf(s?.asset,o):null,[t,s?.asset,o]),Te=p.useMemo(()=>{if(!t||!s?.asset)return null;if(Se)return Se.destination.address;const ae=Dn(s.asset,o);if(ae)return ae;const dt=ds(s.asset.address,o,s.asset.chainId);return dt?dt.address:null},[t,s?.asset,o,Se]),ve=p.useMemo(()=>t&&s?.asset?Gs(s.asset,o):[],[t,s?.asset,o]),We=p.useMemo(()=>ve.map(ae=>ae.toLowerCase()).join(","),[ve]),be=JSON.stringify([t,g,s?.asset.owner,s?.asset.location,s?.asset.receiptTokenId,s?.asset.address,s?.asset.chainId,s?.asset.decimals,s?.amount,o,We,n,a]);p.useEffect(()=>{let ae=!1;if(z.current&&(clearTimeout(z.current),z.current=null),!t||!s?.asset||Se||ve.length<=1){we(null),xe(null);return}return z.current=setTimeout(async()=>{const dt=n==="input"?s.amount:a||"0";let ut=0n;try{ut=n==="input"?dn(dt,s.asset.decimals):0n}catch{ut=0n}try{const Me=await fc(s.asset,o,{requiredAmount:ut});ae||(we(Me),xe(be))}catch{ae||we(null)}},400),()=>{ae=!0,z.current&&(clearTimeout(z.current),z.current=null)}},[be]);const Pe=p.useMemo(()=>(me===be?J:null)??Te,[J,me,be,Te]),ue=p.useMemo(()=>!s?.asset||!Pe?[]:[Pe,...ve.filter(ae=>ae.toLowerCase()!==Pe.toLowerCase())],[s?.asset,Pe,ve]),Ke=p.useMemo(()=>!s?.asset||!kr(s.asset.address,s.asset.chainId,r.address,r.chainId)||!Pe?!1:d.addressesEqual(Pe,r.address),[s,r.address,r.chainId,Pe]),ft=Pe?d.addressesEqual(Pe,r.address):!1,tt=n==="output"&&parseFloat(a||"0")===0,$e=t&&!!s?.asset&&!Ke&&!ft&&!tt,Qe=JSON.stringify([t,oe,n,$e,g,s?.asset.owner,s?.asset.location,s?.asset.receiptTokenId,s?.asset.address,s?.asset.chainId,s?.asset.decimals,n==="input"?s?.amount:a,ue.map(ae=>ae.toLowerCase()),o,r.address.toLowerCase(),r.chainId,r.decimals,i?.toLowerCase(),l,X,Se?.source.address.toLowerCase()??""]),Ee=p.useMemo(()=>({}),[Qe,Ne,he,m,Ce]),Ie=W?.request===Ee&&(!X||W.expiresAt>Date.now());p.useEffect(()=>{if(!X||W?.request!==Ee)return;const ae=setTimeout(ce,Math.max(0,W.expiresAt-Date.now()));return()=>clearTimeout(ae)},[X,W,Ee,ce]),p.useEffect(()=>{Ae.current&&clearTimeout(Ae.current),de(Ee),je(null),C(null);const ae=n==="input"?s?.amount:a,dt=parseFloat(ae||"0");if(!t||!Number.isFinite(dt)||dt<=0||!s?.asset||!i||ue.length===0){Q.current++,k(null),O(null),b(null),R(null),q(null),P(null),M(null),Y(null),C(null),w(!1);return}const ut=s.asset.decimals;let Me;try{Me=n==="input"?dn(s.amount,ut):dn(a||"0",r.decimals)}catch(ot){Q.current++,C(ot instanceof Error?ot.message:"Invalid amount or token precision"),w(!1);return}const bt=++Q.current,Rt=()=>bt!==Q.current;w(!0);const Xt=n==="output"?150:100,St=async(ot,Le,at,rt={chainId:o,tokenOut:r.address,amountIn:Me},wt=ue)=>{for(const ee of wt){const mt=`${g}:${oe}:${n}:${rt.chainId}:${ee.toLowerCase()}:${rt.tokenOut.toLowerCase()}:${rt.amountIn.toString()}:${i.toLowerCase()}:${l??"default"}:${X??"default"}`,Re=se.current.get(mt),ze=Re&&Re.expiresAt>Date.now()?ot(Re):void 0;if(ze)return{quote:ze,tokenIn:ee,expiresAt:Re.expiresAt};const et=await at(ee);if(Rt())return"stale";if(!et)continue;const it=Date.now()+Math.min(X??3e4,3e4);return se.current.set(mt,{expiresAt:it,direction:n,...Le(et)}),{quote:et,tokenIn:ee,expiresAt:it}}return null},un=ot=>St(Le=>Le.resolvedSwap,Le=>({resolvedSwap:Le}),async Le=>{const at=!Se&&ot.chainId===o&&s.asset._source!=="wallet",rt=at?await es(s.asset,Le,ot.chainId,r):ut;if(Rt())return null;const wt=at?nn(ot.amountIn,ut,rt):ot.amountIn;if(d.addressesEqual(Le,ot.tokenOut))return Yl(wt);const ee={type:"swap",tokenIn:Le,tokenOut:ot.tokenOut,amountIn:wt,maxSlippage:l};if(m){const mt=await m(ee,ot.chainId,i);if(mt)return mt}return Ne.resolveSwap(ee,ot.chainId,i)},ot,ot.candidates);return Ae.current=setTimeout(async()=>{try{if(n==="input"){let ot=null,Le=Me;if(Se){if(ot=await un({chainId:Se.source.chainId,tokenOut:Se.source.address,amountIn:Me,candidates:[s.asset.address]}),ot==="stale"||Rt())return;if(!ot)throw new Error("No liquidity for this pair");Le=Lt(ot.quote.amountOutMinimum,Se.source.decimals,Se.destination.decimals,"floor")}let at=Se,rt=null;if(Se){const it=await pc(Se.destination,r,async Ve=>{const At=Lt(Le,Se.destination.decimals,Ve.decimals,"floor"),ht=await un({chainId:o,tokenOut:r.address,amountIn:At,candidates:[Ve.address]});return ht&&ht!=="stale"?{amount:At,value:ht}:null});if(Rt())return;if(!it)throw new Error("No liquidity for this pair");at={...Se,destination:it.token},Le=it.amount,rt=it.value}else rt=await un({chainId:o,tokenOut:r.address,amountIn:Le,candidates:ue});const wt=at?!d.addressesEqual(at.destination.address,r.address):$e;if(rt==="stale"||Rt())return;if(!rt)throw new Error("No liquidity for this pair");const ee=rt?rt.quote.amountOut:Le,mt=Math.min(rt?.expiresAt??1/0,ot?.expiresAt??1/0),Re=at?.destination.decimals??await es(s.asset,rt.tokenIn,o,r),ze=!Se&&s.asset._source!=="wallet"?nn(Le,ut,Re):Le;if(Rt())return;Y(rt?.tokenIn??at?.destination.address??null),Z(at),je({request:Ee,key:`${N.keccak256(N.toHex(Qe))}:${bt}`,expiresAt:mt}),M(ee),T(ze),V(Re),b(wt?rt?.quote??null:null),R(ot?.quote??null),q(null),P(null);const et=parseFloat(N.formatUnits(ee,r.decimals));k(et<.01?et.toPrecision(4):et.toLocaleString(void 0,{maximumFractionDigits:6})),O(null),C(null)}else{const ot=Re=>St(ze=>ze.exactOutputSwap,ze=>({exactOutputSwap:ze}),async ze=>{try{return d.addressesEqual(ze,Re.tokenOut)?Zl(Re.amountOut):await he.getQuote({tokenIn:ze,tokenOut:Re.tokenOut,amountOut:Re.amountOut,maxSlippage:l},Re.chainId,i)}catch{return null}},{chainId:Re.chainId,tokenOut:Re.tokenOut,amountIn:Re.amountOut},Re.candidates);let Le=Se,at=null;if(Se){const Re=await pc(Se.destination,r,async ze=>{const et=await ot({chainId:o,tokenOut:r.address,amountOut:Me,candidates:[ze.address]});return et&&et!=="stale"?{amount:et.quote.amountInMax,value:et}:null});if(Rt())return;if(!Re)throw new Error("No liquidity for this pair");Le={...Se,destination:Re.token},at=Re.value}else at=await ot({chainId:o,tokenOut:r.address,amountOut:Me,candidates:ue});if(at==="stale"||Rt())return;if(!at)throw new Error("No liquidity for this pair");const rt=!Le||!d.addressesEqual(Le.destination.address,r.address);let wt=null;if(Se){const Re=at?at.quote.amountInMax:Me;if(wt=await ot({chainId:Se.source.chainId,tokenOut:Se.source.address,amountOut:Lt(Re,Le.destination.decimals,Se.source.decimals,"ceil"),candidates:[s.asset.address]}),wt==="stale"||Rt())return;if(!wt)throw new Error("No liquidity for this pair")}const ee=wt?ut:await es(s.asset,at.tokenIn,o,r);if(Rt())return;Y(at?.tokenIn??Le?.destination.address??null),Z(Le),je({request:Ee,key:`${N.keccak256(N.toHex(Qe))}:${bt}`,expiresAt:Math.min(at?.expiresAt??1/0,wt?.expiresAt??1/0)}),P(rt?at?.quote??null:null),q(wt?.quote??null),b(null),R(null),M(null);const mt=wt?.quote.amountIn??at.quote.amountIn;O(N.formatUnits(mt,ee)),k(null),C(null)}}catch(ot){if(Rt())return;const Le=ot instanceof Error?ot.message:"Failed to get quote";C(Le),k(null),O(null),b(null),R(null),q(null),P(null),M(null),Y(null)}finally{Rt()||w(!1)}},$e||Se?Xt:0),()=>{Q.current++,Ae.current&&clearTimeout(Ae.current)}},[Ee]);const lt=Ie?K??Pe:Pe,_e=lt?d.addressesEqual(lt,r.address):ft;return{inputAmount:Ie&&n==="input"?L:null,inputDecimals:Ie&&n==="input"?H:null,quoteKey:Ie?W.key:null,quoteExpiresAt:Ie?W.expiresAt:null,refreshQuote:ce,isQuoting:_===Ee?x:$e||!!Se,quoteError:_===Ee?v:null,estimatedOutput:Ie?E:null,estimatedInput:Ie?F:null,resolvedSwap:Ie?I:null,exactOutputSwap:Ie?j:null,quoteAmountOut:Ie?D:null,resolvedTokenIn:lt,isDirect:_e,needsSwap:Ie?!_e:$e,selectedIsEquivalent:Ke,sourceSwap:Ie?A:null,sourceExactOutputSwap:Ie?B:null,pivot:Ie?te:Se}}function Wr(e){const{enabled:t=!0,destinationToken:n,selectedAsset:s,paymentAmount:r="0",sourceChains:o,supportedSourceAssets:i,buildActionCalls:a,feeExecutionMode:l="user-transfer",buildSpicenetBatch:u,onPayExecute:m,resolveExactOutputSwap:f,amountDirection:h=e.feeOnlyAction?"output":e.fundingSources?"input-inclusive":"input",onSuccess:y,onError:g}=e,x=Fo(n,t),w=x.token??To,v=!!e.fundingSources,C=!!e.combineSourceBalances||v,E=Fo(e.fundingSources?.token,t&&v),k=E.token??To,F=t&&!!x.token,O=h==="output",I=h==="input-inclusive",b=e.feeFunding?.length!==0&&(e.actionProceeds==="output"||!!e.feeFunding?.length),A=O?"output":"input",R=w.chainId,B=p.useContext(d.SpiceFlowProviderContext),q=d.resolveFeeToleranceBps(B?.feeToleranceBps),j=B?.mode||"7702",P=!1,D=!!B?.isWhitelistGateActive,M=!!B?.isWhitelistConfigured&&B?.isUserWhitelisted!==!0,L=p.useMemo(()=>o??B?.supportedChainIds??[],[o,B?.supportedChainIds]),T=i,{address:H,isConnected:V,isReady:te,isAuthenticated:Z,provider:K}=d.useWallet(),{execute:Y,estimate:J,clearStatus:we}=Xs(),{externalWallet:me,embeddedAddress:xe,activeWallet:Ce,activeAddress:ne}=d.useProviderWallets(),_=B?.externalWalletAddress,de=B?.embeddedWalletAddress||xe,W=s,je=Ks(W?.asset,j!=="7702"),Ae=!!W&&W.asset.chainId===w.chainId&&d.addressesEqual(S.normalizeNativeTokenAddress(W.asset.address),S.normalizeNativeTokenAddress(w.address)),z=!e.quoteOnlyAccount&&(j!=="7702"||e.actionExecution?.wallet==="external")&&je&&Ae&&(!O||Number(r)>0)&&!e.feeOnlyAction&&!e.actionProceeds,Q=je&&!z,se=e.actionExecution?.wallet==="external"&&!z,ce=se?[w.chainId,...W?.asset._source==="wallet"?[W.asset.chainId]:[]].find(U=>!B?.rpcOverrides?.[U]):void 0,X=v&&(h!=="input-inclusive"||W||e.feeOnlyAction||e.actionInput||e.actionProceeds||e.actionExecution||j!=="7702")?"Combined funding supports an input-inclusive account purchase without a selected token.":v&&E.error?E.error:x.error?x.error:m?"Move onPayExecute protocol calls to buildActionCalls and application updates to onSuccess before continuing.":se&&(O&&!(Number(r)>0)||e.feeOnlyAction||e.actionProceeds||e.prependSourceEscrow||S.isNativeToken(w.address))?"External wallet execution requires a positive ERC20 supply or payment with SDK-managed funding.":ce!==void 0?`Configure rpcOverrides for chain ${ce} before routing to the external caller.`:null,oe=p.useMemo(()=>se&&_?(U,G)=>hf(U,G,_):a,[se,_,a]),{displayAssets:Oe,filteredSpiceAssets:Ne,walletAssets:he,embeddedWalletAddress:Se,refreshSpiceAssets:Te,refreshWalletAssets:ve,loading:We,refreshing:be,error:Pe}=Kl({address:H,destinationToken:w,supportedSourceAssets:T,sourceChains:L,additionalSourceTokens:[...e.additionalSourceTokens??[],...W?.asset._source==="wallet"?[{address:W.asset.address,chainId:W.asset.chainId,decimals:W.asset.decimals,symbol:W.asset.symbol,name:W.asset.name,logoURI:W.asset.logoURI}]:[]],includeExternalWalletAssets:e.includeExternalWalletAssets,includeCrossChainEmbeddedAssets:e.includeCrossChainEmbeddedAssets,enabled:F&&(!!e.quoteOnlyAccount||(j!=="7702"?!!_:!!de))}),ue=e.quoteOnlyAccount??Se,Ke=[...he,...Ne].filter(U=>!v||U.location!=="external"&&d.addressesEqual(U.owner,de)),ft=JSON.stringify(Ke,(U,G)=>typeof G=="bigint"?G.toString():G),tt=p.useMemo(()=>Ke,[ft]),$e=JSON.stringify([C,de,R,tt.map(U=>[ye(U),U.balance.toString(),U.decimals,U.receiptTokenDecimals,U.balanceStatus,U.balanceError,U.chainTokens])]),[Qe,Ee]=p.useState(null),Ie=p.useCallback(U=>C?jr(U,tt,de??void 0,R):void 0,[C,tt,de,R]);p.useEffect(()=>{if(!C||!F||!de)return;let U=!1;Ee(null);const G=new Map;for(const $ of tt){const ge=Ie($);if(ge)G.set(ye(ge.escrow),ge);else if($.location==="rollup"&&$.owner?.toLowerCase()===de.toLowerCase()&&$.chainId===R&&!$.balanceError&&$.balanceStatus!=="stale"){const pe=Object.entries($.chainTokens??{}).filter(([ke])=>ke.toLowerCase().startsWith(`evm:${R}:`));pe.length===1&&pe[0][1].decimals!==void 0&&G.set(ye($),{owner:$.owner,chainId:R,token:pe[0][0].split(":")[2],decimals:pe[0][1].decimals,escrow:$})}}return Promise.allSettled([...G].map(async([$,ge])=>{const pe=await ps(ge.owner,ge.chainId,ge.token);if(!pe.entries.some(ke=>ke.receiptToken===ge.escrow.receiptTokenId&&ke.decimals===ge.escrow.receiptTokenDecimals))throw new Error("The cash receipt mapping changed. Refresh before submitting.");return[$,Lt(pe.available,ge.decimals,ge.escrow.decimals,"floor")]})).then($=>{const ge=$.flatMap(pe=>pe.status==="fulfilled"?[pe.value]:[]);U||Ee({scope:$e,balances:Object.fromEntries(ge)})}),()=>{U=!0}},[C,F,de,$e,Ie]);const lt=p.useCallback(U=>!C||U.owner?.toLowerCase()!==de?.toLowerCase()||U.chainId!==R?!1:tt.some(G=>G.owner?.toLowerCase()===U.owner?.toLowerCase()&&G.chainId===R&&(U.location==="embedded"&&G.location==="rollup"&&Object.keys(G.chainTokens??{}).some($=>$.toLowerCase()===`evm:${R}:${U.address.toLowerCase()}`)||U.location==="rollup"&&G.location==="embedded"&&Object.keys(U.chainTokens??{}).some($=>$.toLowerCase()===`evm:${R}:${G.address.toLowerCase()}`))),[C,de,R,tt]),_e=p.useCallback((U,G)=>{const $=tt.find(ke=>ye(ke)===ye(U));if(!$)return;const ge=Ie($);if(!ge||Qe?.scope!==$e)return;const pe=Qe.balances[ye(ge.escrow)];if(pe!==void 0)return jr($,tt,de??void 0,R,pe,G)},[Ie,Qe,$e,tt,de,R]),ae=p.useCallback(U=>{if(!C)return U.balance;const G=tt.find($=>ye($)===ye(U));if(!(!G||G.balanceError||G.balanceStatus==="stale")&&!(C&&G.location!=="external"&&G.owner?.toLowerCase()!==de?.toLowerCase()))return lt(G)?_e(G)?.availableBalance:C&&G.location==="rollup"?Qe?.scope===$e?Qe.balances[ye(G)]:void 0:G.balance},[tt,lt,_e,C,Qe,$e,de]),dt=p.useMemo(()=>{if(!C)return Oe;const U=new Set;return Oe.filter(G=>{const $=Ie(G);if(!$)return!0;const ge=ye($.escrow);return U.has(ge)?!1:(U.add(ge),!0)})},[Oe,C,Ie]),ut=JSON.stringify(e.fundingSources?.positionIds??[]),Me=p.useMemo(()=>{if(!v||!E.token||!de)return[];const U=new Set(JSON.parse(ut));return tt.filter(G=>U.has(ye(G))&&Pr(G,de,k)&&(G.location==="rollup"||L.includes(G.chainId))&&Yn(G,"spend-source",{...B,isWhitelistGateActive:D},k,T).eligible)},[v,E.token,de,ut,tt,k,L,B,T]),bt=p.useMemo(()=>Me.flatMap(U=>{const G=U.location==="rollup"?Qe?.scope===$e?Qe.balances[ye(U)]:void 0:U.balance;return G===void 0||G<=0n||G>U.balance?[]:[{asset:U,availableAmount:G,reservedAmount:U.balance-G}]}),[Me,Qe,$e]),Rt=JSON.stringify(bt,(U,G)=>typeof G=="bigint"?G.toString():G),Xt=e.feeFunding===void 0&&j==="7702"&&!z&&!se&&W?.asset._source==="wallet"&&W.asset.chainId===R&&!_e(W.asset),St=b||Xt||e.feeFunding?.length!==0&&O&&!!W&&!!_e(W.asset),un=p.useMemo(()=>e.feeOnlyAction||St||se?Oe.filter(U=>U.balance>0n&&U.location!=="external"&&(U._source==="spice"||U._source==="wallet"&&U.chainId===R)).flatMap(U=>{if(!C||U.location!=="rollup")return[U];const G=Qe?.scope===$e?Qe.balances[ye(U)]:void 0;return G===void 0?[]:[{...U,balance:G}]}):[],[Oe,e.feeOnlyAction,St,se,R,C,Qe,$e]),ot=!!e.feeOnlyAction||St||se,Le=ot&&We,at=ot?un.map(U=>`${ye(U)}:${U.balance}:${U.balanceError??""}:${U.balanceStatus??""}`).sort().join(",")+`:${Pe??""}`:"",rt=W?[...he,...Ne].find(U=>ye(U)===ye(W.asset)):void 0,wt=p.useMemo(()=>W&&rt?{...W,asset:rt}:W,[W,rt]),ee=W?Yn(rt??W.asset,"spend-source",{allowedTokens:B?.allowedTokens,rpcOverrides:B?.rpcOverrides,liquidityVenues:B?.liquidityVenues,isWhitelistGateActive:D},w,T):null,mt=W&&rt?_e(rt):void 0,Re=C?W&&rt?ae(rt):void 0:W?.asset.balance,ze=C&&W&&(lt(W.asset)||W.asset.location==="rollup")?Re??0n:rt?rt.balance<(W?.asset.balance??0n)?rt.balance:W.asset.balance:0n,[et,it]=p.useState(!1),[Ve,At]=p.useState(!1),ht=p.useRef(!1),Pt=p.useRef(!1),pt=p.useRef(!0);p.useLayoutEffect(()=>(pt.current=!0,()=>{pt.current=!1,wn.current.accepted&&fe.current?.abort()}),[]);const[Sn,pn]=p.useState(null),[Cn,Zn]=p.useState(null),gn=p.useRef(0),wn=p.useRef({accepted:!1}),Jt=p.useRef(g);Jt.current=g;const Ft=p.useCallback(U=>{pn(U),typeof U=="string"&&U&&Jt.current?.(new Error(U),d.getRelayerErrorDetail(U))},[]),[Ut,Wt]=p.useState("idle"),[Qt,Bt]=p.useState(""),[Ye,It]=p.useState(null),[An,_t]=p.useState(!1),[sn,rn]=p.useState(null),[xn,Yt]=p.useState(null),[En,Ge]=p.useState(!1),[fn,en]=p.useState(!1),Xn=p.useRef(null),[Nn,yn]=p.useState(null),Jn=p.useRef(W),Hn=p.useRef(!1),fe=p.useRef(null),ie=p.useRef(null),Ze=ue||xe||H,gt=d.relayerService.getBaseUrl(),Fe=`${gt}:${Ze?.toLowerCase()??""}`,Nt=p.useRef(Fe);Nt.current=Fe;const[vt,Gt]=p.useState({scope:Fe,checking:!1,supported:null,pending:!1,error:null}),$t=p.useRef(0),zt=p.useRef(null),qt=p.useRef(0),Tt=p.useRef({scope:Fe,supported:null,terminal:new Map}),mn=p.useRef(null),Mt=p.useRef(null),Fn=p.useRef(null),on=p.useRef(null),nt=p.useRef(null),Kt=p.useRef(y),fs=p.useRef(null),Ss=p.useRef(!1),[ir,ss]=p.useState(null),[Vn,Ls]=p.useState(null),[re,Be]=p.useState(!1),[Ct,He]=p.useState(0),Ue=sn?.status==="success"?sn.txHash:Ut==="success"?Ye:null,st=!!Ue&&ir!==Ue,bn=p.useRef(st);bn.current=st;const Mn=p.useCallback(async(U,G=!1)=>{if(zt.current?.scope===Fe&&zt.current.version===qt.current&&!G)return!1;const $=ie.current?.scope===Fe?ie.current.progress:void 0;if(z&&!$?.actionId&&$?.submissionStatus!=="unknown"||!Ze)return!0;const ge=++$t.current,pe=()=>pt.current&&Nt.current===Fe&&$t.current===ge,ke=new d.RelayerService;ke.setBaseUrl(gt),Gt(le=>({...le.scope===Fe?le:{supported:null,pending:!1},scope:Fe,checking:!0,error:null}));try{Tt.current.scope!==Fe&&(Tt.current={scope:Fe,supported:null,terminal:new Map});const le=Tt.current,De=U&&le.supported!==null?le.supported:await ke.supportsAutomaticContinuation();if(!pe())return!1;le.supported=De;const xt=ie.current?.scope===Fe?ie.current:null;let ct=xt?.progress;if(ct?.submissionStatus==="unknown"&&!ct.actionId){const Dt=ct.idempotencyKey;if(!Dt)throw new Error("The original submission identity is unavailable.");const yt=await ke.getActionBySubmission(Ze,Dt);if(!pe())return!1;if(!yt)return Gt({scope:Fe,supported:De,checking:!1,pending:!0,error:null}),!1;const[Vt,kt="0"]=yt.intentIds[0].split("/");ct={...ct,actionId:Vt,intentId:yt.intentIds[0],intentIndex:Number(kt),autoContinue:yt.autoContinue===!0,submissionStatus:void 0},xt&&(xt.progress=ct)}const as=De?U??await ke.getWalletActions(Ze,{pendingOnly:!0}):[];if(!pe())return!1;let kn=!1,ln,$n,xs=0;const ys=new Set([...ct?.actionId?[ct.actionId]:[],...as.map(Dt=>Dt.actionId)]);for(const Dt of le.terminal.keys())ys.has(Dt)||le.terminal.delete(Dt);for(const Dt of ys){const yt=as.find(Je=>Je.actionId===Dt);if(yt&&yt.intents.length!==1){kn=!0,ln??(ln=yt);break}const Vt=ct?.actionId===Dt,kt=Vt&&xt?.routedExternal||!!yt?.externalExecution&&yt.externalExecution.recoveryKey===e.actionExecution?.recoveryKey&&!!_&&d.addressesEqual(yt.externalExecution.executor,_);let Zt;if(kt){if(Zt=await ke.getExternalExecution(Dt),!pe())return!1;if(Zt.recoveryKey!==e.actionExecution?.recoveryKey||!_||!d.addressesEqual(Zt.executor,_))throw Error("The original external action belongs to another wallet or application action.");if(Zt.executionMode==="wallet-envelope"){if(Vt&&ct?.step!=="success"){kn=!0,ln??(ln=yt),$n={actionId:Dt,state:Zt};break}continue}if(Zt.status!=="complete"){if(Zt.calls.some(Je=>Je.status==="conflict"))throw Error("The original external wallet action failed. Check wallet activity before starting another action.");kn=!0,ln??(ln=yt),$n={actionId:Dt,state:Zt};break}}const Un=Vt?ct.intentIndex??0:0,Os=`${Dt}/${Un}`;let tn=le.terminal.get(Dt)??"unresolved";if(De&&tn==="unresolved"){if(xs===4){kn=!0,ln??(ln=yt);break}xs++,tn=await ke.getIntentRecoveryStatus(Dt,Un)}else!De&&Vt&&ct?.totalSteps&&(await Promise.all(Array.from({length:ct.totalSteps},(Je,On)=>ke.checkStepStatus(Os,On,!0)))).every(Je=>Je.data.status==="success")&&(tn="completed");if(!pe())return!1;if(tn==="unresolved"){kn=!0,ln??(ln=yt);break}if(le.terminal.set(Dt,tn),le.terminal.size>100&&le.terminal.delete(le.terminal.keys().next().value),!(!Vt||!xt)){if(tn==="completed"&&ct?.step!=="success"&&ht.current){kn=!0;break}if(tn==="completed"&&ct?.step!=="success"&&!ht.current){let Je;if(xt.routedExternal){const On=Zt??await ke.getExternalExecution(Dt),jn=On.calls[On.calls.length-1];if(On.status!=="complete"||!jn?.transactionHash)throw Error("The original external wallet action is not confirmed yet.");Je=await ua(d.getClientForChain(On.chainId),jn.transactionHash)}else{const On=xt.batches;let jn=ct?.destinationStepIndex,Qs=ct?.destinationChainId;if(jn===void 0||Qs===void 0){if(ct?.totalSteps!==On?.length)throw new Error("The original destination is unavailable. Check this action's status before continuing.");for(jn=(On?.length??0)-1;jn>=0&&S.isSpicenetChainId(On[jn].chainId);)jn--;Qs=On?.[jn]?.chainId}if(!Number.isSafeInteger(jn)||jn<0||jn>=(ct?.totalSteps??0)||!Number.isSafeInteger(Qs)||!Qs||S.isSpicenetChainId(Qs))throw new Error("The original destination is unavailable. Check this action's status before continuing.");const Gd=await ke.checkStepStatus(Os,jn,!0);if(!pe())return!1;Je=await ua(d.getClientForChain(Qs),Gd.data.transactionHash)}if(!pe())return!1;ct={...ct,step:"success",message:"Transaction confirmed",txHash:Je,submissionStatus:void 0},xt.progress=ct,It(Je),Wt("success"),pn(null),Bt("Transaction confirmed"),rn(On=>On&&{status:"success",txHash:Je})}else tn==="cancelled"&&(xt.progress=void 0)}}return Gt({scope:Fe,supported:De,checking:!1,pending:kn,error:null,action:ln,...$n?{externalExecution:$n.state,externalActionId:$n.actionId}:{}}),!kn}catch(le){return pe()&&Gt(De=>({...De,scope:Fe,supported:Tt.current.scope===Fe?Tt.current.supported:null,checking:!1,pending:!0,error:d.sanitizeError(le,"The original action status is unavailable. Check again before submitting.")})),!1}},[z,Ze,Fe,gt,_,e.actionExecution?.recoveryKey]),an=ie.current?.scope===Fe?ie.current.progress:void 0,As=!!Ze&&(!z||an?.submissionStatus==="unknown"||!!an?.actionId&&an.step!=="success"),Pn=vt.scope===Fe,Qn=As&&Pn&&vt.pending,cn=uo(Ze,As&&Pn&&vt.supported===!0&&(F||Qn),{pendingOnly:!0}),zr=p.useRef({scope:Fe,...cn});zr.current={scope:Fe,...cn};const Hr=p.useRef(null),rs=p.useCallback(async()=>{await Mn(),cn.error&&cn.refresh()},[Mn,cn.refresh,cn.error]),ms=As&&(Pn?vt.checking||vt.supported===null&&!vt.error||cn.loading:!0),Es=As&&Pn?vt.error??cn.error:null,Td=!As||Pn&&!ms&&!Qn&&!Es;p.useEffect(()=>{if(!(!F&&!an?.actionId&&an?.submissionStatus!=="unknown"))return Mn(),()=>{$t.current++,zt.current?.scope===Fe&&(zt.current=null)}},[Fe,F,Mn]),p.useEffect(()=>{if(!cn.updatedAt||cn.loading||cn.error||zt.current?.scope===Fe&&zt.current.version===qt.current)return;const U=Hr.current;U?.scope===Fe&&U.revision===cn.revision||(Hr.current={scope:Fe,revision:cn.revision},Mn(cn.actions))},[cn.revision,cn.loading,cn.error,Ve,Fe,Mn]),p.useEffect(()=>{Jn.current=W},[W]);const Ot=z?_:ue||xe||H,Tn=F&&!et&&Ut==="idle"&&!X&&!M&&!!Ot&&!z&&!O&&I&&l==="user-transfer"&&!e.feeOnlyAction&&!e.actionInput&&!e.actionProceeds&&!!W&&Number(W.amount||"0")===0&&!!ee?.eligible&&ze>0n,cr=p.useMemo(()=>{if(!Tn||!W)return W;const U=10n**BigInt(W.asset.decimals);return{...W,amount:N.formatUnits(ze<U?ze:U,W.asset.decimals)}},[Tn,W,ze]),Vr=Jl({enabled:F&&!M&&!z&&!v,direction:A,selectedAsset:cr,destinationToken:w,chainId:R,recipient:Ot,paymentAmount:r,resolveExactOutputSwap:f,resolveInputSwap:e.resolveInputSwap,maxSlippage:e.maxSlippage}),zs=z?{...Vr,quoteKey:"direct-external",quoteExpiresAt:null,quoteAmountOut:null,inputAmount:null,inputDecimals:W?.asset.decimals??null,isQuoting:!1,quoteError:null,isDirect:!0,needsSwap:!1,selectedIsEquivalent:!0,resolvedTokenIn:w.address,resolvedSwap:null,exactOutputSwap:null,sourceSwap:null,sourceExactOutputSwap:null,pivot:null,estimatedInput:O?r:W?.amount??null,estimatedOutput:O?r:W?.amount??null}:Vr,Et=zs,{isQuoting:ri,resolvedSwap:Qr,exactOutputSwap:Gr,quoteAmountOut:oi,resolvedTokenIn:Rn,isDirect:ai,needsSwap:os,selectedIsEquivalent:Rd,sourceSwap:Kr,sourceExactOutputSwap:Yr,pivot:jt}=zs,Gn=O||v?parseFloat(r||"0"):parseFloat(W?.amount||"")||0,Bd=W?.asset?._source==="wallet",Od=!!W?.asset&&Bd&&W.asset.chainId!==R,jd=W?Number(N.formatUnits(ze,W.asset.decimals)):0,Dd=p.useMemo(()=>{if(!W||O)return!1;try{return dn(W.amount||"0",W.asset.decimals)>ze}catch{return!0}},[W,O,ze]);p.useEffect(()=>{if(!F){gn.current++,Zn(null),we?.(),Ft(null),it(!1);const U=an?.submissionStatus==="unknown"||!!an?.actionId&&an.step!=="success";!st&&!Qn&&!U&&(Wt("idle"),Bt(""),It(null),_t(!1),rn(null),ie.current?.scope===Fe&&(ie.current.progress=void 0)),Yt(null),Ge(!1),en(!1),yn(null),Hn.current=!1,fe.current&&!Qn&&!U&&(fe.current.abort(),fe.current=null)}},[F,st,Qn,Fe]);const ii=p.useCallback(U=>{if(!pt.current||Nt.current!==Fe||U.user&&!d.addressesEqual(U.user,Ze))return;const G=ie.current;G?.scope===Fe&&(U.actionId||U.submissionStatus==="unknown")&&((!G.progress?.actionId&&U.actionId||!G.progress?.submissionStatus&&U.submissionStatus==="unknown")&&$t.current++,G.progress={...G.progress,...U},Gt($=>({...$,scope:Fe,checking:!1,pending:U.step!=="success",error:null}))),Wt({building:"building","signing-delegation":"signing-delegation","signing-intent":"signing-intent",submitting:"submitting",executing:"executing",success:"success",error:"error"}[U.step]||"executing"),Bt(U.message),U.txHash&&It(U.txHash)},[Fe,Ze]),Fs=p.useMemo(()=>({currentPaymentAmount:r,isFeeInclusiveInput:I,feeOnlyAction:e.feeOnlyAction,swapInputAmount:zs.inputAmount,destinationToken:w,embeddedWalletAddress:ue,providerEmbeddedAddress:xe,externalWalletAddress:_,address:H,recipient:e.recipient??(j!=="7702"?_:void 0),isNon7702:P,isPayMode:O,resolvedChainId:R,buildActionCalls:oe,feeExecutionMode:l,buildSpicenetBatch:u,selectedAsset:W,combinedSourceGroup:mt,needsSwap:os,resolvedSwap:Qr,exactOutputSwap:Gr,quoteAmountOut:oi,resolvedTokenIn:Rn,sourceSwap:Kr,sourceExactOutputSwap:Yr,pivot:jt,resolveSourceExactOutputSwap:async U=>{if(!jt||!Ot)throw new Error("Swap route is not ready.");const G=await Xl({chainId:jt.source.chainId,recipient:Ot,tokenIn:W.asset.address,tokenOut:jt.source.address,amountOut:U,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage}).catch(()=>null);if(!G)throw new Error("No liquidity for this pair.");return G},resolveInputSwap:async(U,G)=>{if(!Rn||!Ot)throw new Error("Swap route is not ready.");return Ur({chainId:R,recipient:Ot,tokenIn:Rn,tokenOut:w.address,amountIn:U,selectedSwap:G,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage,resolveInputSwap:e.resolveInputSwap})}}),[r,mt,w,ue,xe,_,H,e.recipient,e.feeOnlyAction,e.maxSlippage,e.resolveInputSwap,zs.inputAmount,I,j,P,O,R,oe,l,u,W,mt,os,Qr,Gr,oi,Rn,Kr,Yr,jt,Ot,B?.liquidityVenues]),lr=p.useMemo(()=>v?k.address:W?.asset?jt?jt.destination.address:os&&Rn?Rn:W.asset.chainId===R?W.asset.address:Rn??Dn(W.asset,R)??w.address:w.address,[v,k,W,w.address,os,R,Rn,jt]),Bn=JSON.stringify([v&&[k,ut],W&&ye(W.asset),h,e.quoteOnlyAccount,e.actionExecution?.wallet,w.address,w.chainId,w.decimals,e.recipient,j,v?void 0:_,z?_:ue,B?.apiUrl,B?.rpcOverrides,e.maxSlippage,l,q,e.feeOnlyAction,e.quotedInclusivePlatformFee,C,e.actionProceeds==="output"?"output":e.actionProceeds&&"token"in e.actionProceeds?e.actionProceeds.token:e.actionProceeds?"multiple":void 0,e.feeFunding,e.actionInput?.map(U=>[U.token,U.amount.toString()]),e.feeFundingReserve&&ye(e.feeFundingReserve.asset),e.feeFundingReserve?.amount.toString(),B?.liquidityVenues,B?.allowedTokens,D,T,L,e.actionInput,e.actionProceeds,e.feeFunding,R,lr,Et.pivot?.source.address,Et.pivot?.destination.address],(U,G)=>typeof G=="bigint"?G.toString():G),ci=p.useRef(null);ci.current=F&&!et&&!X&&!M?Bn:null,p.useEffect(()=>()=>{on.current?.controller.abort(),on.current=null},[Bn,F,et,X,M]);const hn=N.keccak256(N.stringToHex(JSON.stringify([Bn,W?.amount,r]))),hs=JSON.stringify([H,de,xe,v?void 0:_,v?de:ne,te,Z,V,K]),Uo=JSON.stringify([hs,B?.apiUrl,B?.network]),Zr=Cn===Uo;p.useEffect(()=>()=>{gn.current++,wn.current.accepted&&(fe.current?.abort(),ht.current=!1,pt.current&&(At(!1),it(!1),Wt("idle"),Bt(""),It(null),pn(null),_t(!1),rn(null))),we?.()},[Uo]);const Xe=p.useRef({key:hn,enabled:F,quoteOnly:!!e.quoteOnlyAccount,sourceBalance:ze,physicalAssets:tt,combinedCash:Qe,combinationScope:$e,sourceEligible:ee?.eligible,externalSignerReady:!!me&&!!_,owner:Ot,walletScope:hs,policyAvailable:!X&&!M});(Xe.current.key!==hn||Xe.current.enabled!==F||Xe.current.quoteOnly!==!!e.quoteOnlyAccount||Xe.current.owner!==Ot||Xe.current.walletScope!==hs||Xe.current.policyAvailable!==(!X&&!M))&&qt.current++,Xe.current={key:hn,enabled:F,quoteOnly:!!e.quoteOnlyAccount,sourceBalance:ze,physicalAssets:tt,combinedCash:Qe,combinationScope:$e,sourceEligible:ee?.eligible,externalSignerReady:!!me&&!!_,owner:Ot,walletScope:hs,policyAvailable:!X&&!M};const Ts=p.useRef(!1),li=p.useRef(e.onSubmit);li.current=e.onSubmit;const di=p.useRef(e.beforeSubmit);di.current=e.beforeSubmit;const Xr=p.useCallback(async U=>{if(!Ts.current||ht.current)return;ht.current=!0,Ts.current=!1;const G=nt.current,$=Xe.current,ge=qt.current,pe=gn.current,ke={accepted:!1};wn.current=ke;const le=()=>!ke.accepted||pt.current&&pe===gn.current&&Xe.current.enabled&&Xe.current.walletScope===$.walletScope,De=Vt=>(...kt)=>{le()&&Vt(...kt)},xt={...G,execution:{...G.execution,onProgress:De(G.execution.onProgress)},ui:{setError:De(G.ui.setError),setStep:De(G.ui.setStep),setStatusMsg:De(G.ui.setStatusMsg),setTxHash:De(G.ui.setTxHash),setIsExecuting:De(G.ui.setIsExecuting),setShowStatusPanel:De(G.ui.setShowStatusPanel),setPaymentResult:De(G.ui.setPaymentResult)}},ct=xt.feeQuote,as=ct?.fundingSource,kn=JSON.stringify(as,(Vt,kt)=>typeof kt=="bigint"?kt.toString():kt),ln=JSON.stringify([ct?.sourceAllocation,ct?.feeSourceAllocation,ct?.fundingPlan,ct?.externalGasReserve],(Vt,kt)=>typeof kt=="bigint"?kt.toString():kt),$n=li.current,xs=Jt.current,ys={operationKey:$.key,feeQuote:ct,selectedAsset:xt.selectedAsset};At(!0),pn(null);const Dt=zr.current.revision;Hr.current={scope:Fe,revision:Dt};const yt={scope:Fe,version:ge};zt.current=yt;try{try{const Vt="The original action status is pending or unavailable. Check its status before submitting.";if(!await Mn(void 0,!0))throw new Error(Vt);await di.current?.(ys);const kt=zr.current;if(kt.scope!==Fe||kt.loading||kt.error)throw new Error(kt.error??Vt);if(kt.revision!==Dt&&kt.updatedAt&&(Hr.current={scope:Fe,revision:kt.revision},!await Mn(kt.actions,!0)))throw new Error(Vt);const Zt=zr.current;if(Zt.scope!==Fe||Zt.loading||Zt.error||Zt.revision!==Dt&&Zt.actions.some(tn=>tn.intents.length!==1||Tt.current.scope!==Fe||!Tt.current.terminal.has(tn.actionId)))throw new Error(Zt.error??Vt);const Un=Xe.current,Os=nt.current;if(!pt.current||ge!==qt.current||!Un.enabled||Un.key!==$.key||Un.owner!==$.owner||!Pt.current||Os?.feeQuote!==ct||ct?.fundingSource!==as||JSON.stringify(ct?.fundingSource,(tn,Je)=>typeof Je=="bigint"?Je.toString():Je)!==kn||JSON.stringify([ct?.sourceAllocation,ct?.feeSourceAllocation,ct?.fundingPlan,ct?.externalGasReserve],(tn,Je)=>typeof Je=="bigint"?Je.toString():Je)!==ln)throw new Error("The wallet, policy or accepted action quote changed. Review again before submitting.");xt.validateFeeQuote?.(),$n?.(),Kt.current=xt.onSuccess,ie.current={key:$.key,quote:ct,scope:Fe,routedExternal:se}}catch(Vt){const kt=d.sanitizeError(Vt,"Unable to prepare this action");pt.current&&(pn(kt),Wt("idle")),xs?.(new Error(kt),d.getRelayerErrorDetail(kt));return}finally{zt.current===yt&&(zt.current=null)}await(U?Ml(xt):Nl(xt))}finally{wn.current===ke&&(ht.current=!1,pt.current&&At(!1))}},[Mn,Fe,se]),ui=p.useCallback(()=>Xr(!1),[Xr]),Jr=z,Wo=M,pi=!Mt.current?.quote.fundedFeeToken&&(I||!!jt)&&!!xn&&xn.netAmount===0n,dr=p.useMemo(()=>!!e.feeOnlyAction||v&&Gn>0||(!!W?.asset||!!e.actionProceeds)&&Gn>0,[W,Gn,e.actionProceeds,e.feeOnlyAction,v]),gs=p.useMemo(()=>!F||!dr||!W?.asset&&!e.actionProceeds&&!e.feeOnlyAction&&!v?null:[hn,at,v?Rt:"",C?`${$e}:${Qe?.scope===$e?JSON.stringify(Qe.balances,(U,G)=>typeof G=="bigint"?G.toString():G):"pending"}`:"",O?"pay":"supply",h,W?ye(W.asset):"sdk-funded",e.actionInput?.map(U=>`${U.token.toLowerCase()}:${U.amount}`).join(",")??"",e.feeFunding?.join(",")??"",e.quoteOnlyAccount??"executable",e.quotedInclusivePlatformFee?"quoted-inclusive-fee":"split-inclusive-fee",JSON.stringify(B?.rpcOverrides),B?.apiUrl,e.recipient,W?.asset.address.toLowerCase(),W?.asset.chainId,W?.amount,r,w.address.toLowerCase(),w.chainId,R,Et.resolvedTokenIn?.toLowerCase()??"",Et.quoteKey,Et.needsSwap?"swap":"direct",Et.isDirect?"direct-token":"routed-token","7702",Ae?"source-dest":"cross-chain",Et.isQuoting?"quoting":"quoted",Et.exactOutputSwap?.amountIn?.toString()??"",Et.exactOutputSwap?.amountInMax?.toString()??"",Et.exactOutputSwap?.venue??"",Et.resolvedSwap?.amountOut?.toString()??"",Et.quoteAmountOut?.toString()??"",Et.sourceSwap?.amountOutMinimum?.toString()??"",Et.sourceExactOutputSwap?.amountInMax?.toString()??"",Et.pivot?.source.address.toLowerCase()??"",ue??"",xe??"",H??""].join("|"),[F,C,$e,Qe,hn,v,Rt,at,e.actionProceeds,e.feeOnlyAction,e.actionInput,e.feeFunding,e.quotedInclusivePlatformFee,e.quoteOnlyAccount,et,Ut,dr,Jr,W,O,h,r,w,R,Et,P,Ae,ue,xe,H]),fi=(U,G)=>{const $=G.filter(ge=>ge.location==="rollup"&&Pr(ge,Ot,k));for(const ge of U){if(ge.location!=="embedded")continue;const pe=Ds(ge.chainId);for(const ke of $){const le=Object.entries(ke.chainTokens??{}).filter(([De])=>In(De)?.chainId===ge.chainId);if(le.length&&(le.length!==1||!d.addressesEqual(In(le[0][0])?.address,pe?.address)||le[0][1].decimals!==void 0&&le[0][1].decimals!==pe?.decimals))throw new Error("The source funding receipt mapping changed. Refresh before submitting.")}}},$r=p.useCallback(async(U,G)=>{if(!v||!E.token||!Ot||X)throw new Error(X??"The account funding route is not ready.");if(Me.some($=>$.location==="rollup"&&(Qe?.scope!==$e||Qe.balances[ye($)]===void 0)))throw new Error("The cash reservations are unavailable. Refresh before submitting.");return fi(bt.map($=>$.asset),tt),zl({owner:Ot,token:k,budget:U,sources:bt,destinationToken:w,beneficiary:e.recipient,buildActionCalls:oe,requestTimestampMs:Date.now(),signal:G,resolveSourceInput:($,ge,pe)=>Ur({chainId:$.chainId,recipient:Ot,tokenIn:S.normalizeNativeTokenAddress($.address),tokenOut:ge.address,amountIn:pe,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage}),resolveSourceOutput:($,ge,pe)=>Xl({chainId:$.chainId,recipient:Ot,tokenIn:S.normalizeNativeTokenAddress($.address),tokenOut:ge.address,amountOut:pe,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage}),resolveDestinationInput:$=>Ur({chainId:k.chainId,recipient:Ot,tokenIn:k.address,tokenOut:w.address,amountIn:$,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage,resolveInputSwap:e.resolveInputSwap}),estimate:J})},[v,E.token,Ot,X,k,bt,Me,tt,Qe,$e,w,e.recipient,oe,B?.liquidityVenues,e.maxSlippage,e.resolveInputSwap,J]),Nd=p.useMemo(()=>{if(!v||!E.token||We||Pe)return;const U=new Set(JSON.parse(ut));if(tt.some($=>U.has(ye($))&&($.balanceStatus==="stale"||!!$.balanceError)))return;let G=0;for(const $ of Me){const ge=$.location==="rollup"?Qe?.scope===$e?Qe.balances[ye($)]:void 0:$.balance;if(ge===void 0)return;if(ge===0n)continue;const pe=Number(N.formatUnits($.balance,$.decimals)),ke=Number(N.formatUnits(ge,$.decimals));if($.priceStatus!=="fresh"||!Number.isFinite($.balanceUsd)||$.balanceUsd<=0||!Number.isFinite(pe)||pe<=0)return;G+=$.balanceUsd*ke/pe}if(!(!Number.isFinite(G)||G<0||G>=1e15))return dn(G.toFixed(k.decimals),k.decimals)},[v,E.token,We,Pe,ut,tt,Me,Qe,$e,k.decimals]),Md=p.useCallback(async()=>{if(!v||!F||M||X)return null;const U=Xe.current;try{const G=await $r("max");return!pt.current||!Xe.current.enabled||Xe.current.key!==U.key||Xe.current.owner!==U.owner?null:G.fundingPlan?N.formatUnits(G.fundingPlan.totalBudget,k.decimals):null}catch{return null}},[v,F,M,X,$r,k.decimals]),ur=p.useCallback(async(U,G,$)=>{if(v)return $r(dn(r,k.decimals),U);if(z){if(!_||!W)throw new Error("Connect the external wallet before continuing.");return rf({selectedAsset:G?.selectedAsset??W,destinationToken:w,paymentAmount:O?r:void 0,account:_,beneficiary:e.recipient,buildActionCalls:oe,feeExecutionMode:l})}const ge={...$??{...Fs,selectedAsset:cr},requestTimestampMs:Date.now()};if(C&&W&<(W.asset)&&!mt)throw new Error("The combined source balance and reservations are unavailable. Refresh before submitting.");const pe={combineSourceBalances:C,combinedSourceGroup:mt,getCombinedSourceGroup:_e,signal:U,feeToleranceBps:q,externalGasRecipient:se?_:void 0,externalGasCalls:se?async le=>(await Pl({quote:le,recipient:_,beneficiary:e.recipient,chainId:w.chainId,token:w.address,feeExecutionMode:l,buildCalls:a})).calls:void 0,feeOnlyAction:e.feeOnlyAction,actionInput:e.actionInput,actionProceeds:cl(e.actionProceeds),actionProceedsCandidates:e.actionProceeds&&e.actionProceeds!=="output"&&!("token"in e.actionProceeds)?e.actionProceeds.resolve:void 0,feeFunding:e.feeFunding,feeFundingBalances:un,feeFundingError:Pe,feeFundingReserve:e.feeFundingReserve,liquidityVenues:B?.liquidityVenues,maxSlippage:e.maxSlippage,resolveExactOutputSwap:f,selectedAsset:cr,isPayMode:O,isFeeInclusiveInput:I,quotedInclusivePlatformFee:e.quotedInclusivePlatformFee,parsedAmount:Tn?Number(cr.amount):Gn,needsSwap:Et.needsSwap,exactOutputSwap:Et.exactOutputSwap,isNon7702:P,isSourceDestToken:Ae,currentPaymentAmount:r,destinationToken:w,feeExecutionMode:l,resolvedTokenIn:Et.resolvedTokenIn,embeddedWalletAddress:ue,providerEmbeddedAddress:xe,resolvedChainId:R,isConnected:V,address:H,ready:te,authenticated:Z,quoteOnly:!!e.quoteOnlyAccount,isDirect:Et.isDirect,resolvedSwap:Et.resolvedSwap,sourceSwap:Et.sourceSwap,sourceExactOutputSwap:Et.sourceExactOutputSwap,pivot:Et.pivot,isQuoting:Et.isQuoting,executionTokenAddress:lr,buildPayChainBatches:le=>rr(ge,le),buildSupplyChainBatches:le=>Co(ge,le),estimate:J,...G},ke=!pe.feeOnlyAction&&pe.selectedAsset&&St&&(pe.selectedAsset.asset._source==="wallet"||!!pe.combinedSourceGroup)&&pe.selectedAsset.asset.chainId===R;if(St&&!pe.feeOnlyAction&&pe.selectedAsset&&!ke&&e.feeFunding&&e.feeFunding.join(",")!==ko.join(","))throw new Error("Fee-source overrides require a wallet source on the action chain.");if(ke&&Xt&&!b){const le=await ns(pe);if(le&&le.preview.gasFee+le.preview.spicenetFee+(le.preview.bridgeFee??0n)>0n)return le}return ke||St&&e.actionProceeds==="output"?vl(pe,ge,ns,e.actionProceeds==="output"):ns(pe)},[v,$r,k.decimals,W,e.quoteOnlyAccount,St,Xt,b,C,mt,_e,lt,cr,Tn,z,se,a,_,e.recipient,oe,e.feeOnlyAction,e.actionInput,e.actionProceeds,e.feeFunding,e.quotedInclusivePlatformFee,un,Pe,e.feeFundingReserve,e.maxSlippage,f,q,B?.liquidityVenues,O,I,Gn,Et,P,Ae,r,w,l,ue,xe,Fs,J,R,V,H,te,Z,lr]);p.useEffect(()=>{mn.current=ur},[ur]);const qo=p.useCallback(async U=>{if(O)return null;if(!W||ye(U)!==ye(W.asset)||!Ot||!Rn)throw new Error("Select a source before calculating Max.");let G=ae(U);if(G===void 0)throw new Error("This source is unavailable.");if(z){if(!U.isNative&&!S.isNativeToken(U.address))return N.formatUnits(G,U.decimals);const $=d.getClientForChain(U.chainId),ge=_;let pe=G;for(let ke=0;ke<8;ke++){const le=await ur(void 0,{selectedAsset:{asset:U,amount:N.formatUnits(ke===0?1n:pe,U.decimals)}});if(!le?.actionDefinition)throw new Error("The direct action could not be sized.");const De=await Ll({client:$,account:ge,calls:le.actionDefinition.calls}),xt=G>De?G-De:0n;if(xt===0n)return"0";if(ke>0&&pe<=xt)return N.formatUnits(pe,U.decimals);pe=xt}throw new Error("Network gas could not be reserved for Max. Enter a smaller amount.")}if(Q&&(U.isNative||S.isNativeToken(U.address))){if(!_)throw new Error("Connect the source wallet before calculating Max.");const $=await Hl({client:d.getClientForChain(U.chainId),account:_,recipient:Ot,token:U.address,isNative:!0,amount:1n});G-=$}return b&&I&&U._source==="wallet"&&U.chainId===R?N.formatUnits(G>0n?G:0n,U.decimals):El({balance:G,decimals:U.decimals,planForAmount:async $=>{const ge={...Fs,requestTimestampMs:Date.now(),selectedAsset:{asset:U,amount:N.formatUnits($,U.decimals)}};let pe=$;jt?(ge.sourceSwap=await Ur({chainId:U.chainId,recipient:Ot,tokenIn:U.address,tokenOut:jt.source.address,amountIn:$,maxSlippage:e.maxSlippage,liquidityVenues:B?.liquidityVenues,resolveInputSwap:e.resolveInputSwap}),pe=Lt(ge.sourceSwap.amountOutMinimum,jt.source.decimals,jt.destination.decimals,"floor")):pe=nn($,U.decimals,await es(U,Rn,R,w)),ge.resolvedSwap=os?await ge.resolveInputSwap(pe):null,ge.swapInputAmount=pe,ge.quoteAmountOut=ge.resolvedSwap?.amountOut??pe;const ke=St&&U._source==="wallet"&&U.chainId===R,le=await ur(void 0,{selectedAsset:ge.selectedAsset,...ke?{isFeeInclusiveInput:!0}:{},parsedAmount:Number(ge.selectedAsset.amount),sourceSwap:ge.sourceSwap,resolvedSwap:ge.resolvedSwap,isQuoting:!1,buildSupplyChainBatches:De=>Co(ge,De)},ge);return ke&&le?.fundingSource?.kind==="input"&&!I?{...le,sourceSpendCap:$+($-le.swapInputAmount)}:le}})},[W,St,b,Fs,O,z,Ot,Rn,R,w,Q,_,jt,os,ur,ae,e.maxSlippage,e.resolveInputSwap,e.actionProceeds,e.feeFunding,e.quotedInclusivePlatformFee,I,B?.liquidityVenues]),Pd=JSON.stringify([Bn,hs,ft,W?.asset,e.feeFundingReserve,e.actionExecution?.recoveryKey,os,Rn,jt,F,X,M],(U,G)=>typeof G=="bigint"?G.toString():G),mi=p.useRef(qo);p.useLayoutEffect(()=>{mi.current=qo},[qo]);const hi=p.useCallback(U=>mi.current(U),[Pd,oe,u,f,e.resolveInputSwap,typeof e.actionProceeds=="object"?e.actionProceeds.resolve:void 0,J]);ia({shouldRun:F&&!et&&Ut==="idle"&&(dr||Tn)&&!Et.isQuoting&&!Le&&(!!gs||Tn),deps:[F,et,Ut,dr,Jr,Et.isQuoting,gs,Le,Tn,Bn],onSkip:()=>{if(!F){Fn.current=null,Ge(!1),en(!1),yn(null),Yt(null);return}if(et||Ut!=="idle"){Ge(!1);return}if(!dr){Yt(null),Ge(!1),en(!1),yn(null);return}Et.isQuoting&&(Ge(!1),en(!1))},onCleanup:()=>Ge(!1),delayMs:Et.needsSwap||Et.pivot?0:100,backgroundIntervalMs:3e4,run:async({isBackground:U,isCurrent:G,signal:$})=>{if(Tn){const pe=Fn.current;if(pe?.scope===Bn&&Date.now()-pe.at<3e4||on.current?.scope===Bn&&Date.now()-on.current.at<3e4)return;on.current?.controller.abort();const ke=new AbortController,le=mn.current?.(ke.signal).then(De=>{ke.signal.aborted||ci.current!==Bn||!De?.feeEstimate||(Fn.current={scope:Bn,at:Date.now(),feeEstimate:De.feeEstimate,sourceGasSkim:De.sourceGasSkim})}).catch(De=>{ke.signal.aborted||console.debug("[SpiceSupply] fee prewarm unavailable:",De)})??Promise.resolve();on.current={scope:Bn,at:Date.now(),controller:ke,promise:le},await le;return}const ge=gs;U||(yn(null),Ge(!0));try{if(on.current?.scope===Bn&&await on.current.promise,$.aborted||!G())return;const pe=Fn.current,ke=!O&&pe?.scope===Bn&&Date.now()-pe.at<3e4?pe:void 0;let le;try{le=await mn.current?.($,ke?{initialFeeEstimate:ke.feeEstimate,initialSourceGasSkim:ke.sourceGasSkim}:void 0)}catch(De){if(!ke||$.aborted||!G())throw De;le=await mn.current?.($)}if(!G())return;if(le&&ge){const De=se?await Pl({quote:le,recipient:_,beneficiary:e.recipient,chainId:w.chainId,token:w.address,feeExecutionMode:l,buildCalls:a}):void 0;if(De&&le.externalGasReserve?.nativeAmount&&(De.calls.length>le.externalGasReserve.currentTransactions||De.calls.reduce((xt,ct)=>xt+ct.value,0n)>le.externalGasReserve.currentValue))throw new Error("The external action gas requirement changed. Refresh the quote.");if($.aborted||!G())return;Mt.current={key:ge,quote:le,externalAction:De},le.feeEstimate&&(Fn.current={scope:Bn,at:Date.now(),feeEstimate:le.feeEstimate,sourceGasSkim:le.sourceGasSkim}),Yt(le.preview),en(!0)}else Mt.current=null,Yt(null),en(!1);yn(null)}catch(pe){if(!G())return;if(U&&Mt.current?.key===ge){console.warn("[SpiceSupply] fee refresh failed:",pe);return}const ke=d.sanitizeError(pe,"Unable to calculate fees for this action.");Mt.current=null,Yt(pe instanceof Ao?pe.preview:null),en(!1),Xn.current=ge,yn(ke)}finally{G()&&Ge(!1)}}});const gi=p.useCallback(()=>Xr(!0),[Xr]);p.useEffect(()=>{if(!Ue||fs.current===Ue)return;fs.current=Ue;const U=Kt.current;Ss.current=!0,Be(!0),Ls(null),Promise.resolve().then(()=>U?.(Ue)).then(()=>{ss(Ue),Te(),ve()}).catch(G=>{Ls(`Transaction confirmed; application update needs retry: ${d.sanitizeError(G,"Unable to finalize the action")}`)}).finally(()=>{Ss.current=!1,Be(!1)})},[Ue,Ct]);const wi=st&&!Vn,Ud=p.useCallback(()=>{!bn.current||Ss.current||(fs.current=null,He(U=>U+1))},[]),Wd=p.useCallback(()=>{if(bn.current)return;const U=ie.current?.progress;U?.submissionStatus==="unknown"||U?.actionId&&U.step!=="success"||(_t(!1),rn(null),Hn.current=!1,Te(),ve())},[Te,ve]),qe=gs&&Mt.current?.key===gs?Mt.current.quote:null,Rs=qe?Mt.current?.externalAction:void 0,qd=qt.current,Bs=(U=!0)=>{if(X)throw new Error(X);if(!pt.current||!Xe.current.enabled||Xe.current.key!==hn||qt.current!==qd||Xe.current.walletScope!==hs||!Xe.current.policyAvailable)throw new Error("The source, amount, beneficiary or configuration changed. Review the form before continuing.");if(se&&!Xe.current.externalSignerReady)throw new Error("Connect the external wallet before funding.");const G=qe?.externalGasReserve?.fundingSource;if(U&&G){const $=Xe.current.physicalAssets.find(ge=>ye(ge)===ye(G.asset));if(!$||$.balanceError||$.balanceStatus||$.balance<G.amount||$._source!=="wallet"||Ks($)||$.owner&&!d.addressesEqual($.owner,Xe.current.owner))throw new Error("The gas reserve source balance changed. Refresh the quote before submitting.")}if((W||e.feeOnlyAction||v)&&!qe)throw new Error("A current action plan is required. Refresh the quote before submitting.");if(U&&qe?.fundingPlan){const $=qe.fundingPlan;if(fi($.sources.map(ke=>ke.asset),Xe.current.physicalAssets),!d.addressesEqual($.owner,Xe.current.owner)||!d.addressesEqual($.token.address,k.address)||$.token.chainId!==k.chainId||$.token.decimals!==k.decimals||$.totalBudget!==dn(r,k.decimals))throw new Error("The accepted account funding plan changed. Review again.");for(const ke of qe.batches??[])if(!(ke.domain!=="spicenet"&&!S.isSpicenetChainId(ke.chainId)))for(const le of ke.calls){const De=N.decodeFunctionData({abi:S.spicenetAbi,data:le.data});if(De.functionName!=="createWithdrawalRequest"||De.args[0].exp<=BigInt(Math.floor(Date.now()/1e3)))throw new Error("The accepted withdrawal expired. Refresh before funding this purchase.")}const ge=new Set(JSON.parse(ut)),pe=new Set;for(const ke of $.sources){const le=Xe.current.physicalAssets.find(xt=>ye(xt)===ke.positionId),De=le?.location==="rollup"?Xe.current.combinedCash?.scope===Xe.current.combinationScope?Xe.current.combinedCash.balances[ke.positionId]:void 0:le?.balance;if(!le||pe.has(ke.positionId)||!ge.has(ke.positionId)||!Pr(le,$.owner,$.token)||!Yn(le,"spend-source",{...B,isWhitelistGateActive:D},k,T).eligible||le.chainId!==ke.chainId||le.decimals!==ke.decimals||!d.addressesEqual(le.address,ke.token)||!d.addressesEqual(ke.owner,$.owner)||ke.sourceSpendCap<=0n||De===void 0||ke.sourceSpendCap>De)throw new Error("A funding source balance, owner or policy changed. Review again.");pe.add(ke.positionId)}if(!pe.size)throw new Error("The accepted funding sources are unavailable.")}if(U)for(const $ of[qe?.sourceAllocation,qe?.feeSourceAllocation]){if(!$)continue;const ge=$.positions.find(ke=>ke.asset.location==="rollup"),pe=Xe.current.combinedCash?.balances[ge.positionId];if(pe===void 0||Xe.current.combinedCash?.scope!==Xe.current.combinationScope)throw new Error("The combined source reservations are unavailable. Refresh before submitting.");vo($,Xe.current.physicalAssets,Xe.current.owner??void 0,R,pe)}if(z&&W?.asset.owner&&!d.addressesEqual(W.asset.owner,_))throw new Error("Reconnect the external wallet that owns the selected asset.");if(U&&W&&(qe?.sourceSpendCap??0n)>Xe.current.sourceBalance)throw new Error("The source balance changed. Review the available amount before continuing.");if(U&&W&&!Xe.current.sourceEligible)throw new Error(ee?.reason??"This source is unavailable.");if(U)for(const $ of[qe?.sourceAllocation,qe?.feeSourceAllocation])$&&vo($,Xe.current.physicalAssets,Xe.current.owner??void 0,R)},xi=async()=>{if(Bs(),qe?.fundingPlan){const G=qe.fundingPlan;for(const $ of G.sources){if($.asset.location!=="rollup")continue;const ge=await ps(G.owner,G.token.chainId,G.token.address);if(Bs(),!ge.entries.some(pe=>pe.receiptToken===$.asset.receiptTokenId&&pe.decimals===$.asset.receiptTokenDecimals)||Lt(ge.available,G.token.decimals,$.decimals,"floor")<$.sourceSpendCap)throw new Error("The cash receipt balance or reservations changed. Review again.")}return}const U=qe?.sourceAllocation;for(const G of[U,qe?.feeSourceAllocation]){if(!G)continue;const $=await ps(G.owner,G.chainId,G.token);Bs();const ge=await d.getClientForChain(G.chainId).readContract({address:G.token,abi:N.erc20Abi,functionName:"balanceOf",args:[G.owner]});Bs();const pe=Xe.current.physicalAssets.map(le=>le.location==="embedded"&&ye(le)===G.positions.find(De=>De.asset.location==="embedded")?.positionId?{...le,balance:ge}:le),ke=G.positions.find(le=>le.asset.location==="rollup");if(!$.entries.some(le=>le.receiptToken===ke.asset.receiptTokenId&&le.decimals===ke.asset.receiptTokenDecimals))throw new Error("The cash receipt mapping changed. Refresh before submitting.");vo(G,pe,G.owner,G.chainId,Lt($.available,G.decimals,ke.asset.decimals,"floor"))}if(!U){const G=W?.asset.location==="rollup"?W.asset:qe?.fundingSource?.asset?.location==="rollup"?qe.fundingSource.asset:void 0;if(!C||!G)return;const $=Dn(G,R);if(!$)throw new Error("The cash receipt mapping is unavailable. Refresh before submitting.");const ge=await ps(Ot,R,$),pe=await es(G,$,R,w);Bs();const ke=qe?.fundedFeeToken&&qe.fundingSource?.asset?.location==="rollup"?Lt(qe.grossFundingAmount??0n,qe.fundedFeeToken.decimals,G.decimals,"ceil"):qe?.sourceSpendCap??0n;if(!ge.entries.some(le=>le.receiptToken===G.receiptTokenId&&le.decimals===G.receiptTokenDecimals)||Lt(ge.available,pe,G.decimals,"floor")<ke)throw new Error("The cash balance or reservations changed. Refresh before submitting.");return}},pr=async()=>xi(),yi=U=>({...U,sourceSpendCap:qe?.sourceSpendCap,minimumDestinationAmount:qe?.destinationAmount}),_r=qe?.sourceAllocation?.insufficient||qe?.feeSourceAllocation?.insufficient?!0:W&&qe?.sourceSpendCap!==void 0?qe.sourceSpendCap>ze:Dd,bi={...Fs,resolvedSwap:qe?.destinationSwap??Fs.resolvedSwap,swapInputAmount:qe?.swapInputAmount??Fs.swapInputAmount};let Hs=!1;nt.current={selectedAsset:W,parsedAmount:Gn,currentPaymentAmount:r,isInsufficientBalance:_r,isPayMode:O,isFeeInclusiveInput:I,quotedInclusivePlatformFee:e.quotedInclusivePlatformFee,feeOnlyAction:e.feeOnlyAction,actionProceeds:cl(e.actionProceeds,qe?.fundingSource?.kind==="proceeds"?qe.fundingSource.token:void 0),validateFeeQuote:()=>Bs(!Hs),isNon7702:P,directExternalAction:z,isSourceDestToken:Ae,needsSwap:os,exactOutputSwap:Gr,selectedIsEquivalent:Rd,resolvedTokenIn:Rn,sourceSwap:Kr,sourceExactOutputSwap:Yr,pivot:jt,embeddedWalletAddress:ue,providerEmbeddedAddress:xe,externalWallet:me,externalWalletAddress:_,activeSignerWallet:Ce,activeSignerAddress:ne,address:H,isConnected:V,ready:te,authenticated:Z,provider:K,resolvedChainId:R,executionTokenAddress:lr,destinationToken:w,buildActionCalls:oe,feeExecutionMode:l,feeToleranceBps:q,buildSpicenetBatch:u,onPayExecute:m,onSuccess:y,feeQuote:qe,execution:{estimate:(U,G,$,ge)=>J(U,G,$,{...ge,userOverride:Ot}),execute:async(U,G,$,ge,pe,ke)=>{const le=gn.current,De=wn.current;let xt;const ct=ge;if(ge=yt=>{yt.actionId&&(De.accepted=!0,xt=yt.actionId),ct?.(yt)},!pe){const yt=new AbortController;fe.current=yt,pe=yt.signal}const as=pe,kn=()=>pt.current&&Xe.current.enabled&&Xe.current.walletScope===hs&&gn.current===le&&!as.aborted,ln=()=>new d.SpiceflowError("ABORT","Execution observation retired"),$n=async yt=>{if(De.accepted&&!kn())throw ln();return new Promise((Vt,kt)=>{const Zt=()=>{De.accepted&&kt(ln())};as.addEventListener("abort",Zt,{once:!0}),yt().then(Un=>{!De.accepted||kn()?Vt(Un):kt(ln())},kt).finally(()=>as.removeEventListener("abort",Zt))})},xs=async()=>Hs?Bs(!1):xi();if(await pr(),await kl(qe?.externalGasReserve),se&&!Rs)throw new Error("The external action plan is unavailable.");if(z){if(!qe?.actionDefinition)throw new Error("The direct action plan is unavailable.");return Ma({definition:qe.actionDefinition,account:_,chainId:w.chainId,wallet:me,assertCurrent:pr})}const ys=new d.RelayerService;if(ys.setBaseUrl(gt),se&&!await ys.supportsExternalExecution())throw Error("This API cannot yet record the external wallet action. No source funds were sent.");let Dt=!1;try{Q&&W&&(Bt("Transfer the selected source to your embedded wallet"),await Vl({asset:W.asset,embedded:Ot,external:_,externalWallet:me,amount:qe?.sourceSpendCap??0n,assertCurrent:pr,observer:{onSending:()=>{Dt=!0},onRejected:()=>{Dt=!1},onReverted:()=>{Dt=!1}}}),Hs=!0,await xs()),ie.current?.scope===Fe&&(ie.current.batches=U.map(Je=>({...Je})));const yt=[U,G,$,se?Je=>ge?.(Je.step==="success"?{...Je,step:"executing",message:"Funds delivered. Confirm the action in your external wallet.",txHash:void 0}:{...Je,txHash:void 0}):ge,pe,{...ke,userOverride:Ot,requireDestinationReceipt:!0,...se?{externalExecution:{chainId:w.chainId,executor:_,inputToken:w.address,inputAmount:Rs.amount.toString(),recoveryKey:e.actionExecution.recoveryKey,calls:Rs.calls.map(Je=>({to:Je.to,data:Je.data,value:Je.value.toString()}))}}:{},resolveActionOutputCredits:async()=>[...await ke?.resolveActionOutputCredits?.()??[],...qe?.actionOutputCredits??[],...qe?.fundingPlan?.sources.flatMap(Je=>Je.asset.location==="embedded"&&Je.swap?[{chainId:Je.chainId,token:Je.pivotToken.address,amount:Je.amountOutMinimum}]:[])??[],...qe?.externalGasReserve?.nativeAmount&&!S.isNativeToken(qe.externalGasReserve.fundingSource?.token??lr)?[{chainId:R,token:S.ZERO_ADDRESS,amount:qe.externalGasReserve.nativeAmount}]:[]],walletFundingRequirements:qe?Ba(qe,W):void 0,validateBeforeSubmit:async Je=>{if(await xs(),await kl(qe?.externalGasReserve,Je),await ke?.validateBeforeSubmit?.(Je),se&&Ul(Je,w.address,w.chainId,_)!==Rs.amount)throw new Error("The external delivery changed. Review the quote before continuing.")}}],Vt=()=>Y(...yt);let kt,Zt=0;for(;;)try{kt=await $n(Vt);break}catch(Je){if(De.accepted&&!kn())throw ln();if(!(Je instanceof d.SpiceflowError)||Je.context.submissionStatus!=="accepted"||Je.code==="ON_CHAIN_REVERT"||Je.code==="ABORT")throw Je;De.accepted=!0,ge?.({step:"executing",message:"Your action was accepted. Confirming the original transaction...",actionId:Je.context.actionId,intentId:Je.context.intentId}),await $n(()=>qn(Math.min(1e3*2**Math.min(Zt++,5),3e4)))}if(!se)return kt;Hs=!0;const Un=async()=>{if(pe?.aborted)throw new Error("Execution transaction aborted");await xs()};if(await Un(),await gf({hash:kt,token:w.address,chainId:w.chainId,recipient:_,sender:Ot,amount:Rs.amount}),await Un(),!xt)throw Error("The original external action identity is unavailable. Check its status before continuing.");const Os=await Ma({definition:Rs,account:_,chainId:w.chainId,wallet:me,assertCurrent:Un,originalAction:{actionId:xt,service:ys}}),tn=ie.current;return tn?.scope===Fe&&tn.progress&&(tn.progress={...tn.progress,step:"success",txHash:Os,message:"Transaction confirmed"},ii(tn.progress)),Os}catch(yt){const Vt=yt instanceof d.SpiceflowError&&(yt.context.submissionStatus==="unknown"||yt.context.submissionStatus==="accepted");throw pt.current&&Xe.current.enabled&&gn.current===le&&Xe.current.walletScope===hs&&(Vt||Hs||Dt)&&Zn(Uo),Dt&&!Hs?new d.SpiceflowError("SUBMISSION_UNKNOWN","The wallet transfer outcome is unknown. Close this action and check your activity and balances before continuing.",{submissionStatus:"unknown",cause:yt}):(d.sanitizeError(yt),yt)}},buildPayChainBatches:async U=>Io(await rr(bi,yi(U)),qe?.externalGasReserve),buildSupplyChainBatches:async U=>Io(await Co(bi,yi(U)),qe?.externalGasReserve),onProgress:ii},ui:{setError:Ft,setStep:Wt,setStatusMsg:Bt,setTxHash:It,setIsExecuting:it,setShowStatusPanel:_t,setPaymentResult:rn},refs:{spiceDepositSubmittedRef:Hn,abortControllerRef:fe}};const Vs=!!e.isZeroAmountPay&&!e.feeOnlyAction&&O&&Gn===0,Ld=v?Gn>0&&!!qe?.fundingPlan&&!!qe.batches?.length&&!et&&fn&&!Nn&&!Wo:O?(Vs||!!W?.asset||!!e.actionProceeds||!!e.feeOnlyAction)&&Gn>=0&&!_r&&!et&&(Vs||Jr||fn)&&!Nn&&(Vs||e.feeOnlyAction||!os||!!Gr)&&(Vs||e.feeOnlyAction||!jt||!!Yr)&&!Wo:!!W?.asset&&Gn>0&&!_r&&!et&&(z||fn)&&!Nn&&!pi&&(jt?!!Kr&&!ri&&(ai||!!Qr):Od||ai||!!Qr&&!ri)&&!Wo,vi=!e.quoteOnlyAccount&&(z||te&&Z&&V&&!!H)&&!X&&!Zr&&!!Ot&&(!se||!!Rs&&!!me&&!!_)&&(!z||!!me&&(!W?.asset.owner||d.addressesEqual(W.asset.owner,_)))&&(j==="7702"||!!_)&&!st&&!re&&!Vn&&F&&Ld&&(Vs||v&&!!qe?.fundingPlan||!W&&(!!e.actionProceeds||!!e.feeOnlyAction)||!!ee?.eligible)&&!(Ue&&ie.current?.key===hn)&&!zs.quoteError&&(Vs||!!gs&&Mt.current?.key===gs);Pt.current=vi;const zd=vi&&Td&&!e.submitDisabled&&!Ve&&!ht.current,fr=p.useCallback(async()=>{if(Xe.current.quoteOnly||ht.current||bn.current)return;const U=ie.current?.scope===Fe?ie.current:void 0,G=vt.scope===Fe?vt.externalActionId??(U?.routedExternal?U.progress?.actionId:void 0):void 0;if(!G||!me||!_||!e.actionExecution)return;const $=gn.current,ge=Xe.current.walletScope,pe=()=>{if(!pt.current||!Xe.current.enabled||Xe.current.quoteOnly||Xe.current.walletScope!==ge||gn.current!==$||Nt.current!==Fe||!Xe.current.policyAvailable)throw Error("The original action wallet or application scope changed. Check status before continuing.")};ht.current=!0,Ts.current=!1,it(!0),_t(!0),pn(null),Bt("Checking your transaction and wallet balances...");const ke=new d.RelayerService;ke.setBaseUrl(gt);try{pe(),await ve(),pe();const le=await ke.getExternalExecution(G);if(pe(),le.recoveryKey!==e.actionExecution.recoveryKey||le.chainId!==R||!d.addressesEqual(le.executor,_))throw Error("The original external action belongs to another wallet, chain or application action.");const De=await Ma({definition:{amount:BigInt(le.inputAmount),context:{userAddress:_,executorAddress:_,chainId:le.chainId,destinationToken:le.inputToken},calls:le.calls.map(xt=>({to:xt.to,data:xt.data,value:BigInt(xt.value)}))},account:_,chainId:le.chainId,wallet:me,assertCurrent:pe,originalAction:{actionId:G,service:ke,resume:!0}});pe(),Kt.current=y,It(De),Wt("success"),Bt("Transaction confirmed"),rn(xt=>xt&&{status:"success",txHash:De}),U?.progress&&(U.progress={...U.progress,step:"success",txHash:De,submissionStatus:void 0}),Gt(xt=>({...xt,scope:Fe,pending:!1,error:null,externalExecution:void 0,externalActionId:void 0}))}catch(le){if(pt.current&&Nt.current===Fe){const De=d.sanitizeError(le,"Unable to continue the original wallet action");pn(De),Wt("error"),Jt.current?.(new Error(De),d.getRelayerErrorDetail(De))}}finally{ht.current=!1,pt.current&&Nt.current===Fe&&(it(!1),await rs())}},[vt.scope,vt.externalActionId,Fe,gt,me,_,e.actionExecution?.recoveryKey,R,y,rs,ve]),ws=e.enabled!==!1&&!e.quoteOnlyAccount&&F&&!X&&!st&&!re&&!Vn&&Pn&&!!vt.externalActionId&&!ms&&!et&&!Ve&&!!me&&!!_&&!!e.actionExecution&&!!vt.externalExecution&&vt.externalExecution.executionMode!=="wallet-envelope"&&["unsubmitted","prepared","submitted","reverted"].includes(vt.externalExecution.calls.find(U=>U.status!=="confirmed")?.status??""),Ci=(zd||ws)&&!e.submitDisabled&&!ht.current&&!bn.current;Ts.current=Ci;const ki=p.useCallback(async()=>{if(ws){Ts.current&&await fr();return}await ui(),ie.current?.routedExternal&&await rs()},[ws,fr,ui,rs]),Ii=p.useCallback(async()=>{if(ws){Ts.current&&await fr();return}await gi(),ie.current?.routedExternal&&await rs()},[ws,fr,gi,rs]),mr=p.useCallback(()=>{if(bn.current||Zr)return;const U=ie.current?.scope===Fe?ie.current.progress:void 0;if(Qn||ms||Es||U?.submissionStatus==="unknown"||U?.actionId&&U.step!=="success"){rs();return}Ts.current=!1,Mt.current=null,en(!1),Vr.refreshQuote(),Wt("idle"),Ft(null),Bt(""),rn(null),_t(!1)},[Vr.refreshQuote,Ft,Qn,ms,Es,Fe,rs,Zr]);p.useEffect(()=>{Ue&&!st&&!re&&!et&&ie.current&&ie.current.key!==hn&&!Qn&&!ms&&!Es&&(mr(),It(null))},[Ue,st,re,et,hn,Qn,ms,Es,mr]);const Si=p.useRef(hn);p.useEffect(()=>{const U=Si.current!==hn;Si.current=hn,(U||d.isUserRejection(Sn))&&Ut==="error"&&!et&&ie.current&&ie.current.key!==hn&&mr()},[hn,Ut,et,Sn,mr]);const Hd=p.useCallback(()=>{_t(!1)},[]),Vd=p.useCallback(()=>{if(bn.current)return;const U=ie.current?.progress;U?.submissionStatus==="unknown"||U?.actionId&&U.step!=="success"||(Wt("idle"),It(null),Te())},[Te]),Ht=qe??(Mt.current?.key.startsWith(`${hn}|`)?Mt.current.quote:null)??(ie.current?.key===hn?ie.current.quote:null),Qd=async U=>{if(e.quoteOnlyAccount)throw new Error("A preview cannot fund an action.");if(Zr)throw new Error("Check your activity and balances before funding another action.");if(z)throw new Error("This source executes directly from the external wallet; submit the action without embedded funding.");if(!(!Q||!W)){if(!qe||U!==qe.sourceSpendCap)throw new Error("Use the displayed source funding maximum before preparing this action.");await pr(),await Vl({asset:W.asset,embedded:Ot,external:_,externalWallet:me,amount:U,assertCurrent:pr})}};return{operationKey:hn,feeQuote:Ht,selectedAsset:wt,capability:ee,assets:{getAvailableBalance:ae,fundingSources:Me,selectable:dt,displayAssets:dt,filteredSpiceAssets:Ne,embeddedWalletAddress:ue,externalAddress:_,isNon7702:j!=="7702",refreshSpiceAssets:Te,refreshWalletAssets:ve,loading:We,refreshing:be,error:Pe},quote:{...zs,...Tn?{quoteKey:null,quoteExpiresAt:null,quoteError:null,isQuoting:!1,estimatedInput:null,estimatedOutput:null,quoteAmountOut:null,inputAmount:null,resolvedSwap:null,sourceSwap:null,exactOutputSwap:null,sourceExactOutputSwap:null}:{},hasSourceConversion:!!jt,executionInput:jt&&Ht?{address:jt.destination.address,chainId:jt.destination.chainId,decimals:jt.destination.decimals,amount:Ht.preview.netAmount}:null,...Ht?.destinationSwap?{resolvedSwap:Ht.destinationSwap,inputAmount:Ht.swapInputAmount,estimatedOutput:N.formatUnits(Ht.destinationSwap.amountOut,w.decimals)}:{},...Ht?.fundedFeeToken&&Ht.destinationAmount!==void 0?{estimatedOutput:N.formatUnits(Ht.destinationAmount+(Ht.destinationSwap?Ht.destinationSwap.amountOut-Ht.destinationSwap.amountOutMinimum:0n),w.decimals)}:{}},fees:{externalGasReserve:Ht?.externalGasReserve,fundingConversion:Ht?.fundingConversion,fundingSource:Ht?.fundingSource,proceedsUsed:Ht?.proceedsUsed,fundingShortfall:Ht?.grossFundingAmount,source:jt&&Ht?{address:jt.source.address,chainId:jt.source.chainId,symbol:jt.source.symbol,decimals:jt.source.decimals,gasFee:Ht.sourceGasSkim??0n,spicenetFee:0n}:null,destinationAmount:Ht?.destinationAmount,sourceSpendCap:Ht?.sourceSpendCap,preview:Tn?null:Ht?.preview??xn,isLoading:!Tn&&(En||Le),ready:!Tn&&!!qe,error:Tn||Le||ot&&Xn.current!==gs?null:Nn},amount:{availableBalance:v?Nd:Re,sourceRequiredAmount:Ht?.sourceSpendCap??null,parsed:Gn,isInsufficientBalance:_r,sourceBalance:jd,feesExceedAmount:pi},status:{activity:cn,pending:Qn,recoveryChecking:ms,recoveryError:Es,canResumeExternalAction:ws,canRetry:ws,actionId:an?.actionId??(Pn?vt.action?.actionId:void 0),intentId:an?.intentId??(Pn?vt.action?.intents[0]?.intentId:void 0),autoContinue:an?.autoContinue??(Pn?vt.action?.autoContinue:void 0),submissionStatus:an?.submissionStatus,idempotencyKey:an?.submissionStatus==="unknown"?an.idempotencyKey:void 0,user:an?.user??(Pn?vt.action?.user:void 0),finalizing:re||wi,finalizationError:Vn,step:st&&Ut==="success"?"executing":Ut,statusMsg:ws?"Try again to finish with the funds already in your wallet.":ms?"Checking previous action status...":Qn?Es??"A previous transaction is still pending. Check its status before submitting again.":st?Vn??"Transaction confirmed. Updating application...":Qt,txHash:Ye,isExecuting:et||Ve||wi,error:X||Vn||Sn||ee?.reason||null,showStatusPanel:An,paymentResult:st&&sn?.status==="success"?{...sn,status:"processing"}:sn},flags:{directExecutionFeeNote:Jr},retryFinalization:Ud,refreshStatus:rs,resumeExternalAction:fr,fundEmbeddedSource:Qd,canExecute:Ci,submit:O?Ii:ki,submitSupply:ki,submitPay:Ii,retrySupply:mr,dismissPaymentStatus:Hd,resolveMaxAmount:hi,max:()=>v?Md():W?hi(W.asset):Promise.resolve(null),resetAfterSuccess:Vd,resetPaymentState:Wd}}function kf(e){const{asset:t,amount:n,recipient:s,owner:r,onSuccess:o}=e,i=!!t&&!!e.destination&&e.destination.chainId!==t.chainId,a=e.destination?.chainId??t?.chainId??e.sourceChains?.[0]??0,l=p.useMemo(()=>S.getTokensForChain(a).find(C=>C.equivalenceGroup==="USDC"),[a]),u=p.useCallback((C,E)=>{const k=!i&&C===0n?n:C;if(!t||n<=0n||n>t.balance||!i&&k>n||!s||!r||d.addressesEqual(r,s))throw new Error("Enter a valid withdrawal amount and recipient.");if(E.chainId!==a||!d.addressesEqual(E.executorAddress??E.userAddress,r))throw new Error("The withdrawal wallet or network changed. Review the withdrawal again.");if(i&&(!e.destination||e.destination.symbol!=="USDC"||C<=0n))throw new Error("A USDC withdrawal quote is required for this network.");return yo(a,i?e.destination.address:t.address,[{recipient:s,amount:k}]).calls},[t?.address,t?.chainId,t?.balance,n,s,r,a,i,e.destination?.address,e.destination?.symbol]),m=p.useMemo(()=>t?[{address:t.address,chainId:t.chainId,symbol:t.symbol,decimals:t.decimals,logoURI:t.logoURI}]:void 0,[t?.address,t?.chainId,t?.symbol,t?.decimals,t?.logoURI]),f=Wr({enabled:e.enabled&&!!l&&!!t&&n>0n&&!!s&&!!r&&!d.addressesEqual(r,s),amountDirection:"input-inclusive",quotedInclusivePlatformFee:!0,feeFunding:ko,destinationToken:e.destination??{address:t?.address??S.ZERO_ADDRESS,symbol:t?.symbol??"",decimals:t?.decimals??6,chainId:a},recipient:s,selectedAsset:t?{asset:t,amount:N.formatUnits(n,t.decimals)}:null,additionalSourceTokens:m,sourceChains:e.sourceChains,includeCrossChainEmbeddedAssets:!0,includeExternalWalletAssets:!1,feeExecutionMode:i?"user-transfer":"backend-transfer",buildActionCalls:u,buildSpicenetBatch:Js,onError:(C,E)=>e.onError?.(C.message,E),onSuccess:async()=>{if(!t)return;const C=f.fees.destinationAmount;if(i&&(C==null||C<=0n))throw new Error("The confirmed withdrawal amount is unavailable.");window.dispatchEvent(new CustomEvent("withdraw-completed")),await o?.({token:i?"USDC":t.symbol,amount:N.formatUnits(i?C:n,i?e.destination.decimals:t.decimals),chainId:a})}}),h=`${e.enabled}:${t?.chainId}:${t?.address}:${n}:${s}:${r}:${a}:${e.destination?.address}`,y=p.useRef(h);p.useEffect(()=>{y.current===h||f.status.isExecuting||(y.current=h,(f.status.step==="success"||f.status.paymentResult?.status==="success")&&f.resetAfterSuccess())},[h,f.status.isExecuting,f.status.step,f.status.paymentResult?.status,f.resetAfterSuccess]);const g=f.fees.fundingSource,x=g?.kind==="input"?f.fees.fundingConversion?.amountInMax??f.fees.proceedsUsed??0n:0n,w=g?.kind==="input"?t:g?.asset,v=w?w._source==="wallet"?f.fees.fundingConversion?.amountInMax??f.fees.proceedsUsed:f.amount.sourceRequiredAmount:null;return{supply:f,source:w,maximumFeeFunding:v,feeFromAmount:x}}const $l=d.font.ui,If=({label:e,loading:t,balance:n,dark:s,dk:r})=>{const o=s?r.textSecondary:"#7D7C7B",i=s?r.textSecondary:"#71757A";return c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:{fontFamily:$l,fontSize:"17px",fontWeight:500,color:o,lineHeight:"24px"},children:e}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontFamily:$l,fontSize:"13px",fontWeight:500,color:i,lineHeight:"16px"},children:["Balance:"," ",t?"...":n===null?"\u2014":d.formatBalance(n)]})]})};function Sf(e,t=40,n=18){const s=e.length,r=[{maxLength:7,shrink:0},{maxLength:10,shrink:6},{maxLength:13,shrink:12},{maxLength:16,shrink:16},{maxLength:20,shrink:19}].find(o=>s<=o.maxLength);return Math.max(n,t-(r?.shrink??22))}const Ws=({value:e,element:t="span",placeholder:n,ariaLabel:s,ariaInvalid:r,disabled:o,onChange:i,inputMode:a="decimal",autoComplete:l="off",dataSpiceflowFocus:u,fontFamily:m,fontWeight:f=700,color:h,textAlign:y,lineHeight:g=1,maxFontSize:x=40,minFontSize:w=18,overflow:v="ellipsis",title:C,style:E})=>{const k=p.useRef(null),[F,O]=p.useState(),I=Sf(e||n||"",x,w),b=e||n||"";p.useEffect(()=>{const B=k.current;if(!B||v!=="ellipsis"){O(void 0);return}let q=!0,j=null;const P=()=>{if(!q)return;const M=getComputedStyle(B),L=B.clientWidth-parseFloat(M.paddingLeft||"0")-parseFloat(M.paddingRight||"0");if(!(L>0))return;if(!j){try{j=document.createElement("canvas").getContext("2d")}catch{return}if(!j)return}j.font=`${M.fontStyle} ${M.fontWeight} ${I}px ${M.fontFamily}`;const T=j.measureText(b),H=Math.max(T.width,(T.actualBoundingBoxLeft||0)+(T.actualBoundingBoxRight||0))+(parseFloat(M.letterSpacing)||0)*Math.max(0,b.length-1),V=H>L?I*Math.max(0,L-1)/H:void 0;O(te=>te===V?te:V)};P();const D=typeof ResizeObserver>"u"?void 0:new ResizeObserver(P);return D?.observe(B),D||window.addEventListener("resize",P),document.fonts?.addEventListener("loadingdone",P),()=>{q=!1,D?.disconnect(),D||window.removeEventListener("resize",P),document.fonts?.removeEventListener("loadingdone",P)}},[b,I,m,f,v,t,E?.fontFamily,E?.fontStyle,E?.fontWeight,E?.letterSpacing,E?.paddingLeft,E?.paddingRight]);const A=v==="wrap"?{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"normal"}:v==="ellipsis"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},R={fontFamily:m,fontSize:`${Math.min(I,F??I)}px`,fontWeight:f,color:h,lineHeight:g,letterSpacing:0,textAlign:y,minWidth:0,maxWidth:"100%",...A,...E};return t==="input"?c.jsx("input",{ref:k,type:"text",inputMode:a,autoComplete:l,"aria-label":s,"aria-invalid":r||void 0,"data-spiceflow-focus":u||void 0,value:e,onChange:i,placeholder:n,disabled:o,title:C,style:{backgroundColor:"transparent",border:"none",outline:"none",padding:0,width:"100%",...R}}):c.jsx(t,{ref:k,title:C,style:R,children:e})},_l=({isOpen:e,position:t,title:n,items:s,selectedId:r,onSelect:o,portalAttribute:i})=>{const{dark:a,dk:l,primaryColor:u}=d.useSpiceBrand(),[m,f]=p.useState(null),[h,y]=p.useState(!1);return p.useEffect(()=>{if(!e){y(!1);return}const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>y(!0))});return()=>cancelAnimationFrame(g)},[e]),!e||!t||s.length===0?null:gr.createPortal(c.jsxs("div",{[`data-${i}-popover`]:"true",style:{position:"fixed",top:`${t.top}px`,left:`${t.left}px`,opacity:h?1:0,transform:h?"scale(1) translateY(0)":"scale(0.96) translateY(-6px)",transition:`opacity 200ms ${d.easing.out}, transform 200ms ${d.easing.out}`,backgroundColor:a?l.shell:"#ffffff",borderRadius:"10px",padding:"10px 12px",boxShadow:a?"0 16px 48px rgba(0,0,0,0.45)":"0 12px 32px rgba(0,0,0,0.12)",border:`1px solid ${l.cardBorder}`,minWidth:"220px",zIndex:d.z.dropdown,fontFamily:d.font.mono},children:[c.jsx("div",{style:{marginBottom:"6px"},children:c.jsx("span",{style:{fontSize:"11px",fontWeight:500,color:a?l.textPrimary:"#0e0d0b",textTransform:"uppercase",letterSpacing:"1px"},children:n})}),c.jsx("div",{style:{borderBottom:`1px solid ${l.cardBorder}`,marginBottom:"6px"}}),c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:s.map(g=>{const x=r===g.id,w=m===g.id;return c.jsxs("button",{onClick:v=>{v.stopPropagation(),o(g.id)},onMouseEnter:()=>f(g.id),onMouseLeave:()=>f(null),style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 4px",borderRadius:"8px",border:"none",cursor:"pointer",backgroundColor:x?a?l.hoverBg:"#f3f4f6":w?a?l.cardBg:"#f9fafb":"transparent",transition:"background-color 0.15s",width:"100%",fontFamily:d.font.mono},children:[g.icon&&c.jsx("img",{src:g.icon,alt:g.label,style:{width:"22px",height:"22px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:"13px",fontWeight:x?700:500,textTransform:"uppercase",color:a?l.textPrimary:"#0e0d0b",letterSpacing:"0.5px",flex:1,textAlign:"left"},children:g.label}),g.detail&&c.jsx("span",{style:{fontSize:"11px",fontWeight:500,color:l.textSecondary},children:g.detail}),x&&c.jsx(Gc,{color:u,style:{flexShrink:0}})]},g.id)})})]}),document.body)},Ro=d.font.ui,Af=d.font.mono,Ef=170,Ff=({header:e,amount:t,receiveAmountDisplay:n,receiveUsdEstimate:s,selectedDestToken:r,destTokenSymbol:o,destChainName:i,destChainLogo:a,compatibleDestinationChains:l,networkSwitchRef:u,onOpenNetworkPopover:m,showNetworkPopover:f,setShowNetworkPopover:h,networkPopoverPos:y,selectedChainId:g,setSelectedChainId:x,dark:w,dk:v})=>{const C=w?v.cardBg:"#E9E9E9",E=w?v.cardBorder:"#C6C6C6",k=w?v.textSecondary:"#71757A",F=w?v.textPrimary:"#0E0D0B",O=w?v.cardBorder:"#C5C5C4",I=w?"rgba(255,255,255,0.08)":"#D4D3D3",b=o.length>8?"14px":o.length>6?"16px":"18px";return c.jsxs("div",{style:{backgroundColor:C,border:`1px solid ${E}`,borderRadius:"7px",padding:"14px 16px 12px 16px",minHeight:"138px",display:"flex",flexDirection:"column",gap:"6px"},children:[e,c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"12px",flex:1},children:[c.jsxs("div",{style:{flex:1,minWidth:0,alignSelf:"flex-start",paddingTop:"4px"},children:[c.jsx(Ws,{element:"div",value:n,title:n,fontFamily:Ro,color:t?F:"#A8A8A7",lineHeight:"0.95",maxFontSize:54,minFontSize:32,overflow:"wrap"}),c.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:k,fontFamily:Ro,marginTop:"10px"},children:s})]}),c.jsxs("div",{style:{width:`${Ef}px`,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"stretch",gap:"8px"},children:[c.jsxs("div",{style:{backgroundColor:"transparent",border:`1px solid ${O}`,borderRadius:"8px",overflow:"hidden",width:"100%",display:"flex",flexDirection:"column",boxSizing:"border-box"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"9px 10px 8px 10px"},children:[c.jsx("img",{src:r?.logoURI||Lu,alt:o,style:{width:"24px",height:"24px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:b,fontWeight:500,color:F,lineHeight:"1.3",fontFamily:Ro,flex:1,minWidth:0,letterSpacing:0},children:o})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"5px 10px",backgroundColor:I,borderTop:`1px solid ${O}`},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[a&&c.jsx("img",{src:a,alt:i,style:{width:"13px",height:"13px",borderRadius:"50%",flexShrink:0}}),c.jsx("span",{style:{fontSize:"11px",fontWeight:400,color:F,fontFamily:Ro,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textTransform:"uppercase"},children:i})]}),c.jsx("button",{ref:u,onClick:A=>{A.stopPropagation(),m(u.current)},style:{background:"none",border:"none",cursor:l.length>1?"pointer":"not-allowed",padding:"0 0 0 8px",fontSize:"9.5px",fontFamily:Af,color:k,textDecoration:"underline",fontWeight:600,opacity:l.length>1?1:.45},children:"Switch"}),c.jsx(_l,{isOpen:f,position:y,title:"SELECT NETWORK",portalAttribute:"network",items:l.map(A=>{const R=d.getChainConfig(A);return{id:String(A),label:R?.displayName||String(A),icon:bs[A]||Sr}}),selectedId:g!==null?String(g):null,onSelect:A=>{x(Number(A)),h(!1)}})]})]}),c.jsx("div",{style:{minHeight:"14px"}})]})]})]})},Tf=d.font.ui,ks=d.font.mono,Rf=({show:e,onToggle:t,showCustomAddress:n,setShowCustomAddress:s,customRecipient:r,setCustomRecipient:o,externalAddress:i,recipientAddress:a,destChainName:l,destChainLogo:u,compatibleDestinationChains:m,txDetailsChainSwitchRef:f,onOpenNetworkPopover:h,sourceChainLabel:y,sourceDetailsLogo:g,sourceTokenLabel:x,amount:w,totalSourceDebitDisplay:v,receiveAmountDisplay:C,destTokenSymbol:E,shouldQuoteWithdrawGas:k,estimatingFee:F,feeError:O,displayedGasFee:I,selectedDestToken:b,theme:A,styles:R,dark:B,dk:q})=>{const j=B?q.textSecondary:"#71757A",P=B?q.textPrimary:"#0E0D0B",D=m.length>1,M=n&&r?N.isAddress(r)?d.truncateAddress(r):r:a?d.truncateAddress(a):"\u2014";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{onClick:t,style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:e?"10px":"0",cursor:"pointer",userSelect:"none"},children:[c.jsx("span",{style:{fontSize:"13px",color:j,fontFamily:Tf,fontWeight:600},children:"Transaction Details"}),c.jsx(Sp,{size:12,color:j,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]}),e&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"7px"},children:[c.jsxs("div",{children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:{fontSize:"12px",color:j,fontFamily:ks,fontWeight:500,letterSpacing:"0.03em"},children:"TO"}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx("span",{style:{fontSize:"13px",color:P,fontFamily:ks,fontWeight:500},children:M}),c.jsx("button",{onClick:()=>{s(L=>!L),!n&&i&&o(i)},style:{background:"none",border:"none",cursor:"pointer",padding:"0",fontSize:"9.5px",fontFamily:ks,color:j,textDecoration:"underline",fontWeight:600},children:n?"Reset":"Switch"})]})]}),n&&c.jsxs("div",{style:{marginTop:"6px"},children:[c.jsx("div",{style:{marginBottom:"6px",padding:"7px 9px",borderRadius:"6px",border:"1px solid rgba(239, 68, 68, 0.55)",backgroundColor:"rgba(239, 68, 68, 0.12)",color:"#ef4444",fontSize:"10px",lineHeight:1.35,fontFamily:ks,fontWeight:700,letterSpacing:0,textTransform:"uppercase"},children:"CAUTION: ENTERING AN INCORRECT ADDRESS WILL RESULT IN LOSS OF FUNDS"}),c.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address","aria-invalid":r&&!N.isAddress(r)?!0:void 0,"data-spiceflow-focus":!0,value:r,onChange:L=>o(L.target.value),placeholder:"0x...",style:{width:"100%",padding:"8px 10px",borderRadius:"6px",border:`1px solid ${r&&!N.isAddress(r)?B?q.errorBorder:"#fca5a5":B?q.inputBorder:"#d1d5db"}`,backgroundColor:B?q.inputBg:"#f9fafb",color:B?q.inputText:"#111827",fontSize:"12px",fontFamily:ks,outline:"none",boxSizing:"border-box"}}),r&&!N.isAddress(r)&&c.jsx("span",{style:{fontSize:"11px",color:q.errorText,marginTop:"3px",display:"block"},children:"Invalid address"})]})]}),c.jsx(Ln,{palette:q,labelColor:j,valueColor:P,label:"RECEIVING CHAIN",value:c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"7px"},children:[u&&c.jsx("img",{src:u,alt:l,style:{width:"14px",height:"14px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:"13px",color:P,fontWeight:500,fontFamily:ks,textTransform:"uppercase"},children:l}),c.jsx("button",{ref:f,onClick:L=>{L.stopPropagation(),h(f.current)},style:{background:"none",border:"none",cursor:D?"pointer":"not-allowed",padding:"0",fontSize:"9.5px",fontFamily:ks,color:j,textDecoration:"underline",fontWeight:600,opacity:D?1:.45},children:"Switch"})]})}),c.jsx(Ln,{palette:q,labelColor:j,valueColor:P,label:"REQUESTED WITHDRAWAL",value:c.jsxs(qa,{logo:g||null,alt:y,primaryText:P,children:[w||"0"," ",x]})}),k&&c.jsx(Ln,{palette:q,labelColor:j,valueColor:P,label:"TOTAL SOURCE DEBIT",value:c.jsxs(qa,{logo:g||null,alt:y,primaryText:P,children:[v," ",x]})}),c.jsx(Ln,{palette:q,labelColor:j,valueColor:P,label:"YOU RECEIVE",value:c.jsxs(qa,{logo:u,alt:l,primaryText:P,gap:"4px",children:[C," ",E]})}),k&&c.jsxs(c.Fragment,{children:[c.jsx(Ln,{palette:q,labelColor:j,label:"EST. NETWORK FEE",valueColor:O?"#f87171":P,value:F?"Estimating...":O?"Unavailable":I!==null&&b?`${ba(I,b.decimals)} ${b.symbol}`:"Estimating..."}),O&&c.jsx(vn,{variant:"error",size:"compact",palette:q,fontFamily:R?.fontFamily||A.typography.fontFamily,children:O})]})]})]})},Bf=p.memo(Rf),qa=({logo:e,alt:t,primaryText:n,gap:s="6px",children:r})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:s},children:[e&&c.jsx("img",{src:e,alt:t,style:{width:"13px",height:"13px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:"13px",color:n,fontWeight:500,fontFamily:ks},children:r})]}),La=({pct:e,isMax:t,primaryColor:n,dark:s,fillColor:r})=>{const o=e/100;return c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",children:[c.jsx("circle",{cx:"7",cy:"7",r:"6.84375",fill:t?n:"none",stroke:t?n:s?"#4a5568":"#3C3E42",strokeWidth:"0.3125"}),!t&&o>0&&c.jsx("path",{d:`M 7 7 L 7 0.15625 A 6.84375 6.84375 0 ${o>.5?1:0} 1 ${7+6.84375*Math.sin(o*2*Math.PI)} ${7-6.84375*Math.cos(o*2*Math.PI)} Z`,fill:r})]})},qr=d.font.ui,Of=170,jf=({header:e,amount:t,setAmount:n,isInsufficient:s,sourceAmountDecimals:r,selectedSourceAsset:o,resolvedSelectedSourceAsset:i,spiceAssets:a,setSelectedSourceAsset:l,sourceUsdEstimate:u,sourceTokenLabel:m,sourceChainLabel:f,totalSelectedBalance:h,showSourceTokenPopover:y,setShowSourceTokenPopover:g,tokenPopoverPos:x,setTokenPopoverPos:w,tokenTriggerRef:v,primaryColor:C,dark:E,dk:k})=>{const F=d.useAssetDisplay(),O=i?F({...i,logoURI:i._source==="wallet"?i.logoURI:Ir}).logoURI:Ir,I=E?k.cardBg:"#E9E9E9",b=E?k.cardBorder:"#C6C6C6",A=E?k.textSecondary:"#71757A",R=E?k.textPrimary:"#0E0D0B",B=E?k.cardBorder:"#C5C5C4",q=E?"rgba(255,255,255,0.08)":"#D4D3D3",j=m.length>8?"14px":m.length>6?"16px":"18px";return c.jsxs("div",{style:{backgroundColor:I,border:`1px solid ${b}`,borderRadius:"7px",padding:"14px 16px 12px 16px",minHeight:"138px",display:"flex",flexDirection:"column",gap:"6px",position:"relative"},children:[e,c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"12px",flex:1},children:[c.jsxs("div",{style:{flex:1,minWidth:0,alignSelf:"flex-start",paddingTop:"4px"},children:[c.jsx(Ws,{element:"input",ariaLabel:"Withdraw amount",ariaInvalid:s,dataSpiceflowFocus:!0,value:t,onChange:P=>{const D=P.target.value;if(D===""){n("");return}/^\d*\.?\d*$/.test(D)&&n(d.parseNumericInput(D.startsWith(".")?`0${D}`:D,r??o?.decimals))},placeholder:"0.0",fontFamily:qr,color:s?"#ef4444":t?R:"#A8A8A7",lineHeight:"0.95",maxFontSize:54,minFontSize:32,style:{width:"100%"}}),c.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:A,fontFamily:qr,marginTop:"10px"},children:u})]}),c.jsx("div",{style:{width:`${Of}px`,flexShrink:0},children:c.jsxs("div",{style:{backgroundColor:"transparent",border:`1px solid ${B}`,borderRadius:"8px",overflow:"hidden",width:"100%",display:"flex",flexDirection:"column",boxSizing:"border-box"},children:[c.jsxs("div",{ref:v,onClick:P=>{if(P.stopPropagation(),!y&&v.current){const D=v.current.getBoundingClientRect(),M=220,L=16;w({top:D.bottom+8,left:Math.min(Math.max(L,D.right-M),window.innerWidth-M-L)})}g(D=>!D)},style:{display:"flex",alignItems:"center",gap:"6px",padding:"9px 10px 8px 10px",cursor:"pointer"},children:[O&&c.jsx("img",{src:O,alt:m,style:{width:"24px",height:"24px",borderRadius:"50%"}}),c.jsx("span",{style:{fontSize:j,fontWeight:500,color:R,lineHeight:"1.3",fontFamily:qr,flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",letterSpacing:0},children:m}),c.jsx($s,{size:15,color:R,strokeWidth:2.25})]}),c.jsx(_l,{isOpen:y,position:x,title:"SELECT TOKEN",portalAttribute:"token",items:(a||[]).map(P=>({id:ye(P),label:F({...P,displaySymbol:P.displaySymbol||(P._source==="wallet"?P.symbol:P.receiptTokenName)}).symbol,icon:F({...P,logoURI:P._source==="wallet"?P.logoURI:Ir}).logoURI||void 0,detail:`${d.formatBalance(P.balanceFormatted)} \xB7 ${P._source==="wallet"?d.getChainConfig(P.chainId)?.displayName||P.chainId:"Spicenet"}`})),selectedId:i?ye(i):null,onSelect:P=>{const D=(a||[]).find(M=>ye(M)===P);D&&(l(D),n("")),g(!1)}}),c.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"5px 10px",backgroundColor:q,borderTop:`1px solid ${B}`},children:c.jsx("span",{style:{fontSize:"11px",fontWeight:400,color:R,fontFamily:qr,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textTransform:"uppercase"},children:f})})]})})]}),c.jsxs("div",{style:{minHeight:"18px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[s?c.jsx("span",{style:{fontSize:"12px",color:k.errorText,fontFamily:qr,fontWeight:500},children:"Insufficient Balance"}):c.jsx("span",{}),c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0px",minHeight:"32px",marginRight:"-9px"},children:[0,25,50,75,100].map((P,D)=>{const M=D===4,L=parseFloat(t)||0,T=h>0&&Math.abs(L/h*100-P)<1;return c.jsx("button",{type:"button","aria-label":`Set amount to ${P}%`,"aria-pressed":T,onClick:()=>{const H=i?.balance??0n;n(P===0?"":N.formatUnits(H*BigInt(P)/100n,r??o?.decimals??6))},title:`${P}%`,disabled:h===0,"data-spiceflow-focus":!0,style:{width:"32px",height:"32px",padding:"9px",border:"none",backgroundColor:"transparent",cursor:h===0?"not-allowed":"pointer",opacity:T?1:.5,transition:"opacity 0.15s ease",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:c.jsx(La,{pct:P,isMax:M,primaryColor:C,dark:E,fillColor:E?k.textSecondary:"#3C3E42"})},P)})})]})]})};var za="data:image/svg+xml,%3csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 4.99995V6.99995M5 3.31245V3.31189M9.5 5C9.5 7.48528 7.48528 9.5 5 9.5C2.51472 9.5 0.5 7.48528 0.5 5C0.5 2.51472 2.51472 0.5 5 0.5C7.48528 0.5 9.5 2.51472 9.5 5Z' stroke='black' stroke-opacity='0.4' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const Df=({dark:e,dk:t})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[c.jsx("img",{src:za,alt:"","aria-hidden":"true",style:{width:"13px",height:"13px",flexShrink:0,...e?{filter:"invert(0.6)"}:{}}}),c.jsx("p",{style:{fontSize:"13px",color:e?t.textSecondary:"#979AA0",margin:"0",lineHeight:"1.4",fontFamily:d.font.ui},children:"Withdraw collateral from your account to 10+ EVM blockchains."})]}),Nf=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,styles:s,onWithdrawExecute:r,onWithdrawSuccess:o,onWithdrawError:i,availableTokens:a,initialSourceAssetId:l,walletAssets:u,buildSpicenetBatch:m=Js})=>{const f=p.useContext(d.SpiceFlowProviderContext);if(!f)return c.jsx("div",{children:"Error: SpiceWithdraw must be used within SpiceFlowProvider"});const h=f.mode||"7702",y=h==="presign"||h==="ondemand",g=f.supportedChainIds,x=f.allowedTokens,w=u?.initialAsset,v=p.useMemo(()=>[...u?.extraAssets??[],...w?[w]:[]].map(fe=>({address:fe.address,chainId:fe.chainId,symbol:fe.symbol,decimals:fe.decimals})),[u?.extraAssets,w]),C=f.isWhitelistGateActive,{theme:E,dark:k,dk:F}=d.useSpiceBrand(s),O=d.useAssetDisplay(),I=f.network,b=()=>y?"select":"provider-login",[A,R]=p.useState(b()),[B,q]=p.useState(!1),[j,P]=p.useState(null),[D,M]=p.useState(null),[L,T]=p.useState(""),[H,V]=p.useState(!1),[te,Z]=p.useState(!1),[K,Y]=p.useState(!1),[J,we]=p.useState(""),[me,xe]=p.useState(!0),Ce=p.useRef(null),ne=p.useRef(null),_=p.useRef(null),[de,W]=p.useState(null),[je,Ae]=p.useState(null),z=d.useWallet(),{isReady:Q,isAuthenticated:se,address:ce}=z,X=f?.embeddedWalletAddress,{address:oe,chainId:Oe}=is.useAccount(),Ne=[f.externalWalletAddress,oe].find(fe=>fe&&!d.addressesEqual(fe,X));p.useEffect(()=>{e&&!Ne&&Y(!0)},[e,Ne]);const[he,Se]=p.useState(!1),[Te,ve]=p.useState(null),We=p.useRef(i);We.current=i;const be=p.useCallback(fe=>{ve(fe),typeof fe=="string"&&fe&&We.current?.(fe,d.getRelayerErrorDetail(fe))},[]),[Pe,ue]=p.useState(null),Ke=p.useRef(null),ft=p.useRef(!0),tt=p.useRef(null);p.useEffect(()=>(ft.current=!0,()=>{ft.current=!1}),[]);const{execute:$e,estimate:Qe,clearStatus:Ee}=Xs(),Ie=uo(ce,e),[lt,_e]=p.useState(null),[ae,dt]=p.useState(null),[ut,Me]=p.useState(!1),[bt,Rt]=p.useState(null),{assets:Xt,loading:St,error:un,refresh:ot}=Ms({owner:X,role:"holding",includeWalletAssets:!0,additionalSourceTokens:v,enabled:e&&!!X}),Le=p.useMemo(()=>{if(C)return[];const fe=(ie,Ze)=>(Ze.balanceUsd||0)-(ie.balanceUsd||0);return(Xt??[]).filter(ie=>ie.balance>0n&&Yn(ie,"holding",{allowedTokens:x,isWhitelistGateActive:C}).eligible).sort(fe)},[Xt,x,C]),at=p.useMemo(()=>[...new Set([...g??[],...Object.keys(a??{}).map(Number),...(Le||[]).map(fe=>fe.chainId),...(Le||[]).flatMap(fe=>Object.keys(fe.chainTokens??{}).map(ie=>{const[,Ze]=ie.split(":"),gt=Number(Ze);return Number.isFinite(gt)?gt:null}).filter(ie=>ie!==null))])].filter(fe=>d.getChainConfig(fe)?.network===I),[g,a,Le,I]),rt=p.useMemo(()=>{if(a)return a;const fe={};for(const ie of Le||[]){const Ze=Object.entries(ie.chainTokens??{});if(Ze.length>0){for(const[gt,Fe]of Ze){const[Nt,vt,Gt]=gt.split(":");if(Nt!=="evm"||!vt||!Gt)continue;const $t=Number(vt);if(!Number.isFinite($t))continue;const zt=Gt.startsWith("0x")?Gt.toLowerCase():`0x${Gt.toLowerCase()}`,qt=d.getChainConfig($t)?.supportedTokens?.find(Tt=>d.addressesEqual(Tt.address,zt));qt&&$o(ie,zt,$t)&&(fe[$t]||(fe[$t]=[]),fe[$t].find(Tt=>d.addressesEqual(Tt.address,zt))||fe[$t].push({address:zt,symbol:qt?.symbol||Fe?.name||ie.symbol,name:qt?.name||Fe?.name||ie.displayName||ie.name||ie.symbol,decimals:qt?.decimals??Fe?.decimals??ie.decimals,logoURI:qt?.logo||ie.logoURI}))}continue}fe[ie.chainId]||(fe[ie.chainId]=[]),fe[ie.chainId].find(gt=>d.addressesEqual(gt.address,ie.address))||fe[ie.chainId].push({address:ie.address,symbol:ie.symbol,name:ie.displayName||ie.name||ie.symbol,decimals:ie.decimals,logoURI:ie.logoURI})}return fe},[a,Le]),wt=p.useCallback((fe,ie)=>{const Ze=Op(fe,ie,ie?fe?._source==="wallet"?a?.[ie]??[]:rt[ie]??[]:[]);return!fe||!Ze||!ie?null:fe._source==="wallet"||Yn(fe,"withdraw-destination",f,{...Ze,chainId:ie}).eligible?Ze:null},[rt,a,f.allowedTokens,f.rpcOverrides,f.isWhitelistGateActive]),ee=p.useMemo(()=>j?Le.find(fe=>ye(fe)===ye(j))??null:null,[j,Le]),mt=ee?ee.balanceError:un,Re=ee?._source==="wallet",ze=p.useMemo(()=>{if(!ee)return[];const fe=Object.keys(ee.chainTokens??{}).map(ie=>In(ie)?.chainId??null).filter(ie=>ie!==null);return Array.from(new Set([...fe,ee.chainId,...at].filter(Number.isFinite))).filter(ie=>d.getChainConfig(ie)?.network===I&&(ee._source==="wallet"||wt(ee,ie)!==null))},[ee,at,wt,I]),et=p.useMemo(()=>{if(!ee||typeof window>"u")return null;const fe=`spiceflow:withdraw-chain:${ee.receiptTokenId||ee.address.toLowerCase()}`,ie=window.localStorage.getItem(fe),Ze=ie?Number(ie):null;return Ze!==null&&Number.isFinite(Ze)&&ze.includes(Ze)?Ze:null},[ee,ze]),it=p.useMemo(()=>ee?ee._source==="wallet"?ee.chainId:et!==null?et:Oe&&ze.includes(Oe)?Oe:ee.chainId&&ze.includes(ee.chainId)?ee.chainId:ze[0]??null:at[0]??null,[ee,et,Oe,ze,at]),Ve=p.useMemo(()=>wt(ee,D),[wt,ee,D]);p.useEffect(()=>{e&&(P(null),T(""))},[e,l,w?.address,w?.chainId]),p.useEffect(()=>{if(!e||!Le.length||j)return;const fe=w?Le.find(ie=>ie.chainId===w.chainId&&d.addressesEqual(ie.address,w.address)&&ie._source==="wallet"):l?Le.find(ie=>ie.receiptTokenId===l):Le[0];P(fe??null),T("")},[e,Le,j,l,w]);const At=p.useRef(null);p.useEffect(()=>{if(!ee){At.current=null;return}const fe=ye(ee),ie=At.current!==fe;At.current=fe,(ie&&ee._source==="wallet"||D===null||!ze.includes(D))&&M(it)},[ee,D,it,ze]),p.useEffect(()=>{if(!H&&!te)return;const fe=ie=>{const Ze=ie.target;H&&!Ce.current?.contains(Ze)&&!ne.current?.contains(Ze)&&!Ze?.closest?.("[data-network-popover]")&&V(!1),te&&!_.current?.contains(Ze)&&!Ze?.closest?.("[data-token-popover]")&&Z(!1)};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},[H,te]);const ht=p.useCallback(fe=>{if(!fe||ze.length<=1)return;const ie=fe.getBoundingClientRect(),Ze=220,gt=16;W({top:ie.bottom+8,left:Math.min(Math.max(gt,ie.right-Ze),window.innerWidth-Ze-gt)}),V(Fe=>!Fe)},[ze.length]),Pt=p.useCallback(()=>xe(fe=>!fe),[]);p.useEffect(()=>{if(!ee||D===null||typeof window>"u")return;const fe=`spiceflow:withdraw-chain:${ee.receiptTokenId||ee.address.toLowerCase()}`;window.localStorage.setItem(fe,String(D))},[ee,D]);const pt=K?N.isAddress(J)?J:void 0:Ne,Sn=Ms({owner:pt,role:"holding",includeRollupAssets:!1,sourceChains:D?[D]:[],additionalSourceTokens:Ve&&D?[{...Ve,chainId:D}]:[],enabled:e&&!!pt&&!!Ve&&!!D}),pn=Sn.walletAssets.find(fe=>d.addressesEqual(fe.owner,pt)&&fe.chainId===D&&d.addressesEqual(fe.address,Ve?.address)),Cn=ee?.balanceFormatted??0,Zn=ee?O(Re?ee:{...ee,displaySymbol:ee.displaySymbol||ee.receiptTokenName,logoURI:Ir}):void 0,gn=Zn?.symbol||"Select token",wn=ee?.displayChainName||(Re?d.getChainConfig(ee.chainId)?.displayName:"Spicenet")||"Network",Jt=ee?.receiptTokenDecimals??ee?.decimals,Ft=p.useMemo(()=>{if(!Ve||Jt===void 0)return 0n;try{return dn(L||"0",Jt)}catch{return 0n}},[L,Ve,Jt]),Ut=p.useMemo(()=>!Ve||Jt===void 0?0n:Wp(Ft,Jt,Ve.decimals),[Ve,Jt,Ft]),Wt=ae??lt,Qt=Ft,Bt=kf({enabled:e&&Re&&!!Ve,destination:Ve&&D?{...Ve,chainId:D}:null,asset:Re?ee:null,amount:Ft,recipient:pt,owner:X,sourceChains:g,onSuccess:o,onError:i}),Ye=Bt.supply,It=Re&&D!==ee?.chainId,An=Re?Ye.fees.ready?Ye.fees.destinationAmount??0n:0n:Ut>(Wt??0n)?Ut-(Wt??0n):0n,_t=Re&&D?Ve?Yn(ee,"spend-source",f,{...Ve,chainId:D}).reason:"USDC withdrawal is unavailable on this network. Choose another network.":null,sn=he||Re&&(Ye.status.isExecuting||Ye.status.finalizing),rn=Ye.status.step==="success"||Ye.status.paymentResult?.status==="success",xn=p.useCallback(fe=>{if(Re||!D||!Ve)return[];if(Ft===0n||Ut===0n||!pt)return[];const ie=Array.isArray(fe)?fe.filter(Nt=>Nt.amount>0n):[{token:Ve.address,recipient:pt,amount:fe??Ut}],Ze=ie.reduce((Nt,vt)=>Nt+vt.amount,0n);if(Ze<=0n)return[];const gt={chainId:D,calls:[],tokenTransfers:ie.map(Nt=>({from:"escrow",to:Nt.recipient,token:Nt.token,amount:Nt.amount}))},Fe=m({destinationChainId:D,deliveryToken:Ve.address,deliveryAmount:Ze,deliveryRecipient:pt,deliveryTransfers:ie,requestTimestampMs:tt.current??Date.now()});return Fe?[Fe,gt]:[gt]},[Re,D,Ve,Ft,Ut,pt,m]),Yt=p.useMemo(()=>xn(),[xn]),En=m===Js&&!!D&&![S.getEscrowContract(D),S.SPICE_PLATFORM_FEE_RECIPIENT,S.SPICE_GAS_FEE_RECIPIENT,...Lc].some(fe=>d.addressesEqual(pt,fe)),Ge=p.useMemo(()=>qp(Yt,Ve?.address,En),[Yt,Ve?.address,En]),fn=p.useRef(null),en=!Re&&e&&!y&&!he&&!!Ve&&!!D&&Ft!==0n;ia({shouldRun:en&&Yt.length>0&&!!Ge,deps:[en,Yt.length>0,Ge,En],delayMs:500,onSkip:()=>{fn.current=null,_e(null),Rt(null),Me(en&&Yt.length===0)},onCleanup:()=>Me(!1),run:async({isCurrent:fe,signal:ie})=>{const Ze=Ge;Me(!0),Rt(null);try{const gt=await Up({batches:Yt,tokenAddress:Ve.address,chainId:D,estimate:Qe,withdrawalSourceBudget:En,signal:ie});if(!fe())return;fn.current={key:Ze,quote:gt},_e(gt.gasFee)}catch(gt){if(!fe())return;fn.current=null,_e(null),Rt(gt instanceof Error?gt.message:"Failed to estimate gas fee")}finally{fe()&&Me(!1)}}}),p.useEffect(()=>{he||dt(null)},[he,L,D,Ve?.address]);const Xn=p.useCallback(()=>{q(!0),R("select")},[]),Nn=p.useCallback(()=>{sn||t()},[t,sn]),yn=p.useRef(null);yn.current={batches:Yt,walletAddress:ce,recipient:pt,token:Ve,chainId:D,amount:L,grossAmountRaw:Ut,gasFee:lt,feeEstimate:Ge&&fn.current?.key===Ge?fn.current.quote.feeEstimate:null,withdrawalSourceBudget:!y&&En,isNon7702:y,buildWithdrawBatches:xn,execution:{estimate:Qe,execute:$e},ui:{setIsExecuting:Se,setExecutionError:be,setExecutionProgress:ue,setLockedGasFee:dt},executionContextRef:Ke,isMountedRef:ft,onWithdrawExecute:r,onWithdrawSuccess:o,buildSpicenetBatch:m};const Jn=p.useCallback(()=>(tt.current=Date.now(),sl(yn.current)),[]),Hn=p.useCallback(()=>rl(yn.current),[]);if(p.useEffect(()=>{if(!e){Ee?.();const fe=setTimeout(()=>{R(b()),q(!1),P(null),M(null),T(""),V(!1),Z(!1),Y(!1),we(""),Se(!1),be(null),ue(null),Ke.current=null},300);return()=>clearTimeout(fe)}},[e,y]),p.useEffect(()=>{if(!y&&e&&A==="provider-login"&&Q&&se&&X&&!B){const fe=setTimeout(()=>{q(!0),R("select")},100);return()=>clearTimeout(fe)}},[y,e,A,Q,se,X,B]),!e)return null;if(A==="provider-login"&&!y)return c.jsx(wa,{onAuthSuccess:Xn,autoTrigger:!0});if(A==="select"){const fe=parseFloat(L)||0,ie=Jt?ba(Qt,Jt):L||"0",Ze=!!ee&&Qt>ee.balance,gt=(D?d.getChainConfig(D):null)?.displayName||"Network",Fe=D?bs[D]||Sr:null,Nt=Ve?.symbol||"\u2014",vt=gn,Gt=Ve?ba(An,Ve.decimals):"0",$t=ee&&ee.balanceFormatted>0?ee.balanceUsd/ee.balanceFormatted:void 0,zt=ee?.priceStatus==="stale",qt=ol(fe,$t,zt),Tt=ol(parseFloat(Gt)||0,It?void 0:$t,zt),mn=(!K||N.isAddress(J))&&(!Re||!d.addressesEqual(pt,X)),Mt=!y&&!Re&&fe>0&&Ve!==null,Fn=!Mt||lt!==null&&!ut&&!bt,on=fe>0&&!Ze&&!St&&!mt&&ee!==null&&D!==null&&Ve!==null&&!_t&&pt&&mn&&Fn&&An>0n&&(!Re||Ye.canExecute&&!rn),nt=!on,Kt=St?"LOADING BALANCES":mt?"BALANCES UNAVAILABLE":ee===null?"NO BALANCE":fe===0?"ENTER AMOUNT":Ze?"INSUFFICIENT BALANCE":Mt&&!Fn?bt?"GAS UNAVAILABLE":"ESTIMATING GAS":Mt&&An===0n?"AMOUNT TOO SMALL":Re&&!Ye.canExecute?"REVIEW FEES":"WITHDRAW",fs=!!Pe&&(Pe.step==="success"||Pe.step==="error"),Ss=s?.primaryColor||E.colors.primary,ir=402,ss=(Vn,Ls,re)=>c.jsx(If,{label:Vn,loading:re,balance:Ls,dark:k,dk:F});return c.jsx(zn,{isOpen:!0,onClose:Nn,title:"Withdraw",subtitle:c.jsx(Df,{dark:k,dk:F}),styles:s,theme:E,dark:k,maxWidth:"486px",footerLinkText:"Spicenet accounts \u2192",overlayDimmed:!1,closeOnBackdropClick:n,overlayContent:fs?c.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",justifyContent:"flex-end",pointerEvents:"none",zIndex:20},children:c.jsx("div",{style:{pointerEvents:"auto"},children:c.jsx(xa,{type:"withdraw",isOpen:!0,isProcessing:sn,onRetryTx:()=>{Hn()},onNewTx:()=>{ue(null),T(""),be(null),Ke.current=null},onClose:()=>{ue(null),be(null),Se(!1),Ke.current=null},onComplete:()=>{ue(null),be(null),Se(!1),Ke.current=null},results:[{asset:{symbol:Ve?.symbol||"Token",address:Ve?.address||""},txHash:Pe?.txHash||"",success:Pe?.step==="success",error:Pe?.error,amount:L}],chainId:D??void 0,theme:E})})}):null,children:c.jsxs("fieldset",{disabled:sn,style:{border:0,minWidth:0,width:"calc(100% - 32px)",maxWidth:`${ir}px`,margin:"0 auto",padding:"0 0 4px 0",position:"relative"},children:[c.jsx(xo,{activity:Ie,palette:F,onRefresh:()=>{ot()}}),c.jsxs("div",{style:{marginTop:"16px",marginBottom:"16px",display:"flex",flexDirection:"column",gap:"16px"},children:[c.jsx(jf,{header:ss("Source",Cn,St),amount:L,setAmount:T,isInsufficient:Ze,sourceAmountDecimals:Jt,selectedSourceAsset:ee,resolvedSelectedSourceAsset:ee,spiceAssets:Le,setSelectedSourceAsset:P,sourceUsdEstimate:qt,sourceTokenLabel:vt,sourceChainLabel:wn,totalSelectedBalance:Cn,showSourceTokenPopover:te,setShowSourceTokenPopover:Z,tokenPopoverPos:je,setTokenPopoverPos:Ae,tokenTriggerRef:_,primaryColor:Ss,dark:k,dk:F}),c.jsx(Ff,{header:ss("Destination",pn?.balanceFormatted??null,Sn.loading),amount:L,receiveAmountDisplay:Gt,receiveUsdEstimate:Tt,selectedDestToken:Ve,destTokenSymbol:Nt,destChainName:gt,destChainLogo:Fe,compatibleDestinationChains:ze,networkSwitchRef:Ce,onOpenNetworkPopover:ht,showNetworkPopover:H,setShowNetworkPopover:V,networkPopoverPos:de,selectedChainId:D,setSelectedChainId:M,dark:k,dk:F})]}),c.jsxs("div",{style:{marginBottom:E.spacing.sm},children:[c.jsx(Bf,{show:me,onToggle:Pt,showCustomAddress:K,setShowCustomAddress:Y,customRecipient:J,setCustomRecipient:we,externalAddress:Ne,recipientAddress:pt,destChainName:gt,destChainLogo:Fe,compatibleDestinationChains:ze,txDetailsChainSwitchRef:ne,onOpenNetworkPopover:ht,sourceChainLabel:wn,sourceDetailsLogo:ee?Zn?.logoURI:Ir,sourceTokenLabel:vt,amount:L,totalSourceDebitDisplay:ie,receiveAmountDisplay:Gt,destTokenSymbol:Nt,shouldQuoteWithdrawGas:Mt,estimatingFee:ut,feeError:bt,displayedGasFee:Wt,selectedDestToken:Ve,theme:E,styles:s,dark:k,dk:F}),It&&c.jsx(vn,{variant:"info",size:"compact",palette:F,children:Ye.fees.ready?`You receive ${Gt} USDC on ${gt}`:`USDC on ${gt} \u2014 ${_t||Ye.fees.error||Ye.quote.quoteError||"waiting for quote"}`}),Re&&Ye.fees.ready&&c.jsxs(c.Fragment,{children:[c.jsx(Ln,{palette:F,label:"TOTAL SOURCE DEBIT",value:`${ie} ${vt}`}),c.jsx(Ln,{palette:F,label:"MINIMUM RECEIVED",value:`${Gt} ${Nt}`}),c.jsx(Ln,{palette:F,label:It?"DESTINATION FEES":"EST. FEE",value:Ye.fees.preview?.totalFee!==void 0?`${N.formatUnits(Ye.fees.preview.totalFee,Ye.fees.preview.decimals)} ${Ye.fees.preview.symbol}`:"Unavailable"})]}),It&&Ye.fees.ready&&Ye.fees.source&&c.jsx(Ln,{palette:F,label:"SOURCE NETWORK FEE",value:`${N.formatUnits(Ye.fees.source.gasFee,Ye.fees.source.decimals)} ${Ye.fees.source.symbol}`}),_t&&c.jsx(vn,{variant:"warning",size:"compact",palette:F,children:_t}),Re&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[!It&&c.jsx(Ln,{palette:F,label:"FEE ASSET",value:Ye.fees.isLoading?"Estimating...":Bt.source?`${O(Bt.source).symbol} \xB7 ${Bt.source._source==="spice"?"Spicenet":d.getChainConfig(Bt.source.chainId)?.displayName}`:"Unavailable"}),!It&&c.jsx(Ln,{palette:F,label:"MAXIMUM FEE FUNDING",value:Ye.fees.isLoading?"Estimating...":Ye.fees.ready&&Bt.source&&Bt.maximumFeeFunding!=null?`${N.formatUnits(Bt.maximumFeeFunding,Bt.source.decimals)} ${O(Bt.source).symbol}`:"Unavailable"}),!rn&&(Ye.status.error||Ye.fees.error||Ye.quote?.quoteError)&&c.jsx(vn,{variant:"error",size:"compact",palette:F,children:Ye.status.error||Ye.fees.error||Ye.quote?.quoteError}),!rn&&Ye.status.finalizationError&&c.jsx(d.Button,{variant:"outline",dark:k,disabled:Ye.status.finalizing,onClick:()=>void Ye.retryFinalization(),children:"Retry application update"}),!rn&&Ye.status.step==="error"&&Ye.status.error==="Transaction fees changed. Refresh the quote before submitting."&&c.jsx(d.Button,{variant:"outline",dark:k,disabled:Ye.status.isExecuting,onClick:Ye.retrySupply,children:"Refresh quote"}),Ye.status.statusMsg&&c.jsx("span",{role:"status",children:Ye.status.statusMsg})]}),ee&&!St&&ze.length===0&&c.jsx(vn,{variant:"warning",size:"compact",palette:F,children:"No withdrawal networks are available for this asset."}),Te&&c.jsx(vn,{variant:"error",size:"compact",palette:F,fontFamily:s?.fontFamily||E.typography.fontFamily,style:{marginBottom:"12px"},children:Te}),mt&&c.jsxs(vn,{variant:"error",size:"compact",palette:F,children:["Unable to load this balance. Please try again."," ",c.jsx("button",{type:"button",onClick:()=>void ot(),children:"Retry"})]}),c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:()=>{if(on)if(Re){if(It&&An<=0n)return;Ye.submitSupply()}else Jn()},disabled:nt||sn,theme:E,dark:k,styles:s,style:{marginTop:"8px"},children:sn?"EXECUTING...":Re&&rn?"WITHDRAWN":Kt})]})]})})}return null},Ha=Nf,Mf=({onDepositClick:e,onWithdrawClick:t,depositDisabled:n=!1,withdrawDisabled:s=!1,primaryColor:r="#EA4B4B",buttonStyles:o,dark:i=!1})=>{if(!e&&!t)return null;const a={button:{backgroundColor:r,...o}};return c.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e&&c.jsx(d.Button,{variant:"outline",onClick:e,disabled:n,dark:i,styles:a,style:{flex:1,height:"44px",fontSize:"12px"},children:"Deposit"}),t&&c.jsx(d.Button,{variant:"outline",onClick:()=>t(),disabled:s,dark:i,styles:a,style:{flex:1,height:"44px",fontSize:"12px"},children:"Withdraw"})]})},Pf=p.memo(Mf),Uf=({section:e,dk:t,dark:n=!1})=>{const s=r=>{switch(r){case"green":return"#10b981";case"red":return"#ef4444";default:return t.textPrimary}};return c.jsxs("div",{children:[c.jsx("div",{style:{fontSize:"11px",fontWeight:600,letterSpacing:"1px",color:t.textSecondary,marginBottom:"8px",textTransform:"uppercase"},children:e.title}),c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:e.items.map((r,o)=>c.jsxs("div",{role:r.onClick?"button":void 0,tabIndex:r.onClick?0:void 0,onClick:r.onClick,onKeyDown:r.onClick?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),r.onClick?.())}:void 0,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",backgroundColor:t.cardBg,border:n?`1px solid ${t.cardBorder}`:"1px solid #e5e7eb",borderRadius:"8px"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.tokenLogoURI?c.jsx("img",{src:r.tokenLogoURI,alt:r.tokenSymbol,style:{width:"20px",height:"20px",borderRadius:"50%"}}):c.jsx("div",{style:{width:"20px",height:"20px",borderRadius:"50%",backgroundColor:n?t.hoverBg:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:600,color:t.textSecondary},children:r.tokenSymbol.charAt(0)}),c.jsxs("div",{children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:t.textPrimary},children:r.tokenSymbol}),c.jsx("div",{style:{fontSize:"11px",color:t.textSecondary},children:r.label})]})]}),c.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:s(r.valueColor)},children:r.displayValue})]},o))})]})},Wf=p.memo(Uf);var qf="data:image/svg+xml,%3csvg width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='black' stroke-opacity='0.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3e%3cpolyline points='17 1 21 5 17 9' /%3e%3cpath d='M3 11V9a4 4 0 0 1 4-4h14' /%3e%3cpolyline points='7 23 3 19 7 15' /%3e%3cpath d='M21 13v2a4 4 0 0 1-4 4H3' /%3e%3c/svg%3e";const Va=({color:e})=>c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[c.jsx("circle",{cx:"7",cy:"7",r:"6.5",stroke:e,strokeWidth:"1.2"}),c.jsx("path",{d:"M7 6v4",stroke:e,strokeWidth:"1.2",strokeLinecap:"round"}),c.jsx("circle",{cx:"7",cy:"4.5",r:"0.7",fill:e})]}),ed=({content:e,label:t="More info",textColor:n="#f9fafb",backgroundColor:s="#111827",borderColor:r="rgba(255,255,255,0.08)",accentColor:o="#9ca3af",children:i})=>{const a=p.useId(),[l,u]=p.useState(!1),m=p.useRef(null),[f,h]=p.useState(!1),[y,g]=p.useState(null);p.useEffect(()=>{h(!0)},[]),p.useLayoutEffect(()=>{if(!l||!m.current)return;const w=()=>{if(!m.current)return;const v=m.current.getBoundingClientRect(),C=Math.min(220,window.innerWidth-48),E=Math.min(Math.max(v.left+v.width/2,24+C/2),window.innerWidth-24-C/2),k=v.top>84;g({top:k?v.top-10:v.bottom+10,left:E,placement:k?"top":"bottom"})};return w(),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[l]);const x=l&&f&&y?gr.createPortal(c.jsxs("span",{id:a,role:"tooltip",style:{position:"fixed",left:y.left,top:y.top,transform:y.placement==="top"?"translate(-50%, -100%)":"translate(-50%, 0)",width:"220px",maxWidth:"min(220px, calc(100vw - 48px))",padding:"10px 12px",borderRadius:"10px",backgroundColor:s,color:n,border:`1px solid ${r}`,boxShadow:"0 18px 45px rgba(0,0,0,0.28)",fontSize:"11px",lineHeight:"1.45",fontWeight:500,textAlign:"left",zIndex:d.z.tooltip,pointerEvents:"none"},children:[e,c.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:"50%",width:"10px",height:"10px",transform:"translateX(-50%) rotate(45deg)",backgroundColor:s,...y.placement==="top"?{bottom:"-6px",borderRight:`1px solid ${r}`,borderBottom:`1px solid ${r}`}:{top:"-6px",borderTop:`1px solid ${r}`,borderLeft:`1px solid ${r}`}}})]}),document.body):null;return c.jsxs(c.Fragment,{children:[c.jsx("span",{ref:m,style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:c.jsx("button",{type:"button","aria-label":t,"aria-describedby":l?a:void 0,onFocus:()=>u(!0),onBlur:()=>u(!1),style:{width:"18px",height:"18px",borderRadius:"999px",display:"inline-flex",alignItems:"center",justifyContent:"center",border:`1px solid ${r}`,backgroundColor:"transparent",color:o,cursor:"help",padding:0,outline:"none",boxShadow:l?`0 0 0 2px ${o}26`:"none",transition:"border-color 120ms ease, box-shadow 120ms ease, color 120ms ease"},children:i||c.jsx(Va,{color:o})})}),x]})},Lf=({appName:e,status:t,statusLabel:n,totalUsdValue:s,breakdownSubtitle:r,showUsdSummary:o=!0,address:i,dk:a,dark:l=!1,showModeToggle:u,isEmbeddedMode:m=!0,onModeToggle:f})=>{const[h,y]=p.useState(!1),g=async()=>{i&&await d.copyToClipboard(i)&&(y(!0),setTimeout(()=>y(!1),2e3))},x=t==="active",w=n||(x?"Active":"Inactive"),v=x?"#10b981":"#9ca3af",C=c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[c.jsxs("div",{children:[c.jsx("strong",{children:"Embedded:"})," Deposit assets into ",e," account and use them here."]}),c.jsxs("div",{children:[c.jsx("strong",{children:"External:"})," Use assets from your connected wallet here."]})]});return c.jsxs("div",{children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[c.jsxs("div",{style:{fontSize:"13px",fontWeight:600,color:a.textPrimary},children:[e," Account"]}),u?c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsxs("button",{onClick:f,style:{display:"flex",alignItems:"center",gap:"4px",padding:"2px 8px",borderRadius:"9999px",backgroundColor:l?a.hoverBg:"#f3f4f6",border:l?`1px solid ${a.cardBorder}`:"1px solid #e5e7eb",cursor:"pointer",fontSize:"11px",fontWeight:600,fontFamily:d.font.mono,color:a.textSecondary,transition:"background-color 150ms ease, border-color 150ms ease, color 150ms ease",letterSpacing:"0.02em"},children:[c.jsx("span",{children:m?"Embedded":"External"}),c.jsx("img",{src:qf,alt:"","aria-hidden":"true",style:{width:"11px",height:"11px",display:"block",...l?{filter:"invert(0.65)"}:{}}})]}),c.jsx(ed,{content:C,label:"Account mode info",textColor:l?a.textPrimary:"#f9fafb",backgroundColor:l?a.cardBg:"#111827",borderColor:l?a.cardBorder:"rgba(255,255,255,0.08)",accentColor:l?a.textSecondary:"#6b7280",children:c.jsx("img",{src:za,alt:"","aria-hidden":"true",style:{width:"12px",height:"12px",display:"block",...l?{filter:"invert(0.65)"}:{}}})})]}):c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",padding:"2px 8px",borderRadius:"9999px",backgroundColor:l?a.hoverBg:x?"#ecfdf5":"#f3f4f6",border:l?`1px solid ${a.cardBorder}`:x?"1px solid #a7f3d0":"1px solid #e5e7eb"},children:[c.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:v}}),c.jsx("span",{style:{fontSize:"11px",fontWeight:500,color:l?a.textSecondary:x?"#065f46":"#6b7280"},children:w})]})]}),o&&c.jsx("div",{style:{fontSize:"28px",fontWeight:700,color:a.textPrimary,lineHeight:1.2,marginBottom:"2px"},children:d.formatUsd(s)}),o&&r&&c.jsx("div",{style:{fontSize:"12px",color:a.textSecondary,marginBottom:"8px"},children:r}),i&&c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsx("span",{style:{fontSize:"12px",fontFamily:d.font.mono,color:l?a.textSecondary:"#9ca3af"},children:d.truncateAddress(i)}),c.jsx("button",{onClick:g,style:{padding:"2px 6px",fontSize:"10px",fontWeight:500,backgroundColor:"transparent",color:l?a.textSecondary:"#9ca3af",border:"none",cursor:"pointer",borderRadius:"4px",transition:"background-color 150ms ease, color 150ms ease"},title:"Copy address",children:h?"Copied":"Copy"})]})]})},zf=p.memo(Lf),Hf={1:"ethereum",56:"binance-smart-chain",137:"polygon-pos",143:"monad",4114:"citrea",4663:"robinhood",8453:"base",42161:"arbitrum-one"},Vf=6e4,Lr=new Map;function td(e,t){return Lr.get(e)?.logos?.get(t.toLowerCase())}function Qf(e,t){const n=Hf[e];if(!n||S.isNativeToken(t))return;const s=Lr.get(e);if(s?.logos||s?.pending)return s.pending;if(s?.failedAt!==void 0&&Date.now()-s.failedAt<Vf)return;const r=Promise.resolve().then(async()=>{try{const o=await fetch(`https://tokens.coingecko.com/${n}/all.json`,{signal:AbortSignal.timeout(1e4)});if(!o.ok)throw new Error("Token list request failed");const i=await o.json(),a=new Map;for(const l of i?.tokens??[])l?.address&&l?.logoURI&&a.set(String(l.address).toLowerCase(),l.logoURI);Lr.set(e,{logos:a})}catch(o){console.warn(`[tokenLogos] Token list unavailable for chain ${e}`,o),Lr.set(e,{failedAt:Date.now()})}});return Lr.set(e,{...s,pending:r}),r}function Qa(e,t,n){const[s,r]=p.useState(),o=e||e===null||t===void 0||!n?void 0:`${t}:${n.toLowerCase()}`,i=o?td(t,n):void 0;return p.useEffect(()=>{if(!o||i||t===void 0||!n)return;let a=!0;const l=()=>{const m=td(t,n);a&&m&&r({token:o,logo:m})},u=Qf(t,n);return u?u.then(l):l(),()=>{a=!1}},[o,i,t,n]),e||i||(s&&s.token===o?s.logo:void 0)}const Gf=({asset:e,label:t,logo:n,dk:s,dark:r})=>{const o=Qa(n,e.chainId,e.tokenAddress),[i,a]=p.useState();return n===null?null:o&&o!==i?c.jsx("img",{src:o,alt:t,onError:()=>a(o),style:{width:"24px",height:"24px",borderRadius:"50%"}}):c.jsx("div",{style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:r?s.hoverBg:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",fontWeight:600,color:s.textSecondary},children:t.charAt(0)})},Kf=e=>`${e.tokenAddress}-${e.chainId}`,Yf=({spiceAssets:e,loading:t,dk:n,dark:s=!1,canDirectWithdraw:r=!1,onDirectWithdraw:o,directWithdrawState:i,onWithdrawClick:a,limit:l})=>{const u=d.useAssetDisplay(),[m,f]=p.useState(!1),h=l!==void 0&&!m?Math.max(e.length-l,0):0,y=h>0?e.slice(0,l):e,g={fontSize:"11px",fontWeight:600,letterSpacing:"1px",color:n.textSecondary,marginBottom:"8px",textTransform:"uppercase"},x={backgroundColor:n.cardBg,border:s?`1px solid ${n.cardBorder}`:"1px solid #e5e7eb",borderRadius:"8px"};return t?c.jsxs("div",{children:[c.jsx("div",{style:g,children:"Idle Balances"}),[1,2].map(w=>c.jsx("div",{style:{...x,padding:"12px",marginBottom:"6px",height:"48px",animation:"pulse 1.5s ease-in-out infinite",opacity:.5}},w))]}):e.length===0?c.jsxs("div",{children:[c.jsx("div",{style:g,children:"Idle Balances"}),c.jsx("div",{style:{...x,padding:"16px",textAlign:"center",fontSize:"13px",color:s?n.textSecondary:"#9ca3af"},children:"No assets yet. Deposit to get started."})]}):c.jsxs("div",{children:[c.jsx("div",{style:g,children:"Idle Balances"}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[y.map(w=>{const v=d.getChainConfig(w.chainId),C=w.chainDisplayName||v?.displayName||`Chain ${w.chainId}`,E=u({symbol:w.tokenSymbol,displaySymbol:w.tokenDisplaySymbol||w.tokenDisplayName,displayName:w.tokenDisplayName,receiptTokenId:w.receiptTokenId,receiptTokenName:w.receiptTokenName,location:w.location,logoURI:w.logoURI}),k=E.symbol,F=Kf(w),O=w.receiptTokenId&&a,I=O||r&&w.directWithdraw&&!!o,b=!O&&i?.key===F?i:null,A=b?.step==="pending";return c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",...x},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Gf,{asset:w,label:k,logo:E.logoURI,dk:n,dark:s}),c.jsxs("div",{children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:n.textPrimary},children:k}),c.jsx("div",{style:{fontSize:"11px",color:s?n.textSecondary:"#9ca3af"},children:C})]})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[c.jsxs("div",{style:{textAlign:"right"},children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:n.textPrimary},children:d.formatAssetBalance({balance:BigInt(w.balance),decimals:w.tokenDecimals})}),c.jsx("div",{style:{fontSize:"11px",color:b?.step==="error"?n.errorText:s?n.textSecondary:"#9ca3af"},children:b?.step==="error"?b.message||"Withdraw failed":!Number.isFinite(w.usdValue)||w.usdValue<=0?"\u2014":`${d.formatUsd(w.usdValue)}${w.priceStatus==="stale"?" (stale)":""}`})]}),I&&c.jsx("button",{onClick:()=>{A||(O?O(w.receiptTokenId):o(w))},disabled:A,title:O?"Choose withdrawal network":"Withdraw to external wallet",style:{padding:"6px 10px",borderRadius:"6px",border:s?`1px solid ${n.cardBorder}`:"1px solid #e5e7eb",backgroundColor:s?n.hoverBg:"#ffffff",color:n.textPrimary,fontSize:"11px",fontWeight:600,cursor:A?"default":"pointer",opacity:A?.6:1,whiteSpace:"nowrap"},children:A?"Withdrawing\u2026":"Withdraw"})]})]},w.positionId??`${w.owner??""}:${w.location??""}:${w.receiptTokenId??`${w.tokenAddress}-${w.chainId}`}`)}),l!==void 0&&e.length>l&&c.jsxs("button",{onClick:()=>f(!m),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",width:"100%",padding:"8px 12px",...x,cursor:"pointer",color:n.textSecondary,fontSize:"12px",fontWeight:500},children:[c.jsx("span",{children:m?"Show less":`Show ${h} more`}),c.jsx("span",{style:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease",fontSize:"10px"},children:"\u25BE"})]})]})]})},Zf=p.memo(Yf),Xf=({appName:e,status:t,statusLabel:n,totalUsdValue:s,breakdownSubtitle:r,showUsdSummary:o,address:i,spiceAssets:a,spiceAssetsLoading:l,customSections:u,notice:m,onDepositClick:f,onWithdrawClick:h,depositDisabled:y,primaryColor:g,buttonStyles:x,dk:w,dark:v=!1,showModeToggle:C,isEmbeddedMode:E,onModeToggle:k,showConnectExternalCta:F,onConnectExternalWallet:O,connectExternalError:I,showHowItWorks:b=!0,canDirectWithdraw:A,onDirectWithdraw:R,directWithdrawState:B,idleBalancesLimit:q})=>{const[j,P]=p.useState(!1);return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",padding:"16px",maxHeight:"calc(80vh - 32px)",overflowY:"auto"},children:[c.jsx(zf,{appName:e,status:t,statusLabel:n,totalUsdValue:s,breakdownSubtitle:r,showUsdSummary:o,address:i,dk:w,dark:v,showModeToggle:C,isEmbeddedMode:E,onModeToggle:k}),m&&c.jsx("div",{style:{padding:"10px 12px",borderRadius:"8px",backgroundColor:m.tone==="warning"?v?"rgba(245, 158, 11, 0.12)":"#fffbeb":m.tone==="success"?v?"rgba(16, 185, 129, 0.12)":"#ecfdf5":w.cardBg,border:m.tone==="warning"?v?"1px solid rgba(245, 158, 11, 0.35)":"1px solid #fde68a":m.tone==="success"?v?"1px solid rgba(16, 185, 129, 0.35)":"1px solid #a7f3d0":v?`1px solid ${w.cardBorder}`:"1px solid #e5e7eb",color:m.tone==="warning"?v?"#fbbf24":"#92400e":m.tone==="success"?v?"#34d399":"#047857":w.textSecondary,fontSize:"12px",lineHeight:1.45,fontWeight:500},children:m.message}),F&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[c.jsx("button",{onClick:O,style:{width:"100%",padding:"10px 14px",borderRadius:"8px",backgroundColor:g||"#EA4B4B",color:"#ffffff",border:"none",cursor:"pointer",fontSize:"13px",fontWeight:600,fontFamily:d.font.ui,transition:"opacity 150ms ease"},children:"Connect External Wallet"}),I&&c.jsx("span",{style:{fontSize:"11px",color:v?w.errorText:"#b91c1c",lineHeight:1.4},children:I})]}),c.jsx("div",{style:{height:"1px",backgroundColor:v?"#2d2d2d":"#e5e7eb"}}),c.jsx(Pf,{onDepositClick:f,onWithdrawClick:h,depositDisabled:y,primaryColor:g,buttonStyles:x,dark:v}),b&&c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>P(!j),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"8px 12px",backgroundColor:w.cardBg,border:v?`1px solid ${w.cardBorder}`:"1px solid #e5e7eb",borderRadius:"8px",cursor:"pointer",color:w.textSecondary,fontSize:"12px",fontWeight:500},children:[c.jsx("span",{children:"How It Works"}),c.jsx("span",{style:{transform:j?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease",fontSize:"10px"},children:"\u25BE"})]}),j&&c.jsxs("div",{style:{marginTop:"6px",padding:"10px 12px",backgroundColor:v?w.cardBg:"#f0fdf4",border:v?`1px solid ${w.cardBorder}`:"1px solid #bbf7d0",borderRadius:"8px",fontSize:"12px",lineHeight:1.5,color:v?w.textSecondary:"#374151"},children:["Fund your ",e," Account from any supported chain. Once funded, transact gas-free and asset-abstracted on ",e,"."]})]}),c.jsx(Zf,{spiceAssets:a,loading:l,dk:w,dark:v,canDirectWithdraw:A,onDirectWithdraw:R,directWithdrawState:B,onWithdrawClick:h,limit:q}),u.map((D,M)=>c.jsx(Wf,{section:D,dk:w,dark:v},M))]})},Jf=p.memo(Xf);function $f({dark:e,onSuccess:t,onError:n}){const{disconnect:s}=is.useDisconnect(),{logout:r}=hr.usePrivy(),[o,i]=p.useState(!1);return c.jsx(d.Button,{variant:"ghost",fullWidth:!0,dark:e,loading:o,onClick:async()=>{i(!0);try{s(),await r(),t()}catch(a){n(d.sanitizeError(a,"Unable to disconnect. Please try again."))}finally{i(!1)}},children:"Disconnect"})}const Ga=380,qs=8,_f=[],em={};function nd(e){return e?.trim().replace(/^spice/i,"").replace(/[^a-z0-9]/gi,"").toUpperCase()||void 0}function tm(e,t){const n=new Map;Object.entries(t).forEach(([r,o])=>{if(!Number.isFinite(o)||o<=0)return;n.set(r,o),n.set(r.toUpperCase(),o);const i=nd(r);i&&n.set(i,o)});const s=[e.symbol,e.displaySymbol,e.receiptTokenName,e.name,e.displayName];for(const r of s){if(!r)continue;const o=n.get(r)??n.get(r.toUpperCase());if(o!==void 0)return o;const i=nd(r);if(!i)continue;const a=n.get(i);if(a!==void 0)return a}return 0}const sd=({appName:e,status:t="active",statusLabel:n,customSections:s=_f,extraAssets:r=[],tokenPrices:o={},tokenLogos:i=em,breakdownLabels:a=[],notice:l,styles:u,dark:m,onDepositClick:f,onWithdrawClick:h,showModeToggle:y=!1,defaultMode:g,showUsdSummary:x=!0,alwaysShowEmbeddedIdle:w=!1,idleBalancesLimit:v,showDisconnect:C=!1})=>{const E=p.useContext(d.SpiceFlowProviderContext),k=E?.mode!=="7702",F=!!E?.isWhitelistGateActive,O=!!E?.isWhitelistConfigured&&E?.isUserWhitelisted!==!0,I=p.useRef(!1);p.useEffect(()=>{if(!I.current){if(d.hasStoredSpiceFlowMode()){I.current=!0;return}g&&E?.setMode&&(E.setMode(g==="non7702"?"ondemand":"7702"),I.current=!0)}},[E,g]);const[b,A]=p.useState(!1),[R,B]=p.useState({top:0,bottom:0,left:0,placement:"below"}),q=p.useRef(null),j=p.useRef(null),{address:P,isConnected:D}=d.useWallet(),M=E?.embeddedWalletAddress,L=E?.externalWalletAddress,{embeddedAddress:T}=d.useProviderWallets(),{brand:H,dark:V,primaryColor:te,dk:Z}=d.useSpiceBrand(u,m),K=e??H?.appName??"Spice",Y=k&&!L,J=!k||w,we=J?M||T:P,me=p.useMemo(()=>E?.supportedChainIds??S.getChainIdsByNetwork("mainnet"),[E?.supportedChainIds]),xe=Ms({owner:J?we:L,role:"holding",sourceChains:me,additionalSourceTokens:r.filter(Ee=>!Ee.receiptTokenId&&(!Ee.owner||d.addressesEqual(Ee.owner,J?we:L))).map(Ee=>({address:Ee.tokenAddress,chainId:Ee.chainId,decimals:Ee.tokenDecimals,symbol:Ee.tokenSymbol,logoURI:Ee.logoURI})),includeRollupAssets:J,enabled:J?!!we:!!L}),Ce=xe.assets.filter(Ee=>Ee._source==="spice"),ne=xe.walletAssets,_=xe.loading,de=xe.refresh,W=J?we:L,je=p.useMemo(()=>r.filter(Ee=>!Ee.owner||Ee.owner.toLowerCase()===W?.toLowerCase()).map(Ee=>({...Ee,owner:Ee.owner??W,location:Ee.location??(Ee.receiptTokenId?"rollup":J?"embedded":"external")})),[r,W,J]),Ae=p.useMemo(()=>{const Ee=new Map(Object.entries(o).filter(([,Ie])=>Number.isFinite(Ie)&&Ie>0).map(([Ie,lt])=>[Ie.toLowerCase(),lt]));return ne.map(Ie=>({owner:Ie.owner,location:Ie.location,positionId:ye(Ie),tokenAddress:Ie.address,tokenSymbol:Ie.symbol,tokenDecimals:Ie.decimals,chainId:Ie.chainId,chainDisplayName:d.getChainName(Ie.chainId),balance:Ie.balance.toString(),balanceFormatted:Ie.balanceFormatted,usdValue:Ie.balanceUsd||(Ee.get(`${Ie.chainId}:${Ie.address.toLowerCase()}`)??0)*Ie.balanceFormatted,logoURI:Ie.logoURI||i[Ie.symbol],directWithdraw:J}))},[ne,je,i,o,J]),z=p.useMemo(()=>{const Ee=J?Ce.map(ae=>{const dt=ae.balanceUsd||0,ut=Number.isFinite(ae.balanceFormatted)?ae.balanceFormatted:0,Me=tm(ae,o),bt=ae.priceStatus&&Me>0?Me*ut:dt>0?dt:Me*ut;return{owner:ae.owner,location:ae.location,positionId:ye(ae),tokenAddress:ae.address,tokenSymbol:ae.symbol,tokenDisplaySymbol:d.getAssetDisplaySymbol(ae),tokenDisplayName:d.getAssetDisplayName(ae),tokenDecimals:ae.decimals,chainId:ae.chainId,chainDisplayName:d.getAssetDisplayChainName(ae),balance:ae.balance.toString(),balanceFormatted:ae.balanceFormatted,usdValue:bt,priceStatus:Me>0?void 0:ae.priceStatus,logoURI:ae.logoURI,receiptTokenId:ae.receiptTokenId,receiptTokenName:ae.receiptTokenName}}):[],Ie=ae=>`${ae.owner?.toLowerCase()}:${ae.location}:${ae.chainId}:${ae.receiptTokenId??S.normalizeNativeTokenAddress(ae.tokenAddress).toLowerCase()}`,lt=new Map([...xe.rollupAssets,...ne].map(ae=>[Ie({...ae,tokenAddress:ae.address}),ae])),_e=new Map([...Ee,...Ae].map(ae=>[Ie(ae),ae]));for(const ae of Y?[]:je){const dt=Ie(ae),ut=_e.get(dt);_e.set(dt,ut?{...ae,...ut,logoURI:ae.logoURI??ut.logoURI,tokenDisplayName:ae.tokenDisplayName??ut.tokenDisplayName,tokenDisplaySymbol:ae.tokenDisplaySymbol??ut.tokenDisplaySymbol}:ae)}return[..._e.values()].filter(ae=>BigInt(ae.balance)>0n&&hc({isDiscovered:lt.get(Ie(ae))?.isDiscovered,balanceUsd:ae.usdValue},!0)&&d.isAssetAllowed(lt.get(Ie(ae))??{address:ae.tokenAddress,symbol:ae.tokenSymbol,displaySymbol:ae.tokenDisplaySymbol},E?.allowedTokens)).sort((ae,dt)=>dt.usdValue-ae.usdValue)},[J,Y,Ce,xe.rollupAssets,o,Ae,je,E?.allowedTokens]),Q=p.useMemo(()=>z.reduce((Ee,Ie)=>Ee+Ie.usdValue,0),[z]),se=p.useMemo(()=>s.reduce((Ee,Ie)=>Ee+(Ie.totalValue??0),0),[s]),ce=Q+se,X=p.useMemo(()=>{const Ee=[];Q>0&&Ee.push(`${d.formatUsd(Q)} idle`);for(const Ie of s){const lt=a.find(_e=>_e.sectionTitle===Ie.title)?.label||Ie.title.toLowerCase();Ee.push(`${d.formatUsd(Ie.totalValue??0)} ${lt}`)}return Ee.join(" \xB7 ")},[Q,s,a]),oe=p.useCallback(()=>{if(!q.current)return;const Ee=q.current.getBoundingClientRect(),Ie=window.innerHeight-Ee.bottom-qs,lt=Ee.top-qs,_e=Ie>=400||Ie>=lt?"below":"above",ae=Math.max(qs,Math.min(Ee.right-Ga,window.innerWidth-Ga-qs)),dt=_e==="below"?Ee.bottom+qs:Ee.top-qs,ut=_e==="above"?window.innerHeight-dt:0;B({top:dt,bottom:ut,left:ae,placement:_e})},[]);p.useLayoutEffect(()=>{b&&oe()},[b,oe]),p.useEffect(()=>{if(!b)return;const Ee=_e=>{q.current&&!q.current.contains(_e.target)&&j.current&&!j.current.contains(_e.target)&&A(!1)},Ie=_e=>{_e.key==="Escape"&&A(!1)},lt=()=>oe();return document.addEventListener("mousedown",Ee),document.addEventListener("keydown",Ie),window.addEventListener("scroll",lt,{passive:!0}),window.addEventListener("resize",oe),()=>{document.removeEventListener("mousedown",Ee),document.removeEventListener("keydown",Ie),window.removeEventListener("scroll",lt),window.removeEventListener("resize",oe)}},[b,oe]);const Oe=J?M||T||P:L||P,Ne=p.useCallback(()=>{E?.setMode&&E.setMode(k?"7702":"ondemand")},[E,k]),[he,Se]=p.useState(null);let Te=null;try{Te=hr.useConnectWallet({onSuccess:()=>Se(null),onError:Ee=>Se(d.sanitizeError(Ee,"Failed to connect wallet."))}).connectWallet}catch{Te=null}const ve=p.useCallback(()=>{Te&&(A(!1),Se(null),Te({walletChainType:"ethereum-only"}))},[Te]),We=!L&&!!Te,be=p.useCallback(()=>{A(!1),f?.()},[f]),Pe=p.useCallback(Ee=>{A(!1),h?.(Ee)},[h]),[ue,Ke]=p.useState(null),ft=J&&!!L&&!d.addressesEqual(W,L),tt=p.useCallback(Ee=>{const Ie=ne.find(lt=>lt.chainId===Ee.chainId&&d.addressesEqual(lt.address,Ee.tokenAddress));Ie&&(A(!1),Ke(Ie))},[ne]);if(typeof window>"u")return null;const $e=c.jsxs("button",{ref:q,onClick:()=>A(!b),style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"8px 14px",borderRadius:"9999px",backgroundColor:V?Z.hoverBg:"#ffffff",border:V?`1px solid ${Z.cardBorder}`:"1px solid #e5e7eb",cursor:"pointer",fontSize:"13px",fontWeight:500,fontFamily:d.font.ui,color:V?Z.textPrimary:"#111827",transition:"background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease",boxShadow:V?"none":"0 1px 2px rgba(0,0,0,0.05)"},children:[c.jsxs("span",{children:[K," Account"]}),D&&x&&c.jsxs("span",{style:{color:V?Z.textSecondary:"#6b7280"},children:["\xB7 ",d.formatUsd(ce)]}),c.jsx("span",{style:{fontSize:"10px",color:V?Z.textSecondary:"#9ca3af",transform:b?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:"\u25BE"})]}),Qe=b?gr.createPortal(c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.08)",zIndex:d.z.popover},onClick:()=>A(!1)}),c.jsxs("div",{ref:j,style:{position:"fixed",top:R.placement==="below"?`${R.top}px`:"auto",bottom:R.placement==="above"?`${R.bottom}px`:"auto",left:`${R.left}px`,width:`${Ga}px`,maxWidth:`calc(100vw - ${qs*2}px)`,maxHeight:"80vh",backgroundColor:V?Z.shell:"#ffffff",border:V?`1px solid ${Z.cardBorder}`:"1px solid #e5e7eb",borderRadius:"12px",boxShadow:V?"0 10px 40px rgba(0, 0, 0, 0.5)":"0 10px 40px rgba(0, 0, 0, 0.12)",zIndex:d.z.popover+1,overflow:"hidden",animation:`accountDisplayFadeIn 200ms ${d.easing.out}`},children:[c.jsx(Jf,{appName:K,status:t,statusLabel:n,totalUsdValue:ce,breakdownSubtitle:X,showUsdSummary:x,address:J?Oe:P,spiceAssets:z,spiceAssetsLoading:_,customSections:s,notice:l,onDepositClick:f?be:void 0,onWithdrawClick:h?Pe:void 0,depositDisabled:O,primaryColor:te,buttonStyles:u?.button,dk:Z,dark:V,showModeToggle:y,isEmbeddedMode:!k,onModeToggle:Ne,showConnectExternalCta:We,onConnectExternalWallet:ve,connectExternalError:he,showHowItWorks:!F,canDirectWithdraw:ft,onDirectWithdraw:tt,idleBalancesLimit:v}),C&&D&&c.jsx("div",{style:{padding:"0 16px 16px"},children:c.jsx($f,{dark:V,onSuccess:()=>A(!1),onError:Se})})]}),c.jsx("style",{children:`
|
|
17
17
|
@keyframes accountDisplayFadeIn {
|
|
18
18
|
from { opacity: 0; transform: translateY(-4px); }
|
|
19
19
|
to { opacity: 1; transform: translateY(0); }
|
|
20
20
|
}
|
|
21
|
-
`})]}),document.body):null;return c.jsxs(c.Fragment,{children:[$e,Ge,de&&hr.createPortal(c.jsx(Va,{isOpen:!0,onClose:()=>Ye(null),styles:u,walletAssets:{initialAsset:de},onWithdrawSuccess:()=>{le(),Ye(null)}}),document.body)]})},rd=({chainId:e,name:t,size:n=16})=>{const s=e&&(bs[e]||S.getChainMeta(e)?.logo)||"";return s?c.jsx("img",{src:s,alt:t||`Chain ${e}`,loading:"lazy",decoding:"async",width:n,height:n,style:{width:`${n}px`,height:`${n}px`,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):null},Bo=({symbol:e,label:t,logoURI:n,chainId:s,address:r,size:o=20,theme:i})=>{const{theme:a}=l.useSpiceBrand(),d=i||a,[u,m]=p.useState(),f={width:`${o}px`,height:`${o}px`,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${o*.4}px`,fontWeight:d.typography.fontWeight.bold,flexShrink:0,overflow:"hidden",backgroundColor:"#ffffff"},h=Ga(n===null?null:n||sa[e.toUpperCase()],s,r);if(n===null)return null;if(h&&h!==u)return c.jsx("img",{src:h,alt:t??e,loading:"lazy",decoding:"async",style:{...f,objectFit:"cover"},onError:()=>m(h)});const y=em(e);return c.jsx("div",{style:{...f,...y.style},children:y.icon})},em=e=>{const t=e.toUpperCase(),n={ETH:{bg:"#627EEA",text:"#FFFFFF",icon:"\u039E"},BTC:{bg:"#F7931A",text:"#FFFFFF",icon:"\u20BF"},USDC:{bg:"#2775CA",text:"#FFFFFF"},USDT:{bg:"#26A17B",text:"#FFFFFF"},DAI:{bg:"#F5AC37",text:"#FFFFFF"},WETH:{bg:"#627EEA",text:"#FFFFFF",icon:"\u039E"},WBTC:{bg:"#F09242",text:"#FFFFFF",icon:"\u20BF"},CBTC:{bg:"#F7931A",text:"#FFFFFF",icon:"\u20BF"},USD:{bg:"#26A17B",text:"#FFFFFF",icon:"$"},MATIC:{bg:"#8247E5",text:"#FFFFFF"},AVAX:{bg:"#E84142",text:"#FFFFFF"},SOL:{bg:"#9945FF",text:"#FFFFFF"},DOT:{bg:"#E6007A",text:"#FFFFFF"},ADA:{bg:"#0033AD",text:"#FFFFFF"},LINK:{bg:"#375BD2",text:"#FFFFFF"},UNI:{bg:"#FF007A",text:"#FFFFFF"},AAVE:{bg:"#B6509E",text:"#FFFFFF"},CRV:{bg:"#40E0D0",text:"#000000"}}[t];if(n)return{style:{backgroundColor:n.bg,color:n.text},icon:n.icon||t.charAt(0)};const s=t.split("").reduce((a,d)=>d.charCodeAt(0)+((a<<5)-a),0),r=Math.abs(s)%360,o=`hsl(${r}, 60%, 50%)`,i=r>180?"#FFFFFF":"#000000";return{style:{backgroundColor:o,color:i},icon:t.charAt(0)}},tm=({selectedAsset:e,assets:t,onAssetSelect:n,showDropdown:s,onToggleDropdown:r,disabled:o=!1,theme:i,onViewAllAssets:a,getAvailableBalance:d})=>{const u=l.useAssetDisplay(),m=D=>{const M=d?d(D):D.balance;return M===void 0?"...":l.formatAssetBalance({balance:M,decimals:D.decimals})},{theme:f}=l.useSpiceBrand(),h=i||f,y=p.useRef(null),g=p.useRef(null),x=p.useRef(null),[w,v]=p.useState(null);p.useEffect(()=>{if(s&&g.current){const D=()=>{if(g.current){const M=g.current.getBoundingClientRect();v({top:M.bottom+6,right:window.innerWidth-M.right})}};return D(),window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}}else v(null)},[s]),p.useEffect(()=>{const D=M=>{y.current&&!y.current.contains(M.target)&&x.current&&!x.current.contains(M.target)&&s&&r()};return s&&document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[s,r]);const[C,E]=p.useState(!1),k=h.mode==="light",F={backgroundColor:"transparent",border:`1px solid ${k?"#aaaaaa":h.colors.border}`,borderRadius:"6px",color:h.colors.text,cursor:o?"not-allowed":"pointer",padding:"8px 14px 8px 10px",width:"100%",display:"flex",flexDirection:"column",gap:"4px",opacity:o?.6:1,transition:l.transition.interactive,transform:C?"scale(0.98)":"scale(1)"},j={display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",minWidth:0},I={display:"flex",alignItems:"center",gap:"4px",paddingTop:"4px",borderTop:`1px solid ${h.colors.border}`},b=()=>w?{position:"fixed",top:`${w.top}px`,right:`${w.right}px`,backgroundColor:h.colors.secondary,border:`1px solid ${h.colors.border}`,borderRadius:h.borderRadius.md,boxShadow:h.shadows.lg,zIndex:l.z.dropdown,width:"200px",maxHeight:"300px",overflow:"auto"}:{},A={backgroundColor:"transparent",border:"none",color:h.colors.text,cursor:"pointer",padding:h.spacing.sm,width:"100%",display:"flex",alignItems:"center",gap:h.spacing.sm,transition:`background-color ${h.animation.normal}`,":hover":{backgroundColor:h.colors.surfaceHover}},R={display:"flex",flexDirection:"column",alignItems:"flex-start",flex:1},B={fontSize:h.typography.fontSize.sm,fontWeight:h.typography.fontWeight.medium},q={fontSize:h.typography.fontSize.xs,color:h.colors.textMuted},O={backgroundColor:"transparent",border:"none",borderTop:`1px solid ${h.colors.border}`,color:h.colors.primary,cursor:"pointer",padding:"10px 12px",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",fontFamily:h.typography.fontFamily,fontSize:h.typography.fontSize.xs,fontWeight:h.typography.fontWeight.medium,textDecoration:"underline",textUnderlineOffset:"2px"},P={transition:`transform ${h.animation.normal}`,transform:s?"rotate(180deg)":"rotate(0deg)",flexShrink:0};return c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{position:"relative"},ref:y,children:c.jsxs("div",{ref:g,style:F,onClick:o?void 0:r,onMouseLeave:()=>{E(!1)},onMouseDown:()=>E(!0),onMouseUp:()=>E(!1),children:[c.jsxs("div",{style:j,children:[c.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},children:e?.asset?c.jsxs(c.Fragment,{children:[c.jsx(Bo,{symbol:e.asset.symbol,label:u(e.asset).symbol,logoURI:u(e.asset).logoURI,chainId:e.asset.chainId,address:e.asset.address,theme:h,size:24}),c.jsx("span",{style:{fontSize:"15px",fontWeight:500,color:h.colors.text,lineHeight:"1.5",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u(e.asset).symbol})]}):c.jsx("span",{style:{fontSize:"14px",color:h.colors.textMuted},children:"Select"})}),c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:k?h.colors.textMuted:"#c7ccd4",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:P,children:c.jsx("path",{d:"M6 9l6 6 6-6"})})]}),e?.asset&&c.jsxs("div",{style:I,children:[!e.asset.displayChainName&&c.jsx(rd,{chainId:e.asset.chainId,theme:h}),c.jsx("span",{style:{fontSize:"11px",color:h.colors.textMuted},children:l.getAssetDisplayChainName(e.asset)})]})]})}),s&&w&&hr.createPortal(c.jsxs("div",{ref:x,style:b(),children:[t.length===0&&c.jsx("div",{style:{padding:"10px 12px",color:h.colors.textMuted,fontSize:h.typography.fontSize.xs},children:"No assets available"}),t.map(D=>c.jsxs("button",{style:A,onClick:()=>{n(D),r()},children:[c.jsx(Bo,{symbol:D.symbol,label:u(D).symbol,logoURI:u(D).logoURI,chainId:D.chainId,address:D.address,theme:h},xe(D)),c.jsxs("div",{style:R,children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:h.spacing.xs},children:[c.jsx("span",{style:B,children:u(D).symbol}),!D.displayChainName&&c.jsx(rd,{chainId:D.chainId,theme:h})]}),c.jsxs("span",{style:q,children:[m(D)," \u2022 ",l.getAssetDisplayChainName(D)]})]})]},xe(D))),a&&c.jsxs("button",{type:"button",style:O,onClick:()=>{r(),a()},children:[c.jsx("span",{children:"View all assets"}),c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M5 12h14"}),c.jsx("path",{d:"M13 5l7 7-7 7"})]})]})]}),document.body)]})},nm=({assets:e,selectedAsset:t,onAssetSelect:n,onAmountChange:s,disabled:r=!1,loading:o=!1,label:i="Select Asset",showBalance:a=!0,showMaxButton:d=!0,placeholder:u="0.0",theme:m,styles:f,maxAmount:h,resolveMaxAmount:y,getAvailableBalance:g,hideAmountInput:x=!1,displayAmount:w,dark:v,onViewAllAssets:C})=>{const E=l.useAssetDisplay(),{theme:k,primaryColor:F,dark:j,dk:I}=l.useSpiceBrand(f,v),b=m||k,A=v??j,[R,B]=p.useState(!1),[q,O]=p.useState(null),[P,D]=p.useState(null),[M,L]=p.useState(!1),[T,H]=p.useState(null),[V,te]=p.useState(t?.amount||""),Z=p.useRef(0),K=t?.asset?xe(t.asset):"",Y=t?.asset?g?g(t.asset):t.asset.balance:void 0,J=T??h;p.useLayoutEffect(()=>()=>{Z.current++},[]),p.useLayoutEffect(()=>{Z.current++,te(t?.amount||""),L(!1)},[K,t?.amount]),p.useLayoutEffect(()=>{Z.current++,H(null),L(!1)},[K,t?.asset.owner,t?.asset.decimals,t?.asset.balance,Y,h,y,r,o]);const ge=()=>{Z.current++,L(!1)},pe=()=>{const z=t?.asset;if(!z||Y===void 0)return;if(!J)return Y;const Q=N.parseUnits(J,z.decimals);return Q<Y?Q:Y},we=z=>{te(z),s?.(z)},ve=z=>{ge();const Q=t?.asset,se=l.parseNumericInput(z.startsWith(".")?`0${z}`:z,Q?.decimals);if(!Q||!se)return we(se);const ie=N.parseUnits(se,Q.decimals),X=pe();we(X!==void 0&&ie>X?N.formatUnits(X,Q.decimals):se)},ne=async()=>{const z=t?.asset;if(!z||r||o||Y===void 0)return;const Q=++Z.current,se=()=>Z.current===Q,ie=y;if(T!==null){const oe=pe();oe!==void 0&&we(N.formatUnits(oe,z.decimals));return}if(ie){L(!0);try{const oe=await ie(z);if(!se())return;if(oe!==null){const je=l.parseNumericInput(oe,z.decimals),Me=pe();if(!je||Me===void 0)return;const me=N.parseUnits(je,z.decimals)>Me?N.formatUnits(Me,z.decimals):je;H(me),we(me);return}return}catch(oe){se()&&console.warn("[AssetSelector] Failed to resolve max amount:",oe);return}finally{se()&&L(!1)}}const X=pe();se()&&X!==void 0&&we(N.formatUnits(X,z.decimals))},_=async z=>{if(!t||r||Y===void 0)return;if(z===100)return ne();ge();const Q=pe();Q!==void 0&&we(N.formatUnits(Q*BigInt(z)/100n,t.asset.decimals))},le=t&&Y!==void 0?Number(N.formatUnits(Y,t.asset.decimals)):0,W=parseFloat(V)||0,De=le>0?W/le*100:0,Ae={backgroundColor:f?.assetSelector?.backgroundColor||f?.secondaryBackground||(A?I.cardBg:"#e9e9e9"),border:A?`0.5px solid ${I.cardBorder}`:"0.5px solid #A8A8A7",borderRadius:f?.assetSelector?.borderRadius||"6px",padding:f?.assetSelector?.padding||"16px",height:"auto",minHeight:x?void 0:"144px",display:"flex",flexDirection:"column",gap:"8px",position:"relative",opacity:r?.6:1};return o?c.jsx("div",{style:Ae,children:c.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"4px",height:"16px",width:"60px"}}),c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"4px",height:"40px",width:"150px"}})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"},children:[c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"4px",height:"12px",width:"80px"}}),c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"6px",height:"46px",width:"128px"}})]})]})}):c.jsxs("div",{style:Ae,children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:{fontFamily:f?.fontFamily||b.typography.fontFamily,fontSize:"16px",fontWeight:500,color:A?I.textSecondary:"#7d7c7b",lineHeight:"24px"},children:i}),a&&t?.asset&&c.jsxs("span",{style:{fontFamily:f?.fontFamily||b.typography.fontFamily,fontSize:"12px",fontWeight:500,color:A?I.textSecondary:"#71757a",lineHeight:"16px"},children:["Balance:"," ",Y===void 0?"...":l.formatAssetBalance({balance:Y,decimals:t.asset.decimals})]})]}),c.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px 12px",justifyContent:x&&!w?"flex-start":"space-between",alignItems:"center",flex:1},children:[!x&&c.jsx(Ws,{element:"input",ariaLabel:t?.asset?`${E(t.asset).symbol} amount`:"Amount",dataSpiceflowFocus:!0,value:V,onChange:z=>ve(z.target.value),placeholder:u,disabled:r||!t?.asset,fontFamily:f?.fontFamily||b.typography.fontFamily,color:r?A?"rgba(255, 255, 255, 0.16)":"rgba(14, 13, 11, 0.16)":V?A?"#ffffff":"#0e0d0b":A?"#4a5568":"#d1d5db",lineHeight:"1.08",maxFontSize:40,minFontSize:22,style:{width:"100%",maxWidth:"200px",flex:"1 1 200px",minWidth:"min(200px, 100%)"}}),c.jsx("div",{style:{width:"176px",maxWidth:"100%",position:"relative",flexShrink:0,marginLeft:x&&!w?void 0:"auto"},children:c.jsx(tm,{selectedAsset:t,assets:e,onAssetSelect:z=>{ge(),H(null),n(z)},showDropdown:R,onToggleDropdown:()=>B(!R),disabled:r,theme:b,onViewAllAssets:C,getAvailableBalance:g})}),x&&w&&c.jsx(Ws,{element:"span",value:w,title:w,fontFamily:f?.fontFamily||b.typography.fontFamily,color:A?"#ffffff":"#0e0d0b",lineHeight:"1.08",textAlign:"right",maxFontSize:40,minFontSize:22,style:{flex:"1 1 200px",minWidth:"min(200px, 100%)"}})]}),!x&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"10px",height:"14px"},children:[0,25,50,75,100].filter(z=>d||z!==100).map((z,Q)=>{const se=Math.abs(De-z)<1,ie=Q===4,X=q===z,oe=P===z;return c.jsx("button",{onClick:()=>_(z),onMouseEnter:()=>O(z),onMouseLeave:()=>{O(null),D(null)},onMouseDown:()=>D(z),onMouseUp:()=>D(null),disabled:r||!t?.asset||Y===void 0||z===100&&M,title:`${z}%`,style:{width:"14px",height:"14px",padding:0,border:"none",backgroundColor:"transparent",cursor:r||!t?.asset||Y===void 0||z===100&&M?"not-allowed":"pointer",opacity:se?1:X?.8:.5,transform:oe?"scale(0.85)":X?"scale(1.15)":"scale(1)",transition:l.transition.interactive},children:c.jsx(za,{pct:z,isMax:ie,primaryColor:F,dark:A,fillColor:A?I.textSecondary:"#3C3E42"})},z)})})]})},or=p.memo(nm);function sm({asset:e,showLogo:t=!0,showLabel:n=!0,denomination:s="token",className:r,style:o}){const i=l.useAssetDisplay()(e),a=s==="token"?l.formatAssetBalance(e):Number.isFinite(e.balanceUsd)&&(e.balanceUsd>0||e.balance===0n)?l.formatUsd(e.balanceUsd):"\u2014";return c.jsxs("span",{className:r,style:{display:"inline-flex",alignItems:"center",gap:6,...o},children:[t&&c.jsx(Bo,{symbol:e.symbol,label:i.symbol,logoURI:i.logoURI,chainId:e.chainId,address:e.address}),n&&c.jsx("span",{children:i.symbol}),c.jsx("span",{children:a})]})}var rm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAASrdJREFUeAHtfQeYHMd15quemc0LLhjBiAEDCAYQiUkgRQDMBNNClBlkSwdYs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HVoqN5QV/5cFPkjKNnCWcT/SO/3DM7w7WChf46npJjWJAaZKA2EqhWizH75xohYifXLE5XxO/3M8CdK63yd1q1TOX0JVqZAQD6UqcB1yu+ec1mcaGABgZMzbj2PktQKFGRGgWZgCWo5iWVPo4T4yHn1ldjdRwUQMGIUhGuV5soI2y2FyA5QvD4PyW32aiUWgedBmgwvvoEe17JktilIJUu7ym6wXBdYsZdbFJ82YMiMrdyTzf1gA3aoH/46zseWr1Hf1u7A0tAMi8UZaB1s5UQqBhOqOikelgmNFe2zAH08LLN+3ACDx3oAy/9YhfevpGBqqWGPmoIYO44F3CkzNH3HQS7RT8FDuT+sekaaUM/a5iZ5koxinEJM5vvUJK91I7rpbGyn1YiQS/i+2X1IKnxmKKYtjanezqSnTOycVZkuX8pKDSpNg9XUbiGZthTF3wu8R2V57WZNUavR2wBwrNero92SH0u5ELuB7cHdjAOcBRpeQ5e8Xmfm68WTwlfusVJ+gV7ogUi8VTsWz2pd7MUKpWTBEhQoQIESJEiBAhQoQIESJEaED8f8CLHLNBkXU/AAAAAElFTkSuQmCC",od="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.51484 1.22476C5.04689 0.494255 5.87167 0 6.83333 0C7.79352 0 8.62302 0.493038 9.15721 1.22447C10.0512 1.08473 10.9879 1.32154 11.6665 2.00014C12.3456 2.67921 12.5823 3.61677 12.4419 4.51135C13.1714 5.04616 13.6667 5.87042 13.6667 6.83333C13.6667 7.79624 13.1714 8.62051 12.4419 9.15532C12.5823 10.0499 12.3456 10.9875 11.6665 11.6665C10.986 12.3471 10.049 12.5769 9.15858 12.4403C8.62445 13.1728 7.79434 13.6667 6.83333 13.6667C5.86959 13.6667 5.04474 13.1705 4.50996 12.44C3.619 12.5772 2.68116 12.3475 2.00014 11.6665C1.31939 10.9858 1.08903 10.0476 1.23037 9.15532C0.501138 8.62162 0 7.79824 0 6.83333C0 5.86843 0.501137 5.04504 1.23037 4.51135C1.08903 3.61904 1.31939 2.68089 2.00014 2.00014C2.67986 1.32042 3.61766 1.08457 4.51484 1.22476ZM9.20928 5.95387C9.51334 5.74624 9.59152 5.33144 9.38389 5.02737C9.17626 4.72331 8.76145 4.64514 8.45739 4.85277L8.3995 4.89229C7.48372 5.51764 6.69012 6.30153 6.05487 7.20477L5.30449 6.45518C5.044 6.19497 4.62189 6.1952 4.36168 6.45569C4.10147 6.71618 4.10169 7.13829 4.36218 7.3985L5.7 8.73489C5.84693 8.88167 6.05387 8.95158 6.25971 8.924C6.46555 8.89641 6.64677 8.77448 6.74987 8.5942C7.34322 7.55668 8.16436 6.6674 9.1514 5.9934L9.20928 5.95387Z' fill='%23EA4B4B'/%3e%3c/svg%3e",om="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaYAAACLCAYAAAAqND1fAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwABSQ1JREFUeAFsvQm8LelZ1vtV1Rr23uecHtLpdJLuzAlJkClABCWMXrwCgSQkKiJ6ZcgACApcryIXyFUGFRARE0jCKDIE0Bs1SJwgAbwKBBAJZJ473enu9HzOHtZQdet56/l/9e4Nq3+n995rrar6xnd43ud9v+Zf/aufGna7Xdnv96Vt27JYLMowDPFPL37qpc/13a7r6vt935flcnnu+/qe7qdX0zT1Pf2u9/VT9zg7O4trdQ89d7PZxPd4fm4L99d1ugf3VHv0Pd1D7+lz/dP7ek+/5xfXqA36fbvd1u/QPr1Pe7kvbeZa2qPv5/6vVqvaL92be9Au/a5/tEMvtZ925DbwXL6fX3lcGff8LOZJ92UseQ7zxrVco+fqO7qPrs9jxTzl9un3PG688nzo9zxfev/iK49nXnN5fvM6YL3Qh4vt53nMGfdU3xlX/eSzvFa5D/Oa+8pzaENuRx5Tvsv40JbcX67Lz2IcuJ+epT3B7/meue20+eL36Ctt0L1ov55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ie6Jj1kGLPvvodavASe+ro+Pauelc9JlaG/U9qe9F/XtF1Vpn+nt9bfV16dzqAFHnWL9Orzn687RG6+tWMDOo4JU6+FLkrHP5/3uuR68bnUO9J+o6rdaJrkFfdc0vCuAJASsY1XF1PGWUuj7ttaP7C+tzP/p+10GTnIj+Vl9vvXbq56m1VCvQ6DoUqCo4k62o13n9PLTOhEzV61n7hq/6+nQMQdVHr4HaVtb2ow6M6ntb7+G6Tq+1ouurUZp6Pehz9Nr6NbJtPWzfLPv46nPQseq6fo1u/X+gRuOHSwDbkgAAAABJRU5ErkJggg==";const Ya=({value:e,onChange:t,ariaLabel:n,placeholder:s,endAdornment:r,size:o="lg",dark:i,styles:a,inputRef:d,autoFocus:u})=>{const{dark:m,dk:f}=l.useSpiceBrand(a,i),h=i??m,y=o==="lg",g=y?"15px":"14px",x=y?"7px":"10px",w=y?l.radius.input:l.radius.sm,v=a?.fontFamily||l.font.ui,C=h?f.inputBg:"#FAFAFA",E=h?f.inputBorder:"#e5e7eb",k=h?f.textPrimary:"#374151",F=h?f.textSecondary:"#9ca3af";return c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:C,borderRadius:w,boxShadow:h?"0 2px 4px rgba(0, 0, 0, 0.3)":"0 2px 4px rgba(0, 0, 0, 0.1)",padding:`${x} 5px`,border:`1px solid ${E}`},children:[c.jsx(kp,{style:{color:F},size:24}),c.jsx("input",{ref:d,type:"text",role:"searchbox","aria-label":n,autoComplete:"off",spellCheck:!1,autoFocus:u,"data-spiceflow-focus":!0,placeholder:s,value:e,onChange:j=>t(j.target.value),style:{flex:1,backgroundColor:C,outline:"none",border:"none",color:k,fontSize:g,fontWeight:400,fontFamily:v}}),r]})},am=({size:e=20,active:t=!1,dark:n=!1})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("rect",{x:"2",y:"4",width:"16",height:"2",rx:"1",fill:t?n?"#e5e7eb":"#111827":n?"#9ca3af":"#374151"}),c.jsx("rect",{x:"4",y:"9",width:"12",height:"2",rx:"1",fill:t?n?"#e5e7eb":"#111827":"#9ca3af"}),c.jsx("rect",{x:"6",y:"14",width:"8",height:"2",rx:"1",fill:t?n?"#e5e7eb":"#111827":"#9ca3af"})]}),ad=({checked:e,primaryColor:t="#ef4444",dark:n=!1})=>c.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"4px",border:e?"none":`2px solid ${n?"#4b5563":"#d1d5db"}`,backgroundColor:e?t:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:l.transition.interactive},children:e&&c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),im=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,onTokenSelect:s,walletAddress:r,supportedChainIds:o,network:i,prefetchedAssets:a,styles:d,dark:u})=>{const[m,f]=p.useState(""),[h,y]=p.useState(null),[g,x]=p.useState(null),[w,v]=p.useState(!1),[C,E]=p.useState(new Set),k=p.useContext(l.SpiceFlowProviderContext),F=i||k?.network||"testnet",j=k?.allowedTokens,I=(k?.mode||"7702")!=="7702",b=!!k?.isWhitelistGateActive,{dark:A,primaryColor:R,dk:B}=l.useSpiceBrand(d,u),q=A?B.cardBg:"white",O=A?`${R}55`:"#F4A5A5",P=A?"0 4px 12px rgba(0, 0, 0, 0.4)":"0 4px 12px rgba(0, 0, 0, 0.15)",D=A?B.hoverBg:"#E9E9E9",M=A?B.hoverBg:"#f9fafb",L=A?B.textPrimary:"#374151",T=A?B.textPrimary:"#111827",H=A?B.textSecondary:"#9ca3af",V=A?`${R}22`:"#FBDBDB",te=A?`${R}55`:"#F4A5A5",Z=p.useMemo(()=>o||k?.supportedChainIds||S.getChainIdsByNetwork(F),[o,k?.supportedChainIds,F]),K=p.useMemo(()=>Z.map(z=>{const Q=l.getChainConfig(z);return Q?{id:z,name:Q.displayName,icon:bs[z]||Ir}:null}).filter(Boolean),[Z]),Y=a===void 0,{assets:J,loading:ge}=Er({address:Y?r:void 0,supportedChains:Z,fetchBalances:Xs,enabled:e&&Y&&!!r,refreshInterval:e?5e3:0}),pe=a??(Y?J:[]),we=a===null||Y&&ge,ve=p.useMemo(()=>(pe??[]).filter(z=>Yn(z,"deposit-source",{allowedTokens:j,rpcOverrides:k?.rpcOverrides,liquidityVenues:k?.liquidityVenues,isWhitelistGateActive:b},void 0,void 0,{requiresEscrow:I}).eligible),[pe,j,k?.rpcOverrides,b,I]),ne=p.useMemo(()=>{let z=ve.filter(Q=>Q.balance>0n);if(C.size>0&&(z=z.filter(Q=>C.has(Q.chainId))),m.trim()){const Q=m.toLowerCase();z=z.filter(se=>se.name.toLowerCase().includes(Q)||se.symbol.toLowerCase().includes(Q)||se.address.toLowerCase().includes(Q))}return z=[...new Map(z.map(Q=>[xe(Q),Q])).values()],z.sort((Q,se)=>{const ie=Q.balanceFormatted>0?1:0,X=se.balanceFormatted>0?1:0;return X!==ie?X-ie:se.balanceUsd!==Q.balanceUsd?se.balanceUsd-Q.balanceUsd:se.balanceFormatted-Q.balanceFormatted}),z},[ve,m,C]),_=xe;p.useEffect(()=>{const z=document.createElement("link");return z.href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;200;300;400;500;600;700&display=swap",z.rel="stylesheet",document.head.appendChild(z),()=>{document.head.removeChild(z)}},[]),p.useEffect(()=>{e||(f(""),y(null),v(!1),E(new Set))},[e]);const le=z=>{s(z)},W=z=>{E(Q=>{const se=new Set(Q);return se.has(z)?se.delete(z):se.add(z),se})},De=()=>{E(new Set)},Ae=C.size===0;return c.jsxs(Hn,{isOpen:e,onClose:t,title:"Select a Token",bannerSrc:om,bannerAlt:"Select token banner",styles:d,dark:A,closeOnBackdropClick:n,children:[c.jsx("div",{style:{padding:"20px 20px"},children:c.jsx(Ya,{value:m,onChange:f,ariaLabel:"Search tokens",placeholder:"Search token name, symbol or address",dark:A,styles:d,endAdornment:c.jsxs("div",{style:{position:"relative",flexShrink:0},children:[c.jsx("button",{onClick:()=>v(z=>!z),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"3px",backgroundColor:w||!Ae?D:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.15s"},children:c.jsx(am,{size:20,active:!Ae,dark:A})}),w&&c.jsxs("div",{style:{position:"absolute",top:"calc(100% + 8px)",right:0,backgroundColor:q,borderRadius:"8px",border:`1px solid ${O}`,boxShadow:P,padding:"8px",minWidth:"220px",zIndex:100},children:[c.jsxs("button",{onClick:De,style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"8px",borderRadius:"6px",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.15s"},onMouseEnter:z=>z.currentTarget.style.backgroundColor=M,onMouseLeave:z=>z.currentTarget.style.backgroundColor="transparent",children:[c.jsx(ad,{checked:Ae,primaryColor:R,dark:A}),c.jsx("img",{src:rm,alt:"All Networks",loading:"lazy",decoding:"async",width:20,height:20,style:{width:"20px",height:"20px",borderRadius:"4px",objectFit:"cover"}}),c.jsx("span",{style:{fontFamily:l.font.mono,fontSize:"12px",fontWeight:600,letterSpacing:"0.5px",color:L},children:"ALL NETWORKS"})]}),K.map(z=>c.jsxs("button",{onClick:()=>W(z.id),style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"8px",borderRadius:"6px",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.15s"},onMouseEnter:Q=>Q.currentTarget.style.backgroundColor=M,onMouseLeave:Q=>Q.currentTarget.style.backgroundColor="transparent",children:[c.jsx(ad,{checked:C.has(z.id),primaryColor:R,dark:A}),c.jsx("img",{src:z.icon,alt:z.name,loading:"lazy",decoding:"async",width:20,height:20,style:{width:"20px",height:"20px",borderRadius:"50%"}}),c.jsx("span",{style:{fontFamily:l.font.mono,fontSize:"12px",fontWeight:600,letterSpacing:"0.5px",color:L},children:z.name.toUpperCase()})]},z.id))]})]})})}),c.jsxs("div",{style:{padding:"0 32px 20px",display:"flex",flexDirection:"column",gap:"8px",maxHeight:"400px",overflowY:"auto"},children:[we&&c.jsx("div",{style:{padding:"24px 8px",textAlign:"center",fontFamily:l.font.mono,fontSize:"13px",color:H},children:"Loading balances..."}),!we&&ne.length===0&&c.jsx("div",{style:{padding:"24px 8px",textAlign:"center",fontFamily:l.font.mono,fontSize:"13px",color:H},children:"No tokens found"}),ne.map(z=>{const Q=_(z),se=h===Q,ie=g===Q,X=l.getChainConfig(z.chainId)?.displayName||`Chain ${z.chainId}`;return c.jsxs("button",{onClick:()=>le(z),onMouseEnter:()=>x(Q),onMouseLeave:()=>x(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"16px",padding:"8px",borderRadius:"8px",backgroundColor:se?V:"transparent",border:se||ie?`1px solid ${te}`:"1px solid transparent",cursor:"pointer",transition:l.transition.interactive},children:[c.jsx("div",{style:{flexShrink:0},children:c.jsx(Bo,{symbol:z.symbol,logoURI:z.logoURI,chainId:z.chainId,address:z.address,size:40})}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2px",flex:1,minWidth:0},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsx("span",{style:{fontFamily:l.font.mono,fontSize:"15px",fontWeight:500,letterSpacing:"0.4px",color:T,textAlign:"left"},children:z.name}),c.jsx("img",{src:od,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",width:14,height:14,style:{width:"14px",height:"14px"}})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[bs[z.chainId]&&c.jsx("img",{src:bs[z.chainId],alt:"",loading:"lazy",decoding:"async",width:14,height:14,style:{width:"14px",height:"14px",borderRadius:"50%"}}),c.jsxs("span",{style:{fontFamily:l.font.mono,fontSize:"12px",fontWeight:400,color:H,textAlign:"left"},children:[z.symbol," \xB7 ",X]})]})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"2px",flexShrink:0},children:[z.balanceUsd>0&&c.jsx("span",{style:{fontFamily:l.font.mono,fontSize:"16px",fontWeight:600,color:T},children:l.formatUsd(z.balanceUsd)}),c.jsxs("span",{style:{fontFamily:l.font.mono,fontSize:"12px",fontWeight:400,color:H},children:[l.formatBalance(z.balanceFormatted)," ",z.symbol]})]})]},Q)})]})]})},id=({dk:e,dark:t,message:n,buttonLabel:s,onAction:r,disabled:o=!1})=>c.jsxs("div",{style:{padding:"12px",backgroundColor:e.warningBg,borderRadius:"8px",border:`1px solid ${e.warningBorder}`},children:[c.jsx("p",{style:{margin:"0 0 10px 0",color:e.warningText,fontSize:"14px"},children:n}),c.jsx("button",{onClick:r,disabled:o,style:{width:"100%",padding:"8px 12px",borderRadius:"6px",border:`1px solid ${t?e.warningBorder:"#fbbf24"}`,backgroundColor:t?e.cardBg:"white",cursor:o?"not-allowed":"pointer",fontWeight:600,fontSize:"13px",color:e.warningText,opacity:o?.6:1},children:s})]}),cd=({dk:e,dark:t,borderRadius:n,children:s})=>c.jsx("div",{style:{padding:"8px 12px",marginBottom:"8px",backgroundColor:t?e.warningBg:"#fffbeb",border:`1px solid ${e.warningBorder}`,borderRadius:n,fontSize:"12px",color:e.warningText,lineHeight:"1.4"},children:s});var cm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAEICAMAAACQzmAoAAAAzFBMVEWgoJ/d1tbcxsbcycndzc3a2trd0NDe3t7c29vc3Nzd09Pcw8Pd2dncv7/bubnctLTg4ODbr6+BkfGSgdnm5ubcvLzr6+vy8fDcqanZ1tbbpKTf3NtILRbZzc3bnZ3UxsbT09PRvb0FUfLPzs7TtLQKCQcHUu8YFxXQqanJs7PIxsbTlpbAvb28rK2qqKjGnp5zPxrogB83NTTXch/EjYxUU1GRj46Sn+ujmNaBfnwWXPDM0O6xtuRramhbQi23XxzdUlJ6XEx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UVORK5CYII=";const Za=e=>{const t=(e.id||"").toLowerCase(),n=(e.name||"").toLowerCase();return t.startsWith("io.privy.wallet")||n.includes("privy wallet")};async function Xa(e,t){let n;try{return await Promise.race([e,new Promise((s,r)=>{n=setTimeout(()=>{const o=new Error("Wallet network read timed out. Please try again.");o.name="WalletReadTimeout",r(o)},Math.max(0,t-Date.now()))})])}finally{n!==void 0&&clearTimeout(n)}}const lm=({dark:e,dk:t,primaryColor:n,disabled:s,hidden:r,onConnecting:o,onError:i})=>{const[a,d]=p.useState(!1),u=as.useAccount(),{embeddedAddress:m}=l.useProviderWallets(),f=p.useRef({account:u,embeddedAddress:m});f.current={account:u,embeddedAddress:m};const{ready:h,authenticated:y,user:g}=mr.usePrivy(),x={ready:h,authenticated:y,userId:g?.id},w=p.useRef(x);w.current=x;const v=p.useRef(0),C=()=>{const j=w.current;return j.ready===x.ready&&j.authenticated===x.authenticated&&j.userId===x.userId};p.useLayoutEffect(()=>(v.current++,d(!1),o(!1),()=>{v.current++}),[h,y,g?.id,o]);const{disconnectAsync:E}=as.useDisconnect(),{setActiveWallet:k}=mr.useActiveWallet(),{connectWallet:F}=mr.useConnectWallet({onSuccess:async({wallet:j})=>{if(!h||!C())return;const I=++v.current,b=()=>I===v.current&&C();d(!0),o(!0);try{if(j.type!=="ethereum"||j.connectorType==="embedded")throw new Error("Choose an external Ethereum wallet.");k(j);const A=f.current.account;A.address&&A.connector&&!Za(A.connector)&&!l.addressesEqual(A.address,f.current.embeddedAddress)&&!l.addressesEqual(A.address,j.address)&&await E({connector:A.connector})}catch(A){b()&&i(l.sanitizeError(A,"Failed to connect wallet."))}finally{b()&&(d(!1),o(!1))}},onError:j=>{C()&&(v.current++,d(!1),o(!1),i(l.sanitizeError(j,"Failed to connect wallet.")))}});return r?null:c.jsxs("button",{onClick:()=>{s||a||(v.current++,d(!0),o(!0),F({walletChainType:"ethereum-only"}))},disabled:s||a,style:{width:"100%",display:"flex",alignItems:"center",gap:"14px",padding:"10px",borderRadius:"8px",backgroundColor:a?e?t.hoverBg:"#f3f4f6":"transparent",border:`2px solid ${e?`${n}33`:`${n}55`}`,cursor:s||a?"not-allowed":"pointer",opacity:s?.6:1,transition:l.transition.interactive},children:[c.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e?t.cardBg:"#f3f4f6"},children:c.jsx("img",{src:Sr.metamask,alt:"Browser wallet",style:{width:"26px",height:"26px",objectFit:"contain"}})}),c.jsx("span",{className:"ibm-plex-mono",style:{fontSize:"17px",fontWeight:500,letterSpacing:"0.4px",color:t.textPrimary,flex:1,textAlign:"left",fontFamily:l.font.mono},children:a?"Opening wallet picker...":"MetaMask / Browser Wallet"})]})},dm=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,onWalletSelect:s,onContinue:r,requiredChainId:o,styles:i})=>{const{dark:a,primaryColor:d,dk:u,theme:m}=l.useSpiceBrand(i),f=p.useContext(l.SpiceFlowProviderContext),[h,y]=p.useState(null),[g,x]=p.useState(!1),[w,v]=p.useState(null),[C,E]=p.useState(!1),[k,F]=p.useState(null),[j,I]=p.useState(!1);p.useEffect(()=>{e||(v(null),E(!1),x(!1),F(null))},[e]);const{address:b,chain:A,connector:R,isConnected:B}=as.useAccount(),{externalWallet:q,externalAddress:O}=l.useProviderWallets(),P=!!q&&!!O,D=q?.wallet.connector||q?.wallet.meta,M=Number(String(q?.wallet.chainId??"").replace(/^eip155:/,"")),L=q?.wallet.connector===R&&B&&l.addressesEqual(O,b)?A:l.getChainConfig(M)?.viemChain,{connectors:T,connectAsync:H}=as.useConnect(),{disconnectAsync:V}=as.useDisconnect(),te=S.getChainIdsByNetwork(f?.network||"testnet"),Z=p.useRef(q);Z.current=q;const K=p.useRef(0),Y=q?.wallet.connector||q?.wallet;p.useEffect(()=>(K.current++,x(!1),v(null),()=>{K.current++}),[O,Y,e]);const J=(o?l.getChainConfig(o):null)?.displayName||L?.name||`Chain ${L?.id||o}`,ge=Q=>Q.type==="announced"||typeof Q.ready=="boolean"&&Q.ready?!0:Q.type==="injected"?typeof window<"u"&&!!window.ethereum:!0,pe=T.filter(Q=>{const se=Q.name.toLowerCase(),ie=(Q.id||"").toLowerCase();return f?.provider==="privy"&&Za(Q)||["safe"].includes(Q.type)?!1:Q.type==="walletConnect"?!!Q?.options?.projectId:Q.type==="announced"?!0:Q.type==="injected"||["metamask","rabby","phantom","coinbase","trust","rainbow"].some(X=>se.includes(X)||ie.includes(X))?ge(Q):!1}),we=async Q=>{if(!(C||g))try{if(E(!0),F(Q.uid),v(null),await H({connector:Q}),await Ln(500),Z.current?.wallet.connector!==Q)throw new Error("Wallet changed. Please try again.");s&&s(Q.id),o&&await _(o),await Ln(800)}catch(se){console.error("Connection error:",se),l.isUserRejection(se)?v("Connection rejected. Please try again."):v(l.sanitizeError(se,"Failed to connect wallet."))}finally{E(!1),F(null)}},ve=Q=>{if(Q.icon)return Q.icon;const se=(Q.name||"").toLowerCase();for(const[ie,X]of Object.entries(Sr))if(se.includes(ie.toLowerCase()))return X;if(!Za(Q)&&(Q.type==="injected"||Q.type==="announced")&&typeof window<"u"&&window.ethereum){const ie=window.ethereum;if(ie.isMetaMask)return Sr.metamask;if(ie.isRabby)return Sr.rabby;if(ie.isPhantom)return Sr.phantom}return null},ne=async(Q,se,ie)=>{const X=se.wallet.connector||se.wallet,oe=Date.now()+2e3;for(;Date.now()<oe;){if(await Ln(Math.min(100,oe-Date.now())),ie!==K.current||!l.addressesEqual(Z.current?.address,se.address)||(Z.current?.wallet.connector||Z.current?.wallet)!==X)return!1;try{const je=await Xa((async()=>{const Me=await se.getEthereumProvider();return parseInt(await Me.request({method:"eth_chainId"}),16)})(),oe);if(ie!==K.current||!l.addressesEqual(Z.current?.address,se.address)||(Z.current?.wallet.connector||Z.current?.wallet)!==X)return!1;if(je===Q)return!0}catch{}}return!1},_=async Q=>{const se=++K.current,ie=Z.current,X=ie?.wallet.connector||ie?.wallet,oe=()=>se===K.current&&l.addressesEqual(Z.current?.address,ie?.address)&&(Z.current?.wallet.connector||Z.current?.wallet)===X;x(!0),v(null);try{if(!ie)throw new Error("Wallet not available");const je=Date.now()+2e3,Me=await Xa(ie.getEthereumProvider(),je);let me;const Se=()=>{if(!oe())throw new Error("Wallet changed. Please try again.");if(me)throw me};Se(),await Wl({request:async Te=>{if(Te.method!=="eth_chainId")return Me.request(Te);try{return await Xa(Me.request(Te),je)}catch(be){throw be instanceof Error&&be.name==="WalletReadTimeout"&&(me=be),be}}},Q,Se),!await ne(Q,ie,se)&&oe()&&v("Unable to switch to the correct network. Please switch manually in your wallet to continue.")}catch(je){oe()&&(console.error("Manual chain switch error:",je),v(l.describeChainSwitchError(je)))}finally{oe()&&x(!1)}},le=async Q=>{g||(I(!1),await _(Q))},W=async()=>{if(!g){if(!o){I(Q=>!Q);return}await _(o)}},De=async()=>{try{const Q=q?.wallet;Q&&typeof Q.disconnect=="function"&&Q.disconnect(),R&&l.addressesEqual(O,b)&&await V({connector:R})}finally{v(null),E(!1),x(!1),F(null),I(!1)}},Ae=P&&!g&&!C&&(!o||L?.id===o),z=P&&!g&&!C&&o&&L?.id!==o;return c.jsxs(Hn,{isOpen:e,onClose:t,title:"Connect Wallet",styles:i,dark:a,bannerSrc:cm,bannerAlt:"Connect wallet banner",closeOnBackdropClick:n,children:[c.jsxs("div",{style:{padding:"0 24px 20px",display:"flex",flexDirection:"column",gap:"12px",marginTop:"20px"},children:[w&&c.jsx(id,{dk:u,dark:a,message:w,buttonLabel:g?"Switching...":"Try Switch Again",onAction:W,disabled:g}),g&&c.jsxs("div",{style:{padding:"12px",backgroundColor:a?u.infoBg:"#dbeafe",borderRadius:"8px",display:"flex",alignItems:"center",gap:"10px",marginTop:"20px"},children:[c.jsx(l.Spinner,{size:20,color:a?u.infoText:"#3b82f6"}),c.jsx("p",{style:{margin:0,color:a?u.infoText:"#1e40af",fontSize:"14px"},children:"Switching network..."})]}),f?.provider==="privy"&&c.jsx(lm,{dark:a,dk:u,primaryColor:d,disabled:C||g,hidden:P,onConnecting:E,onError:v}),P&&O?c.jsxs("div",{style:{border:`1px solid ${a?u.successBorder:"#02974F"}`,borderRadius:"8px",overflow:"hidden",marginTop:"20px"},children:[c.jsxs("div",{style:{backgroundColor:a?u.successBg:"#00FFA81C",padding:"14px 18px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx("div",{style:{width:"22px",height:"22px",borderRadius:"50%",backgroundColor:"#02974F",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:"14px",fontWeight:"bold"},children:"\u2713"}),c.jsx("span",{className:"ibm-plex-mono",style:{color:a?u.successText:"#02974F",fontWeight:600,fontSize:"14px",letterSpacing:"0.5px"},children:"WALLET CONNECTED"})]}),c.jsx("div",{style:{width:"38px",height:"38px",borderRadius:"50%",backgroundColor:a?u.cardBg:"#f3f4f6",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},children:D&&ve(D)?c.jsx("img",{src:ve(D),alt:D.name,style:{width:"24px",height:"24px",objectFit:"contain"}}):c.jsx("span",{style:{fontSize:"16px",fontWeight:"bold",color:a?u.textPrimary:"inherit"},children:D?.name?.charAt(0)||"W"})})]}),c.jsxs("div",{style:{padding:"18px",backgroundColor:a?u.cardBg:"white"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"14px"},children:[c.jsx("span",{className:"ibm-plex-mono",style:{color:a?u.textSecondary:"#939291",fontSize:"13px",fontWeight:500,letterSpacing:"0.3px"},children:"ADDRESS:"}),c.jsx("span",{className:"ibm-plex-mono",style:{color:a?u.textPrimary:"black",fontSize:"14px",fontWeight:600,fontFamily:l.font.mono,letterSpacing:"0.3px"},children:l.truncateAddress(O)})]}),j&&c.jsx("div",{style:{marginBottom:"12px",border:`1px solid ${a?u.inputBorder:"#E5E7EB"}`,borderRadius:"8px",overflow:"hidden",backgroundColor:u.cardBg},children:te.map(Q=>{const se=l.getChainConfig(Q);if(!se)return null;const ie=L?.id===Q;return c.jsxs("button",{onClick:()=>{ie?I(!1):le(Q)},style:{width:"100%",display:"flex",alignItems:"center",gap:"8px",padding:"10px 12px",backgroundColor:ie?a?`${d}15`:`${d}10`:"transparent",border:"none",borderBottom:`1px solid ${a?u.inputBorder:"#E5E7EB"}`,cursor:ie?"default":"pointer",transition:"background-color 0.15s"},onMouseEnter:X=>{ie||(X.currentTarget.style.backgroundColor=a?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.03)")},onMouseLeave:X=>{X.currentTarget.style.backgroundColor=ie?a?`${d}15`:`${d}10`:"transparent"},children:[c.jsx("img",{src:bs[Q]||Ir,alt:se.displayName,style:{width:"20px",height:"20px",borderRadius:"50%",objectFit:"contain"}}),c.jsx("span",{style:{fontSize:"13px",fontWeight:ie?600:400,color:a?u.textPrimary:"#1f2937",fontFamily:l.font.mono},children:se.displayName}),ie&&c.jsx("span",{style:{marginLeft:"auto",fontSize:"11px",color:d,fontWeight:500},children:"Connected"})]},Q)})}),c.jsxs("button",{className:"ibm-plex-mono",onClick:De,style:{width:"100%",padding:"10px",backgroundColor:"transparent",border:`1px solid ${a?u.inputBorder:"#E5E7EB"}`,borderRadius:"6px",cursor:"pointer",fontSize:"13px",fontWeight:500,color:a?u.textSecondary:"#9CA3AF",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[c.jsx("span",{style:{fontSize:"16px"},children:"\u27F2"}),"DISCONNECT"]})]})]}):c.jsx(c.Fragment,{children:pe.map(Q=>{const se=ge(Q),ie=k===Q.uid,X=!se||C||ie;return c.jsxs("button",{onClick:()=>{X||we(Q)},onMouseEnter:()=>!X&&y(Q.uid),onMouseLeave:()=>y(null),disabled:X,style:{width:"100%",display:"flex",alignItems:"center",gap:"14px",padding:"10px",borderRadius:"8px",backgroundColor:ie?a?u.hoverBg:"#f3f4f6":"transparent",border:h===Q.uid&&!X?`2px solid ${a?`${d}44`:`${d}66`}`:"2px solid transparent",cursor:X?"not-allowed":"pointer",opacity:X?.6:1,transition:l.transition.interactive},children:[c.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a?u.cardBg:"#f3f4f6"},children:ve(Q)?c.jsx("img",{src:ve(Q),alt:Q.name,style:{width:"26px",height:"26px",objectFit:"contain"}}):c.jsx("span",{style:{fontSize:"16px",fontWeight:"bold",color:a?u.textPrimary:"inherit"},children:Q.name.charAt(0)})}),c.jsxs("span",{className:"ibm-plex-mono",style:{fontSize:"17px",fontWeight:500,letterSpacing:"0.4px",color:X?a?u.inputPlaceholder:"#9ca3af":a?u.textPrimary:"#111827",flex:1,textAlign:"left",fontFamily:l.font.mono},children:[ie?"Connecting...":Q.name,!se&&!ie&&c.jsx("span",{style:{fontSize:"12px",marginLeft:"8px"},children:"(Not detected)"})]})]},Q.uid)})})]}),z&&!w&&c.jsx("div",{style:{padding:"0 24px 20px"},children:c.jsx(id,{dk:u,dark:a,message:`Please switch to ${J} to continue.`,buttonLabel:g?"Switching...":"Switch Network",onAction:W,disabled:g})}),c.jsx("div",{style:{padding:"0 24px 25px"},children:c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:async()=>{Ae&&(await Ln(300),r?await r():t())},disabled:!Ae,theme:m,dark:a,styles:i,children:C?"CONNECTING...":g?"SWITCHING NETWORK...":"CONTINUE"})})]})},um=new Set(["USDC","SUSD","USD","NUSD","USDT","DAI","ENUSD","USDG"]),ld={ETH:"ethereum",WETH:"ethereum",BTC:"bitcoin",WBTC:"bitcoin",WCBTC:"bitcoin",CBTC:"bitcoin",ECBTC:"bitcoin",ARB:"arbitrum",MATIC:"matic-network",POL:"matic-network"};let Oo=null;const pm=6e4;async function dd(e){const t={},n=new Set,s={};for(const o of e){const i=o.toUpperCase();if(um.has(i))t[i]=1;else if(ld[i]){const a=ld[i];n.add(a),s[i]=a}else t[i]=0}if(n.size===0)return t;const r=Date.now();if(Oo&&r-Oo.timestamp<pm){for(const[o,i]of Object.entries(s))t[o]=Oo.prices[i]??0;return t}try{const o=Array.from(n).join(","),i=await fetch(`https://api.coingecko.com/api/v3/simple/price?ids=${o}&vs_currencies=usd`);if(!i.ok)throw new Error(`CoinGecko ${i.status}`);const a=await i.json(),d={};for(const u of n)d[u]=a[u]?.usd??0;Oo={prices:d,timestamp:r};for(const[u,m]of Object.entries(s))t[u]=d[m]??0}catch(o){console.warn("[fetchTokenPrices] CoinGecko fetch failed:",o);for(const i of Object.keys(s))t[i]=t[i]??0}return t}const fm=new Set(["cbtc","btc","wbtc","wcbtc","tbtc"]),mm=new Set(["usdc","usdt","dai","usdc.e","usdbc","usdg"]);async function hm(){const e=(await dd(["BTC"])).BTC;if(!e||e<=0)throw new Error("Failed to fetch BTC/USD price");return e}function gm(e){return fm.has(e.toLowerCase())}function wm(e){return mm.has(e.toLowerCase())}function xm(e,t,n,s){const r=10n**12n,o=BigInt(Math.round(s*Number(r))),i=t-n,a=10n**BigInt(Math.abs(i));let d=e*o/r;return i>0?d=d/a:i<0&&(d=d*a),d}function jo(e,t){if(e===0n)return"0";const n=10n**BigInt(t),s=e/n,r=(e%n).toString().padStart(t,"0").replace(/0+$/,"");return r?`${s.toString()}.${r}`:s.toString()}function Ja(e,t,n){const s=`${jo(e,t)} ${n}`;return e===0n?s:`-${s}`}const ym=({fontFamily:e,textPrimary:t,textSecondary:n,cardBg:s,cardBorder:r,resolvedDark:o,darkCardBorder:i,primaryColor:a,feePreview:d,feeOnlyAction:u=!1,asset:m,isLoading:f,errorText:h,directExecutionFeeNote:y=!1})=>{const g=l.useAssetDisplay(),x=m&&d&&[m.symbol,m.displaySymbol,m.receiptTokenName].includes(d.symbol)?g(m).symbol:d?.symbol,w=o?i??r:"#e5e7eb",v=o?"#111214":"#111827",C=o?"rgba(255,255,255,0.08)":"rgba(17,24,39,0.12)",E="#f87171",k=o?"#d1d5db":"#4b5563",F=o?"#f3f4f6":t,[j,I]=p.useState(!1),b=!!h,A=b?null:d,R=A?.feePayer==="relayer",B=A?[...u?[]:[{label:"Total Required",help:"Total amount required to fund this action.",value:`${jo(A.grossAmount,A.decimals)} ${x}`,tone:"default"}],{label:"Spicenet Fee",help:"Fees paid to Spicenet for intent processing and execution.",value:R?"Covered":Ja(A.spicenetFee,A.decimals,x),tone:"fee"},{label:"Network Fee",help:"Network fee shown in the same token you are using for this action.",value:R?"Covered":Ja(A.gasFee,A.decimals,x),tone:"fee"},...A.bridgeFee&&A.bridgeFee>0n?[{label:"Bridge Fee",help:"Estimated cost to rebalance liquidity for this action.",value:Ja(A.bridgeFee,A.decimals,x),tone:"fee"}]:[],...u?[]:[{label:"Used in TX",help:"Resulting amount of funds used in the transaction.",value:`${jo(A.netAmount,A.decimals)} ${x}`,tone:"default"}]]:[],q=A?`${jo(u?R?0n:A.totalFee??A.gasFee+A.spicenetFee+(A.bridgeFee??0n):A.grossAmount,A.decimals)} ${x}`:null;return b?c.jsx("div",{style:{backgroundColor:s,border:`1px solid ${r}`,borderRadius:o?"8px":"7px",padding:"14px 16px 12px 16px",marginBottom:"16px",boxShadow:o?"inset 0 1px 0 rgba(255,255,255,0.03)":"none"},children:c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[c.jsx("span",{style:{fontSize:"17px",fontWeight:500,color:k,fontFamily:e,lineHeight:"24px"},children:"Fee"}),c.jsx("div",{style:{color:E,fontSize:"12px",lineHeight:"1.55",fontFamily:e},children:h})]})}):c.jsxs("div",{style:{backgroundColor:s,border:`1px solid ${r}`,borderRadius:o?"8px":"7px",padding:"14px 16px 12px 16px",marginBottom:"16px",boxShadow:o?"inset 0 1px 0 rgba(255,255,255,0.03)":"none"},children:[c.jsxs("button",{type:"button",onClick:()=>I(O=>!O),style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",gap:"12px",marginBottom:j?"14px":0,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{style:{fontSize:"17px",fontWeight:500,color:k,fontFamily:e,lineHeight:"24px"},children:"Fee"}),j&&c.jsx("span",{style:{fontSize:"12px",color:n,fontFamily:e,lineHeight:"1.45"},children:"What is funded, spent, and taken as fees"})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[q&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"2px",minWidth:0},children:[c.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:n,fontFamily:e,letterSpacing:"0.08em",textTransform:"uppercase"},children:u?"Total fees":"Total required"}),c.jsx("span",{style:{fontSize:"14px",fontWeight:700,color:F,fontFamily:e,whiteSpace:"nowrap"},children:q})]}),f&&!y&&c.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:a,fontFamily:e,padding:"6px 9px",borderRadius:"999px",backgroundColor:o?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.035)",border:`1px solid ${o?w:"rgba(0,0,0,0.06)"}`,whiteSpace:"nowrap"},children:"Recalculating"}),c.jsx($s,{color:n,direction:j?"up":"down",style:{flexShrink:0}})]})]}),c.jsx("div",{style:{overflow:"hidden",maxHeight:j?"480px":"0px",opacity:j?1:0,transition:"max-height 0.24s ease, opacity 0.18s ease"},children:y?c.jsx("p",{style:{margin:0,color:n,fontSize:"12px",lineHeight:"1.55",fontFamily:e},children:"This path executes directly from the external wallet. Network gas is shown and paid in your wallet. No Spicenet fee is charged."}):B.length>0?c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{display:"grid",gap:"10px"},children:B.map((O,P)=>c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",alignItems:"center",gap:"12px",paddingTop:P===0?0:"10px",borderTop:P===0?"none":`1px solid ${w}`,opacity:f?.74:1,transition:"opacity 120ms ease"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",minWidth:0},children:[c.jsx("span",{style:{fontSize:"12px",color:n,fontFamily:e,fontWeight:500},children:O.label}),c.jsx(ed,{content:O.help,label:`${O.label} info`,textColor:"#f9fafb",backgroundColor:v,borderColor:C,accentColor:o?"#8f96a3":"#6b7280"})]}),c.jsx("span",{style:{fontSize:"12px",color:O.tone==="fee"?E:F,fontFamily:l.font.mono,textAlign:"right",fontWeight:O.label==="Used in TX"?600:500,letterSpacing:"-0.01em"},children:O.value})]},O.label))}),c.jsx("div",{style:{marginTop:"12px",paddingTop:"12px",borderTop:`1px solid ${w}`,fontSize:"11px",color:n,fontFamily:e,lineHeight:"1.45"},children:A?.gasQuoteSource==="estimated"?"Gas quote uses a live estimate.":A?.gasQuoteSource==="configured_fallback"?"Gas quote uses a configured fallback.":"Gas quote is currently zero."})]}):c.jsx("div",{style:{fontSize:"12px",color:h?E:n,fontFamily:e,opacity:h?1:.8,lineHeight:"1.5"},children:h||"Waiting for fee estimate..."})})]})},$a=p.memo(ym);function Is(e){const t=S.normalizeNativeTokenAddress(e.address);if(e.isNative||S.isNativeToken(t))return!1;const n=l.getChainConfig(e.chainId)?.supportedTokens?.some(r=>l.addressesEqual(r.address,t)),s=S.getTokenByAddress(t,e.chainId);return!!n&&!!s&&vr(s)}const ud="spiceflow:pendingDeposit",Do="spiceflow:pendingDepositChanged";function pd(e,t,n){return`${ud}:${e.toLowerCase()}:${t}:${n.toLowerCase()}`}function _a(){try{const e="__spiceflow_storage_test__";return localStorage.setItem(e,"1"),localStorage.removeItem(e),!0}catch{return!1}}function bm(e){if(!_a())return;const t=pd(e.embeddedWalletAddress,e.chainId,e.tokenAddress);try{localStorage.setItem(t,JSON.stringify(e)),window.dispatchEvent(new Event(Do))}catch(n){console.error("[pendingDeposit] Failed to save:",n)}}function fd(e){if(!_a())return[];const t=`${ud}:${e.toLowerCase()}:`,n=[],s=Date.now();for(let r=0;r<localStorage.length;r++){const o=localStorage.key(r);if(!(!o||!o.startsWith(t)))try{const i=localStorage.getItem(o);if(!i)continue;const a=JSON.parse(i);if(s-a.timestamp>6048e5){localStorage.removeItem(o);continue}n.push(a)}catch{localStorage.removeItem(o)}}return n}function No(e,t,n){if(!_a())return;const s=pd(e,t,n);localStorage.removeItem(s),window.dispatchEvent(new Event(Do))}function ei({escrowAddress:e,tokenAddress:t,isNative:n,amount:s,gasFeeAmount:r}){const o=(i,a)=>n?{to:i,value:a,data:"0x"}:{to:t,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[i,a]})};return[o(e,s),...r>0n?[o(S.SPICE_GAS_FEE_RECIPIENT,r)]:[]]}function vm({sourceChainId:e,selectedAsset:t,destinationChainId:n,destinationTokenAddress:s,isCrossDenomination:r,convertedUsdAmount:o}){const i=S.normalizeNativeTokenAddress(t.asset.address),a=s;let d,u;if(a&&n)if(d=l.CHAIN_CONFIGS[n]?.supportedTokens?.find(m=>l.addressesEqual(m.address,a))?.decimals??t.asset.decimals,r){if(!o)throw new Error("Destination amount is still being calculated. Please retry in a moment.");u=o}else{const m=N.parseUnits(t.amount,t.asset.decimals);u=S.convertAmountBetweenDecimals(m,t.asset.decimals,d)}return{sourceChainId:e,depositTokenAddress:i,depositAmount:t.amount,depositTokenDecimals:t.asset.decimals,destinationChainId:n,destinationTokenAddress:a,destinationAmount:u,destinationTokenDecimals:d}}async function Cm(e,t){if(!e)return[];if(Array.isArray(e))return e;const n=e;return e.length>=2?n(t.depositAmount,t.depositTokenAddress):n(t)}function md(e,t){return!!e&&e.quotedAmount===t.amount&&e.chainId===t.chainId&&l.addressesEqual(e.token,t.token)}async function Mo(e,t){let n;try{n=await Ua(e,{recipient:t.recipient,tokenAddr:t.tokenAddr,isNative:t.isNative,amount:t.amount})}catch(i){throw Na(i)||l.isUserRejection(i)?i:new l.SpiceflowError("SUBMISSION_UNKNOWN","The wallet transfer outcome is unknown. Close this deposit and check your activity and balances before continuing.",{submissionStatus:"unknown",cause:i})}t.afterSend?.(n);const s=l.getClientForChain(t.chainId),{receipt:r,hash:o}=await mo({client:s,hash:n,call:Eo(t.recipient,t.tokenAddr,t.isNative,t.amount),confirmations:2});if(r.status!=="success")throw r.status==="reverted"&&r.transactionHash?.toLowerCase()===o.toLowerCase()&&t.afterRevert?.(),new Error(t.failureMessage);return t.settle&&await s.getBlockNumber()-r.blockNumber<2n&&await Ln(3e3),o}async function km(e){const t=e.selectedDepositAssets.filter(o=>o.asset&&o.amount&&parseFloat(o.amount)>0);if(t.length===0){console.error("[DepositModal] No valid assets for deposit"),e.setError("Please select an asset and enter an amount");return}const n=t[0];if(!e.escrowOnly&&!e.sourceAddress){e.setError("External wallet not connected. Please connect your wallet in the previous step.");return}if(!e.isNon7702){if(!e.address||!e.embeddedWalletAddress){e.setError("Couldn't find your account wallet. Try reconnecting.");return}if(!e.isReady||!e.isAuthenticated){e.setError("Sign in to continue.");return}}if(e.zeroCreditError){e.setError(e.zeroCreditError);return}if(e.depositBalanceError){e.setError(e.depositBalanceError);return}if(e.isNon7702&&e.sponsorGas&&e.nativeChainId&&n.asset.chainId!==e.nativeChainId&&e.destinationTokenAddress){e.setError("Gas sponsorship is not supported for this deposit route. Disable sponsorGas to continue.");return}e.setIsExecuting(!0),e.setError(null);let s=!1,r=!1;try{const o=e.escrowOnly||t.some(({asset:h})=>Is(h));if(!e.isNon7702&&e.mode==="7702"&&o){const h=l.relayerService.getBaseUrl(),y=new l.RelayerService;y.setBaseUrl(h);const g=AbortSignal.timeout(1e4),x=()=>{if(e.validateCurrentSession?.(),l.relayerService.getBaseUrl()!==h)throw new Error("The service changed. Review the deposit again.")};x();const w=async C=>{try{return await C}catch(E){throw x(),new l.SpiceflowError("RELAYER_STATUS_ERROR","Deposit status is unavailable. Try again before adding cash.",{...E instanceof l.SpiceflowError?E.context:{},cause:E})}},v=await w(y.supportsAutomaticContinuation({signal:g}));if(x(),v){const C=await w(y.getWalletActions(e.address,{pendingOnly:!0,signal:g}));x();let E=0;for(const k of C)for(const[F]of k.intents.entries()){if(E++>=4)throw new Error("A previous transaction still needs verification. Check your activity before adding cash.");const j=await w(y.getIntentRecoveryStatus(k.actionId,F,{signal:g}));if(x(),j==="unresolved")throw new Error("A previous transaction is still pending. Check your activity before adding cash.")}}}e.validateCurrentSession?.();const i=n.asset.chainId,a=S.getEscrowContractAddress(i),d=N.parseUnits(n.amount,n.asset.decimals),u=t.length===1&&md(e.effectiveDepositFee,{amount:d,token:S.normalizeNativeTokenAddress(n.asset.address),chainId:i}),m=!e.isNon7702&&!e.escrowOnly&&!Is(n.asset);if(!e.isNon7702&&t.length===1&&!m&&!u)throw new Error("Fee quote is out of date. Please wait for it to refresh.");if(u&&!e.isNon7702&&!m){const{fee:h,net:y}=e.effectiveDepositFee;if(h>=d||y<=0n)throw new Error("This deposit amount is too small to cover the network fee. Your funds remain in your wallet.");if(y+h!==d)throw new Error("Fee quote is out of date. Please wait for it to refresh.")}let f=e.externalWalletClient;if(!e.escrowOnly){if(e.validateCurrentSession?.(),!f)throw new Error("External wallet not connected");if(e.externalProvider){const h=await Ma({provider:e.externalProvider,account:e.sourceAddress,chainId:i});h.viemChain&&(f=h.extWc),e.validateCurrentSession?.()}}if(e.isNon7702){if(!f)throw new Error("External wallet not connected");if(!e.sourceAddress)throw new Error("External wallet address not available");if(e.nativeChainId&&i===e.nativeChainId){const h=l.getChainConfig(i),y=t.map(x=>`${x.amount} ${x.asset.symbol}`).join(", ");e.setConfirmationData({network:h?.displayName||`Chain ${i}`,amount:y,symbol:"",chainId:i}),e.setShowConfirmation(!0);let g=null;e.setDirectDepositStatus("processing"),e.setDirectDepositChainId(i);for(const x of t){const w=N.parseUnits(x.amount,x.asset.decimals),v=S.normalizeNativeTokenAddress(x.asset.address),C=x.asset.isNative||S.isNativeToken(v),E=await Mo(f,{chainId:i,recipient:a,tokenAddr:v,isNative:C,amount:w,failureMessage:`Escrow deposit failed for ${x.asset.symbol}`,afterSend:()=>{r=!0}});g=E,e.setDirectDepositTxHash(E)}if(t[0]?.amount){const x=t[0].amount;if(e.onDepositExecute){e.setPostDepositStatus("executing");try{await e.onDepositExecute(x),e.setPostDepositStatus("success")}catch(v){console.error("ctx.onDepositExecute failed:",v),e.setPostDepositStatus("error"),e.setPostDepositError(v?.message||"Post-deposit instruction failed")}}else e.setPostDepositStatus("success");e.setDirectDepositStatus("success"),e.setPostDepositAmount(x),e.setPostDepositSuccess(!0);const w={type:"deposit",status:"success",amount:x,asset:t[0].asset.symbol,sourceChain:h?.displayName||`Chain ${i}`,txHash:g??void 0};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:w})),e.onDepositSuccess?.(w)}e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(t[0].asset)}else{const h=e.destinationChainId||e.nativeChainId;if(!h)throw new Error("Destination chain ID is required for non-7702 mode. Either pass ctx.destinationChainId to <SpiceDeposit> or set ctx.nativeChainId on <SpiceFlowProvider>.");const y=a,g=[];let x=null;for(const w of t){const v=N.parseUnits(w.amount,w.asset.decimals),C=S.normalizeNativeTokenAddress(w.asset.address),E=w.asset.isNative||S.isNativeToken(C),k=await Mo(f,{chainId:i,recipient:y,tokenAddr:C,isNative:E,amount:v,failureMessage:`Transfer failed for ${w.asset.symbol}`,afterSend:()=>{r=!0},settle:!0});x||(x=k),e.depositDataRef.current||(e.depositDataRef.current=[]),e.depositDataRef.current.push({txHash:k,sender:e.sourceAddress,tokenAddress:C,chainId:i,amount:v.toString(),user:e.spiceBalanceUser}),g.push({tokenAddress:C,tokenAmount:v.toString(),sender:e.sourceAddress,receiver:y})}if(!x)throw new Error("No transaction hash generated");if(!e.destinationTokenAddress){const w={type:"deposit",status:"success",amount:t[0]?.amount,asset:t[0]?.asset?.symbol,sourceChain:l.getChainName(i),txHash:x};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:w})),e.onDepositSuccess?.(w),e.depositDataRef.current=null,e.bridgedAmountRef.current=t[0]?.amount||null,e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(t[0].asset),e.setShowConfirmation(!1);return}if(e.mode==="ondemand"){const w=S.getChainMeta(i)?.delegateContract;if(!w)throw new Error(`Unsupported chain ID: ${i}`);const v={to:w,value:BigInt(0),data:"0x"},C=await l.getTokenDecimals(h,e.destinationTokenAddress);let E=BigInt(0);for(const q of g){const O=BigInt(q.tokenAmount),P=S.normalizeNativeTokenAddress(q.tokenAddress),D=t.find(L=>{const T=S.normalizeNativeTokenAddress(L.asset.address);return l.addressesEqual(T,P)}),M=D?D.asset.decimals:await l.getTokenDecimals(i,S.ZERO_ADDRESS);E+=S.convertAmountBetweenDecimals(O,M,C)}e.isCrossDenomination&&e.convertedUsdAmount&&(E=e.convertedUsdAmount);const k={chainId:i,tokenTransfers:g.map(q=>({from:q.sender,to:q.receiver,token:q.tokenAddress,amount:BigInt(q.tokenAmount)})),call:v},F=e.isCrossDenomination&&e.convertedUsdAmount?[{from:e.sourceAddress,to:a,token:S.normalizeNativeTokenAddress(t[0].asset.address),amount:N.parseUnits(t[0].amount,t[0].asset.decimals)}]:[],j={chainId:h,tokenTransfers:[...F,{from:"escrow",to:e.sourceAddress,token:e.destinationTokenAddress,amount:E}],call:{to:e.destinationTokenAddress,value:BigInt(0),data:"0x"}},I={mode:"non-7702:on-demand",chainBatches:[k,j]},b={user:e.sourceAddress,intents:[I]},A=await l.relayerService.createAction(b),R=A.actionId,B=A.intentIds[0];if(!x)throw new Error("No transaction hash available");e.startStatusPolling(B,l.createInitialSteps([{chainId:i,calls:[v]},{chainId:h,calls:[j.call]}],q=>l.getChainName(q))),await l.relayerService.executeStep(R,0,0,{action:"execute",hash:x}),t[0]?.amount&&(e.bridgedAmountRef.current=t[0].amount),e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(t[0].asset),e.setShowConfirmation(!1)}else throw new Error("Presign mode not yet fully supported for cross-chain deposits")}}else{const h=[],y=[];let g=0,x;const w=u&&e.effectiveDepositFee?N.formatUnits(e.effectiveDepositFee.net,n.asset.decimals):n?.amount;for(const O of t){const P=N.parseUnits(O.amount,O.asset.decimals),D=u&&O===n,M=D?e.effectiveDepositFee.fee:0n,L=D?e.effectiveDepositFee.net:P,T=S.normalizeNativeTokenAddress(O.asset.address),H=O.asset.isNative||S.isNativeToken(T);if(e.escrowOnly&&y.push({chainId:i,token:T,amount:L+M}),!e.escrowOnly&&!Is(O.asset)){e.validateCurrentSession?.(),e.setDirectDepositStatus("processing"),e.setDirectDepositChainId(i);const V=await Mo(f,{chainId:i,recipient:e.address,tokenAddr:T,isNative:H,amount:P,failureMessage:`Transfer to embedded wallet failed for ${O.asset.symbol}`,afterSend:()=>{r=!0}});g+=1,O===n&&(x=V);continue}if(!e.escrowOnly){e.validateCurrentSession?.();let V;await Mo(f,{chainId:i,recipient:e.address,tokenAddr:T,isNative:H,amount:P,failureMessage:`Transfer to embedded wallet failed for ${O.asset.symbol}`,afterSend:()=>{r=!0,V={chainId:i,tokenAddress:S.normalizeNativeTokenAddress(O.asset.address),tokenSymbol:O.asset.symbol,tokenDecimals:O.asset.decimals,amount:O.amount,rawAmount:P.toString(),embeddedWalletAddress:e.address,externalWalletAddress:e.sourceAddress,timestamp:Date.now(),isNative:H},bm(V)},afterRevert:()=>{const te=V;te&&fd(e.address).some(Z=>Object.entries(te).every(([K,Y])=>Z[K]===Y))&&No(e.address,i,T)},settle:!0})}h.push(...ei({escrowAddress:a,tokenAddress:T,isNative:H,amount:L,gasFeeAmount:M}))}if(h.length===0){e.setDirectDepositTxHash(x??null),e.setDirectDepositStatus("success");const O={type:"deposit",status:"success",amount:n.amount,asset:n.asset.symbol,sourceChain:l.getChainName(i),txHash:x};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:O})),e.onDepositSuccess?.(O),e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(n.asset);return}g>0&&e.setDirectDepositStatus("idle");const v=t.find(O=>e.escrowOnly||Is(O.asset))??n,C=await l.getClientForChain(i).getBlockNumber(),E=h.map(O=>({...O,to:N.getAddress(O.to)})),k={chainId:i,recentBlock:C,calls:E,tokenTransfers:[]},F=vm({sourceChainId:i,selectedAsset:v===n&&w?{...n,amount:w}:v,destinationChainId:e.destinationChainId,destinationTokenAddress:e.destinationTokenAddress,isCrossDenomination:e.isCrossDenomination,convertedUsdAmount:e.convertedUsdAmount}),j=await Cm(e.depositBatches,F),I=[k,...j];if(!e.address)throw new Error("Address not available");const b=[];if(e.isCrossDenomination&&e.convertedUsdAmount&&e.destinationTokenAddress){const O=e.selectedDepositAssets[0]?.asset;if(O){const P=N.parseUnits(e.selectedDepositAssets[0].amount,O.decimals);b.push({from:e.address,to:a,token:S.normalizeNativeTokenAddress(O.address),amount:P}),b.push({from:"escrow",to:e.address,token:e.destinationTokenAddress,amount:e.convertedUsdAmount})}}b.length>0&&I[1]&&(I[1].tokenTransfers=b);const A=l.createInitialSteps(I,O=>l.getChainName(O));let R=!1;e.validateCurrentSession?.();const B=await e.execution.execute(I,S.ZERO_ADDRESS,0n,O=>{if(O.intentId&&!R){R=!0;for(const P of t)No(e.address,i,S.normalizeNativeTokenAddress(P.asset.address));e.startStatusPolling(O.intentId,A)}},void 0,{userOverride:e.address,useCustomTransfers:!0,skipPreSubmitFeeEstimate:!0,skipUserFundingPreflight:!0,...e.escrowOnly?{walletFundingRequirements:y}:{},...e.validateCurrentSession?{validateBeforeSubmit:e.validateCurrentSession}:{}});if(e.refreshAssets(),e.onDepositExecute&&v.amount)try{e.setPostDepositStatus("executing"),await e.onDepositExecute(w||v.amount),e.setPostDepositStatus("success"),e.setPostDepositAmount(w||v.amount),e.setPostDepositSuccess(!0)}catch(O){console.error("ctx.onDepositExecute failed (7702):",O),e.setPostDepositStatus("error"),e.setPostDepositError(O?.message||"Post-deposit instruction failed");return}const q={type:"deposit",status:"success",amount:v===n&&w||v.amount,asset:v.asset.symbol,sourceChain:l.getChainName(i),txHash:/^0x[0-9a-f]{64}$/i.test(B??"")?B:void 0};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:q})),e.onDepositSuccess?.(q),e.onDepositSelect&&e.onDepositSelect(v.asset)}}catch(o){if(e.isCurrent&&!e.isCurrent())return;s=!0,console.error("[DepositModal] executeDeposit CAUGHT ERROR:",o),console.error("[DepositModal] Error details:",{message:o?.message,code:o?.code,name:o?.name,stack:o?.stack?.slice(0,500)});const i=o instanceof l.SpiceflowError&&o.context.submissionStatus==="unknown";(r||i)&&(e.setRetryBlocked?.(!0),e.refreshAssets());let a=o instanceof l.SpiceflowError&&o.context.submissionStatus==="rejected"&&(o.context.httpStatus===401||o.context.httpStatus===403)?"This app's deposit configuration was rejected. Contact the app's support team.":l.sanitizeError(o,"Deposit failed");r&&(a+=" A wallet transfer was already submitted. Close this deposit and check your activity and balances before continuing."),e.setError(l.sanitizeError(o instanceof l.SpiceflowError?new l.SpiceflowError(o.code,a,o.context):new Error(a),"Deposit failed")),i||e.clearStatus()}finally{if(e.isCurrent&&!e.isCurrent())return;e.setIsExecuting(!1),s&&e.setDirectDepositStatus("idle"),s||!e.getCurrentIntentStatus()&&e.getCurrentPostDepositStatus()!=="idle"||e.setShowConfirmation(!1)}}async function ti(e){const{address:t,depositQuote:n}=e,{asset:s,amount:r,token:o,chainId:i}=n;let a=r>1n?1n:0n;const d=e.requireSimulation;for(let u=0;u<5;u++){if(d&&a>=r)throw new Error("Cash amount does not cover the order funding fee");const m=ei({escrowAddress:S.getEscrowContractAddress(i),tokenAddress:S.normalizeNativeTokenAddress(o),amount:r-a,gasFeeAmount:a,isNative:s.isNative===!0}),f={chainId:i,tokenTransfers:[],calls:m},h=await l.relayerService.estimateBatchGas({user:t,outputToken:o,chainBatches:[{...f,hash:S.hashChainBatches([f])[0].hash}],signal:e.signal,requireSimulation:e.requireSimulation});if(e.requireSimulation&&(h.gasQuoteSource!=="estimated"||h.simulationVerified!==!0||h.gasFee<0n))throw new Error("A verified deposit fee quote is unavailable");if(d&&h.gasFee>a){a=h.gasFee;continue}const y=d?a:h.gasFee;if(y>=r)throw new Error("This deposit amount is too small to cover the network fee. Your funds remain in your wallet.");const g=r-y;return{fee:y,net:g,quotedAmount:r,token:o,chainId:i}}throw new Error("Order funding fees did not converge. Prepare the order again")}const Im=({selectedDepositAssets:e,depositAssets:t,secondAssetOptions:n,loadingAssets:s,allowSecondAsset:r,theme:o,styles:i,dark:a,dk:d,onSelect:u,onAmountChange:m,onAdd:f,onRemove:h,onViewAllAssets:y})=>c.jsxs(c.Fragment,{children:[e.map((g,x)=>{const w=e.length===1?"Deposit":`Asset ${x+1}`;return c.jsxs("div",{style:{marginBottom:o.spacing.md,position:"relative"},children:[c.jsx(or,{assets:x===0?t:n,selectedAsset:g||void 0,onAssetSelect:v=>u(v,x),onAmountChange:v=>m(v,x),loading:s,label:w,showBalance:!0,theme:o,styles:i,allowSecondAsset:r&&x===0,onAddAsset:f,canAddAsset:e.length===1&&!!e[0]?.asset,onViewAllAssets:x===0?y:void 0}),x===1&&c.jsx("button",{onClick:()=>h(x),style:{position:"absolute",top:"-2px",right:"-2px",background:a?`${d.cardBg}ee`:"rgba(255, 255, 255, 0.9)",border:`1px solid ${d.cardBorder}`,borderRadius:"50%",cursor:"pointer",color:o.colors.textMuted,fontSize:"16px",padding:"2px",width:"22px",height:"22px",display:"flex",alignItems:"center",justifyContent:"center",transition:l.transition.interactive,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},onMouseEnter:v=>{v.currentTarget.style.color=a?d.errorText:"#ef4444",v.currentTarget.style.background=a?d.cardBg:"#fff",v.currentTarget.style.borderColor=a?d.errorBorder:"#fecaca"},onMouseLeave:v=>{v.currentTarget.style.color=o.colors.textMuted,v.currentTarget.style.background=a?`${d.cardBg}ee`:"rgba(255, 255, 255, 0.9)",v.currentTarget.style.borderColor=a?d.cardBorder:"#e5e7eb"},title:"Remove asset",children:"\xD7"})]},`asset-${x}`)}),e.length===0&&c.jsx("div",{style:{marginBottom:o.spacing.md},children:c.jsx(or,{assets:t,selectedAsset:void 0,onAssetSelect:g=>u(g,0),onAmountChange:g=>m(g,0),loading:s,label:"Deposit",showBalance:!0,theme:o,styles:i,allowSecondAsset:r,onAddAsset:f,canAddAsset:!1},"initial-selector")})]}),Sm=p.memo(Im),ni=({onClick:e,label:t="Add Funds",color:n,fontFamily:s,style:r})=>{const[o,i]=p.useState(!1);return c.jsxs("button",{type:"button",onClick:e,"data-spiceflow-focus":!0,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"inline-flex",alignItems:"center",gap:"4px",color:n,fontSize:"12px",fontWeight:500,fontFamily:s,textDecoration:"underline",textUnderlineOffset:"2px",whiteSpace:"nowrap",opacity:o?.75:1,transition:"opacity 150ms ease",...r},children:[t,c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[c.jsx("circle",{cx:"6",cy:"6",r:"5"}),c.jsx("path",{d:"M6 4v4M4 6h4",strokeLinecap:"round"})]})]})},Am="This deposit didn't confirm in time. It may still have gone through, so check the explorer and refresh your balance before retrying.";function Em(e){return e?.overallStatus!=="failed"?{isFailed:!1,failureMessage:null}:{isFailed:!0,failureMessage:e.steps?.find(t=>t.status==="failed"&&!!t.error)?.error||Am}}const Po=c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{flexShrink:0},children:[c.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"#10b981"}),c.jsx("path",{d:"M6 10l3 3 5-6",stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Fm=({isOpen:e,onClose:t,onConfirm:n,data:s,isExecuting:r=!1,retryBlocked:o=!1,directDepositStatus:i="idle",error:a=null,theme:d,styles:u,intentStatus:m,postDepositStatus:f="idle",hasPostDepositInstruction:h=!1})=>{const{dark:y,dk:g,theme:x}=l.useSpiceBrand(u),[w,v]=p.useState(!1),[C,E]=p.useState(!0);p.useEffect(()=>{e||v(!1)},[e]);const k=()=>{v(!0),setTimeout(()=>{t()},300)},F=()=>{E(!C)};if(!e||!s)return null;const j=m?.overallStatus==="processing",I=m?.overallStatus==="success"||i==="success",b=!!m,{isFailed:A,failureMessage:R}=Em(m),B=!b&&h,q=B&&f==="executing",O=B&&f==="success",P=I&&h&&(f==="idle"||f==="executing")||q,D=I&&(!h||f==="success"||f==="error")||O||B&&f==="error",M=y?g.cardBg:"#ffffff",L=y?"0 -4px 20px rgba(0, 0, 0, 0.4)":"0 -4px 20px rgba(0, 0, 0, 0.15)",T=g.textSecondary,H=y?g.textPrimary:"#1f2937",V=y?g.textPrimary:"#1f2937",te=Y=>c.jsx("div",{style:{marginBottom:d.spacing.md,padding:d.spacing.md,backgroundColor:u?.errorMessage?.backgroundColor||(d.mode==="light"?"#fef2f2":`${d.colors.error}20`),border:`1px solid ${u?.errorMessage?.borderColor||(d.mode==="light"?"#fecaca":d.colors.error)}`,borderRadius:u?.errorMessage?.borderRadius||d.borderRadius.md},children:c.jsx("p",{style:{color:u?.errorMessage?.color||d.colors.error,fontSize:u?.errorMessage?.fontSize||d.typography.fontSize.sm,margin:0,fontFamily:u?.errorMessage?.fontFamily||u?.fontFamily||d.typography.fontFamily},children:Y})}),Z={fontSize:d.typography.fontSize.sm,fontWeight:500,color:T,fontFamily:l.font.mono,letterSpacing:"0.5px"},K=(Y,J,ge=H)=>c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:Z,children:Y}),c.jsx("span",{style:{fontSize:d.typography.fontSize.sm,fontWeight:500,color:ge,fontFamily:l.font.mono},children:J})]});return c.jsxs("div",{style:{position:I||O?"relative":"absolute",bottom:0,left:0,right:0,zIndex:10,animation:w?"slideDown 0.3s ease-in":"slideUp 0.3s ease-out",pointerEvents:"auto"},children:[c.jsxs("div",{style:{backgroundColor:M,borderRadius:"0",width:"100%",maxWidth:"522px",margin:"0 auto",padding:"18px 24px",boxShadow:L},children:[c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:d.spacing.md},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},onClick:F,children:[c.jsx("span",{style:{fontSize:"13px",fontWeight:d.typography.fontWeight.medium,color:T,fontFamily:u?.fontFamily||d.typography.fontFamily},children:"Transaction Details"}),c.jsx($s,{color:T,direction:C?"up":"down"})]}),!I&&!O&&c.jsx("button",{onClick:Y=>{Y.stopPropagation(),t()},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:T,transition:"color 0.2s ease"},onMouseEnter:Y=>{Y.currentTarget.style.color=V},onMouseLeave:Y=>{Y.currentTarget.style.color=T},children:c.jsx(Rr,{size:16})})]}),c.jsxs("div",{style:{marginBottom:d.spacing.lg,display:"flex",flexDirection:"column",gap:d.spacing.md,overflow:"hidden",maxHeight:C?"200px":"0px",opacity:C?1:0,transition:"max-height 0.3s ease, opacity 0.3s ease"},children:[K("NETWORK",s.network),K("DEPOSITED AMOUNT",s.amount,d.colors.success),s.creditedAmount&&K("CREDITED AMOUNT",s.creditedAmount),s.spicenetFee&&K("SPICENET FEE",s.spicenetFee),s.networkFee&&K("EST. NETWORK FEE",s.networkFee)]})]}),a&&!b&&te(a),A&&R&&te(R),c.jsx(l.Button,{onClick:D||A||o?k:n,variant:"outline",fullWidth:!0,disabled:r||j||P||q,styles:u,theme:x,children:r||j||q||P?"PROCESSING...":D?"CONTINUE \u2192":A||o?"CLOSE":"CONFIRM DEPOSIT"}),D&&f!=="error"&&c.jsx("p",{style:{marginTop:d.spacing.md,marginBottom:0,fontSize:"14px",color:T,textAlign:"center",fontFamily:u?.fontFamily||d.typography.fontFamily},children:"Your funds are now available in your Account"}),c.jsx("div",{style:{marginTop:d.spacing.md,display:"flex",justifyContent:"center",alignItems:"center"},children:c.jsx("img",{src:$c,alt:"Powered by SpiceNet",style:{height:"auto",width:"130px",opacity:1,filter:y?"brightness(0) invert(1) opacity(0.7)":"none"}})})]}),c.jsx("style",{children:`
|
|
21
|
+
`})]}),document.body):null;return c.jsxs(c.Fragment,{children:[$e,Qe,ue&&gr.createPortal(c.jsx(Ha,{isOpen:!0,onClose:()=>Ke(null),styles:u,walletAssets:{initialAsset:ue},onWithdrawSuccess:()=>{de(),Ke(null)}}),document.body)]})},rd=({chainId:e,name:t,size:n=16})=>{const s=e&&(bs[e]||S.getChainMeta(e)?.logo)||"";return s?c.jsx("img",{src:s,alt:t||`Chain ${e}`,loading:"lazy",decoding:"async",width:n,height:n,style:{width:`${n}px`,height:`${n}px`,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):null},Bo=({symbol:e,label:t,logoURI:n,chainId:s,address:r,size:o=20,theme:i})=>{const{theme:a}=d.useSpiceBrand(),l=i||a,[u,m]=p.useState(),f={width:`${o}px`,height:`${o}px`,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${o*.4}px`,fontWeight:l.typography.fontWeight.bold,flexShrink:0,overflow:"hidden",backgroundColor:"#ffffff"},h=Qa(n===null?null:n||na[e.toUpperCase()],s,r);if(n===null)return null;if(h&&h!==u)return c.jsx("img",{src:h,alt:t??e,loading:"lazy",decoding:"async",style:{...f,objectFit:"cover"},onError:()=>m(h)});const y=nm(e);return c.jsx("div",{style:{...f,...y.style},children:y.icon})},nm=e=>{const t=e.toUpperCase(),n={ETH:{bg:"#627EEA",text:"#FFFFFF",icon:"\u039E"},BTC:{bg:"#F7931A",text:"#FFFFFF",icon:"\u20BF"},USDC:{bg:"#2775CA",text:"#FFFFFF"},USDT:{bg:"#26A17B",text:"#FFFFFF"},DAI:{bg:"#F5AC37",text:"#FFFFFF"},WETH:{bg:"#627EEA",text:"#FFFFFF",icon:"\u039E"},WBTC:{bg:"#F09242",text:"#FFFFFF",icon:"\u20BF"},CBTC:{bg:"#F7931A",text:"#FFFFFF",icon:"\u20BF"},USD:{bg:"#26A17B",text:"#FFFFFF",icon:"$"},MATIC:{bg:"#8247E5",text:"#FFFFFF"},AVAX:{bg:"#E84142",text:"#FFFFFF"},SOL:{bg:"#9945FF",text:"#FFFFFF"},DOT:{bg:"#E6007A",text:"#FFFFFF"},ADA:{bg:"#0033AD",text:"#FFFFFF"},LINK:{bg:"#375BD2",text:"#FFFFFF"},UNI:{bg:"#FF007A",text:"#FFFFFF"},AAVE:{bg:"#B6509E",text:"#FFFFFF"},CRV:{bg:"#40E0D0",text:"#000000"}}[t];if(n)return{style:{backgroundColor:n.bg,color:n.text},icon:n.icon||t.charAt(0)};const s=t.split("").reduce((a,l)=>l.charCodeAt(0)+((a<<5)-a),0),r=Math.abs(s)%360,o=`hsl(${r}, 60%, 50%)`,i=r>180?"#FFFFFF":"#000000";return{style:{backgroundColor:o,color:i},icon:t.charAt(0)}},sm=({selectedAsset:e,assets:t,onAssetSelect:n,showDropdown:s,onToggleDropdown:r,disabled:o=!1,theme:i,onViewAllAssets:a,getAvailableBalance:l})=>{const u=d.useAssetDisplay(),m=D=>{const M=l?l(D):D.balance;return M===void 0?"...":d.formatAssetBalance({balance:M,decimals:D.decimals})},{theme:f}=d.useSpiceBrand(),h=i||f,y=p.useRef(null),g=p.useRef(null),x=p.useRef(null),[w,v]=p.useState(null);p.useEffect(()=>{if(s&&g.current){const D=()=>{if(g.current){const M=g.current.getBoundingClientRect();v({top:M.bottom+6,right:window.innerWidth-M.right})}};return D(),window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}}else v(null)},[s]),p.useEffect(()=>{const D=M=>{y.current&&!y.current.contains(M.target)&&x.current&&!x.current.contains(M.target)&&s&&r()};return s&&document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[s,r]);const[C,E]=p.useState(!1),k=h.mode==="light",F={backgroundColor:"transparent",border:`1px solid ${k?"#aaaaaa":h.colors.border}`,borderRadius:"6px",color:h.colors.text,cursor:o?"not-allowed":"pointer",padding:"8px 14px 8px 10px",width:"100%",display:"flex",flexDirection:"column",gap:"4px",opacity:o?.6:1,transition:d.transition.interactive,transform:C?"scale(0.98)":"scale(1)"},O={display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",minWidth:0},I={display:"flex",alignItems:"center",gap:"4px",paddingTop:"4px",borderTop:`1px solid ${h.colors.border}`},b=()=>w?{position:"fixed",top:`${w.top}px`,right:`${w.right}px`,backgroundColor:h.colors.secondary,border:`1px solid ${h.colors.border}`,borderRadius:h.borderRadius.md,boxShadow:h.shadows.lg,zIndex:d.z.dropdown,width:"200px",maxHeight:"300px",overflow:"auto"}:{},A={backgroundColor:"transparent",border:"none",color:h.colors.text,cursor:"pointer",padding:h.spacing.sm,width:"100%",display:"flex",alignItems:"center",gap:h.spacing.sm,transition:`background-color ${h.animation.normal}`,":hover":{backgroundColor:h.colors.surfaceHover}},R={display:"flex",flexDirection:"column",alignItems:"flex-start",flex:1},B={fontSize:h.typography.fontSize.sm,fontWeight:h.typography.fontWeight.medium},q={fontSize:h.typography.fontSize.xs,color:h.colors.textMuted},j={backgroundColor:"transparent",border:"none",borderTop:`1px solid ${h.colors.border}`,color:h.colors.primary,cursor:"pointer",padding:"10px 12px",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",fontFamily:h.typography.fontFamily,fontSize:h.typography.fontSize.xs,fontWeight:h.typography.fontWeight.medium,textDecoration:"underline",textUnderlineOffset:"2px"},P={transition:`transform ${h.animation.normal}`,transform:s?"rotate(180deg)":"rotate(0deg)",flexShrink:0};return c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{position:"relative"},ref:y,children:c.jsxs("div",{ref:g,style:F,onClick:o?void 0:r,onMouseLeave:()=>{E(!1)},onMouseDown:()=>E(!0),onMouseUp:()=>E(!1),children:[c.jsxs("div",{style:O,children:[c.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},children:e?.asset?c.jsxs(c.Fragment,{children:[c.jsx(Bo,{symbol:e.asset.symbol,label:u(e.asset).symbol,logoURI:u(e.asset).logoURI,chainId:e.asset.chainId,address:e.asset.address,theme:h,size:24}),c.jsx("span",{style:{fontSize:"15px",fontWeight:500,color:h.colors.text,lineHeight:"1.5",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u(e.asset).symbol})]}):c.jsx("span",{style:{fontSize:"14px",color:h.colors.textMuted},children:"Select"})}),c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:k?h.colors.textMuted:"#c7ccd4",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:P,children:c.jsx("path",{d:"M6 9l6 6 6-6"})})]}),e?.asset&&c.jsxs("div",{style:I,children:[!e.asset.displayChainName&&c.jsx(rd,{chainId:e.asset.chainId,theme:h}),c.jsx("span",{style:{fontSize:"11px",color:h.colors.textMuted},children:d.getAssetDisplayChainName(e.asset)})]})]})}),s&&w&&gr.createPortal(c.jsxs("div",{ref:x,style:b(),children:[t.length===0&&c.jsx("div",{style:{padding:"10px 12px",color:h.colors.textMuted,fontSize:h.typography.fontSize.xs},children:"No assets available"}),t.map(D=>c.jsxs("button",{style:A,onClick:()=>{n(D),r()},children:[c.jsx(Bo,{symbol:D.symbol,label:u(D).symbol,logoURI:u(D).logoURI,chainId:D.chainId,address:D.address,theme:h},ye(D)),c.jsxs("div",{style:R,children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:h.spacing.xs},children:[c.jsx("span",{style:B,children:u(D).symbol}),!D.displayChainName&&c.jsx(rd,{chainId:D.chainId,theme:h})]}),c.jsxs("span",{style:q,children:[m(D)," \u2022 ",d.getAssetDisplayChainName(D)]})]})]},ye(D))),a&&c.jsxs("button",{type:"button",style:j,onClick:()=>{r(),a()},children:[c.jsx("span",{children:"View all assets"}),c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M5 12h14"}),c.jsx("path",{d:"M13 5l7 7-7 7"})]})]})]}),document.body)]})},rm=({assets:e,selectedAsset:t,onAssetSelect:n,onAmountChange:s,disabled:r=!1,loading:o=!1,label:i="Select Asset",showBalance:a=!0,showMaxButton:l=!0,placeholder:u="0.0",theme:m,styles:f,maxAmount:h,resolveMaxAmount:y,getAvailableBalance:g,hideAmountInput:x=!1,displayAmount:w,dark:v,onViewAllAssets:C})=>{const E=d.useAssetDisplay(),{theme:k,primaryColor:F,dark:O,dk:I}=d.useSpiceBrand(f,v),b=m||k,A=v??O,[R,B]=p.useState(!1),[q,j]=p.useState(null),[P,D]=p.useState(null),[M,L]=p.useState(!1),[T,H]=p.useState(null),[V,te]=p.useState(t?.amount||""),Z=p.useRef(0),K=t?.asset?ye(t.asset):"",Y=t?.asset?g?g(t.asset):t.asset.balance:void 0,J=T??h;p.useLayoutEffect(()=>()=>{Z.current++},[]),p.useLayoutEffect(()=>{Z.current++,te(t?.amount||""),L(!1)},[K,t?.amount]),p.useLayoutEffect(()=>{Z.current++,H(null),L(!1)},[K,t?.asset.owner,t?.asset.decimals,t?.asset.balance,Y,h,y,r,o]);const we=()=>{Z.current++,L(!1)},me=()=>{const z=t?.asset;if(!z||Y===void 0)return;if(!J)return Y;const Q=N.parseUnits(J,z.decimals);return Q<Y?Q:Y},xe=z=>{te(z),s?.(z)},Ce=z=>{we();const Q=t?.asset,se=d.parseNumericInput(z.startsWith(".")?`0${z}`:z,Q?.decimals);if(!Q||!se)return xe(se);const ce=N.parseUnits(se,Q.decimals),X=me();xe(X!==void 0&&ce>X?N.formatUnits(X,Q.decimals):se)},ne=async()=>{const z=t?.asset;if(!z||r||o||Y===void 0)return;const Q=++Z.current,se=()=>Z.current===Q,ce=y;if(T!==null){const oe=me();oe!==void 0&&xe(N.formatUnits(oe,z.decimals));return}if(ce){L(!0);try{const oe=await ce(z);if(!se())return;if(oe!==null){const Oe=d.parseNumericInput(oe,z.decimals),Ne=me();if(!Oe||Ne===void 0)return;const he=N.parseUnits(Oe,z.decimals)>Ne?N.formatUnits(Ne,z.decimals):Oe;H(he),xe(he);return}return}catch(oe){se()&&console.warn("[AssetSelector] Failed to resolve max amount:",oe);return}finally{se()&&L(!1)}}const X=me();se()&&X!==void 0&&xe(N.formatUnits(X,z.decimals))},_=async z=>{if(!t||r||Y===void 0)return;if(z===100)return ne();we();const Q=me();Q!==void 0&&xe(N.formatUnits(Q*BigInt(z)/100n,t.asset.decimals))},de=t&&Y!==void 0?Number(N.formatUnits(Y,t.asset.decimals)):0,W=parseFloat(V)||0,je=de>0?W/de*100:0,Ae={backgroundColor:f?.assetSelector?.backgroundColor||f?.secondaryBackground||(A?I.cardBg:"#e9e9e9"),border:A?`0.5px solid ${I.cardBorder}`:"0.5px solid #A8A8A7",borderRadius:f?.assetSelector?.borderRadius||"6px",padding:f?.assetSelector?.padding||"16px",height:"auto",minHeight:x?void 0:"144px",display:"flex",flexDirection:"column",gap:"8px",position:"relative",opacity:r?.6:1};return o?c.jsx("div",{style:Ae,children:c.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"4px",height:"16px",width:"60px"}}),c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"4px",height:"40px",width:"150px"}})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"},children:[c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"4px",height:"12px",width:"80px"}}),c.jsx("div",{style:{backgroundColor:A?I.hoverBg:"#d1d5db",borderRadius:"6px",height:"46px",width:"128px"}})]})]})}):c.jsxs("div",{style:Ae,children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:{fontFamily:f?.fontFamily||b.typography.fontFamily,fontSize:"16px",fontWeight:500,color:A?I.textSecondary:"#7d7c7b",lineHeight:"24px"},children:i}),a&&t?.asset&&c.jsxs("span",{style:{fontFamily:f?.fontFamily||b.typography.fontFamily,fontSize:"12px",fontWeight:500,color:A?I.textSecondary:"#71757a",lineHeight:"16px"},children:["Balance:"," ",Y===void 0?"...":d.formatAssetBalance({balance:Y,decimals:t.asset.decimals})]})]}),c.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px 12px",justifyContent:x&&!w?"flex-start":"space-between",alignItems:"center",flex:1},children:[!x&&c.jsx(Ws,{element:"input",ariaLabel:t?.asset?`${E(t.asset).symbol} amount`:"Amount",dataSpiceflowFocus:!0,value:V,onChange:z=>Ce(z.target.value),placeholder:u,disabled:r||!t?.asset,fontFamily:f?.fontFamily||b.typography.fontFamily,color:r?A?"rgba(255, 255, 255, 0.16)":"rgba(14, 13, 11, 0.16)":V?A?"#ffffff":"#0e0d0b":A?"#4a5568":"#d1d5db",lineHeight:"1.08",maxFontSize:40,minFontSize:22,style:{width:"100%",maxWidth:"200px",flex:"1 1 200px",minWidth:"min(200px, 100%)"}}),c.jsx("div",{style:{width:"176px",maxWidth:"100%",position:"relative",flexShrink:0,marginLeft:x&&!w?void 0:"auto"},children:c.jsx(sm,{selectedAsset:t,assets:e,onAssetSelect:z=>{we(),H(null),n(z)},showDropdown:R,onToggleDropdown:()=>B(!R),disabled:r,theme:b,onViewAllAssets:C,getAvailableBalance:g})}),x&&w&&c.jsx(Ws,{element:"span",value:w,title:w,fontFamily:f?.fontFamily||b.typography.fontFamily,color:A?"#ffffff":"#0e0d0b",lineHeight:"1.08",textAlign:"right",maxFontSize:40,minFontSize:22,style:{flex:"1 1 200px",minWidth:"min(200px, 100%)"}})]}),!x&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"10px",height:"14px"},children:[0,25,50,75,100].filter(z=>l||z!==100).map((z,Q)=>{const se=Math.abs(je-z)<1,ce=Q===4,X=q===z,oe=P===z;return c.jsx("button",{onClick:()=>_(z),onMouseEnter:()=>j(z),onMouseLeave:()=>{j(null),D(null)},onMouseDown:()=>D(z),onMouseUp:()=>D(null),disabled:r||!t?.asset||Y===void 0||z===100&&M,title:`${z}%`,style:{width:"14px",height:"14px",padding:0,border:"none",backgroundColor:"transparent",cursor:r||!t?.asset||Y===void 0||z===100&&M?"not-allowed":"pointer",opacity:se?1:X?.8:.5,transform:oe?"scale(0.85)":X?"scale(1.15)":"scale(1)",transition:d.transition.interactive},children:c.jsx(La,{pct:z,isMax:ce,primaryColor:F,dark:A,fillColor:A?I.textSecondary:"#3C3E42"})},z)})})]})},or=p.memo(rm);function om({asset:e,showLogo:t=!0,showLabel:n=!0,denomination:s="token",className:r,style:o}){const i=d.useAssetDisplay()(e),a=s==="token"?d.formatAssetBalance(e):Number.isFinite(e.balanceUsd)&&(e.balanceUsd>0||e.balance===0n)?d.formatUsd(e.balanceUsd):"\u2014";return c.jsxs("span",{className:r,style:{display:"inline-flex",alignItems:"center",gap:6,...o},children:[t&&c.jsx(Bo,{symbol:e.symbol,label:i.symbol,logoURI:i.logoURI,chainId:e.chainId,address:e.address}),n&&c.jsx("span",{children:i.symbol}),c.jsx("span",{children:a})]})}var am="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAASrdJREFUeAHtfQeYHMd15quemc0LLhjBiAEDCAYQiUkgRQDMBNNClBlkSwdYsqQ7fz7Jd2f7fLYOgD/rbMmyLZ19n0VZMmDLFCWaFMAcRBILRjAgMElgxIAUAZAEiMXmndB19arqVVXPzkzPzM7ODqj+ycX09FSnqvfqxXoNECFChAgRIkSIECFChAgRIkRoCDCYACxe3N01mGhL5gDmQg6mi4skxZW6GGNdnPMkNxdnXQC8a8xNMQaiXdHz0+9uu2L7EO65ws4tWvRy4L30zQOekucAlhKH4fZOz/dTHdCyradnbS8cBOhew7sSTYNJ8Py5HGLTRRckuY/jwbvEGCQlFWCXeNCF+6FCYDdTl9I2cyir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3oAy/9YhfevpGBqqWGPmoIYO44F3CkzNH3HQS7RT8FDuT+sekaaUM/a5iZ5koxinEJM5vvUJK91I7rpbGyn1YiQS/i+2X1IKnxmKKYtjanezqSnTOycVZkuX8pKDSpNg9XUbiGZthTF3wu8R2V57WZNUavR2wBwrNero92SH0u5ELuB7cHdjAOcBRpeQ5e8Xmfm68WTwlfusVJ+gV7ogUi8VTsWz2pd7MUKpWTBEhQoQIESJEiBAhQoQIESJEaED8f8CLHLNBkXU/AAAAAElFTkSuQmCC",od="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.51484 1.22476C5.04689 0.494255 5.87167 0 6.83333 0C7.79352 0 8.62302 0.493038 9.15721 1.22447C10.0512 1.08473 10.9879 1.32154 11.6665 2.00014C12.3456 2.67921 12.5823 3.61677 12.4419 4.51135C13.1714 5.04616 13.6667 5.87042 13.6667 6.83333C13.6667 7.79624 13.1714 8.62051 12.4419 9.15532C12.5823 10.0499 12.3456 10.9875 11.6665 11.6665C10.986 12.3471 10.049 12.5769 9.15858 12.4403C8.62445 13.1728 7.79434 13.6667 6.83333 13.6667C5.86959 13.6667 5.04474 13.1705 4.50996 12.44C3.619 12.5772 2.68116 12.3475 2.00014 11.6665C1.31939 10.9858 1.08903 10.0476 1.23037 9.15532C0.501138 8.62162 0 7.79824 0 6.83333C0 5.86843 0.501137 5.04504 1.23037 4.51135C1.08903 3.61904 1.31939 2.68089 2.00014 2.00014C2.67986 1.32042 3.61766 1.08457 4.51484 1.22476ZM9.20928 5.95387C9.51334 5.74624 9.59152 5.33144 9.38389 5.02737C9.17626 4.72331 8.76145 4.64514 8.45739 4.85277L8.3995 4.89229C7.48372 5.51764 6.69012 6.30153 6.05487 7.20477L5.30449 6.45518C5.044 6.19497 4.62189 6.1952 4.36168 6.45569C4.10147 6.71618 4.10169 7.13829 4.36218 7.3985L5.7 8.73489C5.84693 8.88167 6.05387 8.95158 6.25971 8.924C6.46555 8.89641 6.64677 8.77448 6.74987 8.5942C7.34322 7.55668 8.16436 6.6674 9.1514 5.9934L9.20928 5.95387Z' fill='%23EA4B4B'/%3e%3c/svg%3e",im="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaYAAACLCAYAAAAqND1fAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwABSQ1JREFUeAFsvQm8LelZ1vtV1Rr23uecHtLpdJLuzAlJkClABCWMXrwCgSQkKiJ6ZcgACApcryIXyFUGFRARE0jCKDIE0Bs1SJwgAbwKBBAJZJ473enu9HzOHtZQdet56/l/9e4Nq3+n995rrar6xnd43ud9v+Zf/aufGna7Xdnv96Vt27JYLMowDPFPL37qpc/13a7r6vt935flcnnu+/qe7qdX0zT1Pf2u9/VT9zg7O4trdQ89d7PZxPd4fm4L99d1ugf3VHv0Pd1D7+lz/dP7ek+/5xfXqA36fbvd1u/QPr1Pe7kvbeZa2qPv5/6vVqvaL92be9Au/a5/tEMvtZ925DbwXL6fX3lcGff8LOZJ92UseQ7zxrVco+fqO7qPrs9jxTzl9un3PG688nzo9zxfev/iK49nXnN5fvM6YL3Qh4vt53nMGfdU3xlX/eSzvFa5D/Oa+8pzaENuRx5Tvsv40JbcX67Lz2IcuJ+epT3B7/meue20+eL36Ctt0L1ov55Pmxlf+sqYswbYV3kP8Tzaq8/ZT7l/9Dfvo4trRP/0LO0d/s77jTbQV8aJ7+V5p9+8xx77k+aQ7+X7sWdo55+0d7Mc0z/azV7Je0YvxpPf8xrUnKzX6/od3Zd1RDvzemJMWZt5r9AP3ZO2XVzX/M01eU/xvTwved6zjM177+L39Bz16fT0tM5XXiv0gzHhWcijWD+ahOc859Ojo/rg5OSkLlQG4aIAuyhkEMIaXDWIh+sfgpCFpUnkb5TR4eFheeCBB8rR0VF9HkIEZalrJfBZ9CwEJoj384LSsxDMPBMFo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AAABJRU5ErkJggg==";const Ka=({value:e,onChange:t,ariaLabel:n,placeholder:s,endAdornment:r,size:o="lg",dark:i,styles:a,inputRef:l,autoFocus:u})=>{const{dark:m,dk:f}=d.useSpiceBrand(a,i),h=i??m,y=o==="lg",g=y?"15px":"14px",x=y?"7px":"10px",w=y?d.radius.input:d.radius.sm,v=a?.fontFamily||d.font.ui,C=h?f.inputBg:"#FAFAFA",E=h?f.inputBorder:"#e5e7eb",k=h?f.textPrimary:"#374151",F=h?f.textSecondary:"#9ca3af";return c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:C,borderRadius:w,boxShadow:h?"0 2px 4px rgba(0, 0, 0, 0.3)":"0 2px 4px rgba(0, 0, 0, 0.1)",padding:`${x} 5px`,border:`1px solid ${E}`},children:[c.jsx(Ip,{style:{color:F},size:24}),c.jsx("input",{ref:l,type:"text",role:"searchbox","aria-label":n,autoComplete:"off",spellCheck:!1,autoFocus:u,"data-spiceflow-focus":!0,placeholder:s,value:e,onChange:O=>t(O.target.value),style:{flex:1,backgroundColor:C,outline:"none",border:"none",color:k,fontSize:g,fontWeight:400,fontFamily:v}}),r]})},cm=({size:e=20,active:t=!1,dark:n=!1})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("rect",{x:"2",y:"4",width:"16",height:"2",rx:"1",fill:t?n?"#e5e7eb":"#111827":n?"#9ca3af":"#374151"}),c.jsx("rect",{x:"4",y:"9",width:"12",height:"2",rx:"1",fill:t?n?"#e5e7eb":"#111827":"#9ca3af"}),c.jsx("rect",{x:"6",y:"14",width:"8",height:"2",rx:"1",fill:t?n?"#e5e7eb":"#111827":"#9ca3af"})]}),ad=({checked:e,primaryColor:t="#ef4444",dark:n=!1})=>c.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"4px",border:e?"none":`2px solid ${n?"#4b5563":"#d1d5db"}`,backgroundColor:e?t:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:d.transition.interactive},children:e&&c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),lm=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,onTokenSelect:s,walletAddress:r,supportedChainIds:o,network:i,prefetchedAssets:a,styles:l,dark:u})=>{const[m,f]=p.useState(""),[h,y]=p.useState(null),[g,x]=p.useState(null),[w,v]=p.useState(!1),[C,E]=p.useState(new Set),k=p.useContext(d.SpiceFlowProviderContext),F=i||k?.network||"testnet",O=k?.allowedTokens,I=(k?.mode||"7702")!=="7702",b=!!k?.isWhitelistGateActive,{dark:A,primaryColor:R,dk:B}=d.useSpiceBrand(l,u),q=A?B.cardBg:"white",j=A?`${R}55`:"#F4A5A5",P=A?"0 4px 12px rgba(0, 0, 0, 0.4)":"0 4px 12px rgba(0, 0, 0, 0.15)",D=A?B.hoverBg:"#E9E9E9",M=A?B.hoverBg:"#f9fafb",L=A?B.textPrimary:"#374151",T=A?B.textPrimary:"#111827",H=A?B.textSecondary:"#9ca3af",V=A?`${R}22`:"#FBDBDB",te=A?`${R}55`:"#F4A5A5",Z=p.useMemo(()=>o||k?.supportedChainIds||S.getChainIdsByNetwork(F),[o,k?.supportedChainIds,F]),K=p.useMemo(()=>Z.map(z=>{const Q=d.getChainConfig(z);return Q?{id:z,name:Q.displayName,icon:bs[z]||Sr}:null}).filter(Boolean),[Z]),Y=a===void 0,{assets:J,loading:we}=Fr({address:Y?r:void 0,supportedChains:Z,fetchBalances:Zs,enabled:e&&Y&&!!r,refreshInterval:e?5e3:0}),me=a??(Y?J:[]),xe=a===null||Y&&we,Ce=p.useMemo(()=>(me??[]).filter(z=>Yn(z,"deposit-source",{allowedTokens:O,rpcOverrides:k?.rpcOverrides,liquidityVenues:k?.liquidityVenues,isWhitelistGateActive:b},void 0,void 0,{requiresEscrow:I}).eligible),[me,O,k?.rpcOverrides,b,I]),ne=p.useMemo(()=>{let z=Ce.filter(Q=>Q.balance>0n);if(C.size>0&&(z=z.filter(Q=>C.has(Q.chainId))),m.trim()){const Q=m.toLowerCase();z=z.filter(se=>se.name.toLowerCase().includes(Q)||se.symbol.toLowerCase().includes(Q)||se.address.toLowerCase().includes(Q))}return z=[...new Map(z.map(Q=>[ye(Q),Q])).values()],z.sort((Q,se)=>{const ce=Q.balanceFormatted>0?1:0,X=se.balanceFormatted>0?1:0;return X!==ce?X-ce:se.balanceUsd!==Q.balanceUsd?se.balanceUsd-Q.balanceUsd:se.balanceFormatted-Q.balanceFormatted}),z},[Ce,m,C]),_=ye;p.useEffect(()=>{const z=document.createElement("link");return z.href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;200;300;400;500;600;700&display=swap",z.rel="stylesheet",document.head.appendChild(z),()=>{document.head.removeChild(z)}},[]),p.useEffect(()=>{e||(f(""),y(null),v(!1),E(new Set))},[e]);const de=z=>{s(z)},W=z=>{E(Q=>{const se=new Set(Q);return se.has(z)?se.delete(z):se.add(z),se})},je=()=>{E(new Set)},Ae=C.size===0;return c.jsxs(zn,{isOpen:e,onClose:t,title:"Select a Token",bannerSrc:im,bannerAlt:"Select token banner",styles:l,dark:A,closeOnBackdropClick:n,children:[c.jsx("div",{style:{padding:"20px 20px"},children:c.jsx(Ka,{value:m,onChange:f,ariaLabel:"Search tokens",placeholder:"Search token name, symbol or address",dark:A,styles:l,endAdornment:c.jsxs("div",{style:{position:"relative",flexShrink:0},children:[c.jsx("button",{onClick:()=>v(z=>!z),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"3px",backgroundColor:w||!Ae?D:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.15s"},children:c.jsx(cm,{size:20,active:!Ae,dark:A})}),w&&c.jsxs("div",{style:{position:"absolute",top:"calc(100% + 8px)",right:0,backgroundColor:q,borderRadius:"8px",border:`1px solid ${j}`,boxShadow:P,padding:"8px",minWidth:"220px",zIndex:100},children:[c.jsxs("button",{onClick:je,style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"8px",borderRadius:"6px",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.15s"},onMouseEnter:z=>z.currentTarget.style.backgroundColor=M,onMouseLeave:z=>z.currentTarget.style.backgroundColor="transparent",children:[c.jsx(ad,{checked:Ae,primaryColor:R,dark:A}),c.jsx("img",{src:am,alt:"All Networks",loading:"lazy",decoding:"async",width:20,height:20,style:{width:"20px",height:"20px",borderRadius:"4px",objectFit:"cover"}}),c.jsx("span",{style:{fontFamily:d.font.mono,fontSize:"12px",fontWeight:600,letterSpacing:"0.5px",color:L},children:"ALL NETWORKS"})]}),K.map(z=>c.jsxs("button",{onClick:()=>W(z.id),style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"8px",borderRadius:"6px",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.15s"},onMouseEnter:Q=>Q.currentTarget.style.backgroundColor=M,onMouseLeave:Q=>Q.currentTarget.style.backgroundColor="transparent",children:[c.jsx(ad,{checked:C.has(z.id),primaryColor:R,dark:A}),c.jsx("img",{src:z.icon,alt:z.name,loading:"lazy",decoding:"async",width:20,height:20,style:{width:"20px",height:"20px",borderRadius:"50%"}}),c.jsx("span",{style:{fontFamily:d.font.mono,fontSize:"12px",fontWeight:600,letterSpacing:"0.5px",color:L},children:z.name.toUpperCase()})]},z.id))]})]})})}),c.jsxs("div",{style:{padding:"0 32px 20px",display:"flex",flexDirection:"column",gap:"8px",maxHeight:"400px",overflowY:"auto"},children:[xe&&c.jsx("div",{style:{padding:"24px 8px",textAlign:"center",fontFamily:d.font.mono,fontSize:"13px",color:H},children:"Loading balances..."}),!xe&&ne.length===0&&c.jsx("div",{style:{padding:"24px 8px",textAlign:"center",fontFamily:d.font.mono,fontSize:"13px",color:H},children:"No tokens found"}),ne.map(z=>{const Q=_(z),se=h===Q,ce=g===Q,X=d.getChainConfig(z.chainId)?.displayName||`Chain ${z.chainId}`;return c.jsxs("button",{onClick:()=>de(z),onMouseEnter:()=>x(Q),onMouseLeave:()=>x(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"16px",padding:"8px",borderRadius:"8px",backgroundColor:se?V:"transparent",border:se||ce?`1px solid ${te}`:"1px solid transparent",cursor:"pointer",transition:d.transition.interactive},children:[c.jsx("div",{style:{flexShrink:0},children:c.jsx(Bo,{symbol:z.symbol,logoURI:z.logoURI,chainId:z.chainId,address:z.address,size:40})}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2px",flex:1,minWidth:0},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsx("span",{style:{fontFamily:d.font.mono,fontSize:"15px",fontWeight:500,letterSpacing:"0.4px",color:T,textAlign:"left"},children:z.name}),c.jsx("img",{src:od,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",width:14,height:14,style:{width:"14px",height:"14px"}})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[bs[z.chainId]&&c.jsx("img",{src:bs[z.chainId],alt:"",loading:"lazy",decoding:"async",width:14,height:14,style:{width:"14px",height:"14px",borderRadius:"50%"}}),c.jsxs("span",{style:{fontFamily:d.font.mono,fontSize:"12px",fontWeight:400,color:H,textAlign:"left"},children:[z.symbol," \xB7 ",X]})]})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"2px",flexShrink:0},children:[z.balanceUsd>0&&c.jsx("span",{style:{fontFamily:d.font.mono,fontSize:"16px",fontWeight:600,color:T},children:d.formatUsd(z.balanceUsd)}),c.jsxs("span",{style:{fontFamily:d.font.mono,fontSize:"12px",fontWeight:400,color:H},children:[d.formatBalance(z.balanceFormatted)," ",z.symbol]})]})]},Q)})]})]})},id=({dk:e,dark:t,message:n,buttonLabel:s,onAction:r,disabled:o=!1})=>c.jsxs("div",{style:{padding:"12px",backgroundColor:e.warningBg,borderRadius:"8px",border:`1px solid ${e.warningBorder}`},children:[c.jsx("p",{style:{margin:"0 0 10px 0",color:e.warningText,fontSize:"14px"},children:n}),c.jsx("button",{onClick:r,disabled:o,style:{width:"100%",padding:"8px 12px",borderRadius:"6px",border:`1px solid ${t?e.warningBorder:"#fbbf24"}`,backgroundColor:t?e.cardBg:"white",cursor:o?"not-allowed":"pointer",fontWeight:600,fontSize:"13px",color:e.warningText,opacity:o?.6:1},children:s})]}),cd=({dk:e,dark:t,borderRadius:n,children:s})=>c.jsx("div",{style:{padding:"8px 12px",marginBottom:"8px",backgroundColor:t?e.warningBg:"#fffbeb",border:`1px solid ${e.warningBorder}`,borderRadius:n,fontSize:"12px",color:e.warningText,lineHeight:"1.4"},children:s});var dm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAEICAMAAACQzmAoAAAAzFBMVEWgoJ/d1tbcxsbcycndzc3a2trd0NDe3t7c29vc3Nzd09Pcw8Pd2dncv7/bubnctLTg4ODbr6+BkfGSgdnm5ubcvLzr6+vy8fDcqanZ1tbbpKTf3NtILRbZzc3bnZ3UxsbT09PRvb0FUfLPzs7TtLQKCQcHUu8YFxXQqanJs7PIxsbTlpbAvb28rK2qqKjGnp5zPxrogB83NTTXch/EjYxUU1GRj46Sn+ujmNaBfnwWXPDM0O6xtuRramhbQi23XxzdUlJ6XExXhOY2buq+my/AAAAAAXRSTlP9g+pWxwAAAAlwSFlzAAALEwAACxMBAJqcGAAAIABJREFUeNrsvWtz20iyLWo+ilXgS9AMqRaEgFtj2W1vH9s7whH2HPeMv3T///90q3KtzMoCKbfnnBs34kZsWiJBEHzJtZCvlStfvPify/9c/ufyP5frl0929X/43P+5/P/ub/OffrZPjz95eeJvvgzl96nu/k8uT8/escvw7HOGp78++Kfe+D+5DM++2pPdeWoekj9V/QPVwx6fnuzOkzzAv2relkfLbl4eceV2cnPiXbmd8uXp10nv523ZKHv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GN03XFhulLfQf+O+Hpbq4h/Uumfz++1WtERuixX5Qpv1OCa1OhlqZu10kzdH/dqclaHhL7J2Tw99c4ns7EH3bGvTI1zh8LwljrbB/EpyEjW534kqCjfin4v6Ri4eqoNXaKwXg4p9C2ErkAMP1glrgSs4KlSX9cUYfhLUfcq4Q6Xu7pNIlmBlLgcIV3iCY9WeoT3sfK4QcdXlbttUHE6suSqOj+dHSzpv9+YtIkhRpJZRkfhfgg++ZqpFxTkliRkKSPT9FArU83E2llXysDgFFKXo6sh/qMj1ulT1ulQIoWKN0Yin0LTuh+MfIOTnTeuDBsafuxt+LH9nevnKadS7YG4YefJ4oOfR3xG584hSuIDofIkctFklttdBJVCkWQmqSc3vRj3hwEkH93G7azPib3z2L+ZPmW3O/uC/luctSrT157dKc8/x9/om5y7+PRdeudukyYEu0TI2GW/9r90wJ+oWyefu58eSQjmp+qtFHCdGQKsYaF43Kom98ZVa/8bzD5QeBysZbWLV1r+2O+yOfo3w5BdRjnR993sEU/X0G7giiFGD9gIL7YdaShwhy54AltrSg8RqItvth3shLfriqK+G7Id1wUfMhCDOl+U3W0HSUu9g9JCZdHdkla1vu1oi3O7K3lGutdub/kv4DywtdWPjc47nBUq+O99JBB4lpHnlpc96wk/Wy2eCvO993hjGqJJIcYhft4f9GWHFFtgUbi/xZmN3wcjZ/Xnj7frv3h0f/HzTFSOAPn3+Pf49/j3+Pf49/hfjv8Po2R9gfj4veEAAAAASUVORK5CYII=";const Ya=e=>{const t=(e.id||"").toLowerCase(),n=(e.name||"").toLowerCase();return t.startsWith("io.privy.wallet")||n.includes("privy wallet")};async function Za(e,t){let n;try{return await Promise.race([e,new Promise((s,r)=>{n=setTimeout(()=>{const o=new Error("Wallet network read timed out. Please try again.");o.name="WalletReadTimeout",r(o)},Math.max(0,t-Date.now()))})])}finally{n!==void 0&&clearTimeout(n)}}const um=({dark:e,dk:t,primaryColor:n,disabled:s,hidden:r,onConnecting:o,onError:i})=>{const[a,l]=p.useState(!1),u=is.useAccount(),{embeddedAddress:m}=d.useProviderWallets(),f=p.useRef({account:u,embeddedAddress:m});f.current={account:u,embeddedAddress:m};const{ready:h,authenticated:y,user:g}=hr.usePrivy(),x={ready:h,authenticated:y,userId:g?.id},w=p.useRef(x);w.current=x;const v=p.useRef(0),C=()=>{const O=w.current;return O.ready===x.ready&&O.authenticated===x.authenticated&&O.userId===x.userId};p.useLayoutEffect(()=>(v.current++,l(!1),o(!1),()=>{v.current++}),[h,y,g?.id,o]);const{disconnectAsync:E}=is.useDisconnect(),{setActiveWallet:k}=hr.useActiveWallet(),{connectWallet:F}=hr.useConnectWallet({onSuccess:async({wallet:O})=>{if(!h||!C())return;const I=++v.current,b=()=>I===v.current&&C();l(!0),o(!0);try{if(O.type!=="ethereum"||O.connectorType==="embedded")throw new Error("Choose an external Ethereum wallet.");k(O);const A=f.current.account;A.address&&A.connector&&!Ya(A.connector)&&!d.addressesEqual(A.address,f.current.embeddedAddress)&&!d.addressesEqual(A.address,O.address)&&await E({connector:A.connector})}catch(A){b()&&i(d.sanitizeError(A,"Failed to connect wallet."))}finally{b()&&(l(!1),o(!1))}},onError:O=>{C()&&(v.current++,l(!1),o(!1),i(d.sanitizeError(O,"Failed to connect wallet.")))}});return r?null:c.jsxs("button",{onClick:()=>{s||a||(v.current++,l(!0),o(!0),F({walletChainType:"ethereum-only"}))},disabled:s||a,style:{width:"100%",display:"flex",alignItems:"center",gap:"14px",padding:"10px",borderRadius:"8px",backgroundColor:a?e?t.hoverBg:"#f3f4f6":"transparent",border:`2px solid ${e?`${n}33`:`${n}55`}`,cursor:s||a?"not-allowed":"pointer",opacity:s?.6:1,transition:d.transition.interactive},children:[c.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e?t.cardBg:"#f3f4f6"},children:c.jsx("img",{src:Ar.metamask,alt:"Browser wallet",style:{width:"26px",height:"26px",objectFit:"contain"}})}),c.jsx("span",{className:"ibm-plex-mono",style:{fontSize:"17px",fontWeight:500,letterSpacing:"0.4px",color:t.textPrimary,flex:1,textAlign:"left",fontFamily:d.font.mono},children:a?"Opening wallet picker...":"MetaMask / Browser Wallet"})]})},pm=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,onWalletSelect:s,onContinue:r,requiredChainId:o,styles:i})=>{const{dark:a,primaryColor:l,dk:u,theme:m}=d.useSpiceBrand(i),f=p.useContext(d.SpiceFlowProviderContext),[h,y]=p.useState(null),[g,x]=p.useState(!1),[w,v]=p.useState(null),[C,E]=p.useState(!1),[k,F]=p.useState(null),[O,I]=p.useState(!1);p.useEffect(()=>{e||(v(null),E(!1),x(!1),F(null))},[e]);const{address:b,chain:A,connector:R,isConnected:B}=is.useAccount(),{externalWallet:q,externalAddress:j}=d.useProviderWallets(),P=!!q&&!!j,D=q?.wallet.connector||q?.wallet.meta,M=Number(String(q?.wallet.chainId??"").replace(/^eip155:/,"")),L=q?.wallet.connector===R&&B&&d.addressesEqual(j,b)?A:d.getChainConfig(M)?.viemChain,{connectors:T,connectAsync:H}=is.useConnect(),{disconnectAsync:V}=is.useDisconnect(),te=S.getChainIdsByNetwork(f?.network||"testnet"),Z=p.useRef(q);Z.current=q;const K=p.useRef(0),Y=q?.wallet.connector||q?.wallet;p.useEffect(()=>(K.current++,x(!1),v(null),()=>{K.current++}),[j,Y,e]);const J=(o?d.getChainConfig(o):null)?.displayName||L?.name||`Chain ${L?.id||o}`,we=Q=>Q.type==="announced"||typeof Q.ready=="boolean"&&Q.ready?!0:Q.type==="injected"?typeof window<"u"&&!!window.ethereum:!0,me=T.filter(Q=>{const se=Q.name.toLowerCase(),ce=(Q.id||"").toLowerCase();return f?.provider==="privy"&&Ya(Q)||["safe"].includes(Q.type)?!1:Q.type==="walletConnect"?!!Q?.options?.projectId:Q.type==="announced"?!0:Q.type==="injected"||["metamask","rabby","phantom","coinbase","trust","rainbow"].some(X=>se.includes(X)||ce.includes(X))?we(Q):!1}),xe=async Q=>{if(!(C||g))try{if(E(!0),F(Q.uid),v(null),await H({connector:Q}),await qn(500),Z.current?.wallet.connector!==Q)throw new Error("Wallet changed. Please try again.");s&&s(Q.id),o&&await _(o),await qn(800)}catch(se){console.error("Connection error:",se),d.isUserRejection(se)?v("Connection rejected. Please try again."):v(d.sanitizeError(se,"Failed to connect wallet."))}finally{E(!1),F(null)}},Ce=Q=>{if(Q.icon)return Q.icon;const se=(Q.name||"").toLowerCase();for(const[ce,X]of Object.entries(Ar))if(se.includes(ce.toLowerCase()))return X;if(!Ya(Q)&&(Q.type==="injected"||Q.type==="announced")&&typeof window<"u"&&window.ethereum){const ce=window.ethereum;if(ce.isMetaMask)return Ar.metamask;if(ce.isRabby)return Ar.rabby;if(ce.isPhantom)return Ar.phantom}return null},ne=async(Q,se,ce)=>{const X=se.wallet.connector||se.wallet,oe=Date.now()+2e3;for(;Date.now()<oe;){if(await qn(Math.min(100,oe-Date.now())),ce!==K.current||!d.addressesEqual(Z.current?.address,se.address)||(Z.current?.wallet.connector||Z.current?.wallet)!==X)return!1;try{const Oe=await Za((async()=>{const Ne=await se.getEthereumProvider();return parseInt(await Ne.request({method:"eth_chainId"}),16)})(),oe);if(ce!==K.current||!d.addressesEqual(Z.current?.address,se.address)||(Z.current?.wallet.connector||Z.current?.wallet)!==X)return!1;if(Oe===Q)return!0}catch{}}return!1},_=async Q=>{const se=++K.current,ce=Z.current,X=ce?.wallet.connector||ce?.wallet,oe=()=>se===K.current&&d.addressesEqual(Z.current?.address,ce?.address)&&(Z.current?.wallet.connector||Z.current?.wallet)===X;x(!0),v(null);try{if(!ce)throw new Error("Wallet not available");const Oe=Date.now()+2e3,Ne=await Za(ce.getEthereumProvider(),Oe);let he;const Se=()=>{if(!oe())throw new Error("Wallet changed. Please try again.");if(he)throw he};Se(),await Wl({request:async Te=>{if(Te.method!=="eth_chainId")return Ne.request(Te);try{return await Za(Ne.request(Te),Oe)}catch(ve){throw ve instanceof Error&&ve.name==="WalletReadTimeout"&&(he=ve),ve}}},Q,Se),!await ne(Q,ce,se)&&oe()&&v("Unable to switch to the correct network. Please switch manually in your wallet to continue.")}catch(Oe){oe()&&(console.error("Manual chain switch error:",Oe),v(d.describeChainSwitchError(Oe)))}finally{oe()&&x(!1)}},de=async Q=>{g||(I(!1),await _(Q))},W=async()=>{if(!g){if(!o){I(Q=>!Q);return}await _(o)}},je=async()=>{try{const Q=q?.wallet;Q&&typeof Q.disconnect=="function"&&Q.disconnect(),R&&d.addressesEqual(j,b)&&await V({connector:R})}finally{v(null),E(!1),x(!1),F(null),I(!1)}},Ae=P&&!g&&!C&&(!o||L?.id===o),z=P&&!g&&!C&&o&&L?.id!==o;return c.jsxs(zn,{isOpen:e,onClose:t,title:"Connect Wallet",styles:i,dark:a,bannerSrc:dm,bannerAlt:"Connect wallet banner",closeOnBackdropClick:n,children:[c.jsxs("div",{style:{padding:"0 24px 20px",display:"flex",flexDirection:"column",gap:"12px",marginTop:"20px"},children:[w&&c.jsx(id,{dk:u,dark:a,message:w,buttonLabel:g?"Switching...":"Try Switch Again",onAction:W,disabled:g}),g&&c.jsxs("div",{style:{padding:"12px",backgroundColor:a?u.infoBg:"#dbeafe",borderRadius:"8px",display:"flex",alignItems:"center",gap:"10px",marginTop:"20px"},children:[c.jsx(d.Spinner,{size:20,color:a?u.infoText:"#3b82f6"}),c.jsx("p",{style:{margin:0,color:a?u.infoText:"#1e40af",fontSize:"14px"},children:"Switching network..."})]}),f?.provider==="privy"&&c.jsx(um,{dark:a,dk:u,primaryColor:l,disabled:C||g,hidden:P,onConnecting:E,onError:v}),P&&j?c.jsxs("div",{style:{border:`1px solid ${a?u.successBorder:"#02974F"}`,borderRadius:"8px",overflow:"hidden",marginTop:"20px"},children:[c.jsxs("div",{style:{backgroundColor:a?u.successBg:"#00FFA81C",padding:"14px 18px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx("div",{style:{width:"22px",height:"22px",borderRadius:"50%",backgroundColor:"#02974F",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:"14px",fontWeight:"bold"},children:"\u2713"}),c.jsx("span",{className:"ibm-plex-mono",style:{color:a?u.successText:"#02974F",fontWeight:600,fontSize:"14px",letterSpacing:"0.5px"},children:"WALLET CONNECTED"})]}),c.jsx("div",{style:{width:"38px",height:"38px",borderRadius:"50%",backgroundColor:a?u.cardBg:"#f3f4f6",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},children:D&&Ce(D)?c.jsx("img",{src:Ce(D),alt:D.name,style:{width:"24px",height:"24px",objectFit:"contain"}}):c.jsx("span",{style:{fontSize:"16px",fontWeight:"bold",color:a?u.textPrimary:"inherit"},children:D?.name?.charAt(0)||"W"})})]}),c.jsxs("div",{style:{padding:"18px",backgroundColor:a?u.cardBg:"white"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"14px"},children:[c.jsx("span",{className:"ibm-plex-mono",style:{color:a?u.textSecondary:"#939291",fontSize:"13px",fontWeight:500,letterSpacing:"0.3px"},children:"ADDRESS:"}),c.jsx("span",{className:"ibm-plex-mono",style:{color:a?u.textPrimary:"black",fontSize:"14px",fontWeight:600,fontFamily:d.font.mono,letterSpacing:"0.3px"},children:d.truncateAddress(j)})]}),O&&c.jsx("div",{style:{marginBottom:"12px",border:`1px solid ${a?u.inputBorder:"#E5E7EB"}`,borderRadius:"8px",overflow:"hidden",backgroundColor:u.cardBg},children:te.map(Q=>{const se=d.getChainConfig(Q);if(!se)return null;const ce=L?.id===Q;return c.jsxs("button",{onClick:()=>{ce?I(!1):de(Q)},style:{width:"100%",display:"flex",alignItems:"center",gap:"8px",padding:"10px 12px",backgroundColor:ce?a?`${l}15`:`${l}10`:"transparent",border:"none",borderBottom:`1px solid ${a?u.inputBorder:"#E5E7EB"}`,cursor:ce?"default":"pointer",transition:"background-color 0.15s"},onMouseEnter:X=>{ce||(X.currentTarget.style.backgroundColor=a?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.03)")},onMouseLeave:X=>{X.currentTarget.style.backgroundColor=ce?a?`${l}15`:`${l}10`:"transparent"},children:[c.jsx("img",{src:bs[Q]||Sr,alt:se.displayName,style:{width:"20px",height:"20px",borderRadius:"50%",objectFit:"contain"}}),c.jsx("span",{style:{fontSize:"13px",fontWeight:ce?600:400,color:a?u.textPrimary:"#1f2937",fontFamily:d.font.mono},children:se.displayName}),ce&&c.jsx("span",{style:{marginLeft:"auto",fontSize:"11px",color:l,fontWeight:500},children:"Connected"})]},Q)})}),c.jsxs("button",{className:"ibm-plex-mono",onClick:je,style:{width:"100%",padding:"10px",backgroundColor:"transparent",border:`1px solid ${a?u.inputBorder:"#E5E7EB"}`,borderRadius:"6px",cursor:"pointer",fontSize:"13px",fontWeight:500,color:a?u.textSecondary:"#9CA3AF",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[c.jsx("span",{style:{fontSize:"16px"},children:"\u27F2"}),"DISCONNECT"]})]})]}):c.jsx(c.Fragment,{children:me.map(Q=>{const se=we(Q),ce=k===Q.uid,X=!se||C||ce;return c.jsxs("button",{onClick:()=>{X||xe(Q)},onMouseEnter:()=>!X&&y(Q.uid),onMouseLeave:()=>y(null),disabled:X,style:{width:"100%",display:"flex",alignItems:"center",gap:"14px",padding:"10px",borderRadius:"8px",backgroundColor:ce?a?u.hoverBg:"#f3f4f6":"transparent",border:h===Q.uid&&!X?`2px solid ${a?`${l}44`:`${l}66`}`:"2px solid transparent",cursor:X?"not-allowed":"pointer",opacity:X?.6:1,transition:d.transition.interactive},children:[c.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a?u.cardBg:"#f3f4f6"},children:Ce(Q)?c.jsx("img",{src:Ce(Q),alt:Q.name,style:{width:"26px",height:"26px",objectFit:"contain"}}):c.jsx("span",{style:{fontSize:"16px",fontWeight:"bold",color:a?u.textPrimary:"inherit"},children:Q.name.charAt(0)})}),c.jsxs("span",{className:"ibm-plex-mono",style:{fontSize:"17px",fontWeight:500,letterSpacing:"0.4px",color:X?a?u.inputPlaceholder:"#9ca3af":a?u.textPrimary:"#111827",flex:1,textAlign:"left",fontFamily:d.font.mono},children:[ce?"Connecting...":Q.name,!se&&!ce&&c.jsx("span",{style:{fontSize:"12px",marginLeft:"8px"},children:"(Not detected)"})]})]},Q.uid)})})]}),z&&!w&&c.jsx("div",{style:{padding:"0 24px 20px"},children:c.jsx(id,{dk:u,dark:a,message:`Please switch to ${J} to continue.`,buttonLabel:g?"Switching...":"Switch Network",onAction:W,disabled:g})}),c.jsx("div",{style:{padding:"0 24px 25px"},children:c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:async()=>{Ae&&(await qn(300),r?await r():t())},disabled:!Ae,theme:m,dark:a,styles:i,children:C?"CONNECTING...":g?"SWITCHING NETWORK...":"CONTINUE"})})]})},fm=new Set(["USDC","SUSD","USD","NUSD","USDT","DAI","ENUSD","USDG"]),ld={ETH:"ethereum",WETH:"ethereum",BTC:"bitcoin",WBTC:"bitcoin",WCBTC:"bitcoin",CBTC:"bitcoin",ECBTC:"bitcoin",ARB:"arbitrum",HYPE:"hyperliquid",WHYPE:"hyperliquid",MATIC:"matic-network",POL:"matic-network"};let dd=null;const Xa=6e4;async function ud(e){const t={},n=new Set,s={};for(const i of e){const a=i.toUpperCase();if(fm.has(a))t[a]=1;else if(ld[a]){const l=ld[a];n.add(l),s[a]=l}else t[a]=0}if(n.size===0)return t;const r=Date.now(),o=dd;if(o&&r-o.timestamp<Xa){for(const[i,a]of Object.entries(s))a in o.prices&&(t[i]=o.prices[a]);if([...n].every(i=>i in o.prices))return t;for(const i of Object.keys(o.prices))n.add(i)}try{const i=Array.from(n).join(","),a=await fetch(`https://api.coingecko.com/api/v3/simple/price?ids=${i}&vs_currencies=usd`);if(!a.ok)throw new Error(`CoinGecko ${a.status}`);const l=await a.json(),u=o&&Date.now()-o.timestamp<Xa?o:null,m={};let f=r;for(const h of n){const y=l[h]?.usd;y==null&&u&&h in u.prices?(m[h]=u.prices[h],f=u.timestamp):m[h]=y??0}dd={prices:m,timestamp:f};for(const[h,y]of Object.entries(s))t[h]=m[y]??0}catch(i){console.warn("[fetchTokenPrices] CoinGecko fetch failed:",i);const a=o&&Date.now()-o.timestamp<Xa?o:null;for(const[l,u]of Object.entries(s))t[l]=a?.prices[u]??0}return t}const mm=new Set(["cbtc","btc","wbtc","wcbtc","tbtc"]),hm=new Set(["usdc","usdt","dai","usdc.e","usdbc","usdg"]);async function gm(){const e=(await ud(["BTC"])).BTC;if(!e||e<=0)throw new Error("Failed to fetch BTC/USD price");return e}function wm(e){return mm.has(e.toLowerCase())}function xm(e){return hm.has(e.toLowerCase())}function ym(e,t,n,s){const r=10n**12n,o=BigInt(Math.round(s*Number(r))),i=t-n,a=10n**BigInt(Math.abs(i));let l=e*o/r;return i>0?l=l/a:i<0&&(l=l*a),l}function Oo(e,t){if(e===0n)return"0";const n=10n**BigInt(t),s=e/n,r=(e%n).toString().padStart(t,"0").replace(/0+$/,"");return r?`${s.toString()}.${r}`:s.toString()}function Ja(e,t,n){const s=`${Oo(e,t)} ${n}`;return e===0n?s:`-${s}`}const bm=({fontFamily:e,textPrimary:t,textSecondary:n,cardBg:s,cardBorder:r,resolvedDark:o,darkCardBorder:i,primaryColor:a,feePreview:l,feeOnlyAction:u=!1,asset:m,isLoading:f,errorText:h,directExecutionFeeNote:y=!1})=>{const g=d.useAssetDisplay(),x=m&&l&&[m.symbol,m.displaySymbol,m.receiptTokenName].includes(l.symbol)?g(m).symbol:l?.symbol,w=o?i??r:"#e5e7eb",v=o?"#111214":"#111827",C=o?"rgba(255,255,255,0.08)":"rgba(17,24,39,0.12)",E="#f87171",k=o?"#d1d5db":"#4b5563",F=o?"#f3f4f6":t,[O,I]=p.useState(!1),b=!!h,A=b?null:l,R=A?.feePayer==="relayer",B=A?[...u?[]:[{label:"Total Required",help:"Total amount required to fund this action.",value:`${Oo(A.grossAmount,A.decimals)} ${x}`,tone:"default"}],{label:"Spicenet Fee",help:"Fees paid to Spicenet for intent processing and execution.",value:R?"Covered":Ja(A.spicenetFee,A.decimals,x),tone:"fee"},{label:"Network Fee",help:"Network fee shown in the same token you are using for this action.",value:R?"Covered":Ja(A.gasFee,A.decimals,x),tone:"fee"},...A.bridgeFee&&A.bridgeFee>0n?[{label:"Bridge Fee",help:"Estimated cost to rebalance liquidity for this action.",value:Ja(A.bridgeFee,A.decimals,x),tone:"fee"}]:[],...u?[]:[{label:"Used in TX",help:"Resulting amount of funds used in the transaction.",value:`${Oo(A.netAmount,A.decimals)} ${x}`,tone:"default"}]]:[],q=A?`${Oo(u?R?0n:A.totalFee??A.gasFee+A.spicenetFee+(A.bridgeFee??0n):A.grossAmount,A.decimals)} ${x}`:null;return b?c.jsx("div",{style:{backgroundColor:s,border:`1px solid ${r}`,borderRadius:o?"8px":"7px",padding:"14px 16px 12px 16px",marginBottom:"16px",boxShadow:o?"inset 0 1px 0 rgba(255,255,255,0.03)":"none"},children:c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[c.jsx("span",{style:{fontSize:"17px",fontWeight:500,color:k,fontFamily:e,lineHeight:"24px"},children:"Fee"}),c.jsx("div",{style:{color:E,fontSize:"12px",lineHeight:"1.55",fontFamily:e},children:h})]})}):c.jsxs("div",{style:{backgroundColor:s,border:`1px solid ${r}`,borderRadius:o?"8px":"7px",padding:"14px 16px 12px 16px",marginBottom:"16px",boxShadow:o?"inset 0 1px 0 rgba(255,255,255,0.03)":"none"},children:[c.jsxs("button",{type:"button",onClick:()=>I(j=>!j),style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",gap:"12px",marginBottom:O?"14px":0,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{style:{fontSize:"17px",fontWeight:500,color:k,fontFamily:e,lineHeight:"24px"},children:"Fee"}),O&&c.jsx("span",{style:{fontSize:"12px",color:n,fontFamily:e,lineHeight:"1.45"},children:"What is funded, spent, and taken as fees"})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[q&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"2px",minWidth:0},children:[c.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:n,fontFamily:e,letterSpacing:"0.08em",textTransform:"uppercase"},children:u?"Total fees":"Total required"}),c.jsx("span",{style:{fontSize:"14px",fontWeight:700,color:F,fontFamily:e,whiteSpace:"nowrap"},children:q})]}),f&&!y&&c.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:a,fontFamily:e,padding:"6px 9px",borderRadius:"999px",backgroundColor:o?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.035)",border:`1px solid ${o?w:"rgba(0,0,0,0.06)"}`,whiteSpace:"nowrap"},children:"Recalculating"}),c.jsx($s,{color:n,direction:O?"up":"down",style:{flexShrink:0}})]})]}),c.jsx("div",{style:{overflow:"hidden",maxHeight:O?"480px":"0px",opacity:O?1:0,transition:"max-height 0.24s ease, opacity 0.18s ease"},children:y?c.jsx("p",{style:{margin:0,color:n,fontSize:"12px",lineHeight:"1.55",fontFamily:e},children:"This path executes directly from the external wallet. Network gas is shown and paid in your wallet. No Spicenet fee is charged."}):B.length>0?c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{display:"grid",gap:"10px"},children:B.map((j,P)=>c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",alignItems:"center",gap:"12px",paddingTop:P===0?0:"10px",borderTop:P===0?"none":`1px solid ${w}`,opacity:f?.74:1,transition:"opacity 120ms ease"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",minWidth:0},children:[c.jsx("span",{style:{fontSize:"12px",color:n,fontFamily:e,fontWeight:500},children:j.label}),c.jsx(ed,{content:j.help,label:`${j.label} info`,textColor:"#f9fafb",backgroundColor:v,borderColor:C,accentColor:o?"#8f96a3":"#6b7280"})]}),c.jsx("span",{style:{fontSize:"12px",color:j.tone==="fee"?E:F,fontFamily:d.font.mono,textAlign:"right",fontWeight:j.label==="Used in TX"?600:500,letterSpacing:"-0.01em"},children:j.value})]},j.label))}),c.jsx("div",{style:{marginTop:"12px",paddingTop:"12px",borderTop:`1px solid ${w}`,fontSize:"11px",color:n,fontFamily:e,lineHeight:"1.45"},children:A?.gasQuoteSource==="estimated"?"Gas quote uses a live estimate.":A?.gasQuoteSource==="configured_fallback"?"Gas quote uses a configured fallback.":"Gas quote is currently zero."})]}):c.jsx("div",{style:{fontSize:"12px",color:h?E:n,fontFamily:e,opacity:h?1:.8,lineHeight:"1.5"},children:h||"Waiting for fee estimate..."})})]})},$a=p.memo(bm);function Is(e){const t=S.normalizeNativeTokenAddress(e.address);if(e.isNative||S.isNativeToken(t))return!1;const n=d.getChainConfig(e.chainId)?.supportedTokens?.some(r=>d.addressesEqual(r.address,t)),s=S.getTokenByAddress(t,e.chainId);return!!n&&!!s&&Cr(s)}const pd="spiceflow:pendingDeposit",jo="spiceflow:pendingDepositChanged";function fd(e,t,n){return`${pd}:${e.toLowerCase()}:${t}:${n.toLowerCase()}`}function _a(){try{const e="__spiceflow_storage_test__";return localStorage.setItem(e,"1"),localStorage.removeItem(e),!0}catch{return!1}}function vm(e){if(!_a())return;const t=fd(e.embeddedWalletAddress,e.chainId,e.tokenAddress);try{localStorage.setItem(t,JSON.stringify(e)),window.dispatchEvent(new Event(jo))}catch(n){console.error("[pendingDeposit] Failed to save:",n)}}function md(e){if(!_a())return[];const t=`${pd}:${e.toLowerCase()}:`,n=[],s=Date.now();for(let r=0;r<localStorage.length;r++){const o=localStorage.key(r);if(!(!o||!o.startsWith(t)))try{const i=localStorage.getItem(o);if(!i)continue;const a=JSON.parse(i);if(s-a.timestamp>6048e5){localStorage.removeItem(o);continue}n.push(a)}catch{localStorage.removeItem(o)}}return n}function Do(e,t,n){if(!_a())return;const s=fd(e,t,n);localStorage.removeItem(s),window.dispatchEvent(new Event(jo))}function ei({escrowAddress:e,tokenAddress:t,isNative:n,amount:s,gasFeeAmount:r}){const o=(i,a)=>n?{to:i,value:a,data:"0x"}:{to:t,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"transfer",args:[i,a]})};return[o(e,s),...r>0n?[o(S.SPICE_GAS_FEE_RECIPIENT,r)]:[]]}function Cm({sourceChainId:e,selectedAsset:t,destinationChainId:n,destinationTokenAddress:s,isCrossDenomination:r,convertedUsdAmount:o}){const i=S.normalizeNativeTokenAddress(t.asset.address),a=s;let l,u;if(a&&n)if(l=d.CHAIN_CONFIGS[n]?.supportedTokens?.find(m=>d.addressesEqual(m.address,a))?.decimals??t.asset.decimals,r){if(!o)throw new Error("Destination amount is still being calculated. Please retry in a moment.");u=o}else{const m=N.parseUnits(t.amount,t.asset.decimals);u=S.convertAmountBetweenDecimals(m,t.asset.decimals,l)}return{sourceChainId:e,depositTokenAddress:i,depositAmount:t.amount,depositTokenDecimals:t.asset.decimals,destinationChainId:n,destinationTokenAddress:a,destinationAmount:u,destinationTokenDecimals:l}}async function km(e,t){if(!e)return[];if(Array.isArray(e))return e;const n=e;return e.length>=2?n(t.depositAmount,t.depositTokenAddress):n(t)}function hd(e,t){return!!e&&e.quotedAmount===t.amount&&e.chainId===t.chainId&&d.addressesEqual(e.token,t.token)}async function No(e,t){let n;try{n=await Pa(e,{recipient:t.recipient,tokenAddr:t.tokenAddr,isNative:t.isNative,amount:t.amount})}catch(i){throw Da(i)||d.isUserRejection(i)?i:new d.SpiceflowError("SUBMISSION_UNKNOWN","The wallet transfer outcome is unknown. Close this deposit and check your activity and balances before continuing.",{submissionStatus:"unknown",cause:i})}t.afterSend?.(n);const s=d.getClientForChain(t.chainId),{receipt:r,hash:o}=await mo({client:s,hash:n,call:Eo(t.recipient,t.tokenAddr,t.isNative,t.amount),confirmations:2});if(r.status!=="success")throw r.status==="reverted"&&r.transactionHash?.toLowerCase()===o.toLowerCase()&&t.afterRevert?.(),new Error(t.failureMessage);return t.settle&&await s.getBlockNumber()-r.blockNumber<2n&&await qn(3e3),o}async function Im(e){const t=e.selectedDepositAssets.filter(o=>o.asset&&o.amount&&parseFloat(o.amount)>0);if(t.length===0){console.error("[DepositModal] No valid assets for deposit"),e.setError("Please select an asset and enter an amount");return}const n=t[0];if(!e.escrowOnly&&!e.sourceAddress){e.setError("External wallet not connected. Please connect your wallet in the previous step.");return}if(!e.isNon7702){if(!e.address||!e.embeddedWalletAddress){e.setError("Couldn't find your account wallet. Try reconnecting.");return}if(!e.isReady||!e.isAuthenticated){e.setError("Sign in to continue.");return}}if(e.zeroCreditError){e.setError(e.zeroCreditError);return}if(e.depositBalanceError){e.setError(e.depositBalanceError);return}if(e.isNon7702&&e.sponsorGas&&e.nativeChainId&&n.asset.chainId!==e.nativeChainId&&e.destinationTokenAddress){e.setError("Gas sponsorship is not supported for this deposit route. Disable sponsorGas to continue.");return}e.setIsExecuting(!0),e.setError(null);let s=!1,r=!1;try{const o=e.escrowOnly||t.some(({asset:h})=>Is(h));if(!e.isNon7702&&e.mode==="7702"&&o){const h=d.relayerService.getBaseUrl(),y=new d.RelayerService;y.setBaseUrl(h);const g=AbortSignal.timeout(1e4),x=()=>{if(e.validateCurrentSession?.(),d.relayerService.getBaseUrl()!==h)throw new Error("The service changed. Review the deposit again.")};x();const w=async C=>{try{return await C}catch(E){throw x(),new d.SpiceflowError("RELAYER_STATUS_ERROR","Deposit status is unavailable. Try again before adding cash.",{...E instanceof d.SpiceflowError?E.context:{},cause:E})}},v=await w(y.supportsAutomaticContinuation({signal:g}));if(x(),v){const C=await w(y.getWalletActions(e.address,{pendingOnly:!0,signal:g}));x();let E=0;for(const k of C)for(const[F]of k.intents.entries()){if(E++>=4)throw new Error("A previous transaction still needs verification. Check your activity before adding cash.");const O=await w(y.getIntentRecoveryStatus(k.actionId,F,{signal:g}));if(x(),O==="unresolved")throw new Error("A previous transaction is still pending. Check your activity before adding cash.")}}}e.validateCurrentSession?.();const i=n.asset.chainId,a=S.getEscrowContractAddress(i),l=N.parseUnits(n.amount,n.asset.decimals),u=t.length===1&&hd(e.effectiveDepositFee,{amount:l,token:S.normalizeNativeTokenAddress(n.asset.address),chainId:i}),m=!e.isNon7702&&!e.escrowOnly&&!Is(n.asset);if(!e.isNon7702&&t.length===1&&!m&&!u)throw new Error("Fee quote is out of date. Please wait for it to refresh.");if(u&&!e.isNon7702&&!m){const{fee:h,net:y}=e.effectiveDepositFee;if(h>=l||y<=0n)throw new Error("This deposit amount is too small to cover the network fee. Your funds remain in your wallet.");if(y+h!==l)throw new Error("Fee quote is out of date. Please wait for it to refresh.")}let f=e.externalWalletClient;if(!e.escrowOnly){if(e.validateCurrentSession?.(),!f)throw new Error("External wallet not connected");if(e.externalProvider){const h=await Na({provider:e.externalProvider,account:e.sourceAddress,chainId:i});h.viemChain&&(f=h.extWc),e.validateCurrentSession?.()}}if(e.isNon7702){if(!f)throw new Error("External wallet not connected");if(!e.sourceAddress)throw new Error("External wallet address not available");if(e.nativeChainId&&i===e.nativeChainId){const h=d.getChainConfig(i),y=t.map(x=>`${x.amount} ${x.asset.symbol}`).join(", ");e.setConfirmationData({network:h?.displayName||`Chain ${i}`,amount:y,symbol:"",chainId:i}),e.setShowConfirmation(!0);let g=null;e.setDirectDepositStatus("processing"),e.setDirectDepositChainId(i);for(const x of t){const w=N.parseUnits(x.amount,x.asset.decimals),v=S.normalizeNativeTokenAddress(x.asset.address),C=x.asset.isNative||S.isNativeToken(v),E=await No(f,{chainId:i,recipient:a,tokenAddr:v,isNative:C,amount:w,failureMessage:`Escrow deposit failed for ${x.asset.symbol}`,afterSend:()=>{r=!0}});g=E,e.setDirectDepositTxHash(E)}if(t[0]?.amount){const x=t[0].amount;if(e.onDepositExecute){e.setPostDepositStatus("executing");try{await e.onDepositExecute(x),e.setPostDepositStatus("success")}catch(v){console.error("ctx.onDepositExecute failed:",v),e.setPostDepositStatus("error"),e.setPostDepositError(v?.message||"Post-deposit instruction failed")}}else e.setPostDepositStatus("success");e.setDirectDepositStatus("success"),e.setPostDepositAmount(x),e.setPostDepositSuccess(!0);const w={type:"deposit",status:"success",amount:x,asset:t[0].asset.symbol,sourceChain:h?.displayName||`Chain ${i}`,txHash:g??void 0};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:w})),e.onDepositSuccess?.(w)}e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(t[0].asset)}else{const h=e.destinationChainId||e.nativeChainId;if(!h)throw new Error("Destination chain ID is required for non-7702 mode. Either pass ctx.destinationChainId to <SpiceDeposit> or set ctx.nativeChainId on <SpiceFlowProvider>.");const y=a,g=[];let x=null;for(const w of t){const v=N.parseUnits(w.amount,w.asset.decimals),C=S.normalizeNativeTokenAddress(w.asset.address),E=w.asset.isNative||S.isNativeToken(C),k=await No(f,{chainId:i,recipient:y,tokenAddr:C,isNative:E,amount:v,failureMessage:`Transfer failed for ${w.asset.symbol}`,afterSend:()=>{r=!0},settle:!0});x||(x=k),e.depositDataRef.current||(e.depositDataRef.current=[]),e.depositDataRef.current.push({txHash:k,sender:e.sourceAddress,tokenAddress:C,chainId:i,amount:v.toString(),user:e.spiceBalanceUser}),g.push({tokenAddress:C,tokenAmount:v.toString(),sender:e.sourceAddress,receiver:y})}if(!x)throw new Error("No transaction hash generated");if(!e.destinationTokenAddress){const w={type:"deposit",status:"success",amount:t[0]?.amount,asset:t[0]?.asset?.symbol,sourceChain:d.getChainName(i),txHash:x};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:w})),e.onDepositSuccess?.(w),e.depositDataRef.current=null,e.bridgedAmountRef.current=t[0]?.amount||null,e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(t[0].asset),e.setShowConfirmation(!1);return}if(e.mode==="ondemand"){const w=S.getChainMeta(i)?.delegateContract;if(!w)throw new Error(`Unsupported chain ID: ${i}`);const v={to:w,value:BigInt(0),data:"0x"},C=await d.getTokenDecimals(h,e.destinationTokenAddress);let E=BigInt(0);for(const q of g){const j=BigInt(q.tokenAmount),P=S.normalizeNativeTokenAddress(q.tokenAddress),D=t.find(L=>{const T=S.normalizeNativeTokenAddress(L.asset.address);return d.addressesEqual(T,P)}),M=D?D.asset.decimals:await d.getTokenDecimals(i,S.ZERO_ADDRESS);E+=S.convertAmountBetweenDecimals(j,M,C)}e.isCrossDenomination&&e.convertedUsdAmount&&(E=e.convertedUsdAmount);const k={chainId:i,tokenTransfers:g.map(q=>({from:q.sender,to:q.receiver,token:q.tokenAddress,amount:BigInt(q.tokenAmount)})),call:v},F=e.isCrossDenomination&&e.convertedUsdAmount?[{from:e.sourceAddress,to:a,token:S.normalizeNativeTokenAddress(t[0].asset.address),amount:N.parseUnits(t[0].amount,t[0].asset.decimals)}]:[],O={chainId:h,tokenTransfers:[...F,{from:"escrow",to:e.sourceAddress,token:e.destinationTokenAddress,amount:E}],call:{to:e.destinationTokenAddress,value:BigInt(0),data:"0x"}},I={mode:"non-7702:on-demand",chainBatches:[k,O]},b={user:e.sourceAddress,intents:[I]},A=await d.relayerService.createAction(b),R=A.actionId,B=A.intentIds[0];if(!x)throw new Error("No transaction hash available");e.startStatusPolling(B,d.createInitialSteps([{chainId:i,calls:[v]},{chainId:h,calls:[O.call]}],q=>d.getChainName(q))),await d.relayerService.executeStep(R,0,0,{action:"execute",hash:x}),t[0]?.amount&&(e.bridgedAmountRef.current=t[0].amount),e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(t[0].asset),e.setShowConfirmation(!1)}else throw new Error("Presign mode not yet fully supported for cross-chain deposits")}}else{const h=[],y=[];let g=0,x;const w=u&&e.effectiveDepositFee?N.formatUnits(e.effectiveDepositFee.net,n.asset.decimals):n?.amount;for(const j of t){const P=N.parseUnits(j.amount,j.asset.decimals),D=u&&j===n,M=D?e.effectiveDepositFee.fee:0n,L=D?e.effectiveDepositFee.net:P,T=S.normalizeNativeTokenAddress(j.asset.address),H=j.asset.isNative||S.isNativeToken(T);if(e.escrowOnly&&y.push({chainId:i,token:T,amount:L+M}),!e.escrowOnly&&!Is(j.asset)){e.validateCurrentSession?.(),e.setDirectDepositStatus("processing"),e.setDirectDepositChainId(i);const V=await No(f,{chainId:i,recipient:e.address,tokenAddr:T,isNative:H,amount:P,failureMessage:`Transfer to embedded wallet failed for ${j.asset.symbol}`,afterSend:()=>{r=!0}});g+=1,j===n&&(x=V);continue}if(!e.escrowOnly){e.validateCurrentSession?.();let V;await No(f,{chainId:i,recipient:e.address,tokenAddr:T,isNative:H,amount:P,failureMessage:`Transfer to embedded wallet failed for ${j.asset.symbol}`,afterSend:()=>{r=!0,V={chainId:i,tokenAddress:S.normalizeNativeTokenAddress(j.asset.address),tokenSymbol:j.asset.symbol,tokenDecimals:j.asset.decimals,amount:j.amount,rawAmount:P.toString(),embeddedWalletAddress:e.address,externalWalletAddress:e.sourceAddress,timestamp:Date.now(),isNative:H},vm(V)},afterRevert:()=>{const te=V;te&&md(e.address).some(Z=>Object.entries(te).every(([K,Y])=>Z[K]===Y))&&Do(e.address,i,T)},settle:!0})}h.push(...ei({escrowAddress:a,tokenAddress:T,isNative:H,amount:L,gasFeeAmount:M}))}if(h.length===0){e.setDirectDepositTxHash(x??null),e.setDirectDepositStatus("success");const j={type:"deposit",status:"success",amount:n.amount,asset:n.asset.symbol,sourceChain:d.getChainName(i),txHash:x};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:j})),e.onDepositSuccess?.(j),e.refreshAssets(),e.onDepositSelect&&e.onDepositSelect(n.asset);return}g>0&&e.setDirectDepositStatus("idle");const v=t.find(j=>e.escrowOnly||Is(j.asset))??n,C=await d.getClientForChain(i).getBlockNumber(),E=h.map(j=>({...j,to:N.getAddress(j.to)})),k={chainId:i,recentBlock:C,calls:E,tokenTransfers:[]},F=Cm({sourceChainId:i,selectedAsset:v===n&&w?{...n,amount:w}:v,destinationChainId:e.destinationChainId,destinationTokenAddress:e.destinationTokenAddress,isCrossDenomination:e.isCrossDenomination,convertedUsdAmount:e.convertedUsdAmount}),O=await km(e.depositBatches,F),I=[k,...O];if(!e.address)throw new Error("Address not available");const b=[];if(e.isCrossDenomination&&e.convertedUsdAmount&&e.destinationTokenAddress){const j=e.selectedDepositAssets[0]?.asset;if(j){const P=N.parseUnits(e.selectedDepositAssets[0].amount,j.decimals);b.push({from:e.address,to:a,token:S.normalizeNativeTokenAddress(j.address),amount:P}),b.push({from:"escrow",to:e.address,token:e.destinationTokenAddress,amount:e.convertedUsdAmount})}}b.length>0&&I[1]&&(I[1].tokenTransfers=b);const A=d.createInitialSteps(I,j=>d.getChainName(j));let R=!1;e.validateCurrentSession?.();const B=await e.execution.execute(I,S.ZERO_ADDRESS,0n,j=>{if(j.intentId&&!R){R=!0;for(const P of t)Do(e.address,i,S.normalizeNativeTokenAddress(P.asset.address));e.startStatusPolling(j.intentId,A)}},void 0,{userOverride:e.address,useCustomTransfers:!0,skipPreSubmitFeeEstimate:!0,skipUserFundingPreflight:!0,...e.escrowOnly?{walletFundingRequirements:y}:{},...e.validateCurrentSession?{validateBeforeSubmit:e.validateCurrentSession}:{}});if(e.refreshAssets(),e.onDepositExecute&&v.amount)try{e.setPostDepositStatus("executing"),await e.onDepositExecute(w||v.amount),e.setPostDepositStatus("success"),e.setPostDepositAmount(w||v.amount),e.setPostDepositSuccess(!0)}catch(j){console.error("ctx.onDepositExecute failed (7702):",j),e.setPostDepositStatus("error"),e.setPostDepositError(j?.message||"Post-deposit instruction failed");return}const q={type:"deposit",status:"success",amount:v===n&&w||v.amount,asset:v.asset.symbol,sourceChain:d.getChainName(i),txHash:/^0x[0-9a-f]{64}$/i.test(B??"")?B:void 0};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:q})),e.onDepositSuccess?.(q),e.onDepositSelect&&e.onDepositSelect(v.asset)}}catch(o){if(e.isCurrent&&!e.isCurrent())return;s=!0,console.error("[DepositModal] executeDeposit CAUGHT ERROR:",o),console.error("[DepositModal] Error details:",{message:o?.message,code:o?.code,name:o?.name,stack:o?.stack?.slice(0,500)});const i=o instanceof d.SpiceflowError&&o.context.submissionStatus==="unknown";(r||i)&&(e.setRetryBlocked?.(!0),e.refreshAssets());let a=o instanceof d.SpiceflowError&&o.context.submissionStatus==="rejected"&&(o.context.httpStatus===401||o.context.httpStatus===403)?"This app's deposit configuration was rejected. Contact the app's support team.":d.sanitizeError(o,"Deposit failed");r&&(a+=" A wallet transfer was already submitted. Close this deposit and check your activity and balances before continuing."),e.setError(d.sanitizeError(o instanceof d.SpiceflowError?new d.SpiceflowError(o.code,a,o.context):new Error(a),"Deposit failed")),i||e.clearStatus()}finally{if(e.isCurrent&&!e.isCurrent())return;e.setIsExecuting(!1),s&&e.setDirectDepositStatus("idle"),s||!e.getCurrentIntentStatus()&&e.getCurrentPostDepositStatus()!=="idle"||e.setShowConfirmation(!1)}}async function ti(e){const{address:t,depositQuote:n}=e,{asset:s,amount:r,token:o,chainId:i}=n;let a=r>1n?1n:0n;const l=e.requireSimulation;for(let u=0;u<5;u++){if(l&&a>=r)throw new Error("Cash amount does not cover the order funding fee");const m=ei({escrowAddress:S.getEscrowContractAddress(i),tokenAddress:S.normalizeNativeTokenAddress(o),amount:r-a,gasFeeAmount:a,isNative:s.isNative===!0}),f={chainId:i,tokenTransfers:[],calls:m},h=await d.relayerService.estimateBatchGas({user:t,outputToken:o,chainBatches:[{...f,hash:S.hashChainBatches([f])[0].hash}],signal:e.signal,requireSimulation:e.requireSimulation});if(e.requireSimulation&&(h.gasQuoteSource!=="estimated"||h.simulationVerified!==!0||h.gasFee<0n))throw new Error("A verified deposit fee quote is unavailable");if(l&&h.gasFee>a){a=h.gasFee;continue}const y=l?a:h.gasFee;if(y>=r)throw new Error("This deposit amount is too small to cover the network fee. Your funds remain in your wallet.");const g=r-y;return{fee:y,net:g,quotedAmount:r,token:o,chainId:i}}throw new Error("Order funding fees did not converge. Prepare the order again")}const Sm=({selectedDepositAssets:e,depositAssets:t,secondAssetOptions:n,loadingAssets:s,allowSecondAsset:r,theme:o,styles:i,dark:a,dk:l,onSelect:u,onAmountChange:m,onAdd:f,onRemove:h,onViewAllAssets:y})=>c.jsxs(c.Fragment,{children:[e.map((g,x)=>{const w=e.length===1?"Deposit":`Asset ${x+1}`;return c.jsxs("div",{style:{marginBottom:o.spacing.md,position:"relative"},children:[c.jsx(or,{assets:x===0?t:n,selectedAsset:g||void 0,onAssetSelect:v=>u(v,x),onAmountChange:v=>m(v,x),loading:s,label:w,showBalance:!0,theme:o,styles:i,allowSecondAsset:r&&x===0,onAddAsset:f,canAddAsset:e.length===1&&!!e[0]?.asset,onViewAllAssets:x===0?y:void 0}),x===1&&c.jsx("button",{onClick:()=>h(x),style:{position:"absolute",top:"-2px",right:"-2px",background:a?`${l.cardBg}ee`:"rgba(255, 255, 255, 0.9)",border:`1px solid ${l.cardBorder}`,borderRadius:"50%",cursor:"pointer",color:o.colors.textMuted,fontSize:"16px",padding:"2px",width:"22px",height:"22px",display:"flex",alignItems:"center",justifyContent:"center",transition:d.transition.interactive,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},onMouseEnter:v=>{v.currentTarget.style.color=a?l.errorText:"#ef4444",v.currentTarget.style.background=a?l.cardBg:"#fff",v.currentTarget.style.borderColor=a?l.errorBorder:"#fecaca"},onMouseLeave:v=>{v.currentTarget.style.color=o.colors.textMuted,v.currentTarget.style.background=a?`${l.cardBg}ee`:"rgba(255, 255, 255, 0.9)",v.currentTarget.style.borderColor=a?l.cardBorder:"#e5e7eb"},title:"Remove asset",children:"\xD7"})]},`asset-${x}`)}),e.length===0&&c.jsx("div",{style:{marginBottom:o.spacing.md},children:c.jsx(or,{assets:t,selectedAsset:void 0,onAssetSelect:g=>u(g,0),onAmountChange:g=>m(g,0),loading:s,label:"Deposit",showBalance:!0,theme:o,styles:i,allowSecondAsset:r,onAddAsset:f,canAddAsset:!1},"initial-selector")})]}),Am=p.memo(Sm),ni=({onClick:e,label:t="Add Funds",color:n,fontFamily:s,style:r})=>{const[o,i]=p.useState(!1);return c.jsxs("button",{type:"button",onClick:e,"data-spiceflow-focus":!0,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"inline-flex",alignItems:"center",gap:"4px",color:n,fontSize:"12px",fontWeight:500,fontFamily:s,textDecoration:"underline",textUnderlineOffset:"2px",whiteSpace:"nowrap",opacity:o?.75:1,transition:"opacity 150ms ease",...r},children:[t,c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[c.jsx("circle",{cx:"6",cy:"6",r:"5"}),c.jsx("path",{d:"M6 4v4M4 6h4",strokeLinecap:"round"})]})]})},Em="This deposit didn't confirm in time. It may still have gone through, so check the explorer and refresh your balance before retrying.";function Fm(e){return e?.overallStatus!=="failed"?{isFailed:!1,failureMessage:null}:{isFailed:!0,failureMessage:e.steps?.find(t=>t.status==="failed"&&!!t.error)?.error||Em}}const Mo=c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{flexShrink:0},children:[c.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"#10b981"}),c.jsx("path",{d:"M6 10l3 3 5-6",stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Tm=({isOpen:e,onClose:t,onConfirm:n,data:s,isExecuting:r=!1,retryBlocked:o=!1,directDepositStatus:i="idle",error:a=null,theme:l,styles:u,intentStatus:m,postDepositStatus:f="idle",hasPostDepositInstruction:h=!1})=>{const{dark:y,dk:g,theme:x}=d.useSpiceBrand(u),[w,v]=p.useState(!1),[C,E]=p.useState(!0);p.useEffect(()=>{e||v(!1)},[e]);const k=()=>{v(!0),setTimeout(()=>{t()},300)},F=()=>{E(!C)};if(!e||!s)return null;const O=m?.overallStatus==="processing",I=m?.overallStatus==="success"||i==="success",b=!!m,{isFailed:A,failureMessage:R}=Fm(m),B=!b&&h,q=B&&f==="executing",j=B&&f==="success",P=I&&h&&(f==="idle"||f==="executing")||q,D=I&&(!h||f==="success"||f==="error")||j||B&&f==="error",M=y?g.cardBg:"#ffffff",L=y?"0 -4px 20px rgba(0, 0, 0, 0.4)":"0 -4px 20px rgba(0, 0, 0, 0.15)",T=g.textSecondary,H=y?g.textPrimary:"#1f2937",V=y?g.textPrimary:"#1f2937",te=Y=>c.jsx("div",{style:{marginBottom:l.spacing.md,padding:l.spacing.md,backgroundColor:u?.errorMessage?.backgroundColor||(l.mode==="light"?"#fef2f2":`${l.colors.error}20`),border:`1px solid ${u?.errorMessage?.borderColor||(l.mode==="light"?"#fecaca":l.colors.error)}`,borderRadius:u?.errorMessage?.borderRadius||l.borderRadius.md},children:c.jsx("p",{style:{color:u?.errorMessage?.color||l.colors.error,fontSize:u?.errorMessage?.fontSize||l.typography.fontSize.sm,margin:0,fontFamily:u?.errorMessage?.fontFamily||u?.fontFamily||l.typography.fontFamily},children:Y})}),Z={fontSize:l.typography.fontSize.sm,fontWeight:500,color:T,fontFamily:d.font.mono,letterSpacing:"0.5px"},K=(Y,J,we=H)=>c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{style:Z,children:Y}),c.jsx("span",{style:{fontSize:l.typography.fontSize.sm,fontWeight:500,color:we,fontFamily:d.font.mono},children:J})]});return c.jsxs("div",{style:{position:I||j?"relative":"absolute",bottom:0,left:0,right:0,zIndex:10,animation:w?"slideDown 0.3s ease-in":"slideUp 0.3s ease-out",pointerEvents:"auto"},children:[c.jsxs("div",{style:{backgroundColor:M,borderRadius:"0",width:"100%",maxWidth:"522px",margin:"0 auto",padding:"18px 24px",boxShadow:L},children:[c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:l.spacing.md},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},onClick:F,children:[c.jsx("span",{style:{fontSize:"13px",fontWeight:l.typography.fontWeight.medium,color:T,fontFamily:u?.fontFamily||l.typography.fontFamily},children:"Transaction Details"}),c.jsx($s,{color:T,direction:C?"up":"down"})]}),!I&&!j&&c.jsx("button",{onClick:Y=>{Y.stopPropagation(),t()},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:T,transition:"color 0.2s ease"},onMouseEnter:Y=>{Y.currentTarget.style.color=V},onMouseLeave:Y=>{Y.currentTarget.style.color=T},children:c.jsx(Rr,{size:16})})]}),c.jsxs("div",{style:{marginBottom:l.spacing.lg,display:"flex",flexDirection:"column",gap:l.spacing.md,overflow:"hidden",maxHeight:C?"200px":"0px",opacity:C?1:0,transition:"max-height 0.3s ease, opacity 0.3s ease"},children:[K("NETWORK",s.network),K("DEPOSITED AMOUNT",s.amount,l.colors.success),s.creditedAmount&&K("CREDITED AMOUNT",s.creditedAmount),s.spicenetFee&&K("SPICENET FEE",s.spicenetFee),s.networkFee&&K("EST. NETWORK FEE",s.networkFee)]})]}),a&&!b&&te(a),A&&R&&te(R),c.jsx(d.Button,{onClick:D||A||o?k:n,variant:"outline",fullWidth:!0,disabled:r||O||P||q,styles:u,theme:x,children:r||O||q||P?"PROCESSING...":D?"CONTINUE \u2192":A||o?"CLOSE":"CONFIRM DEPOSIT"}),D&&f!=="error"&&c.jsx("p",{style:{marginTop:l.spacing.md,marginBottom:0,fontSize:"14px",color:T,textAlign:"center",fontFamily:u?.fontFamily||l.typography.fontFamily},children:"Your funds are now available in your Account"}),c.jsx("div",{style:{marginTop:l.spacing.md,display:"flex",justifyContent:"center",alignItems:"center"},children:c.jsx("img",{src:_c,alt:"Powered by SpiceNet",style:{height:"auto",width:"130px",opacity:1,filter:y?"brightness(0) invert(1) opacity(0.7)":"none"}})})]}),c.jsx("style",{children:`
|
|
22
22
|
@keyframes slideUp {
|
|
23
23
|
from {
|
|
24
24
|
transform: translateY(100%);
|
|
@@ -35,7 +35,7 @@ Order: ${e}`}function Ia(e){const t=e.intents[0];if(e.intents.length!==1||t.mode
|
|
|
35
35
|
transform: translateY(100%);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`})]})},
|
|
38
|
+
`})]})},Rm=({intentStatus:e,postDepositSuccess:t=!1,postDepositAmount:n=null,postDepositStatus:s="idle",depositActionLabel:r="Post-Deposit Instruction",sourceChainName:o="Source Chain",directDepositStatus:i="idle",directDepositTxHash:a=null,directDepositChainId:l=null,styles:u})=>{const{dark:m,dk:f}=d.useSpiceBrand(u),[h,y]=p.useState([]),g=p.useRef(null),x=m?f.cardBg:"#ffffff",w=m?f.textPrimary:"#374151",v=m?`${f.cardBorder}`:"rgba(255, 255, 255, 0.2)",C=f.textSecondary,E=m?f.successBg||"#064e3b":"#d1fae5",k=m?f.successText||"#6ee7b7":"#065f46",F=m?f.successBorder||"#065f4633":"#75FFD036",O=m?f.errorBg||"#7f1d1d":"#fecaca",I=m?f.errorText||"#fca5a5":"#991b1b",b=m?f.errorBorder||"#991b1b33":"#FCA5A536",A=e?.overallStatus==="processing",R=e?.overallStatus==="success",B=(R||i!=="idle")&&s!=="idle",q=r;return p.useEffect(()=>(s!=="error"&&(i==="success"&&!A&&!R||t&&!A)&&(g.current=setTimeout(()=>{y([])},6e3)),()=>{g.current&&clearTimeout(g.current)}),[i,t,s,A,R]),p.useEffect(()=>{const j=[];if(i==="processing"&&j.push({id:"direct-processing",type:"direct-processing",content:"PROCESSING DEPOSIT...",borderColor:v,backgroundColor:x,textColor:w,icon:c.jsx(d.Spinner,{size:20,borderWidth:3,color:C})}),i==="success"){const P=a&&l?d.getExplorerUrl(l,a):void 0;j.push({id:"direct-success",type:"direct-success",content:"DEPOSIT CONFIRMED",borderColor:F,backgroundColor:E,textColor:k,explorerUrl:P!=="#"?P:void 0,icon:Mo})}if(A&&j.push({id:"processing",type:"processing",content:"VERIFYING TRANSACTION SIGNATURE",borderColor:v,backgroundColor:x,textColor:w,icon:c.jsx(d.Spinner,{size:20,borderWidth:3,color:C})}),R&&(j.push({id:"submitted",type:"submitted",content:"SUBMITTED TRANSACTION TO BLOCKCHAIN",borderColor:F,backgroundColor:E,textColor:k,icon:Mo}),j.push({id:"deposit-success",type:"deposit-success",content:`DEPOSIT TO ${o.toUpperCase()} SUCCESSFUL`,borderColor:F,backgroundColor:E,textColor:k,icon:Mo})),B){const P=s==="success"?F:s==="error"?b:v,D=s==="success"?E:s==="error"?O:x,M=s==="success"?k:s==="error"?I:w;let L="";s==="executing"?L=`EXECUTING ${q.toUpperCase()}...`:s==="success"?L=`${q.toUpperCase()} CONFIRMED`:s==="error"&&(L=`${q.toUpperCase()} FAILED`);let T;s==="executing"?T=c.jsx(d.Spinner,{size:20,borderWidth:3,color:C}):s==="success"?T=c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{flexShrink:0},children:[c.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"#10b981"}),c.jsx("path",{d:"M6 10l3 3 5-6",stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):s==="error"&&(T=c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{flexShrink:0},children:[c.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"#ef4444"}),c.jsx("path",{d:"M6 6l8 8M14 6l-8 8",stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round"})]})),j.push({id:"post-deposit",type:"post-deposit",content:L,status:s,borderColor:P,backgroundColor:D,textColor:M,icon:T})}t&&n&&s!=="error"&&j.push({id:"post-deposit-success",type:"post-deposit-success",content:`SUCCESSFULLY DEPOSITED ${n}`,borderColor:F,backgroundColor:E,textColor:k,icon:Mo}),y(P=>{const D=new Set(j.map(T=>T.id)),M=[],L=new Set;for(const T of P)if(D.has(T.id)){const H=j.find(V=>V.id===T.id);M.push(H),L.add(T.id)}for(const T of j)L.has(T.id)||M.push(T);if(M.length>3){const T=[],H=[];for(const Z of M)Z.type==="processing"||Z.type==="post-deposit"&&Z.status==="executing"?T.push(Z):H.push(Z);const V=[...T],te=3-V.length;return te>0&&H.length>0&&V.push(...H.slice(-te)),V}return M})},[A,R,B,s,t,n,q,o,i,a,l,m]),h.length===0?null:c.jsxs("div",{style:{position:R||i==="success"?"relative":"absolute",top:R||i==="success"?0:"56px",left:R||i==="success"?0:"24px",right:R||i==="success"?0:"24px",zIndex:100,display:"flex",flexDirection:"column",gap:"8px",pointerEvents:"none"},children:[h.map(j=>c.jsx("div",{style:{borderRadius:"12px",border:`4px solid ${j.borderColor}`,background:"transparent",animation:"fadeInSlide 0.4s ease-out"},children:c.jsxs("div",{style:{backgroundColor:j.backgroundColor,borderRadius:"8px",padding:"14px 16px",display:"flex",alignItems:"center",gap:"12px"},children:[j.icon,c.jsx("span",{style:{fontSize:"13px",fontWeight:"600",color:j.textColor,letterSpacing:"0.3px",fontFamily:d.font.ui,flex:1},children:j.content}),j.explorerUrl&&c.jsx("a",{href:j.explorerUrl,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"12px",fontWeight:"600",color:j.textColor,textDecoration:"underline",whiteSpace:"nowrap",pointerEvents:"auto",opacity:.8},children:"View tx"})]})},j.id)),c.jsx("style",{children:`
|
|
39
39
|
@keyframes fadeInSlide {
|
|
40
40
|
from {
|
|
41
41
|
opacity: 0;
|
|
@@ -46,7 +46,7 @@ Order: ${e}`}function Ia(e){const t=e.intents[0];if(e.intents.length!==1||t.mode
|
|
|
46
46
|
transform: translateY(0);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
`})]})},Rm=p.memo(({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,onDepositSelect:s,depositBatches:r,supportedChains:o,title:i,styles:a,onDepositAssetChange:d,assetInputHook:u,externalWalletAddress:m,onDepositAmountChange:f,allowSecondAsset:h=!1,destinationChainId:y,destinationTokenAddress:g,onDepositExecute:x,depositActionLabel:w,nativeChainId:v,sponsorGas:C=!1,preSelectedAsset:E,escrowOnly:k=!1,escrowTokenAddress:F,escrowAmount:j,escrowTokenDecimals:I,escrowTokenSymbol:b,onSubmit:A,directSubmit:R=!1,onDepositSuccess:B,onDepositError:q,embeddedWalletAddress:O,onViewAllAssets:P})=>{const D=p.useContext(l.SpiceFlowProviderContext),M=D?.mode||"7702",L=D?.allowedTokens,T=!!D?.isWhitelistGateActive,H=!k&&!!D?.isWhitelistConfigured&&D?.isUserWhitelisted!==!0,V=u?.assetAmount||"",{theme:te,dark:Z,appName:K,primaryColor:Y,dk:J}=l.useSpiceBrand(a),ge=l.useWallet(),{isReady:pe,isAuthenticated:we}=ge,{externalWallet:ve}=l.useProviderWallets(),ne=D?.embeddedWalletAddress||O,_=M!="7702",le=_?!!m:pe&&we&&!!ne,W=ne,De=m,Ae=W??De,z=l.useAssetDisplay(),{data:Q}=as.useWalletClient(),[se,ie]=p.useState(Q),X=p.useRef(null),oe=p.useRef(ve);oe.current=ve;const je=ve?.address;p.useEffect(()=>{const re=oe.current;if(!re||!De){X.current=null,ie(Q);return}if(re.address?.toLowerCase()!==De?.toLowerCase()){X.current=null,ie(Q);return}re.getEthereumProvider().then(async Oe=>{X.current=Oe;const Ct=await Oe.request({method:"eth_chainId"}),Ve=parseInt(Ct,16),We=l.getChainConfig(Ve),st=await re.getWalletClient(Ve);ie(We?N.createWalletClient({account:De,chain:We.viemChain,transport:N.custom(Oe)}):st)}).catch(()=>{X.current=null,ie(Q)})},[je,De,Q]);const Me=p.useRef(null),[me,Se]=p.useState([]),{assets:Te,loading:be,refreshAssets:qe}=Er({address:k?W:De||W,supportedChains:o,fetchBalances:Xs,enabled:e,refreshInterval:e?5e3:0}),ye=p.useMemo(()=>Te.filter(re=>re.balance>0n&&Yn(re,"deposit-source",{allowedTokens:L,rpcOverrides:D?.rpcOverrides,liquidityVenues:D?.liquidityVenues,isWhitelistGateActive:T},void 0,void 0,{requiresEscrow:_||k}).eligible).sort((re,Oe)=>Oe.balanceUsd-re.balanceUsd),[Te,L,D?.rpcOverrides,T,_,k]),Ue=p.useMemo(()=>{if(!me[0]?.asset)return[];const re=me[0].asset.chainId;return ye.filter(Oe=>Oe.chainId===re)},[ye,me]),[de,Ye]=p.useState(!1),[pt,tt]=p.useState(!1),$e=JSON.stringify([e,W,De,D?.apiUrl,D?.network]),Ge=p.useRef({key:$e,version:0});Ge.current.key!==$e&&(Ge.current={key:$e,version:Ge.current.version+1}),p.useEffect(()=>{tt(!1),Ye(!1)},[$e]);const[Fe,Ie]=p.useState(null),lt=p.useRef(q);lt.current=q;const _e=p.useCallback(re=>{Ie(re),typeof re=="string"&&re&<.current?.(re,l.getRelayerErrorDetail(re))},[]),[ae,dt]=p.useState("idle"),ut=p.useCallback(re=>{typeof re=="string"&&re&<.current?.(re,l.getRelayerErrorDetail(re))},[]),[Pe,vt]=p.useState(!1),[Tt,Jt]=p.useState(null),[St,dn]=p.useState("idle"),[ot,ze]=p.useState(null),[at,rt]=p.useState(null),[wt,ee]=p.useState(null),[ft,Re]=p.useState(null),[He,et]=p.useState(null),{intentStatus:it,startStatusPolling:Qe,clearStatus:At,execute:mt}=Js(),Mt=it?.overallStatus==="success"||St==="success",ht=p.useCallback((re,Oe)=>{const Ct=l.CHAIN_CONFIGS[Oe];return Ct?Ct.supportedTokens?.find(Ve=>l.addressesEqual(Ve.address,re))?.symbol??null:null},[]),An=p.useMemo(()=>{const re=me[0]?.asset;if(!re||!g||!y)return!1;const Oe=ht(g,y);return gm(re.symbol)&&!!Oe&&wm(Oe)},[me,g,y,ht]);p.useEffect(()=>{me.length>0&&V!==me[0]?.amount&&Se(re=>{if(re.length===0)return re;const Oe=[...re];return Oe[0]={...Oe[0],amount:V||""},Oe})},[V]),p.useEffect(()=>{me.length!==0&&Se(re=>{let Oe=!1;const Ct=re.map(Ve=>{if(!Ve.asset)return Ve;const We=ye.find(st=>st.chainId===Ve.asset.chainId&&l.addressesEqual(st.address,Ve.asset.address));return We?We===Ve.asset||We.balance===Ve.asset.balance?Ve:(Oe=!0,{...Ve,asset:We,amount:Ve.amount}):Ve});return Oe?Ct:re})},[ye,me.length]),p.useEffect(()=>{if(!E||me.length>0||ye.length===0)return;const re=ye.find(Oe=>Oe.chainId===E.chainId&&l.addressesEqual(Oe.address,E.address));re&&(Se([{asset:re,amount:""}]),d?.(re))},[E,ye,me.length]);const un=p.useRef(null);p.useEffect(()=>{if(_&&it?.overallStatus==="success"&&x&&ae==="idle"){const re=un.current,Oe=Me.current;if(re){const Ct=Ge.current.version,Ve=()=>Ge.current.version===Ct;(async()=>{try{dt("executing"),await x(re),Ve()&&(dt("success"),Jt(re),vt(!0));const We=Array.isArray(Oe)?Oe[0]:void 0,st={type:"deposit",status:"success",amount:re,asset:We?.tokenAddress,sourceChain:We?String(We.chainId):void 0,txHash:We?.txHash};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:st})),B?.(st)}catch(We){console.error("onDepositExecute failed:",We),Ve()&&(dt("error"),ut(l.sanitizeError(We,"Post-deposit instruction failed")))}finally{un.current===re&&Me.current===Oe&&(un.current=null,Me.current=null)}})()}}},[it?.overallStatus,_,ae]);const Cn=p.useCallback(()=>{pt||_e(null)},[pt]);p.useEffect(()=>{At(),Ht(!1),Ze(null),dt("idle"),vt(!1),Jt(null),dn("idle"),ze(null),rt(null)},[$e]);const Zn=p.useCallback((re,Oe)=>{Se(Ct=>{const Ve=[...Ct];return Ve[Oe]={asset:re,amount:Ve[Oe]?.amount||""},Ve}),Oe===0&&d?.(re),Cn()},[d,Cn]),gn=p.useCallback(async(re,Oe)=>{if(Se(Ct=>{const Ve=[...Ct];return Ve[Oe]&&(Ve[Oe]={...Ve[Oe],amount:re}),Ve}),Cn(),Oe===0)if(u?.setAssetAmount(re),An&&re&&parseFloat(re)>0)try{const Ct=wt??await hm();wt||ee(Ct);const Ve=me[0]?.asset;if(!Ve)return;const We=N.parseUnits(re,Ve.decimals),st=g?ht(g,y):null,bn=l.CHAIN_CONFIGS[y]?.supportedTokens?.find(Un=>l.addressesEqual(Un.address,g))?.decimals??6,Pn=xm(We,Ve.decimals,bn,Ct);Re(Pn);const on=N.formatUnits(Pn,bn),As=Ct.toLocaleString("en-US",{maximumFractionDigits:0});et(`${re} ${Ve.symbol} \u2248 $${parseFloat(on).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} ${st??"USD"} (rate: $${As}/BTC)`),f?.(on)}catch(Ct){console.error("Failed to fetch BTC/USD price:",Ct),et(null),Re(null),f?.(re)}else et(null),Re(null),f?.(re)},[Cn,u,f,An,wt,me,g,y,ht]),wn=p.useCallback(()=>{me.length<2&&Se(re=>[...re,{asset:null,amount:""}])},[me.length]),$t=p.useCallback(re=>{Se(Oe=>Oe.filter((Ct,Ve)=>Ve!==re)),Cn()},[Cn]),Ft=p.useRef(!1),Pt=p.useRef(!1);p.useEffect(()=>{e||(Ft.current=!1,Pt.current=!1,En(null),sn(null))},[e]);const[Ut,Ht]=p.useState(!1),[Rt,Ze]=p.useState(null),[It,En]=p.useState(null),[en,sn]=p.useState(null),[rn,xn]=p.useState(!1),[Yt,Fn]=p.useState(null),Ke=p.useMemo(()=>{const re=me[0];if(me.length!==1||!re?.asset||!re.amount||parseFloat(re.amount)<=0)return null;try{return{asset:re.asset,amount:N.parseUnits(re.amount,re.asset.decimals),token:S.normalizeNativeTokenAddress(re.asset.address),chainId:re.asset.chainId}}catch{return null}},[me]),yn=!_&&!k&&!!Ke&&!Is(Ke.asset),pn=p.useMemo(()=>Ke?[Ke.chainId,Ke.token.toLowerCase(),Ke.amount.toString(),k?"escrow":"normal"].join("|"):null,[Ke,k]),Xn=p.useCallback(async(re,Oe)=>W?ti({address:W,depositQuote:re,signal:Oe}):null,[W]),kn=p.useCallback(async re=>Ke?Xn(Ke,re):null,[Ke,Xn]),Tn=p.useRef(kn);Tn.current=kn,ca({shouldRun:e&&!_&&!yn&&!!pn&&!Ut&&!de&&!it&&!Mt,deps:[e,_,yn,pn,Ut,de,it,Mt],delayMs:500,backgroundIntervalMs:3e4,onSkip:()=>{En(null),Fn(null),xn(!1)},onCleanup:()=>xn(!1),run:async({isBackground:re,isCurrent:Oe,signal:Ct})=>{re||(Fn(null),xn(!0));try{const Ve=await Tn.current(Ct);Oe()&&En(Ve)}catch(Ve){if(!Oe())return;En(null),Fn(Ve instanceof Error?Ve.message:"Failed to estimate gas fee")}finally{Oe()&&xn(!1)}}}),p.useEffect(()=>{Ut||de||sn(null)},[Ut,de,pn]);const Jn=p.useRef(!1),fe=()=>{if(me.length===0||!me[0]?.asset)return;const re=me.filter(st=>st.asset&&st.amount&&parseFloat(st.amount)>0);if(re.length===0)return;const Oe=re[0],Ct=l.getChainConfig(Oe.asset.chainId),Ve=re.map(st=>{const bn=parseFloat(st.amount);return`${isNaN(bn)?st.amount:bn.toPrecision(6).replace(/\.?0+$/,"")} ${st.asset.symbol}`}).join(", "),We={network:Ct?.displayName||`Chain ${Oe.asset.chainId}`,amount:Ve,symbol:"",chainId:Oe.asset.chainId};if(Vt&&Nt&&_t){sn(Nt);const st=re[0];We.creditedAmount=`${N.formatUnits(Nt.net,st.asset.decimals)} ${Is(st.asset)?z({...st.asset,location:"rollup",_source:"spice",receiptTokenName:"spiceUSDC"}).symbol:st.asset.symbol}`,We.networkFee=`${N.formatUnits(Nt.fee,st.asset.decimals)} ${st.asset.symbol}`}return Ze(We),We},ke=async()=>{!fs||!fe()||(R?await fn():Ht(!0))},Be=p.useRef(it);Be.current=it;const gt=p.useRef(ae);gt.current=ae;const Dt=JSON.stringify([e,W,ne,De,pe,we,M,l.relayerService.getBaseUrl(),T,k,y,g,H,me.map(({asset:re,amount:Oe})=>[re.chainId,re.address,Oe])]),Ee=p.useRef({key:Dt});Ee.current.key!==Dt&&(Ee.current={key:Dt});const Zt=p.useRef(!0),xt=p.useRef(!1);p.useLayoutEffect(()=>(Zt.current=!0,()=>{Zt.current=!1}),[]);const Qt=async()=>{if(xt.current)return;xt.current=!0;const re=Ee.current,Oe=l.relayerService.getBaseUrl();try{fe();const Ct=Ge.current.version,Ve=()=>Ge.current.version===Ct,We=st=>(...bn)=>{Ve()&&st(...bn)};await km({isCurrent:Ve,validateCurrentSession:()=>{if(!e||!Zt.current||Ee.current!==re||l.relayerService.getBaseUrl()!==Oe)throw new Error("The wallet or deposit changed. Review it again before funding.")},selectedDepositAssets:me,escrowOnly:k,sourceAddress:De,isNon7702:_,address:W,embeddedWalletAddress:ne,isReady:pe,isAuthenticated:we,zeroCreditError:Wt,depositBalanceError:qt,externalWalletClient:se,externalProvider:X.current,effectiveDepositFee:Nt,depositBatches:r,destinationChainId:y,destinationTokenAddress:g,isCrossDenomination:An,convertedUsdAmount:ft,mode:M,sponsorGas:C,nativeChainId:v,spiceBalanceUser:Ae,depositDataRef:Me,bridgedAmountRef:un,setIsExecuting:We(Ye),setError:We(_e),setRetryBlocked:We(tt),setConfirmationData:We(Ze),setShowConfirmation:We(Ht),setDirectDepositStatus:We(dn),setDirectDepositChainId:We(rt),setDirectDepositTxHash:We(ze),setPostDepositStatus:We(dt),setPostDepositError:We(ut),setPostDepositAmount:We(Jt),setPostDepositSuccess:We(vt),startStatusPolling:We(Qe),clearStatus:We(At),refreshAssets:qe,onDepositExecute:x,onDepositSelect:s,onDepositSuccess:B,execution:{execute:mt},getCurrentIntentStatus:()=>Be.current,getCurrentPostDepositStatus:()=>gt.current})}finally{xt.current=!1}},fn=async()=>{if(!(Jn.current||de||pt||Mt)){Jn.current=!0;try{A?.(),await Qt()}finally{Jn.current=!1}}},Wt=p.useMemo(()=>{for(const re of me)if(!(!re?.asset||!re.amount||parseFloat(re.amount)<=0))try{const Oe=re.asset.decimals,Ct=N.parseUnits(re.amount,Oe);if(Ct<=0n)continue;const Ve=S.normalizeNativeTokenAddress(re.asset.address),We=S.isNativeToken(Ve)?S.getTokenByAddress(Ve,re.asset.chainId)?.equivalenceGroup:S.getEquivalenceGroup(Ve),st=re.asset.receiptTokenDecimals??(We==="ETH"||We==="ARB"?18:We==="USDC"||We==="SUSD"||We==="WBTC"||We==="CBTC"?6:void 0);if(st===void 0||Oe<=st||S.convertAmountBetweenDecimals(Ct,Oe,st)>0n)continue;return`Amount too small. Minimum deposit for this asset is ${N.formatUnits(10n**BigInt(Oe-st),Oe)} ${re.asset.symbol}.`}catch{continue}return null},[me]),Vt=!_&&!!Ke&&!yn,Nt=en??It,_t=!!Ke&&md(Nt,Ke),qt=p.useMemo(()=>{if(!Ke)return null;if(yn)return Ke.asset.balance>=Ke.amount?null:`Insufficient ${Ke.asset.symbol}. Need ${N.formatUnits(Ke.amount,Ke.asset.decimals)} ${Ke.asset.symbol}.`;if(!Vt||!_t)return null;if(Nt.fee>=Ke.amount||Nt.net<=0n)return"This deposit amount is too small to cover the network fee. Your funds remain in your wallet.";const re=Ke.amount;return Ke.asset.balance>=re?null:`Insufficient ${Ke.asset.symbol}. Need ${N.formatUnits(re,Ke.asset.decimals)} ${Ke.asset.symbol} including gas.`},[Vt,yn,Ke,_t,Nt]),[Rn,mn]=p.useState(!1),nt=me[0]?.asset?.chainId,Gt=Te.find(re=>re.isNative&&re.chainId===nt)?.balance??0n;p.useEffect(()=>{if(!e||!nt||k){mn(!1);return}let re=!1;return(async()=>{try{const Oe=await l.getClientForChain(nt).getGasPrice()*150000n;re||mn(Gt<Oe)}catch{re||mn(!1)}})(),()=>{re=!0}},[e,nt,Gt,k]);const ps=!Vt||_t&&!rn&&!Yt&&!qt,Ss=p.useMemo(()=>{if(!Ke||!Nt||!_t)return null;const re=Ke.amount;return{symbol:Ke.asset.symbol,decimals:Ke.asset.decimals,grossAmount:re,netAmount:Nt.net,totalFee:Nt.fee,gasFee:Nt.fee,spicenetFee:0n,bridgeFee:0n,gasQuoteSource:"estimated"}},[Ke,Nt,_t]),Ls=parseFloat(me[0]?.amount||"")||0,fs=me.length>0&&me[0]?.asset&&me[0]?.amount&&Ls>0&&le&&!de&&!Mt&&!pt&&!Wt&&!qt&&ps&&!H;p.useEffect(()=>{if(!k||!F||!j||Ft.current||!le)return;const re=o[0];if(!re)return;const Oe=l.getAllAssetsForChain(re,[]).find(Ve=>l.addressesEqual(Ve.address,F));let Ct;if(Oe)Ct=Oe;else if(I!==void 0&&b)Ct={address:F,symbol:b,name:b,decimals:I,chainId:re,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,isNative:S.isNativeToken(F)};else{console.warn("[DepositModal] escrowOnly: no matching asset and missing escrowTokenDecimals/escrowTokenSymbol for",F);return}Ft.current=!0,Se([{asset:Ct,amount:j}])},[k,F,j,I,b,le,o]),p.useEffect(()=>{!k||!fs||Pt.current||de||(Pt.current=!0,Qt())},[k,fs,de]);const Vn=Fe||Wt||qt,zs=()=>{if(de)return"Executing Deposit...";if(!le)return"Wallet Not Connected";if(M==="7702"){if(!pe)return"Loading...";if(!we)return"Authentication Required"}return me[0]?.asset?me[0]?.amount?Wt?"AMOUNT TOO SMALL":qt?"INSUFFICIENT BALANCE":Vt&&!ps?Yt?"GAS UNAVAILABLE":"ESTIMATING GAS":"DEPOSIT":"ENTER AMOUNT":"SELECT TOKEN"};return e?c.jsx(Hn,{isOpen:e,onClose:t,closeOnBackdropClick:n,title:i||`Deposit to your ${K} account`,subtitle:c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[c.jsx("img",{src:Ha,alt:"","aria-hidden":"true",style:{width:"13px",height:"13px",flexShrink:0,...Z?{filter:"invert(0.6)"}:{}}}),c.jsx("p",{style:{fontSize:"12px",color:J.textSecondary,margin:"0",lineHeight:"1.4",fontFamily:l.font.ui},children:`Deposit collateral to your ${K} Account from any supported network.`})]}),dark:Z,overlayContent:!Mt&&(Ut||it||ae!=="idle"&&x)?c.jsx("div",{}):void 0,styles:a,theme:te,children:c.jsxs("div",{style:{padding:"24px 24px 5px 24px"},children:[!Mt&&c.jsx(Sm,{selectedDepositAssets:me,depositAssets:ye,secondAssetOptions:Ue,loadingAssets:be,allowSecondAsset:h,theme:te,styles:a,dark:Z,dk:J,onSelect:Zn,onAmountChange:gn,onAdd:wn,onRemove:$t,onViewAllAssets:P}),!Mt&&Vt&&Ke&&c.jsx($a,{fontFamily:a?.fontFamily||te.typography.fontFamily,textPrimary:J.textPrimary,textSecondary:J.textSecondary,cardBg:Z?J.inputBg:"#ffffff",cardBorder:J.cardBorder,resolvedDark:Z,darkCardBorder:J.cardBorder,primaryColor:Y,feePreview:Ss,isLoading:rn||Vt&&!_t,errorText:Yt}),c.jsx(Tm,{intentStatus:it,postDepositSuccess:Pe,postDepositAmount:Tt,postDepositStatus:ae,depositActionLabel:w,sourceChainName:me[0]?.asset?.chainId?l.getChainName(me[0].asset.chainId):"Destination Chain",directDepositStatus:St,directDepositTxHash:ot,directDepositChainId:at,styles:a}),c.jsx(Fm,{isOpen:Ut||!!it||St==="success"||ae!=="idle"&&!!x,onClose:()=>{Ht(!1),it&&At();const re=ae==="success"&&!it,Oe=it?.overallStatus==="success"&&(x?ae==="success"||ae==="error":!0);(re||Oe||St==="success"&&(!x||ae==="success"||ae==="error")||pt)&&t()},onConfirm:fn,data:Rt,isExecuting:de,retryBlocked:pt,error:Fe,theme:te,styles:a,intentStatus:it,directDepositStatus:St,postDepositStatus:ae,hasPostDepositInstruction:!!x}),!Mt&&He&&c.jsxs(cd,{dk:J,dark:Z,borderRadius:te.borderRadius.md,children:["\u26A1 ",He]}),!Mt&&Rn&&c.jsx(cd,{dk:J,dark:Z,borderRadius:te.borderRadius.md,children:"Low native balance in the external wallet. The deposit to spicenet account might fail."}),!Mt&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,marginBottom:0,margin:0,padding:0},children:[Vn?c.jsx("div",{style:{marginBottom:"10px",fontSize:"12px",lineHeight:"1.45",color:J.errorText,fontFamily:a?.fontFamily||te.typography.fontFamily},children:Vn}):null,c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:ke,disabled:!fs||!le||de,theme:te,dark:Z,styles:a,children:zs()})]})]})}):null}),Bm=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,deposits:s,onComplete:r,onCancel:o,onSkip:i,onChangeWallet:a,isProcessing:d,isVerifying:u=!1,onRefresh:m,error:f,styles:h})=>{const{dark:y,dk:g,theme:x}=l.useSpiceBrand(h);if(!e)return null;if(s.length===0)return c.jsx(Hn,{isOpen:e,onClose:t,title:"Your wallet",styles:h,closeOnBackdropClick:n,children:c.jsx("p",{role:"status",style:{padding:"18px 24px",color:g.textSecondary},children:d?"Returning funds\u2026":"Checking your wallet\u2026"})});const w=s[0],v=w.timestamp===0,C=w.verifiedBalance<=0n,E=d||u||C,k=h?.fontFamily||l.font.ui,F=l.font.mono,j=l.getChainName(w.chainId),I=parseFloat(w.amount).toPrecision(6).replace(/\.?0+$/,""),b=N.formatUnits(w.verifiedBalance,w.tokenDecimals);return c.jsx(Hn,{isOpen:e,onClose:t,title:v?"Funds in your wallet":"Incomplete Deposit",styles:h,closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"18px 24px 24px",fontFamily:k},children:[c.jsx("p",{style:{fontSize:"14px",color:g.textSecondary,lineHeight:"1.6",margin:"0 0 18px 0"},children:v?"These funds remain in your wallet. Network fees apply when depositing.":"Your funds reached your wallet, but the deposit didn't finish."}),c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",gap:"14px 18px",marginBottom:"24px",padding:"16px 18px",backgroundColor:y?g.cardBg:"#f8fafc",border:`1px solid ${g.cardBorder}`,borderRadius:y?"14px":"10px",boxShadow:y?"inset 0 1px 0 rgba(255,255,255,0.03)":"0 1px 2px rgba(16,24,40,0.04)"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:g.textSecondary,fontFamily:F,letterSpacing:"0.8px"},children:"NETWORK"}),c.jsx("span",{style:{fontSize:"18px",fontWeight:600,color:g.textPrimary,fontFamily:k,lineHeight:1.2},children:j})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",alignItems:"flex-end",textAlign:"right"},children:[c.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:g.textSecondary,fontFamily:F,letterSpacing:"0.8px"},children:v?"AVAILABLE BALANCE":"DEPOSITED AMOUNT"}),c.jsxs("span",{style:{fontSize:"24px",fontWeight:700,color:g.successText,fontFamily:F,lineHeight:1.1},children:[I," ",w.tokenSymbol]}),c.jsx("span",{style:{fontSize:"12px",color:g.textSecondary,fontWeight:500,fontFamily:k},children:v?"In your wallet":"Sent to embedded wallet"})]})]}),!w.hasFullBalance&&w.verifiedBalance>0n&&c.jsxs("div",{style:{marginBottom:"16px",padding:"8px 12px",backgroundColor:g.warningBg,border:`1px solid ${y?g.warningBorder:"#fcd34d"}`,borderRadius:"8px",fontSize:"13px",color:g.warningText,lineHeight:"1.4"},children:["Partial balance \u2014 only ",parseFloat(b).toFixed(4)," ",w.tokenSymbol," available."]}),(u||C)&&c.jsxs("div",{style:{marginBottom:"16px",color:g.textSecondary},children:[c.jsx("p",{role:"status",children:u?"Checking your wallet\u2026":"Balance unavailable. Try again."}),C&&m&&c.jsx(l.Button,{variant:"ghost",fullWidth:!0,disabled:d||u,onClick:m,theme:x,dark:y,children:"TRY AGAIN"})]}),f&&c.jsx("div",{style:{marginBottom:"16px",padding:"10px 12px",backgroundColor:g.errorBg,border:`1px solid ${y?g.errorBorder:"#fca5a5"}`,borderRadius:"8px",fontSize:"13px",color:y?g.errorText:"#991b1b",lineHeight:"1.4"},children:f}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[c.jsx(l.Button,{variant:"outline",fullWidth:!0,disabled:E,onClick:()=>r(w),theme:x,dark:y,styles:h,children:"CONFIRM DEPOSIT"}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[c.jsx(l.Button,{variant:"ghost",fullWidth:!0,disabled:E,onClick:()=>o(w),theme:x,dark:y,style:{height:"48px",fontSize:"13px",letterSpacing:"0.4px",color:y?g.textPrimary:"#374151",border:`1px solid ${y?g.cardBorder:"#d1d5db"}`,borderRadius:"12px",backgroundColor:y?"rgba(255,255,255,0.02)":"#ffffff"},children:d?"RETURNING...":"RETURN FUNDS"}),c.jsxs("div",{style:{display:"grid",gridTemplateColumns:a?"1fr 1fr":"1fr",gap:"10px"},children:[c.jsx(l.Button,{variant:"ghost",fullWidth:!0,disabled:d,onClick:i,theme:x,dark:y,style:{height:"44px",fontSize:"12px",letterSpacing:"0.4px",color:g.textSecondary,border:`1px solid ${y?g.cardBorder:"#d1d5db"}`,borderRadius:"12px",backgroundColor:"transparent"},children:"START OVER"}),a&&c.jsx(l.Button,{variant:"ghost",fullWidth:!0,disabled:d,onClick:a,theme:x,dark:y,style:{height:"44px",fontSize:"12px",letterSpacing:"0.4px",color:g.textSecondary,border:`1px solid ${y?g.cardBorder:"#d1d5db"}`,borderRadius:"12px",backgroundColor:"transparent"},children:"CHANGE WALLET"})]})]})]}),s.length>1&&c.jsx("p",{style:{fontSize:"12px",color:g.textSecondary,textAlign:"center",marginTop:"14px",marginBottom:0,lineHeight:"1.5"},children:s.some(A=>A.timestamp===0)?`${s.length} balances available. Review one at a time.`:`${s.length} incomplete deposits found. Review one at a time.`})]})})},Om=[{source:"wallet",title:"From Wallet",description:"Deposit crypto you already hold in a connected wallet"},{source:"card",title:"With Card",description:"Buy and deposit using a debit or credit card"},{source:"exchange",title:"From Exchange",description:"Transfer from Coinbase, Binance, or any exchange"}],jm=({isOpen:e,onClose:t,closeOnBackdropClick:n,onSelect:s,styles:r})=>{const{dark:o,dk:i}=l.useSpiceBrand(r),[a,d]=p.useState(null);return c.jsx(Hn,{isOpen:e,onClose:t,title:"Deposit",subtitle:"Choose how you want to add funds",styles:r,dark:o,closeOnBackdropClick:n,children:c.jsx("div",{style:{padding:"0 24px 25px",display:"flex",flexDirection:"column",gap:"12px",marginTop:"20px"},children:Om.map(({source:u,title:m,description:f})=>c.jsxs("button",{onClick:()=>s(u),onMouseEnter:()=>d(u),onMouseLeave:()=>d(null),style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",padding:"14px 16px",borderRadius:"8px",border:`1px solid ${o?i.cardBorder:"#e5e7eb"}`,backgroundColor:a===u?o?i.hoverBg:"#f9fafb":o?i.cardBg:"white",cursor:"pointer",textAlign:"left",transition:l.transition.color},children:[c.jsx("span",{style:{fontSize:"15px",fontWeight:600,fontFamily:l.font.ui,color:o?i.textPrimary:"#111827"},children:m}),c.jsx("span",{style:{fontSize:"13px",fontFamily:l.font.ui,color:o?i.textSecondary:"#6b7280"},children:f})]},u))})})},Dm=({isOpen:e,onClose:t,onBack:n,closeOnBackdropClick:s,source:r,destinationChainId:o,onShowWidget:i,onHideWidget:a,verifying:d,verifyError:u,onRetryVerify:m,funded:f,styles:h})=>{const{dark:y,dk:g,primaryColor:x,theme:w}=l.useSpiceBrand(h),v=l.getChainName(o),C=p.useRef(null),E=p.useRef(i);E.current=i;const k=p.useRef(a);k.current=a;const F=d||!!u||!!f;return p.useEffect(()=>{if(!e)return;const j=C.current;if(j){if(F){k.current();return}return E.current(j,r),()=>k.current()}},[e,r,F]),c.jsx(Hn,{isOpen:e,onClose:t,title:r==="card"?"Deposit with Card":"Deposit from Exchange",styles:h,dark:y,closeOnBackdropClick:s,children:c.jsxs("div",{style:{padding:"0 24px 25px",display:"flex",flexDirection:"column",gap:"12px",marginTop:"12px"},children:[c.jsx("button",{onClick:n,disabled:d,style:{alignSelf:"flex-start",padding:0,border:"none",background:"none",fontSize:"13px",fontFamily:l.font.ui,color:y?g.textSecondary:"#6b7280",cursor:d?"default":"pointer",opacity:d?.5:1},children:"\u2190 Back"}),c.jsxs("div",{style:{position:"relative",width:"100%"},children:[c.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(l.Spinner,{size:28,color:x})}),c.jsx("div",{ref:C,style:{position:"relative",width:"100%",height:"560px"}}),F&&c.jsx("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"16px",padding:"24px",borderRadius:"9px",backgroundColor:y?"rgba(0, 0, 0, 0.82)":"rgba(255, 255, 255, 0.94)"},children:d?c.jsxs(c.Fragment,{children:[c.jsx(l.Spinner,{size:28,color:x}),c.jsxs("p",{style:{margin:0,fontSize:"14px",fontFamily:l.font.ui,color:y?g.textPrimary:"#111827",textAlign:"center"},children:["Confirming your deposit arrived on ",v,"\u2026"]})]}):f?c.jsxs(c.Fragment,{children:[c.jsxs("p",{style:{margin:0,fontSize:"14px",fontFamily:l.font.ui,color:y?g.textPrimary:"#111827",textAlign:"center"},children:[f.amount," ",f.symbol," is in your wallet on"," ",v,"."]}),c.jsx(l.Button,{variant:"outline",onClick:t,theme:w,dark:y,styles:h,children:"DONE"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{style:{margin:0,fontSize:"14px",fontFamily:l.font.ui,color:y?g.textPrimary:"#111827",textAlign:"center"},children:u}),c.jsx(l.Button,{variant:"outline",onClick:m,theme:w,dark:y,styles:h,children:"RETRY"}),c.jsx("button",{onClick:t,style:{padding:0,border:"none",background:"none",fontSize:"13px",fontFamily:l.font.ui,color:y?g.textSecondary:"#6b7280",cursor:"pointer",textDecoration:"underline"},children:"Close \u2014 we'll detect your funds later"})]})})]})]})})},Nm="692fb8af264069ca12a9",ar=42161,Mm=[8453,ar];function Pm(e){const{targetKind:t,appChainId:n}=e;return t!=="external"||n===void 0||!Mm.includes(n)?ar:S.getTokenBySymbol("USDC",n)?n:ar}function Uo(e=ar){return S.getTokenBySymbol("USDC",e)}function Um(e){const t=e?.integratorId??Nm;return{integratorId:t,enabled:e?.enabled===!0&&t!=="",embedFactory:e?.embedFactory}}const Wm=e=>import("@swapper-finance/deposit-sdk").then(t=>new t.SwapperEmbed(e));function qm(e,t,n){return{themeMode:t?"dark":"light",componentStyles:{width:"100%",primaryColor:n,accentColor:n,borderRadius:"9px",...t?{backgroundColor:e.shell,surfaceColor:e.cardBg,surfaceAltColor:e.inputBg,textColor:e.textPrimary,border:`1px solid ${e.cardBorder}`}:{}}}}function hd(e){return e==="card"?["depositWithCash"]:e==="exchange"?["transferCrypto"]:["depositWithCash","transferCrypto"]}function Lm(e){const t=e.destinationChainId??ar,n=Uo(t);if(!n)throw new Error("USDC is not configured for the Swapper destination chain");return{iframeUrl:"https://swapper-deposit-sdk.web.app/",integratorId:e.integratorId,dstChainId:String(t),dstTokenAddr:n.address,depositWalletAddress:e.depositWalletAddress,supportedDepositOptions:hd(e.source),styles:e.styles,actionLabel:"deposit",flexibleHeight:!0,iframeAttributes:{borderRadius:"9px"}}}async function gd(e,t=ar){const n=Uo(t);if(!n)throw new Error("USDC is not configured for the Swapper destination chain");return l.getClientForChain(t).readContract({address:n.address,abi:N.erc20Abi,functionName:"balanceOf",args:[e]})}async function zm(e,t,n){const s=n?.timeoutMs??12e4,r=n?.intervalMs??3e3,o=Date.now()+s;for(;Date.now()<o;){if(n?.signal?.aborted)return null;try{const i=await gd(e,n?.chainId);if(i>t)return i}catch{}await new Promise(i=>setTimeout(i,r))}return null}const Hm=.01,Vm=5*60*1e3;function Qm(e){const t=Number(N.formatUnits(e.verifiedBalance,e.tokenDecimals));return Number.isFinite(t)?t:0}async function Gm(e){const t=wd(e);let n;try{n=await dd(t.map(s=>s.tokenSymbol))}catch{return t}return t.filter(s=>{const r=Qm(s);if(r<=0)return!0;const o=n[s.tokenSymbol.toUpperCase()]??0;return!Number.isFinite(o)||o<=0?!0:r*o>=Hm})}function wd(e){const t=new Map;for(const n of e){const s=`${n.chainId}:${n.tokenAddress.toLowerCase()}`;if(!t.get(s)){const r=n.timestamp===0&&n.verifiedBalance>0n;t.set(s,{...n,amount:r?N.formatUnits(n.verifiedBalance,n.tokenDecimals):n.amount,rawAmount:r?n.verifiedBalance.toString():n.rawAmount,hasFullBalance:r?!0:n.hasFullBalance})}}return Array.from(t.values())}function xd(e,t){const[n,s]=p.useState([]),[r,o]=p.useState(!1),i=p.useRef(t);i.current=t;const a=!!t?.enabled,d=p.useRef(0),u=p.useRef([]),m=t?.chainIds?.join(","),f=t?.discoverWalletBalances??!0,h=p.useRef(0),y=p.useCallback(async({forceDiscovery:g=!1}={})=>{if(!e||i.current?.enabled===!1){s([]),o(!1);return}const x=++h.current,w=()=>x!==h.current;o(!0);try{const v=[],C=fd(e),E=new Set(C.map(b=>`${b.chainId}:${b.tokenAddress.toLowerCase()}`)),k=[...C,...u.current.filter(b=>b.timestamp===0&&!E.has(`${b.chainId}:${b.tokenAddress.toLowerCase()}`))];for(const b of k){if(w())return;if(Is({address:b.tokenAddress,chainId:b.chainId,isNative:b.isNative}))try{const A=l.getClientForChain(b.chainId);let R;if(b.isNative||S.isNativeToken(b.tokenAddress)?R=await Kn.getBalance(A,{address:e}):R=await Kn.readContract(A,{address:N.getAddress(b.tokenAddress),abi:N.erc20Abi,functionName:"balanceOf",args:[e]}),w())return;if(R>0n)v.push({...b,verifiedBalance:R,hasFullBalance:R>=BigInt(b.rawAmount)});else{const B=Date.now()-b.timestamp;b.timestamp!==0&&B>15*60*1e3&&No(e,b.chainId,b.tokenAddress)}}catch(A){if(w())return;console.warn(`[usePendingDeposit] Failed to verify balance for ${b.tokenSymbol} on chain ${b.chainId}:`,A),v.push({...b,verifiedBalance:0n,hasFullBalance:!1})}}if(w())return;const F=i.current,j=Date.now(),I=(F?.discoverWalletBalances??!0)&&(g||j-d.current>=Vm);if(F?.network&&I){d.current=j;const b=F.chainIds??S.getChainIdsByNetwork(F.network),A=new Set(v.map(B=>`${B.chainId}:${B.tokenAddress.toLowerCase()}`)),R=[];for(const B of b){const q=l.getChainConfig(B);if(q?.supportedTokens)for(const O of q.supportedTokens){if(!Is({address:O.address,chainId:B,isNative:!1}))continue;const P=`${B}:${O.address.toLowerCase()}`;A.has(P)||R.push((async()=>{try{const D=l.getClientForChain(B),M=await Kn.readContract(D,{address:N.getAddress(O.address),abi:N.erc20Abi,functionName:"balanceOf",args:[e]});return M>0n?{chainId:B,tokenAddress:O.address,tokenSymbol:O.symbol,tokenDecimals:O.decimals,amount:N.formatUnits(M,O.decimals),rawAmount:M.toString(),embeddedWalletAddress:e,externalWalletAddress:"",timestamp:0,isNative:!1,verifiedBalance:M,hasFullBalance:!0}:null}catch{return null}})())}}if(R.length>0){const B=await Promise.allSettled(R);if(w())return;for(const q of B)q.status==="fulfilled"&&q.value&&v.push(q.value)}}if(!w()){const b=await Gm(v);if(w())return;u.current=wd(v),s(b)}}catch(v){if(console.error("[usePendingDeposit] Verification error:",v),!w()){const C=u.current.map(E=>({...E,verifiedBalance:0n,hasFullBalance:!1}));u.current=C,s(C)}}finally{w()||o(!1)}},[e]);return p.useEffect(()=>{if(u.current=[],d.current=0,s([]),!a){h.current++,o(!1);return}y({forceDiscovery:!0});const g=i.current?.pollIntervalMs??3e4;if(g<=0||!e)return()=>{h.current++};const x=setInterval(()=>{y({forceDiscovery:!1})},g),w=()=>y({forceDiscovery:!0});return window.addEventListener(Do,w),()=>{h.current++,window.removeEventListener(Do,w),clearInterval(x)}},[y,e,a,t?.network,m,f]),{pendingDeposits:n,loading:r,refresh:()=>y({forceDiscovery:!0})}}function Km({enabled:e,integratorId:t,depositWalletAddress:n,destinationChainId:s,brand:r,embedFactory:o,onTransactionSuccess:i,onCloseRequest:a}){const d=p.useRef(null),u=p.useRef(null),m=p.useRef(i);m.current=i;const f=p.useRef(a);f.current=a;const h=p.useRef(r);h.current=r;const y=p.useRef(o);y.current=o;const g=p.useCallback((v,C,E)=>{if(!C.isConnected)return;const k=v.getIframe();k.updateConfig({supportedDepositOptions:hd(E)}),k.sendConfig(),v.showIn(C)},[]);p.useEffect(()=>{if(!e||!n)return;let v=!1;return Promise.resolve().then(()=>{const{dk:C,dark:E,primaryColor:k}=h.current;return(y.current??Wm)(Lm({integratorId:t,depositWalletAddress:n,destinationChainId:s,source:null,styles:qm(C,E,k)}))}).then(C=>{if(v){C.destroy();return}const E=C.getIframe();E.on("transaction_success",F=>m.current(F)),E.on("close_request",()=>f.current()),d.current=C;const k=u.current;k&&g(C,k.placeholder,k.source)}).catch(C=>{console.error("[useSwapperEmbed] Failed to preload Swapper widget:",C)}),()=>{v=!0,u.current=null,d.current?.destroy(),d.current=null}},[e,t,n,s,g]);const x=p.useCallback((v,C)=>{u.current={placeholder:v,source:C};const E=d.current;E&&g(E,v,C)},[g]),w=p.useCallback(()=>{u.current=null,d.current?.hide()},[]);return{showWidget:x,hideWidget:w}}function Ym(e,t,n,s,r){return{address:t,symbol:n||"UNKNOWN",name:n||"Unknown Token",decimals:s||18,chainId:e,balance:0n,balanceFormatted:r?parseFloat(r):0,balanceUsd:0,isNative:S.isNativeToken(t)}}const Zm=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,styles:s,depositBatches:r,onDepositAmountChange:o,destinationChainId:i,destinationTokenAddress:a,onDepositExecute:d,depositActionLabel:u,sponsorGas:m=!1,escrowRecovery:f,skipTokenSelection:h=!1,directSubmit:y=!1,onSubmit:g,onDepositSuccess:x,onDepositError:w,skipRecovery:v=!0})=>{const C=p.useContext(l.SpiceFlowProviderContext);if(!C)return c.jsx("div",{children:"Error: SpiceDeposit must be used within SpiceFlowProvider"});const E=(C.mode||"7702")!="7702",k=E,F=C.nativeChainId,j=C.network||"testnet",{dark:I,dk:b,primaryColor:A}=l.useSpiceBrand(s),R=!!f,B=l.useWallet(),{isReady:q,isAuthenticated:O,actions:P}=B,D=C?.embeddedWalletAddress,M=C.externalWalletAddress,L=!!M,T=Um(C.swapper),H=k?{address:M,kind:"external"}:{address:D,kind:"embedded"},V=Pm({targetKind:H.kind,appChainId:i||F}),te=T.enabled&&!R&&j==="mainnet"&&!!Uo(V),Z=()=>h?"deposit":"select-token",K=()=>te?"select-source":k?L?Z():"connect-wallet":"provider-login",[Y,J]=p.useState(K()),[ge,pe]=p.useState(null),[we,ve]=p.useState(!1),[ne,_]=p.useState(null),[le,W]=p.useState(!1),[De,Ae]=p.useState(null),[z,Q]=p.useState(null),[se,ie]=p.useState(null),X=p.useRef(null),oe=p.useRef(null),{pendingDeposits:je,loading:Me,refresh:me}=xd(D,{enabled:e&&!v,network:j,chainIds:C.supportedChainIds}),Se=p.useMemo(()=>je.filter(ee=>ee.embeddedWalletAddress.toLowerCase()===D?.toLowerCase()),[je,D]),[Te,be]=p.useState(null),[qe,ye]=p.useState(!1),[Ue,de]=p.useState(null),[Ye,pt]=p.useState(!1),[tt,$e]=p.useState("idle");p.useEffect(()=>{if(e&&Y==="recovery"&&!qe&&!Me&&Se.length===0){J(K());return}e&&!v&&!R&&!Te&&!Ye&&tt==="idle"&&O&&D&&L&&M&&!Me&&Se.length>0&&Y!=="recovery"&&Y!=="deposit"&&Y!=="swapper"&&J("recovery")},[e,v,R,O,D,L,M,Me,Se,Y,Te,Ye,tt,qe,te,k,h]);const Ge=p.useCallback(ee=>{const ft={address:ee.tokenAddress,symbol:ee.tokenSymbol,name:ee.tokenSymbol,decimals:ee.tokenDecimals,chainId:ee.chainId,balance:ee.verifiedBalance,balanceFormatted:parseFloat(ee.amount),balanceUsd:0,isNative:ee.isNative};pe(ft),be(ee),J("deposit")},[]),Fe=p.useCallback(ee=>{if(_(ee),k){J(L?ee==="wallet"?Z():"swapper":"connect-wallet");return}const ft=O&&!!D;J(ee==="wallet"?ft?L?Z():"connect-wallet":"provider-login":ft?"swapper":"provider-login")},[k,O,D,L,h]),Ie=p.useCallback(()=>{oe.current?.abort(),W(!1),Ae(null),Q(null),_(null),X.current=null,ie(null),J("select-source")},[]);p.useEffect(()=>{Y==="swapper"&&(se||!H.address||ie({address:H.address,kind:H.kind}))},[Y,se,H.address,H.kind]);const lt=se??H,_e=lt.address,ae=lt.kind,dt=p.useCallback(async ee=>{if(!e||Y!=="swapper"||!_e)return;oe.current?.abort();const ft=new AbortController;oe.current=ft,Ae(null),W(!0);const Re=Uo(V);if(!Re){W(!1);return}const He=At=>{W(!1);const mt=N.formatUnits(At,Re.decimals);if(ae==="external"){Q({amount:mt,symbol:Re.symbol});const Mt={type:"wallet-funding",status:"success",amount:mt,asset:Re.address,sourceChain:String(V)};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:Mt})),x?.(Mt);return}Ge({chainId:V,tokenAddress:Re.address,tokenSymbol:Re.symbol,tokenDecimals:Re.decimals,amount:mt,rawAmount:At.toString(),embeddedWalletAddress:_e,externalWalletAddress:"",timestamp:0,isNative:!1,verifiedBalance:At,hasFullBalance:!0})},et=X.current,it=await et;if(ft.signal.aborted||X.current!==et)return;if(it===null){W(!1),Ae("Unable to confirm your starting balance. Go back and reopen the deposit to try again.");return}const Qe=await zm(_e,it,{signal:ft.signal,chainId:V});if(!ft.signal.aborted){if(Qe===null){W(!1);const At=l.getChainConfig(V)?.viemChain?.name??`chain ${V}`;Ae(`We haven't seen your funds arrive on ${At} yet \u2014 they may still be in transit.`);return}He(Qe)}},[e,Y,_e,ae,V,Ge,x]);p.useEffect(()=>{if(!e||Y!=="swapper"||!_e)return;const ee=gd(_e,V).catch(()=>null);return X.current=ee,()=>{X.current===ee&&(X.current=null),oe.current?.abort()}},[e,Y,_e,V]);const{showWidget:ut,hideWidget:Pe}=Km({enabled:e&&te,integratorId:T.integratorId,depositWalletAddress:_e,destinationChainId:V,brand:{dk:b,dark:I,primaryColor:A},embedFactory:T.embedFactory,onTransactionSuccess:dt,onCloseRequest:()=>{le||Ie()}}),vt=p.useCallback(()=>{pt(!0),J(O&&D&&L&&M?h?"deposit":"select-token":O&&D?"connect-wallet":"provider-login")},[O,D,L,M,h]),Tt=p.useCallback(()=>{de(null),$e("awaiting-disconnect"),J("connect-wallet")},[]),Jt=p.useCallback(async ee=>{ye(!0),de(null);try{if(!D)throw new Error("Embedded wallet not available");const ft=await P.getEthereumProvider(),Re=l.getChainConfig(ee.chainId);await l.ensureWalletOnChain(ft,ee.chainId);const He=l.getClientForChain(ee.chainId),et=await Kn.getBalance(He,{address:D}),it=Re?.viemChain?.name||`chain ${ee.chainId}`;if(et===0n)throw new Error(`Your embedded wallet has no ETH on ${it} to pay for gas. We recommend completing the deposit instead \u2014 it doesn't require gas.`);const Qe=N.createWalletClient({account:D,transport:N.custom(ft),chain:Re?.viemChain}),At=ee.externalWalletAddress&&N.isAddress(ee.externalWalletAddress)?ee.externalWalletAddress:M;if(!At||!N.isAddress(At))throw new Error("Connect the external wallet that should receive these funds, then try again.");const mt={recipient:At,tokenAddr:ee.tokenAddress,isNative:ee.isNative||S.isNativeToken(ee.tokenAddress),amount:ee.verifiedBalance,viemChain:Re?.viemChain},Mt=await Ua(Qe,mt),{receipt:ht}=await mo({client:He,hash:Mt,call:Eo(mt.recipient,mt.tokenAddr,mt.isNative,mt.amount),confirmations:1});if(ht.status!=="success")throw new Error("The return transaction failed. Please try again.");No(ee.embeddedWalletAddress,ee.chainId,ee.tokenAddress),me(),je.length<=1&&J(K())}catch(ft){const Re=ft?.message||"Couldn't return your funds. Please try again.",He=/insufficient funds for gas/i.test(Re);de(He?"Not enough ETH in your embedded wallet to cover gas fees. Complete the deposit instead \u2014 it doesn't require gas.":Re)}finally{ye(!1)}},[P,D,M,je,me]);p.useEffect(()=>{e||(be(null),de(null),ye(!1),pt(!1),$e("idle"),oe.current?.abort(),_(null),W(!1),Ae(null),Q(null),X.current=null,ie(null))},[e]),p.useEffect(()=>{if(!(v||tt==="idle")){if(tt==="awaiting-disconnect"){(!L||!M)&&$e("awaiting-reconnect");return}e&&!Me&&je.length>0&&O&&D&&($e("idle"),J("recovery"))}},[v,tt,L,M,e,Me,je,O,D]),p.useEffect(()=>{!R||!e||(O&&D?(ve(!0),!ge&&f?.chainId&&f?.tokenAddress&&pe(Ym(f.chainId,f.tokenAddress,f.tokenSymbol,f.tokenDecimals,f.amount)),J("deposit")):J("provider-login"))},[R,e,Y,O,D]);const{assets:St,loading:dn}=Er({address:M,supportedChains:C.supportedChainIds,fetchBalances:Xs,enabled:e&&!!M,refreshInterval:e?5e3:0}),ot=p.useCallback(()=>{ve(!0),J(R?"deposit":ne==="card"||ne==="exchange"?"swapper":L?h?"deposit":"select-token":"connect-wallet")},[R,ne,L,h]),ze=p.useCallback(async()=>{if((!L||!M)&&(await Ln(500),!L||!M)){alert("Please connect your wallet first");return}J(h?"deposit":"select-token")},[L,M,h]),at=p.useCallback(ee=>{pe(ee),J("deposit")},[]),rt=p.useCallback(()=>{if(pe(null),o?.(""),!M){J("connect-wallet");return}J("select-token")},[M,o]),wt=p.useCallback(()=>{t()},[t]);if(p.useEffect(()=>{if(!e){const ee=setTimeout(()=>{R||(J(K()),pe(null)),ve(!1)},300);return()=>clearTimeout(ee)}},[e,R,f?.chainId]),p.useEffect(()=>{e&&Y==="deposit"&&!ge&&!R&&!Te&&!h&&J("select-token")},[e,Y,ge,R,Te,h]),p.useEffect(()=>{if(e&&Y==="connect-wallet"&&L&&M&&tt==="idle"){if(te&&!ne){J("select-source");return}if(te&&ne&&ne!=="wallet"){J("swapper");return}J(h?"deposit":"select-token")}},[e,Y,L,M,tt,h,te,ne]),p.useEffect(()=>{if(!k&&e&&Y==="provider-login"&&q&&O&&D&&!we){const ee=setTimeout(()=>{ve(!0),J(ne==="card"||ne==="exchange"?"swapper":L?h?"deposit":"select-token":"connect-wallet")},100);return()=>clearTimeout(ee)}},[k,e,Y,q,O,D,ne,L,h,we]),!e)return null;if(Y==="recovery")return c.jsx(Bm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,deposits:Se,onComplete:Ge,onCancel:Jt,onSkip:vt,onChangeWallet:Tt,isProcessing:qe,isVerifying:Me,onRefresh:me,error:Ue,styles:s});if(Y==="select-source")return te?c.jsx(jm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,onSelect:Fe,styles:s}):(J("provider-login"),null);if(Y==="swapper")return ne!=="card"&&ne!=="exchange"?(J(K()),null):_e?c.jsx(Dm,{isOpen:e,onClose:wt,onBack:Ie,closeOnBackdropClick:n,source:ne,destinationChainId:V,onShowWidget:ut,onHideWidget:Pe,verifying:le,verifyError:De,onRetryVerify:dt,funded:z,styles:s}):c.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:50},children:c.jsx("div",{style:{backgroundColor:I?b.cardBg:"white",borderRadius:"9px",padding:"32px 24px",maxWidth:"400px",width:"100%",textAlign:"center",fontFamily:'"Helvetica Neue", sans-serif',fontSize:"14px",color:I?b.textPrimary:"#111827"},children:"Preparing your account..."})});if(Y==="provider-login"&&!k)return c.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:50},children:c.jsx("div",{style:{backgroundColor:I?b.cardBg:"white",borderRadius:"9px",padding:"32px 24px",maxWidth:"400px",width:"100%"},children:c.jsx(xa,{onAuthSuccess:ot,autoTrigger:!0})})});if(Y==="connect-wallet")return c.jsx(dm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,onContinue:ze,requiredChainId:E?F:void 0,styles:s});if(Y==="select-token")return M?c.jsx(im,{isOpen:e,onClose:wt,closeOnBackdropClick:n,onTokenSelect:at,walletAddress:M,supportedChainIds:C.supportedChainIds,network:j,prefetchedAssets:dn?null:St??null,styles:s,dark:I}):(J("connect-wallet"),null);if(Y==="deposit"){if(!ge&&!h)return null;const ee=!!Te;return c.jsx(Rm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,supportedChains:ge?[ge.chainId]:C.supportedChainIds??[],styles:s,externalWalletAddress:M,depositBatches:ee?void 0:r,onDepositAmountChange:o,destinationChainId:i,destinationTokenAddress:a,onDepositExecute:d,depositActionLabel:u,nativeChainId:F,sponsorGas:m,preSelectedAsset:ge??void 0,escrowOnly:R||ee,escrowTokenAddress:ee?Te.tokenAddress:f?.tokenAddress,escrowAmount:ee?Te.amount:f?.amount,escrowTokenDecimals:ee?Te.tokenDecimals:f?.tokenDecimals,escrowTokenSymbol:ee?Te.tokenSymbol:f?.tokenSymbol,onSubmit:g,directSubmit:y,onDepositSuccess:x,onDepositError:w,embeddedWalletAddress:D,onViewAllAssets:h?void 0:rt})}return null},yd=e=>p.useContext(l.SpiceFlowProviderContext)?c.jsx(Zm,{...e}):c.jsx("div",{children:"Error: SpiceDeposit must be used within SpiceFlowProvider"}),Xm=({depositProps:e,withdrawProps:t,...n})=>{const[s,r]=p.useState(!1),[o,i]=p.useState(null);return c.jsxs(c.Fragment,{children:[c.jsx(sd,{...n,onDepositClick:()=>r(!0),onWithdrawClick:a=>i({assetId:a})}),c.jsx(yd,{styles:n.styles,onDepositSuccess:n.onDepositSuccess,...e,isOpen:s,onClose:()=>r(!1)}),c.jsx(Va,{styles:n.styles,...t,isOpen:!!o,onClose:()=>i(null),initialSourceAssetId:o?.assetId})]})},Jm=({isOpen:e,onClose:t,onChainSelect:n,supportedChains:s,closeOnSelect:r=!0,styles:o})=>{const{theme:i,dark:a,primaryColor:d,dk:u}=l.useSpiceBrand(o),[m,f]=p.useState(""),[h,y]=p.useState(null),[g,x]=p.useState(null),[w,v]=p.useState(!1),[C,E]=p.useState(null),{switchChainAsync:k}=as.useSwitchChain(),F=p.useMemo(()=>new Set(s||[]),[s]),j=p.useMemo(()=>{if(!s||s.length===0)return[];const R=[];return s.forEach((B,q)=>{if(typeof B!="number")return;const O=l.getChainConfig(B);O&&R.push({id:B.toString(),name:O.displayName,icon:bs[B]||Ir,chainId:B,verified:!0,order:q})}),R},[s]);p.useEffect(()=>{h&&!F.has(parseInt(h,10))&&y(null)},[h,F]);const I=p.useMemo(()=>j.filter(R=>R.name.toLowerCase().includes(m.toLowerCase())).sort((R,B)=>R.order-B.order),[j,m]),b=async()=>{if(!h)return;const R=parseInt(h,10);v(!0),E(null);try{await k({chainId:R}),n&&n(h),r&&t()}catch(B){console.error("Failed to switch chain:",B),E(l.sanitizeError(B,"Failed to switch chain."))}finally{v(!1)}},A=!h||w;return c.jsxs(Hn,{isOpen:e,onClose:t,title:"Select Chain",styles:o,theme:i,dark:a,children:[c.jsx("div",{style:{padding:"24px 20px"},children:c.jsx(Ya,{value:m,onChange:f,ariaLabel:"Search chains",placeholder:"Search chain name, symbol or address",size:"md",dark:a,styles:o,endAdornment:c.jsx("div",{style:{padding:"5px 5px",borderRadius:"3px",fontSize:"13px",backgroundColor:a?u.cardBg:"#E9E9E9",color:a?u.textSecondary:"#485066",fontWeight:500,flexShrink:0},"aria-hidden":"true",children:"\u2318F"})})}),c.jsx("div",{style:{padding:"0 32px 20px",display:"flex",flexDirection:"column",gap:"12px"},children:I.map(R=>{const B=h===R.id,q=g===R.id;return c.jsxs("button",{onClick:()=>y(R.id),onMouseEnter:()=>x(R.id),onMouseLeave:()=>x(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"16px",padding:"8px",borderRadius:"8px",backgroundColor:B?a?`${d}15`:`${d}12`:"transparent",border:B?a?`1px solid ${d}66`:`1px solid ${d}88`:q?a?`1px solid ${d}44`:`1px solid ${d}66`:"1px solid transparent",cursor:"pointer",transition:l.transition.interactive},children:[c.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"30px"},children:c.jsx("img",{src:R.icon,alt:R.name,loading:"lazy",decoding:"async",style:{width:"100%",height:"100%",borderRadius:"50%"}})}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",flex:1},children:[c.jsx("span",{style:{fontFamily:l.font.mono,fontSize:"17px",fontWeight:500,letterSpacing:"0.4px",color:u.textPrimary,textAlign:"left"},children:R.name}),R.verified&&c.jsx("img",{src:od,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",width:16,height:16,style:{width:"16px",height:"16px",filter:a?"brightness(0) invert(1)":"none"}})]})]},R.id)})}),C&&c.jsx("div",{style:{padding:"0 25px 12px"},children:c.jsx(vn,{variant:"error",size:"compact",palette:u,children:C})}),c.jsx("div",{style:{padding:"0 25px 25px"},children:c.jsxs(l.Button,{variant:"outline",onClick:b,disabled:A,fullWidth:!0,theme:i,styles:o,dark:a,children:["SELECT",c.jsx(Sp,{size:20})]})})]})};function bd(e){const t=Ql({enabled:e.enabled,chainId:e.lockChainId,address:e.destinationTokenAddress,decimals:e.destinationTokenDecimals,symbol:e.lockTokenSymbol,logoURI:e.lockTokenLogoURI}),n=t.token,s=p.useCallback((i,a)=>{if(!t.ready)throw new Error("Lock token metadata is unavailable.");const d={...n,name:n.symbol,isNative:S.isNativeToken(n.address),balance:0n,balanceFormatted:0,balanceUsd:0},u=typeof e.lockBatches=="function"?e.lockBatches({asset:d,amount:N.formatUnits(i,d.decimals),amountWei:i,feeAdjusted:!0,beneficiary:a.beneficiary??a.userAddress,executorAddress:a.executorAddress}):e.lockBatches;if(u.some(m=>m.chainId!==e.lockChainId||m.domain==="spicenet"||m.tokenTransfers?.some(f=>f.from!=="escrow"||!l.addressesEqual(f.token,n.address))))throw new Error("Lock action definitions must contain destination contract calls; the SDK supplies conversion and delivery.");return u.flatMap(m=>m.calls)},[t.ready,n,e.lockBatches,e.lockChainId]),r=Wr({enabled:t.ready,destinationToken:t.ready?n:void 0,selectedAsset:e.selectedAsset,amountDirection:"input-inclusive",feeFunding:e.feeFunding,combineSourceBalances:e.combineSourceBalances,recipient:e.beneficiary,buildActionCalls:s,buildSpicenetBatch:e.buildSpicenetBatch,onSubmit:e.onSubmit,onSuccess:e.onLockSuccess,onError:(i,a)=>e.onLockError?.(i.message,a)}),o=p.useCallback(()=>{t.refresh(),r.quote.refreshQuote()},[t.refresh,r.quote.refreshQuote]);return{...r,quote:{...r.quote,refreshQuote:o},destination:n,metadataError:t.error,canExecute:t.ready&&r.canExecute}}function $m(e){const t=new Date;t.setDate(t.getDate()+Math.floor(e*30));const n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=t.getDate(),r=s===1||s===21||s===31?"st":s===2||s===22?"nd":s===3||s===23?"rd":"th";return`${n[t.getMonth()]} ${s}${r} ${t.getFullYear()}`}const _m=({label:e,value:t,fontFamily:n,dark:s=!1,textPrimary:r="#111827",textSecondary:o="#6b7280"})=>c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[c.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",style:{flexShrink:0},children:[c.jsx("circle",{cx:"7",cy:"7",r:"6.5",stroke:o,strokeWidth:"1.2"}),c.jsx("path",{d:"M7 6v4",stroke:o,strokeWidth:"1.2",strokeLinecap:"round"}),c.jsx("circle",{cx:"7",cy:"4.5",r:"0.7",fill:o})]}),c.jsx("span",{style:{fontSize:"13px",color:o,fontFamily:n},children:e})]}),c.jsx("span",{style:{fontSize:s?"17px":"13px",fontWeight:700,color:r,fontFamily:l.font.mono,letterSpacing:"0.3px"},children:t})]}),vd=p.memo(_m),eh=({options:e,selectedIndex:t,onSelect:n,primaryColor:s,dark:r=!1,textPrimary:o="#111827",textSecondary:i="#6b7280",trackColor:a})=>{const d=e.length-1,u=a||(r?"#3a3a3a":"#d1d5db"),m=r?"4px":"50%",f=r?"none":"2px solid white",h=r?"none":`0 0 0 1px ${s}`;return c.jsxs("div",{style:{width:"100%",userSelect:"none"},children:[c.jsxs("div",{style:{position:"relative",paddingBottom:"4px"},children:[c.jsx("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:"4px",background:u,borderRadius:"2px",transform:"translateY(-50%)",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",top:"50%",left:0,width:`${t/d*100}%`,height:"4px",background:s,borderRadius:"2px",transform:"translateY(-50%)",pointerEvents:"none",transition:"width 0.15s ease"}}),c.jsx("input",{type:"range","aria-label":"Lock duration","aria-valuetext":e[t]?.label,"data-spiceflow-focus":!0,min:0,max:d,step:1,value:t,onChange:y=>n(Number(y.target.value)),style:{WebkitAppearance:"none",appearance:"none",width:"100%",height:"20px",background:"transparent",cursor:"pointer",outline:"none",border:"none",position:"relative",zIndex:1,margin:0,padding:0}})]}),c.jsx("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"6px"},children:e.map((y,g)=>c.jsxs("div",{onClick:()=>n(g),style:{display:"flex",flexDirection:"column",alignItems:g===0?"flex-start":g===d?"flex-end":"center",cursor:"pointer",flex:1},children:[c.jsx("span",{style:{fontSize:"12px",fontWeight:g===t?700:400,color:g===t?o:i,whiteSpace:"nowrap",transition:"color 0.15s, font-weight 0.15s"},children:y.label}),y.highlight&&c.jsx("span",{style:{fontSize:"10px",color:i,whiteSpace:"nowrap"},children:"(most common)"})]},g))}),c.jsx("style",{children:`
|
|
49
|
+
`})]})},Bm=p.memo(({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,onDepositSelect:s,depositBatches:r,supportedChains:o,title:i,styles:a,onDepositAssetChange:l,assetInputHook:u,externalWalletAddress:m,onDepositAmountChange:f,allowSecondAsset:h=!1,destinationChainId:y,destinationTokenAddress:g,onDepositExecute:x,depositActionLabel:w,nativeChainId:v,sponsorGas:C=!1,preSelectedAsset:E,escrowOnly:k=!1,escrowTokenAddress:F,escrowAmount:O,escrowTokenDecimals:I,escrowTokenSymbol:b,onSubmit:A,directSubmit:R=!1,onDepositSuccess:B,onDepositError:q,embeddedWalletAddress:j,onViewAllAssets:P})=>{const D=p.useContext(d.SpiceFlowProviderContext),M=D?.mode||"7702",L=D?.allowedTokens,T=!!D?.isWhitelistGateActive,H=!k&&!!D?.isWhitelistConfigured&&D?.isUserWhitelisted!==!0,V=u?.assetAmount||"",{theme:te,dark:Z,appName:K,primaryColor:Y,dk:J}=d.useSpiceBrand(a),we=d.useWallet(),{isReady:me,isAuthenticated:xe}=we,{externalWallet:Ce}=d.useProviderWallets(),ne=D?.embeddedWalletAddress||j,_=M!="7702",de=_?!!m:me&&xe&&!!ne,W=ne,je=m,Ae=W??je,z=d.useAssetDisplay(),{data:Q}=is.useWalletClient(),[se,ce]=p.useState(Q),X=p.useRef(null),oe=p.useRef(Ce);oe.current=Ce;const Oe=Ce?.address;p.useEffect(()=>{const re=oe.current;if(!re||!je){X.current=null,ce(Q);return}if(re.address?.toLowerCase()!==je?.toLowerCase()){X.current=null,ce(Q);return}re.getEthereumProvider().then(async Be=>{X.current=Be;const Ct=await Be.request({method:"eth_chainId"}),He=parseInt(Ct,16),Ue=d.getChainConfig(He),st=await re.getWalletClient(He);ce(Ue?N.createWalletClient({account:je,chain:Ue.viemChain,transport:N.custom(Be)}):st)}).catch(()=>{X.current=null,ce(Q)})},[Oe,je,Q]);const Ne=p.useRef(null),[he,Se]=p.useState([]),{assets:Te,loading:ve,refreshAssets:We}=Fr({address:k?W:je||W,supportedChains:o,fetchBalances:Zs,enabled:e,refreshInterval:e?5e3:0}),be=p.useMemo(()=>Te.filter(re=>re.balance>0n&&Yn(re,"deposit-source",{allowedTokens:L,rpcOverrides:D?.rpcOverrides,liquidityVenues:D?.liquidityVenues,isWhitelistGateActive:T},void 0,void 0,{requiresEscrow:_||k}).eligible).sort((re,Be)=>Be.balanceUsd-re.balanceUsd),[Te,L,D?.rpcOverrides,T,_,k]),Pe=p.useMemo(()=>{if(!he[0]?.asset)return[];const re=he[0].asset.chainId;return be.filter(Be=>Be.chainId===re)},[be,he]),[ue,Ke]=p.useState(!1),[ft,tt]=p.useState(!1),$e=JSON.stringify([e,W,je,D?.apiUrl,D?.network]),Qe=p.useRef({key:$e,version:0});Qe.current.key!==$e&&(Qe.current={key:$e,version:Qe.current.version+1}),p.useEffect(()=>{tt(!1),Ke(!1)},[$e]);const[Ee,Ie]=p.useState(null),lt=p.useRef(q);lt.current=q;const _e=p.useCallback(re=>{Ie(re),typeof re=="string"&&re&<.current?.(re,d.getRelayerErrorDetail(re))},[]),[ae,dt]=p.useState("idle"),ut=p.useCallback(re=>{typeof re=="string"&&re&<.current?.(re,d.getRelayerErrorDetail(re))},[]),[Me,bt]=p.useState(!1),[Rt,Xt]=p.useState(null),[St,un]=p.useState("idle"),[ot,Le]=p.useState(null),[at,rt]=p.useState(null),[wt,ee]=p.useState(null),[mt,Re]=p.useState(null),[ze,et]=p.useState(null),{intentStatus:it,startStatusPolling:Ve,clearStatus:At,execute:ht}=Xs(),Pt=it?.overallStatus==="success"||St==="success",pt=p.useCallback((re,Be)=>{const Ct=d.CHAIN_CONFIGS[Be];return Ct?Ct.supportedTokens?.find(He=>d.addressesEqual(He.address,re))?.symbol??null:null},[]),Sn=p.useMemo(()=>{const re=he[0]?.asset;if(!re||!g||!y)return!1;const Be=pt(g,y);return wm(re.symbol)&&!!Be&&xm(Be)},[he,g,y,pt]);p.useEffect(()=>{he.length>0&&V!==he[0]?.amount&&Se(re=>{if(re.length===0)return re;const Be=[...re];return Be[0]={...Be[0],amount:V||""},Be})},[V]),p.useEffect(()=>{he.length!==0&&Se(re=>{let Be=!1;const Ct=re.map(He=>{if(!He.asset)return He;const Ue=be.find(st=>st.chainId===He.asset.chainId&&d.addressesEqual(st.address,He.asset.address));return Ue?Ue===He.asset||Ue.balance===He.asset.balance?He:(Be=!0,{...He,asset:Ue,amount:He.amount}):He});return Be?Ct:re})},[be,he.length]),p.useEffect(()=>{if(!E||he.length>0||be.length===0)return;const re=be.find(Be=>Be.chainId===E.chainId&&d.addressesEqual(Be.address,E.address));re&&(Se([{asset:re,amount:""}]),l?.(re))},[E,be,he.length]);const pn=p.useRef(null);p.useEffect(()=>{if(_&&it?.overallStatus==="success"&&x&&ae==="idle"){const re=pn.current,Be=Ne.current;if(re){const Ct=Qe.current.version,He=()=>Qe.current.version===Ct;(async()=>{try{dt("executing"),await x(re),He()&&(dt("success"),Xt(re),bt(!0));const Ue=Array.isArray(Be)?Be[0]:void 0,st={type:"deposit",status:"success",amount:re,asset:Ue?.tokenAddress,sourceChain:Ue?String(Ue.chainId):void 0,txHash:Ue?.txHash};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:st})),B?.(st)}catch(Ue){console.error("onDepositExecute failed:",Ue),He()&&(dt("error"),ut(d.sanitizeError(Ue,"Post-deposit instruction failed")))}finally{pn.current===re&&Ne.current===Be&&(pn.current=null,Ne.current=null)}})()}}},[it?.overallStatus,_,ae]);const Cn=p.useCallback(()=>{ft||_e(null)},[ft]);p.useEffect(()=>{At(),Qt(!1),Ye(null),dt("idle"),bt(!1),Xt(null),un("idle"),Le(null),rt(null)},[$e]);const Zn=p.useCallback((re,Be)=>{Se(Ct=>{const He=[...Ct];return He[Be]={asset:re,amount:He[Be]?.amount||""},He}),Be===0&&l?.(re),Cn()},[l,Cn]),gn=p.useCallback(async(re,Be)=>{if(Se(Ct=>{const He=[...Ct];return He[Be]&&(He[Be]={...He[Be],amount:re}),He}),Cn(),Be===0)if(u?.setAssetAmount(re),Sn&&re&&parseFloat(re)>0)try{const Ct=wt??await gm();wt||ee(Ct);const He=he[0]?.asset;if(!He)return;const Ue=N.parseUnits(re,He.decimals),st=g?pt(g,y):null,bn=d.CHAIN_CONFIGS[y]?.supportedTokens?.find(Pn=>d.addressesEqual(Pn.address,g))?.decimals??6,Mn=ym(Ue,He.decimals,bn,Ct);Re(Mn);const an=N.formatUnits(Mn,bn),As=Ct.toLocaleString("en-US",{maximumFractionDigits:0});et(`${re} ${He.symbol} \u2248 $${parseFloat(an).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} ${st??"USD"} (rate: $${As}/BTC)`),f?.(an)}catch(Ct){console.error("Failed to fetch BTC/USD price:",Ct),et(null),Re(null),f?.(re)}else et(null),Re(null),f?.(re)},[Cn,u,f,Sn,wt,he,g,y,pt]),wn=p.useCallback(()=>{he.length<2&&Se(re=>[...re,{asset:null,amount:""}])},[he.length]),Jt=p.useCallback(re=>{Se(Be=>Be.filter((Ct,He)=>He!==re)),Cn()},[Cn]),Ft=p.useRef(!1),Ut=p.useRef(!1);p.useEffect(()=>{e||(Ft.current=!1,Ut.current=!1,An(null),sn(null))},[e]);const[Wt,Qt]=p.useState(!1),[Bt,Ye]=p.useState(null),[It,An]=p.useState(null),[_t,sn]=p.useState(null),[rn,xn]=p.useState(!1),[Yt,En]=p.useState(null),Ge=p.useMemo(()=>{const re=he[0];if(he.length!==1||!re?.asset||!re.amount||parseFloat(re.amount)<=0)return null;try{return{asset:re.asset,amount:N.parseUnits(re.amount,re.asset.decimals),token:S.normalizeNativeTokenAddress(re.asset.address),chainId:re.asset.chainId}}catch{return null}},[he]),fn=!_&&!k&&!!Ge&&!Is(Ge.asset),en=p.useMemo(()=>Ge?[Ge.chainId,Ge.token.toLowerCase(),Ge.amount.toString(),k?"escrow":"normal"].join("|"):null,[Ge,k]),Xn=p.useCallback(async(re,Be)=>W?ti({address:W,depositQuote:re,signal:Be}):null,[W]),Nn=p.useCallback(async re=>Ge?Xn(Ge,re):null,[Ge,Xn]),yn=p.useRef(Nn);yn.current=Nn,ia({shouldRun:e&&!_&&!fn&&!!en&&!Wt&&!ue&&!it&&!Pt,deps:[e,_,fn,en,Wt,ue,it,Pt],delayMs:500,backgroundIntervalMs:3e4,onSkip:()=>{An(null),En(null),xn(!1)},onCleanup:()=>xn(!1),run:async({isBackground:re,isCurrent:Be,signal:Ct})=>{re||(En(null),xn(!0));try{const He=await yn.current(Ct);Be()&&An(He)}catch(He){if(!Be())return;An(null),En(He instanceof Error?He.message:"Failed to estimate gas fee")}finally{Be()&&xn(!1)}}}),p.useEffect(()=>{Wt||ue||sn(null)},[Wt,ue,en]);const Jn=p.useRef(!1),Hn=()=>{if(he.length===0||!he[0]?.asset)return;const re=he.filter(st=>st.asset&&st.amount&&parseFloat(st.amount)>0);if(re.length===0)return;const Be=re[0],Ct=d.getChainConfig(Be.asset.chainId),He=re.map(st=>{const bn=parseFloat(st.amount);return`${isNaN(bn)?st.amount:bn.toPrecision(6).replace(/\.?0+$/,"")} ${st.asset.symbol}`}).join(", "),Ue={network:Ct?.displayName||`Chain ${Be.asset.chainId}`,amount:He,symbol:"",chainId:Be.asset.chainId};if(qt&&Tt&&mn){sn(Tt);const st=re[0];Ue.creditedAmount=`${N.formatUnits(Tt.net,st.asset.decimals)} ${Is(st.asset)?z({...st.asset,location:"rollup",_source:"spice",receiptTokenName:"spiceUSDC"}).symbol:st.asset.symbol}`,Ue.networkFee=`${N.formatUnits(Tt.fee,st.asset.decimals)} ${st.asset.symbol}`}return Ye(Ue),Ue},fe=async()=>{!ss||!Hn()||(R?await $t():Qt(!0))},ie=p.useRef(it);ie.current=it;const Ze=p.useRef(ae);Ze.current=ae;const gt=JSON.stringify([e,W,ne,je,me,xe,M,d.relayerService.getBaseUrl(),T,k,y,g,H,he.map(({asset:re,amount:Be})=>[re.chainId,re.address,Be])]),Fe=p.useRef({key:gt});Fe.current.key!==gt&&(Fe.current={key:gt});const Nt=p.useRef(!0),vt=p.useRef(!1);p.useLayoutEffect(()=>(Nt.current=!0,()=>{Nt.current=!1}),[]);const Gt=async()=>{if(vt.current)return;vt.current=!0;const re=Fe.current,Be=d.relayerService.getBaseUrl();try{Hn();const Ct=Qe.current.version,He=()=>Qe.current.version===Ct,Ue=st=>(...bn)=>{He()&&st(...bn)};await Im({isCurrent:He,validateCurrentSession:()=>{if(!e||!Nt.current||Fe.current!==re||d.relayerService.getBaseUrl()!==Be)throw new Error("The wallet or deposit changed. Review it again before funding.")},selectedDepositAssets:he,escrowOnly:k,sourceAddress:je,isNon7702:_,address:W,embeddedWalletAddress:ne,isReady:me,isAuthenticated:xe,zeroCreditError:zt,depositBalanceError:Mt,externalWalletClient:se,externalProvider:X.current,effectiveDepositFee:Tt,depositBatches:r,destinationChainId:y,destinationTokenAddress:g,isCrossDenomination:Sn,convertedUsdAmount:mt,mode:M,sponsorGas:C,nativeChainId:v,spiceBalanceUser:Ae,depositDataRef:Ne,bridgedAmountRef:pn,setIsExecuting:Ue(Ke),setError:Ue(_e),setRetryBlocked:Ue(tt),setConfirmationData:Ue(Ye),setShowConfirmation:Ue(Qt),setDirectDepositStatus:Ue(un),setDirectDepositChainId:Ue(rt),setDirectDepositTxHash:Ue(Le),setPostDepositStatus:Ue(dt),setPostDepositError:Ue(ut),setPostDepositAmount:Ue(Xt),setPostDepositSuccess:Ue(bt),startStatusPolling:Ue(Ve),clearStatus:Ue(At),refreshAssets:We,onDepositExecute:x,onDepositSelect:s,onDepositSuccess:B,execution:{execute:ht},getCurrentIntentStatus:()=>ie.current,getCurrentPostDepositStatus:()=>Ze.current})}finally{vt.current=!1}},$t=async()=>{if(!(Jn.current||ue||ft||Pt)){Jn.current=!0;try{A?.(),await Gt()}finally{Jn.current=!1}}},zt=p.useMemo(()=>{for(const re of he)if(!(!re?.asset||!re.amount||parseFloat(re.amount)<=0))try{const Be=re.asset.decimals,Ct=N.parseUnits(re.amount,Be);if(Ct<=0n)continue;const He=S.normalizeNativeTokenAddress(re.asset.address),Ue=S.isNativeToken(He)?S.getTokenByAddress(He,re.asset.chainId)?.equivalenceGroup:S.getEquivalenceGroup(He),st=re.asset.receiptTokenDecimals??(Ue==="ETH"||Ue==="ARB"?18:Ue==="USDC"||Ue==="SUSD"||Ue==="WBTC"||Ue==="CBTC"?6:void 0);if(st===void 0||Be<=st||S.convertAmountBetweenDecimals(Ct,Be,st)>0n)continue;return`Amount too small. Minimum deposit for this asset is ${N.formatUnits(10n**BigInt(Be-st),Be)} ${re.asset.symbol}.`}catch{continue}return null},[he]),qt=!_&&!!Ge&&!fn,Tt=_t??It,mn=!!Ge&&hd(Tt,Ge),Mt=p.useMemo(()=>{if(!Ge)return null;if(fn)return Ge.asset.balance>=Ge.amount?null:`Insufficient ${Ge.asset.symbol}. Need ${N.formatUnits(Ge.amount,Ge.asset.decimals)} ${Ge.asset.symbol}.`;if(!qt||!mn)return null;if(Tt.fee>=Ge.amount||Tt.net<=0n)return"This deposit amount is too small to cover the network fee. Your funds remain in your wallet.";const re=Ge.amount;return Ge.asset.balance>=re?null:`Insufficient ${Ge.asset.symbol}. Need ${N.formatUnits(re,Ge.asset.decimals)} ${Ge.asset.symbol} including gas.`},[qt,fn,Ge,mn,Tt]),[Fn,on]=p.useState(!1),nt=he[0]?.asset?.chainId,Kt=Te.find(re=>re.isNative&&re.chainId===nt)?.balance??0n;p.useEffect(()=>{if(!e||!nt||k){on(!1);return}let re=!1;return(async()=>{try{const Be=await d.getClientForChain(nt).getGasPrice()*150000n;re||on(Kt<Be)}catch{re||on(!1)}})(),()=>{re=!0}},[e,nt,Kt,k]);const fs=!qt||mn&&!rn&&!Yt&&!Mt,Ss=p.useMemo(()=>{if(!Ge||!Tt||!mn)return null;const re=Ge.amount;return{symbol:Ge.asset.symbol,decimals:Ge.asset.decimals,grossAmount:re,netAmount:Tt.net,totalFee:Tt.fee,gasFee:Tt.fee,spicenetFee:0n,bridgeFee:0n,gasQuoteSource:"estimated"}},[Ge,Tt,mn]),ir=parseFloat(he[0]?.amount||"")||0,ss=he.length>0&&he[0]?.asset&&he[0]?.amount&&ir>0&&de&&!ue&&!Pt&&!ft&&!zt&&!Mt&&fs&&!H;p.useEffect(()=>{if(!k||!F||!O||Ft.current||!de)return;const re=o[0];if(!re)return;const Be=d.getAllAssetsForChain(re,[]).find(He=>d.addressesEqual(He.address,F));let Ct;if(Be)Ct=Be;else if(I!==void 0&&b)Ct={address:F,symbol:b,name:b,decimals:I,chainId:re,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,isNative:S.isNativeToken(F)};else{console.warn("[DepositModal] escrowOnly: no matching asset and missing escrowTokenDecimals/escrowTokenSymbol for",F);return}Ft.current=!0,Se([{asset:Ct,amount:O}])},[k,F,O,I,b,de,o]),p.useEffect(()=>{!k||!ss||Ut.current||ue||(Ut.current=!0,Gt())},[k,ss,ue]);const Vn=Ee||zt||Mt,Ls=()=>{if(ue)return"Executing Deposit...";if(!de)return"Wallet Not Connected";if(M==="7702"){if(!me)return"Loading...";if(!xe)return"Authentication Required"}return he[0]?.asset?he[0]?.amount?zt?"AMOUNT TOO SMALL":Mt?"INSUFFICIENT BALANCE":qt&&!fs?Yt?"GAS UNAVAILABLE":"ESTIMATING GAS":"DEPOSIT":"ENTER AMOUNT":"SELECT TOKEN"};return e?c.jsx(zn,{isOpen:e,onClose:t,closeOnBackdropClick:n,title:i||`Deposit to your ${K} account`,subtitle:c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[c.jsx("img",{src:za,alt:"","aria-hidden":"true",style:{width:"13px",height:"13px",flexShrink:0,...Z?{filter:"invert(0.6)"}:{}}}),c.jsx("p",{style:{fontSize:"12px",color:J.textSecondary,margin:"0",lineHeight:"1.4",fontFamily:d.font.ui},children:`Deposit collateral to your ${K} Account from any supported network.`})]}),dark:Z,overlayContent:!Pt&&(Wt||it||ae!=="idle"&&x)?c.jsx("div",{}):void 0,styles:a,theme:te,children:c.jsxs("div",{style:{padding:"24px 24px 5px 24px"},children:[!Pt&&c.jsx(Am,{selectedDepositAssets:he,depositAssets:be,secondAssetOptions:Pe,loadingAssets:ve,allowSecondAsset:h,theme:te,styles:a,dark:Z,dk:J,onSelect:Zn,onAmountChange:gn,onAdd:wn,onRemove:Jt,onViewAllAssets:P}),!Pt&&qt&&Ge&&c.jsx($a,{fontFamily:a?.fontFamily||te.typography.fontFamily,textPrimary:J.textPrimary,textSecondary:J.textSecondary,cardBg:Z?J.inputBg:"#ffffff",cardBorder:J.cardBorder,resolvedDark:Z,darkCardBorder:J.cardBorder,primaryColor:Y,feePreview:Ss,isLoading:rn||qt&&!mn,errorText:Yt}),c.jsx(Rm,{intentStatus:it,postDepositSuccess:Me,postDepositAmount:Rt,postDepositStatus:ae,depositActionLabel:w,sourceChainName:he[0]?.asset?.chainId?d.getChainName(he[0].asset.chainId):"Destination Chain",directDepositStatus:St,directDepositTxHash:ot,directDepositChainId:at,styles:a}),c.jsx(Tm,{isOpen:Wt||!!it||St==="success"||ae!=="idle"&&!!x,onClose:()=>{Qt(!1),it&&At();const re=ae==="success"&&!it,Be=it?.overallStatus==="success"&&(x?ae==="success"||ae==="error":!0);(re||Be||St==="success"&&(!x||ae==="success"||ae==="error")||ft)&&t()},onConfirm:$t,data:Bt,isExecuting:ue,retryBlocked:ft,error:Ee,theme:te,styles:a,intentStatus:it,directDepositStatus:St,postDepositStatus:ae,hasPostDepositInstruction:!!x}),!Pt&&ze&&c.jsxs(cd,{dk:J,dark:Z,borderRadius:te.borderRadius.md,children:["\u26A1 ",ze]}),!Pt&&Fn&&c.jsx(cd,{dk:J,dark:Z,borderRadius:te.borderRadius.md,children:"Low native balance in the external wallet. The deposit to spicenet account might fail."}),!Pt&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,marginBottom:0,margin:0,padding:0},children:[Vn?c.jsx("div",{style:{marginBottom:"10px",fontSize:"12px",lineHeight:"1.45",color:J.errorText,fontFamily:a?.fontFamily||te.typography.fontFamily},children:Vn}):null,c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:fe,disabled:!ss||!de||ue,theme:te,dark:Z,styles:a,children:Ls()})]})]})}):null}),Om=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,deposits:s,onComplete:r,onCancel:o,onSkip:i,onChangeWallet:a,isProcessing:l,isVerifying:u=!1,onRefresh:m,error:f,styles:h})=>{const{dark:y,dk:g,theme:x}=d.useSpiceBrand(h);if(!e)return null;if(s.length===0)return c.jsx(zn,{isOpen:e,onClose:t,title:"Your wallet",styles:h,closeOnBackdropClick:n,children:c.jsx("p",{role:"status",style:{padding:"18px 24px",color:g.textSecondary},children:l?"Returning funds\u2026":"Checking your wallet\u2026"})});const w=s[0],v=w.timestamp===0,C=w.verifiedBalance<=0n,E=l||u||C,k=h?.fontFamily||d.font.ui,F=d.font.mono,O=d.getChainName(w.chainId),I=parseFloat(w.amount).toPrecision(6).replace(/\.?0+$/,""),b=N.formatUnits(w.verifiedBalance,w.tokenDecimals);return c.jsx(zn,{isOpen:e,onClose:t,title:v?"Funds in your wallet":"Incomplete Deposit",styles:h,closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"18px 24px 24px",fontFamily:k},children:[c.jsx("p",{style:{fontSize:"14px",color:g.textSecondary,lineHeight:"1.6",margin:"0 0 18px 0"},children:v?"These funds remain in your wallet. Network fees apply when depositing.":"Your funds reached your wallet, but the deposit didn't finish."}),c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",gap:"14px 18px",marginBottom:"24px",padding:"16px 18px",backgroundColor:y?g.cardBg:"#f8fafc",border:`1px solid ${g.cardBorder}`,borderRadius:y?"14px":"10px",boxShadow:y?"inset 0 1px 0 rgba(255,255,255,0.03)":"0 1px 2px rgba(16,24,40,0.04)"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:g.textSecondary,fontFamily:F,letterSpacing:"0.8px"},children:"NETWORK"}),c.jsx("span",{style:{fontSize:"18px",fontWeight:600,color:g.textPrimary,fontFamily:k,lineHeight:1.2},children:O})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",alignItems:"flex-end",textAlign:"right"},children:[c.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:g.textSecondary,fontFamily:F,letterSpacing:"0.8px"},children:v?"AVAILABLE BALANCE":"DEPOSITED AMOUNT"}),c.jsxs("span",{style:{fontSize:"24px",fontWeight:700,color:g.successText,fontFamily:F,lineHeight:1.1},children:[I," ",w.tokenSymbol]}),c.jsx("span",{style:{fontSize:"12px",color:g.textSecondary,fontWeight:500,fontFamily:k},children:v?"In your wallet":"Sent to embedded wallet"})]})]}),!w.hasFullBalance&&w.verifiedBalance>0n&&c.jsxs("div",{style:{marginBottom:"16px",padding:"8px 12px",backgroundColor:g.warningBg,border:`1px solid ${y?g.warningBorder:"#fcd34d"}`,borderRadius:"8px",fontSize:"13px",color:g.warningText,lineHeight:"1.4"},children:["Partial balance \u2014 only ",parseFloat(b).toFixed(4)," ",w.tokenSymbol," available."]}),(u||C)&&c.jsxs("div",{style:{marginBottom:"16px",color:g.textSecondary},children:[c.jsx("p",{role:"status",children:u?"Checking your wallet\u2026":"Balance unavailable. Try again."}),C&&m&&c.jsx(d.Button,{variant:"ghost",fullWidth:!0,disabled:l||u,onClick:m,theme:x,dark:y,children:"TRY AGAIN"})]}),f&&c.jsx("div",{style:{marginBottom:"16px",padding:"10px 12px",backgroundColor:g.errorBg,border:`1px solid ${y?g.errorBorder:"#fca5a5"}`,borderRadius:"8px",fontSize:"13px",color:y?g.errorText:"#991b1b",lineHeight:"1.4"},children:f}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[c.jsx(d.Button,{variant:"outline",fullWidth:!0,disabled:E,onClick:()=>r(w),theme:x,dark:y,styles:h,children:"CONFIRM DEPOSIT"}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[c.jsx(d.Button,{variant:"ghost",fullWidth:!0,disabled:E,onClick:()=>o(w),theme:x,dark:y,style:{height:"48px",fontSize:"13px",letterSpacing:"0.4px",color:y?g.textPrimary:"#374151",border:`1px solid ${y?g.cardBorder:"#d1d5db"}`,borderRadius:"12px",backgroundColor:y?"rgba(255,255,255,0.02)":"#ffffff"},children:l?"RETURNING...":"RETURN FUNDS"}),c.jsxs("div",{style:{display:"grid",gridTemplateColumns:a?"1fr 1fr":"1fr",gap:"10px"},children:[c.jsx(d.Button,{variant:"ghost",fullWidth:!0,disabled:l,onClick:i,theme:x,dark:y,style:{height:"44px",fontSize:"12px",letterSpacing:"0.4px",color:g.textSecondary,border:`1px solid ${y?g.cardBorder:"#d1d5db"}`,borderRadius:"12px",backgroundColor:"transparent"},children:"START OVER"}),a&&c.jsx(d.Button,{variant:"ghost",fullWidth:!0,disabled:l,onClick:a,theme:x,dark:y,style:{height:"44px",fontSize:"12px",letterSpacing:"0.4px",color:g.textSecondary,border:`1px solid ${y?g.cardBorder:"#d1d5db"}`,borderRadius:"12px",backgroundColor:"transparent"},children:"CHANGE WALLET"})]})]})]}),s.length>1&&c.jsx("p",{style:{fontSize:"12px",color:g.textSecondary,textAlign:"center",marginTop:"14px",marginBottom:0,lineHeight:"1.5"},children:s.some(A=>A.timestamp===0)?`${s.length} balances available. Review one at a time.`:`${s.length} incomplete deposits found. Review one at a time.`})]})})},jm=[{source:"wallet",title:"From Wallet",description:"Deposit crypto you already hold in a connected wallet"},{source:"card",title:"With Card",description:"Buy and deposit using a debit or credit card"},{source:"exchange",title:"From Exchange",description:"Transfer from Coinbase, Binance, or any exchange"}],Dm=({isOpen:e,onClose:t,closeOnBackdropClick:n,onSelect:s,styles:r})=>{const{dark:o,dk:i}=d.useSpiceBrand(r),[a,l]=p.useState(null);return c.jsx(zn,{isOpen:e,onClose:t,title:"Deposit",subtitle:"Choose how you want to add funds",styles:r,dark:o,closeOnBackdropClick:n,children:c.jsx("div",{style:{padding:"0 24px 25px",display:"flex",flexDirection:"column",gap:"12px",marginTop:"20px"},children:jm.map(({source:u,title:m,description:f})=>c.jsxs("button",{onClick:()=>s(u),onMouseEnter:()=>l(u),onMouseLeave:()=>l(null),style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",padding:"14px 16px",borderRadius:"8px",border:`1px solid ${o?i.cardBorder:"#e5e7eb"}`,backgroundColor:a===u?o?i.hoverBg:"#f9fafb":o?i.cardBg:"white",cursor:"pointer",textAlign:"left",transition:d.transition.color},children:[c.jsx("span",{style:{fontSize:"15px",fontWeight:600,fontFamily:d.font.ui,color:o?i.textPrimary:"#111827"},children:m}),c.jsx("span",{style:{fontSize:"13px",fontFamily:d.font.ui,color:o?i.textSecondary:"#6b7280"},children:f})]},u))})})},Nm=({isOpen:e,onClose:t,onBack:n,closeOnBackdropClick:s,source:r,destinationChainId:o,onShowWidget:i,onHideWidget:a,verifying:l,verifyError:u,onRetryVerify:m,funded:f,styles:h})=>{const{dark:y,dk:g,primaryColor:x,theme:w}=d.useSpiceBrand(h),v=d.getChainName(o),C=p.useRef(null),E=p.useRef(i);E.current=i;const k=p.useRef(a);k.current=a;const F=l||!!u||!!f;return p.useEffect(()=>{if(!e)return;const O=C.current;if(O){if(F){k.current();return}return E.current(O,r),()=>k.current()}},[e,r,F]),c.jsx(zn,{isOpen:e,onClose:t,title:r==="card"?"Deposit with Card":"Deposit from Exchange",styles:h,dark:y,closeOnBackdropClick:s,children:c.jsxs("div",{style:{padding:"0 24px 25px",display:"flex",flexDirection:"column",gap:"12px",marginTop:"12px"},children:[c.jsx("button",{onClick:n,disabled:l,style:{alignSelf:"flex-start",padding:0,border:"none",background:"none",fontSize:"13px",fontFamily:d.font.ui,color:y?g.textSecondary:"#6b7280",cursor:l?"default":"pointer",opacity:l?.5:1},children:"\u2190 Back"}),c.jsxs("div",{style:{position:"relative",width:"100%"},children:[c.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(d.Spinner,{size:28,color:x})}),c.jsx("div",{ref:C,style:{position:"relative",width:"100%",height:"560px"}}),F&&c.jsx("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"16px",padding:"24px",borderRadius:"9px",backgroundColor:y?"rgba(0, 0, 0, 0.82)":"rgba(255, 255, 255, 0.94)"},children:l?c.jsxs(c.Fragment,{children:[c.jsx(d.Spinner,{size:28,color:x}),c.jsxs("p",{style:{margin:0,fontSize:"14px",fontFamily:d.font.ui,color:y?g.textPrimary:"#111827",textAlign:"center"},children:["Confirming your deposit arrived on ",v,"\u2026"]})]}):f?c.jsxs(c.Fragment,{children:[c.jsxs("p",{style:{margin:0,fontSize:"14px",fontFamily:d.font.ui,color:y?g.textPrimary:"#111827",textAlign:"center"},children:[f.amount," ",f.symbol," is in your wallet on"," ",v,"."]}),c.jsx(d.Button,{variant:"outline",onClick:t,theme:w,dark:y,styles:h,children:"DONE"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{style:{margin:0,fontSize:"14px",fontFamily:d.font.ui,color:y?g.textPrimary:"#111827",textAlign:"center"},children:u}),c.jsx(d.Button,{variant:"outline",onClick:m,theme:w,dark:y,styles:h,children:"RETRY"}),c.jsx("button",{onClick:t,style:{padding:0,border:"none",background:"none",fontSize:"13px",fontFamily:d.font.ui,color:y?g.textSecondary:"#6b7280",cursor:"pointer",textDecoration:"underline"},children:"Close \u2014 we'll detect your funds later"})]})})]})]})})},Mm="692fb8af264069ca12a9",ar=42161,Pm=[8453,ar];function Um(e){const{targetKind:t,appChainId:n}=e;return t!=="external"||n===void 0||!Pm.includes(n)?ar:S.getTokenBySymbol("USDC",n)?n:ar}function Po(e=ar){return S.getTokenBySymbol("USDC",e)}function Wm(e){const t=e?.integratorId??Mm;return{integratorId:t,enabled:e?.enabled===!0&&t!=="",embedFactory:e?.embedFactory}}const qm=e=>import("@swapper-finance/deposit-sdk").then(t=>new t.SwapperEmbed(e));function Lm(e,t,n){return{themeMode:t?"dark":"light",componentStyles:{width:"100%",primaryColor:n,accentColor:n,borderRadius:"9px",...t?{backgroundColor:e.shell,surfaceColor:e.cardBg,surfaceAltColor:e.inputBg,textColor:e.textPrimary,border:`1px solid ${e.cardBorder}`}:{}}}}function gd(e){return e==="card"?["depositWithCash"]:e==="exchange"?["transferCrypto"]:["depositWithCash","transferCrypto"]}function zm(e){const t=e.destinationChainId??ar,n=Po(t);if(!n)throw new Error("USDC is not configured for the Swapper destination chain");return{iframeUrl:"https://swapper-deposit-sdk.web.app/",integratorId:e.integratorId,dstChainId:String(t),dstTokenAddr:n.address,depositWalletAddress:e.depositWalletAddress,supportedDepositOptions:gd(e.source),styles:e.styles,actionLabel:"deposit",flexibleHeight:!0,iframeAttributes:{borderRadius:"9px"}}}async function wd(e,t=ar){const n=Po(t);if(!n)throw new Error("USDC is not configured for the Swapper destination chain");return d.getClientForChain(t).readContract({address:n.address,abi:N.erc20Abi,functionName:"balanceOf",args:[e]})}async function Hm(e,t,n){const s=n?.timeoutMs??12e4,r=n?.intervalMs??3e3,o=Date.now()+s;for(;Date.now()<o;){if(n?.signal?.aborted)return null;try{const i=await wd(e,n?.chainId);if(i>t)return i}catch{}await new Promise(i=>setTimeout(i,r))}return null}const Vm=.01,Qm=5*60*1e3;function Gm(e){const t=Number(N.formatUnits(e.verifiedBalance,e.tokenDecimals));return Number.isFinite(t)?t:0}async function Km(e){const t=xd(e);let n;try{n=await ud(t.map(s=>s.tokenSymbol))}catch{return t}return t.filter(s=>{const r=Gm(s);if(r<=0)return!0;const o=n[s.tokenSymbol.toUpperCase()]??0;return!Number.isFinite(o)||o<=0?!0:r*o>=Vm})}function xd(e){const t=new Map;for(const n of e){const s=`${n.chainId}:${n.tokenAddress.toLowerCase()}`;if(!t.get(s)){const r=n.timestamp===0&&n.verifiedBalance>0n;t.set(s,{...n,amount:r?N.formatUnits(n.verifiedBalance,n.tokenDecimals):n.amount,rawAmount:r?n.verifiedBalance.toString():n.rawAmount,hasFullBalance:r?!0:n.hasFullBalance})}}return Array.from(t.values())}function yd(e,t){const[n,s]=p.useState([]),[r,o]=p.useState(!1),i=p.useRef(t);i.current=t;const a=!!t?.enabled,l=p.useRef(0),u=p.useRef([]),m=t?.chainIds?.join(","),f=t?.discoverWalletBalances??!0,h=p.useRef(0),y=p.useCallback(async({forceDiscovery:g=!1}={})=>{if(!e||i.current?.enabled===!1){s([]),o(!1);return}const x=++h.current,w=()=>x!==h.current;o(!0);try{const v=[],C=md(e),E=new Set(C.map(b=>`${b.chainId}:${b.tokenAddress.toLowerCase()}`)),k=[...C,...u.current.filter(b=>b.timestamp===0&&!E.has(`${b.chainId}:${b.tokenAddress.toLowerCase()}`))];for(const b of k){if(w())return;if(Is({address:b.tokenAddress,chainId:b.chainId,isNative:b.isNative}))try{const A=d.getClientForChain(b.chainId);let R;if(b.isNative||S.isNativeToken(b.tokenAddress)?R=await Kn.getBalance(A,{address:e}):R=await Kn.readContract(A,{address:N.getAddress(b.tokenAddress),abi:N.erc20Abi,functionName:"balanceOf",args:[e]}),w())return;if(R>0n)v.push({...b,verifiedBalance:R,hasFullBalance:R>=BigInt(b.rawAmount)});else{const B=Date.now()-b.timestamp;b.timestamp!==0&&B>15*60*1e3&&Do(e,b.chainId,b.tokenAddress)}}catch(A){if(w())return;console.warn(`[usePendingDeposit] Failed to verify balance for ${b.tokenSymbol} on chain ${b.chainId}:`,A),v.push({...b,verifiedBalance:0n,hasFullBalance:!1})}}if(w())return;const F=i.current,O=Date.now(),I=(F?.discoverWalletBalances??!0)&&(g||O-l.current>=Qm);if(F?.network&&I){l.current=O;const b=F.chainIds??S.getChainIdsByNetwork(F.network),A=new Set(v.map(B=>`${B.chainId}:${B.tokenAddress.toLowerCase()}`)),R=[];for(const B of b){const q=d.getChainConfig(B);if(q?.supportedTokens)for(const j of q.supportedTokens){if(!Is({address:j.address,chainId:B,isNative:!1}))continue;const P=`${B}:${j.address.toLowerCase()}`;A.has(P)||R.push((async()=>{try{const D=d.getClientForChain(B),M=await Kn.readContract(D,{address:N.getAddress(j.address),abi:N.erc20Abi,functionName:"balanceOf",args:[e]});return M>0n?{chainId:B,tokenAddress:j.address,tokenSymbol:j.symbol,tokenDecimals:j.decimals,amount:N.formatUnits(M,j.decimals),rawAmount:M.toString(),embeddedWalletAddress:e,externalWalletAddress:"",timestamp:0,isNative:!1,verifiedBalance:M,hasFullBalance:!0}:null}catch{return null}})())}}if(R.length>0){const B=await Promise.allSettled(R);if(w())return;for(const q of B)q.status==="fulfilled"&&q.value&&v.push(q.value)}}if(!w()){const b=await Km(v);if(w())return;u.current=xd(v),s(b)}}catch(v){if(console.error("[usePendingDeposit] Verification error:",v),!w()){const C=u.current.map(E=>({...E,verifiedBalance:0n,hasFullBalance:!1}));u.current=C,s(C)}}finally{w()||o(!1)}},[e]);return p.useEffect(()=>{if(u.current=[],l.current=0,s([]),!a){h.current++,o(!1);return}y({forceDiscovery:!0});const g=i.current?.pollIntervalMs??3e4;if(g<=0||!e)return()=>{h.current++};const x=setInterval(()=>{y({forceDiscovery:!1})},g),w=()=>y({forceDiscovery:!0});return window.addEventListener(jo,w),()=>{h.current++,window.removeEventListener(jo,w),clearInterval(x)}},[y,e,a,t?.network,m,f]),{pendingDeposits:n,loading:r,refresh:()=>y({forceDiscovery:!0})}}function Ym({enabled:e,integratorId:t,depositWalletAddress:n,destinationChainId:s,brand:r,embedFactory:o,onTransactionSuccess:i,onCloseRequest:a}){const l=p.useRef(null),u=p.useRef(null),m=p.useRef(i);m.current=i;const f=p.useRef(a);f.current=a;const h=p.useRef(r);h.current=r;const y=p.useRef(o);y.current=o;const g=p.useCallback((v,C,E)=>{if(!C.isConnected)return;const k=v.getIframe();k.updateConfig({supportedDepositOptions:gd(E)}),k.sendConfig(),v.showIn(C)},[]);p.useEffect(()=>{if(!e||!n)return;let v=!1;return Promise.resolve().then(()=>{const{dk:C,dark:E,primaryColor:k}=h.current;return(y.current??qm)(zm({integratorId:t,depositWalletAddress:n,destinationChainId:s,source:null,styles:Lm(C,E,k)}))}).then(C=>{if(v){C.destroy();return}const E=C.getIframe();E.on("transaction_success",F=>m.current(F)),E.on("close_request",()=>f.current()),l.current=C;const k=u.current;k&&g(C,k.placeholder,k.source)}).catch(C=>{console.error("[useSwapperEmbed] Failed to preload Swapper widget:",C)}),()=>{v=!0,u.current=null,l.current?.destroy(),l.current=null}},[e,t,n,s,g]);const x=p.useCallback((v,C)=>{u.current={placeholder:v,source:C};const E=l.current;E&&g(E,v,C)},[g]),w=p.useCallback(()=>{u.current=null,l.current?.hide()},[]);return{showWidget:x,hideWidget:w}}function Zm(e,t,n,s,r){return{address:t,symbol:n||"UNKNOWN",name:n||"Unknown Token",decimals:s||18,chainId:e,balance:0n,balanceFormatted:r?parseFloat(r):0,balanceUsd:0,isNative:S.isNativeToken(t)}}const Xm=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,styles:s,depositBatches:r,onDepositAmountChange:o,destinationChainId:i,destinationTokenAddress:a,onDepositExecute:l,depositActionLabel:u,sponsorGas:m=!1,escrowRecovery:f,skipTokenSelection:h=!1,directSubmit:y=!1,onSubmit:g,onDepositSuccess:x,onDepositError:w,skipRecovery:v=!0})=>{const C=p.useContext(d.SpiceFlowProviderContext);if(!C)return c.jsx("div",{children:"Error: SpiceDeposit must be used within SpiceFlowProvider"});const E=(C.mode||"7702")!="7702",k=E,F=C.nativeChainId,O=C.network||"testnet",{dark:I,dk:b,primaryColor:A}=d.useSpiceBrand(s),R=!!f,B=d.useWallet(),{isReady:q,isAuthenticated:j,actions:P}=B,D=C?.embeddedWalletAddress,M=C.externalWalletAddress,L=!!M,T=Wm(C.swapper),H=k?{address:M,kind:"external"}:{address:D,kind:"embedded"},V=Um({targetKind:H.kind,appChainId:i||F}),te=T.enabled&&!R&&O==="mainnet"&&!!Po(V),Z=()=>h?"deposit":"select-token",K=()=>te?"select-source":k?L?Z():"connect-wallet":"provider-login",[Y,J]=p.useState(K()),[we,me]=p.useState(null),[xe,Ce]=p.useState(!1),[ne,_]=p.useState(null),[de,W]=p.useState(!1),[je,Ae]=p.useState(null),[z,Q]=p.useState(null),[se,ce]=p.useState(null),X=p.useRef(null),oe=p.useRef(null),{pendingDeposits:Oe,loading:Ne,refresh:he}=yd(D,{enabled:e&&!v,network:O,chainIds:C.supportedChainIds}),Se=p.useMemo(()=>Oe.filter(ee=>ee.embeddedWalletAddress.toLowerCase()===D?.toLowerCase()),[Oe,D]),[Te,ve]=p.useState(null),[We,be]=p.useState(!1),[Pe,ue]=p.useState(null),[Ke,ft]=p.useState(!1),[tt,$e]=p.useState("idle");p.useEffect(()=>{if(e&&Y==="recovery"&&!We&&!Ne&&Se.length===0){J(K());return}e&&!v&&!R&&!Te&&!Ke&&tt==="idle"&&j&&D&&L&&M&&!Ne&&Se.length>0&&Y!=="recovery"&&Y!=="deposit"&&Y!=="swapper"&&J("recovery")},[e,v,R,j,D,L,M,Ne,Se,Y,Te,Ke,tt,We,te,k,h]);const Qe=p.useCallback(ee=>{const mt={address:ee.tokenAddress,symbol:ee.tokenSymbol,name:ee.tokenSymbol,decimals:ee.tokenDecimals,chainId:ee.chainId,balance:ee.verifiedBalance,balanceFormatted:parseFloat(ee.amount),balanceUsd:0,isNative:ee.isNative};me(mt),ve(ee),J("deposit")},[]),Ee=p.useCallback(ee=>{if(_(ee),k){J(L?ee==="wallet"?Z():"swapper":"connect-wallet");return}const mt=j&&!!D;J(ee==="wallet"?mt?L?Z():"connect-wallet":"provider-login":mt?"swapper":"provider-login")},[k,j,D,L,h]),Ie=p.useCallback(()=>{oe.current?.abort(),W(!1),Ae(null),Q(null),_(null),X.current=null,ce(null),J("select-source")},[]);p.useEffect(()=>{Y==="swapper"&&(se||!H.address||ce({address:H.address,kind:H.kind}))},[Y,se,H.address,H.kind]);const lt=se??H,_e=lt.address,ae=lt.kind,dt=p.useCallback(async ee=>{if(!e||Y!=="swapper"||!_e)return;oe.current?.abort();const mt=new AbortController;oe.current=mt,Ae(null),W(!0);const Re=Po(V);if(!Re){W(!1);return}const ze=At=>{W(!1);const ht=N.formatUnits(At,Re.decimals);if(ae==="external"){Q({amount:ht,symbol:Re.symbol});const Pt={type:"wallet-funding",status:"success",amount:ht,asset:Re.address,sourceChain:String(V)};window.dispatchEvent(new CustomEvent("spiceflow:action",{detail:Pt})),x?.(Pt);return}Qe({chainId:V,tokenAddress:Re.address,tokenSymbol:Re.symbol,tokenDecimals:Re.decimals,amount:ht,rawAmount:At.toString(),embeddedWalletAddress:_e,externalWalletAddress:"",timestamp:0,isNative:!1,verifiedBalance:At,hasFullBalance:!0})},et=X.current,it=await et;if(mt.signal.aborted||X.current!==et)return;if(it===null){W(!1),Ae("Unable to confirm your starting balance. Go back and reopen the deposit to try again.");return}const Ve=await Hm(_e,it,{signal:mt.signal,chainId:V});if(!mt.signal.aborted){if(Ve===null){W(!1);const At=d.getChainConfig(V)?.viemChain?.name??`chain ${V}`;Ae(`We haven't seen your funds arrive on ${At} yet \u2014 they may still be in transit.`);return}ze(Ve)}},[e,Y,_e,ae,V,Qe,x]);p.useEffect(()=>{if(!e||Y!=="swapper"||!_e)return;const ee=wd(_e,V).catch(()=>null);return X.current=ee,()=>{X.current===ee&&(X.current=null),oe.current?.abort()}},[e,Y,_e,V]);const{showWidget:ut,hideWidget:Me}=Ym({enabled:e&&te,integratorId:T.integratorId,depositWalletAddress:_e,destinationChainId:V,brand:{dk:b,dark:I,primaryColor:A},embedFactory:T.embedFactory,onTransactionSuccess:dt,onCloseRequest:()=>{de||Ie()}}),bt=p.useCallback(()=>{ft(!0),J(j&&D&&L&&M?h?"deposit":"select-token":j&&D?"connect-wallet":"provider-login")},[j,D,L,M,h]),Rt=p.useCallback(()=>{ue(null),$e("awaiting-disconnect"),J("connect-wallet")},[]),Xt=p.useCallback(async ee=>{be(!0),ue(null);try{if(!D)throw new Error("Embedded wallet not available");const mt=await P.getEthereumProvider(),Re=d.getChainConfig(ee.chainId);await d.ensureWalletOnChain(mt,ee.chainId);const ze=d.getClientForChain(ee.chainId),et=await Kn.getBalance(ze,{address:D}),it=Re?.viemChain?.name||`chain ${ee.chainId}`;if(et===0n)throw new Error(`Your embedded wallet has no ETH on ${it} to pay for gas. We recommend completing the deposit instead \u2014 it doesn't require gas.`);const Ve=N.createWalletClient({account:D,transport:N.custom(mt),chain:Re?.viemChain}),At=ee.externalWalletAddress&&N.isAddress(ee.externalWalletAddress)?ee.externalWalletAddress:M;if(!At||!N.isAddress(At))throw new Error("Connect the external wallet that should receive these funds, then try again.");const ht={recipient:At,tokenAddr:ee.tokenAddress,isNative:ee.isNative||S.isNativeToken(ee.tokenAddress),amount:ee.verifiedBalance,viemChain:Re?.viemChain},Pt=await Pa(Ve,ht),{receipt:pt}=await mo({client:ze,hash:Pt,call:Eo(ht.recipient,ht.tokenAddr,ht.isNative,ht.amount),confirmations:1});if(pt.status!=="success")throw new Error("The return transaction failed. Please try again.");Do(ee.embeddedWalletAddress,ee.chainId,ee.tokenAddress),he(),Oe.length<=1&&J(K())}catch(mt){const Re=mt?.message||"Couldn't return your funds. Please try again.",ze=/insufficient funds for gas/i.test(Re);ue(ze?"Not enough ETH in your embedded wallet to cover gas fees. Complete the deposit instead \u2014 it doesn't require gas.":Re)}finally{be(!1)}},[P,D,M,Oe,he]);p.useEffect(()=>{e||(ve(null),ue(null),be(!1),ft(!1),$e("idle"),oe.current?.abort(),_(null),W(!1),Ae(null),Q(null),X.current=null,ce(null))},[e]),p.useEffect(()=>{if(!(v||tt==="idle")){if(tt==="awaiting-disconnect"){(!L||!M)&&$e("awaiting-reconnect");return}e&&!Ne&&Oe.length>0&&j&&D&&($e("idle"),J("recovery"))}},[v,tt,L,M,e,Ne,Oe,j,D]),p.useEffect(()=>{!R||!e||(j&&D?(Ce(!0),!we&&f?.chainId&&f?.tokenAddress&&me(Zm(f.chainId,f.tokenAddress,f.tokenSymbol,f.tokenDecimals,f.amount)),J("deposit")):J("provider-login"))},[R,e,Y,j,D]);const{assets:St,loading:un}=Fr({address:M,supportedChains:C.supportedChainIds,fetchBalances:Zs,enabled:e&&!!M,refreshInterval:e?5e3:0}),ot=p.useCallback(()=>{Ce(!0),J(R?"deposit":ne==="card"||ne==="exchange"?"swapper":L?h?"deposit":"select-token":"connect-wallet")},[R,ne,L,h]),Le=p.useCallback(async()=>{if((!L||!M)&&(await qn(500),!L||!M)){alert("Please connect your wallet first");return}J(h?"deposit":"select-token")},[L,M,h]),at=p.useCallback(ee=>{me(ee),J("deposit")},[]),rt=p.useCallback(()=>{if(me(null),o?.(""),!M){J("connect-wallet");return}J("select-token")},[M,o]),wt=p.useCallback(()=>{t()},[t]);if(p.useEffect(()=>{if(!e){const ee=setTimeout(()=>{R||(J(K()),me(null)),Ce(!1)},300);return()=>clearTimeout(ee)}},[e,R,f?.chainId]),p.useEffect(()=>{e&&Y==="deposit"&&!we&&!R&&!Te&&!h&&J("select-token")},[e,Y,we,R,Te,h]),p.useEffect(()=>{if(e&&Y==="connect-wallet"&&L&&M&&tt==="idle"){if(te&&!ne){J("select-source");return}if(te&&ne&&ne!=="wallet"){J("swapper");return}J(h?"deposit":"select-token")}},[e,Y,L,M,tt,h,te,ne]),p.useEffect(()=>{if(!k&&e&&Y==="provider-login"&&q&&j&&D&&!xe){const ee=setTimeout(()=>{Ce(!0),J(ne==="card"||ne==="exchange"?"swapper":L?h?"deposit":"select-token":"connect-wallet")},100);return()=>clearTimeout(ee)}},[k,e,Y,q,j,D,ne,L,h,xe]),!e)return null;if(Y==="recovery")return c.jsx(Om,{isOpen:e,onClose:wt,closeOnBackdropClick:n,deposits:Se,onComplete:Qe,onCancel:Xt,onSkip:bt,onChangeWallet:Rt,isProcessing:We,isVerifying:Ne,onRefresh:he,error:Pe,styles:s});if(Y==="select-source")return te?c.jsx(Dm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,onSelect:Ee,styles:s}):(J("provider-login"),null);if(Y==="swapper")return ne!=="card"&&ne!=="exchange"?(J(K()),null):_e?c.jsx(Nm,{isOpen:e,onClose:wt,onBack:Ie,closeOnBackdropClick:n,source:ne,destinationChainId:V,onShowWidget:ut,onHideWidget:Me,verifying:de,verifyError:je,onRetryVerify:dt,funded:z,styles:s}):c.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:50},children:c.jsx("div",{style:{backgroundColor:I?b.cardBg:"white",borderRadius:"9px",padding:"32px 24px",maxWidth:"400px",width:"100%",textAlign:"center",fontFamily:'"Helvetica Neue", sans-serif',fontSize:"14px",color:I?b.textPrimary:"#111827"},children:"Preparing your account..."})});if(Y==="provider-login"&&!k)return c.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:50},children:c.jsx("div",{style:{backgroundColor:I?b.cardBg:"white",borderRadius:"9px",padding:"32px 24px",maxWidth:"400px",width:"100%"},children:c.jsx(wa,{onAuthSuccess:ot,autoTrigger:!0})})});if(Y==="connect-wallet")return c.jsx(pm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,onContinue:Le,requiredChainId:E?F:void 0,styles:s});if(Y==="select-token")return M?c.jsx(lm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,onTokenSelect:at,walletAddress:M,supportedChainIds:C.supportedChainIds,network:O,prefetchedAssets:un?null:St??null,styles:s,dark:I}):(J("connect-wallet"),null);if(Y==="deposit"){if(!we&&!h)return null;const ee=!!Te;return c.jsx(Bm,{isOpen:e,onClose:wt,closeOnBackdropClick:n,supportedChains:we?[we.chainId]:C.supportedChainIds??[],styles:s,externalWalletAddress:M,depositBatches:ee?void 0:r,onDepositAmountChange:o,destinationChainId:i,destinationTokenAddress:a,onDepositExecute:l,depositActionLabel:u,nativeChainId:F,sponsorGas:m,preSelectedAsset:we??void 0,escrowOnly:R||ee,escrowTokenAddress:ee?Te.tokenAddress:f?.tokenAddress,escrowAmount:ee?Te.amount:f?.amount,escrowTokenDecimals:ee?Te.tokenDecimals:f?.tokenDecimals,escrowTokenSymbol:ee?Te.tokenSymbol:f?.tokenSymbol,onSubmit:g,directSubmit:y,onDepositSuccess:x,onDepositError:w,embeddedWalletAddress:D,onViewAllAssets:h?void 0:rt})}return null},bd=e=>p.useContext(d.SpiceFlowProviderContext)?c.jsx(Xm,{...e}):c.jsx("div",{children:"Error: SpiceDeposit must be used within SpiceFlowProvider"}),Jm=({depositProps:e,withdrawProps:t,...n})=>{const[s,r]=p.useState(!1),[o,i]=p.useState(null);return c.jsxs(c.Fragment,{children:[c.jsx(sd,{...n,onDepositClick:()=>r(!0),onWithdrawClick:a=>i({assetId:a})}),c.jsx(bd,{styles:n.styles,onDepositSuccess:n.onDepositSuccess,...e,isOpen:s,onClose:()=>r(!1)}),c.jsx(Ha,{styles:n.styles,...t,isOpen:!!o,onClose:()=>i(null),initialSourceAssetId:o?.assetId})]})},$m=({isOpen:e,onClose:t,onChainSelect:n,supportedChains:s,closeOnSelect:r=!0,styles:o})=>{const{theme:i,dark:a,primaryColor:l,dk:u}=d.useSpiceBrand(o),[m,f]=p.useState(""),[h,y]=p.useState(null),[g,x]=p.useState(null),[w,v]=p.useState(!1),[C,E]=p.useState(null),{switchChainAsync:k}=is.useSwitchChain(),F=p.useMemo(()=>new Set(s||[]),[s]),O=p.useMemo(()=>{if(!s||s.length===0)return[];const R=[];return s.forEach((B,q)=>{if(typeof B!="number")return;const j=d.getChainConfig(B);j&&R.push({id:B.toString(),name:j.displayName,icon:bs[B]||Sr,chainId:B,verified:!0,order:q})}),R},[s]);p.useEffect(()=>{h&&!F.has(parseInt(h,10))&&y(null)},[h,F]);const I=p.useMemo(()=>O.filter(R=>R.name.toLowerCase().includes(m.toLowerCase())).sort((R,B)=>R.order-B.order),[O,m]),b=async()=>{if(!h)return;const R=parseInt(h,10);v(!0),E(null);try{await k({chainId:R}),n&&n(h),r&&t()}catch(B){console.error("Failed to switch chain:",B),E(d.sanitizeError(B,"Failed to switch chain."))}finally{v(!1)}},A=!h||w;return c.jsxs(zn,{isOpen:e,onClose:t,title:"Select Chain",styles:o,theme:i,dark:a,children:[c.jsx("div",{style:{padding:"24px 20px"},children:c.jsx(Ka,{value:m,onChange:f,ariaLabel:"Search chains",placeholder:"Search chain name, symbol or address",size:"md",dark:a,styles:o,endAdornment:c.jsx("div",{style:{padding:"5px 5px",borderRadius:"3px",fontSize:"13px",backgroundColor:a?u.cardBg:"#E9E9E9",color:a?u.textSecondary:"#485066",fontWeight:500,flexShrink:0},"aria-hidden":"true",children:"\u2318F"})})}),c.jsx("div",{style:{padding:"0 32px 20px",display:"flex",flexDirection:"column",gap:"12px"},children:I.map(R=>{const B=h===R.id,q=g===R.id;return c.jsxs("button",{onClick:()=>y(R.id),onMouseEnter:()=>x(R.id),onMouseLeave:()=>x(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"16px",padding:"8px",borderRadius:"8px",backgroundColor:B?a?`${l}15`:`${l}12`:"transparent",border:B?a?`1px solid ${l}66`:`1px solid ${l}88`:q?a?`1px solid ${l}44`:`1px solid ${l}66`:"1px solid transparent",cursor:"pointer",transition:d.transition.interactive},children:[c.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"30px"},children:c.jsx("img",{src:R.icon,alt:R.name,loading:"lazy",decoding:"async",style:{width:"100%",height:"100%",borderRadius:"50%"}})}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",flex:1},children:[c.jsx("span",{style:{fontFamily:d.font.mono,fontSize:"17px",fontWeight:500,letterSpacing:"0.4px",color:u.textPrimary,textAlign:"left"},children:R.name}),R.verified&&c.jsx("img",{src:od,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",width:16,height:16,style:{width:"16px",height:"16px",filter:a?"brightness(0) invert(1)":"none"}})]})]},R.id)})}),C&&c.jsx("div",{style:{padding:"0 25px 12px"},children:c.jsx(vn,{variant:"error",size:"compact",palette:u,children:C})}),c.jsx("div",{style:{padding:"0 25px 25px"},children:c.jsxs(d.Button,{variant:"outline",onClick:b,disabled:A,fullWidth:!0,theme:i,styles:o,dark:a,children:["SELECT",c.jsx(Ap,{size:20})]})})]})};function vd(e){const t=Ql({enabled:e.enabled,chainId:e.lockChainId,address:e.destinationTokenAddress,decimals:e.destinationTokenDecimals,symbol:e.lockTokenSymbol,logoURI:e.lockTokenLogoURI}),n=t.token,s=p.useCallback((i,a)=>{if(!t.ready)throw new Error("Lock token metadata is unavailable.");const l={...n,name:n.symbol,isNative:S.isNativeToken(n.address),balance:0n,balanceFormatted:0,balanceUsd:0},u=typeof e.lockBatches=="function"?e.lockBatches({asset:l,amount:N.formatUnits(i,l.decimals),amountWei:i,feeAdjusted:!0,beneficiary:a.beneficiary??a.userAddress,executorAddress:a.executorAddress}):e.lockBatches;if(u.some(m=>m.chainId!==e.lockChainId||m.domain==="spicenet"||m.tokenTransfers?.some(f=>f.from!=="escrow"||!d.addressesEqual(f.token,n.address))))throw new Error("Lock action definitions must contain destination contract calls; the SDK supplies conversion and delivery.");return u.flatMap(m=>m.calls)},[t.ready,n,e.lockBatches,e.lockChainId]),r=Wr({enabled:t.ready,destinationToken:t.ready?n:void 0,selectedAsset:e.selectedAsset,amountDirection:"input-inclusive",feeFunding:e.feeFunding,combineSourceBalances:e.combineSourceBalances,recipient:e.beneficiary,buildActionCalls:s,buildSpicenetBatch:e.buildSpicenetBatch,onSubmit:e.onSubmit,onSuccess:e.onLockSuccess,onError:(i,a)=>e.onLockError?.(i.message,a)}),o=p.useCallback(()=>{t.refresh(),r.quote.refreshQuote()},[t.refresh,r.quote.refreshQuote]);return{...r,quote:{...r.quote,refreshQuote:o},destination:n,metadataError:t.error,canExecute:t.ready&&r.canExecute}}function _m(e){const t=new Date;t.setDate(t.getDate()+Math.floor(e*30));const n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=t.getDate(),r=s===1||s===21||s===31?"st":s===2||s===22?"nd":s===3||s===23?"rd":"th";return`${n[t.getMonth()]} ${s}${r} ${t.getFullYear()}`}const eh=({label:e,value:t,fontFamily:n,dark:s=!1,textPrimary:r="#111827",textSecondary:o="#6b7280"})=>c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[c.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",style:{flexShrink:0},children:[c.jsx("circle",{cx:"7",cy:"7",r:"6.5",stroke:o,strokeWidth:"1.2"}),c.jsx("path",{d:"M7 6v4",stroke:o,strokeWidth:"1.2",strokeLinecap:"round"}),c.jsx("circle",{cx:"7",cy:"4.5",r:"0.7",fill:o})]}),c.jsx("span",{style:{fontSize:"13px",color:o,fontFamily:n},children:e})]}),c.jsx("span",{style:{fontSize:s?"17px":"13px",fontWeight:700,color:r,fontFamily:d.font.mono,letterSpacing:"0.3px"},children:t})]}),Cd=p.memo(eh),th=({options:e,selectedIndex:t,onSelect:n,primaryColor:s,dark:r=!1,textPrimary:o="#111827",textSecondary:i="#6b7280",trackColor:a})=>{const l=e.length-1,u=a||(r?"#3a3a3a":"#d1d5db"),m=r?"4px":"50%",f=r?"none":"2px solid white",h=r?"none":`0 0 0 1px ${s}`;return c.jsxs("div",{style:{width:"100%",userSelect:"none"},children:[c.jsxs("div",{style:{position:"relative",paddingBottom:"4px"},children:[c.jsx("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:"4px",background:u,borderRadius:"2px",transform:"translateY(-50%)",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",top:"50%",left:0,width:`${t/l*100}%`,height:"4px",background:s,borderRadius:"2px",transform:"translateY(-50%)",pointerEvents:"none",transition:"width 0.15s ease"}}),c.jsx("input",{type:"range","aria-label":"Lock duration","aria-valuetext":e[t]?.label,"data-spiceflow-focus":!0,min:0,max:l,step:1,value:t,onChange:y=>n(Number(y.target.value)),style:{WebkitAppearance:"none",appearance:"none",width:"100%",height:"20px",background:"transparent",cursor:"pointer",outline:"none",border:"none",position:"relative",zIndex:1,margin:0,padding:0}})]}),c.jsx("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"6px"},children:e.map((y,g)=>c.jsxs("div",{onClick:()=>n(g),style:{display:"flex",flexDirection:"column",alignItems:g===0?"flex-start":g===l?"flex-end":"center",cursor:"pointer",flex:1},children:[c.jsx("span",{style:{fontSize:"12px",fontWeight:g===t?700:400,color:g===t?o:i,whiteSpace:"nowrap",transition:"color 0.15s, font-weight 0.15s"},children:y.label}),y.highlight&&c.jsx("span",{style:{fontSize:"10px",color:i,whiteSpace:"nowrap"},children:"(most common)"})]},g))}),c.jsx("style",{children:`
|
|
50
50
|
input[type='range']::-webkit-slider-thumb {
|
|
51
51
|
-webkit-appearance: none;
|
|
52
52
|
width: 20px;
|
|
@@ -70,4 +70,4 @@ Order: ${e}`}function Ia(e){const t=e.intents[0];if(e.intents.length!==1||t.mode
|
|
|
70
70
|
input[type='range']::-webkit-slider-thumb:hover {
|
|
71
71
|
transform: scale(1.12);
|
|
72
72
|
}
|
|
73
|
-
`})]})},th=p.memo(eh),nh=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,lockBatches:s,lockTokenSymbol:r,lockTokenLogoURI:o,destinationInputHook:i,sourceAssetInputHook:a,lockDurationHook:d,lockChainId:u,durationOptions:m,votingPowerEstimate:f,destinationTokenAddress:h,destinationTokenDecimals:y,beneficiary:g,onSubmit:x,onLockSuccess:w,onLockError:v,onLockExecute:C,sourceToDestinationConversionRate:E,onAddFunds:k,buildSpicenetBatch:F,feeFunding:j,combineSourceBalances:I,styles:b,dark:A})=>{const{theme:R,dark:B,primaryColor:q,dk:O}=l.useSpiceBrand(b,A),P=R.typography.fontFamily,D=B?O.cardBg:b?.assetSelector?.backgroundColor||b?.secondaryBackground||"#e9e9e9",M=B?`1px solid ${O.cardBorder}`:"0.5px solid #A8A8A7",L=B?"12px":"6px",T=B?O.textPrimary:"#111827",H=B?O.textSecondary:"#6b7280",V=p.useMemo(()=>({...b,assetSelector:{...b?.assetSelector,backgroundColor:B?O.cardBg:b?.assetSelector?.backgroundColor,borderRadius:B?"12px":b?.assetSelector?.borderRadius},secondaryBackground:B?O.cardBg:b?.secondaryBackground}),[b,B]),te=p.useMemo(()=>B?{...R,colors:{...R.colors,secondary:O.cardBg,surfaceHover:O.hoverBg,border:O.cardBorder,borderHover:O.inputBorder}}:R,[B,R]),[Z,K]=p.useState(null),Y=p.useRef(!1);p.useEffect(()=>{e||(Y.current=!1)},[e]);const[J,ge]=p.useState(0),pe=d?.selectedDurationIdx??J,we=d?.setSelectedDurationIdx??ge,ve=d?.selectedDuration??m[pe]??m[0],ne=bd({enabled:e&&!C,selectedAsset:Z,lockBatches:s,lockChainId:u,lockTokenSymbol:r,lockTokenLogoURI:o,destinationTokenAddress:h,destinationTokenDecimals:y,beneficiary:g,onSubmit:x,onLockSuccess:w,onLockError:v,buildSpicenetBatch:F,feeFunding:j,combineSourceBalances:I}),_=ne.assets.selectable,{isExecuting:le,step:W,txHash:De}=ne.status,[Ae,z]=p.useState(!1),Q=Number(Z?.amount||"0"),se=ne.quote.isDirect,ie=!se,X=ne.fees.error,oe=ne.fees.isLoading,je=ne.fees.preview,Me=Q>0,me={error:ne.quote.quoteError,isQuoting:ne.quote.isQuoting},Se=C?"Move onLockExecute protocol calls to lockBatches and application updates to onLockSuccess before continuing.":ne.metadataError||ne.status.error||X||me.error,Te=ne.canExecute,be=ne.fees.destinationAmount,qe=be===void 0?"0":N.formatUnits(be,ne.destination.decimals),ye=Number(qe),Ue=ye>0?ye.toLocaleString(void 0,{maximumSignificantDigits:6}):null,de=_.find(Pe=>Pe.chainId===u&&Pe.address.toLowerCase()===ne.destination.address.toLowerCase()),Ye=de&&de.balanceFormatted>0&&de.balanceUsd>0?de.balanceUsd/de.balanceFormatted:E&&E>0?E:null,pt=Ye===null?null:(ye*Ye).toFixed(2),tt=Z&&Z.asset.balanceFormatted>0&&Z.asset.balanceUsd>0?Z.asset.balanceUsd/Z.asset.balanceFormatted:se?Ye:null,$e=tt===null?void 0:`$${(Q*tt).toFixed(2)}`,Ge=f&&ye>0&&ve?f(ye,ve.months):void 0,Fe=p.useCallback(Pe=>{K(vt=>({asset:Pe,amount:vt&&xe(vt.asset)===xe(Pe)?vt.amount:""})),ne.retrySupply(),a?.setSelectedAsset({address:Pe.address,symbol:Pe.symbol,decimals:Pe.decimals,chainId:Pe.chainId})},[a?.setSelectedAsset,ne.retrySupply]),Ie=p.useCallback(Pe=>{K(vt=>vt&&{...vt,amount:Pe}),a?.setAssetAmount(Pe),ne.retrySupply()},[a?.setAssetAmount,ne.retrySupply]);p.useEffect(()=>{if(ne.capability?.policyExcluded){K(null);return}le||ne.assets.loading||ne.assets.refreshing||ne.assets.error||K(Pe=>{if(!Pe)return Y.current||!_[0]?null:(Y.current=!0,{asset:_[0],amount:a?.assetAmount??""});const vt=_.find(Tt=>xe(Tt)===xe(Pe.asset));return vt?vt===Pe.asset?Pe:{...Pe,asset:vt}:Pe.asset.balance===0n?Pe:{...Pe,asset:{...Pe.asset,balance:0n,balanceFormatted:0,balanceUsd:0}}})},[_,le,ne.assets.loading,ne.assets.refreshing,ne.assets.error,ne.capability?.policyExcluded]),p.useEffect(()=>{i&&(i.setSelectedAsset(ne.destination),i.setAssetAmount(qe))},[ne.destination,qe,i?.setSelectedAsset,i?.setAssetAmount]);const lt=async()=>{z(!0),await ne.submitSupply()},_e=()=>{z(!1),ne.retrySupply()},ae=()=>{z(!1),K(null),ne.resetAfterSuccess()},dt=c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"6px"},children:[c.jsx(Qa,{color:H}),c.jsxs("p",{style:{fontSize:"13px",color:H,margin:0,lineHeight:"1.5"},children:["Add ",r," by converting assets from your account"]})]});if(!e)return null;const ut={backgroundColor:D,border:M,borderRadius:L,padding:"16px",marginBottom:"16px"};return c.jsx(Hn,{isOpen:e,onClose:t,title:`Add ${r} to your account`,subtitle:dt,styles:b,dark:B,footerLinkText:"Spicenet accounts \u2192",closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"0 24px 8px 24px",position:"relative"},children:[c.jsx(xo,{activity:ne.status.activity,palette:O,onRefresh:()=>{ne.assets.refreshSpiceAssets(),ne.assets.refreshWalletAssets()}}),c.jsxs("div",{style:{marginBottom:"12px"},children:[k&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"6px"},children:c.jsx(ni,{onClick:k,color:q,fontFamily:P})}),c.jsx("div",{style:{marginTop:"10px",fontSize:"13px",color:H,fontFamily:P},children:c.jsx(or,{assets:_,selectedAsset:Z??void 0,onAssetSelect:Fe,onAmountChange:Ie,label:"Amount",showBalance:!0,getAvailableBalance:ne.assets.getAvailableBalance,showMaxButton:!0,disabled:le||ne.status.finalizing,maxAmount:Z&&ne.amount.availableBalance!==void 0?N.formatUnits(ne.amount.availableBalance,Z.asset.decimals):void 0,resolveMaxAmount:ne.resolveMaxAmount,theme:te,styles:V})}),c.jsx("div",{style:{marginTop:"6px",paddingLeft:"4px",fontSize:"13px",color:H,fontFamily:P},children:$e})]}),c.jsxs("div",{style:ut,children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"16px",borderBottom:B?`1px solid ${O.cardBorder}`:"1px solid #e5e7eb"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[o?c.jsx("img",{src:o,alt:r,style:{width:"32px",height:"32px",borderRadius:"50%",objectFit:"cover"}}):c.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:B?O.inputBg:"#d1d5db",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:700,color:T},children:r.slice(0,2)}),c.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:T,fontFamily:P},children:r})]}),c.jsxs("div",{style:{textAlign:"right"},children:[c.jsx("div",{style:{fontSize:"22px",fontWeight:700,color:T,fontFamily:P,lineHeight:1.1},children:Ue??"0.00"}),(!ie||pt!==null)&&c.jsxs("div",{style:{fontSize:"12px",color:H,fontFamily:P,marginTop:"2px"},children:["~$",pt??"0.00"]})]})]}),c.jsxs("div",{style:{paddingTop:"16px",paddingBottom:"16px",borderBottom:B?`1px solid ${O.cardBorder}`:"1px solid #e5e7eb"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[c.jsx("span",{style:{fontSize:"15px",fontWeight:500,color:H,fontFamily:P},children:"Lock Duration"}),c.jsx($s,{color:H})]}),c.jsx(th,{options:m,selectedIndex:pe,onSelect:Pe=>{!le&&!ne.status.finalizing&&we(Pe)},primaryColor:q,dark:B,textPrimary:T,textSecondary:H})]}),c.jsxs("div",{style:{paddingTop:"12px",display:"flex",flexDirection:"column",gap:"8px"},children:[c.jsx(vd,{label:"Estimated Lock Expiry",value:ve?.months!==void 0?$m(ve.months):"\u2014",fontFamily:P,dark:B,textPrimary:T,textSecondary:H}),f&&c.jsx(vd,{label:"Estimated voting power",value:Ge!==void 0?`${Ge} votes/epoch`:"\u2014",fontFamily:P,dark:B,textPrimary:T,textSecondary:H})]})]}),Me&&c.jsx($a,{fontFamily:P,textPrimary:T,textSecondary:H,cardBg:D,cardBorder:M,resolvedDark:B,darkCardBorder:O.cardBorder,primaryColor:q,feePreview:je,asset:Z?.asset,directExecutionFeeNote:ne.flags.directExecutionFeeNote,isLoading:oe||me.isQuoting,errorText:X}),ne.status.finalizationError&&c.jsx(l.Button,{onClick:ne.retryFinalization,disabled:ne.status.finalizing,children:"Retry application update"}),Se&&c.jsx(vn,{variant:"error",palette:O,fontFamily:P,style:{marginBottom:"12px"},children:Se}),c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:()=>{me.error?ne.retrySupply():lt()},disabled:le||!Te&&!me.error,loading:le,dark:B,styles:{...b,button:{...b?.button,backgroundColor:q}},children:le?se?"LOCKING...":"CONVERTING...":me.error?"RETRY QUOTE":me.isQuoting?"GETTING SWAP QUOTE...":oe&&Me?"CALCULATING FEES...":se?`LOCK ${r}`:`CONVERT TO ${r}`}),Ae&&!ne.status.finalizationError&&(W==="success"||W==="error"||le)&&c.jsx(ya,{type:"lock",isOpen:!le,isProcessing:le,closeOnComplete:!1,chainId:u,showStepBreakdown:!1,onRetryTx:_e,onNewTx:ae,onClose:()=>z(!1),onComplete:ae,results:W==="success"||W==="error"?[{asset:{symbol:r,address:ne.destination.address},txHash:De??"",success:W==="success",error:Se??void 0,amount:Z?.amount}]:void 0,theme:R,styles:b,dark:B})]})})},sh=({variant:e,destinationSymbol:t,destinationLogoURI:n,destinationDecimals:s,primaryColor:r,fontFamily:o,textPrimary:i,textSecondary:a,cardBg:d,cardBorder:u,dk:m,dark:f,isQuoting:h,quoteError:y,estimatedOutput:g,paymentAmount:x,needsSwap:w,exactOutputSwap:v,adjustable:C=!1,maxAmount:E,onAmountChange:k})=>e==="supply"?c.jsxs("div",{style:{backgroundColor:d,border:`1px solid ${u}`,borderRadius:f?"8px":"7px",padding:"14px 16px 12px 16px",marginBottom:"16px",minHeight:"112px",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},children:[c.jsxs("div",{style:{minWidth:0},children:[c.jsx("span",{style:{fontFamily:o,fontSize:"17px",fontWeight:500,color:f?"#a7abb2":"#7D7C7B",lineHeight:"24px"},children:"Used in TX"}),c.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:a,fontFamily:o,marginTop:"10px"},children:"Net amount after swap and fees"})]}),c.jsxs("div",{style:{textAlign:"right",minWidth:0,display:"inline-flex",alignItems:"center",gap:"8px",border:`1px solid ${u}`,borderRadius:"8px",padding:"8px 10px",minHeight:"42px"},children:[c.jsx(kd,{symbol:t,logoURI:n,primaryColor:r,size:24}),c.jsx("span",{style:{fontSize:"16px",fontWeight:500,color:f?"#f3f4f6":"#3C3E42",lineHeight:"1.3",fontFamily:o,letterSpacing:0},children:t})]})]}),c.jsx("div",{style:{textAlign:"right",minWidth:0},children:h?c.jsx("span",{style:{fontSize:"18px",color:a,fontFamily:o},children:"Quoting..."}):y?c.jsx("span",{style:{fontSize:"13px",color:f?"#f87171":"#dc2626",fontFamily:o},children:"Quote failed"}):g?c.jsx(Ws,{value:g,title:g,fontFamily:o,color:i,lineHeight:"0.95",textAlign:"right",maxFontSize:32,minFontSize:18}):c.jsx("span",{style:{fontSize:"20px",color:a,fontFamily:o},children:"\u2014"})})]}):c.jsx(rh,{destinationSymbol:t,destinationLogoURI:n,destinationDecimals:s,primaryColor:r,fontFamily:o,textPrimary:i,textSecondary:a,cardBg:d,cardBorder:u,dk:m,dark:f,paymentAmount:x||"0",needsSwap:w,exactOutputSwap:v,isQuoting:h,adjustable:C,maxAmount:E,onAmountChange:k}),Cd=p.memo(sh),kd=({symbol:e,logoURI:t,primaryColor:n,size:s})=>t?c.jsx("img",{src:t,alt:e,style:{width:s,height:s,borderRadius:"50%",objectFit:"cover"}}):c.jsx("div",{style:{width:s,height:s,borderRadius:"50%",backgroundColor:`${n}22`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:s<30?"11px":"12px",fontWeight:700,color:n},children:e.slice(0,2)}),rh=({destinationSymbol:e,destinationLogoURI:t,destinationDecimals:n,primaryColor:s,fontFamily:r,textPrimary:o,textSecondary:i,cardBg:a,cardBorder:d,dk:u,dark:m,paymentAmount:f,needsSwap:h,exactOutputSwap:y,isQuoting:g,adjustable:x,maxAmount:w,onAmountChange:v})=>{const C=l.font.mono,E=parseFloat(f||"0"),k=w?parseFloat(w):0,[F,j]=p.useState(f||""),I=p.useRef(null),[b,A]=p.useState(null),[R,B]=p.useState(null);p.useEffect(()=>{x||j(f||"")},[f,x]);const q=D=>{let M=D;M.startsWith(".")&&(M="0"+M);const L=l.parseNumericInput(M);let T=L;w&&parseFloat(L)>parseFloat(w)&&(T=w),j(T),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>v?.(T),300)},O=D=>{if(!k)return;if(D===100){j(w||k.toString()),I.current&&clearTimeout(I.current),v?.(w||k.toString());return}const M=10**n,L=Math.floor(k*D/100*M)/M,T=l.formatDecimalInput(L,n);j(T),I.current&&clearTimeout(I.current),v?.(T)},P=k>0?parseFloat(F||"0")/k*100:0;return p.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]),c.jsxs("div",{style:{backgroundColor:a,border:`1px solid ${d}`,borderRadius:m?"12px":"6px",padding:"16px",marginBottom:"16px"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[c.jsx(kd,{symbol:e,logoURI:t,primaryColor:s,size:32}),c.jsxs("div",{children:[c.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:o,fontFamily:r},children:"Payment"}),c.jsx("div",{style:{fontSize:"12px",color:i,fontFamily:r,marginTop:"2px"},children:e})]})]}),c.jsxs("div",{style:{textAlign:"right"},children:[x?c.jsx(Ws,{element:"input",ariaLabel:`${e} amount`,dataSpiceflowFocus:!0,value:F,onChange:D=>q(D.target.value),placeholder:"0.0",fontFamily:C,color:o,lineHeight:1.1,textAlign:"right",maxFontSize:20,minFontSize:12,style:{width:"120px"}}):c.jsx(Ws,{element:"div",value:E>0?f:"0.00",title:E>0?f:"0.00",fontFamily:C,color:o,lineHeight:1.1,textAlign:"right",maxFontSize:20,minFontSize:12}),c.jsx("div",{style:{fontSize:"12px",color:i,fontFamily:C,marginTop:"2px"},children:e}),x&&k>0&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"10px",marginTop:"6px"},children:[0,25,50,75,100].map((D,M)=>{const L=Math.abs(P-D)<1,T=M===4,H=b===D,V=R===D;return c.jsx("button",{onClick:()=>O(D),onMouseEnter:()=>A(D),onMouseLeave:()=>{A(null),B(null)},onMouseDown:()=>B(D),onMouseUp:()=>B(null),title:`${D}%`,style:{width:"14px",height:"14px",padding:0,border:"none",backgroundColor:"transparent",cursor:"pointer",opacity:L?1:H?.8:.5,transform:V?"scale(0.85)":H?"scale(1.15)":"scale(1)",transition:l.transition.interactive},children:c.jsx(za,{pct:D,isMax:T,primaryColor:s,dark:m,fillColor:m?u?.textSecondary||"#9ca3af":"#3C3E42"})},D)})})]})]}),h&&y&&!g&&c.jsx("div",{style:{marginTop:"12px",paddingTop:"12px",borderTop:m?`1px solid ${u?.cardBorder||d}`:"1px solid #e5e7eb",display:"flex",justifyContent:"flex-end"},children:c.jsxs("span",{style:{fontSize:"11px",color:i,fontFamily:r,opacity:.7},children:["via ",y.venue]})})]})},Id={idle:"",building:"Preparing transaction...","signing-delegation":"Signing delegation...","signing-intent":"Signing intent...",submitting:"Submitting transaction...",executing:"Executing on-chain...",success:"Deposit confirmed",error:"Transaction failed"},Sd=["building","signing-delegation","signing-intent","submitting","executing"],oh=({step:e,statusMsg:t,txHash:n,explorerUrl:s,currentStepIdx:r,palette:o,cardBg:i,cardBorder:a,textPrimary:d,textSecondary:u,fontFamily:m,primaryColor:f,onRetry:h})=>c.jsxs("div",{style:{padding:"10px 14px",borderRadius:"7px",marginBottom:"16px",backgroundColor:e==="success"?i:e==="error"?o.errorBg:i,border:`1px solid ${e==="success"?a:e==="error"?o.errorBorder:a}`},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[e==="success"?c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",style:{flexShrink:0},children:c.jsx("path",{d:"M5 13l4 4L19 7",stroke:o.successText,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})}):e==="error"?c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",style:{flexShrink:0},children:c.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:o.errorText,strokeWidth:"2.5",strokeLinecap:"round"})}):c.jsx(l.Spinner,{size:14,color:f}),c.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:e==="success"?d:e==="error"?o.errorText:d,fontFamily:m,flex:1},children:e==="success"?"Deposit confirmed":e==="error"?t||"Transaction failed":t||Id[e]}),e==="success"&&n&&c.jsx("a",{href:`${s}/tx/${n}`,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"12px",color:f,fontFamily:m,textDecoration:"none",whiteSpace:"nowrap",flexShrink:0},children:"View tx \u2192"}),e==="error"&&c.jsx("button",{onClick:h,style:{background:"none",border:"none",fontSize:"12px",color:f,fontFamily:m,cursor:"pointer",padding:0,whiteSpace:"nowrap",flexShrink:0},children:"Retry \u2192"})]}),r>=0&&e!=="success"&&e!=="error"&&c.jsx("div",{style:{marginTop:"8px",height:"3px",borderRadius:"2px",backgroundColor:`${u}22`,overflow:"hidden"},children:c.jsx("div",{style:{height:"100%",width:"100%",borderRadius:"2px",backgroundColor:f,transformOrigin:"left center",transform:`scaleX(${(r+1)/Sd.length})`,transition:"transform 400ms ease"}})})]}),ah=()=>{},ih=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,destinationToken:s,sourceChains:r,supportedSourceAssets:o,additionalSourceTokens:i,includeExternalWalletAssets:a,includeCrossChainEmbeddedAssets:d,combineSourceBalances:u,fundingSources:m,recipient:f,feeOnlyAction:h,actionInput:y,actionProceeds:g,feeFunding:x,feeFundingReserve:w,maxSlippage:v,resolveInputSwap:C,buildActionCalls:E,feeExecutionMode:k="user-transfer",buildSpicenetBatch:F,onPayExecute:j,resolveExactOutputSwap:I,actionLabel:b,amountDirection:A=h?"output":m?"input-inclusive":"input",swapDescription:R,directDescription:B,paymentAmount:q,amountInputMode:O="fixed",maxPaymentAmount:P,onAmountChange:D,styles:M,dark:L,title:T,subtitle:H,onAddFunds:V,onSubmit:te,beforeSubmit:Z,submitDisabled:K,onStateChange:Y,onSuccess:J,onError:ge})=>{const pe=A==="output",we=l.useAssetDisplay(),ve=A==="input-inclusive",{theme:ne,dark:_,primaryColor:le,dk:W,palette:De,fontFamily:Ae,monoFont:z,inputDark:Q,cardBg:se,cardBorder:ie,textPrimary:X,textSecondary:oe,subtitleText:je}=l.useSpiceBrand(M,L),Me=p.useMemo(()=>Q?{...ne,colors:{...ne.colors,secondary:W.cardBg,surfaceHover:W.hoverBg,border:"#2d2d2d",borderHover:"#3a3a3a"}}:ne,[Q,ne,W.cardBg,W.hoverBg]),me=Fo(s,e),Se=me.token??To,Te=p.useMemo(()=>Se.logoURI?Se:{...Se,logoURI:sa[Se.symbol.toUpperCase()]},[Se]),be=Te.chainId,qe=Fo(m?.token,e&&!!m).token,[ye,Ue]=p.useState(null),[de,Ye]=p.useState(q||""),pt=O==="adjustable"?de:q||"0",tt=q?.trim(),$e=pe&&O==="fixed"&&tt!==void 0&&tt!==""&&parseFloat(pt||"0")===0,{operationKey:Ge,feeQuote:Fe,selectedAsset:Ie,capability:lt,retryFinalization:_e,refreshStatus:ae,assets:{selectable:dt,loading:ut,refreshing:Pe,error:vt,getAvailableBalance:Tt},quote:{isQuoting:Jt,quoteError:St,estimatedOutput:dn,exactOutputSwap:ot,isDirect:ze,needsSwap:at,pivot:rt},fees:{preview:wt,isLoading:ee,error:ft},amount:{sourceRequiredAmount:Re,parsed:He,isInsufficientBalance:et,availableBalance:it},status:{activity:Qe,pending:At,recoveryChecking:mt,recoveryError:Mt,actionId:ht,intentId:An,autoContinue:un,submissionStatus:Cn,idempotencyKey:Zn,user:gn,finalizationError:wn,finalizing:$t,step:Ft,statusMsg:Pt,txHash:Ut,isExecuting:Ht,error:Rt,showStatusPanel:Ze,paymentResult:It},flags:{directExecutionFeeNote:En},canExecute:en,submitSupply:sn,retrySupply:rn,dismissPaymentStatus:xn,submitPay:Yt,resolveMaxAmount:Fn,max:Ke,resetAfterSuccess:yn,resetPaymentState:pn}=Wr({enabled:e,destinationToken:me.token&&Te,selectedAsset:m?null:ye,paymentAmount:pt,amountDirection:A,sourceChains:r,supportedSourceAssets:o,additionalSourceTokens:i,includeExternalWalletAssets:a,includeCrossChainEmbeddedAssets:d,combineSourceBalances:u,fundingSources:m,recipient:f,feeOnlyAction:h,actionInput:y,actionProceeds:g,feeFunding:x,feeFundingReserve:w,maxSlippage:v,resolveInputSwap:C,buildActionCalls:E,feeExecutionMode:k,buildSpicenetBatch:F,onPayExecute:j,resolveExactOutputSwap:I,isZeroAmountPay:$e,onSubmit:te,beforeSubmit:Z,submitDisabled:K,onSuccess:J,onError:ge}),Xn=p.useMemo(()=>({operationKey:Ge,feeQuote:Fe,selectedAsset:Ie,canExecute:en&&!K,isExecuting:Ht,finalizing:$t,finalizationError:wn,feePreview:wt,txHash:Ut,error:Rt,statusStep:Ft,statusMsg:Pt,pending:At,recoveryChecking:mt,recoveryError:Mt,actionId:ht,intentId:An,autoContinue:un,submissionStatus:Cn,idempotencyKey:Zn,user:gn,refreshStatus:ae}),[Ge,Fe,Ie,en,K,Ht,$t,wn,wt,Ut,Rt,Ft,Pt,At,mt,Mt,ht,An,un,Cn,Zn,gn,ae]),kn=p.useRef(Y);kn.current=Y,p.useEffect(()=>{kn.current?.(Xn)},[Xn]);const Tn=!!h||(!!m||!!ye?.asset)&&He>0,Jn=me.error||Rt,fe=wn?c.jsx(l.Button,{onClick:_e,disabled:$t,children:"Retry application update"}):null,ke=At||mt||Mt?c.jsxs(vn,{variant:"info",palette:De,fontFamily:Ae,children:[mt?"Checking transaction status...":Mt?"Transaction status is unavailable.":"Your transaction is pending.",c.jsx(l.Button,{onClick:()=>{ae()},disabled:mt,children:"Check status"})]}):null;p.useEffect(()=>{e||(Ue(null),O==="adjustable"&&Ye(q||""))},[e]),p.useEffect(()=>{if(lt?.policyExcluded){Ue(null);return}if(Ht||ut||Pe||vt||!ye)return;const nt=dt.find(Gt=>xe(Gt)===xe(ye.asset));nt&&nt!==ye.asset?Ue({...ye,asset:nt}):!nt&&ye.asset.balance>0n&&Ue({...ye,asset:{...ye.asset,balance:0n,balanceFormatted:0,balanceUsd:0}})},[dt,ut,Pe,vt,Ht,lt?.policyExcluded]);const Be=p.useCallback(nt=>{Ue(Gt=>({asset:nt,amount:Gt?.asset&&xe(Gt.asset)===xe(nt)&&Gt.amount||""}))},[]),gt=p.useCallback(nt=>{Ue(Gt=>Gt&&{...Gt,amount:nt})},[]),Dt=p.useCallback(nt=>{let Gt=nt;P&&parseFloat(Gt)>parseFloat(P)&&(Gt=P),Ye(Gt),D?.(Gt)},[P,D]),Ee=p.useCallback(()=>{pn(),Ue(null)},[pn]),Zt=ze?B||`Your ${Te.symbol} will be used directly.`:R||"Your assets will be swapped and used in a single atomic transaction.",xt=(be?l.getChainConfig(be):void 0)?.viemChain?.blockExplorers?.default?.url??"",Qt=Sd.indexOf(Ft),fn=mt?"CHECKING STATUS...":At?"TRANSACTION PENDING":Ht?(Id[Ft]||"EXECUTING...").toUpperCase():Ft==="success"?"DONE":et?"INSUFFICIENT BALANCE":(at||rt)&&St&&!Jt?"QUOTE ERROR":b.toUpperCase(),Wt=p.useMemo(()=>{if(mt)return"CHECKING STATUS...";if(At)return"TRANSACTION PENDING";if(It?.status==="success")return"DONE";if(Ht)return"PAYING...";if(et&&ye?.asset)return`INSUFFICIENT ${we(ye.asset).symbol}`;if((at||rt)&&St&&!Jt)return"QUOTE ERROR";if(b)return b.toUpperCase();const nt=He>0?` ${pt} ${Te.symbol}`:"";return at?`SWAP & PAY${nt}`:`PAY${nt}`},[Ht,et,ye,b,we,He,pt,Te.symbol,at,St,Jt,It?.status,At,mt]),Vt=Ft==="success"?()=>{yn(),Ue(null)}:sn,Nt=Ft==="success"?!1:!!K||!en;if(!e)return null;const _t=pe?T||`Pay ${Te.symbol}`:b,qt=pe?H:c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"3px"},children:[c.jsx("span",{style:{marginTop:"3px",flexShrink:0},children:c.jsx(Qa,{color:je})}),c.jsx("p",{style:{fontSize:"12px",color:je,margin:0,lineHeight:"1.4",fontFamily:Ae},children:Zt})]}),Rn={...M,button:{...M?.button,backgroundColor:le}},mn=Tn&&c.jsx($a,{fontFamily:Ae,textPrimary:X,textSecondary:oe,cardBg:se,cardBorder:ie,resolvedDark:_,darkCardBorder:W.cardBorder,primaryColor:le,feePreview:wt,feeOnlyAction:h,asset:ye?.asset,isLoading:ee,errorText:ft,directExecutionFeeNote:En});if(pe){const nt=It&&(It.status==="success"||It.status==="failed")?[{asset:{symbol:ye?.asset?we(ye.asset).symbol:Te.symbol,address:ye?.asset?.address||""},amount:pt,txHash:It.txHash||"",success:It.status==="success",error:It.status==="failed"?It.error:void 0}]:void 0;return c.jsx(Hn,{isOpen:e,onClose:t,title:_t,subtitle:qt,styles:M,dark:_,footerLinkText:"Spicenet accounts \u2192",closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"16px 24px 8px 24px",position:"relative"},children:[c.jsx(xo,{activity:Qe,palette:W}),V&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"6px"},children:c.jsx(ni,{onClick:V,color:le,fontFamily:Ae})}),!$e&&c.jsx("div",{style:{marginBottom:"12px"},children:c.jsx(or,{assets:dt,selectedAsset:ye??void 0,disabled:Ht,onAssetSelect:Be,onAmountChange:ah,label:"Pay with",showBalance:!0,getAvailableBalance:Tt,showMaxButton:!1,hideAmountInput:!0,displayAmount:ye&&Re!==null?N.formatUnits(Re,ye.asset.decimals):ye?"...":void 0,dark:_,theme:Me,styles:M})}),!h&&c.jsx(Cd,{variant:"pay",destinationSymbol:Te.symbol,destinationLogoURI:Te.logoURI,destinationDecimals:Te.decimals,primaryColor:le,fontFamily:Ae,textPrimary:X,textSecondary:oe,cardBg:se,cardBorder:ie,dk:W,dark:_,isQuoting:Jt,quoteError:St,estimatedOutput:dn,paymentAmount:pt,needsSwap:at,exactOutputSwap:ot,adjustable:O==="adjustable",maxAmount:P,onAmountChange:Dt}),mn,fe,ke,Jn&&c.jsx(vn,{variant:"error",palette:De,fontFamily:Ae,style:{marginBottom:"12px"},children:Jn}),c.jsx(l.Button,{variant:"outline",fullWidth:!0,onClick:It?.status==="success"?t:Yt,disabled:It?.status==="success"?!1:!!K||!en,loading:Ht,dark:_,styles:Rn,children:Wt}),It&&Ze&&!wn&&c.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:10,backgroundColor:_?W.shell:"white",borderRadius:_?"12px":"6px",padding:"16px 0"},children:c.jsx(ya,{type:"payment",isOpen:It.status!=="processing",isProcessing:Ht||It.status==="processing",closeOnComplete:!1,chainId:be,onRetryTx:()=>{xn(),Yt()},onNewTx:Ee,onClose:()=>{xn()},onComplete:Ee,results:nt,styles:M,dark:_})})]})})}return c.jsx(Hn,{isOpen:e,onClose:t,title:_t,subtitle:qt,dark:_,styles:M,theme:ne,closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"24px 24px 5px 24px",position:"relative"},children:[c.jsx(xo,{activity:Qe,palette:W}),m?c.jsxs("div",{style:{marginBottom:"16px",padding:"16px",backgroundColor:se,border:`1px solid ${ie}`,borderRadius:"8px",color:X,fontFamily:Ae},children:[c.jsxs("label",{style:{display:"block",marginBottom:"8px"},children:["Purchase amount (",qe?.symbol??"...",")",c.jsx("input",{"aria-label":"Purchase amount",inputMode:"decimal",value:pt,disabled:Ht||O!=="adjustable"||Ft==="success",onChange:nt=>Dt(nt.target.value),style:{display:"block",width:"100%",boxSizing:"border-box",padding:"10px",marginTop:"8px",fontSize:"24px",color:X,background:"transparent",border:`1px solid ${ie}`,borderRadius:"6px"}})]}),qe&&it!==void 0&&c.jsxs("div",{style:{fontSize:"12px",color:oe},children:["Estimated available:"," ",N.formatUnits(it,qe.decimals)," ",qe.symbol]}),O==="adjustable"&&c.jsx(l.Button,{disabled:Ht||Ft==="success",onClick:()=>{Ke().then(nt=>{nt!==null&&Dt(nt)})},children:"Max"}),Fe?.fundingPlan?.sources.map(nt=>c.jsxs("div",{style:{marginTop:"10px",fontSize:"12px",color:oe},children:["Up to ",N.formatUnits(nt.sourceSpendCap,nt.decimals)," ",nt.asset.symbol,nt.swap&&c.jsxs(c.Fragment,{children:[" ","\u2192 at least"," ",N.formatUnits(nt.amountOutMinimum,nt.pivotToken.decimals)," ",nt.pivotToken.symbol]}),nt.gasFeeAmount>0n&&c.jsxs(c.Fragment,{children:[" ","(funding fee"," ",N.formatUnits(nt.gasFeeAmount,nt.pivotToken.decimals)," ",nt.pivotToken.symbol,")"]})]},nt.positionId))]}):c.jsx("div",{style:{marginBottom:"16px"},children:c.jsx(or,{assets:dt,selectedAsset:ye||void 0,onAssetSelect:Be,onAmountChange:gt,disabled:Ht||Ft==="success",showBalance:!0,getAvailableBalance:Tt,showMaxButton:!0,label:u?"From":"From Wallet",placeholder:"0.00",theme:Me,styles:M,dark:Q,resolveMaxAmount:ve?void 0:Fn,maxAmount:ye?.asset&&it!==void 0?N.formatUnits(it,ye.asset.decimals):void 0})}),(m||ye?.asset)&&(m||!ze||!!rt)&&!(ve&&rt)&&c.jsx(Cd,{variant:"supply",destinationSymbol:Te.symbol,destinationLogoURI:Te.logoURI,destinationDecimals:Te.decimals,primaryColor:le,fontFamily:Ae,textPrimary:X,textSecondary:oe,cardBg:se,cardBorder:ie,dark:_,isQuoting:Jt,quoteError:St,estimatedOutput:dn}),mn,Ft!=="idle"&&c.jsx(oh,{step:Ft,statusMsg:Pt,txHash:Ut,explorerUrl:xt,currentStepIdx:Qt,palette:De,cardBg:se,cardBorder:ie,textPrimary:X,textSecondary:oe,fontFamily:Ae,primaryColor:le,onRetry:()=>{rn()}}),fe,ke,Rt&&(Ft==="idle"||!!wn)&&c.jsx(vn,{variant:"error",palette:De,fontFamily:Ae,style:{marginBottom:"16px"},children:Rt}),c.jsx(l.Button,{variant:"outline",fullWidth:!0,disabled:Nt,onClick:Vt,theme:ne,dark:_,styles:Rn,style:{fontSize:"20px",fontWeight:600,letterSpacing:"1.5px",fontFamily:z},children:fn})]})})},ch=()=>{const[e,t]=p.useState("0"),[n,s]=p.useState(null);return{assetAmount:e,setAssetAmount:t,selectedAsset:n,setSelectedAsset:s}};async function lh(e,t,n,s){if(e.amountIn<=0n||e.minimumOutput<0n||!(e.venue.chainIds??[8453]).includes(e.chainId))throw new Error("Choose a positive fixed input, nonnegative minimum output and supported venue chain");const r=S.getTokensForChain(e.chainId).find(k=>k.equivalenceGroup==="USDC");if(!r)throw new Error("Configure the execution fee token for this chain");const o={...r,address:r.address,chainId:e.chainId},i=yr({...e.venue,deadline:e.expiresAt}),a=await i.resolve({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:e.amountIn},e.chainId,t);if(!a)throw new Error("No supported fixed route for this conditional swap");let d=e.amountIn,u="";const m=async k=>{if(k<=0n)throw new vs(e.amountIn+1n,e.amountIn);const F=(k===e.amountIn?a:await i.resolve({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:k},e.chainId,t))?.calls.find(b=>b.to.toLowerCase()===e.venue.swapRouter.toLowerCase());if(!F)throw new Error("No supported fixed route for this conditional swap");const{path:j}=N.decodeFunctionData({abi:Ps,data:F.data}).args[0];if(j.slice(0,42).toLowerCase()!==e.tokenIn.toLowerCase()||`0x${j.slice(-40)}`.toLowerCase()!==e.tokenOut.toLowerCase())throw new Error("The quoted route does not match the requested tokens");d=k;const I=[{to:e.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.venue.swapRouter,k]})},{to:e.venue.swapRouter,value:0n,data:N.encodeFunctionData({abi:Ps,functionName:"exactInput",args:[{path:j,recipient:t,deadline:e.expiresAt,amountIn:k,amountOutMinimum:0n}]})}];return u=I[1].data,I},f=n.filter(k=>!k.balanceError&&k.balanceStatus!=="stale"&&k.owner?.toLowerCase()===t.toLowerCase()&&k.location!=="external"),h=f.find(k=>k._source==="wallet"&&k.chainId===e.chainId&&k.address.toLowerCase()===e.tokenIn.toLowerCase()),y=h&&jr(h,f,t,e.chainId),g={requestTimestampMs:Date.now(),currentPaymentAmount:"0",feeOnlyAction:!0,isPayMode:!0,destinationToken:o,embeddedWalletAddress:t,providerEmbeddedAddress:t,externalWalletAddress:void 0,address:t,isNon7702:!1,resolvedChainId:e.chainId,feeExecutionMode:"backend-transfer",buildSpicenetBatch:void 0,selectedAsset:null,needsSwap:!1,resolvedSwap:null,exactOutputSwap:null,quoteAmountOut:null,resolvedTokenIn:o.address,buildActionCalls:k=>m(k)},x={allowRelayerFeeFallback:!1,...g,expiresAt:Number(e.expiresAt),parsedAmount:0,isSourceDestToken:!0,isConnected:!0,ready:!0,authenticated:!0,isDirect:!0,isQuoting:!1,executionTokenAddress:o.address,actionInput:e.amountMode==="input-inclusive"?[{token:e.tokenIn,amount:e.amountIn}]:void 0,actionProceeds:{token:e.tokenOut,resolve:async()=>a.amountOut},feeFundingBalances:f,feeFundingReserve:h?{asset:h,amount:e.amountIn}:void 0,liquidityVenues:{includeDefaults:!1,venues:[{...e.venue,deadline:e.expiresAt,protocol:"aerodrome-slipstream",chainId:e.chainId}]},buildPayChainBatches:k=>rr(g,{...k,actionAmountOverride:k?.actionAmountOverride??e.amountIn}),buildSupplyChainBatches:k=>rr(g,{...k,actionAmountOverride:k?.actionAmountOverride??e.amountIn}),estimate:s},w=y?await vl({...x,feeOnlyAction:!1,isPayMode:!1,isFeeInclusiveInput:e.amountMode==="input-inclusive",selectedAsset:{asset:h,amount:N.formatUnits(e.amountIn,h.decimals)},combinedSourceGroup:y},g,ns):await Ba(x,ns),v=w?.fundingBatches??w?.batches;if(!w||!v?.length||w.preview.totalFee===void 0)throw new Error("Conditional swap fee plan is unavailable");const C=v.flatMap(k=>k.calls).find(k=>k.to.toLowerCase()===e.venue.swapRouter.toLowerCase()&&k.data===u);if(!C)throw new Error("The conditional swap is missing from its fee plan");const E=N.decodeFunctionData({abi:Ps,data:C.data}).args[0];return C.data=N.encodeFunctionData({abi:Ps,functionName:"exactInput",args:[{...E,amountOutMinimum:e.minimumOutput}]}),{batches:v,sourceAllocation:w.sourceAllocation,swapAmountIn:d,feeFundingSource:w.fundingSource,feeSourceAmount:w.fundingConversion?.amountInMax??w.proceedsUsed??w.sourceSpendCap,fees:{token:o.address,symbol:o.symbol,decimals:o.decimals,amount:w.preview.totalFee}}}const Ad=`0x${"00".repeat(32)}`;function si(){return BigInt(`0x${Array.from(crypto.getRandomValues(new Uint8Array(32)),e=>e.toString(16).padStart(2,"0")).join("")}`)}function dh(e,t){const n={chainId:e,to:t.to,value:t.value,selector:t.data.length>=10?t.data.slice(0,10):"0x"};try{const s=N.decodeFunctionData({abi:Ps,data:t.data});if(s.functionName==="exactInput"){const r=s.args[0];n.fixedInput=r.amountIn,n.minimumOutput=r.amountOutMinimum,r.amountOutMinimum===0n&&(n.disclosure="This fixed-input swap has zero minimum output. The router can execute it for any output amount, including a very poor fill.")}}catch{}return n}function Ed(){const e=l.useWallet(),t=p.useContext(l.SpiceFlowProviderContext),n=Ms({owner:e.address,role:"spend-source",enabled:e.isReady}),s=Js(),r=p.useRef({wallet:e,provider:t,inventory:n,execution:s});r.current={wallet:e,provider:t,inventory:n,execution:s};const o=p.useRef(!0),i=p.useRef(0),a=JSON.stringify([e.address,l.relayerService.getBaseUrl(),t?.rpcOverrides,t?.provider,t?.network,t?.mode]),d=p.useRef(a);d.current!==a&&(d.current=a,i.current++);const u=p.useRef(!1),m=p.useRef(new WeakMap),f=p.useRef(new WeakMap),h=p.useRef();p.useEffect(()=>(o.current=!0,()=>{o.current=!1,i.current++}),[]);const y=p.useCallback(()=>JSON.stringify([i.current,r.current.wallet.address,l.relayerService.getBaseUrl(),r.current.provider?.rpcOverrides,r.current.provider?.provider,r.current.provider?.network,r.current.provider?.mode]),[]),g=I=>{if(!o.current||y()!==I)throw new Error("Wallet, provider or relayer changed during conditional intent processing")},x=p.useCallback(async I=>{const b=r.current.wallet.address;if(!b||!r.current.wallet.isReady)throw new Error("Connect a ready wallet before preparing a conditional intent");if(r.current.provider?.mode!=="7702")throw new Error("Conditional intents require a fully pre-signed 7702 action");if(!I.clientId||!I.serviceId||!I.triggerSpecification||!I.chainBatches.length)throw new Error("Conditional intent requires a client, service, exact trigger bytes and fixed action batches");if(I.semantics!=="state"&&I.semantics!=="event")throw new Error("Choose state or event trigger semantics");const A=BigInt(Math.floor(Date.now()/1e3));if(I.maxSignalAgeSeconds<1n||I.maxSignalAgeSeconds>86400n||I.validAfter>I.expiresAt||I.expiresAt<=A||I.expiresAt!==S.CONDITIONAL_INTENT_UNTIL_CANCELLED&&I.expiresAt-A>30n*86400n)throw new Error("Conditional intent validity or signal freshness is outside the supported window");const R=y(),B=structuredClone(I.chainBatches).map(M=>({...M,tokenTransfers:M.tokenTransfers??[]}));if(B.some(M=>!Number.isSafeInteger(M.chainId)||M.chainId<=0||!M.calls.length))throw new Error("Every action batch needs a supported chain and at least one fixed call");const q={...I.replacesIntentId?{replacesIntentId:I.replacesIntentId}:{},owner:b,clientId:I.clientId,serviceId:I.serviceId,authorizationNonce:si(),executionDigest:la(B,I.expiresAt),executionPlanHash:Ad,triggerSpecificationHash:N.keccak256(I.triggerSpecification),evaluator:I.evaluator,semantics:I.semantics,maxSignalAgeSeconds:I.maxSignalAgeSeconds,validAfter:I.validAfter,expiresAt:I.expiresAt,maxExecutions:1},O=B.flatMap(M=>M.calls.map(L=>dh(M.chainId,L)));g(R);const P={triggerSpecification:I.triggerSpecification,chainBatches:structuredClone(B),actionSummary:O,additionalSignatureCount:2,delegationAuthorizationCount:new Set(B.filter(M=>!S.isSpicenetChainId(M.chainId)).map(M=>M.chainId)).size,triggerEnforcedBy:"SpiceFlow conditional-intent service"},D={scope:R,input:{...structuredClone(I),chainBatches:B},prepared:P,baseAuthorization:q};return m.current.set(P,D),P},[y]),w=p.useCallback(async I=>{I=structuredClone(I);const b=y(),A=r.current.wallet.address;if(!A||!r.current.wallet.isReady||r.current.provider?.mode!=="7702")throw new Error("Connect a ready 7702 wallet before preparing a conditional swap");const R=await l.getClientForChain(I.chainId,r.current.provider?.rpcOverrides).readContract({address:I.tokenIn,abi:N.erc20Abi,functionName:"balanceOf",args:[A]});g(b);const B=r.current.inventory.assets,q=B.find(L=>L._source==="wallet"&&L.location==="embedded"&&L.chainId===I.chainId&&l.addressesEqual(L.address,I.tokenIn)&&l.addressesEqual(L.owner,A))??S.getTokensForChain(I.chainId).find(L=>l.addressesEqual(L.address,I.tokenIn)),O=q?{...q,address:I.tokenIn,chainId:I.chainId,owner:A,location:"embedded",_source:"wallet",balance:R,balanceFormatted:Number(N.formatUnits(R,q.decimals)),balanceUsd:0,isNative:!1,balanceError:void 0,balanceStatus:void 0}:void 0,P=O?[...B.filter(L=>!(L._source==="wallet"&&L.location==="embedded"&&L.chainId===I.chainId&&l.addressesEqual(L.address,I.tokenIn)&&l.addressesEqual(L.owner,A))),O]:B;if(((O&&jr(O,P,A,I.chainId))?.availableBalance??R)<I.amountIn)throw new Error("The available wallet and escrow balance does not cover the order input");const D=await lh(I,A,P,r.current.execution.estimate);g(b);const M=await x({...I,chainBatches:D.batches});if(D.sourceAllocation){const L=D.sourceAllocation;m.current.get(M).validateFunding=()=>ga(D.batches,A,{walletFundingRequirement:{chainId:L.chainId,token:L.token,amount:L.walletInPlace}})}return M.fees=D.fees,M.feeFundingSource=D.feeFundingSource,M.feeSourceAmount=D.feeSourceAmount,M.swapAmountIn=D.swapAmountIn,M},[x,y]),v=p.useCallback(async I=>{const b=m.current.get(I);if(!b)throw new Error("Prepare this conditional intent in the current hook before signing");g(b.scope);const A=r.current.wallet.address;if(!A||!r.current.wallet.actions.signMessage)throw new Error("Wallet is not ready to sign this conditional intent");if(b.request)return b.prepared;if(u.current)throw new Error("A conditional authorization is already being signed");u.current=!0;try{await b.validateFunding?.(),g(b.scope);const R=await ua({chainBatches:b.input.chainBatches,signingAddress:A,actions:r.current.wallet.actions});g(b.scope),await b.validateFunding?.(),g(b.scope);const B=await da(r.current.wallet.actions,b.input.chainBatches,b.input.expiresAt);g(b.scope);const q=R.map(({yParity:V,...te})=>({...te,...V===void 0?{}:{yParity:V}})),O=S.hashConditionalExecutionPlan(b.input.chainBatches.map(V=>({...V,tokenTransfers:V.tokenTransfers??[]})),q),P={...b.baseAuthorization,executionPlanHash:O},D=S.hashConditionalIntentAuthorization(P),M=await r.current.wallet.actions.signMessage({raw:D});g(b.scope);const L=typeof M=="string"?M:M.signature,T=S.hashChainBatches(b.input.chainBatches),H={authorization:P,authorizationSignature:L,triggerSpecification:b.input.triggerSpecification,action:{user:A,...b.input.executionAmountMode?{amountMode:b.input.executionAmountMode}:{},chainAuthorizations:q,intents:[{mode:"7702",signatureType:"ecdsa",signature:B,nbf:0,exp:Number(b.input.expiresAt),chainBatches:b.input.chainBatches.map((V,te)=>({hash:T[te].hash,chainId:V.chainId,tokenTransfers:V.tokenTransfers??[],calls:V.calls}))}]}};return b.request=structuredClone(H),b.authorizationSignature=L,b.chainAuthorizations=R,b.prepared={...structuredClone(b.prepared),authorization:structuredClone(P),id:S.getConditionalIntentId(D)},m.current.set(b.prepared,b),f.current.set(b.prepared,b),b.prepared}finally{u.current=!1}},[]),C=p.useCallback(async I=>{const b=f.current.get(I);if(!b?.request)throw new Error("Sign the prepared conditional intent before registration");g(b.scope);const A=await l.relayerService.registerConditionalIntent(b.request);return g(b.scope),A},[]),E=p.useCallback(async I=>{const b=y(),A=h.current;if(A&&A.scope===b&&A.serviceId===I&&A.expiresAt>Date.now()/1e3+30)return A.token;const R=r.current.wallet.address;if(!R||!r.current.wallet.isReady)throw new Error("Connect a wallet before reading conditional intent status");const B={owner:R,reader:R,serviceId:I,intentId:Ad,expiresAt:BigInt(Math.floor(Date.now()/1e3)+3600),nonce:si()},q=S.hashConditionalReadAuthorization(B),O=await r.current.wallet.actions.signMessage({raw:q});g(b);const P=typeof O=="string"?O:O.signature,D=await l.relayerService.createConditionalReadToken({...B,signature:P});return g(b),h.current={scope:b,serviceId:I,token:D.readToken,expiresAt:D.expiresAt},D.readToken},[y]),k=p.useCallback(async(I,b)=>{const A=y(),R=await E(b);g(A);const B=await l.relayerService.getConditionalIntent(I,R);return g(A),B},[E,y]),F=p.useCallback(async(I,b)=>{const A=y(),R=await E(I);g(A);const B=await l.relayerService.listConditionalIntents(R,b);return g(A),B},[E,y]),j=p.useCallback(async(I,b)=>{const A=y(),R=r.current.wallet.address;if(!R)throw new Error("Connect a wallet before cancelling a conditional intent");const B={owner:R,serviceId:b,intentId:I,cancellationNonce:si(),expiresAt:BigInt(Math.floor(Date.now()/1e3)+300)},q=S.hashConditionalCancellation(B),O=await r.current.wallet.actions.signMessage({raw:q});g(A);const P=typeof O=="string"?O:O.signature,D={...B,signature:P},M=await l.relayerService.cancelConditionalIntent(I,D);return g(A),M},[y]);return{prepare:x,prepareSwap:w,sign:v,register:C,authorizeRead:E,get:k,list:F,cancel:j}}function uh(e,t=0){const[n,s]=p.useState(t),r=e[n]??e[0],o=p.useMemo(()=>r?BigInt(Math.round(r.months*30*24*3600)):0n,[r?.months]);return{selectedDurationIdx:n,setSelectedDurationIdx:s,selectedDuration:r,durationSeconds:o}}function ph(e){const t=p.useContext(l.SpiceFlowProviderContext),n=t?.embeddedWalletAddress,s=e?.enabled===!1?void 0:n,r=t?.network?{network:t.network,pollIntervalMs:e?.pollIntervalMs,chainIds:e?.chainIds??t.supportedChainIds,discoverWalletBalances:e?.discoverWalletBalances}:void 0;return{...xd(s,r),embeddedWalletAddress:n}}function fh(){const{actions:e,isReady:t,isAuthenticated:n}=l.useWallet(),s=p.useContext(l.SpiceFlowProviderContext)?.embeddedWalletAddress,r=p.useRef(!1),o=p.useRef(0),i=p.useRef(null),a=p.useRef(e),[d,u]=p.useState(0);a.current=e,p.useEffect(()=>{r.current=!1,o.current=0,i.current&&(clearTimeout(i.current),i.current=null)},[s]),p.useEffect(()=>{if(!s||!t||!n||r.current)return;r.current=!0;let m=!1;return(async()=>{await Ln(2e3);try{await l.ensureSmartWallet(s,a.current.signMessage),o.current=0}catch(f){console.warn("[SmartWallet] Registration failed:",f),r.current=!1,!m&&o.current<3&&(o.current+=1,i.current=setTimeout(()=>{u(h=>h+1)},5e3))}})(),()=>{m=!0,i.current&&(clearTimeout(i.current),i.current=null)}},[s,t,n,d])}function mh(){const e=p.useContext(l.SpiceFlowProviderContext),t=(e?.mode??"7702")==="7702"?"embedded":"external",n=e?.setMode,s=p.useCallback(r=>n?.(r==="embedded"?"7702":"ondemand"),[n]);return{mode:t,setMode:s,ownerAddress:t==="embedded"?e?.embeddedWalletAddress:e?.externalWalletAddress,embeddedAddress:e?.embeddedWalletAddress,externalAddress:e?.externalWalletAddress,isUserWhitelisted:e?.isUserWhitelisted??null,isWhitelistChecking:e?.isWhitelistChecking??!1,isWhitelistGateActive:e?.isWhitelistGateActive??!1,whitelistCheck:e?.whitelistCheck}}function hh({amount:e,enabled:t=!0,...n}){const s=p.useContext(l.SpiceFlowProviderContext),[r,o]=p.useState(null);p.useEffect(()=>{o(u=>u&&u.amount!==e?{...u,amount:e}:u)},[e]);const i=p.useMemo(()=>{if(!r)return null;const u=r.asset,m=u.location??(u._source==="spice"?"rollup":u._fundingWallet??((s?.mode??"7702")==="7702"?"embedded":"external"));return{...r,asset:{...u,location:m,owner:u.owner??(m==="external"?s?.externalWalletAddress:s?.embeddedWalletAddress),...u._wrapFromNative?{address:S.ZERO_ADDRESS,isNative:!0,positionId:void 0}:{}}}},[r,s?.mode,s?.embeddedWalletAddress,s?.externalWalletAddress]),a=Wr({...n,enabled:t,selectedAsset:i,paymentAmount:n.amountDirection==="output"?e:void 0}),d=p.useCallback(u=>o({asset:u,amount:e}),[e]);return{sources:a.assets.selectable,getAvailableBalance:a.assets.getAvailableBalance,availableBalance:a.amount.availableBalance,selectedAsset:a.selectedAsset,setSelectedAsset:o,selectAsset:d,quote:{isQuoting:a.quote.isQuoting,error:a.quote.quoteError,estimatedInput:a.quote.estimatedInput,estimatedOutput:a.quote.estimatedOutput,estimatedMinOutput:a.fees.destinationAmount===void 0||!n.destinationToken?null:N.formatUnits(a.fees.destinationAmount,n.destinationToken.decimals),isDirect:a.quote.isDirect,needsSwap:a.quote.needsSwap},feePreview:a.fees.preview,isFeePreviewLoading:a.fees.isLoading,feePreviewError:a.fees.error||a.status.error,canSubmit:a.canExecute,execute:a.submit,isExecuting:a.status.isExecuting,step:a.status.step,statusMsg:a.status.statusMsg,status:a.status,txHash:a.status.txHash,refreshAssets:a.assets.refreshSpiceAssets,resolveMaxAmount:a.resolveMaxAmount,retryFinalization:a.retryFinalization,refreshStatus:a.refreshStatus}}function gh(e){const t=l.useWallet(),n=Ed(),s=p.useRef(new WeakMap),r=p.useRef(new WeakMap),o=p.useContext(l.SpiceFlowProviderContext),i=Js(),a=p.useRef(i);a.current=i;const[d,u]=p.useState({step:"idle",isExecuting:!1,message:"",error:null,pending:!1}),[m,f]=p.useState(!1),h=p.useRef(void 0),y=p.useRef(e?.combineSourceBalances);y.current=e?.combineSourceBalances;const g=p.useRef({wallet:t,provider:o});g.current={wallet:t,provider:o};const x=p.useRef(!1),w=p.useRef(!1),v=p.useRef(null),C=p.useRef(!0),E=p.useRef(0),k=JSON.stringify([t.address,t.isReady,t.isAuthenticated,t.isConnected,l.relayerService.getBaseUrl(),o?.rpcOverrides,o?.provider,o?.network,o?.mode,o?.allowedTokens,o?.isWhitelistGateActive]),F=p.useRef(k);F.current!==k&&(F.current=k,E.current++),p.useLayoutEffect(()=>(C.current=!0,()=>{C.current=!1,E.current++,v.current?.abort()}),[]),p.useLayoutEffect(()=>(f(!1),h.current=void 0,u({step:"idle",isExecuting:!1,message:"",error:null,pending:!1}),()=>{v.current?.abort()}),[k]);const j=p.useRef(new WeakMap),I=p.useRef(new WeakMap),b=()=>{if(!C.current)throw new Error("Order hook is no longer mounted");if(!g.current.wallet.isReady||!g.current.wallet.isAuthenticated||!g.current.wallet.isConnected||g.current.provider?.isWhitelistGateActive)throw new Error("Connect the current wallet before continuing the order");return JSON.stringify([E.current,g.current.wallet.address,g.current.wallet.isReady,g.current.wallet.isAuthenticated,g.current.wallet.isConnected,l.relayerService.getBaseUrl(),g.current.provider?.rpcOverrides,g.current.provider?.provider,g.current.provider?.network,g.current.provider?.mode,g.current.provider?.allowedTokens,g.current.provider?.isWhitelistGateActive])},A=p.useCallback(async T=>{const H=b(),V=h.current;f(!1);const te=await l.relayerService.supportsAutomaticContinuation();if(b()!==H||h.current!==V||w.current)return!1;if(V?.outcomePending==="registration"){const Y=V.conditional?await V.conditional.get():await l.relayerService.getLimitOrder(Ia(V.request));if(b()!==H)return!1;if(V.conditional?!("conditionalIntentId"in Y)||Y.conditionalIntentId!==V.conditional.id:!("id"in Y)||Y.id!==Ia(V.request)||!l.addressesEqual(Y.user,V.request.user)||Y.chainId!==V.input.chainId||!l.addressesEqual(Y.tokenIn,V.input.tokenIn)||!l.addressesEqual(Y.tokenOut,V.input.tokenOut)||Y.minimumOutput!==V.input.minimumOutput.toString())throw new Error("The original order registration could not be verified");return V.resolvedOrder=Y,V.placement=void 0,V.outcomePending=void 0,u({step:"success",isExecuting:!1,message:"Limit order placed",error:null,pending:!1}),f(!0),!0}if(V?.outcomePending==="funding"){if(!V.fundingActionId&&V.fundingSubmissionKey){const J=await l.relayerService.getActionBySubmission(V.request.user,V.fundingSubmissionKey);if(b()!==H)return!1;V.fundingActionId=J?.actionId}if(!V.fundingActionId)return u(J=>({...J,pending:!0})),!1;const Y=await l.relayerService.getIntentRecoveryStatus(V.fundingActionId,0);if(b()!==H)return!1;if(Y==="unresolved")return u(J=>({...J,pending:!0})),!1;if(Y==="completed"){V.fundingCompleted=!0;const J=await us(V.request.user,V.input.chainId,V.input.tokenIn);if(b()!==H)return!1;if(J.available<V.input.grossAmount)return u(ge=>({...ge,pending:!0})),!1;V.placement=void 0}V.outcomePending=void 0}const Z=te?T??await l.relayerService.getWalletActions(g.current.wallet.address,{pendingOnly:!0}):[];if(b()!==H||w.current||h.current!==V)return!1;let K=!1;for(const Y of Z){if(Y.intents.length!==1){K=!0;break}const J=await l.relayerService.getIntentRecoveryStatus(Y.actionId,0);if(b()!==H)return!1;if(J==="unresolved"){K=!0;break}}return u(Y=>({...Y,pending:K,message:K?"A previous transaction is still pending":Y.message})),f(!K),!K},[]),R=p.useCallback(()=>A(),[A]),B=uo(t.address,d.pending&&t.isReady&&t.isAuthenticated&&t.isConnected,{pendingOnly:!0});p.useEffect(()=>{if(!d.pending||B.loading||B.error||!B.updatedAt)return;const T=E.current;A(B.actions).catch(()=>{C.current&&E.current===T&&f(!1)})},[B.revision,B.loading,B.error,d.pending,A]),p.useEffect(()=>{if(!t.address||!t.isReady||!t.isAuthenticated||!t.isConnected||o?.isWhitelistGateActive)return;const T=E.current;R().catch(()=>{C.current&&E.current===T&&(f(!1),u(H=>({...H,pending:!0,message:"Previous transaction status is unavailable"})))})},[k,R]);const q=p.useCallback(async(T,H,V)=>{if(w.current||h.current?.outcomePending)throw new Error("Resolve the previous order before preparing another");const te=b(),Z=y.current===!0&&!H&&!V?.skipFunding;if(T=structuredClone(T),!await R())throw new Error("Resolve the previous transaction before preparing another order");if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");const K=N.bytesToHex(crypto.getRandomValues(new Uint8Array(32))),Y=g.current.wallet.address;if(!Y)throw new Error("Connect a wallet before preparing an order");if(g.current.provider?.mode!=="7702")throw new Error("Limit orders require the 7702 wallet mode");if(!l.getRpcUrlForChain(T.chainId,g.current.provider?.rpcOverrides))throw new Error(`No RPC is available for order chain ${T.chainId}`);const J=Date.now();if(!Number.isSafeInteger(T.expiresAt)||T.expiresAt<=Math.floor(J/1e3)||T.expiresAt>Math.floor(J/1e3)+30*86400&&!(V&&BigInt(T.expiresAt)===S.CONDITIONAL_INTENT_UNTIL_CANCELLED)||T.grossAmount<=0n||T.minimumOutput<=0n)throw new Error("Enter a positive amount, minimum output and expiry within 30 days");const ge=await us(Y,T.chainId,T.tokenIn);if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");let pe;const we=T.grossAmount;if(Z&&ge.available<we){if(!await l.relayerService.supportsAutomaticContinuation())throw new Error("Automatic order funding requires backend recovery support");const De=S.getTokenByAddress(T.tokenIn,T.chainId);if(!De)throw new Error("Automatic order funding requires a supported escrow token");const Ae=l.getClientForChain(T.chainId,g.current.provider?.rpcOverrides),z=S.isNativeToken(T.tokenIn)?await Ae.getBalance({address:Y}):await Ae.readContract({address:T.tokenIn,abi:N.erc20Abi,functionName:"balanceOf",args:[Y]}),Q={address:T.tokenIn,chainId:T.chainId,owner:Y,location:"embedded",_source:"wallet",_fundingWallet:"embedded",decimals:De.decimals,symbol:De.symbol,name:De.name,balance:z,balanceFormatted:Number(N.formatUnits(z,De.decimals)),balanceUsd:0,isNative:S.isNativeToken(T.tokenIn)},se=Yn(Q,"spend-source",g.current.provider??{},{address:T.tokenIn,chainId:T.chainId},void 0,{requiresEscrow:!0});if(!se.eligible)throw new Error(se.reason??"Order funding is unavailable");const ie=we-ge.available;if(z<ie)throw new Error("Cash does not cover the limit order budget");const X=await ti({address:Y,requireSimulation:!0,depositQuote:{asset:Q,amount:ie,token:T.tokenIn,chainId:T.chainId}});if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");if(X.fee<0n||X.fee>=ie||X.net!==ie-X.fee)throw new Error("Cash amount does not cover the order funding fee");pe={source:Q,sourceSpendCap:ie,depositAmount:X.net,feeAmount:X.fee},T.grossAmount=we-X.fee}const ve=T.venue??xr;if(!(ve.chainIds??[8453]).includes(T.chainId))throw new Error("Venue does not support the destination chain");const ne=yr(ve);let _=T.grossAmount,le=0n,W=0n;for(let De=0;De<5;De++){const Ae=await ne.resolve({type:"swap",tokenIn:T.tokenIn,tokenOut:T.tokenOut,amountIn:_},T.chainId,Y);if(!Ae)throw new Error("No supported route for this order");const z=Ae.calls.find(Te=>l.addressesEqual(Te.to,ve.swapRouter));if(!z)throw new Error("Order route is missing its swap");const{path:Q}=N.decodeFunctionData({abi:Ps,data:z.data}).args[0],se=zp({replacesOrderId:H,conditional:!!V,user:Y,chainId:T.chainId,tokenIn:T.tokenIn,router:ve.swapRouter,path:Q,grossAmount:T.grossAmount,amountIn:_,minimumOutput:T.minimumOutput,expiresAt:T.expiresAt,platformFee:le,gasBridgeFee:W,requestTimestampMs:J,requestNonce:K});if(se.intents[0].mode!=="7702")throw new Error("Unsupported order mode");const ie=structuredClone(se),X=ie.intents[0];if(X.mode!=="7702")throw new Error("Unsupported order mode");const oe=fo(X.chainBatches,Y);oe[1].calls=Ae.calls;const je=S.hashChainBatches(oe);X.chainBatches=oe.map((Te,be)=>({...X.chainBatches[be],calls:Te.calls,hash:je[be].hash}));const Me=(await l.relayerService.estimateActionFees(ie)).intents[0]?.batches.find(Te=>Te.chainId===T.chainId);if(!Me)throw new Error("Order fee quote is unavailable");const me=l.getBatchFees(Me),Se=T.grossAmount-me.totalFee;if(Se<=0n)throw new Error("Cash amount does not cover order fees");if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");if(Se===_&&le===me.spicenetFee&&W===me.gasFee+me.bridgeFee){const Te={user:Y,request:se,amountIn:_,minimumOutput:T.minimumOutput,feeAmount:me.totalFee,grossAmount:T.grossAmount,funding:pe,path:Q};return j.current.set(Te,{scope:te,amendment:H?{id:H}:void 0,request:structuredClone(se),input:structuredClone(T),cashAmount:ge.available,combineSourceBalances:Z,funding:pe&&structuredClone(pe)}),Te}_=Se,le=me.spicenetFee,W=me.gasFee+me.bridgeFee}throw new Error("Order fees did not converge; prepare the order again")},[]),O=p.useCallback(async T=>{if(x.current)throw new Error("An order signature is already in progress");const H=j.current.get(T),V=H?.scope,te=()=>{if(!V||b()!==V||!l.addressesEqual(g.current.wallet.address,H?.request.user))throw new Error("Prepare the order again for the current wallet and provider")};te();const Z=structuredClone(H.request),K=Z.intents[0];if(K.mode!=="7702"||K.exp<=Date.now()/1e3)throw new Error("Order expired before signing");x.current=!0;try{const Y=g.current.wallet.actions;if(Z.chainAuthorizations=await ua({chainBatches:K.chainBatches,signingAddress:Z.user,actions:Y,beforeSign:async()=>te()}),te(),K.signature=await da(Y,K.chainBatches,BigInt(K.exp)),te(),K.exp<=Date.now()/1e3)throw new Error("Order expired during signing");return I.current.set(Z,{scope:V,amendment:H.amendment,request:structuredClone(Z),input:H.input,cashAmount:H.cashAmount,combineSourceBalances:H.combineSourceBalances,funding:H.funding}),Z}finally{x.current=!1}},[]),P=p.useCallback(async T=>{const H=b(),{signature:V}=await g.current.wallet.actions.signMessage(Lp(T));if(b()!==H)throw new Error("Wallet or provider changed during cancellation");return l.relayerService.cancelLimitOrder(T,V)},[]),D=p.useCallback(T=>{if(!T||b()!==T.scope)throw new Error("Sign the order for the current wallet and provider before placing it");if(T.placement)return T.placement;if(T.resolvedOrder)return Promise.resolve(T.resolvedOrder);if(T.outcomePending)throw new Error("The original order outcome is still pending");if(w.current)throw new Error("An order placement is already in progress");const H=T.request.intents[0],V=()=>{if(b()!==T.scope)throw new Error("Wallet or provider changed during order placement");if(H.mode!=="7702"||H.exp<=Date.now()/1e3)throw new Error("Order expired before placement")};V(),w.current=!0,h.current=T;const te=new AbortController;v.current=te;let Z=!1;T.placement=(async()=>{u({step:"placing",isExecuting:!0,message:"Preparing the limit order\u2026",error:null,pending:!1});let Y=!1,J=T.fundingCompleted===!0,ge=!1;try{const pe=await us(T.request.user,T.input.chainId,T.input.tokenIn);if(V(),T.funding&&!J){const ne=T.funding;if(pe.available!==T.cashAmount)throw new Error("Order cash or reservations changed. Review the full order again");const _=async()=>{V();const Ae=await us(T.request.user,T.input.chainId,T.input.tokenIn);if(V(),Ae.available!==T.cashAmount)throw new Error("Order cash or reservations changed. Review again")},le=await ti({address:T.request.user,requireSimulation:!0,depositQuote:{asset:ne.source,amount:ne.sourceSpendCap,token:T.input.tokenIn,chainId:T.input.chainId}});if(V(),le.fee>ne.feeAmount)throw new Error("Order funding fees changed. Review again");const W=[{chainId:T.input.chainId,tokenTransfers:[],calls:ei({escrowAddress:S.getEscrowContractAddress(T.input.chainId),tokenAddress:T.input.tokenIn,isNative:S.isNativeToken(T.input.tokenIn),amount:ne.depositAmount,gasFeeAmount:ne.feeAmount})}];u({step:"funding",isExecuting:!0,message:"Funding the limit order\u2026",error:null,pending:!1}),T.fundingSubmissionKey??(T.fundingSubmissionKey=N.bytesToHex(crypto.getRandomValues(new Uint8Array(32)))),await a.current.execute(W,T.input.tokenIn,0n,Ae=>{Ae.actionId&&(Y=!0,T.fundingActionId=Ae.actionId)},te.signal,{userOverride:T.request.user,idempotencyKey:T.fundingSubmissionKey,useCustomTransfers:!0,skipPreSubmitFeeEstimate:!0,requireDestinationReceipt:!0,walletFundingRequirement:{chainId:T.input.chainId,token:T.input.tokenIn,amount:ne.sourceSpendCap},validateBeforeSubmit:_}),J=!0,T.fundingCompleted=!0,V(),u({step:"waiting-credit",isExecuting:!0,message:"Waiting for cash credit\u2026",error:null,pending:!1});const De=await Nc({deposits:[{chainId:T.input.chainId,token:T.input.tokenIn,amount:ne.depositAmount}],baseline:pe.entries,fetchEntries:async()=>(V(),l.getWalletBalanceEntries(T.request.user)),signal:te.signal});if(V(),!De)throw new Error("Funding was submitted; the order is not placed while cash credit is pending. Check wallet activity before trying again")}const we=await us(T.request.user,T.input.chainId,T.input.tokenIn);if(V(),T.combineSourceBalances&&we.available<T.input.grossAmount)throw new Error("Cash is not available for this order. No order was placed");u({step:"placing",isExecuting:!0,message:"Placing the limit order\u2026",error:null,pending:!1}),ge=!0;const ve=T.conditional?await T.conditional.register():T.amendment?await l.relayerService.amendLimitOrder(T.amendment.id,structuredClone(T.request)):await l.relayerService.createLimitOrder(structuredClone(T.request));return V(),T.resolvedOrder=ve,u({step:"success",isExecuting:!1,message:"Limit order placed",error:null,pending:!1}),ve}catch(pe){const we=ge&&pe instanceof l.SpiceflowError&&pe.context.httpStatus===400&&pe.context.submissionStatus==="rejected";Y||(Y=pe?.context?.submissionStatus==="unknown");const ve=pe instanceof Error?pe:new Error("The order outcome could not be verified"),ne=ge&&!we?"Order placement could not be verified. Check the order list before placing another order.":Y?J?"Cash funding completed, but the order is not placed. Check available cash and wallet activity before trying again.":"Cash funding could not be verified and no order was placed. Check wallet activity before trying again.":ve.message;T.outcomePending=ge&&!we?"registration":Y||J?"funding":void 0,Z=!ge&&!Y&&!J;try{C.current&&b()===T.scope&&u({step:"error",isExecuting:!1,message:ne,error:ve,pending:!!T.outcomePending})}catch{}throw ve}finally{w.current=!1,v.current===te&&(v.current=null)}})();const K=T.placement;return K.catch(()=>{Z&&T.placement===K&&(T.placement=void 0)}),K},[]),M=p.useCallback(T=>D(I.current.get(T)),[D]),L=p.useCallback(async(T,H,V)=>{const te=b(),Z=await l.relayerService.getLimitOrder(T);if(b()!==te||!l.addressesEqual(Z.user,g.current.wallet.address))throw new Error("Order does not belong to the current wallet");if(Z.status!=="open"||Date.parse(Z.expiresAt)<=Date.now())throw new Error("This order is no longer amendable");return q({chainId:Z.chainId,tokenIn:Z.tokenIn,tokenOut:Z.tokenOut,grossAmount:BigInt(Z.reservedAmount),minimumOutput:H,expiresAt:Math.floor(Date.parse(Z.expiresAt)/1e3),venue:V},T)},[q]);return{conditional:{...n,async prepareOrder(T,H,V,te){if(T=structuredClone(T),H=structuredClone(H),T.expiresAt!==Number(H.expiresAt))throw new Error("Order and condition expiry must match");if(V!=="cash-first"&&V!=="execution-balances")throw new Error("Choose an order funding policy");if(V==="execution-balances")return n.prepareSwap({...H,chainId:T.chainId,tokenIn:T.tokenIn,tokenOut:T.tokenOut,amountIn:T.grossAmount,minimumOutput:T.minimumOutput,amountMode:"fixed-input",venue:T.venue??xr});const Z=b(),K=await q(T,void 0,{skipFunding:!!H.replacesIntentId});if(b()!==Z)throw new Error("Wallet or provider changed while preparing the order");const Y=K.request.intents[0];if(Y.mode!=="7702")throw new Error("Unsupported order mode");const J=await n.prepare({...H,executionAmountMode:"gross_input",triggerSpecification:te?.(K.grossAmount)??H.triggerSpecification,chainBatches:Y.chainBatches});if(b()!==Z)throw new Error("Wallet or provider changed while preparing the order");return J.fees={token:T.tokenIn,symbol:S.getTokenByAddress(T.tokenIn,T.chainId)?.symbol??"",decimals:S.getTokenByAddress(T.tokenIn,T.chainId)?.decimals??18,amount:K.feeAmount+(K.funding?.feeAmount??0n)},J.swapAmountIn=K.amountIn,J.fundingFeeAmount=K.funding?.feeAmount??0n,s.current.set(J,j.current.get(K)),J},async sign(T){const H=s.current.get(T);if(H&&b()!==H.scope)throw new Error("Order wallet or provider changed");const V=await n.sign(T);if(H){if(b()!==H.scope)throw new Error("Order wallet or provider changed during signing");const te=V.id,Z=V.authorization.serviceId;H.conditional={id:te,register:()=>n.register(V),get:()=>n.get(te,Z)},s.current.set(V,H),r.current.set(V,H)}return V},register(T){const H=s.current.get(T);if(!H)return n.register(T);if(r.current.get(T)!==H)throw new Error("Sign the current order before registration");return D(H)}},status:d,canPrepare:m&&!d.pending&&!d.isExecuting&&t.isReady&&t.isAuthenticated&&t.isConnected&&!o?.isWhitelistGateActive,canPlace:T=>{const H=I.current.get(T);try{return!!H&&m&&!d.pending&&b()===H.scope&&H.request.intents[0].mode==="7702"&&H.request.intents[0].exp>Date.now()/1e3&&!H.outcomePending&&!w.current}catch{return!1}},refreshStatus:R,prepareOrder:T=>q(T),prepareAmendment:L,signOrder:O,placeOrder:M,getOrder:T=>l.relayerService.getLimitOrder(T),listOrders:T=>{if(!t.address)throw new Error("Connect a wallet to list orders");return l.relayerService.listLimitOrders(t.address,T)},cancelOrder:P}}su(),exports.SpiceFlowProvider=l.SpiceFlowProvider,exports.SpiceFlowProviderContext=l.SpiceFlowProviderContext,exports.SpiceflowError=l.SpiceflowError,exports.Spinner=l.Spinner,exports.buildDarkPalette=l.buildDarkPalette,exports.buildLightPalette=l.buildLightPalette,exports.calculateBpsFee=l.calculateBpsFee,exports.duration=l.duration,exports.easing=l.easing,exports.font=l.font,exports.getChainConfig=l.getChainConfig,exports.getChainName=l.getChainName,exports.isSpiceflowError=l.isSpiceflowError,exports.radius=l.radius,exports.relayerService=l.relayerService,exports.resolveTheme=l.resolveTheme,exports.transition=l.transition,exports.useAssetDisplay=l.useAssetDisplay,exports.useIsUserWhitelisted=l.useIsUserWhitelisted,exports.useSpiceBrand=l.useSpiceBrand,exports.useWallet=l.useWallet,exports.z=l.z,Object.defineProperty(exports,"CONDITIONAL_INTENT_UNTIL_CANCELLED",{enumerable:!0,get:function(){return S.CONDITIONAL_INTENT_UNTIL_CANCELLED}}),Object.defineProperty(exports,"NATIVE_TOKEN_ADDRESS",{enumerable:!0,get:function(){return S.ZERO_ADDRESS}}),Object.defineProperty(exports,"SPICENET_NATIVE_CHAIN_ID",{enumerable:!0,get:function(){return S.SPICENET_NATIVE_CHAIN_ID}}),Object.defineProperty(exports,"SPICE_COMBINED_FEE_RECIPIENT",{enumerable:!0,get:function(){return S.SPICE_COMBINED_FEE_RECIPIENT}}),Object.defineProperty(exports,"SPICE_GAS_FEE_RECIPIENT",{enumerable:!0,get:function(){return S.SPICE_GAS_FEE_RECIPIENT}}),Object.defineProperty(exports,"SPICE_PLATFORM_FEE_RECIPIENT",{enumerable:!0,get:function(){return S.SPICE_PLATFORM_FEE_RECIPIENT}}),Object.defineProperty(exports,"SPICE_SOLVER_ADDRESS",{enumerable:!0,get:function(){return S.SPICE_SOLVER_ADDRESS}}),Object.defineProperty(exports,"applySlippage",{enumerable:!0,get:function(){return S.applySlippage}}),Object.defineProperty(exports,"buildUniV3SwapCalls",{enumerable:!0,get:function(){return S.buildUniV3SwapCalls}}),Object.defineProperty(exports,"getChainIdsByNetwork",{enumerable:!0,get:function(){return S.getChainIdsByNetwork}}),Object.defineProperty(exports,"getEscrowContractAddress",{enumerable:!0,get:function(){return S.getEscrowContractAddress}}),Object.defineProperty(exports,"isNativeToken",{enumerable:!0,get:function(){return S.isNativeToken}}),Object.defineProperty(exports,"isSpicenetChainId",{enumerable:!0,get:function(){return S.isSpicenetChainId}}),Object.defineProperty(exports,"normalizeNativeTokenAddress",{enumerable:!0,get:function(){return S.normalizeNativeTokenAddress}}),Object.defineProperty(exports,"spicenetAbi",{enumerable:!0,get:function(){return S.spicenetAbi}}),Object.defineProperty(exports,"spicenetWithdrawalAbi",{enumerable:!0,get:function(){return S.spicenetAbi}}),exports.AERODROME_BASE_CONFIG=xr,exports.AccountDisplay=sd,exports.AddFundsLink=ni,exports.AssetBalance=sm,exports.AssetSelector=or,exports.CheckIcon=Qc,exports.ChevronIcon=$s,exports.CloseIcon=Rr,exports.DEFAULT_LIQUIDITY_VENUES=ro,exports.DetailRow=zn,exports.METRIC_CONFIG=qn,exports.ProviderLogin=xa,exports.SATSUMA_CITREA_CONFIG=Yo,exports.SPICE_PLATFORM_FEE_BPS=fa,exports.SearchInput=Ya,exports.SelectChainModal=Jm,exports.SpiceAccount=Xm,exports.SpiceDeposit=yd,exports.SpiceLock=nh,exports.SpiceSupply=ih,exports.SpiceWithdraw=Va,exports.StatusBanner=vn,exports.UNIV3_ARBITRUM_CONFIG=Li,exports.UNIV3_BASE_CONFIG=Wi,exports.UNIV3_ETHEREUM_CONFIG=qi,exports.UNIV3_ROBINHOOD_CONFIG=zi,exports.UNIV3_ROBINHOOD_SUSHI_CONFIG=Hi,exports.UNIV4_BASE_CONFIG=Ji,exports.UNIV4_ROBINHOOD_CONFIG=$i,exports.V4_NATIVE_CURRENCY=_n,exports.areEquivalentOnChains=Cr,exports.assetCapability=Yn,exports.assetPositionId=xe,exports.buildLiquidityVenues=js,exports.buildPayChainBatches=rr,exports.buildRoutedBatches=Tp,exports.buildSpicenetWithdrawalBatch=Tr,exports.buildSupplyChainBatches=Co,exports.createAerodromeExactOutputVenue=Ki,exports.createAerodromeVenue=yr,exports.createExactOutputRegistry=Nr,exports.createLiquidityRegistry=Yi,exports.createMetricExactOutputVenue=Ri,exports.createMetricVenue=Ti,exports.createSatsumaExactOutputVenue=Xo,exports.createSatsumaVenue=br,exports.createUniV3ExactOutputVenue=Xo,exports.createUniV3Venue=br,exports.createUniV4ExactOutputVenue=ic,exports.createUniV4Venue=ac,exports.encodeUniV3ExactOutputCall=Ni,exports.estimateFeePreview=ns,exports.estimateRequiredGrossFunding=$p,exports.estimateSupplyMaxAmount=rf,exports.executePay=Ml,exports.executeSupply=Nl,exports.fetchBalances=Xs,exports.findEquivalentOnChain=ls,exports.getAssetChainTokenCandidates=Ks,exports.getBestUniV3ExactOutputQuote=Pi,exports.getBestUniV3Quote=Mi,exports.isExternalSource=Ys,exports.isMultiSourceFundingAsset=Pr,exports.isSupportedSupplyAsset=xf,exports.limitOrderId=Ia,exports.resolveAssetTokenAddressOnChain=Mn,exports.resolveFundedToken=fc,exports.resolveInputSupplySwapQuote=Ur,exports.resolveRoute=Fp,exports.reverseUniV3Path=Di,exports.scaleTokenAmount=sr,exports.useAssetInput=ch,exports.useLockDuration=uh,exports.useSmartWallet=fh,exports.useSpiceAccount=mh,exports.useSpiceAction=hh,exports.useSpiceActionActivity=uo,exports.useSpiceAssets=Ec,exports.useSpiceConditionalIntents=Ed,exports.useSpiceExecution=Js,exports.useSpiceInventory=Ms,exports.useSpiceLimitOrders=gh,exports.useSpiceLock=bd,exports.useSpicePendingDeposits=ph,exports.useSpiceSupply=Wr,exports.useSupplyAssets=Kl,exports.useSupplyQuote=Jl,exports.useTokenLogo=Ga,exports.useWalletBalances=Er;
|
|
73
|
+
`})]})},nh=p.memo(th),sh=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,lockBatches:s,lockTokenSymbol:r,lockTokenLogoURI:o,destinationInputHook:i,sourceAssetInputHook:a,lockDurationHook:l,lockChainId:u,durationOptions:m,votingPowerEstimate:f,destinationTokenAddress:h,destinationTokenDecimals:y,beneficiary:g,onSubmit:x,onLockSuccess:w,onLockError:v,onLockExecute:C,sourceToDestinationConversionRate:E,onAddFunds:k,buildSpicenetBatch:F,feeFunding:O,combineSourceBalances:I,styles:b,dark:A})=>{const{theme:R,dark:B,primaryColor:q,dk:j}=d.useSpiceBrand(b,A),P=R.typography.fontFamily,D=B?j.cardBg:b?.assetSelector?.backgroundColor||b?.secondaryBackground||"#e9e9e9",M=B?`1px solid ${j.cardBorder}`:"0.5px solid #A8A8A7",L=B?"12px":"6px",T=B?j.textPrimary:"#111827",H=B?j.textSecondary:"#6b7280",V=p.useMemo(()=>({...b,assetSelector:{...b?.assetSelector,backgroundColor:B?j.cardBg:b?.assetSelector?.backgroundColor,borderRadius:B?"12px":b?.assetSelector?.borderRadius},secondaryBackground:B?j.cardBg:b?.secondaryBackground}),[b,B]),te=p.useMemo(()=>B?{...R,colors:{...R.colors,secondary:j.cardBg,surfaceHover:j.hoverBg,border:j.cardBorder,borderHover:j.inputBorder}}:R,[B,R]),[Z,K]=p.useState(null),Y=p.useRef(!1);p.useEffect(()=>{e||(Y.current=!1)},[e]);const[J,we]=p.useState(0),me=l?.selectedDurationIdx??J,xe=l?.setSelectedDurationIdx??we,Ce=l?.selectedDuration??m[me]??m[0],ne=vd({enabled:e&&!C,selectedAsset:Z,lockBatches:s,lockChainId:u,lockTokenSymbol:r,lockTokenLogoURI:o,destinationTokenAddress:h,destinationTokenDecimals:y,beneficiary:g,onSubmit:x,onLockSuccess:w,onLockError:v,buildSpicenetBatch:F,feeFunding:O,combineSourceBalances:I}),_=ne.assets.selectable,{isExecuting:de,step:W,txHash:je}=ne.status,[Ae,z]=p.useState(!1),Q=Number(Z?.amount||"0"),se=ne.quote.isDirect,ce=!se,X=ne.fees.error,oe=ne.fees.isLoading,Oe=ne.fees.preview,Ne=Q>0,he={error:ne.quote.quoteError,isQuoting:ne.quote.isQuoting},Se=C?"Move onLockExecute protocol calls to lockBatches and application updates to onLockSuccess before continuing.":ne.metadataError||ne.status.error||X||he.error,Te=ne.canExecute,ve=ne.fees.destinationAmount,We=ve===void 0?"0":N.formatUnits(ve,ne.destination.decimals),be=Number(We),Pe=be>0?be.toLocaleString(void 0,{maximumSignificantDigits:6}):null,ue=_.find(Me=>Me.chainId===u&&Me.address.toLowerCase()===ne.destination.address.toLowerCase()),Ke=ue&&ue.balanceFormatted>0&&ue.balanceUsd>0?ue.balanceUsd/ue.balanceFormatted:E&&E>0?E:null,ft=Ke===null?null:(be*Ke).toFixed(2),tt=Z&&Z.asset.balanceFormatted>0&&Z.asset.balanceUsd>0?Z.asset.balanceUsd/Z.asset.balanceFormatted:se?Ke:null,$e=tt===null?void 0:`$${(Q*tt).toFixed(2)}`,Qe=f&&be>0&&Ce?f(be,Ce.months):void 0,Ee=p.useCallback(Me=>{K(bt=>({asset:Me,amount:bt&&ye(bt.asset)===ye(Me)?bt.amount:""})),ne.retrySupply(),a?.setSelectedAsset({address:Me.address,symbol:Me.symbol,decimals:Me.decimals,chainId:Me.chainId})},[a?.setSelectedAsset,ne.retrySupply]),Ie=p.useCallback(Me=>{K(bt=>bt&&{...bt,amount:Me}),a?.setAssetAmount(Me),ne.retrySupply()},[a?.setAssetAmount,ne.retrySupply]);p.useEffect(()=>{if(ne.capability?.policyExcluded){K(null);return}de||ne.assets.loading||ne.assets.refreshing||ne.assets.error||K(Me=>{if(!Me)return Y.current||!_[0]?null:(Y.current=!0,{asset:_[0],amount:a?.assetAmount??""});const bt=_.find(Rt=>ye(Rt)===ye(Me.asset));return bt?bt===Me.asset?Me:{...Me,asset:bt}:Me.asset.balance===0n?Me:{...Me,asset:{...Me.asset,balance:0n,balanceFormatted:0,balanceUsd:0}}})},[_,de,ne.assets.loading,ne.assets.refreshing,ne.assets.error,ne.capability?.policyExcluded]),p.useEffect(()=>{i&&(i.setSelectedAsset(ne.destination),i.setAssetAmount(We))},[ne.destination,We,i?.setSelectedAsset,i?.setAssetAmount]);const lt=async()=>{z(!0),await ne.submitSupply()},_e=()=>{z(!1),ne.retrySupply()},ae=()=>{z(!1),K(null),ne.resetAfterSuccess()},dt=c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"6px"},children:[c.jsx(Va,{color:H}),c.jsxs("p",{style:{fontSize:"13px",color:H,margin:0,lineHeight:"1.5"},children:["Add ",r," by converting assets from your account"]})]});if(!e)return null;const ut={backgroundColor:D,border:M,borderRadius:L,padding:"16px",marginBottom:"16px"};return c.jsx(zn,{isOpen:e,onClose:t,title:`Add ${r} to your account`,subtitle:dt,styles:b,dark:B,footerLinkText:"Spicenet accounts \u2192",closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"0 24px 8px 24px",position:"relative"},children:[c.jsx(xo,{activity:ne.status.activity,palette:j,onRefresh:()=>{ne.assets.refreshSpiceAssets(),ne.assets.refreshWalletAssets()}}),c.jsxs("div",{style:{marginBottom:"12px"},children:[k&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"6px"},children:c.jsx(ni,{onClick:k,color:q,fontFamily:P})}),c.jsx("div",{style:{marginTop:"10px",fontSize:"13px",color:H,fontFamily:P},children:c.jsx(or,{assets:_,selectedAsset:Z??void 0,onAssetSelect:Ee,onAmountChange:Ie,label:"Amount",showBalance:!0,getAvailableBalance:ne.assets.getAvailableBalance,showMaxButton:!0,disabled:de||ne.status.finalizing,maxAmount:Z&&ne.amount.availableBalance!==void 0?N.formatUnits(ne.amount.availableBalance,Z.asset.decimals):void 0,resolveMaxAmount:ne.resolveMaxAmount,theme:te,styles:V})}),c.jsx("div",{style:{marginTop:"6px",paddingLeft:"4px",fontSize:"13px",color:H,fontFamily:P},children:$e})]}),c.jsxs("div",{style:ut,children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"16px",borderBottom:B?`1px solid ${j.cardBorder}`:"1px solid #e5e7eb"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[o?c.jsx("img",{src:o,alt:r,style:{width:"32px",height:"32px",borderRadius:"50%",objectFit:"cover"}}):c.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:B?j.inputBg:"#d1d5db",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:700,color:T},children:r.slice(0,2)}),c.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:T,fontFamily:P},children:r})]}),c.jsxs("div",{style:{textAlign:"right"},children:[c.jsx("div",{style:{fontSize:"22px",fontWeight:700,color:T,fontFamily:P,lineHeight:1.1},children:Pe??"0.00"}),(!ce||ft!==null)&&c.jsxs("div",{style:{fontSize:"12px",color:H,fontFamily:P,marginTop:"2px"},children:["~$",ft??"0.00"]})]})]}),c.jsxs("div",{style:{paddingTop:"16px",paddingBottom:"16px",borderBottom:B?`1px solid ${j.cardBorder}`:"1px solid #e5e7eb"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[c.jsx("span",{style:{fontSize:"15px",fontWeight:500,color:H,fontFamily:P},children:"Lock Duration"}),c.jsx($s,{color:H})]}),c.jsx(nh,{options:m,selectedIndex:me,onSelect:Me=>{!de&&!ne.status.finalizing&&xe(Me)},primaryColor:q,dark:B,textPrimary:T,textSecondary:H})]}),c.jsxs("div",{style:{paddingTop:"12px",display:"flex",flexDirection:"column",gap:"8px"},children:[c.jsx(Cd,{label:"Estimated Lock Expiry",value:Ce?.months!==void 0?_m(Ce.months):"\u2014",fontFamily:P,dark:B,textPrimary:T,textSecondary:H}),f&&c.jsx(Cd,{label:"Estimated voting power",value:Qe!==void 0?`${Qe} votes/epoch`:"\u2014",fontFamily:P,dark:B,textPrimary:T,textSecondary:H})]})]}),Ne&&c.jsx($a,{fontFamily:P,textPrimary:T,textSecondary:H,cardBg:D,cardBorder:M,resolvedDark:B,darkCardBorder:j.cardBorder,primaryColor:q,feePreview:Oe,asset:Z?.asset,directExecutionFeeNote:ne.flags.directExecutionFeeNote,isLoading:oe||he.isQuoting,errorText:X}),ne.status.finalizationError&&c.jsx(d.Button,{onClick:ne.retryFinalization,disabled:ne.status.finalizing,children:"Retry application update"}),Se&&c.jsx(vn,{variant:"error",palette:j,fontFamily:P,style:{marginBottom:"12px"},children:Se}),c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:()=>{he.error?ne.retrySupply():lt()},disabled:de||!Te&&!he.error,loading:de,dark:B,styles:{...b,button:{...b?.button,backgroundColor:q}},children:de?se?"LOCKING...":"CONVERTING...":he.error?"RETRY QUOTE":he.isQuoting?"GETTING SWAP QUOTE...":oe&&Ne?"CALCULATING FEES...":se?`LOCK ${r}`:`CONVERT TO ${r}`}),Ae&&!ne.status.finalizationError&&(W==="success"||W==="error"||de)&&c.jsx(xa,{type:"lock",isOpen:!de,isProcessing:de,closeOnComplete:!1,chainId:u,showStepBreakdown:!1,onRetryTx:_e,onNewTx:ae,onClose:()=>z(!1),onComplete:ae,results:W==="success"||W==="error"?[{asset:{symbol:r,address:ne.destination.address},txHash:je??"",success:W==="success",error:Se??void 0,amount:Z?.amount}]:void 0,theme:R,styles:b,dark:B})]})})},rh=({variant:e,destinationSymbol:t,destinationLogoURI:n,destinationDecimals:s,primaryColor:r,fontFamily:o,textPrimary:i,textSecondary:a,cardBg:l,cardBorder:u,dk:m,dark:f,isQuoting:h,quoteError:y,estimatedOutput:g,paymentAmount:x,needsSwap:w,exactOutputSwap:v,adjustable:C=!1,maxAmount:E,onAmountChange:k})=>e==="supply"?c.jsxs("div",{style:{backgroundColor:l,border:`1px solid ${u}`,borderRadius:f?"8px":"7px",padding:"14px 16px 12px 16px",marginBottom:"16px",minHeight:"112px",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},children:[c.jsxs("div",{style:{minWidth:0},children:[c.jsx("span",{style:{fontFamily:o,fontSize:"17px",fontWeight:500,color:f?"#a7abb2":"#7D7C7B",lineHeight:"24px"},children:"Used in TX"}),c.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:a,fontFamily:o,marginTop:"10px"},children:"Net amount after swap and fees"})]}),c.jsxs("div",{style:{textAlign:"right",minWidth:0,display:"inline-flex",alignItems:"center",gap:"8px",border:`1px solid ${u}`,borderRadius:"8px",padding:"8px 10px",minHeight:"42px"},children:[c.jsx(Id,{symbol:t,logoURI:n,primaryColor:r,size:24}),c.jsx("span",{style:{fontSize:"16px",fontWeight:500,color:f?"#f3f4f6":"#3C3E42",lineHeight:"1.3",fontFamily:o,letterSpacing:0},children:t})]})]}),c.jsx("div",{style:{textAlign:"right",minWidth:0},children:h?c.jsx("span",{style:{fontSize:"18px",color:a,fontFamily:o},children:"Quoting..."}):y?c.jsx("span",{style:{fontSize:"13px",color:f?"#f87171":"#dc2626",fontFamily:o},children:"Quote failed"}):g?c.jsx(Ws,{value:g,title:g,fontFamily:o,color:i,lineHeight:"0.95",textAlign:"right",maxFontSize:32,minFontSize:18}):c.jsx("span",{style:{fontSize:"20px",color:a,fontFamily:o},children:"\u2014"})})]}):c.jsx(oh,{destinationSymbol:t,destinationLogoURI:n,destinationDecimals:s,primaryColor:r,fontFamily:o,textPrimary:i,textSecondary:a,cardBg:l,cardBorder:u,dk:m,dark:f,paymentAmount:x||"0",needsSwap:w,exactOutputSwap:v,isQuoting:h,adjustable:C,maxAmount:E,onAmountChange:k}),kd=p.memo(rh),Id=({symbol:e,logoURI:t,primaryColor:n,size:s})=>t?c.jsx("img",{src:t,alt:e,style:{width:s,height:s,borderRadius:"50%",objectFit:"cover"}}):c.jsx("div",{style:{width:s,height:s,borderRadius:"50%",backgroundColor:`${n}22`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:s<30?"11px":"12px",fontWeight:700,color:n},children:e.slice(0,2)}),oh=({destinationSymbol:e,destinationLogoURI:t,destinationDecimals:n,primaryColor:s,fontFamily:r,textPrimary:o,textSecondary:i,cardBg:a,cardBorder:l,dk:u,dark:m,paymentAmount:f,needsSwap:h,exactOutputSwap:y,isQuoting:g,adjustable:x,maxAmount:w,onAmountChange:v})=>{const C=d.font.mono,E=parseFloat(f||"0"),k=w?parseFloat(w):0,[F,O]=p.useState(f||""),I=p.useRef(null),[b,A]=p.useState(null),[R,B]=p.useState(null);p.useEffect(()=>{x||O(f||"")},[f,x]);const q=D=>{let M=D;M.startsWith(".")&&(M="0"+M);const L=d.parseNumericInput(M);let T=L;w&&parseFloat(L)>parseFloat(w)&&(T=w),O(T),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>v?.(T),300)},j=D=>{if(!k)return;if(D===100){O(w||k.toString()),I.current&&clearTimeout(I.current),v?.(w||k.toString());return}const M=10**n,L=Math.floor(k*D/100*M)/M,T=d.formatDecimalInput(L,n);O(T),I.current&&clearTimeout(I.current),v?.(T)},P=k>0?parseFloat(F||"0")/k*100:0;return p.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]),c.jsxs("div",{style:{backgroundColor:a,border:`1px solid ${l}`,borderRadius:m?"12px":"6px",padding:"16px",marginBottom:"16px"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[c.jsx(Id,{symbol:e,logoURI:t,primaryColor:s,size:32}),c.jsxs("div",{children:[c.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:o,fontFamily:r},children:"Payment"}),c.jsx("div",{style:{fontSize:"12px",color:i,fontFamily:r,marginTop:"2px"},children:e})]})]}),c.jsxs("div",{style:{textAlign:"right"},children:[x?c.jsx(Ws,{element:"input",ariaLabel:`${e} amount`,dataSpiceflowFocus:!0,value:F,onChange:D=>q(D.target.value),placeholder:"0.0",fontFamily:C,color:o,lineHeight:1.1,textAlign:"right",maxFontSize:20,minFontSize:12,style:{width:"120px"}}):c.jsx(Ws,{element:"div",value:E>0?f:"0.00",title:E>0?f:"0.00",fontFamily:C,color:o,lineHeight:1.1,textAlign:"right",maxFontSize:20,minFontSize:12}),c.jsx("div",{style:{fontSize:"12px",color:i,fontFamily:C,marginTop:"2px"},children:e}),x&&k>0&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"10px",marginTop:"6px"},children:[0,25,50,75,100].map((D,M)=>{const L=Math.abs(P-D)<1,T=M===4,H=b===D,V=R===D;return c.jsx("button",{onClick:()=>j(D),onMouseEnter:()=>A(D),onMouseLeave:()=>{A(null),B(null)},onMouseDown:()=>B(D),onMouseUp:()=>B(null),title:`${D}%`,style:{width:"14px",height:"14px",padding:0,border:"none",backgroundColor:"transparent",cursor:"pointer",opacity:L?1:H?.8:.5,transform:V?"scale(0.85)":H?"scale(1.15)":"scale(1)",transition:d.transition.interactive},children:c.jsx(La,{pct:D,isMax:T,primaryColor:s,dark:m,fillColor:m?u?.textSecondary||"#9ca3af":"#3C3E42"})},D)})})]})]}),h&&y&&!g&&c.jsx("div",{style:{marginTop:"12px",paddingTop:"12px",borderTop:m?`1px solid ${u?.cardBorder||l}`:"1px solid #e5e7eb",display:"flex",justifyContent:"flex-end"},children:c.jsxs("span",{style:{fontSize:"11px",color:i,fontFamily:r,opacity:.7},children:["via ",y.venue]})})]})},Sd={idle:"",building:"Preparing transaction...","signing-delegation":"Signing delegation...","signing-intent":"Signing intent...",submitting:"Submitting transaction...",executing:"Executing on-chain...",success:"Deposit confirmed",error:"Transaction failed"},Ad=["building","signing-delegation","signing-intent","submitting","executing"],ah=({step:e,statusMsg:t,txHash:n,explorerUrl:s,currentStepIdx:r,palette:o,cardBg:i,cardBorder:a,textPrimary:l,textSecondary:u,fontFamily:m,primaryColor:f,onRetry:h})=>c.jsxs("div",{style:{padding:"10px 14px",borderRadius:"7px",marginBottom:"16px",backgroundColor:e==="success"?i:e==="error"?o.errorBg:i,border:`1px solid ${e==="success"?a:e==="error"?o.errorBorder:a}`},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[e==="success"?c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",style:{flexShrink:0},children:c.jsx("path",{d:"M5 13l4 4L19 7",stroke:o.successText,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})}):e==="error"?c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",style:{flexShrink:0},children:c.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:o.errorText,strokeWidth:"2.5",strokeLinecap:"round"})}):c.jsx(d.Spinner,{size:14,color:f}),c.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:e==="success"?l:e==="error"?o.errorText:l,fontFamily:m,flex:1},children:e==="success"?"Deposit confirmed":e==="error"?t||"Transaction failed":t||Sd[e]}),e==="success"&&n&&c.jsx("a",{href:`${s}/tx/${n}`,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"12px",color:f,fontFamily:m,textDecoration:"none",whiteSpace:"nowrap",flexShrink:0},children:"View tx \u2192"}),e==="error"&&c.jsx("button",{onClick:h,style:{background:"none",border:"none",fontSize:"12px",color:f,fontFamily:m,cursor:"pointer",padding:0,whiteSpace:"nowrap",flexShrink:0},children:"Retry \u2192"})]}),r>=0&&e!=="success"&&e!=="error"&&c.jsx("div",{style:{marginTop:"8px",height:"3px",borderRadius:"2px",backgroundColor:`${u}22`,overflow:"hidden"},children:c.jsx("div",{style:{height:"100%",width:"100%",borderRadius:"2px",backgroundColor:f,transformOrigin:"left center",transform:`scaleX(${(r+1)/Ad.length})`,transition:"transform 400ms ease"}})})]}),ih=()=>{},ch=({isOpen:e,onClose:t,closeOnBackdropClick:n=!1,destinationToken:s,sourceChains:r,supportedSourceAssets:o,additionalSourceTokens:i,includeExternalWalletAssets:a,includeCrossChainEmbeddedAssets:l,combineSourceBalances:u,fundingSources:m,recipient:f,feeOnlyAction:h,actionInput:y,actionProceeds:g,feeFunding:x,feeFundingReserve:w,maxSlippage:v,resolveInputSwap:C,buildActionCalls:E,feeExecutionMode:k="user-transfer",buildSpicenetBatch:F,onPayExecute:O,resolveExactOutputSwap:I,actionLabel:b,amountDirection:A=h?"output":m?"input-inclusive":"input",swapDescription:R,directDescription:B,paymentAmount:q,amountInputMode:j="fixed",maxPaymentAmount:P,onAmountChange:D,styles:M,dark:L,title:T,subtitle:H,onAddFunds:V,onSubmit:te,beforeSubmit:Z,submitDisabled:K,onStateChange:Y,onSuccess:J,onError:we})=>{const me=A==="output",xe=d.useAssetDisplay(),Ce=A==="input-inclusive",{theme:ne,dark:_,primaryColor:de,dk:W,palette:je,fontFamily:Ae,monoFont:z,inputDark:Q,cardBg:se,cardBorder:ce,textPrimary:X,textSecondary:oe,subtitleText:Oe}=d.useSpiceBrand(M,L),Ne=p.useMemo(()=>Q?{...ne,colors:{...ne.colors,secondary:W.cardBg,surfaceHover:W.hoverBg,border:"#2d2d2d",borderHover:"#3a3a3a"}}:ne,[Q,ne,W.cardBg,W.hoverBg]),he=Fo(s,e),Se=he.token??To,Te=p.useMemo(()=>Se.logoURI?Se:{...Se,logoURI:na[Se.symbol.toUpperCase()]},[Se]),ve=Te.chainId,We=Fo(m?.token,e&&!!m).token,[be,Pe]=p.useState(null),[ue,Ke]=p.useState(q||""),ft=j==="adjustable"?ue:q||"0",tt=q?.trim(),$e=me&&j==="fixed"&&tt!==void 0&&tt!==""&&parseFloat(ft||"0")===0,{operationKey:Qe,feeQuote:Ee,selectedAsset:Ie,capability:lt,retryFinalization:_e,refreshStatus:ae,assets:{selectable:dt,loading:ut,refreshing:Me,error:bt,getAvailableBalance:Rt},quote:{isQuoting:Xt,quoteError:St,estimatedOutput:un,exactOutputSwap:ot,isDirect:Le,needsSwap:at,pivot:rt},fees:{preview:wt,isLoading:ee,error:mt},amount:{sourceRequiredAmount:Re,parsed:ze,isInsufficientBalance:et,availableBalance:it},status:{activity:Ve,pending:At,recoveryChecking:ht,recoveryError:Pt,actionId:pt,intentId:Sn,autoContinue:pn,submissionStatus:Cn,idempotencyKey:Zn,user:gn,finalizationError:wn,finalizing:Jt,step:Ft,statusMsg:Ut,txHash:Wt,isExecuting:Qt,error:Bt,showStatusPanel:Ye,paymentResult:It},flags:{directExecutionFeeNote:An},canExecute:_t,submitSupply:sn,retrySupply:rn,dismissPaymentStatus:xn,submitPay:Yt,resolveMaxAmount:En,max:Ge,resetAfterSuccess:fn,resetPaymentState:en}=Wr({enabled:e,destinationToken:he.token&&Te,selectedAsset:m?null:be,paymentAmount:ft,amountDirection:A,sourceChains:r,supportedSourceAssets:o,additionalSourceTokens:i,includeExternalWalletAssets:a,includeCrossChainEmbeddedAssets:l,combineSourceBalances:u,fundingSources:m,recipient:f,feeOnlyAction:h,actionInput:y,actionProceeds:g,feeFunding:x,feeFundingReserve:w,maxSlippage:v,resolveInputSwap:C,buildActionCalls:E,feeExecutionMode:k,buildSpicenetBatch:F,onPayExecute:O,resolveExactOutputSwap:I,isZeroAmountPay:$e,onSubmit:te,beforeSubmit:Z,submitDisabled:K,onSuccess:J,onError:we}),Xn=p.useMemo(()=>({operationKey:Qe,feeQuote:Ee,selectedAsset:Ie,canExecute:_t&&!K,isExecuting:Qt,finalizing:Jt,finalizationError:wn,feePreview:wt,txHash:Wt,error:Bt,statusStep:Ft,statusMsg:Ut,pending:At,recoveryChecking:ht,recoveryError:Pt,actionId:pt,intentId:Sn,autoContinue:pn,submissionStatus:Cn,idempotencyKey:Zn,user:gn,refreshStatus:ae}),[Qe,Ee,Ie,_t,K,Qt,Jt,wn,wt,Wt,Bt,Ft,Ut,At,ht,Pt,pt,Sn,pn,Cn,Zn,gn,ae]),Nn=p.useRef(Y);Nn.current=Y,p.useEffect(()=>{Nn.current?.(Xn)},[Xn]);const yn=!!h||(!!m||!!be?.asset)&&ze>0,Jn=he.error||Bt,Hn=wn?c.jsx(d.Button,{onClick:_e,disabled:Jt,children:"Retry application update"}):null,fe=At||ht||Pt?c.jsxs(vn,{variant:"info",palette:je,fontFamily:Ae,children:[ht?"Checking transaction status...":Pt?"Transaction status is unavailable.":"Your transaction is pending.",c.jsx(d.Button,{onClick:()=>{ae()},disabled:ht,children:"Check status"})]}):null;p.useEffect(()=>{e||(Pe(null),j==="adjustable"&&Ke(q||""))},[e]),p.useEffect(()=>{if(lt?.policyExcluded){Pe(null);return}if(Qt||ut||Me||bt||!be)return;const nt=dt.find(Kt=>ye(Kt)===ye(be.asset));nt&&nt!==be.asset?Pe({...be,asset:nt}):!nt&&be.asset.balance>0n&&Pe({...be,asset:{...be.asset,balance:0n,balanceFormatted:0,balanceUsd:0}})},[dt,ut,Me,bt,Qt,lt?.policyExcluded]);const ie=p.useCallback(nt=>{Pe(Kt=>({asset:nt,amount:Kt?.asset&&ye(Kt.asset)===ye(nt)&&Kt.amount||""}))},[]),Ze=p.useCallback(nt=>{Pe(Kt=>Kt&&{...Kt,amount:nt})},[]),gt=p.useCallback(nt=>{let Kt=nt;P&&parseFloat(Kt)>parseFloat(P)&&(Kt=P),Ke(Kt),D?.(Kt)},[P,D]),Fe=p.useCallback(()=>{en(),Pe(null)},[en]),Nt=Le?B||`Your ${Te.symbol} will be used directly.`:R||"Your assets will be swapped and used in a single atomic transaction.",vt=(ve?d.getChainConfig(ve):void 0)?.viemChain?.blockExplorers?.default?.url??"",Gt=Ad.indexOf(Ft),$t=ht?"CHECKING STATUS...":At?"TRANSACTION PENDING":Qt?(Sd[Ft]||"EXECUTING...").toUpperCase():Ft==="success"?"DONE":et?"INSUFFICIENT BALANCE":(at||rt)&&St&&!Xt?"QUOTE ERROR":b.toUpperCase(),zt=p.useMemo(()=>{if(ht)return"CHECKING STATUS...";if(At)return"TRANSACTION PENDING";if(It?.status==="success")return"DONE";if(Qt)return"PAYING...";if(et&&be?.asset)return`INSUFFICIENT ${xe(be.asset).symbol}`;if((at||rt)&&St&&!Xt)return"QUOTE ERROR";if(b)return b.toUpperCase();const nt=ze>0?` ${ft} ${Te.symbol}`:"";return at?`SWAP & PAY${nt}`:`PAY${nt}`},[Qt,et,be,b,xe,ze,ft,Te.symbol,at,St,Xt,It?.status,At,ht]),qt=Ft==="success"?()=>{fn(),Pe(null)}:sn,Tt=Ft==="success"?!1:!!K||!_t;if(!e)return null;const mn=me?T||`Pay ${Te.symbol}`:b,Mt=me?H:c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"3px"},children:[c.jsx("span",{style:{marginTop:"3px",flexShrink:0},children:c.jsx(Va,{color:Oe})}),c.jsx("p",{style:{fontSize:"12px",color:Oe,margin:0,lineHeight:"1.4",fontFamily:Ae},children:Nt})]}),Fn={...M,button:{...M?.button,backgroundColor:de}},on=yn&&c.jsx($a,{fontFamily:Ae,textPrimary:X,textSecondary:oe,cardBg:se,cardBorder:ce,resolvedDark:_,darkCardBorder:W.cardBorder,primaryColor:de,feePreview:wt,feeOnlyAction:h,asset:be?.asset,isLoading:ee,errorText:mt,directExecutionFeeNote:An});if(me){const nt=It&&(It.status==="success"||It.status==="failed")?[{asset:{symbol:be?.asset?xe(be.asset).symbol:Te.symbol,address:be?.asset?.address||""},amount:ft,txHash:It.txHash||"",success:It.status==="success",error:It.status==="failed"?It.error:void 0}]:void 0;return c.jsx(zn,{isOpen:e,onClose:t,title:mn,subtitle:Mt,styles:M,dark:_,footerLinkText:"Spicenet accounts \u2192",closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"16px 24px 8px 24px",position:"relative"},children:[c.jsx(xo,{activity:Ve,palette:W}),V&&c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"6px"},children:c.jsx(ni,{onClick:V,color:de,fontFamily:Ae})}),!$e&&c.jsx("div",{style:{marginBottom:"12px"},children:c.jsx(or,{assets:dt,selectedAsset:be??void 0,disabled:Qt,onAssetSelect:ie,onAmountChange:ih,label:"Pay with",showBalance:!0,getAvailableBalance:Rt,showMaxButton:!1,hideAmountInput:!0,displayAmount:be&&Re!==null?N.formatUnits(Re,be.asset.decimals):be?"...":void 0,dark:_,theme:Ne,styles:M})}),!h&&c.jsx(kd,{variant:"pay",destinationSymbol:Te.symbol,destinationLogoURI:Te.logoURI,destinationDecimals:Te.decimals,primaryColor:de,fontFamily:Ae,textPrimary:X,textSecondary:oe,cardBg:se,cardBorder:ce,dk:W,dark:_,isQuoting:Xt,quoteError:St,estimatedOutput:un,paymentAmount:ft,needsSwap:at,exactOutputSwap:ot,adjustable:j==="adjustable",maxAmount:P,onAmountChange:gt}),on,Hn,fe,Jn&&c.jsx(vn,{variant:"error",palette:je,fontFamily:Ae,style:{marginBottom:"12px"},children:Jn}),c.jsx(d.Button,{variant:"outline",fullWidth:!0,onClick:It?.status==="success"?t:Yt,disabled:It?.status==="success"?!1:!!K||!_t,loading:Qt,dark:_,styles:Fn,children:zt}),It&&Ye&&!wn&&c.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:10,backgroundColor:_?W.shell:"white",borderRadius:_?"12px":"6px",padding:"16px 0"},children:c.jsx(xa,{type:"payment",isOpen:It.status!=="processing",isProcessing:Qt||It.status==="processing",closeOnComplete:!1,chainId:ve,onRetryTx:()=>{xn(),Yt()},onNewTx:Fe,onClose:()=>{xn()},onComplete:Fe,results:nt,styles:M,dark:_})})]})})}return c.jsx(zn,{isOpen:e,onClose:t,title:mn,subtitle:Mt,dark:_,styles:M,theme:ne,closeOnBackdropClick:n,children:c.jsxs("div",{style:{padding:"24px 24px 5px 24px",position:"relative"},children:[c.jsx(xo,{activity:Ve,palette:W}),m?c.jsxs("div",{style:{marginBottom:"16px",padding:"16px",backgroundColor:se,border:`1px solid ${ce}`,borderRadius:"8px",color:X,fontFamily:Ae},children:[c.jsxs("label",{style:{display:"block",marginBottom:"8px"},children:["Purchase amount (",We?.symbol??"...",")",c.jsx("input",{"aria-label":"Purchase amount",inputMode:"decimal",value:ft,disabled:Qt||j!=="adjustable"||Ft==="success",onChange:nt=>gt(nt.target.value),style:{display:"block",width:"100%",boxSizing:"border-box",padding:"10px",marginTop:"8px",fontSize:"24px",color:X,background:"transparent",border:`1px solid ${ce}`,borderRadius:"6px"}})]}),We&&it!==void 0&&c.jsxs("div",{style:{fontSize:"12px",color:oe},children:["Estimated available:"," ",N.formatUnits(it,We.decimals)," ",We.symbol]}),j==="adjustable"&&c.jsx(d.Button,{disabled:Qt||Ft==="success",onClick:()=>{Ge().then(nt=>{nt!==null&>(nt)})},children:"Max"}),Ee?.fundingPlan?.sources.map(nt=>c.jsxs("div",{style:{marginTop:"10px",fontSize:"12px",color:oe},children:["Up to ",N.formatUnits(nt.sourceSpendCap,nt.decimals)," ",nt.asset.symbol,nt.swap&&c.jsxs(c.Fragment,{children:[" ","\u2192 at least"," ",N.formatUnits(nt.amountOutMinimum,nt.pivotToken.decimals)," ",nt.pivotToken.symbol]}),nt.gasFeeAmount>0n&&c.jsxs(c.Fragment,{children:[" ","(funding fee"," ",N.formatUnits(nt.gasFeeAmount,nt.pivotToken.decimals)," ",nt.pivotToken.symbol,")"]})]},nt.positionId))]}):c.jsx("div",{style:{marginBottom:"16px"},children:c.jsx(or,{assets:dt,selectedAsset:be||void 0,onAssetSelect:ie,onAmountChange:Ze,disabled:Qt||Ft==="success",showBalance:!0,getAvailableBalance:Rt,showMaxButton:!0,label:u?"From":"From Wallet",placeholder:"0.00",theme:Ne,styles:M,dark:Q,resolveMaxAmount:Ce?void 0:En,maxAmount:be?.asset&&it!==void 0?N.formatUnits(it,be.asset.decimals):void 0})}),(m||be?.asset)&&(m||!Le||!!rt)&&!(Ce&&rt)&&c.jsx(kd,{variant:"supply",destinationSymbol:Te.symbol,destinationLogoURI:Te.logoURI,destinationDecimals:Te.decimals,primaryColor:de,fontFamily:Ae,textPrimary:X,textSecondary:oe,cardBg:se,cardBorder:ce,dark:_,isQuoting:Xt,quoteError:St,estimatedOutput:un}),on,Ft!=="idle"&&c.jsx(ah,{step:Ft,statusMsg:Ut,txHash:Wt,explorerUrl:vt,currentStepIdx:Gt,palette:je,cardBg:se,cardBorder:ce,textPrimary:X,textSecondary:oe,fontFamily:Ae,primaryColor:de,onRetry:()=>{rn()}}),Hn,fe,Bt&&(Ft==="idle"||!!wn)&&c.jsx(vn,{variant:"error",palette:je,fontFamily:Ae,style:{marginBottom:"16px"},children:Bt}),c.jsx(d.Button,{variant:"outline",fullWidth:!0,disabled:Tt,onClick:qt,theme:ne,dark:_,styles:Fn,style:{fontSize:"20px",fontWeight:600,letterSpacing:"1.5px",fontFamily:z},children:$t})]})})},lh=()=>{const[e,t]=p.useState("0"),[n,s]=p.useState(null);return{assetAmount:e,setAssetAmount:t,selectedAsset:n,setSelectedAsset:s}};async function dh(e,t,n,s){if(e.amountIn<=0n||e.minimumOutput<0n||!(e.venue.chainIds??[8453]).includes(e.chainId))throw new Error("Choose a positive fixed input, nonnegative minimum output and supported venue chain");const r=S.getTokensForChain(e.chainId).find(k=>k.equivalenceGroup==="USDC");if(!r)throw new Error("Configure the execution fee token for this chain");const o={...r,address:r.address,chainId:e.chainId},i=br({...e.venue,deadline:e.expiresAt}),a=await i.resolve({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:e.amountIn},e.chainId,t);if(!a)throw new Error("No supported fixed route for this conditional swap");let l=e.amountIn,u="";const m=async k=>{if(k<=0n)throw new vs(e.amountIn+1n,e.amountIn);const F=(k===e.amountIn?a:await i.resolve({type:"swap",tokenIn:e.tokenIn,tokenOut:e.tokenOut,amountIn:k},e.chainId,t))?.calls.find(b=>b.to.toLowerCase()===e.venue.swapRouter.toLowerCase());if(!F)throw new Error("No supported fixed route for this conditional swap");const{path:O}=N.decodeFunctionData({abi:Ps,data:F.data}).args[0];if(O.slice(0,42).toLowerCase()!==e.tokenIn.toLowerCase()||`0x${O.slice(-40)}`.toLowerCase()!==e.tokenOut.toLowerCase())throw new Error("The quoted route does not match the requested tokens");l=k;const I=[{to:e.tokenIn,value:0n,data:N.encodeFunctionData({abi:N.erc20Abi,functionName:"approve",args:[e.venue.swapRouter,k]})},{to:e.venue.swapRouter,value:0n,data:N.encodeFunctionData({abi:Ps,functionName:"exactInput",args:[{path:O,recipient:t,deadline:e.expiresAt,amountIn:k,amountOutMinimum:0n}]})}];return u=I[1].data,I},f=n.filter(k=>!k.balanceError&&k.balanceStatus!=="stale"&&k.owner?.toLowerCase()===t.toLowerCase()&&k.location!=="external"),h=f.find(k=>k._source==="wallet"&&k.chainId===e.chainId&&k.address.toLowerCase()===e.tokenIn.toLowerCase()),y=h&&jr(h,f,t,e.chainId),g={requestTimestampMs:Date.now(),currentPaymentAmount:"0",feeOnlyAction:!0,isPayMode:!0,destinationToken:o,embeddedWalletAddress:t,providerEmbeddedAddress:t,externalWalletAddress:void 0,address:t,isNon7702:!1,resolvedChainId:e.chainId,feeExecutionMode:"backend-transfer",buildSpicenetBatch:void 0,selectedAsset:null,needsSwap:!1,resolvedSwap:null,exactOutputSwap:null,quoteAmountOut:null,resolvedTokenIn:o.address,buildActionCalls:k=>m(k)},x={allowRelayerFeeFallback:!1,...g,expiresAt:Number(e.expiresAt),parsedAmount:0,isSourceDestToken:!0,isConnected:!0,ready:!0,authenticated:!0,isDirect:!0,isQuoting:!1,executionTokenAddress:o.address,actionInput:e.amountMode==="input-inclusive"?[{token:e.tokenIn,amount:e.amountIn}]:void 0,actionProceeds:{token:e.tokenOut,resolve:async()=>a.amountOut},feeFundingBalances:f,feeFundingReserve:h?{asset:h,amount:e.amountIn}:void 0,liquidityVenues:{includeDefaults:!1,venues:[{...e.venue,deadline:e.expiresAt,protocol:"aerodrome-slipstream",chainId:e.chainId}]},buildPayChainBatches:k=>rr(g,{...k,actionAmountOverride:k?.actionAmountOverride??e.amountIn}),buildSupplyChainBatches:k=>rr(g,{...k,actionAmountOverride:k?.actionAmountOverride??e.amountIn}),estimate:s},w=y?await vl({...x,feeOnlyAction:!1,isPayMode:!1,isFeeInclusiveInput:e.amountMode==="input-inclusive",selectedAsset:{asset:h,amount:N.formatUnits(e.amountIn,h.decimals)},combinedSourceGroup:y},g,ns):await Ra(x,ns),v=w?.fundingBatches??w?.batches;if(!w||!v?.length||w.preview.totalFee===void 0)throw new Error("Conditional swap fee plan is unavailable");const C=v.flatMap(k=>k.calls).find(k=>k.to.toLowerCase()===e.venue.swapRouter.toLowerCase()&&k.data===u);if(!C)throw new Error("The conditional swap is missing from its fee plan");const E=N.decodeFunctionData({abi:Ps,data:C.data}).args[0];return C.data=N.encodeFunctionData({abi:Ps,functionName:"exactInput",args:[{...E,amountOutMinimum:e.minimumOutput}]}),{batches:v,sourceAllocation:w.sourceAllocation,swapAmountIn:l,feeFundingSource:w.fundingSource,feeSourceAmount:w.fundingConversion?.amountInMax??w.proceedsUsed??w.sourceSpendCap,fees:{token:o.address,symbol:o.symbol,decimals:o.decimals,amount:w.preview.totalFee}}}const Ed=`0x${"00".repeat(32)}`;function si(){return BigInt(`0x${Array.from(crypto.getRandomValues(new Uint8Array(32)),e=>e.toString(16).padStart(2,"0")).join("")}`)}function uh(e,t){const n={chainId:e,to:t.to,value:t.value,selector:t.data.length>=10?t.data.slice(0,10):"0x"};try{const s=N.decodeFunctionData({abi:Ps,data:t.data});if(s.functionName==="exactInput"){const r=s.args[0];n.fixedInput=r.amountIn,n.minimumOutput=r.amountOutMinimum,r.amountOutMinimum===0n&&(n.disclosure="This fixed-input swap has zero minimum output. The router can execute it for any output amount, including a very poor fill.")}}catch{}return n}function Fd(){const e=d.useWallet(),t=p.useContext(d.SpiceFlowProviderContext),n=Ms({owner:e.address,role:"spend-source",enabled:e.isReady}),s=Xs(),r=p.useRef({wallet:e,provider:t,inventory:n,execution:s});r.current={wallet:e,provider:t,inventory:n,execution:s};const o=p.useRef(!0),i=p.useRef(0),a=JSON.stringify([e.address,d.relayerService.getBaseUrl(),t?.rpcOverrides,t?.provider,t?.network,t?.mode]),l=p.useRef(a);l.current!==a&&(l.current=a,i.current++);const u=p.useRef(!1),m=p.useRef(new WeakMap),f=p.useRef(new WeakMap),h=p.useRef();p.useEffect(()=>(o.current=!0,()=>{o.current=!1,i.current++}),[]);const y=p.useCallback(()=>JSON.stringify([i.current,r.current.wallet.address,d.relayerService.getBaseUrl(),r.current.provider?.rpcOverrides,r.current.provider?.provider,r.current.provider?.network,r.current.provider?.mode]),[]),g=I=>{if(!o.current||y()!==I)throw new Error("Wallet, provider or relayer changed during conditional intent processing")},x=p.useCallback(async I=>{const b=r.current.wallet.address;if(!b||!r.current.wallet.isReady)throw new Error("Connect a ready wallet before preparing a conditional intent");if(r.current.provider?.mode!=="7702")throw new Error("Conditional intents require a fully pre-signed 7702 action");if(!I.clientId||!I.serviceId||!I.triggerSpecification||!I.chainBatches.length)throw new Error("Conditional intent requires a client, service, exact trigger bytes and fixed action batches");if(I.semantics!=="state"&&I.semantics!=="event")throw new Error("Choose state or event trigger semantics");const A=BigInt(Math.floor(Date.now()/1e3));if(I.maxSignalAgeSeconds<1n||I.maxSignalAgeSeconds>86400n||I.validAfter>I.expiresAt||I.expiresAt<=A||I.expiresAt!==S.CONDITIONAL_INTENT_UNTIL_CANCELLED&&I.expiresAt-A>30n*86400n)throw new Error("Conditional intent validity or signal freshness is outside the supported window");const R=y(),B=structuredClone(I.chainBatches).map(M=>({...M,tokenTransfers:M.tokenTransfers??[]}));if(B.some(M=>!Number.isSafeInteger(M.chainId)||M.chainId<=0||!M.calls.length))throw new Error("Every action batch needs a supported chain and at least one fixed call");const q={...I.replacesIntentId?{replacesIntentId:I.replacesIntentId}:{},owner:b,clientId:I.clientId,serviceId:I.serviceId,authorizationNonce:si(),executionDigest:ca(B,I.expiresAt),executionPlanHash:Ed,triggerSpecificationHash:N.keccak256(I.triggerSpecification),evaluator:I.evaluator,semantics:I.semantics,maxSignalAgeSeconds:I.maxSignalAgeSeconds,validAfter:I.validAfter,expiresAt:I.expiresAt,maxExecutions:1},j=B.flatMap(M=>M.calls.map(L=>uh(M.chainId,L)));g(R);const P={triggerSpecification:I.triggerSpecification,chainBatches:structuredClone(B),actionSummary:j,additionalSignatureCount:2,delegationAuthorizationCount:new Set(B.filter(M=>!S.isSpicenetChainId(M.chainId)).map(M=>M.chainId)).size,triggerEnforcedBy:"SpiceFlow conditional-intent service"},D={scope:R,input:{...structuredClone(I),chainBatches:B},prepared:P,baseAuthorization:q};return m.current.set(P,D),P},[y]),w=p.useCallback(async I=>{I=structuredClone(I);const b=y(),A=r.current.wallet.address;if(!A||!r.current.wallet.isReady||r.current.provider?.mode!=="7702")throw new Error("Connect a ready 7702 wallet before preparing a conditional swap");const R=await d.getClientForChain(I.chainId,r.current.provider?.rpcOverrides).readContract({address:I.tokenIn,abi:N.erc20Abi,functionName:"balanceOf",args:[A]});g(b);const B=r.current.inventory.assets,q=B.find(L=>L._source==="wallet"&&L.location==="embedded"&&L.chainId===I.chainId&&d.addressesEqual(L.address,I.tokenIn)&&d.addressesEqual(L.owner,A))??S.getTokensForChain(I.chainId).find(L=>d.addressesEqual(L.address,I.tokenIn)),j=q?{...q,address:I.tokenIn,chainId:I.chainId,owner:A,location:"embedded",_source:"wallet",balance:R,balanceFormatted:Number(N.formatUnits(R,q.decimals)),balanceUsd:0,isNative:!1,balanceError:void 0,balanceStatus:void 0}:void 0,P=j?[...B.filter(L=>!(L._source==="wallet"&&L.location==="embedded"&&L.chainId===I.chainId&&d.addressesEqual(L.address,I.tokenIn)&&d.addressesEqual(L.owner,A))),j]:B;if(((j&&jr(j,P,A,I.chainId))?.availableBalance??R)<I.amountIn)throw new Error("The available wallet and escrow balance does not cover the order input");const D=await dh(I,A,P,r.current.execution.estimate);g(b);const M=await x({...I,chainBatches:D.batches});if(D.sourceAllocation){const L=D.sourceAllocation;m.current.get(M).validateFunding=()=>ha(D.batches,A,{walletFundingRequirement:{chainId:L.chainId,token:L.token,amount:L.walletInPlace}})}return M.fees=D.fees,M.feeFundingSource=D.feeFundingSource,M.feeSourceAmount=D.feeSourceAmount,M.swapAmountIn=D.swapAmountIn,M},[x,y]),v=p.useCallback(async I=>{const b=m.current.get(I);if(!b)throw new Error("Prepare this conditional intent in the current hook before signing");g(b.scope);const A=r.current.wallet.address;if(!A||!r.current.wallet.actions.signMessage)throw new Error("Wallet is not ready to sign this conditional intent");if(b.request)return b.prepared;if(u.current)throw new Error("A conditional authorization is already being signed");u.current=!0;try{await b.validateFunding?.(),g(b.scope);const R=await da({chainBatches:b.input.chainBatches,signingAddress:A,actions:r.current.wallet.actions});g(b.scope),await b.validateFunding?.(),g(b.scope);const B=await la(r.current.wallet.actions,b.input.chainBatches,b.input.expiresAt);g(b.scope);const q=R.map(({yParity:V,...te})=>({...te,...V===void 0?{}:{yParity:V}})),j=S.hashConditionalExecutionPlan(b.input.chainBatches.map(V=>({...V,tokenTransfers:V.tokenTransfers??[]})),q),P={...b.baseAuthorization,executionPlanHash:j},D=S.hashConditionalIntentAuthorization(P),M=await r.current.wallet.actions.signMessage({raw:D});g(b.scope);const L=typeof M=="string"?M:M.signature,T=S.hashChainBatches(b.input.chainBatches),H={authorization:P,authorizationSignature:L,triggerSpecification:b.input.triggerSpecification,action:{user:A,...b.input.executionAmountMode?{amountMode:b.input.executionAmountMode}:{},chainAuthorizations:q,intents:[{mode:"7702",signatureType:"ecdsa",signature:B,nbf:0,exp:Number(b.input.expiresAt),chainBatches:b.input.chainBatches.map((V,te)=>({hash:T[te].hash,chainId:V.chainId,tokenTransfers:V.tokenTransfers??[],calls:V.calls}))}]}};return b.request=structuredClone(H),b.authorizationSignature=L,b.chainAuthorizations=R,b.prepared={...structuredClone(b.prepared),authorization:structuredClone(P),id:S.getConditionalIntentId(D)},m.current.set(b.prepared,b),f.current.set(b.prepared,b),b.prepared}finally{u.current=!1}},[]),C=p.useCallback(async I=>{const b=f.current.get(I);if(!b?.request)throw new Error("Sign the prepared conditional intent before registration");g(b.scope);const A=await d.relayerService.registerConditionalIntent(b.request);return g(b.scope),A},[]),E=p.useCallback(async I=>{const b=y(),A=h.current;if(A&&A.scope===b&&A.serviceId===I&&A.expiresAt>Date.now()/1e3+30)return A.token;const R=r.current.wallet.address;if(!R||!r.current.wallet.isReady)throw new Error("Connect a wallet before reading conditional intent status");const B={owner:R,reader:R,serviceId:I,intentId:Ed,expiresAt:BigInt(Math.floor(Date.now()/1e3)+3600),nonce:si()},q=S.hashConditionalReadAuthorization(B),j=await r.current.wallet.actions.signMessage({raw:q});g(b);const P=typeof j=="string"?j:j.signature,D=await d.relayerService.createConditionalReadToken({...B,signature:P});return g(b),h.current={scope:b,serviceId:I,token:D.readToken,expiresAt:D.expiresAt},D.readToken},[y]),k=p.useCallback(async(I,b)=>{const A=y(),R=await E(b);g(A);const B=await d.relayerService.getConditionalIntent(I,R);return g(A),B},[E,y]),F=p.useCallback(async(I,b)=>{const A=y(),R=await E(I);g(A);const B=await d.relayerService.listConditionalIntents(R,b);return g(A),B},[E,y]),O=p.useCallback(async(I,b)=>{const A=y(),R=r.current.wallet.address;if(!R)throw new Error("Connect a wallet before cancelling a conditional intent");const B={owner:R,serviceId:b,intentId:I,cancellationNonce:si(),expiresAt:BigInt(Math.floor(Date.now()/1e3)+300)},q=S.hashConditionalCancellation(B),j=await r.current.wallet.actions.signMessage({raw:q});g(A);const P=typeof j=="string"?j:j.signature,D={...B,signature:P},M=await d.relayerService.cancelConditionalIntent(I,D);return g(A),M},[y]);return{prepare:x,prepareSwap:w,sign:v,register:C,authorizeRead:E,get:k,list:F,cancel:O}}function ph(e,t=0){const[n,s]=p.useState(t),r=e[n]??e[0],o=p.useMemo(()=>r?BigInt(Math.round(r.months*30*24*3600)):0n,[r?.months]);return{selectedDurationIdx:n,setSelectedDurationIdx:s,selectedDuration:r,durationSeconds:o}}function fh(e){const t=p.useContext(d.SpiceFlowProviderContext),n=t?.embeddedWalletAddress,s=e?.enabled===!1?void 0:n,r=t?.network?{network:t.network,pollIntervalMs:e?.pollIntervalMs,chainIds:e?.chainIds??t.supportedChainIds,discoverWalletBalances:e?.discoverWalletBalances}:void 0;return{...yd(s,r),embeddedWalletAddress:n}}function mh(){const{actions:e,isReady:t,isAuthenticated:n}=d.useWallet(),s=p.useContext(d.SpiceFlowProviderContext)?.embeddedWalletAddress,r=p.useRef(!1),o=p.useRef(0),i=p.useRef(null),a=p.useRef(e),[l,u]=p.useState(0);a.current=e,p.useEffect(()=>{r.current=!1,o.current=0,i.current&&(clearTimeout(i.current),i.current=null)},[s]),p.useEffect(()=>{if(!s||!t||!n||r.current)return;r.current=!0;let m=!1;return(async()=>{await qn(2e3);try{await d.ensureSmartWallet(s,a.current.signMessage),o.current=0}catch(f){console.warn("[SmartWallet] Registration failed:",f),r.current=!1,!m&&o.current<3&&(o.current+=1,i.current=setTimeout(()=>{u(h=>h+1)},5e3))}})(),()=>{m=!0,i.current&&(clearTimeout(i.current),i.current=null)}},[s,t,n,l])}function hh(){const e=p.useContext(d.SpiceFlowProviderContext),t=(e?.mode??"7702")==="7702"?"embedded":"external",n=e?.setMode,s=p.useCallback(r=>n?.(r==="embedded"?"7702":"ondemand"),[n]);return{mode:t,setMode:s,ownerAddress:t==="embedded"?e?.embeddedWalletAddress:e?.externalWalletAddress,embeddedAddress:e?.embeddedWalletAddress,externalAddress:e?.externalWalletAddress,isUserWhitelisted:e?.isUserWhitelisted??null,isWhitelistChecking:e?.isWhitelistChecking??!1,isWhitelistGateActive:e?.isWhitelistGateActive??!1,whitelistCheck:e?.whitelistCheck}}function gh({amount:e,enabled:t=!0,...n}){const s=p.useContext(d.SpiceFlowProviderContext),[r,o]=p.useState(null);p.useEffect(()=>{o(u=>u&&u.amount!==e?{...u,amount:e}:u)},[e]);const i=p.useMemo(()=>{if(!r)return null;const u=r.asset,m=u.location??(u._source==="spice"?"rollup":u._fundingWallet??((s?.mode??"7702")==="7702"?"embedded":"external"));return{...r,asset:{...u,location:m,owner:u.owner??(m==="external"?s?.externalWalletAddress:s?.embeddedWalletAddress),...u._wrapFromNative?{address:S.ZERO_ADDRESS,isNative:!0,positionId:void 0}:{}}}},[r,s?.mode,s?.embeddedWalletAddress,s?.externalWalletAddress]),a=Wr({...n,enabled:t,selectedAsset:i,paymentAmount:n.amountDirection==="output"?e:void 0}),l=p.useCallback(u=>o({asset:u,amount:e}),[e]);return{sources:a.assets.selectable,getAvailableBalance:a.assets.getAvailableBalance,availableBalance:a.amount.availableBalance,selectedAsset:a.selectedAsset,setSelectedAsset:o,selectAsset:l,quote:{isQuoting:a.quote.isQuoting,error:a.quote.quoteError,estimatedInput:a.quote.estimatedInput,estimatedOutput:a.quote.estimatedOutput,estimatedMinOutput:a.fees.destinationAmount===void 0||!n.destinationToken?null:N.formatUnits(a.fees.destinationAmount,n.destinationToken.decimals),isDirect:a.quote.isDirect,needsSwap:a.quote.needsSwap},feePreview:a.fees.preview,isFeePreviewLoading:a.fees.isLoading,feePreviewError:a.fees.error||a.status.error,canSubmit:a.canExecute,execute:a.submit,isExecuting:a.status.isExecuting,step:a.status.step,statusMsg:a.status.statusMsg,status:a.status,txHash:a.status.txHash,refreshAssets:a.assets.refreshSpiceAssets,resolveMaxAmount:a.resolveMaxAmount,retryFinalization:a.retryFinalization,refreshStatus:a.refreshStatus}}function wh(e){const t=d.useWallet(),n=Fd(),s=p.useRef(new WeakMap),r=p.useRef(new WeakMap),o=p.useContext(d.SpiceFlowProviderContext),i=Xs(),a=p.useRef(i);a.current=i;const[l,u]=p.useState({step:"idle",isExecuting:!1,message:"",error:null,pending:!1}),[m,f]=p.useState(!1),h=p.useRef(void 0),y=p.useRef(e?.combineSourceBalances);y.current=e?.combineSourceBalances;const g=p.useRef({wallet:t,provider:o});g.current={wallet:t,provider:o};const x=p.useRef(!1),w=p.useRef(!1),v=p.useRef(null),C=p.useRef(!0),E=p.useRef(0),k=JSON.stringify([t.address,t.isReady,t.isAuthenticated,t.isConnected,d.relayerService.getBaseUrl(),o?.rpcOverrides,o?.provider,o?.network,o?.mode,o?.allowedTokens,o?.isWhitelistGateActive]),F=p.useRef(k);F.current!==k&&(F.current=k,E.current++),p.useLayoutEffect(()=>(C.current=!0,()=>{C.current=!1,E.current++,v.current?.abort()}),[]),p.useLayoutEffect(()=>(f(!1),h.current=void 0,u({step:"idle",isExecuting:!1,message:"",error:null,pending:!1}),()=>{v.current?.abort()}),[k]);const O=p.useRef(new WeakMap),I=p.useRef(new WeakMap),b=()=>{if(!C.current)throw new Error("Order hook is no longer mounted");if(!g.current.wallet.isReady||!g.current.wallet.isAuthenticated||!g.current.wallet.isConnected||g.current.provider?.isWhitelistGateActive)throw new Error("Connect the current wallet before continuing the order");return JSON.stringify([E.current,g.current.wallet.address,g.current.wallet.isReady,g.current.wallet.isAuthenticated,g.current.wallet.isConnected,d.relayerService.getBaseUrl(),g.current.provider?.rpcOverrides,g.current.provider?.provider,g.current.provider?.network,g.current.provider?.mode,g.current.provider?.allowedTokens,g.current.provider?.isWhitelistGateActive])},A=p.useCallback(async T=>{const H=b(),V=h.current;f(!1);const te=await d.relayerService.supportsAutomaticContinuation();if(b()!==H||h.current!==V||w.current)return!1;if(V?.outcomePending==="registration"){const Y=V.conditional?await V.conditional.get():await d.relayerService.getLimitOrder(ka(V.request));if(b()!==H)return!1;if(V.conditional?!("conditionalIntentId"in Y)||Y.conditionalIntentId!==V.conditional.id:!("id"in Y)||Y.id!==ka(V.request)||!d.addressesEqual(Y.user,V.request.user)||Y.chainId!==V.input.chainId||!d.addressesEqual(Y.tokenIn,V.input.tokenIn)||!d.addressesEqual(Y.tokenOut,V.input.tokenOut)||Y.minimumOutput!==V.input.minimumOutput.toString())throw new Error("The original order registration could not be verified");return V.resolvedOrder=Y,V.placement=void 0,V.outcomePending=void 0,u({step:"success",isExecuting:!1,message:"Limit order placed",error:null,pending:!1}),f(!0),!0}if(V?.outcomePending==="funding"){if(!V.fundingActionId&&V.fundingSubmissionKey){const J=await d.relayerService.getActionBySubmission(V.request.user,V.fundingSubmissionKey);if(b()!==H)return!1;V.fundingActionId=J?.actionId}if(!V.fundingActionId)return u(J=>({...J,pending:!0})),!1;const Y=await d.relayerService.getIntentRecoveryStatus(V.fundingActionId,0);if(b()!==H)return!1;if(Y==="unresolved")return u(J=>({...J,pending:!0})),!1;if(Y==="completed"){V.fundingCompleted=!0;const J=await ps(V.request.user,V.input.chainId,V.input.tokenIn);if(b()!==H)return!1;if(J.available<V.input.grossAmount)return u(we=>({...we,pending:!0})),!1;V.placement=void 0}V.outcomePending=void 0}const Z=te?T??await d.relayerService.getWalletActions(g.current.wallet.address,{pendingOnly:!0}):[];if(b()!==H||w.current||h.current!==V)return!1;let K=!1;for(const Y of Z){if(Y.intents.length!==1){K=!0;break}const J=await d.relayerService.getIntentRecoveryStatus(Y.actionId,0);if(b()!==H)return!1;if(J==="unresolved"){K=!0;break}}return u(Y=>({...Y,pending:K,message:K?"A previous transaction is still pending":Y.message})),f(!K),!K},[]),R=p.useCallback(()=>A(),[A]),B=uo(t.address,l.pending&&t.isReady&&t.isAuthenticated&&t.isConnected,{pendingOnly:!0});p.useEffect(()=>{if(!l.pending||B.loading||B.error||!B.updatedAt)return;const T=E.current;A(B.actions).catch(()=>{C.current&&E.current===T&&f(!1)})},[B.revision,B.loading,B.error,l.pending,A]),p.useEffect(()=>{if(!t.address||!t.isReady||!t.isAuthenticated||!t.isConnected||o?.isWhitelistGateActive)return;const T=E.current;R().catch(()=>{C.current&&E.current===T&&(f(!1),u(H=>({...H,pending:!0,message:"Previous transaction status is unavailable"})))})},[k,R]);const q=p.useCallback(async(T,H,V)=>{if(w.current||h.current?.outcomePending)throw new Error("Resolve the previous order before preparing another");const te=b(),Z=y.current===!0&&!H&&!V?.skipFunding;if(T=structuredClone(T),!await R())throw new Error("Resolve the previous transaction before preparing another order");if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");const K=N.bytesToHex(crypto.getRandomValues(new Uint8Array(32))),Y=g.current.wallet.address;if(!Y)throw new Error("Connect a wallet before preparing an order");if(g.current.provider?.mode!=="7702")throw new Error("Limit orders require the 7702 wallet mode");if(!d.getRpcUrlForChain(T.chainId,g.current.provider?.rpcOverrides))throw new Error(`No RPC is available for order chain ${T.chainId}`);const J=Date.now();if(!Number.isSafeInteger(T.expiresAt)||T.expiresAt<=Math.floor(J/1e3)||T.expiresAt>Math.floor(J/1e3)+30*86400&&!(V&&BigInt(T.expiresAt)===S.CONDITIONAL_INTENT_UNTIL_CANCELLED)||T.grossAmount<=0n||T.minimumOutput<=0n)throw new Error("Enter a positive amount, minimum output and expiry within 30 days");const we=await ps(Y,T.chainId,T.tokenIn);if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");let me;const xe=T.grossAmount;if(Z&&we.available<xe){if(!await d.relayerService.supportsAutomaticContinuation())throw new Error("Automatic order funding requires backend recovery support");const je=S.getTokenByAddress(T.tokenIn,T.chainId);if(!je)throw new Error("Automatic order funding requires a supported escrow token");const Ae=d.getClientForChain(T.chainId,g.current.provider?.rpcOverrides),z=S.isNativeToken(T.tokenIn)?await Ae.getBalance({address:Y}):await Ae.readContract({address:T.tokenIn,abi:N.erc20Abi,functionName:"balanceOf",args:[Y]}),Q={address:T.tokenIn,chainId:T.chainId,owner:Y,location:"embedded",_source:"wallet",_fundingWallet:"embedded",decimals:je.decimals,symbol:je.symbol,name:je.name,balance:z,balanceFormatted:Number(N.formatUnits(z,je.decimals)),balanceUsd:0,isNative:S.isNativeToken(T.tokenIn)},se=Yn(Q,"spend-source",g.current.provider??{},{address:T.tokenIn,chainId:T.chainId},void 0,{requiresEscrow:!0});if(!se.eligible)throw new Error(se.reason??"Order funding is unavailable");const ce=xe-we.available;if(z<ce)throw new Error("Cash does not cover the limit order budget");const X=await ti({address:Y,requireSimulation:!0,depositQuote:{asset:Q,amount:ce,token:T.tokenIn,chainId:T.chainId}});if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");if(X.fee<0n||X.fee>=ce||X.net!==ce-X.fee)throw new Error("Cash amount does not cover the order funding fee");me={source:Q,sourceSpendCap:ce,depositAmount:X.net,feeAmount:X.fee},T.grossAmount=xe-X.fee}const Ce=T.venue??yr;if(!(Ce.chainIds??[8453]).includes(T.chainId))throw new Error("Venue does not support the destination chain");const ne=br(Ce);let _=T.grossAmount,de=0n,W=0n;for(let je=0;je<5;je++){const Ae=await ne.resolve({type:"swap",tokenIn:T.tokenIn,tokenOut:T.tokenOut,amountIn:_},T.chainId,Y);if(!Ae)throw new Error("No supported route for this order");const z=Ae.calls.find(Te=>d.addressesEqual(Te.to,Ce.swapRouter));if(!z)throw new Error("Order route is missing its swap");const{path:Q}=N.decodeFunctionData({abi:Ps,data:z.data}).args[0],se=Vp({replacesOrderId:H,conditional:!!V,user:Y,chainId:T.chainId,tokenIn:T.tokenIn,router:Ce.swapRouter,path:Q,grossAmount:T.grossAmount,amountIn:_,minimumOutput:T.minimumOutput,expiresAt:T.expiresAt,platformFee:de,gasBridgeFee:W,requestTimestampMs:J,requestNonce:K});if(se.intents[0].mode!=="7702")throw new Error("Unsupported order mode");const ce=structuredClone(se),X=ce.intents[0];if(X.mode!=="7702")throw new Error("Unsupported order mode");const oe=fo(X.chainBatches,Y);oe[1].calls=Ae.calls;const Oe=S.hashChainBatches(oe);X.chainBatches=oe.map((Te,ve)=>({...X.chainBatches[ve],calls:Te.calls,hash:Oe[ve].hash}));const Ne=(await d.relayerService.estimateActionFees(ce)).intents[0]?.batches.find(Te=>Te.chainId===T.chainId);if(!Ne)throw new Error("Order fee quote is unavailable");const he=d.getBatchFees(Ne),Se=T.grossAmount-he.totalFee;if(Se<=0n)throw new Error("Cash amount does not cover order fees");if(b()!==te)throw new Error("Wallet or provider changed while preparing the order");if(Se===_&&de===he.spicenetFee&&W===he.gasFee+he.bridgeFee){const Te={user:Y,request:se,amountIn:_,minimumOutput:T.minimumOutput,feeAmount:he.totalFee,grossAmount:T.grossAmount,funding:me,path:Q};return O.current.set(Te,{scope:te,amendment:H?{id:H}:void 0,request:structuredClone(se),input:structuredClone(T),cashAmount:we.available,combineSourceBalances:Z,funding:me&&structuredClone(me)}),Te}_=Se,de=he.spicenetFee,W=he.gasFee+he.bridgeFee}throw new Error("Order fees did not converge; prepare the order again")},[]),j=p.useCallback(async T=>{if(x.current)throw new Error("An order signature is already in progress");const H=O.current.get(T),V=H?.scope,te=()=>{if(!V||b()!==V||!d.addressesEqual(g.current.wallet.address,H?.request.user))throw new Error("Prepare the order again for the current wallet and provider")};te();const Z=structuredClone(H.request),K=Z.intents[0];if(K.mode!=="7702"||K.exp<=Date.now()/1e3)throw new Error("Order expired before signing");x.current=!0;try{const Y=g.current.wallet.actions;if(Z.chainAuthorizations=await da({chainBatches:K.chainBatches,signingAddress:Z.user,actions:Y,beforeSign:async()=>te()}),te(),K.signature=await la(Y,K.chainBatches,BigInt(K.exp)),te(),K.exp<=Date.now()/1e3)throw new Error("Order expired during signing");return I.current.set(Z,{scope:V,amendment:H.amendment,request:structuredClone(Z),input:H.input,cashAmount:H.cashAmount,combineSourceBalances:H.combineSourceBalances,funding:H.funding}),Z}finally{x.current=!1}},[]),P=p.useCallback(async T=>{const H=b(),{signature:V}=await g.current.wallet.actions.signMessage(Hp(T));if(b()!==H)throw new Error("Wallet or provider changed during cancellation");return d.relayerService.cancelLimitOrder(T,V)},[]),D=p.useCallback(T=>{if(!T||b()!==T.scope)throw new Error("Sign the order for the current wallet and provider before placing it");if(T.placement)return T.placement;if(T.resolvedOrder)return Promise.resolve(T.resolvedOrder);if(T.outcomePending)throw new Error("The original order outcome is still pending");if(w.current)throw new Error("An order placement is already in progress");const H=T.request.intents[0],V=()=>{if(b()!==T.scope)throw new Error("Wallet or provider changed during order placement");if(H.mode!=="7702"||H.exp<=Date.now()/1e3)throw new Error("Order expired before placement")};V(),w.current=!0,h.current=T;const te=new AbortController;v.current=te;let Z=!1;T.placement=(async()=>{u({step:"placing",isExecuting:!0,message:"Preparing the limit order\u2026",error:null,pending:!1});let Y=!1,J=T.fundingCompleted===!0,we=!1;try{const me=await ps(T.request.user,T.input.chainId,T.input.tokenIn);if(V(),T.funding&&!J){const ne=T.funding;if(me.available!==T.cashAmount)throw new Error("Order cash or reservations changed. Review the full order again");const _=async()=>{V();const Ae=await ps(T.request.user,T.input.chainId,T.input.tokenIn);if(V(),Ae.available!==T.cashAmount)throw new Error("Order cash or reservations changed. Review again")},de=await ti({address:T.request.user,requireSimulation:!0,depositQuote:{asset:ne.source,amount:ne.sourceSpendCap,token:T.input.tokenIn,chainId:T.input.chainId}});if(V(),de.fee>ne.feeAmount)throw new Error("Order funding fees changed. Review again");const W=[{chainId:T.input.chainId,tokenTransfers:[],calls:ei({escrowAddress:S.getEscrowContractAddress(T.input.chainId),tokenAddress:T.input.tokenIn,isNative:S.isNativeToken(T.input.tokenIn),amount:ne.depositAmount,gasFeeAmount:ne.feeAmount})}];u({step:"funding",isExecuting:!0,message:"Funding the limit order\u2026",error:null,pending:!1}),T.fundingSubmissionKey??(T.fundingSubmissionKey=N.bytesToHex(crypto.getRandomValues(new Uint8Array(32)))),await a.current.execute(W,T.input.tokenIn,0n,Ae=>{Ae.actionId&&(Y=!0,T.fundingActionId=Ae.actionId)},te.signal,{userOverride:T.request.user,idempotencyKey:T.fundingSubmissionKey,useCustomTransfers:!0,skipPreSubmitFeeEstimate:!0,requireDestinationReceipt:!0,walletFundingRequirement:{chainId:T.input.chainId,token:T.input.tokenIn,amount:ne.sourceSpendCap},validateBeforeSubmit:_}),J=!0,T.fundingCompleted=!0,V(),u({step:"waiting-credit",isExecuting:!0,message:"Waiting for cash credit\u2026",error:null,pending:!1});const je=await Nc({deposits:[{chainId:T.input.chainId,token:T.input.tokenIn,amount:ne.depositAmount}],baseline:me.entries,fetchEntries:async()=>(V(),d.getWalletBalanceEntries(T.request.user)),signal:te.signal});if(V(),!je)throw new Error("Funding was submitted; the order is not placed while cash credit is pending. Check wallet activity before trying again")}const xe=await ps(T.request.user,T.input.chainId,T.input.tokenIn);if(V(),T.combineSourceBalances&&xe.available<T.input.grossAmount)throw new Error("Cash is not available for this order. No order was placed");u({step:"placing",isExecuting:!0,message:"Placing the limit order\u2026",error:null,pending:!1}),we=!0;const Ce=T.conditional?await T.conditional.register():T.amendment?await d.relayerService.amendLimitOrder(T.amendment.id,structuredClone(T.request)):await d.relayerService.createLimitOrder(structuredClone(T.request));return V(),T.resolvedOrder=Ce,u({step:"success",isExecuting:!1,message:"Limit order placed",error:null,pending:!1}),Ce}catch(me){const xe=we&&me instanceof d.SpiceflowError&&me.context.httpStatus===400&&me.context.submissionStatus==="rejected";Y||(Y=me?.context?.submissionStatus==="unknown");const Ce=me instanceof Error?me:new Error("The order outcome could not be verified"),ne=we&&!xe?"Order placement could not be verified. Check the order list before placing another order.":Y?J?"Cash funding completed, but the order is not placed. Check available cash and wallet activity before trying again.":"Cash funding could not be verified and no order was placed. Check wallet activity before trying again.":Ce.message;T.outcomePending=we&&!xe?"registration":Y||J?"funding":void 0,Z=!we&&!Y&&!J;try{C.current&&b()===T.scope&&u({step:"error",isExecuting:!1,message:ne,error:Ce,pending:!!T.outcomePending})}catch{}throw Ce}finally{w.current=!1,v.current===te&&(v.current=null)}})();const K=T.placement;return K.catch(()=>{Z&&T.placement===K&&(T.placement=void 0)}),K},[]),M=p.useCallback(T=>D(I.current.get(T)),[D]),L=p.useCallback(async(T,H,V)=>{const te=b(),Z=await d.relayerService.getLimitOrder(T);if(b()!==te||!d.addressesEqual(Z.user,g.current.wallet.address))throw new Error("Order does not belong to the current wallet");if(Z.status!=="open"||Date.parse(Z.expiresAt)<=Date.now())throw new Error("This order is no longer amendable");return q({chainId:Z.chainId,tokenIn:Z.tokenIn,tokenOut:Z.tokenOut,grossAmount:BigInt(Z.reservedAmount),minimumOutput:H,expiresAt:Math.floor(Date.parse(Z.expiresAt)/1e3),venue:V},T)},[q]);return{conditional:{...n,async prepareOrder(T,H,V,te){if(T=structuredClone(T),H=structuredClone(H),T.expiresAt!==Number(H.expiresAt))throw new Error("Order and condition expiry must match");if(V!=="cash-first"&&V!=="execution-balances")throw new Error("Choose an order funding policy");if(V==="execution-balances")return n.prepareSwap({...H,chainId:T.chainId,tokenIn:T.tokenIn,tokenOut:T.tokenOut,amountIn:T.grossAmount,minimumOutput:T.minimumOutput,amountMode:"fixed-input",venue:T.venue??yr});const Z=b(),K=await q(T,void 0,{skipFunding:!!H.replacesIntentId});if(b()!==Z)throw new Error("Wallet or provider changed while preparing the order");const Y=K.request.intents[0];if(Y.mode!=="7702")throw new Error("Unsupported order mode");const J=await n.prepare({...H,executionAmountMode:"gross_input",triggerSpecification:te?.(K.grossAmount)??H.triggerSpecification,chainBatches:Y.chainBatches});if(b()!==Z)throw new Error("Wallet or provider changed while preparing the order");return J.fees={token:T.tokenIn,symbol:S.getTokenByAddress(T.tokenIn,T.chainId)?.symbol??"",decimals:S.getTokenByAddress(T.tokenIn,T.chainId)?.decimals??18,amount:K.feeAmount+(K.funding?.feeAmount??0n)},J.swapAmountIn=K.amountIn,J.fundingFeeAmount=K.funding?.feeAmount??0n,s.current.set(J,O.current.get(K)),J},async sign(T){const H=s.current.get(T);if(H&&b()!==H.scope)throw new Error("Order wallet or provider changed");const V=await n.sign(T);if(H){if(b()!==H.scope)throw new Error("Order wallet or provider changed during signing");const te=V.id,Z=V.authorization.serviceId;H.conditional={id:te,register:()=>n.register(V),get:()=>n.get(te,Z)},s.current.set(V,H),r.current.set(V,H)}return V},register(T){const H=s.current.get(T);if(!H)return n.register(T);if(r.current.get(T)!==H)throw new Error("Sign the current order before registration");return D(H)}},status:l,canPrepare:m&&!l.pending&&!l.isExecuting&&t.isReady&&t.isAuthenticated&&t.isConnected&&!o?.isWhitelistGateActive,canPlace:T=>{const H=I.current.get(T);try{return!!H&&m&&!l.pending&&b()===H.scope&&H.request.intents[0].mode==="7702"&&H.request.intents[0].exp>Date.now()/1e3&&!H.outcomePending&&!w.current}catch{return!1}},refreshStatus:R,prepareOrder:T=>q(T),prepareAmendment:L,signOrder:j,placeOrder:M,getOrder:T=>d.relayerService.getLimitOrder(T),listOrders:T=>{if(!t.address)throw new Error("Connect a wallet to list orders");return d.relayerService.listLimitOrders(t.address,T)},cancelOrder:P}}ru(),exports.SpiceFlowProvider=d.SpiceFlowProvider,exports.SpiceFlowProviderContext=d.SpiceFlowProviderContext,exports.SpiceflowError=d.SpiceflowError,exports.Spinner=d.Spinner,exports.buildDarkPalette=d.buildDarkPalette,exports.buildLightPalette=d.buildLightPalette,exports.calculateBpsFee=d.calculateBpsFee,exports.duration=d.duration,exports.easing=d.easing,exports.font=d.font,exports.getChainConfig=d.getChainConfig,exports.getChainName=d.getChainName,exports.isSpiceflowError=d.isSpiceflowError,exports.radius=d.radius,exports.relayerService=d.relayerService,exports.resolveTheme=d.resolveTheme,exports.transition=d.transition,exports.useAssetDisplay=d.useAssetDisplay,exports.useIsUserWhitelisted=d.useIsUserWhitelisted,exports.useSpiceBrand=d.useSpiceBrand,exports.useWallet=d.useWallet,exports.z=d.z,Object.defineProperty(exports,"CONDITIONAL_INTENT_UNTIL_CANCELLED",{enumerable:!0,get:function(){return S.CONDITIONAL_INTENT_UNTIL_CANCELLED}}),Object.defineProperty(exports,"NATIVE_TOKEN_ADDRESS",{enumerable:!0,get:function(){return S.ZERO_ADDRESS}}),Object.defineProperty(exports,"SPICENET_NATIVE_CHAIN_ID",{enumerable:!0,get:function(){return S.SPICENET_NATIVE_CHAIN_ID}}),Object.defineProperty(exports,"SPICE_COMBINED_FEE_RECIPIENT",{enumerable:!0,get:function(){return S.SPICE_COMBINED_FEE_RECIPIENT}}),Object.defineProperty(exports,"SPICE_GAS_FEE_RECIPIENT",{enumerable:!0,get:function(){return S.SPICE_GAS_FEE_RECIPIENT}}),Object.defineProperty(exports,"SPICE_PLATFORM_FEE_RECIPIENT",{enumerable:!0,get:function(){return S.SPICE_PLATFORM_FEE_RECIPIENT}}),Object.defineProperty(exports,"SPICE_SOLVER_ADDRESS",{enumerable:!0,get:function(){return S.SPICE_SOLVER_ADDRESS}}),Object.defineProperty(exports,"applySlippage",{enumerable:!0,get:function(){return S.applySlippage}}),Object.defineProperty(exports,"buildUniV3SwapCalls",{enumerable:!0,get:function(){return S.buildUniV3SwapCalls}}),Object.defineProperty(exports,"getChainIdsByNetwork",{enumerable:!0,get:function(){return S.getChainIdsByNetwork}}),Object.defineProperty(exports,"getEscrowContractAddress",{enumerable:!0,get:function(){return S.getEscrowContractAddress}}),Object.defineProperty(exports,"isNativeToken",{enumerable:!0,get:function(){return S.isNativeToken}}),Object.defineProperty(exports,"isSpicenetChainId",{enumerable:!0,get:function(){return S.isSpicenetChainId}}),Object.defineProperty(exports,"normalizeNativeTokenAddress",{enumerable:!0,get:function(){return S.normalizeNativeTokenAddress}}),Object.defineProperty(exports,"spicenetAbi",{enumerable:!0,get:function(){return S.spicenetAbi}}),Object.defineProperty(exports,"spicenetWithdrawalAbi",{enumerable:!0,get:function(){return S.spicenetAbi}}),exports.AERODROME_BASE_CONFIG=yr,exports.AccountDisplay=sd,exports.AddFundsLink=ni,exports.AssetBalance=om,exports.AssetSelector=or,exports.CheckIcon=Gc,exports.ChevronIcon=$s,exports.CloseIcon=Rr,exports.DEFAULT_LIQUIDITY_VENUES=ro,exports.DetailRow=Ln,exports.METRIC_CONFIG=Wn,exports.ProviderLogin=wa,exports.SATSUMA_CITREA_CONFIG=Ko,exports.SPICE_PLATFORM_FEE_BPS=pa,exports.SearchInput=Ka,exports.SelectChainModal=$m,exports.SpiceAccount=Jm,exports.SpiceDeposit=bd,exports.SpiceLock=sh,exports.SpiceSupply=ch,exports.SpiceWithdraw=Ha,exports.StatusBanner=vn,exports.UNIV3_ARBITRUM_CONFIG=Li,exports.UNIV3_BASE_CONFIG=Wi,exports.UNIV3_ETHEREUM_CONFIG=qi,exports.UNIV3_ROBINHOOD_CONFIG=zi,exports.UNIV3_ROBINHOOD_SUSHI_CONFIG=Hi,exports.UNIV4_BASE_CONFIG=Ji,exports.UNIV4_ROBINHOOD_CONFIG=$i,exports.V4_NATIVE_CURRENCY=_n,exports.areEquivalentOnChains=kr,exports.assetCapability=Yn,exports.assetPositionId=ye,exports.buildLiquidityVenues=js,exports.buildPayChainBatches=rr,exports.buildRoutedBatches=Bp,exports.buildSpicenetWithdrawalBatch=Js,exports.buildSupplyChainBatches=Co,exports.createAerodromeExactOutputVenue=Ki,exports.createAerodromeVenue=br,exports.createExactOutputRegistry=Nr,exports.createLiquidityRegistry=Yi,exports.createMetricExactOutputVenue=Ri,exports.createMetricVenue=Ti,exports.createSatsumaExactOutputVenue=Zo,exports.createSatsumaVenue=vr,exports.createUniV3ExactOutputVenue=Zo,exports.createUniV3Venue=vr,exports.createUniV4ExactOutputVenue=ic,exports.createUniV4Venue=ac,exports.encodeUniV3ExactOutputCall=Ni,exports.estimateFeePreview=ns,exports.estimateRequiredGrossFunding=ef,exports.estimateSupplyMaxAmount=af,exports.executePay=Ml,exports.executeSupply=Nl,exports.fetchBalances=Zs,exports.findEquivalentOnChain=ds,exports.getAssetChainTokenCandidates=Gs,exports.getBestUniV3ExactOutputQuote=Pi,exports.getBestUniV3Quote=Mi,exports.isExternalSource=Ks,exports.isMultiSourceFundingAsset=Pr,exports.isSupportedSupplyAsset=bf,exports.limitOrderId=ka,exports.resolveAssetTokenAddressOnChain=Dn,exports.resolveFundedToken=fc,exports.resolveInputSupplySwapQuote=Ur,exports.resolveRoute=Rp,exports.reverseUniV3Path=Di,exports.scaleTokenAmount=sr,exports.useAssetInput=lh,exports.useLockDuration=ph,exports.useSmartWallet=mh,exports.useSpiceAccount=hh,exports.useSpiceAction=gh,exports.useSpiceActionActivity=uo,exports.useSpiceAssets=Ec,exports.useSpiceConditionalIntents=Fd,exports.useSpiceExecution=Xs,exports.useSpiceInventory=Ms,exports.useSpiceLimitOrders=wh,exports.useSpiceLock=vd,exports.useSpicePendingDeposits=fh,exports.useSpiceSupply=Wr,exports.useSupplyAssets=Kl,exports.useSupplyQuote=Jl,exports.useTokenLogo=Qa,exports.useWalletBalances=Fr;
|