@orbs-network/spot-ui 0.0.7

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.
Files changed (36) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/package.json.d.ts +46 -0
  3. package/dist/spot-ui.js +2890 -0
  4. package/dist/spot-ui.umd.cjs +64 -0
  5. package/dist/src/index.d.ts +14 -0
  6. package/dist/src/index.d.ts.map +1 -0
  7. package/dist/src/lib/abi/erc20.json.d.ts +291 -0
  8. package/dist/src/lib/abi/executor.json.d.ts +757 -0
  9. package/dist/src/lib/abi/index.d.ts +501 -0
  10. package/dist/src/lib/abi/index.d.ts.map +1 -0
  11. package/dist/src/lib/abi/iweth.json.d.ts +41 -0
  12. package/dist/src/lib/abi/reactor.json.d.ts +647 -0
  13. package/dist/src/lib/abi/repermit.json.d.ts +316 -0
  14. package/dist/src/lib/analytics.d.ts +106 -0
  15. package/dist/src/lib/analytics.d.ts.map +1 -0
  16. package/dist/src/lib/build-repermit-order-data.d.ts +51 -0
  17. package/dist/src/lib/build-repermit-order-data.d.ts.map +1 -0
  18. package/dist/src/lib/consts.d.ts +88 -0
  19. package/dist/src/lib/consts.d.ts.map +1 -0
  20. package/dist/src/lib/lib.d.ts +59 -0
  21. package/dist/src/lib/lib.d.ts.map +1 -0
  22. package/dist/src/lib/networks.d.ts +445 -0
  23. package/dist/src/lib/networks.d.ts.map +1 -0
  24. package/dist/src/lib/orders/index.d.ts +10 -0
  25. package/dist/src/lib/orders/index.d.ts.map +1 -0
  26. package/dist/src/lib/orders/v1-orders.d.ts +48 -0
  27. package/dist/src/lib/orders/v1-orders.d.ts.map +1 -0
  28. package/dist/src/lib/orders/v2-orders.d.ts +8 -0
  29. package/dist/src/lib/orders/v2-orders.d.ts.map +1 -0
  30. package/dist/src/lib/submit-order.d.ts +3 -0
  31. package/dist/src/lib/submit-order.d.ts.map +1 -0
  32. package/dist/src/lib/types.d.ts +267 -0
  33. package/dist/src/lib/types.d.ts.map +1 -0
  34. package/dist/src/lib/utils.d.ts +456 -0
  35. package/dist/src/lib/utils.d.ts.map +1 -0
  36. package/package.json +42 -0
@@ -0,0 +1,2890 @@
1
+ var nt = Object.defineProperty;
2
+ var at = (e, a, d) => a in e ? nt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[a] = d;
3
+ var be = (e, a, d) => at(e, typeof a != "symbol" ? a + "" : a, d);
4
+ const st = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0", lensAddress: "0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496", exchangeType: "ExchangeV2", pathfinderKey: "" }, rt = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwapSonic", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3", exchangeType: "ExchangeV2", pathfinderKey: "" }, it = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "QuickSwap,QuickSwapV3" }, dt = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0xb7a3d74895bfd3aff6780525e36d79fcf26a895f", exchangeType: "ExchangeV2", pathfinderKey: "" }, pt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Chronos", partner: "Orbs:TWAP:Chronos", exchangeAddress: "0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36", exchangeType: "ExchangeV2", pathfinderKey: "Chronos Stable,Chronos Volatile,Chronos V3" }, ot = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BaseSwap", partner: "Orbs:TWAP:BaseSwap", exchangeAddress: "0xAca3155c17530C4aA96746F226fcC049658490d2", exchangeType: "ExchangeV2", pathfinderKey: "BaseSwap,BaseSwapX" }, ut = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Arbidex", partner: "Orbs:TWAP:Arbidex", exchangeAddress: "0x49d21052f4695d16C7cce6eF561301Aa4d840420", exchangeType: "ExchangeV2", pathfinderKey: "Arbidex Classic,Arbidex Quantum" }, ct = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Thena", partner: "Orbs:TWAP:Thena", exchangeAddress: "0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1", exchangeType: "ExchangeV2", pathfinderKey: "43,47" }, lt = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0x1A2bb6B75D58b740d88413ef4840D6fa3F637940", exchangeType: "P2Exchange", pathfinderKey: "" }, yt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, mt = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, ft = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, ht = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "Lynex", partner: "Orbs:TWAP:Lynex", exchangeAddress: "0x04C06C96d7D19977156016DD408B5992af0570a2", exchangeType: "ExchangeV2", pathfinderKey: "19,18" }, bt = { chainName: "zkSync", chainId: 324, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "SyncSwap", partner: "Orbs:TWAP:SyncSwap", exchangeAddress: "0x422623a40c42f026Ed33A9910078Aa843FD66e27", exchangeType: "ExchangeV2", pathfinderKey: "2,3" }, Tt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Retro", partner: "Orbs:TWAP:Retro", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2", pathfinderKey: "retro,retro-v3" }, At = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiArb", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, gt = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiBase", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, xt = { chainName: "eth", chainId: 1, twapVersion: 4, twapAddress: "0xb1ed8BCAD1EaC8a1DF0764700472391800D12946", lensAddress: "0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 200, name: "SushiEth", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Et = { chainName: "katana", chainId: 747474, twapVersion: 4, twapAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", lensAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", takers: ["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a", "0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiKatana", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x92209481507e6B2d14C9b5b70Ed287024177220E", exchangeType: "ExchangeV2", pathfinderKey: "" }, wt = { chainName: "sei", chainId: 1329, twapVersion: 4, twapAddress: "0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099", lensAddress: "0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "DragonSwap", partner: "Orbs:TWAP:DragonSwap", exchangeAddress: "0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6", exchangeType: "ExchangeV2", pathfinderKey: "" }, Ct = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "TeaFi", partner: "Orbs:TWAP:TeaFi", exchangeAddress: "0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793", exchangeType: "ParaswapExchange", pathfinderKey: "AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM" }, Ft = { chainName: "flare", chainId: 14, twapVersion: 4, twapAddress: "0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D", lensAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SparkDEX", partner: "Orbs:TWAP:SparkDEX", exchangeAddress: "0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56", exchangeType: "P2Exchange" }, kt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Ramses", partner: "Orbs:TWAP:Ramses", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "" }, Dt = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SwapX", partner: "Orbs:TWAP:SwapX", exchangeAddress: "0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7", exchangeType: "ExchangeV2", pathfinderKey: "" }, St = { chainName: "cronos-zkevm", chainId: 388, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "H2Finance", partner: "Orbs:TWAP:H2Finance", exchangeAddress: "0x2f1f10dc311722Be609e6B427bF3FBac6e44093B", exchangeType: "ExchangeV2" }, Bt = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Shadow", partner: "Orbs:TWAP:Shadow", exchangeAddress: "0x69e3c891450161b7BF27f181eE85E7bAE69E5b07", exchangeType: "ExchangeV2" }, Ot = { chainName: "berachain", chainId: 80094, twapVersion: 4, twapAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", lensAddress: "0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Kodiak", partner: "Orbs:TWAP:Kodiak", exchangeAddress: "0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE", exchangeType: "ExchangeV2" }, vt = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "OmniBase", partner: "Orbs:TWAP:OmniBase", exchangeAddress: "0x54435FcFDF3A08150Ed799b6EF472A20a432303F", exchangeType: "ParaswapExchange" }, It = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "OmniArb", partner: "Orbs:TWAP:OmniArb", exchangeAddress: "0xF0607785424d342Cceb33E708f4579CA97a3b392", exchangeType: "ParaswapExchange" }, _t = { chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe", lensAddress: "0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BlackholeAvax", partner: "Orbs:TWAP:BlackholeAvax", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2" }, Rt = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "NewEraBnb", partner: "Orbs:TWAP:NewEraBnb", exchangeAddress: "0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42", exchangeType: "ExchangeV2" }, $ = {
5
+ SpookySwap: st,
6
+ SpookySwapSonic: rt,
7
+ QuickSwap: it,
8
+ QuickSwapBase: dt,
9
+ Chronos: pt,
10
+ BaseSwap: ot,
11
+ Arbidex: ut,
12
+ Thena: ct,
13
+ PancakeSwap: lt,
14
+ PancakeSwapArbitrum: yt,
15
+ PancakeSwapBase: mt,
16
+ PancakeSwapLinea: ft,
17
+ Lynex: ht,
18
+ SyncSwap: bt,
19
+ Retro: Tt,
20
+ SushiArb: At,
21
+ SushiBase: gt,
22
+ SushiEth: xt,
23
+ SushiKatana: Et,
24
+ DragonSwap: wt,
25
+ TeaFi: Ct,
26
+ SparkDEX: Ft,
27
+ Ramses: kt,
28
+ SwapX: Dt,
29
+ H2Finance: St,
30
+ Shadow: Bt,
31
+ Kodiak: Ot,
32
+ OmniBase: vt,
33
+ OmniArb: It,
34
+ BlackholeAvax: _t,
35
+ NewEraBnb: Rt
36
+ }, Mt = [
37
+ {
38
+ constant: !1,
39
+ inputs: [
40
+ {
41
+ name: "wad",
42
+ type: "uint256"
43
+ }
44
+ ],
45
+ name: "withdraw",
46
+ outputs: [],
47
+ payable: !1,
48
+ stateMutability: "nonpayable",
49
+ type: "function"
50
+ },
51
+ {
52
+ constant: !1,
53
+ inputs: [],
54
+ name: "deposit",
55
+ outputs: [],
56
+ payable: !0,
57
+ stateMutability: "payable",
58
+ type: "function"
59
+ },
60
+ {
61
+ anonymous: !1,
62
+ inputs: [
63
+ {
64
+ indexed: !0,
65
+ name: "dst",
66
+ type: "address"
67
+ },
68
+ {
69
+ indexed: !1,
70
+ name: "wad",
71
+ type: "uint256"
72
+ }
73
+ ],
74
+ name: "Deposit",
75
+ type: "event"
76
+ },
77
+ {
78
+ anonymous: !1,
79
+ inputs: [
80
+ {
81
+ indexed: !0,
82
+ name: "src",
83
+ type: "address"
84
+ },
85
+ {
86
+ indexed: !1,
87
+ name: "wad",
88
+ type: "uint256"
89
+ }
90
+ ],
91
+ name: "Withdrawal",
92
+ type: "event"
93
+ }
94
+ ], Pt = [
95
+ {
96
+ inputs: [
97
+ {
98
+ internalType: "string",
99
+ name: "name_",
100
+ type: "string"
101
+ },
102
+ {
103
+ internalType: "string",
104
+ name: "symbol_",
105
+ type: "string"
106
+ }
107
+ ],
108
+ stateMutability: "nonpayable",
109
+ type: "constructor"
110
+ },
111
+ {
112
+ anonymous: !1,
113
+ inputs: [
114
+ {
115
+ indexed: !0,
116
+ internalType: "address",
117
+ name: "owner",
118
+ type: "address"
119
+ },
120
+ {
121
+ indexed: !0,
122
+ internalType: "address",
123
+ name: "spender",
124
+ type: "address"
125
+ },
126
+ {
127
+ indexed: !1,
128
+ internalType: "uint256",
129
+ name: "value",
130
+ type: "uint256"
131
+ }
132
+ ],
133
+ name: "Approval",
134
+ type: "event"
135
+ },
136
+ {
137
+ anonymous: !1,
138
+ inputs: [
139
+ {
140
+ indexed: !0,
141
+ internalType: "address",
142
+ name: "from",
143
+ type: "address"
144
+ },
145
+ {
146
+ indexed: !0,
147
+ internalType: "address",
148
+ name: "to",
149
+ type: "address"
150
+ },
151
+ {
152
+ indexed: !1,
153
+ internalType: "uint256",
154
+ name: "value",
155
+ type: "uint256"
156
+ }
157
+ ],
158
+ name: "Transfer",
159
+ type: "event"
160
+ },
161
+ {
162
+ inputs: [
163
+ {
164
+ internalType: "address",
165
+ name: "owner",
166
+ type: "address"
167
+ },
168
+ {
169
+ internalType: "address",
170
+ name: "spender",
171
+ type: "address"
172
+ }
173
+ ],
174
+ name: "allowance",
175
+ outputs: [
176
+ {
177
+ internalType: "uint256",
178
+ name: "",
179
+ type: "uint256"
180
+ }
181
+ ],
182
+ stateMutability: "view",
183
+ type: "function"
184
+ },
185
+ {
186
+ inputs: [
187
+ {
188
+ internalType: "address",
189
+ name: "spender",
190
+ type: "address"
191
+ },
192
+ {
193
+ internalType: "uint256",
194
+ name: "amount",
195
+ type: "uint256"
196
+ }
197
+ ],
198
+ name: "approve",
199
+ outputs: [
200
+ {
201
+ internalType: "bool",
202
+ name: "",
203
+ type: "bool"
204
+ }
205
+ ],
206
+ stateMutability: "nonpayable",
207
+ type: "function"
208
+ },
209
+ {
210
+ inputs: [
211
+ {
212
+ internalType: "address",
213
+ name: "account",
214
+ type: "address"
215
+ }
216
+ ],
217
+ name: "balanceOf",
218
+ outputs: [
219
+ {
220
+ internalType: "uint256",
221
+ name: "",
222
+ type: "uint256"
223
+ }
224
+ ],
225
+ stateMutability: "view",
226
+ type: "function"
227
+ },
228
+ {
229
+ inputs: [],
230
+ name: "decimals",
231
+ outputs: [
232
+ {
233
+ internalType: "uint8",
234
+ name: "",
235
+ type: "uint8"
236
+ }
237
+ ],
238
+ stateMutability: "view",
239
+ type: "function"
240
+ },
241
+ {
242
+ inputs: [
243
+ {
244
+ internalType: "address",
245
+ name: "spender",
246
+ type: "address"
247
+ },
248
+ {
249
+ internalType: "uint256",
250
+ name: "subtractedValue",
251
+ type: "uint256"
252
+ }
253
+ ],
254
+ name: "decreaseAllowance",
255
+ outputs: [
256
+ {
257
+ internalType: "bool",
258
+ name: "",
259
+ type: "bool"
260
+ }
261
+ ],
262
+ stateMutability: "nonpayable",
263
+ type: "function"
264
+ },
265
+ {
266
+ inputs: [
267
+ {
268
+ internalType: "address",
269
+ name: "spender",
270
+ type: "address"
271
+ },
272
+ {
273
+ internalType: "uint256",
274
+ name: "addedValue",
275
+ type: "uint256"
276
+ }
277
+ ],
278
+ name: "increaseAllowance",
279
+ outputs: [
280
+ {
281
+ internalType: "bool",
282
+ name: "",
283
+ type: "bool"
284
+ }
285
+ ],
286
+ stateMutability: "nonpayable",
287
+ type: "function"
288
+ },
289
+ {
290
+ inputs: [],
291
+ name: "name",
292
+ outputs: [
293
+ {
294
+ internalType: "string",
295
+ name: "",
296
+ type: "string"
297
+ }
298
+ ],
299
+ stateMutability: "view",
300
+ type: "function"
301
+ },
302
+ {
303
+ inputs: [],
304
+ name: "symbol",
305
+ outputs: [
306
+ {
307
+ internalType: "string",
308
+ name: "",
309
+ type: "string"
310
+ }
311
+ ],
312
+ stateMutability: "view",
313
+ type: "function"
314
+ },
315
+ {
316
+ inputs: [],
317
+ name: "totalSupply",
318
+ outputs: [
319
+ {
320
+ internalType: "uint256",
321
+ name: "",
322
+ type: "uint256"
323
+ }
324
+ ],
325
+ stateMutability: "view",
326
+ type: "function"
327
+ },
328
+ {
329
+ inputs: [
330
+ {
331
+ internalType: "address",
332
+ name: "recipient",
333
+ type: "address"
334
+ },
335
+ {
336
+ internalType: "uint256",
337
+ name: "amount",
338
+ type: "uint256"
339
+ }
340
+ ],
341
+ name: "transfer",
342
+ outputs: [
343
+ {
344
+ internalType: "bool",
345
+ name: "",
346
+ type: "bool"
347
+ }
348
+ ],
349
+ stateMutability: "nonpayable",
350
+ type: "function"
351
+ },
352
+ {
353
+ inputs: [
354
+ {
355
+ internalType: "address",
356
+ name: "sender",
357
+ type: "address"
358
+ },
359
+ {
360
+ internalType: "address",
361
+ name: "recipient",
362
+ type: "address"
363
+ },
364
+ {
365
+ internalType: "uint256",
366
+ name: "amount",
367
+ type: "uint256"
368
+ }
369
+ ],
370
+ name: "transferFrom",
371
+ outputs: [
372
+ {
373
+ internalType: "bool",
374
+ name: "",
375
+ type: "bool"
376
+ }
377
+ ],
378
+ stateMutability: "nonpayable",
379
+ type: "function"
380
+ }
381
+ ], Nt = /* @__PURE__ */ JSON.parse('[{"type":"constructor","inputs":[{"name":"_repermit","type":"address","internalType":"address"},{"name":"_cosigner","type":"address","internalType":"address"},{"name":"_wm","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"cosigner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"epochs","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"executeWithCallback","inputs":[{"name":"co","type":"tuple","internalType":"struct CosignedOrder","components":[{"name":"order","type":"tuple","internalType":"struct Order","components":[{"name":"reactor","type":"address","internalType":"address"},{"name":"executor","type":"address","internalType":"address"},{"name":"exchange","type":"tuple","internalType":"struct Exchange","components":[{"name":"adapter","type":"address","internalType":"address"},{"name":"ref","type":"address","internalType":"address"},{"name":"share","type":"uint32","internalType":"uint32"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"swapper","type":"address","internalType":"address"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"exclusivity","type":"uint32","internalType":"uint32"},{"name":"epoch","type":"uint32","internalType":"uint32"},{"name":"slippage","type":"uint32","internalType":"uint32"},{"name":"freshness","type":"uint32","internalType":"uint32"},{"name":"input","type":"tuple","internalType":"struct Input","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"maxAmount","type":"uint256","internalType":"uint256"}]},{"name":"output","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]}]},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"cosignatureData","type":"tuple","internalType":"struct Cosignature","components":[{"name":"cosigner","type":"address","internalType":"address"},{"name":"reactor","type":"address","internalType":"address"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"},{"name":"input","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]},{"name":"output","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]}]},{"name":"cosignature","type":"bytes","internalType":"bytes"}]},{"name":"x","type":"tuple","internalType":"struct Execution","components":[{"name":"minAmountOut","type":"uint256","internalType":"uint256"},{"name":"fee","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"pause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"repermit","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"unpause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"wm","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"event","name":"Fill","inputs":[{"name":"hash","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"executor","type":"address","indexed":true,"internalType":"address"},{"name":"swapper","type":"address","indexed":true,"internalType":"address"},{"name":"epoch","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CosignedExceedsStop","inputs":[]},{"type":"error","name":"EnforcedPause","inputs":[]},{"type":"error","name":"ExpectedPause","inputs":[]},{"type":"error","name":"FailedCall","inputs":[]},{"type":"error","name":"FutureCosignatureTimestamp","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidCosignature","inputs":[]},{"type":"error","name":"InvalidCosignatureChainid","inputs":[]},{"type":"error","name":"InvalidCosignatureCosigner","inputs":[]},{"type":"error","name":"InvalidCosignatureInputToken","inputs":[]},{"type":"error","name":"InvalidCosignatureOutputToken","inputs":[]},{"type":"error","name":"InvalidCosignatureReactor","inputs":[]},{"type":"error","name":"InvalidCosignatureZeroInputValue","inputs":[]},{"type":"error","name":"InvalidCosignatureZeroOutputValue","inputs":[]},{"type":"error","name":"InvalidEpoch","inputs":[]},{"type":"error","name":"InvalidFreshness","inputs":[]},{"type":"error","name":"InvalidFreshnessVsEpoch","inputs":[]},{"type":"error","name":"InvalidOrderAdapterZero","inputs":[]},{"type":"error","name":"InvalidOrderChainid","inputs":[]},{"type":"error","name":"InvalidOrderDeadlineExpired","inputs":[]},{"type":"error","name":"InvalidOrderExchangeShareBps","inputs":[]},{"type":"error","name":"InvalidOrderExecutorZero","inputs":[]},{"type":"error","name":"InvalidOrderInputAmountGtMax","inputs":[]},{"type":"error","name":"InvalidOrderInputAmountZero","inputs":[]},{"type":"error","name":"InvalidOrderInputTokenZero","inputs":[]},{"type":"error","name":"InvalidOrderOutputLimitGtStop","inputs":[]},{"type":"error","name":"InvalidOrderOutputRecipientZero","inputs":[]},{"type":"error","name":"InvalidOrderReactorMismatch","inputs":[]},{"type":"error","name":"InvalidOrderReactorZero","inputs":[]},{"type":"error","name":"InvalidOrderSameToken","inputs":[]},{"type":"error","name":"InvalidOrderSlippageTooHigh","inputs":[]},{"type":"error","name":"InvalidOrderSwapperZero","inputs":[]},{"type":"error","name":"InvalidSender","inputs":[]},{"type":"error","name":"NotAllowed","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"StaleCosignature","inputs":[]}]'), Ut = /* @__PURE__ */ JSON.parse('[{"type":"constructor","inputs":[{"name":"_reactor","type":"address","internalType":"address"},{"name":"_allowed","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"execute","inputs":[{"name":"co","type":"tuple","internalType":"struct CosignedOrder","components":[{"name":"order","type":"tuple","internalType":"struct Order","components":[{"name":"reactor","type":"address","internalType":"address"},{"name":"executor","type":"address","internalType":"address"},{"name":"exchange","type":"tuple","internalType":"struct Exchange","components":[{"name":"adapter","type":"address","internalType":"address"},{"name":"ref","type":"address","internalType":"address"},{"name":"share","type":"uint32","internalType":"uint32"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"swapper","type":"address","internalType":"address"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"exclusivity","type":"uint32","internalType":"uint32"},{"name":"epoch","type":"uint32","internalType":"uint32"},{"name":"slippage","type":"uint32","internalType":"uint32"},{"name":"freshness","type":"uint32","internalType":"uint32"},{"name":"input","type":"tuple","internalType":"struct Input","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"maxAmount","type":"uint256","internalType":"uint256"}]},{"name":"output","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]}]},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"cosignatureData","type":"tuple","internalType":"struct Cosignature","components":[{"name":"cosigner","type":"address","internalType":"address"},{"name":"reactor","type":"address","internalType":"address"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"},{"name":"input","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]},{"name":"output","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]}]},{"name":"cosignature","type":"bytes","internalType":"bytes"}]},{"name":"x","type":"tuple","internalType":"struct Execution","components":[{"name":"minAmountOut","type":"uint256","internalType":"uint256"},{"name":"fee","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"reactor","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"reactorCallback","inputs":[{"name":"hash","type":"bytes32","internalType":"bytes32"},{"name":"resolvedAmountOut","type":"uint256","internalType":"uint256"},{"name":"co","type":"tuple","internalType":"struct CosignedOrder","components":[{"name":"order","type":"tuple","internalType":"struct Order","components":[{"name":"reactor","type":"address","internalType":"address"},{"name":"executor","type":"address","internalType":"address"},{"name":"exchange","type":"tuple","internalType":"struct Exchange","components":[{"name":"adapter","type":"address","internalType":"address"},{"name":"ref","type":"address","internalType":"address"},{"name":"share","type":"uint32","internalType":"uint32"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"swapper","type":"address","internalType":"address"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"exclusivity","type":"uint32","internalType":"uint32"},{"name":"epoch","type":"uint32","internalType":"uint32"},{"name":"slippage","type":"uint32","internalType":"uint32"},{"name":"freshness","type":"uint32","internalType":"uint32"},{"name":"input","type":"tuple","internalType":"struct Input","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"maxAmount","type":"uint256","internalType":"uint256"}]},{"name":"output","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]}]},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"cosignatureData","type":"tuple","internalType":"struct Cosignature","components":[{"name":"cosigner","type":"address","internalType":"address"},{"name":"reactor","type":"address","internalType":"address"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"},{"name":"input","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]},{"name":"output","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]}]},{"name":"cosignature","type":"bytes","internalType":"bytes"}]},{"name":"x","type":"tuple","internalType":"struct Execution","components":[{"name":"minAmountOut","type":"uint256","internalType":"uint256"},{"name":"fee","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"wm","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"event","name":"Settled","inputs":[{"name":"orderHash","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"swapper","type":"address","indexed":true,"internalType":"address"},{"name":"exchange","type":"address","indexed":true,"internalType":"address"},{"name":"inToken","type":"address","indexed":false,"internalType":"address"},{"name":"outToken","type":"address","indexed":false,"internalType":"address"},{"name":"inAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"outAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"minOut","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Surplus","inputs":[{"name":"ref","type":"address","indexed":true,"internalType":"address"},{"name":"swapper","type":"address","indexed":false,"internalType":"address"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"refshare","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AddressEmptyCode","inputs":[{"name":"target","type":"address","internalType":"address"}]},{"type":"error","name":"FailedCall","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidOrder","inputs":[]},{"type":"error","name":"InvalidSender","inputs":[]},{"type":"error","name":"NotAllowed","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]}]'), Lt = [
382
+ {
383
+ type: "constructor",
384
+ inputs: [],
385
+ stateMutability: "nonpayable"
386
+ },
387
+ {
388
+ type: "function",
389
+ name: "DOMAIN_SEPARATOR",
390
+ inputs: [],
391
+ outputs: [
392
+ {
393
+ name: "",
394
+ type: "bytes32",
395
+ internalType: "bytes32"
396
+ }
397
+ ],
398
+ stateMutability: "view"
399
+ },
400
+ {
401
+ type: "function",
402
+ name: "cancel",
403
+ inputs: [
404
+ {
405
+ name: "digests",
406
+ type: "bytes32[]",
407
+ internalType: "bytes32[]"
408
+ }
409
+ ],
410
+ outputs: [],
411
+ stateMutability: "nonpayable"
412
+ },
413
+ {
414
+ type: "function",
415
+ name: "eip712Domain",
416
+ inputs: [],
417
+ outputs: [
418
+ {
419
+ name: "fields",
420
+ type: "bytes1",
421
+ internalType: "bytes1"
422
+ },
423
+ {
424
+ name: "name",
425
+ type: "string",
426
+ internalType: "string"
427
+ },
428
+ {
429
+ name: "version",
430
+ type: "string",
431
+ internalType: "string"
432
+ },
433
+ {
434
+ name: "chainId",
435
+ type: "uint256",
436
+ internalType: "uint256"
437
+ },
438
+ {
439
+ name: "verifyingContract",
440
+ type: "address",
441
+ internalType: "address"
442
+ },
443
+ {
444
+ name: "salt",
445
+ type: "bytes32",
446
+ internalType: "bytes32"
447
+ },
448
+ {
449
+ name: "extensions",
450
+ type: "uint256[]",
451
+ internalType: "uint256[]"
452
+ }
453
+ ],
454
+ stateMutability: "view"
455
+ },
456
+ {
457
+ type: "function",
458
+ name: "hashTypedData",
459
+ inputs: [
460
+ {
461
+ name: "structHash",
462
+ type: "bytes32",
463
+ internalType: "bytes32"
464
+ }
465
+ ],
466
+ outputs: [
467
+ {
468
+ name: "digest",
469
+ type: "bytes32",
470
+ internalType: "bytes32"
471
+ }
472
+ ],
473
+ stateMutability: "view"
474
+ },
475
+ {
476
+ type: "function",
477
+ name: "repermitWitnessTransferFrom",
478
+ inputs: [
479
+ {
480
+ name: "permit",
481
+ type: "tuple",
482
+ internalType: "struct RePermitLib.RePermitTransferFrom",
483
+ components: [
484
+ {
485
+ name: "permitted",
486
+ type: "tuple",
487
+ internalType: "struct RePermitLib.TokenPermissions",
488
+ components: [
489
+ {
490
+ name: "token",
491
+ type: "address",
492
+ internalType: "address"
493
+ },
494
+ {
495
+ name: "amount",
496
+ type: "uint256",
497
+ internalType: "uint256"
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ name: "nonce",
503
+ type: "uint256",
504
+ internalType: "uint256"
505
+ },
506
+ {
507
+ name: "deadline",
508
+ type: "uint256",
509
+ internalType: "uint256"
510
+ }
511
+ ]
512
+ },
513
+ {
514
+ name: "request",
515
+ type: "tuple",
516
+ internalType: "struct RePermitLib.TransferRequest",
517
+ components: [
518
+ {
519
+ name: "to",
520
+ type: "address",
521
+ internalType: "address"
522
+ },
523
+ {
524
+ name: "amount",
525
+ type: "uint256",
526
+ internalType: "uint256"
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ name: "signer",
532
+ type: "address",
533
+ internalType: "address"
534
+ },
535
+ {
536
+ name: "witness",
537
+ type: "bytes32",
538
+ internalType: "bytes32"
539
+ },
540
+ {
541
+ name: "witnessTypeString",
542
+ type: "string",
543
+ internalType: "string"
544
+ },
545
+ {
546
+ name: "signature",
547
+ type: "bytes",
548
+ internalType: "bytes"
549
+ }
550
+ ],
551
+ outputs: [],
552
+ stateMutability: "nonpayable"
553
+ },
554
+ {
555
+ type: "function",
556
+ name: "spent",
557
+ inputs: [
558
+ {
559
+ name: "",
560
+ type: "address",
561
+ internalType: "address"
562
+ },
563
+ {
564
+ name: "",
565
+ type: "bytes32",
566
+ internalType: "bytes32"
567
+ }
568
+ ],
569
+ outputs: [
570
+ {
571
+ name: "",
572
+ type: "uint256",
573
+ internalType: "uint256"
574
+ }
575
+ ],
576
+ stateMutability: "view"
577
+ },
578
+ {
579
+ type: "event",
580
+ name: "Cancel",
581
+ inputs: [
582
+ {
583
+ name: "signer",
584
+ type: "address",
585
+ indexed: !0,
586
+ internalType: "address"
587
+ },
588
+ {
589
+ name: "digest",
590
+ type: "bytes32",
591
+ indexed: !1,
592
+ internalType: "bytes32"
593
+ }
594
+ ],
595
+ anonymous: !1
596
+ },
597
+ {
598
+ type: "event",
599
+ name: "EIP712DomainChanged",
600
+ inputs: [],
601
+ anonymous: !1
602
+ },
603
+ {
604
+ type: "event",
605
+ name: "Spend",
606
+ inputs: [
607
+ {
608
+ name: "signer",
609
+ type: "address",
610
+ indexed: !0,
611
+ internalType: "address"
612
+ },
613
+ {
614
+ name: "permitHash",
615
+ type: "bytes32",
616
+ indexed: !0,
617
+ internalType: "bytes32"
618
+ },
619
+ {
620
+ name: "token",
621
+ type: "address",
622
+ indexed: !0,
623
+ internalType: "address"
624
+ },
625
+ {
626
+ name: "to",
627
+ type: "address",
628
+ indexed: !1,
629
+ internalType: "address"
630
+ },
631
+ {
632
+ name: "amount",
633
+ type: "uint256",
634
+ indexed: !1,
635
+ internalType: "uint256"
636
+ },
637
+ {
638
+ name: "totalSpent",
639
+ type: "uint256",
640
+ indexed: !1,
641
+ internalType: "uint256"
642
+ }
643
+ ],
644
+ anonymous: !1
645
+ },
646
+ {
647
+ type: "error",
648
+ name: "Canceled",
649
+ inputs: []
650
+ },
651
+ {
652
+ type: "error",
653
+ name: "Expired",
654
+ inputs: []
655
+ },
656
+ {
657
+ type: "error",
658
+ name: "InsufficientAllowance",
659
+ inputs: []
660
+ },
661
+ {
662
+ type: "error",
663
+ name: "InvalidShortString",
664
+ inputs: []
665
+ },
666
+ {
667
+ type: "error",
668
+ name: "InvalidSignature",
669
+ inputs: []
670
+ },
671
+ {
672
+ type: "error",
673
+ name: "SafeERC20FailedOperation",
674
+ inputs: [
675
+ {
676
+ name: "token",
677
+ type: "address",
678
+ internalType: "address"
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ type: "error",
684
+ name: "StringTooLong",
685
+ inputs: [
686
+ {
687
+ name: "str",
688
+ type: "string",
689
+ internalType: "string"
690
+ }
691
+ ]
692
+ }
693
+ ], Vt = /* @__PURE__ */ JSON.parse('[{"inputs":[{"internalType":"address","name":"_iweth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"name":"OrderBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"OrderCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcFilledAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"MIN_BID_DELAY_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_OUTBID_PERCENT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STALE_BID_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_COMPLETED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"_ask","type":"tuple"}],"name":"ask","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"book","outputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"fill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"iweth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"makerOrders","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"order","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"orderIdsByMaker","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"prune","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"status","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]'), Wt = /* @__PURE__ */ JSON.parse('[{"inputs":[{"internalType":"contract TWAP","name":"_twap","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"uint256","name":"srcBidAmountNext","type":"uint256"}],"name":"hasAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"uint256","name":"srcBidAmountNext","type":"uint256"}],"name":"hasBalance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"makerOrders","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order[]","name":"result","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint64","name":"lastIndex","type":"uint64"},{"internalType":"uint64","name":"pageSize","type":"uint64"}],"name":"takerBiddableOrders","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order[]","name":"result","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint64","name":"lastIndex","type":"uint64"},{"internalType":"uint64","name":"pageSize","type":"uint64"}],"name":"takerFillableOrders","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order[]","name":"result","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"twap","outputs":[{"internalType":"contract TWAP","name":"","type":"address"}],"stateMutability":"view","type":"function"}]'), vn = Nt, In = Ut, _n = Lt, Rn = Mt, Mn = Pt, Pn = Vt, Nn = Wt;
694
+ var G = /* @__PURE__ */ ((e) => (e.TWAP = "TWAP", e.LIMIT = "LIMIT", e.STOP_LOSS = "STOP_LOSS", e.TAKE_PROFIT = "TAKE_PROFIT", e))(G || {}), se = /* @__PURE__ */ ((e) => (e.Open = "OPEN", e.Canceled = "CANCELED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))(se || {}), ne = /* @__PURE__ */ ((e) => (e[e.Minutes = 6e4] = "Minutes", e[e.Hours = 36e5] = "Hours", e[e.Weeks = 6048e5] = "Weeks", e[e.Days = 864e5] = "Days", e[e.Months = 2592e6] = "Months", e[e.Years = 31536e6] = "Years", e))(ne || {}), j = /* @__PURE__ */ ((e) => (e.LIMIT = "limit", e.TWAP_LIMIT = "twap-limit", e.TWAP_MARKET = "twap-market", e.TRIGGER_PRICE_MARKET = "trigger-price-market", e.TRIGGER_PRICE_LIMIT = "trigger-price-limit", e))(j || {}), zt = /* @__PURE__ */ ((e) => (e.Arbidex = "arbidex", e.Blackhole = "blackhole", e.Chronos = "chronos", e.Dragon = "dragon", e.Kodiak = "kodiak", e.Lynex = "lynex", e.Nami = "nami", e.Newera = "newera", e.Omni = "omni", e.Pancake = "pancake", e.Quick = "quick", e.Ramses = "ramses", e.Shadow = "shadow", e.Spark = "spark", e.Spooky = "spooky", e.Swapx = "swapx", e.Teafi = "teafi", e.Thena = "thena", e.Yowie = "yowie", e))(zt || {});
695
+ const U = "0x0000000000000000000000000000000000000000", H = {
696
+ eth: {
697
+ id: 1,
698
+ name: "Ethereum",
699
+ shortname: "eth",
700
+ native: {
701
+ address: U,
702
+ symbol: "ETH",
703
+ decimals: 18,
704
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
705
+ },
706
+ wToken: {
707
+ symbol: "WETH",
708
+ address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
709
+ decimals: 18,
710
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
711
+ },
712
+ publicRpcUrl: "https://eth.llamarpc.com",
713
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg",
714
+ explorer: "https://etherscan.io",
715
+ eip1559: !0
716
+ },
717
+ bsc: {
718
+ id: 56,
719
+ name: "BinanceSmartChain",
720
+ shortname: "bsc",
721
+ native: {
722
+ address: U,
723
+ symbol: "BNB",
724
+ decimals: 18,
725
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"
726
+ },
727
+ wToken: {
728
+ symbol: "WBNB",
729
+ address: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
730
+ decimals: 18,
731
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"
732
+ },
733
+ publicRpcUrl: "https://bsc-dataseed.binance.org",
734
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/bsc_2.svg",
735
+ explorer: "https://bscscan.com",
736
+ eip1559: !1
737
+ },
738
+ poly: {
739
+ id: 137,
740
+ name: "Polygon",
741
+ shortname: "poly",
742
+ native: {
743
+ address: U,
744
+ symbol: "POL",
745
+ decimals: 18,
746
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"
747
+ },
748
+ wToken: {
749
+ symbol: "WPOL",
750
+ address: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
751
+ decimals: 18,
752
+ logoUrl: "https://tokens-data.1inch.io/images/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png"
753
+ },
754
+ publicRpcUrl: "https://polygon-rpc.com",
755
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/polygon.svg",
756
+ explorer: "https://polygonscan.com",
757
+ eip1559: !0
758
+ },
759
+ arb: {
760
+ id: 42161,
761
+ name: "Arbitrum",
762
+ shortname: "arb",
763
+ native: {
764
+ address: U,
765
+ symbol: "ETH",
766
+ decimals: 18,
767
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
768
+ },
769
+ wToken: {
770
+ symbol: "WETH",
771
+ address: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
772
+ decimals: 18,
773
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
774
+ },
775
+ publicRpcUrl: "https://arb1.arbitrum.io/rpc",
776
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/arbitrum.svg",
777
+ explorer: "https://arbiscan.io",
778
+ eip1559: !0
779
+ },
780
+ sei: {
781
+ id: 1329,
782
+ name: "Sei",
783
+ shortname: "sei",
784
+ native: {
785
+ address: U,
786
+ symbol: "SEI",
787
+ decimals: 18,
788
+ logoUrl: "https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"
789
+ },
790
+ wToken: {
791
+ symbol: "WSEI",
792
+ address: "0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",
793
+ decimals: 18,
794
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
795
+ },
796
+ publicRpcUrl: "https://evm-rpc.sei-apis.com",
797
+ logoUrl: "https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png",
798
+ explorer: "https://seitrace.com",
799
+ eip1559: !1
800
+ },
801
+ avax: {
802
+ id: 43114,
803
+ name: "Avalanche",
804
+ shortname: "avax",
805
+ native: {
806
+ address: U,
807
+ symbol: "AVAX",
808
+ decimals: 18,
809
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg"
810
+ },
811
+ wToken: {
812
+ symbol: "WAVAX",
813
+ address: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
814
+ decimals: 18,
815
+ logoUrl: "https://tokens-data.1inch.io/images/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png"
816
+ },
817
+ publicRpcUrl: "https://api.avax.network/ext/bc/C/rpc",
818
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg",
819
+ explorer: "https://snowtrace.io",
820
+ eip1559: !0
821
+ },
822
+ ftm: {
823
+ id: 250,
824
+ name: "Fantom",
825
+ shortname: "ftm",
826
+ native: {
827
+ address: U,
828
+ symbol: "FTM",
829
+ decimals: 18,
830
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg"
831
+ },
832
+ wToken: {
833
+ symbol: "WFTM",
834
+ address: "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",
835
+ decimals: 18,
836
+ logoUrl: "https://tokens-data.1inch.io/images/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png"
837
+ },
838
+ publicRpcUrl: "https://rpc.ftm.tools",
839
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg",
840
+ explorer: "https://ftmscan.com",
841
+ eip1559: !0
842
+ },
843
+ base: {
844
+ id: 8453,
845
+ name: "Base",
846
+ shortname: "base",
847
+ native: {
848
+ address: U,
849
+ symbol: "ETH",
850
+ decimals: 18,
851
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
852
+ },
853
+ wToken: {
854
+ symbol: "WETH",
855
+ address: "0x4200000000000000000000000000000000000006",
856
+ decimals: 18,
857
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
858
+ },
859
+ publicRpcUrl: "https://mainnet.base.org",
860
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/base.svg",
861
+ explorer: "https://basescan.org",
862
+ eip1559: !1
863
+ },
864
+ linea: {
865
+ id: 59144,
866
+ name: "Linea",
867
+ shortname: "linea",
868
+ native: {
869
+ address: U,
870
+ symbol: "ETH",
871
+ decimals: 18,
872
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
873
+ },
874
+ wToken: {
875
+ symbol: "WETH",
876
+ address: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
877
+ decimals: 18,
878
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
879
+ },
880
+ publicRpcUrl: "https://rpc.linea.build",
881
+ logoUrl: "https://lineascan.build/images/logo.svg",
882
+ explorer: "https://lineascan.build",
883
+ eip1559: !1
884
+ },
885
+ zksync: {
886
+ id: 324,
887
+ name: "zksync",
888
+ shortname: "zksync",
889
+ native: {
890
+ address: U,
891
+ symbol: "ETH",
892
+ decimals: 18,
893
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
894
+ },
895
+ wToken: {
896
+ symbol: "WETH",
897
+ address: "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
898
+ decimals: 18,
899
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
900
+ },
901
+ publicRpcUrl: "https://mainnet.era.zksync.io",
902
+ logoUrl: "https://raw.githubusercontent.com/matter-labs/zksync/0a4ca2145a0c95b5bafa84c2f095c644907a8825/zkSyncLogo.svg",
903
+ explorer: "https://explorer.zksync.io/",
904
+ eip1559: !0
905
+ },
906
+ zkevm: {
907
+ id: 1101,
908
+ name: "zkevm",
909
+ shortname: "zkevm",
910
+ native: {
911
+ address: U,
912
+ symbol: "ETH",
913
+ decimals: 18,
914
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
915
+ },
916
+ wToken: {
917
+ symbol: "WETH",
918
+ address: "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",
919
+ decimals: 18,
920
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
921
+ },
922
+ publicRpcUrl: "https://zkevm-rpc.com",
923
+ logoUrl: "https://user-images.githubusercontent.com/18598517/235932702-bc47eae5-d672-4dd9-9da2-8ea8f51a93f3.png",
924
+ explorer: "https://zkevm.polygonscan.com/",
925
+ eip1559: !0
926
+ },
927
+ manta: {
928
+ id: 169,
929
+ name: "manta",
930
+ shortname: "manta",
931
+ native: {
932
+ address: U,
933
+ symbol: "ETH",
934
+ decimals: 18,
935
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_manta.jpg"
936
+ },
937
+ wToken: {
938
+ symbol: "WETH",
939
+ address: "0x0Dc808adcE2099A9F62AA87D9670745AbA741746",
940
+ decimals: 18,
941
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
942
+ },
943
+ publicRpcUrl: "https://pacific-rpc.manta.network/http",
944
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_manta.jpg",
945
+ explorer: "https://manta.socialscan.io/",
946
+ eip1559: !0
947
+ },
948
+ blast: {
949
+ id: 81457,
950
+ name: "blast",
951
+ shortname: "blast",
952
+ native: {
953
+ address: U,
954
+ symbol: "ETH",
955
+ decimals: 18,
956
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_blast"
957
+ },
958
+ wToken: {
959
+ symbol: "WETH",
960
+ address: "0x4300000000000000000000000000000000000004",
961
+ decimals: 18,
962
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
963
+ },
964
+ publicRpcUrl: "https://rpc.ankr.com/blast",
965
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_blast",
966
+ explorer: "https://blastscan.io/",
967
+ eip1559: !0
968
+ },
969
+ sonic: {
970
+ id: 146,
971
+ name: "sonic",
972
+ shortname: "sonic",
973
+ native: {
974
+ address: U,
975
+ symbol: "S",
976
+ decimals: 18,
977
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic"
978
+ },
979
+ wToken: {
980
+ symbol: "WS",
981
+ address: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",
982
+ decimals: 18,
983
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic"
984
+ },
985
+ publicRpcUrl: "https://rpc.soniclabs.com",
986
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic",
987
+ explorer: "https://www.sonicscan.org/",
988
+ eip1559: !0
989
+ },
990
+ scroll: {
991
+ id: 534352,
992
+ name: "scroll",
993
+ shortname: "scroll",
994
+ native: {
995
+ address: U,
996
+ symbol: "ETH",
997
+ decimals: 18,
998
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_scroll"
999
+ },
1000
+ wToken: {
1001
+ symbol: "WETH",
1002
+ address: "0x5300000000000000000000000000000000000004",
1003
+ decimals: 18,
1004
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
1005
+ },
1006
+ publicRpcUrl: "https://scroll-rpc.publicnode.com",
1007
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_scroll",
1008
+ explorer: "https://scrollscan.com/",
1009
+ eip1559: !0
1010
+ },
1011
+ zircuit: {
1012
+ id: 48900,
1013
+ name: "Zircuit",
1014
+ shortname: "zircuit",
1015
+ native: {
1016
+ address: U,
1017
+ symbol: "ETH",
1018
+ decimals: 18,
1019
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
1020
+ },
1021
+ wToken: {
1022
+ symbol: "WETH",
1023
+ address: "0x4200000000000000000000000000000000000006",
1024
+ decimals: 18,
1025
+ logoUrl: "hhttps://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
1026
+ },
1027
+ publicRpcUrl: "https://zircuit-mainnet.drpc.org",
1028
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg",
1029
+ explorer: "https://explorer.zircuit.com/",
1030
+ eip1559: !0
1031
+ },
1032
+ flare: {
1033
+ id: 14,
1034
+ name: "flare",
1035
+ shortname: "flare",
1036
+ native: {
1037
+ address: U,
1038
+ symbol: "FLR",
1039
+ decimals: 18,
1040
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"
1041
+ },
1042
+ wToken: {
1043
+ symbol: "WFLR",
1044
+ address: "0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",
1045
+ decimals: 18,
1046
+ logoUrl: "https://res.cloudinary.com/sparkdex/image/upload/q_100/v1/website-assets/coins/wflr?_a=DATAg1AAZAA0"
1047
+ },
1048
+ publicRpcUrl: "https://flare.network",
1049
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48",
1050
+ explorer: "https://flarescan.com",
1051
+ eip1559: !0
1052
+ },
1053
+ cronosZkEvm: {
1054
+ id: 388,
1055
+ name: "Cronos zkEVM",
1056
+ shortname: "cronosZkEvm",
1057
+ native: {
1058
+ address: "0x000000000000000000000000000000000000800a",
1059
+ symbol: "zkCRO",
1060
+ decimals: 18,
1061
+ logoUrl: "https://cryptologos.cc/logos/cronos-cro-logo.png"
1062
+ // Replace with the official logo URL if available
1063
+ },
1064
+ wToken: {
1065
+ symbol: "wzkCRO",
1066
+ address: "0xC1bF55EE54E16229d9b369a5502Bfe5fC9F20b6d",
1067
+ decimals: 18,
1068
+ logoUrl: "https://cryptologos.cc/logos/cronos-cro-logo.png"
1069
+ // Replace with the official logo URL if available
1070
+ },
1071
+ publicRpcUrl: "https://rpc.zkevm.cronos.org",
1072
+ logoUrl: "https://cryptologos.cc/logos/cronos-cro-logo.png",
1073
+ // Replace with the official logo URL if available
1074
+ explorer: "https://explorer.zkevm.cronos.org",
1075
+ eip1559: !0
1076
+ },
1077
+ katana: {
1078
+ id: 747474,
1079
+ name: "Katana",
1080
+ shortname: "katana",
1081
+ native: {
1082
+ address: U,
1083
+ symbol: "ETH",
1084
+ decimals: 18,
1085
+ logoUrl: "https://katana.network/assets/katana-logo.svg"
1086
+ },
1087
+ wToken: {
1088
+ symbol: "WETH",
1089
+ address: "0x4200000000000000000000000000000000000006",
1090
+ // standard L2 WETH address (example, verify if custom)
1091
+ decimals: 18,
1092
+ logoUrl: "https://katana.network/assets/weth-logo.svg"
1093
+ },
1094
+ publicRpcUrl: "https://rpc.katana.network",
1095
+ logoUrl: "https://katana.network/assets/katana-logo.svg",
1096
+ explorer: "https://explorer.katana.garden",
1097
+ // placeholder — replace with actual if known
1098
+ eip1559: !0
1099
+ },
1100
+ bera: {
1101
+ id: 80094,
1102
+ name: "Bera",
1103
+ shortname: "bera",
1104
+ native: {
1105
+ address: U,
1106
+ symbol: "BERA",
1107
+ decimals: 18,
1108
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"
1109
+ },
1110
+ wToken: {
1111
+ symbol: "WBERA",
1112
+ address: "0x6969696969696969696969696969696969696969",
1113
+ // standard L2 WETH address (example, verify if custom)
1114
+ decimals: 18,
1115
+ logoUrl: "https://berascan.com/token/images/wrappedbera_ofc_64.png"
1116
+ },
1117
+ publicRpcUrl: "wss://rpc.berachain-apis.com",
1118
+ logoUrl: "https://katana.network/assets/katana-logo.svg",
1119
+ explorer: "https://berascan.com",
1120
+ // placeholder — replace with actual if known
1121
+ eip1559: !0
1122
+ },
1123
+ monad: {
1124
+ id: 143,
1125
+ name: "Monad",
1126
+ shortname: "monad",
1127
+ native: {
1128
+ address: U,
1129
+ symbol: "MONAD",
1130
+ decimals: 18,
1131
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"
1132
+ },
1133
+ wToken: {
1134
+ symbol: "WMON",
1135
+ address: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
1136
+ decimals: 18,
1137
+ logoUrl: "https://assets.coingecko.com/coins/images/70784/standard/wmon.png?1766028904"
1138
+ },
1139
+ publicRpcUrl: "https://monad-mainnet.drpc.org",
1140
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png",
1141
+ explorer: "https://monad.network",
1142
+ eip1559: !0
1143
+ }
1144
+ };
1145
+ var $t = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Fe = Math.ceil, J = Math.floor, q = "[BigNumber Error] ", Ne = q + "Number primitive has more than 15 significant digits: ", te = 1e14, S = 14, ke = 9007199254740991, De = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], oe = 1e7, V = 1e9;
1146
+ function qe(e) {
1147
+ var a, d, f, u = T.prototype = { constructor: T, toString: null, valueOf: null }, b = new T(1), A = 20, x = 4, k = -7, E = 21, O = -1e7, C = 1e7, D = !1, M = 1, _ = 0, le = {
1148
+ prefix: "",
1149
+ groupSize: 3,
1150
+ secondaryGroupSize: 0,
1151
+ groupSeparator: ",",
1152
+ decimalSeparator: ".",
1153
+ fractionGroupSize: 0,
1154
+ fractionGroupSeparator: " ",
1155
+ // non-breaking space
1156
+ suffix: ""
1157
+ }, re = "0123456789abcdefghijklmnopqrstuvwxyz", ye = !0;
1158
+ function T(t, n) {
1159
+ var s, l, i, o, m, r, p, y, c = this;
1160
+ if (!(c instanceof T)) return new T(t, n);
1161
+ if (n == null) {
1162
+ if (t && t._isBigNumber === !0) {
1163
+ c.s = t.s, !t.c || t.e > C ? c.c = c.e = null : t.e < O ? c.c = [c.e = 0] : (c.e = t.e, c.c = t.c.slice());
1164
+ return;
1165
+ }
1166
+ if ((r = typeof t == "number") && t * 0 == 0) {
1167
+ if (c.s = 1 / t < 0 ? (t = -t, -1) : 1, t === ~~t) {
1168
+ for (o = 0, m = t; m >= 10; m /= 10, o++) ;
1169
+ o > C ? c.c = c.e = null : (c.e = o, c.c = [t]);
1170
+ return;
1171
+ }
1172
+ y = String(t);
1173
+ } else {
1174
+ if (!$t.test(y = String(t))) return f(c, y, r);
1175
+ c.s = y.charCodeAt(0) == 45 ? (y = y.slice(1), -1) : 1;
1176
+ }
1177
+ (o = y.indexOf(".")) > -1 && (y = y.replace(".", "")), (m = y.search(/e/i)) > 0 ? (o < 0 && (o = m), o += +y.slice(m + 1), y = y.substring(0, m)) : o < 0 && (o = y.length);
1178
+ } else {
1179
+ if (R(n, 2, re.length, "Base"), n == 10 && ye)
1180
+ return c = new T(t), X(c, A + c.e + 1, x);
1181
+ if (y = String(t), r = typeof t == "number") {
1182
+ if (t * 0 != 0) return f(c, y, r, n);
1183
+ if (c.s = 1 / t < 0 ? (y = y.slice(1), -1) : 1, T.DEBUG && y.replace(/^0\.0*|\./, "").length > 15)
1184
+ throw Error(Ne + t);
1185
+ } else
1186
+ c.s = y.charCodeAt(0) === 45 ? (y = y.slice(1), -1) : 1;
1187
+ for (s = re.slice(0, n), o = m = 0, p = y.length; m < p; m++)
1188
+ if (s.indexOf(l = y.charAt(m)) < 0) {
1189
+ if (l == ".") {
1190
+ if (m > o) {
1191
+ o = p;
1192
+ continue;
1193
+ }
1194
+ } else if (!i && (y == y.toUpperCase() && (y = y.toLowerCase()) || y == y.toLowerCase() && (y = y.toUpperCase()))) {
1195
+ i = !0, m = -1, o = 0;
1196
+ continue;
1197
+ }
1198
+ return f(c, String(t), r, n);
1199
+ }
1200
+ r = !1, y = d(y, n, 10, c.s), (o = y.indexOf(".")) > -1 ? y = y.replace(".", "") : o = y.length;
1201
+ }
1202
+ for (m = 0; y.charCodeAt(m) === 48; m++) ;
1203
+ for (p = y.length; y.charCodeAt(--p) === 48; ) ;
1204
+ if (y = y.slice(m, ++p)) {
1205
+ if (p -= m, r && T.DEBUG && p > 15 && (t > ke || t !== J(t)))
1206
+ throw Error(Ne + c.s * t);
1207
+ if ((o = o - m - 1) > C)
1208
+ c.c = c.e = null;
1209
+ else if (o < O)
1210
+ c.c = [c.e = 0];
1211
+ else {
1212
+ if (c.e = o, c.c = [], m = (o + 1) % S, o < 0 && (m += S), m < p) {
1213
+ for (m && c.c.push(+y.slice(0, m)), p -= S; m < p; )
1214
+ c.c.push(+y.slice(m, m += S));
1215
+ m = S - (y = y.slice(m)).length;
1216
+ } else
1217
+ m -= p;
1218
+ for (; m--; y += "0") ;
1219
+ c.c.push(+y);
1220
+ }
1221
+ } else
1222
+ c.c = [c.e = 0];
1223
+ }
1224
+ T.clone = qe, T.ROUND_UP = 0, T.ROUND_DOWN = 1, T.ROUND_CEIL = 2, T.ROUND_FLOOR = 3, T.ROUND_HALF_UP = 4, T.ROUND_HALF_DOWN = 5, T.ROUND_HALF_EVEN = 6, T.ROUND_HALF_CEIL = 7, T.ROUND_HALF_FLOOR = 8, T.EUCLID = 9, T.config = T.set = function(t) {
1225
+ var n, s;
1226
+ if (t != null)
1227
+ if (typeof t == "object") {
1228
+ if (t.hasOwnProperty(n = "DECIMAL_PLACES") && (s = t[n], R(s, 0, V, n), A = s), t.hasOwnProperty(n = "ROUNDING_MODE") && (s = t[n], R(s, 0, 8, n), x = s), t.hasOwnProperty(n = "EXPONENTIAL_AT") && (s = t[n], s && s.pop ? (R(s[0], -V, 0, n), R(s[1], 0, V, n), k = s[0], E = s[1]) : (R(s, -V, V, n), k = -(E = s < 0 ? -s : s))), t.hasOwnProperty(n = "RANGE"))
1229
+ if (s = t[n], s && s.pop)
1230
+ R(s[0], -V, -1, n), R(s[1], 1, V, n), O = s[0], C = s[1];
1231
+ else if (R(s, -V, V, n), s)
1232
+ O = -(C = s < 0 ? -s : s);
1233
+ else
1234
+ throw Error(q + n + " cannot be zero: " + s);
1235
+ if (t.hasOwnProperty(n = "CRYPTO"))
1236
+ if (s = t[n], s === !!s)
1237
+ if (s)
1238
+ if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
1239
+ D = s;
1240
+ else
1241
+ throw D = !s, Error(q + "crypto unavailable");
1242
+ else
1243
+ D = s;
1244
+ else
1245
+ throw Error(q + n + " not true or false: " + s);
1246
+ if (t.hasOwnProperty(n = "MODULO_MODE") && (s = t[n], R(s, 0, 9, n), M = s), t.hasOwnProperty(n = "POW_PRECISION") && (s = t[n], R(s, 0, V, n), _ = s), t.hasOwnProperty(n = "FORMAT"))
1247
+ if (s = t[n], typeof s == "object") le = s;
1248
+ else throw Error(q + n + " not an object: " + s);
1249
+ if (t.hasOwnProperty(n = "ALPHABET"))
1250
+ if (s = t[n], typeof s == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(s))
1251
+ ye = s.slice(0, 10) == "0123456789", re = s;
1252
+ else
1253
+ throw Error(q + n + " invalid: " + s);
1254
+ } else
1255
+ throw Error(q + "Object expected: " + t);
1256
+ return {
1257
+ DECIMAL_PLACES: A,
1258
+ ROUNDING_MODE: x,
1259
+ EXPONENTIAL_AT: [k, E],
1260
+ RANGE: [O, C],
1261
+ CRYPTO: D,
1262
+ MODULO_MODE: M,
1263
+ POW_PRECISION: _,
1264
+ FORMAT: le,
1265
+ ALPHABET: re
1266
+ };
1267
+ }, T.isBigNumber = function(t) {
1268
+ if (!t || t._isBigNumber !== !0) return !1;
1269
+ if (!T.DEBUG) return !0;
1270
+ var n, s, l = t.c, i = t.e, o = t.s;
1271
+ e: if ({}.toString.call(l) == "[object Array]") {
1272
+ if ((o === 1 || o === -1) && i >= -V && i <= V && i === J(i)) {
1273
+ if (l[0] === 0) {
1274
+ if (i === 0 && l.length === 1) return !0;
1275
+ break e;
1276
+ }
1277
+ if (n = (i + 1) % S, n < 1 && (n += S), String(l[0]).length == n) {
1278
+ for (n = 0; n < l.length; n++)
1279
+ if (s = l[n], s < 0 || s >= te || s !== J(s)) break e;
1280
+ if (s !== 0) return !0;
1281
+ }
1282
+ }
1283
+ } else if (l === null && i === null && (o === null || o === 1 || o === -1))
1284
+ return !0;
1285
+ throw Error(q + "Invalid BigNumber: " + t);
1286
+ }, T.maximum = T.max = function() {
1287
+ return Pe(arguments, -1);
1288
+ }, T.minimum = T.min = function() {
1289
+ return Pe(arguments, 1);
1290
+ }, T.random = (function() {
1291
+ var t = 9007199254740992, n = Math.random() * t & 2097151 ? function() {
1292
+ return J(Math.random() * t);
1293
+ } : function() {
1294
+ return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
1295
+ };
1296
+ return function(s) {
1297
+ var l, i, o, m, r, p = 0, y = [], c = new T(b);
1298
+ if (s == null ? s = A : R(s, 0, V), m = Fe(s / S), D)
1299
+ if (crypto.getRandomValues) {
1300
+ for (l = crypto.getRandomValues(new Uint32Array(m *= 2)); p < m; )
1301
+ r = l[p] * 131072 + (l[p + 1] >>> 11), r >= 9e15 ? (i = crypto.getRandomValues(new Uint32Array(2)), l[p] = i[0], l[p + 1] = i[1]) : (y.push(r % 1e14), p += 2);
1302
+ p = m / 2;
1303
+ } else if (crypto.randomBytes) {
1304
+ for (l = crypto.randomBytes(m *= 7); p < m; )
1305
+ r = (l[p] & 31) * 281474976710656 + l[p + 1] * 1099511627776 + l[p + 2] * 4294967296 + l[p + 3] * 16777216 + (l[p + 4] << 16) + (l[p + 5] << 8) + l[p + 6], r >= 9e15 ? crypto.randomBytes(7).copy(l, p) : (y.push(r % 1e14), p += 7);
1306
+ p = m / 7;
1307
+ } else
1308
+ throw D = !1, Error(q + "crypto unavailable");
1309
+ if (!D)
1310
+ for (; p < m; )
1311
+ r = n(), r < 9e15 && (y[p++] = r % 1e14);
1312
+ for (m = y[--p], s %= S, m && s && (r = De[S - s], y[p] = J(m / r) * r); y[p] === 0; y.pop(), p--) ;
1313
+ if (p < 0)
1314
+ y = [o = 0];
1315
+ else {
1316
+ for (o = -1; y[0] === 0; y.splice(0, 1), o -= S) ;
1317
+ for (p = 1, r = y[0]; r >= 10; r /= 10, p++) ;
1318
+ p < S && (o -= S - p);
1319
+ }
1320
+ return c.e = o, c.c = y, c;
1321
+ };
1322
+ })(), T.sum = function() {
1323
+ for (var t = 1, n = arguments, s = new T(n[0]); t < n.length; ) s = s.plus(n[t++]);
1324
+ return s;
1325
+ }, d = /* @__PURE__ */ (function() {
1326
+ var t = "0123456789";
1327
+ function n(s, l, i, o) {
1328
+ for (var m, r = [0], p, y = 0, c = s.length; y < c; ) {
1329
+ for (p = r.length; p--; r[p] *= l) ;
1330
+ for (r[0] += o.indexOf(s.charAt(y++)), m = 0; m < r.length; m++)
1331
+ r[m] > i - 1 && (r[m + 1] == null && (r[m + 1] = 0), r[m + 1] += r[m] / i | 0, r[m] %= i);
1332
+ }
1333
+ return r.reverse();
1334
+ }
1335
+ return function(s, l, i, o, m) {
1336
+ var r, p, y, c, h, w, F, v, P = s.indexOf("."), L = A, B = x;
1337
+ for (P >= 0 && (c = _, _ = 0, s = s.replace(".", ""), v = new T(l), w = v.pow(s.length - P), _ = c, v.c = n(
1338
+ de(Z(w.c), w.e, "0"),
1339
+ 10,
1340
+ i,
1341
+ t
1342
+ ), v.e = v.c.length), F = n(s, l, i, m ? (r = re, t) : (r = t, re)), y = c = F.length; F[--c] == 0; F.pop()) ;
1343
+ if (!F[0]) return r.charAt(0);
1344
+ if (P < 0 ? --y : (w.c = F, w.e = y, w.s = o, w = a(w, v, L, B, i), F = w.c, h = w.r, y = w.e), p = y + L + 1, P = F[p], c = i / 2, h = h || p < 0 || F[p + 1] != null, h = B < 4 ? (P != null || h) && (B == 0 || B == (w.s < 0 ? 3 : 2)) : P > c || P == c && (B == 4 || h || B == 6 && F[p - 1] & 1 || B == (w.s < 0 ? 8 : 7)), p < 1 || !F[0])
1345
+ s = h ? de(r.charAt(1), -L, r.charAt(0)) : r.charAt(0);
1346
+ else {
1347
+ if (F.length = p, h)
1348
+ for (--i; ++F[--p] > i; )
1349
+ F[p] = 0, p || (++y, F = [1].concat(F));
1350
+ for (c = F.length; !F[--c]; ) ;
1351
+ for (P = 0, s = ""; P <= c; s += r.charAt(F[P++])) ;
1352
+ s = de(s, y, r.charAt(0));
1353
+ }
1354
+ return s;
1355
+ };
1356
+ })(), a = /* @__PURE__ */ (function() {
1357
+ function t(l, i, o) {
1358
+ var m, r, p, y, c = 0, h = l.length, w = i % oe, F = i / oe | 0;
1359
+ for (l = l.slice(); h--; )
1360
+ p = l[h] % oe, y = l[h] / oe | 0, m = F * p + y * w, r = w * p + m % oe * oe + c, c = (r / o | 0) + (m / oe | 0) + F * y, l[h] = r % o;
1361
+ return c && (l = [c].concat(l)), l;
1362
+ }
1363
+ function n(l, i, o, m) {
1364
+ var r, p;
1365
+ if (o != m)
1366
+ p = o > m ? 1 : -1;
1367
+ else
1368
+ for (r = p = 0; r < o; r++)
1369
+ if (l[r] != i[r]) {
1370
+ p = l[r] > i[r] ? 1 : -1;
1371
+ break;
1372
+ }
1373
+ return p;
1374
+ }
1375
+ function s(l, i, o, m) {
1376
+ for (var r = 0; o--; )
1377
+ l[o] -= r, r = l[o] < i[o] ? 1 : 0, l[o] = r * m + l[o] - i[o];
1378
+ for (; !l[0] && l.length > 1; l.splice(0, 1)) ;
1379
+ }
1380
+ return function(l, i, o, m, r) {
1381
+ var p, y, c, h, w, F, v, P, L, B, I, W, he, we, Ce, ae, me, Q = l.s == i.s ? 1 : -1, z = l.c, N = i.c;
1382
+ if (!z || !z[0] || !N || !N[0])
1383
+ return new T(
1384
+ // Return NaN if either NaN, or both Infinity or 0.
1385
+ !l.s || !i.s || (z ? N && z[0] == N[0] : !N) ? NaN : (
1386
+ // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
1387
+ z && z[0] == 0 || !N ? Q * 0 : Q / 0
1388
+ )
1389
+ );
1390
+ for (P = new T(Q), L = P.c = [], y = l.e - i.e, Q = o + y + 1, r || (r = te, y = ee(l.e / S) - ee(i.e / S), Q = Q / S | 0), c = 0; N[c] == (z[c] || 0); c++) ;
1391
+ if (N[c] > (z[c] || 0) && y--, Q < 0)
1392
+ L.push(1), h = !0;
1393
+ else {
1394
+ for (we = z.length, ae = N.length, c = 0, Q += 2, w = J(r / (N[0] + 1)), w > 1 && (N = t(N, w, r), z = t(z, w, r), ae = N.length, we = z.length), he = ae, B = z.slice(0, ae), I = B.length; I < ae; B[I++] = 0) ;
1395
+ me = N.slice(), me = [0].concat(me), Ce = N[0], N[1] >= r / 2 && Ce++;
1396
+ do {
1397
+ if (w = 0, p = n(N, B, ae, I), p < 0) {
1398
+ if (W = B[0], ae != I && (W = W * r + (B[1] || 0)), w = J(W / Ce), w > 1)
1399
+ for (w >= r && (w = r - 1), F = t(N, w, r), v = F.length, I = B.length; n(F, B, v, I) == 1; )
1400
+ w--, s(F, ae < v ? me : N, v, r), v = F.length, p = 1;
1401
+ else
1402
+ w == 0 && (p = w = 1), F = N.slice(), v = F.length;
1403
+ if (v < I && (F = [0].concat(F)), s(B, F, I, r), I = B.length, p == -1)
1404
+ for (; n(N, B, ae, I) < 1; )
1405
+ w++, s(B, ae < I ? me : N, I, r), I = B.length;
1406
+ } else p === 0 && (w++, B = [0]);
1407
+ L[c++] = w, B[0] ? B[I++] = z[he] || 0 : (B = [z[he]], I = 1);
1408
+ } while ((he++ < we || B[0] != null) && Q--);
1409
+ h = B[0] != null, L[0] || L.splice(0, 1);
1410
+ }
1411
+ if (r == te) {
1412
+ for (c = 1, Q = L[0]; Q >= 10; Q /= 10, c++) ;
1413
+ X(P, o + (P.e = c + y * S - 1) + 1, m, h);
1414
+ } else
1415
+ P.e = y, P.r = +h;
1416
+ return P;
1417
+ };
1418
+ })();
1419
+ function xe(t, n, s, l) {
1420
+ var i, o, m, r, p;
1421
+ if (s == null ? s = x : R(s, 0, 8), !t.c) return t.toString();
1422
+ if (i = t.c[0], m = t.e, n == null)
1423
+ p = Z(t.c), p = l == 1 || l == 2 && (m <= k || m >= E) ? Ae(p, m) : de(p, m, "0");
1424
+ else if (t = X(new T(t), n, s), o = t.e, p = Z(t.c), r = p.length, l == 1 || l == 2 && (n <= o || o <= k)) {
1425
+ for (; r < n; p += "0", r++) ;
1426
+ p = Ae(p, o);
1427
+ } else if (n -= m + (l === 2 && o > m), p = de(p, o, "0"), o + 1 > r) {
1428
+ if (--n > 0) for (p += "."; n--; p += "0") ;
1429
+ } else if (n += o - r, n > 0)
1430
+ for (o + 1 == r && (p += "."); n--; p += "0") ;
1431
+ return t.s < 0 && i ? "-" + p : p;
1432
+ }
1433
+ function Pe(t, n) {
1434
+ for (var s, l, i = 1, o = new T(t[0]); i < t.length; i++)
1435
+ l = new T(t[i]), (!l.s || (s = ce(o, l)) === n || s === 0 && o.s === n) && (o = l);
1436
+ return o;
1437
+ }
1438
+ function Ee(t, n, s) {
1439
+ for (var l = 1, i = n.length; !n[--i]; n.pop()) ;
1440
+ for (i = n[0]; i >= 10; i /= 10, l++) ;
1441
+ return (s = l + s * S - 1) > C ? t.c = t.e = null : s < O ? t.c = [t.e = 0] : (t.e = s, t.c = n), t;
1442
+ }
1443
+ f = /* @__PURE__ */ (function() {
1444
+ var t = /^(-?)0([xbo])(?=\w[\w.]*$)/i, n = /^([^.]+)\.$/, s = /^\.([^.]+)$/, l = /^-?(Infinity|NaN)$/, i = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1445
+ return function(o, m, r, p) {
1446
+ var y, c = r ? m : m.replace(i, "");
1447
+ if (l.test(c))
1448
+ o.s = isNaN(c) ? null : c < 0 ? -1 : 1;
1449
+ else {
1450
+ if (!r && (c = c.replace(t, function(h, w, F) {
1451
+ return y = (F = F.toLowerCase()) == "x" ? 16 : F == "b" ? 2 : 8, !p || p == y ? w : h;
1452
+ }), p && (y = p, c = c.replace(n, "$1").replace(s, "0.$1")), m != c))
1453
+ return new T(c, y);
1454
+ if (T.DEBUG)
1455
+ throw Error(q + "Not a" + (p ? " base " + p : "") + " number: " + m);
1456
+ o.s = null;
1457
+ }
1458
+ o.c = o.e = null;
1459
+ };
1460
+ })();
1461
+ function X(t, n, s, l) {
1462
+ var i, o, m, r, p, y, c, h = t.c, w = De;
1463
+ if (h) {
1464
+ e: {
1465
+ for (i = 1, r = h[0]; r >= 10; r /= 10, i++) ;
1466
+ if (o = n - i, o < 0)
1467
+ o += S, m = n, p = h[y = 0], c = J(p / w[i - m - 1] % 10);
1468
+ else if (y = Fe((o + 1) / S), y >= h.length)
1469
+ if (l) {
1470
+ for (; h.length <= y; h.push(0)) ;
1471
+ p = c = 0, i = 1, o %= S, m = o - S + 1;
1472
+ } else
1473
+ break e;
1474
+ else {
1475
+ for (p = r = h[y], i = 1; r >= 10; r /= 10, i++) ;
1476
+ o %= S, m = o - S + i, c = m < 0 ? 0 : J(p / w[i - m - 1] % 10);
1477
+ }
1478
+ if (l = l || n < 0 || // Are there any non-zero digits after the rounding digit?
1479
+ // The expression n % pows10[d - j - 1] returns all digits of n to the right
1480
+ // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
1481
+ h[y + 1] != null || (m < 0 ? p : p % w[i - m - 1]), l = s < 4 ? (c || l) && (s == 0 || s == (t.s < 0 ? 3 : 2)) : c > 5 || c == 5 && (s == 4 || l || s == 6 && // Check whether the digit to the left of the rounding digit is odd.
1482
+ (o > 0 ? m > 0 ? p / w[i - m] : 0 : h[y - 1]) % 10 & 1 || s == (t.s < 0 ? 8 : 7)), n < 1 || !h[0])
1483
+ return h.length = 0, l ? (n -= t.e + 1, h[0] = w[(S - n % S) % S], t.e = -n || 0) : h[0] = t.e = 0, t;
1484
+ if (o == 0 ? (h.length = y, r = 1, y--) : (h.length = y + 1, r = w[S - o], h[y] = m > 0 ? J(p / w[i - m] % w[m]) * r : 0), l)
1485
+ for (; ; )
1486
+ if (y == 0) {
1487
+ for (o = 1, m = h[0]; m >= 10; m /= 10, o++) ;
1488
+ for (m = h[0] += r, r = 1; m >= 10; m /= 10, r++) ;
1489
+ o != r && (t.e++, h[0] == te && (h[0] = 1));
1490
+ break;
1491
+ } else {
1492
+ if (h[y] += r, h[y] != te) break;
1493
+ h[y--] = 0, r = 1;
1494
+ }
1495
+ for (o = h.length; h[--o] === 0; h.pop()) ;
1496
+ }
1497
+ t.e > C ? t.c = t.e = null : t.e < O && (t.c = [t.e = 0]);
1498
+ }
1499
+ return t;
1500
+ }
1501
+ function ie(t) {
1502
+ var n, s = t.e;
1503
+ return s === null ? t.toString() : (n = Z(t.c), n = s <= k || s >= E ? Ae(n, s) : de(n, s, "0"), t.s < 0 ? "-" + n : n);
1504
+ }
1505
+ return u.absoluteValue = u.abs = function() {
1506
+ var t = new T(this);
1507
+ return t.s < 0 && (t.s = 1), t;
1508
+ }, u.comparedTo = function(t, n) {
1509
+ return ce(this, new T(t, n));
1510
+ }, u.decimalPlaces = u.dp = function(t, n) {
1511
+ var s, l, i, o = this;
1512
+ if (t != null)
1513
+ return R(t, 0, V), n == null ? n = x : R(n, 0, 8), X(new T(o), t + o.e + 1, n);
1514
+ if (!(s = o.c)) return null;
1515
+ if (l = ((i = s.length - 1) - ee(this.e / S)) * S, i = s[i]) for (; i % 10 == 0; i /= 10, l--) ;
1516
+ return l < 0 && (l = 0), l;
1517
+ }, u.dividedBy = u.div = function(t, n) {
1518
+ return a(this, new T(t, n), A, x);
1519
+ }, u.dividedToIntegerBy = u.idiv = function(t, n) {
1520
+ return a(this, new T(t, n), 0, 1);
1521
+ }, u.exponentiatedBy = u.pow = function(t, n) {
1522
+ var s, l, i, o, m, r, p, y, c, h = this;
1523
+ if (t = new T(t), t.c && !t.isInteger())
1524
+ throw Error(q + "Exponent not an integer: " + ie(t));
1525
+ if (n != null && (n = new T(n)), r = t.e > 14, !h.c || !h.c[0] || h.c[0] == 1 && !h.e && h.c.length == 1 || !t.c || !t.c[0])
1526
+ return c = new T(Math.pow(+ie(h), r ? t.s * (2 - Te(t)) : +ie(t))), n ? c.mod(n) : c;
1527
+ if (p = t.s < 0, n) {
1528
+ if (n.c ? !n.c[0] : !n.s) return new T(NaN);
1529
+ l = !p && h.isInteger() && n.isInteger(), l && (h = h.mod(n));
1530
+ } else {
1531
+ if (t.e > 9 && (h.e > 0 || h.e < -1 || (h.e == 0 ? h.c[0] > 1 || r && h.c[1] >= 24e7 : h.c[0] < 8e13 || r && h.c[0] <= 9999975e7)))
1532
+ return o = h.s < 0 && Te(t) ? -0 : 0, h.e > -1 && (o = 1 / o), new T(p ? 1 / o : o);
1533
+ _ && (o = Fe(_ / S + 2));
1534
+ }
1535
+ for (r ? (s = new T(0.5), p && (t.s = 1), y = Te(t)) : (i = Math.abs(+ie(t)), y = i % 2), c = new T(b); ; ) {
1536
+ if (y) {
1537
+ if (c = c.times(h), !c.c) break;
1538
+ o ? c.c.length > o && (c.c.length = o) : l && (c = c.mod(n));
1539
+ }
1540
+ if (i) {
1541
+ if (i = J(i / 2), i === 0) break;
1542
+ y = i % 2;
1543
+ } else if (t = t.times(s), X(t, t.e + 1, 1), t.e > 14)
1544
+ y = Te(t);
1545
+ else {
1546
+ if (i = +ie(t), i === 0) break;
1547
+ y = i % 2;
1548
+ }
1549
+ h = h.times(h), o ? h.c && h.c.length > o && (h.c.length = o) : l && (h = h.mod(n));
1550
+ }
1551
+ return l ? c : (p && (c = b.div(c)), n ? c.mod(n) : o ? X(c, _, x, m) : c);
1552
+ }, u.integerValue = function(t) {
1553
+ var n = new T(this);
1554
+ return t == null ? t = x : R(t, 0, 8), X(n, n.e + 1, t);
1555
+ }, u.isEqualTo = u.eq = function(t, n) {
1556
+ return ce(this, new T(t, n)) === 0;
1557
+ }, u.isFinite = function() {
1558
+ return !!this.c;
1559
+ }, u.isGreaterThan = u.gt = function(t, n) {
1560
+ return ce(this, new T(t, n)) > 0;
1561
+ }, u.isGreaterThanOrEqualTo = u.gte = function(t, n) {
1562
+ return (n = ce(this, new T(t, n))) === 1 || n === 0;
1563
+ }, u.isInteger = function() {
1564
+ return !!this.c && ee(this.e / S) > this.c.length - 2;
1565
+ }, u.isLessThan = u.lt = function(t, n) {
1566
+ return ce(this, new T(t, n)) < 0;
1567
+ }, u.isLessThanOrEqualTo = u.lte = function(t, n) {
1568
+ return (n = ce(this, new T(t, n))) === -1 || n === 0;
1569
+ }, u.isNaN = function() {
1570
+ return !this.s;
1571
+ }, u.isNegative = function() {
1572
+ return this.s < 0;
1573
+ }, u.isPositive = function() {
1574
+ return this.s > 0;
1575
+ }, u.isZero = function() {
1576
+ return !!this.c && this.c[0] == 0;
1577
+ }, u.minus = function(t, n) {
1578
+ var s, l, i, o, m = this, r = m.s;
1579
+ if (t = new T(t, n), n = t.s, !r || !n) return new T(NaN);
1580
+ if (r != n)
1581
+ return t.s = -n, m.plus(t);
1582
+ var p = m.e / S, y = t.e / S, c = m.c, h = t.c;
1583
+ if (!p || !y) {
1584
+ if (!c || !h) return c ? (t.s = -n, t) : new T(h ? m : NaN);
1585
+ if (!c[0] || !h[0])
1586
+ return h[0] ? (t.s = -n, t) : new T(c[0] ? m : (
1587
+ // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
1588
+ x == 3 ? -0 : 0
1589
+ ));
1590
+ }
1591
+ if (p = ee(p), y = ee(y), c = c.slice(), r = p - y) {
1592
+ for ((o = r < 0) ? (r = -r, i = c) : (y = p, i = h), i.reverse(), n = r; n--; i.push(0)) ;
1593
+ i.reverse();
1594
+ } else
1595
+ for (l = (o = (r = c.length) < (n = h.length)) ? r : n, r = n = 0; n < l; n++)
1596
+ if (c[n] != h[n]) {
1597
+ o = c[n] < h[n];
1598
+ break;
1599
+ }
1600
+ if (o && (i = c, c = h, h = i, t.s = -t.s), n = (l = h.length) - (s = c.length), n > 0) for (; n--; c[s++] = 0) ;
1601
+ for (n = te - 1; l > r; ) {
1602
+ if (c[--l] < h[l]) {
1603
+ for (s = l; s && !c[--s]; c[s] = n) ;
1604
+ --c[s], c[l] += te;
1605
+ }
1606
+ c[l] -= h[l];
1607
+ }
1608
+ for (; c[0] == 0; c.splice(0, 1), --y) ;
1609
+ return c[0] ? Ee(t, c, y) : (t.s = x == 3 ? -1 : 1, t.c = [t.e = 0], t);
1610
+ }, u.modulo = u.mod = function(t, n) {
1611
+ var s, l, i = this;
1612
+ return t = new T(t, n), !i.c || !t.s || t.c && !t.c[0] ? new T(NaN) : !t.c || i.c && !i.c[0] ? new T(i) : (M == 9 ? (l = t.s, t.s = 1, s = a(i, t, 0, 3), t.s = l, s.s *= l) : s = a(i, t, 0, M), t = i.minus(s.times(t)), !t.c[0] && M == 1 && (t.s = i.s), t);
1613
+ }, u.multipliedBy = u.times = function(t, n) {
1614
+ var s, l, i, o, m, r, p, y, c, h, w, F, v, P, L, B = this, I = B.c, W = (t = new T(t, n)).c;
1615
+ if (!I || !W || !I[0] || !W[0])
1616
+ return !B.s || !t.s || I && !I[0] && !W || W && !W[0] && !I ? t.c = t.e = t.s = null : (t.s *= B.s, !I || !W ? t.c = t.e = null : (t.c = [0], t.e = 0)), t;
1617
+ for (l = ee(B.e / S) + ee(t.e / S), t.s *= B.s, p = I.length, h = W.length, p < h && (v = I, I = W, W = v, i = p, p = h, h = i), i = p + h, v = []; i--; v.push(0)) ;
1618
+ for (P = te, L = oe, i = h; --i >= 0; ) {
1619
+ for (s = 0, w = W[i] % L, F = W[i] / L | 0, m = p, o = i + m; o > i; )
1620
+ y = I[--m] % L, c = I[m] / L | 0, r = F * y + c * w, y = w * y + r % L * L + v[o] + s, s = (y / P | 0) + (r / L | 0) + F * c, v[o--] = y % P;
1621
+ v[o] = s;
1622
+ }
1623
+ return s ? ++l : v.splice(0, 1), Ee(t, v, l);
1624
+ }, u.negated = function() {
1625
+ var t = new T(this);
1626
+ return t.s = -t.s || null, t;
1627
+ }, u.plus = function(t, n) {
1628
+ var s, l = this, i = l.s;
1629
+ if (t = new T(t, n), n = t.s, !i || !n) return new T(NaN);
1630
+ if (i != n)
1631
+ return t.s = -n, l.minus(t);
1632
+ var o = l.e / S, m = t.e / S, r = l.c, p = t.c;
1633
+ if (!o || !m) {
1634
+ if (!r || !p) return new T(i / 0);
1635
+ if (!r[0] || !p[0]) return p[0] ? t : new T(r[0] ? l : i * 0);
1636
+ }
1637
+ if (o = ee(o), m = ee(m), r = r.slice(), i = o - m) {
1638
+ for (i > 0 ? (m = o, s = p) : (i = -i, s = r), s.reverse(); i--; s.push(0)) ;
1639
+ s.reverse();
1640
+ }
1641
+ for (i = r.length, n = p.length, i - n < 0 && (s = p, p = r, r = s, n = i), i = 0; n; )
1642
+ i = (r[--n] = r[n] + p[n] + i) / te | 0, r[n] = te === r[n] ? 0 : r[n] % te;
1643
+ return i && (r = [i].concat(r), ++m), Ee(t, r, m);
1644
+ }, u.precision = u.sd = function(t, n) {
1645
+ var s, l, i, o = this;
1646
+ if (t != null && t !== !!t)
1647
+ return R(t, 1, V), n == null ? n = x : R(n, 0, 8), X(new T(o), t, n);
1648
+ if (!(s = o.c)) return null;
1649
+ if (i = s.length - 1, l = i * S + 1, i = s[i]) {
1650
+ for (; i % 10 == 0; i /= 10, l--) ;
1651
+ for (i = s[0]; i >= 10; i /= 10, l++) ;
1652
+ }
1653
+ return t && o.e + 1 > l && (l = o.e + 1), l;
1654
+ }, u.shiftedBy = function(t) {
1655
+ return R(t, -ke, ke), this.times("1e" + t);
1656
+ }, u.squareRoot = u.sqrt = function() {
1657
+ var t, n, s, l, i, o = this, m = o.c, r = o.s, p = o.e, y = A + 4, c = new T("0.5");
1658
+ if (r !== 1 || !m || !m[0])
1659
+ return new T(!r || r < 0 && (!m || m[0]) ? NaN : m ? o : 1 / 0);
1660
+ if (r = Math.sqrt(+ie(o)), r == 0 || r == 1 / 0 ? (n = Z(m), (n.length + p) % 2 == 0 && (n += "0"), r = Math.sqrt(+n), p = ee((p + 1) / 2) - (p < 0 || p % 2), r == 1 / 0 ? n = "5e" + p : (n = r.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + p), s = new T(n)) : s = new T(r + ""), s.c[0]) {
1661
+ for (p = s.e, r = p + y, r < 3 && (r = 0); ; )
1662
+ if (i = s, s = c.times(i.plus(a(o, i, y, 1))), Z(i.c).slice(0, r) === (n = Z(s.c)).slice(0, r))
1663
+ if (s.e < p && --r, n = n.slice(r - 3, r + 1), n == "9999" || !l && n == "4999") {
1664
+ if (!l && (X(i, i.e + A + 2, 0), i.times(i).eq(o))) {
1665
+ s = i;
1666
+ break;
1667
+ }
1668
+ y += 4, r += 4, l = 1;
1669
+ } else {
1670
+ (!+n || !+n.slice(1) && n.charAt(0) == "5") && (X(s, s.e + A + 2, 1), t = !s.times(s).eq(o));
1671
+ break;
1672
+ }
1673
+ }
1674
+ return X(s, s.e + A + 1, x, t);
1675
+ }, u.toExponential = function(t, n) {
1676
+ return t != null && (R(t, 0, V), t++), xe(this, t, n, 1);
1677
+ }, u.toFixed = function(t, n) {
1678
+ return t != null && (R(t, 0, V), t = t + this.e + 1), xe(this, t, n);
1679
+ }, u.toFormat = function(t, n, s) {
1680
+ var l, i = this;
1681
+ if (s == null)
1682
+ t != null && n && typeof n == "object" ? (s = n, n = null) : t && typeof t == "object" ? (s = t, t = n = null) : s = le;
1683
+ else if (typeof s != "object")
1684
+ throw Error(q + "Argument not an object: " + s);
1685
+ if (l = i.toFixed(t, n), i.c) {
1686
+ var o, m = l.split("."), r = +s.groupSize, p = +s.secondaryGroupSize, y = s.groupSeparator || "", c = m[0], h = m[1], w = i.s < 0, F = w ? c.slice(1) : c, v = F.length;
1687
+ if (p && (o = r, r = p, p = o, v -= o), r > 0 && v > 0) {
1688
+ for (o = v % r || r, c = F.substr(0, o); o < v; o += r) c += y + F.substr(o, r);
1689
+ p > 0 && (c += y + F.slice(o)), w && (c = "-" + c);
1690
+ }
1691
+ l = h ? c + (s.decimalSeparator || "") + ((p = +s.fractionGroupSize) ? h.replace(
1692
+ new RegExp("\\d{" + p + "}\\B", "g"),
1693
+ "$&" + (s.fractionGroupSeparator || "")
1694
+ ) : h) : c;
1695
+ }
1696
+ return (s.prefix || "") + l + (s.suffix || "");
1697
+ }, u.toFraction = function(t) {
1698
+ var n, s, l, i, o, m, r, p, y, c, h, w, F = this, v = F.c;
1699
+ if (t != null && (r = new T(t), !r.isInteger() && (r.c || r.s !== 1) || r.lt(b)))
1700
+ throw Error(q + "Argument " + (r.isInteger() ? "out of range: " : "not an integer: ") + ie(r));
1701
+ if (!v) return new T(F);
1702
+ for (n = new T(b), y = s = new T(b), l = p = new T(b), w = Z(v), o = n.e = w.length - F.e - 1, n.c[0] = De[(m = o % S) < 0 ? S + m : m], t = !t || r.comparedTo(n) > 0 ? o > 0 ? n : y : r, m = C, C = 1 / 0, r = new T(w), p.c[0] = 0; c = a(r, n, 0, 1), i = s.plus(c.times(l)), i.comparedTo(t) != 1; )
1703
+ s = l, l = i, y = p.plus(c.times(i = y)), p = i, n = r.minus(c.times(i = n)), r = i;
1704
+ return i = a(t.minus(s), l, 0, 1), p = p.plus(i.times(y)), s = s.plus(i.times(l)), p.s = y.s = F.s, o = o * 2, h = a(y, l, o, x).minus(F).abs().comparedTo(
1705
+ a(p, s, o, x).minus(F).abs()
1706
+ ) < 1 ? [y, l] : [p, s], C = m, h;
1707
+ }, u.toNumber = function() {
1708
+ return +ie(this);
1709
+ }, u.toPrecision = function(t, n) {
1710
+ return t != null && R(t, 1, V), xe(this, t, n, 2);
1711
+ }, u.toString = function(t) {
1712
+ var n, s = this, l = s.s, i = s.e;
1713
+ return i === null ? l ? (n = "Infinity", l < 0 && (n = "-" + n)) : n = "NaN" : (t == null ? n = i <= k || i >= E ? Ae(Z(s.c), i) : de(Z(s.c), i, "0") : t === 10 && ye ? (s = X(new T(s), A + i + 1, x), n = de(Z(s.c), s.e, "0")) : (R(t, 2, re.length, "Base"), n = d(de(Z(s.c), i, "0"), 10, t, l, !0)), l < 0 && s.c[0] && (n = "-" + n)), n;
1714
+ }, u.valueOf = u.toJSON = function() {
1715
+ return ie(this);
1716
+ }, u._isBigNumber = !0, u[Symbol.toStringTag] = "BigNumber", u[Symbol.for("nodejs.util.inspect.custom")] = u.valueOf, e != null && T.set(e), T;
1717
+ }
1718
+ function ee(e) {
1719
+ var a = e | 0;
1720
+ return e > 0 || e === a ? a : a - 1;
1721
+ }
1722
+ function Z(e) {
1723
+ for (var a, d, f = 1, u = e.length, b = e[0] + ""; f < u; ) {
1724
+ for (a = e[f++] + "", d = S - a.length; d--; a = "0" + a) ;
1725
+ b += a;
1726
+ }
1727
+ for (u = b.length; b.charCodeAt(--u) === 48; ) ;
1728
+ return b.slice(0, u + 1 || 1);
1729
+ }
1730
+ function ce(e, a) {
1731
+ var d, f, u = e.c, b = a.c, A = e.s, x = a.s, k = e.e, E = a.e;
1732
+ if (!A || !x) return null;
1733
+ if (d = u && !u[0], f = b && !b[0], d || f) return d ? f ? 0 : -x : A;
1734
+ if (A != x) return A;
1735
+ if (d = A < 0, f = k == E, !u || !b) return f ? 0 : !u ^ d ? 1 : -1;
1736
+ if (!f) return k > E ^ d ? 1 : -1;
1737
+ for (x = (k = u.length) < (E = b.length) ? k : E, A = 0; A < x; A++) if (u[A] != b[A]) return u[A] > b[A] ^ d ? 1 : -1;
1738
+ return k == E ? 0 : k > E ^ d ? 1 : -1;
1739
+ }
1740
+ function R(e, a, d, f) {
1741
+ if (e < a || e > d || e !== J(e))
1742
+ throw Error(q + (f || "Argument") + (typeof e == "number" ? e < a || e > d ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
1743
+ }
1744
+ function Te(e) {
1745
+ var a = e.c.length - 1;
1746
+ return ee(e.e / S) == a && e.c[a] % 2 != 0;
1747
+ }
1748
+ function Ae(e, a) {
1749
+ return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (a < 0 ? "e" : "e+") + a;
1750
+ }
1751
+ function de(e, a, d) {
1752
+ var f, u;
1753
+ if (a < 0) {
1754
+ for (u = d + "."; ++a; u += d) ;
1755
+ e = u + e;
1756
+ } else if (f = e.length, ++a > f) {
1757
+ for (u = d, a -= f; --a; u += d) ;
1758
+ e += u;
1759
+ } else a < f && (e = e.slice(0, a) + "." + e.slice(a));
1760
+ return e;
1761
+ }
1762
+ var g = qe();
1763
+ const Un = (e, a) => {
1764
+ if (!e || !a) return "";
1765
+ const d = g(10).pow(e || 0);
1766
+ return g(a).times(d).idiv(d).div(d).toFixed();
1767
+ }, Ln = (e, a) => !e || !a ? "" : Kt(a).times(g(10).pow(e)).decimalPlaces(0).toFixed(0), Ht = g(0);
1768
+ g(1);
1769
+ g(10);
1770
+ g(1e18);
1771
+ function Ue(e, a) {
1772
+ return e instanceof g ? e : e ? g(e, a) : Ht;
1773
+ }
1774
+ function ge(e, a) {
1775
+ return e == a || e.toLowerCase() == a.toLowerCase();
1776
+ }
1777
+ function Kt(e, a, d) {
1778
+ if (typeof e != "string") return Ue(e);
1779
+ const f = ".", u = e.replace(new RegExp(`[^${f}\\d-]+`, "g"), "");
1780
+ return Ue(u);
1781
+ }
1782
+ const Vn = (e) => !!Yt.find((a) => ge(a, e || ""));
1783
+ function qt(e) {
1784
+ return [ne.Years, ne.Months, ne.Weeks, ne.Days, ne.Hours, ne.Minutes].find((d) => d <= e) || ne.Minutes;
1785
+ }
1786
+ const ue = (e) => e ? e.value * e.unit : 0, Gt = (e) => !e || e === "NaN" ? "0" : g(e).decimalPlaces(0).toFixed(), Wn = (e) => Object.values(H).find((a) => a.id === e), jt = (e) => {
1787
+ if (!e) return;
1788
+ const a = e.map((b) => K(b)), d = Object.entries(Jt).filter(([b]) => a.includes(b)).flatMap(([, b]) => b), f = e.map((b) => b.exchangeAddress), u = new Set([...f, ...d].map((b) => b.toLowerCase()));
1789
+ return Array.from(u);
1790
+ }, zn = (e, a) => e.version === 1 ? (e.fillDelay || 0) * 1e3 + Ze(a) : (e.fillDelay || 0) * 1e3, Ge = (e) => typeof window > "u" ? null : new URLSearchParams(window.location.search).get(e), $n = (e) => dn().filter((a) => a.name === e).map((a) => a.chainId), Le = "https://order-sink-dev.orbs.network", Se = "https://order-sink.orbs.network", je = () => {
1791
+ const e = Ge(
1792
+ "env"
1793
+ /* ENV */
1794
+ );
1795
+ return e === "prod" ? Se : e === "dev" ? Le : process.env.NEXT_PUBLIC_MODE === "prod" ? Se : process.env.NEXT_PUBLIC_MODE === "dev" ? Le : Se;
1796
+ }, Hn = 100, Kn = 1, Ie = 300 * 1e3, fe = 365 * 24 * 60 * 60 * 1e3, Ve = 300 * 1e3, Xt = new Date(
1797
+ Ie
1798
+ ).getMinutes(), We = (e) => `https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`, Y = "https://hub.orbs.network/api/apikey/subgraphs/id", Qt = {
1799
+ [H.eth.id]: `${Y}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,
1800
+ [H.bsc.id]: `${Y}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,
1801
+ [H.poly.id]: `${Y}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,
1802
+ [H.arb.id]: `${Y}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,
1803
+ [H.base.id]: `${Y}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,
1804
+ [H.sei.id]: `${Y}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,
1805
+ [H.linea.id]: `${Y}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,
1806
+ [H.sonic.id]: `${Y}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,
1807
+ [H.ftm.id]: `${Y}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,
1808
+ [H.katana.id]: `${Y}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,
1809
+ [H.avax.id]: `${Y}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,
1810
+ [H.bera.id]: `${Y}/H7aY53mY1hgaSURwXj3ZVirwNSifExwjgEL5GNtTqmEj`,
1811
+ [H.flare.id]: We("flare"),
1812
+ [H.cronosZkEvm.id]: We("cronos-zkevm")
1813
+ }, Zt = "0x0000000000000000000000000000000000000000", Yt = [
1814
+ Zt,
1815
+ "0x0000000000000000000000000000000000001010",
1816
+ "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
1817
+ "0x000000000000000000000000000000000000dEaD",
1818
+ "0x000000000000000000000000000000000000800A",
1819
+ "0x000000000000000000000000000000000000800a"
1820
+ ], qn = "115792089237316195423570985008687907853269984665640564039457584007913129639935", K = (e) => `${e.name}_${e.chainId}`, Jt = {
1821
+ [K($.SushiArb)]: [
1822
+ "0x846F2B29ef314bF3D667981b4ffdADc5B858312a",
1823
+ "0x08c41f5D1C844061f6D952E25827eeAA576c6536"
1824
+ ],
1825
+ [K($.SushiBase)]: [
1826
+ "0x846F2B29ef314bF3D667981b4ffdADc5B858312a",
1827
+ "0x08c41f5D1C844061f6D952E25827eeAA576c6536"
1828
+ ],
1829
+ [K($.SushiEth)]: [
1830
+ "0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA",
1831
+ "0x08c41f5D1C844061f6D952E25827eeAA576c6536"
1832
+ ],
1833
+ [K($.PancakeSwap)]: [
1834
+ "0xb2BAFe188faD927240038cC4FfF2d771d8A58905",
1835
+ "0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"
1836
+ ],
1837
+ [K($.PancakeSwapArbitrum)]: [
1838
+ "0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F",
1839
+ "0x807488ADAD033e95C438F998277bE654152594dc"
1840
+ ],
1841
+ [K($.PancakeSwapBase)]: [
1842
+ "0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c",
1843
+ "0x3A9df3eE209b802D0337383f5abCe3204d623588"
1844
+ ],
1845
+ [K($.PancakeSwapLinea)]: [
1846
+ "0x3A9df3eE209b802D0337383f5abCe3204d623588"
1847
+ ],
1848
+ [K($.QuickSwap)]: [
1849
+ "0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"
1850
+ ],
1851
+ [K($.Thena)]: [
1852
+ "0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"
1853
+ ],
1854
+ [K($.Lynex)]: [
1855
+ "0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"
1856
+ ],
1857
+ [K($.DragonSwap)]: [
1858
+ "0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"
1859
+ ],
1860
+ [K($.SpookySwapSonic)]: [
1861
+ "0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"
1862
+ ],
1863
+ [K($.SpookySwap)]: [
1864
+ "0x3924d62219483015f982b160d48c0fa5Fd436Cba"
1865
+ ],
1866
+ [K($.SwapX)]: [
1867
+ "0xE5012eBDe5e26EE3Ea41992154731a03023CF274"
1868
+ ]
1869
+ }, ze = {
1870
+ unit: ne.Minutes,
1871
+ value: Xt
1872
+ }, Gn = 0.25, jn = "100", en = "RePermitWitnessTransferFrom", tn = {
1873
+ RePermitWitnessTransferFrom: [
1874
+ {
1875
+ name: "permitted",
1876
+ type: "TokenPermissions"
1877
+ },
1878
+ {
1879
+ name: "spender",
1880
+ type: "address"
1881
+ },
1882
+ {
1883
+ name: "nonce",
1884
+ type: "uint256"
1885
+ },
1886
+ {
1887
+ name: "deadline",
1888
+ type: "uint256"
1889
+ },
1890
+ {
1891
+ name: "witness",
1892
+ type: "Order"
1893
+ }
1894
+ ],
1895
+ Exchange: [
1896
+ {
1897
+ name: "adapter",
1898
+ type: "address"
1899
+ },
1900
+ {
1901
+ name: "ref",
1902
+ type: "address"
1903
+ },
1904
+ {
1905
+ name: "share",
1906
+ type: "uint32"
1907
+ },
1908
+ {
1909
+ name: "data",
1910
+ type: "bytes"
1911
+ }
1912
+ ],
1913
+ Input: [
1914
+ {
1915
+ name: "token",
1916
+ type: "address"
1917
+ },
1918
+ {
1919
+ name: "amount",
1920
+ type: "uint256"
1921
+ },
1922
+ {
1923
+ name: "maxAmount",
1924
+ type: "uint256"
1925
+ }
1926
+ ],
1927
+ Order: [
1928
+ {
1929
+ name: "reactor",
1930
+ type: "address"
1931
+ },
1932
+ {
1933
+ name: "executor",
1934
+ type: "address"
1935
+ },
1936
+ {
1937
+ name: "exchange",
1938
+ type: "Exchange"
1939
+ },
1940
+ {
1941
+ name: "swapper",
1942
+ type: "address"
1943
+ },
1944
+ {
1945
+ name: "nonce",
1946
+ type: "uint256"
1947
+ },
1948
+ {
1949
+ name: "deadline",
1950
+ type: "uint256"
1951
+ },
1952
+ {
1953
+ name: "chainid",
1954
+ type: "uint256"
1955
+ },
1956
+ {
1957
+ name: "exclusivity",
1958
+ type: "uint32"
1959
+ },
1960
+ {
1961
+ name: "epoch",
1962
+ type: "uint32"
1963
+ },
1964
+ {
1965
+ name: "slippage",
1966
+ type: "uint32"
1967
+ },
1968
+ {
1969
+ name: "freshness",
1970
+ type: "uint32"
1971
+ },
1972
+ {
1973
+ name: "input",
1974
+ type: "Input"
1975
+ },
1976
+ {
1977
+ name: "output",
1978
+ type: "Output"
1979
+ }
1980
+ ],
1981
+ Output: [
1982
+ { name: "token", type: "address" },
1983
+ { name: "limit", type: "uint256" },
1984
+ { name: "stop", type: "uint256" },
1985
+ { name: "recipient", type: "address" }
1986
+ ],
1987
+ TokenPermissions: [
1988
+ {
1989
+ name: "token",
1990
+ type: "address"
1991
+ },
1992
+ {
1993
+ name: "amount",
1994
+ type: "uint256"
1995
+ }
1996
+ ]
1997
+ }, Xn = "https://www.orbs.com/dtwap-and-dlimit-faq/", Qn = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP", Zn = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg", Yn = "https://www.orbs.com/assets/img/common/logo.svg", Jn = "https://www.orbs.com/", ea = "https://www.orbs.com/dtwap-dlimit-disclaimer";
1998
+ var Xe = /* @__PURE__ */ ((e) => (e.FRESHNESS = "freshness", e.MIN_CHUNK_SIZE_USD = "minChunkSizeUsd", e.ENV = "env", e))(Xe || {});
1999
+ const ta = "-5", na = "10", aa = "-10", sa = "5";
2000
+ function nn(e) {
2001
+ throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
2002
+ }
2003
+ const an = {
2004
+ 14: { dex: { spark: { type: "default:spark", adapter: "0xB18c633B6584A33E45a8840a759f56dF17117b1D", fee: "0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b" } } },
2005
+ 56: { dex: { thena: { type: "default:odos-v2", adapter: "0xB75218ba5A99bF57Fd02556B70F05A4A0f1Dbe67", fee: "0x15eBc8b5b3877512FFF23650188694A9a8891FAc" }, pancake: { type: "p2:pancakeswap-v2", adapter: "0x654272F7e6e6E912D38650f783eFd44452fD6ee5", fee: "0x37A957f10F458e0d7fDECBE2917971b57F15c927" }, newera: { type: "default:odos-v2", adapter: "0x845f459271D800f6Ab32D78400b8Aa18414E80b0", fee: "0x4E7454909eB6D539111D56b50d68897E933D2d11" } } },
2006
+ 137: { dex: { quick: { type: "paraswap:paraswap-v5", adapter: "0x023fD6848234f2655818705237F77F02215FEfe5", fee: "0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f" }, teafi: { type: "paraswap:paraswap-v5", adapter: "0xe95db7a60164B112C64cE67bA8587b1d4a0E0D29", fee: "0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50" } } },
2007
+ 143: { dex: { yowie: { type: "default:openocean-v2", adapter: "0x18bc9533c3539073B9A9acF12b0AbF7cB73e0F1f", fee: "0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef" } } },
2008
+ 146: { dex: { spooky: { type: "default:magpie-v3", adapter: "0xdCee7FDdB932104329d528144Cd17A408722B7e2", fee: "0x840Df4684B35BC68BcdA3F6707A3c82A0D662f8b" }, swapx: { type: "default:openocean-v2", adapter: "0xecc733D6F6f2DEa341832D650E30822118884FEb", fee: "0x6E03f7BC0f141894612AA017796096399623895F" }, shadow: { type: "default:magpie-v3", adapter: "0x5f3E5F6ACCfc65243A01Da3E93b5A700285592C3", fee: "0xb9e3751fAF3187E1bC468E56a707a8A91754460e" } } },
2009
+ 1329: { dex: { dragon: { type: "default:dragon", adapter: "0x02d9d5882129241b67ec21Ebc2C86e1BE9BC9890", fee: "0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334" }, nami: { type: "default:openocean-v2", adapter: "0x2D4A1237A98f8cb03C3C85960e859aA44036a306", fee: "0xeB58450e23632003f013568703F54446070E2E80" } } },
2010
+ 8453: { dex: { quick: { type: "default:kyber-v2", adapter: "0xc73F03c929A123Ee2f3A98EC18BB240f03980AE5", fee: "0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f" } } },
2011
+ 42161: { dex: { arbidex: { type: "default:odos-v2", adapter: "0xa734b32151108139e48dCA06eE721538d90A9Ef6", fee: "0xa0c11852f8A44e32F9EC10AD25986A53842f72Ca" }, ramses: { type: "paraswap:paraswap-v5", adapter: "0x023fD6848234f2655818705237F77F02215FEfe5", fee: "0xB5BaCB60ECDa0bEF809B2A26eC9B4B926835D7af" }, omni: { type: "paraswap:paraswap-v5", adapter: "0xa1baE146161223cd9dCa7137F68eb385934130BE", fee: "0xba5291526c30B097E9F1Fd1Be301E2ab6E0782aa" }, chronos: { type: "default:odos-v2", adapter: "0x4Ff90F32aceD08b3e3257B018EA495Fd1Bfe4455", fee: "0x5729af83240EFecAa18eafaAE82961c2DD045Dbe" } } },
2012
+ 43114: { dex: { blackhole: { type: "default:kyber-v2", adapter: "0x426ec4bc0d58B80959CDE77576a1942dd40592Fa", fee: "0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928" } } },
2013
+ 59144: { dex: { lynex: { type: "default:openocean", adapter: "0x4FF6A97A67fe395212f168f011D71fE79E4396f2", fee: "0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423" } } },
2014
+ 80094: { dex: { kodiak: { type: "default:kodiak", adapter: "0xBbaa527Aac00b1Ee9A3909D4D8c4447630E29B1F", fee: "0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4" } } },
2015
+ "*": { wm: "0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000", repermit: "0x00002a9C4D9497df5Bd31768eC5d30eEf5405000", cosigner: "0x0007ec53404c423C935e830ec21903e184690000", reactor: "0x0006a959430e8fBB858D81B2D1140B0ae5c26001", executor: "0x000eBA869d76C618ddc4A6D685A0820A620Ce002", refinery: "0x000E474c0D7084EAA35A501035E73269f4b009A5", salt: { wm: "0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152", repermit: "0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7", cosigner: "0x37576f2ac1d2a602f00777611edf6f0cbc27611b0980b29bc7856fa79b2b8073", reactor: "0x034169222370f2fd587ef8998082d762cceef58a272330215f5110ec0d76d400", executor: "0xea139bc421fa5e272bed3db74233b2e02077e0aacf8b855f87961e98f2fb467f", refinery: "0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec" } }
2016
+ };
2017
+ var Be, $e;
2018
+ function sn() {
2019
+ if ($e) return Be;
2020
+ $e = 1;
2021
+ const e = an, a = (u) => nn(`./out/${u}.sol/${u}.json`).abi, d = () => ({
2022
+ wm: a("WM"),
2023
+ repermit: a("RePermit"),
2024
+ reactor: a("OrderReactor"),
2025
+ executor: a("Executor"),
2026
+ refinery: a("Refinery"),
2027
+ adapter: a("DefaultDexAdapter")
2028
+ });
2029
+ function f(u, b) {
2030
+ if (!u || !(b != null && b.trim())) return;
2031
+ const { dex: A, ...x } = e["*"] ?? {}, k = e[u];
2032
+ if (!k) return;
2033
+ const { dex: E, ...O } = k, C = E == null ? void 0 : E[b];
2034
+ if (C)
2035
+ return { ...x, ...O, ...C };
2036
+ }
2037
+ return Be = { config: f, abis: d, raw: e }, Be;
2038
+ }
2039
+ var Qe = sn();
2040
+ const ra = (e, a, d) => {
2041
+ if (!e || !a || !d) return;
2042
+ const f = g(e).times(a), u = g(10).pow(d);
2043
+ return f.div(u).toFixed(0);
2044
+ }, ia = (e, a, d, f) => {
2045
+ if (d || !f || !e || !a)
2046
+ return g(0).toString();
2047
+ const u = g(e).times(g(a)), b = g(10).pow(f), A = u.div(b);
2048
+ return g.max(1, A).integerValue(g.ROUND_FLOOR).toFixed(0);
2049
+ }, da = (e, a, d, f) => {
2050
+ if (e === G.TWAP || e === G.LIMIT)
2051
+ return "0";
2052
+ if (!f || !a || !d) return;
2053
+ const u = g(a).times(g(d)), b = g(10).pow(f), A = u.div(b);
2054
+ return g.max(1, A).integerValue(g.ROUND_FLOOR).toFixed(0) || "0";
2055
+ }, pa = (e, a, d, f) => {
2056
+ const u = ue(d) * 2 * a, b = qt(u);
2057
+ return f || (e === G.LIMIT ? { unit: ne.Days, value: 7 } : e === G.STOP_LOSS || e === G.TAKE_PROFIT ? { unit: ne.Days, value: 1 } : { unit: b, value: Number(g(u / b).toFixed(2)) });
2058
+ }, oa = (e, a, d) => a !== G.TWAP ? 1 : d !== void 0 ? d : e, ua = (e, a, d, f) => {
2059
+ if (!a || !d || !f) return 1;
2060
+ const b = g(d).times(a).div(f).integerValue(g.ROUND_FLOOR).toNumber(), A = Math.floor(
2061
+ fe / 2 / ue(e)
2062
+ );
2063
+ return Math.max(1, Math.min(b, A));
2064
+ }, ca = (e) => Ze(e) / 1e3 / 60, la = (e, a) => e + ue(a) + 6e4, Ze = (e) => e.bidDelaySeconds * 1e3 * 2, ya = (e, a) => !e || !a ? "0" : g(e).div(a).integerValue(g.ROUND_FLOOR).toFixed(0), ma = (e, a) => ({
2065
+ isError: !(e.unit === ze.unit && e.value === ze.value) && ue(e) * a > fe,
2066
+ value: Math.floor(fe / a)
2067
+ }), fa = (e = "", a = "", d) => {
2068
+ if (d === G.STOP_LOSS)
2069
+ return {
2070
+ isError: g(a || 0).gte(g(e || 0)),
2071
+ value: e
2072
+ };
2073
+ }, ha = (e = "", a = "", d) => {
2074
+ if (d === G.TAKE_PROFIT)
2075
+ return {
2076
+ isError: g(a || 0).lte(g(e || 0)),
2077
+ value: e
2078
+ };
2079
+ }, ba = (e = "", a = "", d = !1, f) => {
2080
+ if (!d && f === G.STOP_LOSS)
2081
+ return {
2082
+ isError: g(a || 0).gte(g(e || 0)),
2083
+ value: e
2084
+ };
2085
+ }, Ta = (e = "", a = "", d = !1, f) => {
2086
+ if (!d && f === G.TAKE_PROFIT)
2087
+ return {
2088
+ isError: g(a || 0).gte(g(e || 0)),
2089
+ value: e
2090
+ };
2091
+ }, Aa = (e, a) => e === G.STOP_LOSS || e === G.TAKE_PROFIT ? {
2092
+ isError: ue(a) > 5184e6,
2093
+ value: 5184e6
2094
+ } : {
2095
+ isError: ue(a) > fe,
2096
+ // 365 days
2097
+ value: fe
2098
+ }, ga = (e) => ({
2099
+ isError: ue(e) < Ve,
2100
+ value: Ve
2101
+ }), xa = (e) => ({
2102
+ isError: ue(e) < Ie,
2103
+ value: Ie
2104
+ }), Ea = (e, a, d) => ({
2105
+ isError: g(a || 0).multipliedBy(e || 0).isLessThan(d),
2106
+ value: d
2107
+ }), wa = (e, a, d) => ({
2108
+ isError: d === G.TWAP && g(e).isGreaterThan(a),
2109
+ value: a
2110
+ }), rn = (e, a) => {
2111
+ var d;
2112
+ try {
2113
+ if (!e || !a) throw new Error("Invalid chainId or _dex");
2114
+ const f = (d = Object.entries($).find(
2115
+ ([x, k]) => k.chainId === e && x.toLowerCase().indexOf(a.toLowerCase()) >= 0
2116
+ )) == null ? void 0 : d[1], { abi: u, ...b } = Qe.config(e, a);
2117
+ return {
2118
+ ...b,
2119
+ partner: a,
2120
+ twapConfig: f
2121
+ };
2122
+ } catch {
2123
+ return;
2124
+ }
2125
+ }, dn = () => {
2126
+ const e = Qe.raw;
2127
+ return Object.entries(e).filter(([a]) => a !== "*").flatMap(([a, d]) => {
2128
+ const f = d == null ? void 0 : d.dex;
2129
+ return !f || typeof f != "object" ? [] : Object.entries(f).map(([u]) => ({
2130
+ chainId: Number(a),
2131
+ name: u,
2132
+ config: rn(Number(a), u)
2133
+ }));
2134
+ }).sort((a, d) => a.name.localeCompare(d.name));
2135
+ }, Ca = ({
2136
+ chainId: e,
2137
+ srcToken: a,
2138
+ dstToken: d,
2139
+ srcAmount: f,
2140
+ deadlineMillis: u,
2141
+ fillDelayMillis: b,
2142
+ slippage: A,
2143
+ account: x,
2144
+ srcAmountPerTrade: k,
2145
+ dstMinAmountPerTrade: E,
2146
+ triggerAmountPerTrade: O,
2147
+ config: C
2148
+ }) => {
2149
+ const D = Date.now().toString(), M = parseInt((b / 1e3).toFixed(0)), _ = Gt(u / 1e3), le = Ge(Xe.FRESHNESS), re = le ? parseInt(le) : 60, ye = {
2150
+ permitted: {
2151
+ token: a,
2152
+ amount: f
2153
+ },
2154
+ spender: C.reactor,
2155
+ nonce: D,
2156
+ deadline: _,
2157
+ witness: {
2158
+ reactor: C.reactor,
2159
+ executor: C.executor,
2160
+ exchange: {
2161
+ adapter: C.adapter,
2162
+ ref: C.fee,
2163
+ share: 0,
2164
+ data: "0x"
2165
+ },
2166
+ swapper: x,
2167
+ nonce: D,
2168
+ deadline: _,
2169
+ chainid: e,
2170
+ exclusivity: 0,
2171
+ epoch: M,
2172
+ slippage: A,
2173
+ freshness: re,
2174
+ input: {
2175
+ token: a,
2176
+ amount: k,
2177
+ maxAmount: f
2178
+ },
2179
+ output: {
2180
+ token: d,
2181
+ limit: E || "0",
2182
+ stop: !O || g(O || 0).isZero() ? "0" : O,
2183
+ recipient: x
2184
+ }
2185
+ }
2186
+ };
2187
+ return {
2188
+ domain: {
2189
+ name: "RePermit",
2190
+ version: "1",
2191
+ chainId: e,
2192
+ verifyingContract: C.repermit
2193
+ },
2194
+ order: ye,
2195
+ types: tn,
2196
+ primaryType: en
2197
+ };
2198
+ }, pn = "0.0.7", on = {
2199
+ version: pn
2200
+ }, un = 0.7, cn = `https://bi.orbs.network/putes/twap-ui-${un}`, Ye = on.version;
2201
+ let _e = "unknown";
2202
+ function Fa(e) {
2203
+ _e = e;
2204
+ }
2205
+ function Oe() {
2206
+ const e = Math.random().toString(36).substring(2, 16), a = Math.random().toString(36).substring(2, 16), d = Date.now().toString(36);
2207
+ return `id_${e + a + d}`;
2208
+ }
2209
+ const ln = (e, a, d) => {
2210
+ var f, u, b, A, x, k, E, O, C;
2211
+ return {
2212
+ spotVersion: Ye,
2213
+ partner: e.partner,
2214
+ adapter: e.adapter,
2215
+ cosigner: e.cosigner,
2216
+ executor: e.executor,
2217
+ fee: e.fee,
2218
+ reactor: e.reactor,
2219
+ refinery: e.refinery,
2220
+ repermit: e.repermit,
2221
+ router: e.router,
2222
+ type: e.type,
2223
+ wm: e.wm,
2224
+ chainName: ((f = e.twapConfig) == null ? void 0 : f.chainName) || "",
2225
+ chainId: d || 0,
2226
+ twapVersion: ((u = e.twapConfig) == null ? void 0 : u.twapVersion) || 0,
2227
+ twapAddress: ((b = e.twapConfig) == null ? void 0 : b.twapAddress) || "",
2228
+ lensAddress: ((A = e.twapConfig) == null ? void 0 : A.lensAddress) || "",
2229
+ bidDelaySeconds: ((x = e.twapConfig) == null ? void 0 : x.bidDelaySeconds) || 0,
2230
+ minChunkSizeUsd: a,
2231
+ name: ((k = e.twapConfig) == null ? void 0 : k.name) || "",
2232
+ exchangeAddress: ((E = e.twapConfig) == null ? void 0 : E.exchangeAddress) || "",
2233
+ exchangeType: ((O = e.twapConfig) == null ? void 0 : O.exchangeType) || "",
2234
+ pathfinderKey: ((C = e.twapConfig) == null ? void 0 : C.pathfinderKey) || ""
2235
+ };
2236
+ }, He = async (e) => {
2237
+ try {
2238
+ await fetch(cn, {
2239
+ method: "POST",
2240
+ headers: {
2241
+ Accept: "application/json",
2242
+ "Content-Type": "application/json"
2243
+ },
2244
+ body: JSON.stringify(e)
2245
+ }).then();
2246
+ } catch (a) {
2247
+ console.error("Failed to send BI", a);
2248
+ }
2249
+ };
2250
+ class yn {
2251
+ constructor() {
2252
+ be(this, "timeout");
2253
+ be(this, "config");
2254
+ be(this, "data", {
2255
+ _id: Oe()
2256
+ });
2257
+ }
2258
+ async updateAndSend(a = {}, d = !1, f) {
2259
+ try {
2260
+ this.data = {
2261
+ ...this.data,
2262
+ ...a
2263
+ }, d ? (await He(this.data), f == null || f()) : (clearTimeout(this.timeout), this.timeout = setTimeout(() => {
2264
+ He(this.data), f == null || f();
2265
+ }, 1e3));
2266
+ } catch (u) {
2267
+ console.error("Failed to update and send BI", u);
2268
+ }
2269
+ }
2270
+ onCancelOrderRequest(a, d) {
2271
+ this.updateAndSend({
2272
+ cancelOrderIdsV1: d === 1 ? a : void 0,
2273
+ cancelOrderIdsV2: d === 2 ? a : void 0,
2274
+ action: "cancel order",
2275
+ cancelOrderSuccess: !1,
2276
+ cancelOrderTxHash: void 0,
2277
+ actionError: void 0
2278
+ });
2279
+ }
2280
+ onCancelOrderSuccess(a) {
2281
+ this.updateAndSend({
2282
+ cancelOrderTxHash: a,
2283
+ cancelOrderSuccess: !0
2284
+ });
2285
+ }
2286
+ onCancelOrderError(a) {
2287
+ this.onTxError(a);
2288
+ }
2289
+ onWrapSuccess(a) {
2290
+ this.updateAndSend({
2291
+ wrapTxHash: a
2292
+ });
2293
+ }
2294
+ onWrapRequest() {
2295
+ this.updateAndSend({
2296
+ action: "wrap"
2297
+ });
2298
+ }
2299
+ onWrapError(a) {
2300
+ this.onTxError(a);
2301
+ }
2302
+ onApproveRequest() {
2303
+ this.updateAndSend({
2304
+ action: "approve"
2305
+ });
2306
+ }
2307
+ onApproveSuccess(a) {
2308
+ this.updateAndSend({
2309
+ approvalTxHash: a
2310
+ });
2311
+ }
2312
+ onApproveError(a) {
2313
+ this.onTxError(a);
2314
+ }
2315
+ onTxError(a) {
2316
+ var f;
2317
+ const d = ((f = a == null ? void 0 : a.message) == null ? void 0 : f.toLowerCase()) || (a == null ? void 0 : a.toLowerCase());
2318
+ this.updateAndSend({ actionError: d });
2319
+ }
2320
+ onRequestOrder({
2321
+ account: a,
2322
+ chainId: d,
2323
+ module: f,
2324
+ srcToken: u,
2325
+ dstToken: b,
2326
+ fromTokenAmount: A,
2327
+ srcChunkAmount: x,
2328
+ minDstAmountOutPerTrade: k = "",
2329
+ triggerPricePerTrade: E = "",
2330
+ deadline: O,
2331
+ fillDelay: C,
2332
+ slippage: D,
2333
+ isMarketOrder: M
2334
+ }) {
2335
+ const _ = g(A).div(x).integerValue(g.ROUND_FLOOR).toNumber();
2336
+ this.updateAndSend({
2337
+ toTokenAddress: b.address,
2338
+ toTokenSymbol: b.symbol,
2339
+ fromTokenAddress: u.address,
2340
+ fromTokenSymbol: u.symbol,
2341
+ fromTokenAmount: A,
2342
+ chunksAmount: _,
2343
+ srcChunkAmount: x,
2344
+ minDstAmountOutPerTrade: k,
2345
+ triggerPricePerTrade: E,
2346
+ deadline: O,
2347
+ fillDelay: C,
2348
+ slippage: D,
2349
+ chainId: d,
2350
+ walletAddress: a,
2351
+ module: f,
2352
+ orderType: M ? "market" : "limit",
2353
+ actionError: void 0
2354
+ });
2355
+ }
2356
+ onSignOrderRequest(a) {
2357
+ this.updateAndSend({
2358
+ action: "sign order",
2359
+ order: a
2360
+ });
2361
+ }
2362
+ onSignOrderError(a) {
2363
+ this.onTxError(a);
2364
+ }
2365
+ onSignOrderSuccess(a) {
2366
+ this.updateAndSend({
2367
+ action: "sign order",
2368
+ signature: a
2369
+ });
2370
+ }
2371
+ init(a, d, f) {
2372
+ var u;
2373
+ this.config = a, f !== ((u = this.data) == null ? void 0 : u.chainId) && (this.data = {
2374
+ _id: Oe(),
2375
+ action: "module-import",
2376
+ uiVersion: _e,
2377
+ ...ln(a, d, f),
2378
+ origin: window.location.origin
2379
+ }, this.updateAndSend(this.data));
2380
+ }
2381
+ onCreateOrderError(a) {
2382
+ this.onTxError(a);
2383
+ }
2384
+ onCreateOrderRequest() {
2385
+ this.updateAndSend({
2386
+ action: "create order"
2387
+ });
2388
+ }
2389
+ async onCreateOrderSuccess(a) {
2390
+ this.updateAndSend(
2391
+ {
2392
+ orderHash: a,
2393
+ orderSuccess: !0
2394
+ },
2395
+ void 0,
2396
+ () => {
2397
+ this.data = {
2398
+ _id: Oe(),
2399
+ action: "reset",
2400
+ uiVersion: _e,
2401
+ origin: this.data.origin,
2402
+ spotVersion: Ye,
2403
+ partner: this.data.partner,
2404
+ adapter: this.data.adapter,
2405
+ cosigner: this.data.cosigner,
2406
+ executor: this.data.executor,
2407
+ fee: this.data.fee,
2408
+ reactor: this.data.reactor,
2409
+ refinery: this.data.refinery,
2410
+ repermit: this.data.repermit,
2411
+ router: this.data.router,
2412
+ type: this.data.type,
2413
+ wm: this.data.wm,
2414
+ chainName: this.data.chainName || "",
2415
+ chainId: this.data.chainId || 0,
2416
+ twapVersion: this.data.twapVersion || 0,
2417
+ twapAddress: this.data.twapAddress || "",
2418
+ lensAddress: this.data.lensAddress || "",
2419
+ bidDelaySeconds: this.data.bidDelaySeconds || 0,
2420
+ minChunkSizeUsd: this.data.minChunkSizeUsd || 0,
2421
+ name: this.data.name || "",
2422
+ exchangeAddress: this.data.exchangeAddress || "",
2423
+ exchangeType: this.data.exchangeType || "",
2424
+ pathfinderKey: this.data.pathfinderKey || ""
2425
+ };
2426
+ }
2427
+ );
2428
+ }
2429
+ onLoad() {
2430
+ this.updateAndSend({
2431
+ action: "module-import",
2432
+ origin: window.location.origin
2433
+ });
2434
+ }
2435
+ }
2436
+ const ve = new yn(), mn = (e) => {
2437
+ var u;
2438
+ const a = g(e.order.witness.output.limit || 0).gt(1), d = g(e.order.witness.output.stop || 0).gt(0), f = ((u = e.metadata.chunks) == null ? void 0 : u.length) || g(e.order.witness.input.maxAmount).div(g(e.order.witness.input.amount)).toNumber();
2439
+ return d && a ? j.TRIGGER_PRICE_LIMIT : d ? j.TRIGGER_PRICE_MARKET : !a && f <= 1 ? j.TWAP_MARKET : f >= 1 && a ? j.TWAP_LIMIT : a ? j.LIMIT : j.TWAP_MARKET;
2440
+ }, fn = (e) => {
2441
+ var u;
2442
+ const a = ((u = e.metadata.chunks) == null ? void 0 : u.filter((b) => b.status === "success").length) || 0, d = e.metadata.expectedChunks || 0, f = g(a).dividedBy(d).toNumber();
2443
+ return f >= 0.99 ? 100 : f <= 0 ? 0 : Number((f * 100).toFixed(2));
2444
+ }, hn = ["pending", "eligible"], bn = (e, a) => e.metadata.status === "completed" || a >= 99 ? se.Completed : hn.includes(e.metadata.status) ? se.Open : e.metadata.description.toLowerCase() === "cancelled by contract" ? se.Canceled : se.Expired, Je = (e) => {
2445
+ var u, b;
2446
+ const a = fn(e), d = Number(e.order.witness.output.limit) === 1 ? "" : e.order.witness.output.limit, f = e.metadata.expectedChunks || 1;
2447
+ return {
2448
+ id: e.hash,
2449
+ hash: e.hash,
2450
+ version: 2,
2451
+ type: mn(e),
2452
+ maker: e.order.witness.swapper,
2453
+ progress: a,
2454
+ srcAmountFilled: ((u = e.metadata.chunks) == null ? void 0 : u.reduce((A, x) => A.plus(x.inAmount), new g(0)).toString()) || "",
2455
+ dstAmountFilled: ((b = e.metadata.chunks) == null ? void 0 : b.reduce((A, x) => A.plus(x.outAmount), new g(0)).toString()) || "",
2456
+ dollarValueInFilled: "",
2457
+ dollarValueOutFilled: "",
2458
+ feesFilled: "",
2459
+ fills: [],
2460
+ srcTokenAddress: e.order.witness.input.token,
2461
+ dstTokenAddress: e.order.witness.output.token,
2462
+ orderDollarValueIn: "",
2463
+ fillDelay: e.order.witness.epoch,
2464
+ deadline: Number(e.order.deadline) * 1e3,
2465
+ createdAt: new Date(e.timestamp).getTime(),
2466
+ srcAmount: e.order.witness.input.maxAmount,
2467
+ dstMinAmountPerTrade: d,
2468
+ triggerPricePerTrade: g(e.order.witness.output.stop || 0).isZero() ? "" : e.order.witness.output.stop,
2469
+ dstMinAmountTotal: g(d).multipliedBy(f).toString(),
2470
+ srcAmountPerTrade: e.order.witness.input.amount,
2471
+ txHash: "",
2472
+ totalTradesAmount: f,
2473
+ isMarketPrice: !1,
2474
+ chainId: e.order.witness.chainid,
2475
+ filledOrderTimestamp: 0,
2476
+ status: bn(e, a),
2477
+ rawOrder: e
2478
+ };
2479
+ }, Tn = async ({ chainId: e, signal: a, account: d }) => d ? (await (await fetch(`${je()}/orders?swapper=${d}&chainId=${e}`, {
2480
+ signal: a
2481
+ })).json()).orders.map(Je) : [], ka = async (e, a) => {
2482
+ try {
2483
+ const d = {
2484
+ signature: a,
2485
+ order: e,
2486
+ status: "pending"
2487
+ };
2488
+ console.log("body", d), ve.onCreateOrderRequest();
2489
+ const u = await (await fetch(`${je()}/orders/new`, {
2490
+ method: "POST",
2491
+ body: JSON.stringify(d)
2492
+ })).json();
2493
+ if (!u.success)
2494
+ throw new Error(`error:${u.message}, code:${u.code}`);
2495
+ const b = Je(u.signedOrder);
2496
+ return ve.onCreateOrderSuccess(b.id), b;
2497
+ } catch (d) {
2498
+ throw ve.onCreateOrderError(d), console.error(d), d;
2499
+ }
2500
+ }, pe = (e, a) => e && e.length ? e.map(a || ((d) => `${d}`)) : void 0, An = (e) => {
2501
+ if (e)
2502
+ return Qt[e];
2503
+ }, Me = async ({
2504
+ chainId: e,
2505
+ buildQuery: a,
2506
+ extractResults: d,
2507
+ signal: f,
2508
+ retries: u = 1,
2509
+ limit: b = 1e3,
2510
+ page: A
2511
+ }) => {
2512
+ const x = An(e);
2513
+ if (!x) throw new kn();
2514
+ const k = async (C) => {
2515
+ let D = 0;
2516
+ for (; D <= u; )
2517
+ try {
2518
+ const M = await fetch(x, {
2519
+ method: "POST",
2520
+ body: JSON.stringify({ query: C }),
2521
+ signal: f,
2522
+ headers: { "Content-Type": "application/json" }
2523
+ });
2524
+ if (!M.ok) throw new Error(`HTTP error: ${M.status}`);
2525
+ const _ = await M.json();
2526
+ if (_.errors)
2527
+ throw new Error(_.errors[0].message);
2528
+ return d(_);
2529
+ } catch (M) {
2530
+ if (D === u) throw M;
2531
+ await new Promise((_) => setTimeout(_, 500 * 2 ** D)), D++;
2532
+ }
2533
+ return [];
2534
+ };
2535
+ let E = 0;
2536
+ const O = [];
2537
+ if (A !== void 0) {
2538
+ const C = a(A, b);
2539
+ try {
2540
+ return await k(C);
2541
+ } catch {
2542
+ console.warn(`Page ${A} failed, retrying one final time...`);
2543
+ try {
2544
+ return await k(C);
2545
+ } catch {
2546
+ return [];
2547
+ }
2548
+ }
2549
+ }
2550
+ for (; ; ) {
2551
+ const C = a(E, b);
2552
+ let D;
2553
+ try {
2554
+ D = await k(C);
2555
+ } catch {
2556
+ console.warn(`Page ${E} failed, retrying one final time...`);
2557
+ try {
2558
+ D = await k(C);
2559
+ } catch {
2560
+ return O;
2561
+ }
2562
+ }
2563
+ if (O.push(...D), D.length < b) break;
2564
+ E++;
2565
+ }
2566
+ return O;
2567
+ }, et = (e) => {
2568
+ const a = {
2569
+ dstAmountOut: g(0),
2570
+ srcAmountIn: g(0),
2571
+ dollarValueIn: g(0),
2572
+ dollarValueOut: g(0),
2573
+ dexFee: g(0)
2574
+ }, d = e.reduce(
2575
+ (f, u) => ({
2576
+ dstAmountOut: f.dstAmountOut.plus(g(u.dstAmountOut || 0)),
2577
+ srcAmountIn: f.srcAmountIn.plus(g(u.srcAmountIn || 0)),
2578
+ dollarValueIn: f.dollarValueIn.plus(g(u.dollarValueIn || 0)),
2579
+ dollarValueOut: f.dollarValueOut.plus(g(u.dollarValueOut || 0)),
2580
+ dexFee: f.dexFee.plus(g(u.dstFee || 0))
2581
+ }),
2582
+ a
2583
+ );
2584
+ return {
2585
+ filledDstAmount: d.dstAmountOut.toFixed(),
2586
+ filledSrcAmount: d.srcAmountIn.toFixed(),
2587
+ filledDollarValueIn: d.dollarValueIn.toFixed(),
2588
+ filledDollarValueOut: d.dollarValueOut.toFixed(),
2589
+ dexFee: d.dexFee.toFixed()
2590
+ };
2591
+ }, Ke = (e, a) => {
2592
+ const d = g(e || 0).gt(1);
2593
+ return !d && a === 1 ? j.TWAP_MARKET : a > 1 && d ? j.TWAP_LIMIT : d ? j.LIMIT : j.TWAP_MARKET;
2594
+ }, gn = (e) => e === j.TWAP_MARKET || e === j.TRIGGER_PRICE_MARKET, xn = (e, a, d, f) => {
2595
+ var _;
2596
+ const { filledDstAmount: u, filledSrcAmount: b, filledDollarValueIn: A, filledDollarValueOut: x, dexFee: k } = et(d || []), E = new g(e.ask_srcAmount || 0).div(e.ask_srcBidAmount).integerValue(g.ROUND_FLOOR).toNumber(), C = (d == null ? void 0 : d.length) === E ? (_ = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) == null ? void 0 : _.timestamp : void 0, D = tt(e.ask_srcAmount, b), M = Ke(e.ask_dstMinAmount, E);
2597
+ return {
2598
+ version: 1,
2599
+ id: e.Contract_id.toString(),
2600
+ hash: "",
2601
+ type: Ke(e.ask_dstMinAmount, E),
2602
+ srcTokenAddress: e.ask_srcToken,
2603
+ dstTokenAddress: e.ask_dstToken,
2604
+ exchangeAddress: e.exchange,
2605
+ twapAddress: e.twapAddress,
2606
+ maker: e.maker,
2607
+ progress: D,
2608
+ dstAmountFilled: d ? u : "",
2609
+ srcAmountFilled: d ? b : "",
2610
+ orderDollarValueIn: e.dollarValueIn,
2611
+ srcAmount: e.ask_srcAmount,
2612
+ dollarValueInFilled: d ? A : "",
2613
+ dollarValueOutFilled: d ? x : "",
2614
+ feesFilled: d ? k : "",
2615
+ dstMinAmountTotal: g(e.ask_dstMinAmount).multipliedBy(E).toString(),
2616
+ fills: d || [],
2617
+ fillDelay: e.ask_fillDelay,
2618
+ deadline: e.ask_deadline * 1e3,
2619
+ createdAt: new Date(e.timestamp).getTime(),
2620
+ dstMinAmountPerTrade: g(e.ask_dstMinAmount).eq(1) ? "" : e.ask_dstMinAmount,
2621
+ triggerPricePerTrade: "",
2622
+ srcAmountPerTrade: e.ask_srcBidAmount,
2623
+ txHash: e.transactionHash,
2624
+ totalTradesAmount: E,
2625
+ isMarketPrice: gn(M),
2626
+ chainId: a,
2627
+ filledOrderTimestamp: C || 0,
2628
+ status: f,
2629
+ rawOrder: e
2630
+ };
2631
+ }, En = (e) => {
2632
+ var C;
2633
+ if (!e) return "";
2634
+ const a = pe(e.accounts, (D) => `"${D.toLowerCase()}"`), d = pe(jt(e.configs), (D) => `"${D.toLowerCase()}"`), f = pe(e.inTokenSymbols, (D) => `"${D.toUpperCase()}"`), u = pe(e.outTokenSymbols, (D) => `"${D.toUpperCase()}"`), b = pe(e.inTokenAddresses, (D) => `"${D.toLowerCase()}"`), A = pe(e.outTokenAddresses, (D) => `"${D.toLowerCase()}"`), x = pe(e.transactionHashes, (D) => `"${D.toLowerCase()}"`), k = pe(e.orderIds, (D) => `"${D}"`), E = pe(
2635
+ (C = e.configs) == null ? void 0 : C.map((D) => D.twapAddress),
2636
+ (D) => `"${D.toLowerCase()}"`
2637
+ ), O = e.minDollarValueIn;
2638
+ return [
2639
+ d ? `exchange_in: [${d.join(", ")}]` : "",
2640
+ E ? `twapAddress_in: [${E.join(", ")}]` : "",
2641
+ a ? `maker_in: [${a.join(", ")}]` : "",
2642
+ x ? `transactionHash_in: [${x.join(", ")}]` : "",
2643
+ k ? `Contract_id_in: [${k.join(", ")}]` : "",
2644
+ O ? `dollarValueIn_gte: ${O}` : "",
2645
+ f ? `srcTokenSymbol_in: [${f.join(", ")}]` : "",
2646
+ u ? `dstTokenSymbol_in: [${u.join(", ")}]` : "",
2647
+ b ? `srcTokenAddress_in: [${b.join(", ")}]` : "",
2648
+ A ? `dstTokenAddress_in: [${A.join(", ")}]` : "",
2649
+ e != null && e.startDate ? `blockTimestamp_gte: ${e.startDate}` : "",
2650
+ e != null && e.endDate ? `blockTimestamp_lte: ${e.endDate}` : "",
2651
+ (e == null ? void 0 : e.orderType) === "limit" ? "ask_dstMinAmount_gt: 1" : "",
2652
+ (e == null ? void 0 : e.orderType) === "market" ? "ask_dstMinAmount_lte: 1" : ""
2653
+ ].filter(Boolean).join(", ");
2654
+ };
2655
+ async function wn({
2656
+ chainId: e,
2657
+ signal: a,
2658
+ page: d,
2659
+ limit: f,
2660
+ filters: u
2661
+ }) {
2662
+ const b = f || 1e3, A = En(u);
2663
+ return await Me({
2664
+ chainId: e,
2665
+ signal: a,
2666
+ limit: b,
2667
+ page: d,
2668
+ buildQuery: (k, E) => `
2669
+ {
2670
+ orderCreateds(
2671
+ ${A ? `where: { ${A} }` : ""},
2672
+ first: ${E},
2673
+ skip: ${k * E},
2674
+ orderBy: timestamp,
2675
+ orderDirection: desc,
2676
+ ) {
2677
+ id
2678
+ twapAddress
2679
+ Contract_id
2680
+ ask_bidDelay
2681
+ ask_data
2682
+ ask_deadline
2683
+ ask_dstMinAmount
2684
+ ask_dstToken
2685
+ ask_fillDelay
2686
+ ask_exchange
2687
+ ask_srcToken
2688
+ ask_srcBidAmount
2689
+ ask_srcAmount
2690
+ blockNumber
2691
+ blockTimestamp
2692
+ dex
2693
+ dollarValueIn
2694
+ dstTokenSymbol
2695
+ exchange
2696
+ maker
2697
+ srcTokenSymbol
2698
+ timestamp
2699
+ transactionHash
2700
+ }
2701
+ }
2702
+ `,
2703
+ extractResults: (k) => {
2704
+ var E;
2705
+ return ((E = k.data) == null ? void 0 : E.orderCreateds) || [];
2706
+ }
2707
+ });
2708
+ }
2709
+ const Cn = async ({ chainId: e, orders: a, signal: d }) => {
2710
+ if (a.length === 0) return [];
2711
+ const f = Re(a.map((x) => x.Contract_id.toString()));
2712
+ if (!f.length) return [];
2713
+ const b = `where: { twapId_in: [${f.map((x) => `"${x}"`).join(", ")}]}`;
2714
+ return await Me({
2715
+ chainId: e,
2716
+ signal: d,
2717
+ limit: 1e3,
2718
+ buildQuery: (x, k) => `
2719
+ {
2720
+ statusNews(
2721
+ first: ${k},
2722
+ skip: ${x * k},
2723
+ ${b}
2724
+ ) {
2725
+ twapId
2726
+ twapAddress
2727
+ status
2728
+ }
2729
+ }
2730
+ `,
2731
+ extractResults: (x) => {
2732
+ var k;
2733
+ return ((k = x.data) == null ? void 0 : k.statusNews) || [];
2734
+ }
2735
+ });
2736
+ };
2737
+ function Re(e) {
2738
+ return Array.from(new Set(e));
2739
+ }
2740
+ const Fn = async ({ chainId: e, orders: a, signal: d }) => {
2741
+ const f = Re(a.map((C) => C.Contract_id)), u = Re(a.map((C) => C.twapAddress)).filter(Boolean);
2742
+ if (f.length === 0) return [];
2743
+ const b = f.join(", "), A = u.map((C) => `"${C}"`).join(", "), x = u.length ? `twapAddress_in: [${A}]` : "", E = `where: { ${[`TWAP_id_in: [${b}]`, x].filter(Boolean).join(", ")} }`;
2744
+ return await Me({
2745
+ chainId: e,
2746
+ signal: d,
2747
+ limit: 1e3,
2748
+ buildQuery: (C, D) => `
2749
+ {
2750
+ orderFilleds(first: ${D}, orderBy: timestamp, skip: ${C * D}, ${E}) {
2751
+ id
2752
+ dstAmountOut
2753
+ dstFee
2754
+ srcFilledAmount
2755
+ twapAddress
2756
+ exchange
2757
+ TWAP_id
2758
+ srcAmountIn
2759
+ timestamp
2760
+ transactionHash
2761
+ dollarValueIn
2762
+ dollarValueOut
2763
+ }
2764
+ }
2765
+ `,
2766
+ extractResults: (C) => {
2767
+ var D;
2768
+ return (((D = C.data) == null ? void 0 : D.orderFilleds) || []).map((M) => ({
2769
+ ...M,
2770
+ timestamp: new Date(M.timestamp).getTime()
2771
+ }));
2772
+ }
2773
+ });
2774
+ };
2775
+ class kn extends Error {
2776
+ constructor() {
2777
+ super("No graph endpoint found"), this.name = "NoGraphEndpointError";
2778
+ }
2779
+ }
2780
+ const Dn = async ({
2781
+ chainId: e,
2782
+ signal: a,
2783
+ page: d,
2784
+ limit: f,
2785
+ filters: u
2786
+ }) => {
2787
+ const b = await wn({ chainId: e, signal: a, page: d, limit: f, filters: u }), [A, x] = await Promise.all([Fn({ chainId: e, orders: b, signal: a }), Cn({ chainId: e, orders: b, signal: a })]);
2788
+ return b.map((E) => {
2789
+ const O = A == null ? void 0 : A.filter((C) => C.TWAP_id === Number(E.Contract_id) && ge(C.exchange, E.exchange) && ge(C.twapAddress, E.twapAddress));
2790
+ return xn(E, e, O, Sn(E, O || [], x));
2791
+ }).sort((E, O) => O.createdAt - E.createdAt);
2792
+ }, Sn = (e, a, d) => {
2793
+ var A;
2794
+ const f = (A = d == null ? void 0 : d.find((x) => x.twapId === e.Contract_id.toString() && ge(x.twapAddress, e.twapAddress))) == null ? void 0 : A.status, { filledSrcAmount: u } = et(a), b = tt(e.ask_srcAmount, u);
2795
+ return Bn(b, e.ask_deadline * 1e3, f);
2796
+ }, tt = (e, a) => {
2797
+ if (!a || !e) return 0;
2798
+ const d = g(a).dividedBy(e).toNumber();
2799
+ return d >= 0.99 ? 100 : d <= 0 ? 0 : Number((d * 100).toFixed(2));
2800
+ }, Bn = (e, a, d) => e === 100 ? se.Completed : d === "CANCELED" ? se.Canceled : d === "COMPLETED" ? se.Completed : a > Date.now() ? se.Open : se.Expired, Da = async ({
2801
+ signal: e,
2802
+ page: a,
2803
+ chainId: d,
2804
+ limit: f,
2805
+ config: u,
2806
+ account: b
2807
+ }) => (await Promise.all([
2808
+ u ? Dn({ chainId: d, signal: e, page: a, limit: f, filters: { accounts: [b], configs: [u] } }) : Promise.resolve([]),
2809
+ Tn({ chainId: d, signal: e, account: b })
2810
+ ]).then(([k, E]) => [...k, ...E])).sort((k, E) => E.createdAt - k.createdAt);
2811
+ export {
2812
+ $ as Configs,
2813
+ ze as DEFAULT_FILL_DELAY,
2814
+ aa as DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE,
2815
+ ta as DEFAULT_STOP_LOSS_PERCENTAGE,
2816
+ sa as DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE,
2817
+ na as DEFAULT_TAKE_PROFIT_PERCENTAGE,
2818
+ ea as DISCLAIMER_URL,
2819
+ tn as EIP712_TYPES,
2820
+ Mn as ERC20_ABI,
2821
+ jn as EXCLUSIVITY_OVERRIDE_BPS,
2822
+ In as EXECUTOR_ABI,
2823
+ Gn as FEES,
2824
+ Rn as IWETH_ABI,
2825
+ Jt as LEGACY_EXCHANGES_MAP,
2826
+ Nn as LENS_ABI,
2827
+ fe as MAX_ORDER_DURATION_MILLIS,
2828
+ Kn as MIN_CHUNKS,
2829
+ Ie as MIN_FILL_DELAY_MILLIS,
2830
+ Xt as MIN_FILL_DELAY_MINUTES,
2831
+ Ve as MIN_ORDER_DURATION_MILLIS,
2832
+ G as Module,
2833
+ Zn as ORBS_LOGO,
2834
+ Yn as ORBS_LOGO_FALLBACK,
2835
+ Qn as ORBS_SLTP_FAQ_URL,
2836
+ Xn as ORBS_TWAP_FAQ_URL,
2837
+ Jn as ORBS_WEBSITE_URL,
2838
+ se as OrderStatus,
2839
+ j as OrderType,
2840
+ zt as Partners,
2841
+ Xe as QUERY_PARAMS,
2842
+ vn as REACTOR_ABI,
2843
+ _n as REPERMIT_ABI,
2844
+ en as REPERMIT_PRIMARY_TYPE,
2845
+ Hn as SUGGEST_CHUNK_VALUE,
2846
+ Qt as THE_GRAPH_ORDERS_API,
2847
+ Pn as TWAP_ABI,
2848
+ ne as TimeUnit,
2849
+ Ln as amountBN,
2850
+ Un as amountUi,
2851
+ ve as analytics,
2852
+ Ca as buildRePermitOrderData,
2853
+ ge as eqIgnoreCase,
2854
+ Da as getAccountOrders,
2855
+ je as getApiEndpoint,
2856
+ oa as getChunks,
2857
+ rn as getConfig,
2858
+ la as getDeadline,
2859
+ ra as getDestTokenAmount,
2860
+ ia as getDestTokenMinAmountPerChunk,
2861
+ pa as getDuration,
2862
+ Ze as getEstimatedDelayBetweenChunksMillis,
2863
+ wa as getMaxChunksError,
2864
+ ma as getMaxFillDelayError,
2865
+ Aa as getMaxOrderDurationError,
2866
+ ua as getMaxPossibleChunks,
2867
+ xa as getMinFillDelayError,
2868
+ ga as getMinOrderDurationError,
2869
+ Ea as getMinTradeSizeError,
2870
+ ca as getMinimumDelayMinutes,
2871
+ Wn as getNetwork,
2872
+ zn as getOrderFillDelayMillis,
2873
+ $n as getPartnerChains,
2874
+ K as getPartnerIdentifier,
2875
+ dn as getPartners,
2876
+ Ge as getQueryParam,
2877
+ ya as getSrcTokenChunkAmount,
2878
+ ba as getStopLossLimitPriceError,
2879
+ fa as getStopLossPriceError,
2880
+ Ta as getTakeProfitLimitPriceError,
2881
+ ha as getTakeProfitPriceError,
2882
+ da as getTriggerPricePerChunk,
2883
+ Vn as isNativeAddress,
2884
+ qn as maxUint256,
2885
+ Yt as nativeTokenAddresses,
2886
+ H as networks,
2887
+ Fa as setUIVersion,
2888
+ ka as submitOrder,
2889
+ Zt as zeroAddress
2890
+ };