@orbs-network/spot-ui 0.1.0 → 1.0.1

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 -7
  2. package/dist/spot-ui.js +3335 -0
  3. package/dist/spot-ui.umd.cjs +64 -0
  4. package/dist/src/index.d.ts +14 -0
  5. package/dist/src/index.d.ts.map +1 -0
  6. package/dist/src/lib/abi/erc20.json.d.ts +291 -0
  7. package/dist/src/lib/abi/index.d.ts +260 -0
  8. package/dist/src/lib/abi/index.d.ts.map +1 -0
  9. package/dist/src/lib/abi/iweth.json.d.ts +41 -0
  10. package/dist/src/lib/abi/repermit.json.d.ts +315 -0
  11. package/dist/src/lib/analytics.d.ts +108 -0
  12. package/dist/src/lib/analytics.d.ts.map +1 -0
  13. package/dist/src/lib/build-repermit-order-data.d.ts +55 -0
  14. package/dist/src/lib/build-repermit-order-data.d.ts.map +1 -0
  15. package/dist/src/lib/consts.d.ts +118 -0
  16. package/dist/src/lib/consts.d.ts.map +1 -0
  17. package/dist/src/lib/lib.d.ts +67 -0
  18. package/dist/src/lib/lib.d.ts.map +1 -0
  19. package/dist/src/lib/networks.d.ts +487 -0
  20. package/dist/src/lib/networks.d.ts.map +1 -0
  21. package/dist/src/lib/orders/index.d.ts +11 -0
  22. package/dist/src/lib/orders/index.d.ts.map +1 -0
  23. package/dist/src/lib/orders/v1-orders.d.ts +34 -0
  24. package/dist/src/lib/orders/v1-orders.d.ts.map +1 -0
  25. package/dist/src/lib/orders/v2-orders.d.ts +10 -0
  26. package/dist/src/lib/orders/v2-orders.d.ts.map +1 -0
  27. package/dist/src/lib/submit-order.d.ts +3 -0
  28. package/dist/src/lib/submit-order.d.ts.map +1 -0
  29. package/dist/src/lib/types.d.ts +308 -0
  30. package/dist/src/lib/types.d.ts.map +1 -0
  31. package/dist/src/lib/utils.d.ts +498 -0
  32. package/dist/src/lib/utils.d.ts.map +1 -0
  33. package/package.json +32 -9
  34. package/dist/index.d.ts.map +0 -1
  35. package/dist/index.js +0 -8
  36. package/dist/index.js.map +0 -1
@@ -0,0 +1,3335 @@
1
+ var rt = Object.defineProperty;
2
+ var it = (e, n, i) => n in e ? rt(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
+ var Ce = (e, n, i) => it(e, typeof n != "symbol" ? n + "" : n, i);
4
+ const ot = { 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: "" }, dt = { 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: "" }, ct = { 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" }, pt = { 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: "" }, ut = { 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" }, lt = { 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" }, ft = { 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" }, mt = { 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" }, yt = { 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: "" }, ht = { 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: "" }, At = { 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: "" }, bt = { 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: "" }, gt = { 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" }, Et = { 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" }, xt = { 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" }, Tt = { 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: "" }, Ct = { 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: "" }, wt = { 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: "" }, Ft = { 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: "" }, Dt = { 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: "" }, kt = { 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" }, St = { 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" }, Bt = { 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: "" }, _t = { 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: "" }, Ot = { 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" }, vt = { 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" }, Rt = { 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" }, Pt = { 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" }, Nt = { 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" }, Mt = { 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: ot,
6
+ SpookySwapSonic: dt,
7
+ QuickSwap: ct,
8
+ QuickSwapBase: pt,
9
+ Chronos: ut,
10
+ BaseSwap: lt,
11
+ Arbidex: ft,
12
+ Thena: mt,
13
+ PancakeSwap: yt,
14
+ PancakeSwapArbitrum: ht,
15
+ PancakeSwapBase: At,
16
+ PancakeSwapLinea: bt,
17
+ Lynex: gt,
18
+ SyncSwap: Et,
19
+ Retro: xt,
20
+ SushiArb: Tt,
21
+ SushiBase: Ct,
22
+ SushiEth: wt,
23
+ SushiKatana: Ft,
24
+ DragonSwap: Dt,
25
+ TeaFi: kt,
26
+ SparkDEX: St,
27
+ Ramses: Bt,
28
+ SwapX: _t,
29
+ H2Finance: Ot,
30
+ Shadow: vt,
31
+ Kodiak: Rt,
32
+ OmniBase: Pt,
33
+ OmniArb: It,
34
+ BlackholeAvax: Nt,
35
+ NewEraBnb: Mt
36
+ }, Ut = [
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
+ ], Lt = [
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
+ ], 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 = [
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
+ ], Vn = Ut, Wn = Lt, zn = Wt, $n = Vt;
694
+ var z = /* @__PURE__ */ ((e) => (e.TWAP = "TWAP", e.LIMIT = "LIMIT", e.STOP_LOSS = "STOP_LOSS", e.TAKE_PROFIT = "TAKE_PROFIT", e))(z || {}), re = /* @__PURE__ */ ((e) => (e.Open = "OPEN", e.Cancelled = "CANCELLED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))(re || {}), zt = /* @__PURE__ */ ((e) => (e.All = "ALL", e.Open = "OPEN", e.Cancelled = "CANCELLED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))(zt || {}), ae = /* @__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))(ae || {}), q = /* @__PURE__ */ ((e) => (e.LIMIT = "limit", e.TWAP_LIMIT = "twap-limit", e.TWAP_MARKET = "twap-market", e.TAKE_PROFIT = "take-profit", e.STOP_LOSS_LIMIT = "stop-loss-limit", e.STOP_LOSS_MARKET = "stop-loss-market", e))(q || {}), pe = /* @__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.Pangolin = "pangolin", e.Sushiswap = "sushiswap", e.Agent = "agent", e))(pe || {}), $t = /* @__PURE__ */ ((e) => (e[e.EMPTY_LIMIT_PRICE = 0] = "EMPTY_LIMIT_PRICE", e[e.MAX_CHUNKS = 1] = "MAX_CHUNKS", e[e.MIN_CHUNKS = 2] = "MIN_CHUNKS", e[e.MIN_TRADE_SIZE = 3] = "MIN_TRADE_SIZE", e[e.MAX_FILL_DELAY = 4] = "MAX_FILL_DELAY", e[e.MIN_FILL_DELAY = 5] = "MIN_FILL_DELAY", e[e.MAX_ORDER_DURATION = 6] = "MAX_ORDER_DURATION", e[e.MIN_ORDER_DURATION = 7] = "MIN_ORDER_DURATION", e[e.MISSING_LIMIT_PRICE = 8] = "MISSING_LIMIT_PRICE", e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE = 9] = "STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE", e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE = 10] = "TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE", e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE = 11] = "TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE", e[e.EMPTY_TRIGGER_PRICE = 12] = "EMPTY_TRIGGER_PRICE", e[e.INSUFFICIENT_BALANCE = 13] = "INSUFFICIENT_BALANCE", e[e.MAX_ORDER_SIZE = 14] = "MAX_ORDER_SIZE", e[e.MIN_TRADE_SIZE_ERROR = 15] = "MIN_TRADE_SIZE_ERROR", e))($t || {});
695
+ const L = "0x0000000000000000000000000000000000000000", K = {
696
+ eth: {
697
+ id: 1,
698
+ name: "Ethereum",
699
+ shortname: "eth",
700
+ native: {
701
+ address: L,
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: L,
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: L,
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: L,
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: L,
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: L,
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: L,
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: L,
849
+ symbol: "ETH",
850
+ decimals: 18,
851
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1027.png"
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: L,
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: L,
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: L,
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: L,
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: L,
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: L,
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: L,
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: L,
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: "https://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: L,
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: L,
1083
+ symbol: "ETH",
1084
+ decimals: 18,
1085
+ logoUrl: "https://katana.network/assets/katana-logo.svg"
1086
+ },
1087
+ wToken: {
1088
+ symbol: "WETH",
1089
+ address: "0xee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62",
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.katanarpc.com",
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: L,
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: L,
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
+ optimism: {
1145
+ id: 10,
1146
+ name: "Optimism",
1147
+ shortname: "optimism",
1148
+ native: {
1149
+ address: L,
1150
+ symbol: "ETH",
1151
+ decimals: 18,
1152
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/11840.png"
1153
+ },
1154
+ wToken: {
1155
+ symbol: "WETH",
1156
+ address: "0x4200000000000000000000000000000000000006",
1157
+ decimals: 18,
1158
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/2396.png"
1159
+ },
1160
+ publicRpcUrl: "https://optimism.blockscout.com",
1161
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/11840.png",
1162
+ explorer: "https://optimistic.etherscan.io",
1163
+ eip1559: !0
1164
+ },
1165
+ mantle: {
1166
+ id: 5e3,
1167
+ name: "Mantle",
1168
+ shortname: "mantle",
1169
+ native: {
1170
+ address: L,
1171
+ symbol: "MNT",
1172
+ decimals: 18,
1173
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/27075.png"
1174
+ },
1175
+ wToken: {
1176
+ symbol: "WMNT",
1177
+ address: "0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",
1178
+ decimals: 18,
1179
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/27614.png"
1180
+ },
1181
+ publicRpcUrl: "https://rpc.mantle.xyz",
1182
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/27075.png",
1183
+ explorer: "https://mantlescan.xyz",
1184
+ eip1559: !0
1185
+ }
1186
+ }, Ht = "2.1.3", Ve = {
1187
+ version: Ht
1188
+ }, Kt = "https://order-sink-dev.orbs.network", Gt = "https://order-sink.orbs.network", qt = "https://order-sink-v2.orbs.network", We = Ve.version.split(".")[0], Ye = (e) => {
1189
+ const n = Number(We) >= 2;
1190
+ return e ? Kt : n ? qt : Gt;
1191
+ }, Hn = 100, Kn = 1, Me = 300 * 1e3, Ee = 365 * 24 * 60 * 60 * 1e3, Ke = 300 * 1e3, Xt = new Date(
1192
+ Me
1193
+ ).getMinutes(), _e = (e) => `https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`, te = "https://hub.orbs.network/api/apikey/subgraphs/id", jt = {
1194
+ [K.eth.id]: `${te}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,
1195
+ [K.bsc.id]: `${te}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,
1196
+ [K.poly.id]: `${te}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,
1197
+ [K.arb.id]: `${te}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,
1198
+ [K.base.id]: `${te}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,
1199
+ [K.sei.id]: `${te}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,
1200
+ [K.linea.id]: `${te}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,
1201
+ [K.sonic.id]: `${te}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,
1202
+ [K.ftm.id]: `${te}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,
1203
+ [K.katana.id]: `${te}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,
1204
+ [K.avax.id]: `${te}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,
1205
+ [K.bera.id]: _e("berachain"),
1206
+ [K.flare.id]: _e("flare"),
1207
+ [K.cronosZkEvm.id]: _e("cronos-zkevm")
1208
+ }, Qt = "0x0000000000000000000000000000000000000000", Yt = [
1209
+ Qt,
1210
+ "0x0000000000000000000000000000000000001010",
1211
+ "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
1212
+ "0x000000000000000000000000000000000000dEaD",
1213
+ "0x000000000000000000000000000000000000800A",
1214
+ "0x000000000000000000000000000000000000800a"
1215
+ ], ze = "115792089237316195423570985008687907853269984665640564039457584007913129639935", G = (e) => `${e.name}_${e.chainId}`, Zt = {
1216
+ [G(_.SushiArb)]: [
1217
+ "0x846F2B29ef314bF3D667981b4ffdADc5B858312a",
1218
+ "0x08c41f5D1C844061f6D952E25827eeAA576c6536"
1219
+ ],
1220
+ [G(_.SushiBase)]: [
1221
+ "0x846F2B29ef314bF3D667981b4ffdADc5B858312a",
1222
+ "0x08c41f5D1C844061f6D952E25827eeAA576c6536"
1223
+ ],
1224
+ [G(_.SushiEth)]: [
1225
+ "0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA",
1226
+ "0x08c41f5D1C844061f6D952E25827eeAA576c6536"
1227
+ ],
1228
+ [G(_.PancakeSwap)]: [
1229
+ "0xb2BAFe188faD927240038cC4FfF2d771d8A58905",
1230
+ "0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"
1231
+ ],
1232
+ [G(_.PancakeSwapArbitrum)]: [
1233
+ "0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F",
1234
+ "0x807488ADAD033e95C438F998277bE654152594dc"
1235
+ ],
1236
+ [G(_.PancakeSwapBase)]: [
1237
+ "0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c",
1238
+ "0x3A9df3eE209b802D0337383f5abCe3204d623588"
1239
+ ],
1240
+ [G(_.PancakeSwapLinea)]: [
1241
+ "0x3A9df3eE209b802D0337383f5abCe3204d623588"
1242
+ ],
1243
+ [G(_.QuickSwap)]: [
1244
+ "0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"
1245
+ ],
1246
+ [G(_.Thena)]: [
1247
+ "0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"
1248
+ ],
1249
+ [G(_.Lynex)]: [
1250
+ "0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"
1251
+ ],
1252
+ [G(_.DragonSwap)]: [
1253
+ "0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"
1254
+ ],
1255
+ [G(_.SpookySwapSonic)]: [
1256
+ "0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"
1257
+ ],
1258
+ [G(_.SpookySwap)]: [
1259
+ "0x3924d62219483015f982b160d48c0fa5Fd436Cba"
1260
+ ],
1261
+ [G(_.SwapX)]: [
1262
+ "0xE5012eBDe5e26EE3Ea41992154731a03023CF274"
1263
+ ]
1264
+ }, Ge = {
1265
+ unit: ae.Minutes,
1266
+ value: Xt
1267
+ }, Gn = 0.25, qn = "100", Ze = "RePermitWitnessTransferFrom", Jt = {
1268
+ RePermitWitnessTransferFrom: [
1269
+ {
1270
+ name: "permitted",
1271
+ type: "TokenPermissions"
1272
+ },
1273
+ {
1274
+ name: "spender",
1275
+ type: "address"
1276
+ },
1277
+ {
1278
+ name: "nonce",
1279
+ type: "uint256"
1280
+ },
1281
+ {
1282
+ name: "deadline",
1283
+ type: "uint256"
1284
+ },
1285
+ {
1286
+ name: "witness",
1287
+ type: "Order"
1288
+ }
1289
+ ],
1290
+ Exchange: [
1291
+ {
1292
+ name: "adapter",
1293
+ type: "address"
1294
+ },
1295
+ {
1296
+ name: "ref",
1297
+ type: "address"
1298
+ },
1299
+ {
1300
+ name: "share",
1301
+ type: "uint32"
1302
+ },
1303
+ {
1304
+ name: "data",
1305
+ type: "bytes"
1306
+ }
1307
+ ],
1308
+ Input: [
1309
+ {
1310
+ name: "token",
1311
+ type: "address"
1312
+ },
1313
+ {
1314
+ name: "amount",
1315
+ type: "uint256"
1316
+ },
1317
+ {
1318
+ name: "maxAmount",
1319
+ type: "uint256"
1320
+ }
1321
+ ],
1322
+ Order: [
1323
+ {
1324
+ name: "reactor",
1325
+ type: "address"
1326
+ },
1327
+ {
1328
+ name: "executor",
1329
+ type: "address"
1330
+ },
1331
+ {
1332
+ name: "exchange",
1333
+ type: "Exchange"
1334
+ },
1335
+ {
1336
+ name: "swapper",
1337
+ type: "address"
1338
+ },
1339
+ {
1340
+ name: "nonce",
1341
+ type: "uint256"
1342
+ },
1343
+ {
1344
+ name: "deadline",
1345
+ type: "uint256"
1346
+ },
1347
+ {
1348
+ name: "chainid",
1349
+ type: "uint256"
1350
+ },
1351
+ {
1352
+ name: "exclusivity",
1353
+ type: "uint32"
1354
+ },
1355
+ {
1356
+ name: "epoch",
1357
+ type: "uint32"
1358
+ },
1359
+ {
1360
+ name: "slippage",
1361
+ type: "uint32"
1362
+ },
1363
+ {
1364
+ name: "freshness",
1365
+ type: "uint32"
1366
+ },
1367
+ {
1368
+ name: "input",
1369
+ type: "Input"
1370
+ },
1371
+ {
1372
+ name: "output",
1373
+ type: "Output"
1374
+ }
1375
+ ],
1376
+ Output: [
1377
+ { name: "token", type: "address" },
1378
+ { name: "limit", type: "uint256" },
1379
+ { name: "stop", type: "uint256" },
1380
+ { name: "recipient", type: "address" }
1381
+ ],
1382
+ TokenPermissions: [
1383
+ {
1384
+ name: "token",
1385
+ type: "address"
1386
+ },
1387
+ {
1388
+ name: "amount",
1389
+ type: "uint256"
1390
+ }
1391
+ ]
1392
+ }, en = {
1393
+ RePermitWitnessTransferFrom: [
1394
+ {
1395
+ name: "permitted",
1396
+ type: "TokenPermissions"
1397
+ },
1398
+ {
1399
+ name: "spender",
1400
+ type: "address"
1401
+ },
1402
+ {
1403
+ name: "nonce",
1404
+ type: "uint256"
1405
+ },
1406
+ {
1407
+ name: "deadline",
1408
+ type: "uint256"
1409
+ },
1410
+ {
1411
+ name: "witness",
1412
+ type: "Order"
1413
+ }
1414
+ ],
1415
+ Exchange: [
1416
+ {
1417
+ name: "adapter",
1418
+ type: "address"
1419
+ },
1420
+ {
1421
+ name: "ref",
1422
+ type: "address"
1423
+ },
1424
+ {
1425
+ name: "share",
1426
+ type: "uint32"
1427
+ },
1428
+ {
1429
+ name: "data",
1430
+ type: "bytes"
1431
+ }
1432
+ ],
1433
+ Input: [
1434
+ {
1435
+ name: "token",
1436
+ type: "address"
1437
+ },
1438
+ {
1439
+ name: "amount",
1440
+ type: "uint256"
1441
+ },
1442
+ {
1443
+ name: "maxAmount",
1444
+ type: "uint256"
1445
+ }
1446
+ ],
1447
+ Order: [
1448
+ {
1449
+ name: "reactor",
1450
+ type: "address"
1451
+ },
1452
+ {
1453
+ name: "executor",
1454
+ type: "address"
1455
+ },
1456
+ {
1457
+ name: "exchange",
1458
+ type: "Exchange"
1459
+ },
1460
+ {
1461
+ name: "swapper",
1462
+ type: "address"
1463
+ },
1464
+ {
1465
+ name: "nonce",
1466
+ type: "uint256"
1467
+ },
1468
+ {
1469
+ name: "start",
1470
+ type: "uint256"
1471
+ },
1472
+ {
1473
+ name: "deadline",
1474
+ type: "uint256"
1475
+ },
1476
+ {
1477
+ name: "chainid",
1478
+ type: "uint256"
1479
+ },
1480
+ {
1481
+ name: "exclusivity",
1482
+ type: "uint32"
1483
+ },
1484
+ {
1485
+ name: "epoch",
1486
+ type: "uint32"
1487
+ },
1488
+ {
1489
+ name: "slippage",
1490
+ type: "uint32"
1491
+ },
1492
+ {
1493
+ name: "freshness",
1494
+ type: "uint32"
1495
+ },
1496
+ {
1497
+ name: "input",
1498
+ type: "Input"
1499
+ },
1500
+ {
1501
+ name: "output",
1502
+ type: "Output"
1503
+ }
1504
+ ],
1505
+ Output: [
1506
+ { name: "token", type: "address" },
1507
+ { name: "limit", type: "uint256" },
1508
+ { name: "triggerLower", type: "uint256" },
1509
+ { name: "triggerUpper", type: "uint256" },
1510
+ { name: "recipient", type: "address" }
1511
+ ],
1512
+ TokenPermissions: [
1513
+ {
1514
+ name: "token",
1515
+ type: "address"
1516
+ },
1517
+ {
1518
+ name: "amount",
1519
+ type: "uint256"
1520
+ }
1521
+ ]
1522
+ }, Xn = "https://www.orbs.com/dtwap-and-dlimit-faq/", jn = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP", Qn = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg", Yn = "https://www.orbs.com/assets/img/common/logo.svg", Zn = "https://www.orbs.com/", Jn = "https://www.orbs.com/dtwap-dlimit-disclaimer";
1523
+ var xe = /* @__PURE__ */ ((e) => (e.FRESHNESS = "freshness", e.MIN_CHUNK_SIZE_USD = "minChunkSizeUsd", e.ENV = "env", e.DURATION = "duration", e.IGNORE_ERRORS = "ignore-errors", e))(xe || {});
1524
+ const ea = "-5", ta = "10", na = "-10", aa = "5", sa = "Something went wrong";
1525
+ var tn = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Oe = Math.ceil, Z = Math.floor, X = "[BigNumber Error] ", qe = X + "Number primitive has more than 15 significant digits: ", ne = 1e14, B = 14, ve = 9007199254740991, Re = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ue = 1e7, W = 1e9;
1526
+ function Je(e) {
1527
+ var n, i, m, d = b.prototype = { constructor: b, toString: null, valueOf: null }, h = new b(1), g = 20, x = 4, C = -7, D = 21, S = -1e7, T = 1e7, w = !1, R = 1, I = 0, ie = {
1528
+ prefix: "",
1529
+ groupSize: 3,
1530
+ secondaryGroupSize: 0,
1531
+ groupSeparator: ",",
1532
+ decimalSeparator: ".",
1533
+ fractionGroupSize: 0,
1534
+ fractionGroupSeparator: " ",
1535
+ // non-breaking space
1536
+ suffix: ""
1537
+ }, ee = "0123456789abcdefghijklmnopqrstuvwxyz", fe = !0;
1538
+ function b(t, a) {
1539
+ var s, l, o, p, y, r, c, f, u = this;
1540
+ if (!(u instanceof b)) return new b(t, a);
1541
+ if (a == null) {
1542
+ if (t && t._isBigNumber === !0) {
1543
+ u.s = t.s, !t.c || t.e > T ? u.c = u.e = null : t.e < S ? u.c = [u.e = 0] : (u.e = t.e, u.c = t.c.slice());
1544
+ return;
1545
+ }
1546
+ if ((r = typeof t == "number") && t * 0 == 0) {
1547
+ if (u.s = 1 / t < 0 ? (t = -t, -1) : 1, t === ~~t) {
1548
+ for (p = 0, y = t; y >= 10; y /= 10, p++) ;
1549
+ p > T ? u.c = u.e = null : (u.e = p, u.c = [t]);
1550
+ return;
1551
+ }
1552
+ f = String(t);
1553
+ } else {
1554
+ if (!tn.test(f = String(t))) return m(u, f, r);
1555
+ u.s = f.charCodeAt(0) == 45 ? (f = f.slice(1), -1) : 1;
1556
+ }
1557
+ (p = f.indexOf(".")) > -1 && (f = f.replace(".", "")), (y = f.search(/e/i)) > 0 ? (p < 0 && (p = y), p += +f.slice(y + 1), f = f.substring(0, y)) : p < 0 && (p = f.length);
1558
+ } else {
1559
+ if (N(a, 2, ee.length, "Base"), a == 10 && fe)
1560
+ return u = new b(t), j(u, g + u.e + 1, x);
1561
+ if (f = String(t), r = typeof t == "number") {
1562
+ if (t * 0 != 0) return m(u, f, r, a);
1563
+ if (u.s = 1 / t < 0 ? (f = f.slice(1), -1) : 1, b.DEBUG && f.replace(/^0\.0*|\./, "").length > 15)
1564
+ throw Error(qe + t);
1565
+ } else
1566
+ u.s = f.charCodeAt(0) === 45 ? (f = f.slice(1), -1) : 1;
1567
+ for (s = ee.slice(0, a), p = y = 0, c = f.length; y < c; y++)
1568
+ if (s.indexOf(l = f.charAt(y)) < 0) {
1569
+ if (l == ".") {
1570
+ if (y > p) {
1571
+ p = c;
1572
+ continue;
1573
+ }
1574
+ } else if (!o && (f == f.toUpperCase() && (f = f.toLowerCase()) || f == f.toLowerCase() && (f = f.toUpperCase()))) {
1575
+ o = !0, y = -1, p = 0;
1576
+ continue;
1577
+ }
1578
+ return m(u, String(t), r, a);
1579
+ }
1580
+ r = !1, f = i(f, a, 10, u.s), (p = f.indexOf(".")) > -1 ? f = f.replace(".", "") : p = f.length;
1581
+ }
1582
+ for (y = 0; f.charCodeAt(y) === 48; y++) ;
1583
+ for (c = f.length; f.charCodeAt(--c) === 48; ) ;
1584
+ if (f = f.slice(y, ++c)) {
1585
+ if (c -= y, r && b.DEBUG && c > 15 && (t > ve || t !== Z(t)))
1586
+ throw Error(qe + u.s * t);
1587
+ if ((p = p - y - 1) > T)
1588
+ u.c = u.e = null;
1589
+ else if (p < S)
1590
+ u.c = [u.e = 0];
1591
+ else {
1592
+ if (u.e = p, u.c = [], y = (p + 1) % B, p < 0 && (y += B), y < c) {
1593
+ for (y && u.c.push(+f.slice(0, y)), c -= B; y < c; )
1594
+ u.c.push(+f.slice(y, y += B));
1595
+ y = B - (f = f.slice(y)).length;
1596
+ } else
1597
+ y -= c;
1598
+ for (; y--; f += "0") ;
1599
+ u.c.push(+f);
1600
+ }
1601
+ } else
1602
+ u.c = [u.e = 0];
1603
+ }
1604
+ b.clone = Je, b.ROUND_UP = 0, b.ROUND_DOWN = 1, b.ROUND_CEIL = 2, b.ROUND_FLOOR = 3, b.ROUND_HALF_UP = 4, b.ROUND_HALF_DOWN = 5, b.ROUND_HALF_EVEN = 6, b.ROUND_HALF_CEIL = 7, b.ROUND_HALF_FLOOR = 8, b.EUCLID = 9, b.config = b.set = function(t) {
1605
+ var a, s;
1606
+ if (t != null)
1607
+ if (typeof t == "object") {
1608
+ if (t.hasOwnProperty(a = "DECIMAL_PLACES") && (s = t[a], N(s, 0, W, a), g = s), t.hasOwnProperty(a = "ROUNDING_MODE") && (s = t[a], N(s, 0, 8, a), x = s), t.hasOwnProperty(a = "EXPONENTIAL_AT") && (s = t[a], s && s.pop ? (N(s[0], -W, 0, a), N(s[1], 0, W, a), C = s[0], D = s[1]) : (N(s, -W, W, a), C = -(D = s < 0 ? -s : s))), t.hasOwnProperty(a = "RANGE"))
1609
+ if (s = t[a], s && s.pop)
1610
+ N(s[0], -W, -1, a), N(s[1], 1, W, a), S = s[0], T = s[1];
1611
+ else if (N(s, -W, W, a), s)
1612
+ S = -(T = s < 0 ? -s : s);
1613
+ else
1614
+ throw Error(X + a + " cannot be zero: " + s);
1615
+ if (t.hasOwnProperty(a = "CRYPTO"))
1616
+ if (s = t[a], s === !!s)
1617
+ if (s)
1618
+ if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
1619
+ w = s;
1620
+ else
1621
+ throw w = !s, Error(X + "crypto unavailable");
1622
+ else
1623
+ w = s;
1624
+ else
1625
+ throw Error(X + a + " not true or false: " + s);
1626
+ if (t.hasOwnProperty(a = "MODULO_MODE") && (s = t[a], N(s, 0, 9, a), R = s), t.hasOwnProperty(a = "POW_PRECISION") && (s = t[a], N(s, 0, W, a), I = s), t.hasOwnProperty(a = "FORMAT"))
1627
+ if (s = t[a], typeof s == "object") ie = s;
1628
+ else throw Error(X + a + " not an object: " + s);
1629
+ if (t.hasOwnProperty(a = "ALPHABET"))
1630
+ if (s = t[a], typeof s == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(s))
1631
+ fe = s.slice(0, 10) == "0123456789", ee = s;
1632
+ else
1633
+ throw Error(X + a + " invalid: " + s);
1634
+ } else
1635
+ throw Error(X + "Object expected: " + t);
1636
+ return {
1637
+ DECIMAL_PLACES: g,
1638
+ ROUNDING_MODE: x,
1639
+ EXPONENTIAL_AT: [C, D],
1640
+ RANGE: [S, T],
1641
+ CRYPTO: w,
1642
+ MODULO_MODE: R,
1643
+ POW_PRECISION: I,
1644
+ FORMAT: ie,
1645
+ ALPHABET: ee
1646
+ };
1647
+ }, b.isBigNumber = function(t) {
1648
+ if (!t || t._isBigNumber !== !0) return !1;
1649
+ if (!b.DEBUG) return !0;
1650
+ var a, s, l = t.c, o = t.e, p = t.s;
1651
+ e: if ({}.toString.call(l) == "[object Array]") {
1652
+ if ((p === 1 || p === -1) && o >= -W && o <= W && o === Z(o)) {
1653
+ if (l[0] === 0) {
1654
+ if (o === 0 && l.length === 1) return !0;
1655
+ break e;
1656
+ }
1657
+ if (a = (o + 1) % B, a < 1 && (a += B), String(l[0]).length == a) {
1658
+ for (a = 0; a < l.length; a++)
1659
+ if (s = l[a], s < 0 || s >= ne || s !== Z(s)) break e;
1660
+ if (s !== 0) return !0;
1661
+ }
1662
+ }
1663
+ } else if (l === null && o === null && (p === null || p === 1 || p === -1))
1664
+ return !0;
1665
+ throw Error(X + "Invalid BigNumber: " + t);
1666
+ }, b.maximum = b.max = function() {
1667
+ return Ae(arguments, -1);
1668
+ }, b.minimum = b.min = function() {
1669
+ return Ae(arguments, 1);
1670
+ }, b.random = (function() {
1671
+ var t = 9007199254740992, a = Math.random() * t & 2097151 ? function() {
1672
+ return Z(Math.random() * t);
1673
+ } : function() {
1674
+ return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
1675
+ };
1676
+ return function(s) {
1677
+ var l, o, p, y, r, c = 0, f = [], u = new b(h);
1678
+ if (s == null ? s = g : N(s, 0, W), y = Oe(s / B), w)
1679
+ if (crypto.getRandomValues) {
1680
+ for (l = crypto.getRandomValues(new Uint32Array(y *= 2)); c < y; )
1681
+ r = l[c] * 131072 + (l[c + 1] >>> 11), r >= 9e15 ? (o = crypto.getRandomValues(new Uint32Array(2)), l[c] = o[0], l[c + 1] = o[1]) : (f.push(r % 1e14), c += 2);
1682
+ c = y / 2;
1683
+ } else if (crypto.randomBytes) {
1684
+ for (l = crypto.randomBytes(y *= 7); c < y; )
1685
+ r = (l[c] & 31) * 281474976710656 + l[c + 1] * 1099511627776 + l[c + 2] * 4294967296 + l[c + 3] * 16777216 + (l[c + 4] << 16) + (l[c + 5] << 8) + l[c + 6], r >= 9e15 ? crypto.randomBytes(7).copy(l, c) : (f.push(r % 1e14), c += 7);
1686
+ c = y / 7;
1687
+ } else
1688
+ throw w = !1, Error(X + "crypto unavailable");
1689
+ if (!w)
1690
+ for (; c < y; )
1691
+ r = a(), r < 9e15 && (f[c++] = r % 1e14);
1692
+ for (y = f[--c], s %= B, y && s && (r = Re[B - s], f[c] = Z(y / r) * r); f[c] === 0; f.pop(), c--) ;
1693
+ if (c < 0)
1694
+ f = [p = 0];
1695
+ else {
1696
+ for (p = -1; f[0] === 0; f.splice(0, 1), p -= B) ;
1697
+ for (c = 1, r = f[0]; r >= 10; r /= 10, c++) ;
1698
+ c < B && (p -= B - c);
1699
+ }
1700
+ return u.e = p, u.c = f, u;
1701
+ };
1702
+ })(), b.sum = function() {
1703
+ for (var t = 1, a = arguments, s = new b(a[0]); t < a.length; ) s = s.plus(a[t++]);
1704
+ return s;
1705
+ }, i = /* @__PURE__ */ (function() {
1706
+ var t = "0123456789";
1707
+ function a(s, l, o, p) {
1708
+ for (var y, r = [0], c, f = 0, u = s.length; f < u; ) {
1709
+ for (c = r.length; c--; r[c] *= l) ;
1710
+ for (r[0] += p.indexOf(s.charAt(f++)), y = 0; y < r.length; y++)
1711
+ r[y] > o - 1 && (r[y + 1] == null && (r[y + 1] = 0), r[y + 1] += r[y] / o | 0, r[y] %= o);
1712
+ }
1713
+ return r.reverse();
1714
+ }
1715
+ return function(s, l, o, p, y) {
1716
+ var r, c, f, u, A, F, k, v, M = s.indexOf("."), V = g, O = x;
1717
+ for (M >= 0 && (u = I, I = 0, s = s.replace(".", ""), v = new b(l), F = v.pow(s.length - M), I = u, v.c = a(
1718
+ de(Y(F.c), F.e, "0"),
1719
+ 10,
1720
+ o,
1721
+ t
1722
+ ), v.e = v.c.length), k = a(s, l, o, y ? (r = ee, t) : (r = t, ee)), f = u = k.length; k[--u] == 0; k.pop()) ;
1723
+ if (!k[0]) return r.charAt(0);
1724
+ if (M < 0 ? --f : (F.c = k, F.e = f, F.s = p, F = n(F, v, V, O, o), k = F.c, A = F.r, f = F.e), c = f + V + 1, M = k[c], u = o / 2, A = A || c < 0 || k[c + 1] != null, A = O < 4 ? (M != null || A) && (O == 0 || O == (F.s < 0 ? 3 : 2)) : M > u || M == u && (O == 4 || A || O == 6 && k[c - 1] & 1 || O == (F.s < 0 ? 8 : 7)), c < 1 || !k[0])
1725
+ s = A ? de(r.charAt(1), -V, r.charAt(0)) : r.charAt(0);
1726
+ else {
1727
+ if (k.length = c, A)
1728
+ for (--o; ++k[--c] > o; )
1729
+ k[c] = 0, c || (++f, k = [1].concat(k));
1730
+ for (u = k.length; !k[--u]; ) ;
1731
+ for (M = 0, s = ""; M <= u; s += r.charAt(k[M++])) ;
1732
+ s = de(s, f, r.charAt(0));
1733
+ }
1734
+ return s;
1735
+ };
1736
+ })(), n = /* @__PURE__ */ (function() {
1737
+ function t(l, o, p) {
1738
+ var y, r, c, f, u = 0, A = l.length, F = o % ue, k = o / ue | 0;
1739
+ for (l = l.slice(); A--; )
1740
+ c = l[A] % ue, f = l[A] / ue | 0, y = k * c + f * F, r = F * c + y % ue * ue + u, u = (r / p | 0) + (y / ue | 0) + k * f, l[A] = r % p;
1741
+ return u && (l = [u].concat(l)), l;
1742
+ }
1743
+ function a(l, o, p, y) {
1744
+ var r, c;
1745
+ if (p != y)
1746
+ c = p > y ? 1 : -1;
1747
+ else
1748
+ for (r = c = 0; r < p; r++)
1749
+ if (l[r] != o[r]) {
1750
+ c = l[r] > o[r] ? 1 : -1;
1751
+ break;
1752
+ }
1753
+ return c;
1754
+ }
1755
+ function s(l, o, p, y) {
1756
+ for (var r = 0; p--; )
1757
+ l[p] -= r, r = l[p] < o[p] ? 1 : 0, l[p] = r * y + l[p] - o[p];
1758
+ for (; !l[0] && l.length > 1; l.splice(0, 1)) ;
1759
+ }
1760
+ return function(l, o, p, y, r) {
1761
+ var c, f, u, A, F, k, v, M, V, O, P, $, Te, Se, Be, se, ge, Q = l.s == o.s ? 1 : -1, H = l.c, U = o.c;
1762
+ if (!H || !H[0] || !U || !U[0])
1763
+ return new b(
1764
+ // Return NaN if either NaN, or both Infinity or 0.
1765
+ !l.s || !o.s || (H ? U && H[0] == U[0] : !U) ? NaN : (
1766
+ // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
1767
+ H && H[0] == 0 || !U ? Q * 0 : Q / 0
1768
+ )
1769
+ );
1770
+ for (M = new b(Q), V = M.c = [], f = l.e - o.e, Q = p + f + 1, r || (r = ne, f = J(l.e / B) - J(o.e / B), Q = Q / B | 0), u = 0; U[u] == (H[u] || 0); u++) ;
1771
+ if (U[u] > (H[u] || 0) && f--, Q < 0)
1772
+ V.push(1), A = !0;
1773
+ else {
1774
+ for (Se = H.length, se = U.length, u = 0, Q += 2, F = Z(r / (U[0] + 1)), F > 1 && (U = t(U, F, r), H = t(H, F, r), se = U.length, Se = H.length), Te = se, O = H.slice(0, se), P = O.length; P < se; O[P++] = 0) ;
1775
+ ge = U.slice(), ge = [0].concat(ge), Be = U[0], U[1] >= r / 2 && Be++;
1776
+ do {
1777
+ if (F = 0, c = a(U, O, se, P), c < 0) {
1778
+ if ($ = O[0], se != P && ($ = $ * r + (O[1] || 0)), F = Z($ / Be), F > 1)
1779
+ for (F >= r && (F = r - 1), k = t(U, F, r), v = k.length, P = O.length; a(k, O, v, P) == 1; )
1780
+ F--, s(k, se < v ? ge : U, v, r), v = k.length, c = 1;
1781
+ else
1782
+ F == 0 && (c = F = 1), k = U.slice(), v = k.length;
1783
+ if (v < P && (k = [0].concat(k)), s(O, k, P, r), P = O.length, c == -1)
1784
+ for (; a(U, O, se, P) < 1; )
1785
+ F++, s(O, se < P ? ge : U, P, r), P = O.length;
1786
+ } else c === 0 && (F++, O = [0]);
1787
+ V[u++] = F, O[0] ? O[P++] = H[Te] || 0 : (O = [H[Te]], P = 1);
1788
+ } while ((Te++ < Se || O[0] != null) && Q--);
1789
+ A = O[0] != null, V[0] || V.splice(0, 1);
1790
+ }
1791
+ if (r == ne) {
1792
+ for (u = 1, Q = V[0]; Q >= 10; Q /= 10, u++) ;
1793
+ j(M, p + (M.e = u + f * B - 1) + 1, y, A);
1794
+ } else
1795
+ M.e = f, M.r = +A;
1796
+ return M;
1797
+ };
1798
+ })();
1799
+ function me(t, a, s, l) {
1800
+ var o, p, y, r, c;
1801
+ if (s == null ? s = x : N(s, 0, 8), !t.c) return t.toString();
1802
+ if (o = t.c[0], y = t.e, a == null)
1803
+ c = Y(t.c), c = l == 1 || l == 2 && (y <= C || y >= D) ? Fe(c, y) : de(c, y, "0");
1804
+ else if (t = j(new b(t), a, s), p = t.e, c = Y(t.c), r = c.length, l == 1 || l == 2 && (a <= p || p <= C)) {
1805
+ for (; r < a; c += "0", r++) ;
1806
+ c = Fe(c, p);
1807
+ } else if (a -= y + (l === 2 && p > y), c = de(c, p, "0"), p + 1 > r) {
1808
+ if (--a > 0) for (c += "."; a--; c += "0") ;
1809
+ } else if (a += p - r, a > 0)
1810
+ for (p + 1 == r && (c += "."); a--; c += "0") ;
1811
+ return t.s < 0 && o ? "-" + c : c;
1812
+ }
1813
+ function Ae(t, a) {
1814
+ for (var s, l, o = 1, p = new b(t[0]); o < t.length; o++)
1815
+ l = new b(t[o]), (!l.s || (s = ye(p, l)) === a || s === 0 && p.s === a) && (p = l);
1816
+ return p;
1817
+ }
1818
+ function be(t, a, s) {
1819
+ for (var l = 1, o = a.length; !a[--o]; a.pop()) ;
1820
+ for (o = a[0]; o >= 10; o /= 10, l++) ;
1821
+ return (s = l + s * B - 1) > T ? t.c = t.e = null : s < S ? t.c = [t.e = 0] : (t.e = s, t.c = a), t;
1822
+ }
1823
+ m = /* @__PURE__ */ (function() {
1824
+ var t = /^(-?)0([xbo])(?=\w[\w.]*$)/i, a = /^([^.]+)\.$/, s = /^\.([^.]+)$/, l = /^-?(Infinity|NaN)$/, o = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1825
+ return function(p, y, r, c) {
1826
+ var f, u = r ? y : y.replace(o, "");
1827
+ if (l.test(u))
1828
+ p.s = isNaN(u) ? null : u < 0 ? -1 : 1;
1829
+ else {
1830
+ if (!r && (u = u.replace(t, function(A, F, k) {
1831
+ return f = (k = k.toLowerCase()) == "x" ? 16 : k == "b" ? 2 : 8, !c || c == f ? F : A;
1832
+ }), c && (f = c, u = u.replace(a, "$1").replace(s, "0.$1")), y != u))
1833
+ return new b(u, f);
1834
+ if (b.DEBUG)
1835
+ throw Error(X + "Not a" + (c ? " base " + c : "") + " number: " + y);
1836
+ p.s = null;
1837
+ }
1838
+ p.c = p.e = null;
1839
+ };
1840
+ })();
1841
+ function j(t, a, s, l) {
1842
+ var o, p, y, r, c, f, u, A = t.c, F = Re;
1843
+ if (A) {
1844
+ e: {
1845
+ for (o = 1, r = A[0]; r >= 10; r /= 10, o++) ;
1846
+ if (p = a - o, p < 0)
1847
+ p += B, y = a, c = A[f = 0], u = Z(c / F[o - y - 1] % 10);
1848
+ else if (f = Oe((p + 1) / B), f >= A.length)
1849
+ if (l) {
1850
+ for (; A.length <= f; A.push(0)) ;
1851
+ c = u = 0, o = 1, p %= B, y = p - B + 1;
1852
+ } else
1853
+ break e;
1854
+ else {
1855
+ for (c = r = A[f], o = 1; r >= 10; r /= 10, o++) ;
1856
+ p %= B, y = p - B + o, u = y < 0 ? 0 : Z(c / F[o - y - 1] % 10);
1857
+ }
1858
+ if (l = l || a < 0 || // Are there any non-zero digits after the rounding digit?
1859
+ // The expression n % pows10[d - j - 1] returns all digits of n to the right
1860
+ // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
1861
+ A[f + 1] != null || (y < 0 ? c : c % F[o - y - 1]), l = s < 4 ? (u || l) && (s == 0 || s == (t.s < 0 ? 3 : 2)) : u > 5 || u == 5 && (s == 4 || l || s == 6 && // Check whether the digit to the left of the rounding digit is odd.
1862
+ (p > 0 ? y > 0 ? c / F[o - y] : 0 : A[f - 1]) % 10 & 1 || s == (t.s < 0 ? 8 : 7)), a < 1 || !A[0])
1863
+ return A.length = 0, l ? (a -= t.e + 1, A[0] = F[(B - a % B) % B], t.e = -a || 0) : A[0] = t.e = 0, t;
1864
+ if (p == 0 ? (A.length = f, r = 1, f--) : (A.length = f + 1, r = F[B - p], A[f] = y > 0 ? Z(c / F[o - y] % F[y]) * r : 0), l)
1865
+ for (; ; )
1866
+ if (f == 0) {
1867
+ for (p = 1, y = A[0]; y >= 10; y /= 10, p++) ;
1868
+ for (y = A[0] += r, r = 1; y >= 10; y /= 10, r++) ;
1869
+ p != r && (t.e++, A[0] == ne && (A[0] = 1));
1870
+ break;
1871
+ } else {
1872
+ if (A[f] += r, A[f] != ne) break;
1873
+ A[f--] = 0, r = 1;
1874
+ }
1875
+ for (p = A.length; A[--p] === 0; A.pop()) ;
1876
+ }
1877
+ t.e > T ? t.c = t.e = null : t.e < S && (t.c = [t.e = 0]);
1878
+ }
1879
+ return t;
1880
+ }
1881
+ function oe(t) {
1882
+ var a, s = t.e;
1883
+ return s === null ? t.toString() : (a = Y(t.c), a = s <= C || s >= D ? Fe(a, s) : de(a, s, "0"), t.s < 0 ? "-" + a : a);
1884
+ }
1885
+ return d.absoluteValue = d.abs = function() {
1886
+ var t = new b(this);
1887
+ return t.s < 0 && (t.s = 1), t;
1888
+ }, d.comparedTo = function(t, a) {
1889
+ return ye(this, new b(t, a));
1890
+ }, d.decimalPlaces = d.dp = function(t, a) {
1891
+ var s, l, o, p = this;
1892
+ if (t != null)
1893
+ return N(t, 0, W), a == null ? a = x : N(a, 0, 8), j(new b(p), t + p.e + 1, a);
1894
+ if (!(s = p.c)) return null;
1895
+ if (l = ((o = s.length - 1) - J(this.e / B)) * B, o = s[o]) for (; o % 10 == 0; o /= 10, l--) ;
1896
+ return l < 0 && (l = 0), l;
1897
+ }, d.dividedBy = d.div = function(t, a) {
1898
+ return n(this, new b(t, a), g, x);
1899
+ }, d.dividedToIntegerBy = d.idiv = function(t, a) {
1900
+ return n(this, new b(t, a), 0, 1);
1901
+ }, d.exponentiatedBy = d.pow = function(t, a) {
1902
+ var s, l, o, p, y, r, c, f, u, A = this;
1903
+ if (t = new b(t), t.c && !t.isInteger())
1904
+ throw Error(X + "Exponent not an integer: " + oe(t));
1905
+ if (a != null && (a = new b(a)), r = t.e > 14, !A.c || !A.c[0] || A.c[0] == 1 && !A.e && A.c.length == 1 || !t.c || !t.c[0])
1906
+ return u = new b(Math.pow(+oe(A), r ? t.s * (2 - we(t)) : +oe(t))), a ? u.mod(a) : u;
1907
+ if (c = t.s < 0, a) {
1908
+ if (a.c ? !a.c[0] : !a.s) return new b(NaN);
1909
+ l = !c && A.isInteger() && a.isInteger(), l && (A = A.mod(a));
1910
+ } else {
1911
+ if (t.e > 9 && (A.e > 0 || A.e < -1 || (A.e == 0 ? A.c[0] > 1 || r && A.c[1] >= 24e7 : A.c[0] < 8e13 || r && A.c[0] <= 9999975e7)))
1912
+ return p = A.s < 0 && we(t) ? -0 : 0, A.e > -1 && (p = 1 / p), new b(c ? 1 / p : p);
1913
+ I && (p = Oe(I / B + 2));
1914
+ }
1915
+ for (r ? (s = new b(0.5), c && (t.s = 1), f = we(t)) : (o = Math.abs(+oe(t)), f = o % 2), u = new b(h); ; ) {
1916
+ if (f) {
1917
+ if (u = u.times(A), !u.c) break;
1918
+ p ? u.c.length > p && (u.c.length = p) : l && (u = u.mod(a));
1919
+ }
1920
+ if (o) {
1921
+ if (o = Z(o / 2), o === 0) break;
1922
+ f = o % 2;
1923
+ } else if (t = t.times(s), j(t, t.e + 1, 1), t.e > 14)
1924
+ f = we(t);
1925
+ else {
1926
+ if (o = +oe(t), o === 0) break;
1927
+ f = o % 2;
1928
+ }
1929
+ A = A.times(A), p ? A.c && A.c.length > p && (A.c.length = p) : l && (A = A.mod(a));
1930
+ }
1931
+ return l ? u : (c && (u = h.div(u)), a ? u.mod(a) : p ? j(u, I, x, y) : u);
1932
+ }, d.integerValue = function(t) {
1933
+ var a = new b(this);
1934
+ return t == null ? t = x : N(t, 0, 8), j(a, a.e + 1, t);
1935
+ }, d.isEqualTo = d.eq = function(t, a) {
1936
+ return ye(this, new b(t, a)) === 0;
1937
+ }, d.isFinite = function() {
1938
+ return !!this.c;
1939
+ }, d.isGreaterThan = d.gt = function(t, a) {
1940
+ return ye(this, new b(t, a)) > 0;
1941
+ }, d.isGreaterThanOrEqualTo = d.gte = function(t, a) {
1942
+ return (a = ye(this, new b(t, a))) === 1 || a === 0;
1943
+ }, d.isInteger = function() {
1944
+ return !!this.c && J(this.e / B) > this.c.length - 2;
1945
+ }, d.isLessThan = d.lt = function(t, a) {
1946
+ return ye(this, new b(t, a)) < 0;
1947
+ }, d.isLessThanOrEqualTo = d.lte = function(t, a) {
1948
+ return (a = ye(this, new b(t, a))) === -1 || a === 0;
1949
+ }, d.isNaN = function() {
1950
+ return !this.s;
1951
+ }, d.isNegative = function() {
1952
+ return this.s < 0;
1953
+ }, d.isPositive = function() {
1954
+ return this.s > 0;
1955
+ }, d.isZero = function() {
1956
+ return !!this.c && this.c[0] == 0;
1957
+ }, d.minus = function(t, a) {
1958
+ var s, l, o, p, y = this, r = y.s;
1959
+ if (t = new b(t, a), a = t.s, !r || !a) return new b(NaN);
1960
+ if (r != a)
1961
+ return t.s = -a, y.plus(t);
1962
+ var c = y.e / B, f = t.e / B, u = y.c, A = t.c;
1963
+ if (!c || !f) {
1964
+ if (!u || !A) return u ? (t.s = -a, t) : new b(A ? y : NaN);
1965
+ if (!u[0] || !A[0])
1966
+ return A[0] ? (t.s = -a, t) : new b(u[0] ? y : (
1967
+ // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
1968
+ x == 3 ? -0 : 0
1969
+ ));
1970
+ }
1971
+ if (c = J(c), f = J(f), u = u.slice(), r = c - f) {
1972
+ for ((p = r < 0) ? (r = -r, o = u) : (f = c, o = A), o.reverse(), a = r; a--; o.push(0)) ;
1973
+ o.reverse();
1974
+ } else
1975
+ for (l = (p = (r = u.length) < (a = A.length)) ? r : a, r = a = 0; a < l; a++)
1976
+ if (u[a] != A[a]) {
1977
+ p = u[a] < A[a];
1978
+ break;
1979
+ }
1980
+ if (p && (o = u, u = A, A = o, t.s = -t.s), a = (l = A.length) - (s = u.length), a > 0) for (; a--; u[s++] = 0) ;
1981
+ for (a = ne - 1; l > r; ) {
1982
+ if (u[--l] < A[l]) {
1983
+ for (s = l; s && !u[--s]; u[s] = a) ;
1984
+ --u[s], u[l] += ne;
1985
+ }
1986
+ u[l] -= A[l];
1987
+ }
1988
+ for (; u[0] == 0; u.splice(0, 1), --f) ;
1989
+ return u[0] ? be(t, u, f) : (t.s = x == 3 ? -1 : 1, t.c = [t.e = 0], t);
1990
+ }, d.modulo = d.mod = function(t, a) {
1991
+ var s, l, o = this;
1992
+ return t = new b(t, a), !o.c || !t.s || t.c && !t.c[0] ? new b(NaN) : !t.c || o.c && !o.c[0] ? new b(o) : (R == 9 ? (l = t.s, t.s = 1, s = n(o, t, 0, 3), t.s = l, s.s *= l) : s = n(o, t, 0, R), t = o.minus(s.times(t)), !t.c[0] && R == 1 && (t.s = o.s), t);
1993
+ }, d.multipliedBy = d.times = function(t, a) {
1994
+ var s, l, o, p, y, r, c, f, u, A, F, k, v, M, V, O = this, P = O.c, $ = (t = new b(t, a)).c;
1995
+ if (!P || !$ || !P[0] || !$[0])
1996
+ return !O.s || !t.s || P && !P[0] && !$ || $ && !$[0] && !P ? t.c = t.e = t.s = null : (t.s *= O.s, !P || !$ ? t.c = t.e = null : (t.c = [0], t.e = 0)), t;
1997
+ for (l = J(O.e / B) + J(t.e / B), t.s *= O.s, c = P.length, A = $.length, c < A && (v = P, P = $, $ = v, o = c, c = A, A = o), o = c + A, v = []; o--; v.push(0)) ;
1998
+ for (M = ne, V = ue, o = A; --o >= 0; ) {
1999
+ for (s = 0, F = $[o] % V, k = $[o] / V | 0, y = c, p = o + y; p > o; )
2000
+ f = P[--y] % V, u = P[y] / V | 0, r = k * f + u * F, f = F * f + r % V * V + v[p] + s, s = (f / M | 0) + (r / V | 0) + k * u, v[p--] = f % M;
2001
+ v[p] = s;
2002
+ }
2003
+ return s ? ++l : v.splice(0, 1), be(t, v, l);
2004
+ }, d.negated = function() {
2005
+ var t = new b(this);
2006
+ return t.s = -t.s || null, t;
2007
+ }, d.plus = function(t, a) {
2008
+ var s, l = this, o = l.s;
2009
+ if (t = new b(t, a), a = t.s, !o || !a) return new b(NaN);
2010
+ if (o != a)
2011
+ return t.s = -a, l.minus(t);
2012
+ var p = l.e / B, y = t.e / B, r = l.c, c = t.c;
2013
+ if (!p || !y) {
2014
+ if (!r || !c) return new b(o / 0);
2015
+ if (!r[0] || !c[0]) return c[0] ? t : new b(r[0] ? l : o * 0);
2016
+ }
2017
+ if (p = J(p), y = J(y), r = r.slice(), o = p - y) {
2018
+ for (o > 0 ? (y = p, s = c) : (o = -o, s = r), s.reverse(); o--; s.push(0)) ;
2019
+ s.reverse();
2020
+ }
2021
+ for (o = r.length, a = c.length, o - a < 0 && (s = c, c = r, r = s, a = o), o = 0; a; )
2022
+ o = (r[--a] = r[a] + c[a] + o) / ne | 0, r[a] = ne === r[a] ? 0 : r[a] % ne;
2023
+ return o && (r = [o].concat(r), ++y), be(t, r, y);
2024
+ }, d.precision = d.sd = function(t, a) {
2025
+ var s, l, o, p = this;
2026
+ if (t != null && t !== !!t)
2027
+ return N(t, 1, W), a == null ? a = x : N(a, 0, 8), j(new b(p), t, a);
2028
+ if (!(s = p.c)) return null;
2029
+ if (o = s.length - 1, l = o * B + 1, o = s[o]) {
2030
+ for (; o % 10 == 0; o /= 10, l--) ;
2031
+ for (o = s[0]; o >= 10; o /= 10, l++) ;
2032
+ }
2033
+ return t && p.e + 1 > l && (l = p.e + 1), l;
2034
+ }, d.shiftedBy = function(t) {
2035
+ return N(t, -ve, ve), this.times("1e" + t);
2036
+ }, d.squareRoot = d.sqrt = function() {
2037
+ var t, a, s, l, o, p = this, y = p.c, r = p.s, c = p.e, f = g + 4, u = new b("0.5");
2038
+ if (r !== 1 || !y || !y[0])
2039
+ return new b(!r || r < 0 && (!y || y[0]) ? NaN : y ? p : 1 / 0);
2040
+ if (r = Math.sqrt(+oe(p)), r == 0 || r == 1 / 0 ? (a = Y(y), (a.length + c) % 2 == 0 && (a += "0"), r = Math.sqrt(+a), c = J((c + 1) / 2) - (c < 0 || c % 2), r == 1 / 0 ? a = "5e" + c : (a = r.toExponential(), a = a.slice(0, a.indexOf("e") + 1) + c), s = new b(a)) : s = new b(r + ""), s.c[0]) {
2041
+ for (c = s.e, r = c + f, r < 3 && (r = 0); ; )
2042
+ if (o = s, s = u.times(o.plus(n(p, o, f, 1))), Y(o.c).slice(0, r) === (a = Y(s.c)).slice(0, r))
2043
+ if (s.e < c && --r, a = a.slice(r - 3, r + 1), a == "9999" || !l && a == "4999") {
2044
+ if (!l && (j(o, o.e + g + 2, 0), o.times(o).eq(p))) {
2045
+ s = o;
2046
+ break;
2047
+ }
2048
+ f += 4, r += 4, l = 1;
2049
+ } else {
2050
+ (!+a || !+a.slice(1) && a.charAt(0) == "5") && (j(s, s.e + g + 2, 1), t = !s.times(s).eq(p));
2051
+ break;
2052
+ }
2053
+ }
2054
+ return j(s, s.e + g + 1, x, t);
2055
+ }, d.toExponential = function(t, a) {
2056
+ return t != null && (N(t, 0, W), t++), me(this, t, a, 1);
2057
+ }, d.toFixed = function(t, a) {
2058
+ return t != null && (N(t, 0, W), t = t + this.e + 1), me(this, t, a);
2059
+ }, d.toFormat = function(t, a, s) {
2060
+ var l, o = this;
2061
+ if (s == null)
2062
+ t != null && a && typeof a == "object" ? (s = a, a = null) : t && typeof t == "object" ? (s = t, t = a = null) : s = ie;
2063
+ else if (typeof s != "object")
2064
+ throw Error(X + "Argument not an object: " + s);
2065
+ if (l = o.toFixed(t, a), o.c) {
2066
+ var p, y = l.split("."), r = +s.groupSize, c = +s.secondaryGroupSize, f = s.groupSeparator || "", u = y[0], A = y[1], F = o.s < 0, k = F ? u.slice(1) : u, v = k.length;
2067
+ if (c && (p = r, r = c, c = p, v -= p), r > 0 && v > 0) {
2068
+ for (p = v % r || r, u = k.substr(0, p); p < v; p += r) u += f + k.substr(p, r);
2069
+ c > 0 && (u += f + k.slice(p)), F && (u = "-" + u);
2070
+ }
2071
+ l = A ? u + (s.decimalSeparator || "") + ((c = +s.fractionGroupSize) ? A.replace(
2072
+ new RegExp("\\d{" + c + "}\\B", "g"),
2073
+ "$&" + (s.fractionGroupSeparator || "")
2074
+ ) : A) : u;
2075
+ }
2076
+ return (s.prefix || "") + l + (s.suffix || "");
2077
+ }, d.toFraction = function(t) {
2078
+ var a, s, l, o, p, y, r, c, f, u, A, F, k = this, v = k.c;
2079
+ if (t != null && (r = new b(t), !r.isInteger() && (r.c || r.s !== 1) || r.lt(h)))
2080
+ throw Error(X + "Argument " + (r.isInteger() ? "out of range: " : "not an integer: ") + oe(r));
2081
+ if (!v) return new b(k);
2082
+ for (a = new b(h), f = s = new b(h), l = c = new b(h), F = Y(v), p = a.e = F.length - k.e - 1, a.c[0] = Re[(y = p % B) < 0 ? B + y : y], t = !t || r.comparedTo(a) > 0 ? p > 0 ? a : f : r, y = T, T = 1 / 0, r = new b(F), c.c[0] = 0; u = n(r, a, 0, 1), o = s.plus(u.times(l)), o.comparedTo(t) != 1; )
2083
+ s = l, l = o, f = c.plus(u.times(o = f)), c = o, a = r.minus(u.times(o = a)), r = o;
2084
+ return o = n(t.minus(s), l, 0, 1), c = c.plus(o.times(f)), s = s.plus(o.times(l)), c.s = f.s = k.s, p = p * 2, A = n(f, l, p, x).minus(k).abs().comparedTo(
2085
+ n(c, s, p, x).minus(k).abs()
2086
+ ) < 1 ? [f, l] : [c, s], T = y, A;
2087
+ }, d.toNumber = function() {
2088
+ return +oe(this);
2089
+ }, d.toPrecision = function(t, a) {
2090
+ return t != null && N(t, 1, W), me(this, t, a, 2);
2091
+ }, d.toString = function(t) {
2092
+ var a, s = this, l = s.s, o = s.e;
2093
+ return o === null ? l ? (a = "Infinity", l < 0 && (a = "-" + a)) : a = "NaN" : (t == null ? a = o <= C || o >= D ? Fe(Y(s.c), o) : de(Y(s.c), o, "0") : t === 10 && fe ? (s = j(new b(s), g + o + 1, x), a = de(Y(s.c), s.e, "0")) : (N(t, 2, ee.length, "Base"), a = i(de(Y(s.c), o, "0"), 10, t, l, !0)), l < 0 && s.c[0] && (a = "-" + a)), a;
2094
+ }, d.valueOf = d.toJSON = function() {
2095
+ return oe(this);
2096
+ }, d._isBigNumber = !0, d[Symbol.toStringTag] = "BigNumber", d[Symbol.for("nodejs.util.inspect.custom")] = d.valueOf, e != null && b.set(e), b;
2097
+ }
2098
+ function J(e) {
2099
+ var n = e | 0;
2100
+ return e > 0 || e === n ? n : n - 1;
2101
+ }
2102
+ function Y(e) {
2103
+ for (var n, i, m = 1, d = e.length, h = e[0] + ""; m < d; ) {
2104
+ for (n = e[m++] + "", i = B - n.length; i--; n = "0" + n) ;
2105
+ h += n;
2106
+ }
2107
+ for (d = h.length; h.charCodeAt(--d) === 48; ) ;
2108
+ return h.slice(0, d + 1 || 1);
2109
+ }
2110
+ function ye(e, n) {
2111
+ var i, m, d = e.c, h = n.c, g = e.s, x = n.s, C = e.e, D = n.e;
2112
+ if (!g || !x) return null;
2113
+ if (i = d && !d[0], m = h && !h[0], i || m) return i ? m ? 0 : -x : g;
2114
+ if (g != x) return g;
2115
+ if (i = g < 0, m = C == D, !d || !h) return m ? 0 : !d ^ i ? 1 : -1;
2116
+ if (!m) return C > D ^ i ? 1 : -1;
2117
+ for (x = (C = d.length) < (D = h.length) ? C : D, g = 0; g < x; g++) if (d[g] != h[g]) return d[g] > h[g] ^ i ? 1 : -1;
2118
+ return C == D ? 0 : C > D ^ i ? 1 : -1;
2119
+ }
2120
+ function N(e, n, i, m) {
2121
+ if (e < n || e > i || e !== Z(e))
2122
+ throw Error(X + (m || "Argument") + (typeof e == "number" ? e < n || e > i ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
2123
+ }
2124
+ function we(e) {
2125
+ var n = e.c.length - 1;
2126
+ return J(e.e / B) == n && e.c[n] % 2 != 0;
2127
+ }
2128
+ function Fe(e, n) {
2129
+ return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (n < 0 ? "e" : "e+") + n;
2130
+ }
2131
+ function de(e, n, i) {
2132
+ var m, d;
2133
+ if (n < 0) {
2134
+ for (d = i + "."; ++n; d += i) ;
2135
+ e = d + e;
2136
+ } else if (m = e.length, ++n > m) {
2137
+ for (d = i, n -= m; --n; d += i) ;
2138
+ e += d;
2139
+ } else n < m && (e = e.slice(0, n) + "." + e.slice(n));
2140
+ return e;
2141
+ }
2142
+ var E = Je();
2143
+ function nn(e) {
2144
+ 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.');
2145
+ }
2146
+ const an = {
2147
+ 1: { dex: { agent: { type: "default:odos-v2", router: "0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559", adapter: "0xC1bB4d5071Fe7109ae2D67AE05826A3fe9116cfc", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, sushiswap: { type: "default:sushi", router: "0xAC4c6e212A361c968F1725b4d055b47E63F80b75", adapter: "0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df", fee: "0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc" } } },
2148
+ 10: { dex: { agent: { type: "default:odos-v2", router: "0xCa423977156BB05b13A2BA3b76Bc5419E2fE9680", adapter: "0xC5Aea83Fdd94A19fB2ce0B7207939C52825D3D3B", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" } } },
2149
+ 14: { dex: { spark: { type: "default:spark", adapter: "0xB18c633B6584A33E45a8840a759f56dF17117b1D", fee: "0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b" } } },
2150
+ 56: { dex: { agent: { type: "default:odos-v2", router: "0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E", adapter: "0x67Feba015c968c76cCB2EEabf197b4578640BE2C", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, 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" } } },
2151
+ 137: { dex: { agent: { type: "default:odos-v2", router: "0x4E3288c9ca110bCC82bf38F09A7b425c095d92Bf", adapter: "0x75A3d70Fa6d054d31C896b9Cf8AB06b1c1B829B8", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, quick: { type: "paraswap:paraswap-v5", adapter: "0x023fD6848234f2655818705237F77F02215FEfe5", fee: "0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f" }, teafi: { type: "paraswap:paraswap-v5", adapter: "0xe95db7a60164B112C64cE67bA8587b1d4a0E0D29", fee: "0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50" } } },
2152
+ 143: { dex: { yowie: { type: "default:openocean-v2", adapter: "0x18bc9533c3539073B9A9acF12b0AbF7cB73e0F1f", fee: "0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef" }, pangolin: { type: "default:kyber-v2", adapter: "0xd7D9CAA2910f49F37AC3447f5cAd27153944354A", fee: "0xde92da99D188Ceb54A11ec711EF52D808A6260B5" } } },
2153
+ 146: { dex: { agent: { type: "default:odos-v2", router: "0xaC041Df48dF9791B0654f1Dbbf2CC8450C5f2e9D", adapter: "0x58fD209C81D84739BaD9c72C082350d67E713EEa", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, 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" } } },
2154
+ 1329: { dex: { dragon: { type: "default:dragon", adapter: "0x02d9d5882129241b67ec21Ebc2C86e1BE9BC9890", fee: "0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334" }, nami: { type: "default:openocean-v2", adapter: "0x2D4A1237A98f8cb03C3C85960e859aA44036a306", fee: "0xeB58450e23632003f013568703F54446070E2E80" } } },
2155
+ 5e3: { dex: { agent: { type: "default:odos-v2", router: "0xD9F4e85489aDCD0bAF0Cd63b4231c6af58c26745", adapter: "0x9571D46B5A5AAb749E5aCd698D8F20814C7B23D3", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" } } },
2156
+ 8453: { dex: { agent: { type: "default:odos-v2", router: "0x19cEeAd7105607Cd444F5ad10dd51356436095a1", adapter: "0x5906C4dD71D5afFe1a8f0215409E912eB5d593AD", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, quick: { type: "default:kyber-v2", adapter: "0xc73F03c929A123Ee2f3A98EC18BB240f03980AE5", fee: "0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f" }, sushiswap: { type: "default:sushi", router: "0xAC4c6e212A361c968F1725b4d055b47E63F80b75", adapter: "0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df", fee: "0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc" } } },
2157
+ 42161: { dex: { agent: { type: "default:odos-v2", router: "0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13", adapter: "0x026B8977319F67078e932a08feAcB59182B5380f", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, 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" }, sushiswap: { type: "default:sushi", router: "0xAC4c6e212A361c968F1725b4d055b47E63F80b75", adapter: "0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df", fee: "0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc" } } },
2158
+ 43114: { dex: { agent: { type: "default:odos-v2", router: "0x88de50B233052e4Fb783d4F6db78Cc34fEa3e9FC", adapter: "0x4F48041842827823D3750399eCa2832fC2E29201", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, blackhole: { type: "default:kyber-v2", adapter: "0x426ec4bc0d58B80959CDE77576a1942dd40592Fa", fee: "0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928" }, pangolin: { type: "default:kyber-v2", adapter: "0xd7D9CAA2910f49F37AC3447f5cAd27153944354A", fee: "0xde92da99D188Ceb54A11ec711EF52D808A6260B5" } } },
2159
+ 59144: { dex: { agent: { type: "default:odos-v2", router: "0x2d8879046f1559E53eb052E949e9544bCB72f414", adapter: "0x55E4da2cd634729064bEb294EC682Dc94f5c3f24", fee: "0x03A70aC8126340d3cd6b5828816172693C398661" }, lynex: { type: "default:openocean", adapter: "0x4FF6A97A67fe395212f168f011D71fE79E4396f2", fee: "0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423" } } },
2160
+ 80094: { dex: { kodiak: { type: "default:kodiak", adapter: "0xBbaa527Aac00b1Ee9A3909D4D8c4447630E29B1F", fee: "0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4" } } },
2161
+ 747474: { dex: { sushiswap: { type: "default:sushi", router: "0xAC4c6e212A361c968F1725b4d055b47E63F80b75", adapter: "0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df", fee: "0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc" } } },
2162
+ "*": { wm: "0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000", repermit: "0x00002a9C4D9497df5Bd31768eC5d30eEf5405000", cosigner: "0x000ECFa392ecDEfEE6e2a5C095d39B7A32f1E000", reactor: "0x000000b33fE4fB9d999Dd684F79b110731c3d000", executor: "0x000642A0966d9bd49870D9519f76b5cf823f3000", refinery: "0x000E474c0D7084EAA35A501035E73269f4b009A5", salt: { wm: "0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152", repermit: "0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7", cosigner: "0x1117fe6f4e25c9380d10b2b3314a1e9b33e5f65ba0e55e0c63d0640db0dd60a2", reactor: "0xec73677f3a465a9755d4c9eab9509b59a24613fdb8b78719682930373e9876f5", executor: "0x9abc67d936f79e493f1f14050c2f6adb87ec208ff7aaae2e7ae788a7cb4796d7", refinery: "0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec" } }
2163
+ };
2164
+ var Pe, Xe;
2165
+ function sn() {
2166
+ if (Xe) return Pe;
2167
+ Xe = 1;
2168
+ const e = an, n = (d) => nn(`./out/${d}.sol/${d}.json`).abi, i = () => ({
2169
+ wm: n("WM"),
2170
+ repermit: n("RePermit"),
2171
+ reactor: n("OrderReactor"),
2172
+ executor: n("Executor"),
2173
+ refinery: n("Refinery"),
2174
+ settler: n("Settler"),
2175
+ adapter: n("DefaultDexAdapter")
2176
+ });
2177
+ function m(d, h) {
2178
+ if (!d) return;
2179
+ const { dex: g, ...x } = e["*"] ?? {}, C = e[d];
2180
+ if (!C) return;
2181
+ const { dex: D, ...S } = C;
2182
+ if (!(h != null && h.trim()))
2183
+ return { ...x, ...S };
2184
+ const T = D == null ? void 0 : D[h];
2185
+ if (T)
2186
+ return { ...x, ...S, ...T };
2187
+ }
2188
+ return Pe = { config: m, abis: i, raw: e }, Pe;
2189
+ }
2190
+ var et = sn();
2191
+ const he = (e, n) => {
2192
+ if (!e || !n) return "";
2193
+ const i = E(10).pow(e || 0);
2194
+ return E(n).times(i).idiv(i).div(i).toFixed();
2195
+ };
2196
+ E(0);
2197
+ E(1);
2198
+ E(10);
2199
+ E(1e18);
2200
+ function De(e, n) {
2201
+ return e == n || e.toLowerCase() == n.toLowerCase();
2202
+ }
2203
+ const ra = (e) => !!Yt.find((n) => De(n, e || ""));
2204
+ function rn(e) {
2205
+ return [
2206
+ ae.Years,
2207
+ ae.Months,
2208
+ ae.Weeks,
2209
+ ae.Days,
2210
+ ae.Hours,
2211
+ ae.Minutes
2212
+ ].find((i) => i <= e) || ae.Minutes;
2213
+ }
2214
+ const le = (e) => e ? e.value * e.unit : 0, on = (e) => !e || e === "NaN" ? "0" : E(e).decimalPlaces(0).toFixed(), ia = (e) => Object.values(K).find((n) => n.id === e), dn = (e) => {
2215
+ if (!e) return;
2216
+ const n = e.map((h) => G(h)), i = Object.entries(Zt).filter(([h]) => n.includes(h)).flatMap(([, h]) => h), m = e.map((h) => h.exchangeAddress), d = new Set(
2217
+ [...m, ...i].map((h) => h.toLowerCase())
2218
+ );
2219
+ return Array.from(d);
2220
+ }, oa = (e, n) => e.version === 1 ? (e.fillDelay || 0) * 1e3 + cn(n) : (e.fillDelay || 0) * 1e3, ke = (e) => typeof window > "u" ? null : new URLSearchParams(window.location.search).get(e), da = (e) => ln().filter((n) => n.name === e).map((n) => n.chainId), ca = (e = "", n = "", i = 18, m = 18) => {
2221
+ if (!E(e || 0).gt(0) || !E(n || 0).gt(0))
2222
+ return "";
2223
+ const d = he(i, e), h = he(m, n);
2224
+ return E(h).div(d).toFixed();
2225
+ }, pa = (e, n, i) => {
2226
+ if (e.type === q.TWAP_MARKET) return "";
2227
+ const m = he(n, e.srcAmountPerTrade), d = he(i, e.dstMinAmountPerTrade);
2228
+ return E(d).div(m).toFixed();
2229
+ }, ua = (e, n, i) => {
2230
+ if (e.type === q.TWAP_MARKET) return "";
2231
+ const m = he(n, e.srcAmountPerTrade), d = he(i, e.triggerPricePerTrade);
2232
+ return E(d).div(m).toFixed();
2233
+ }, la = (e, n, i) => {
2234
+ if (!e || !n || !i) return;
2235
+ const m = E(e).times(n), d = E(10).pow(i);
2236
+ return m.div(d).toFixed(0);
2237
+ }, fa = (e, n, i, m) => {
2238
+ if (i || !m || !e || !n)
2239
+ return E(0).toString();
2240
+ const d = E(e).times(E(n)), h = E(10).pow(m), g = d.div(h);
2241
+ return E.max(1, g).integerValue(E.ROUND_FLOOR).toFixed(0);
2242
+ }, ma = (e, n, i, m) => {
2243
+ if (e === z.TWAP || e === z.LIMIT)
2244
+ return "0";
2245
+ if (!m || !n || !i) return;
2246
+ const d = E(n).times(E(i)), h = E(10).pow(m), g = d.div(h);
2247
+ return E.max(1, g).integerValue(E.ROUND_FLOOR).toFixed(0) || "0";
2248
+ }, ya = (e, n, i, m) => {
2249
+ const d = le(i) * 2 * n, h = ke(xe.DURATION), g = rn(h ? Number(h) : d);
2250
+ return h ? { unit: g, value: Number(E(Number(h) / g).toFixed(2)) } : m || (e === z.LIMIT ? { unit: ae.Days, value: 7 } : e === z.STOP_LOSS || e === z.TAKE_PROFIT ? { unit: ae.Days, value: 1 } : { unit: g, value: Number(E(d / g).toFixed(2)) });
2251
+ }, ha = (e, n, i) => n !== z.TWAP ? 1 : i !== void 0 ? i : e, Aa = (e, n, i, m) => {
2252
+ if (!n || !i || !m) return 1;
2253
+ const h = E(i).times(n).div(m).integerValue(E.ROUND_FLOOR).toNumber(), g = Math.floor(
2254
+ Ee / 2 / le(e)
2255
+ );
2256
+ return Math.max(1, Math.min(h, g));
2257
+ }, ba = (e, n) => e + le(n) + 6e4, cn = (e) => e.bidDelaySeconds * 1e3 * 2, ga = (e = "", n = 0) => !e || !n ? "0" : E(e).div(n).integerValue(E.ROUND_FLOOR).toFixed(0), Ea = (e, n) => ({
2258
+ isError: !(e.unit === Ge.unit && e.value === Ge.value) && le(e) * n > Ee,
2259
+ value: Math.floor(Ee / n)
2260
+ }), xa = (e = "", n = "", i) => {
2261
+ if (i === z.STOP_LOSS)
2262
+ return {
2263
+ isError: E(n || 0).gte(E(e || 0)),
2264
+ value: e
2265
+ };
2266
+ }, Ta = (e = "", n = "", i) => {
2267
+ if (i === z.TAKE_PROFIT)
2268
+ return {
2269
+ isError: E(n || 0).lte(E(e || 0)),
2270
+ value: e
2271
+ };
2272
+ }, Ca = (e = "", n = "", i = !1, m) => {
2273
+ if (!i && m === z.STOP_LOSS)
2274
+ return {
2275
+ isError: E(n || 0).gte(E(e || 0)),
2276
+ value: e
2277
+ };
2278
+ }, wa = (e = "", n = "", i = !1, m) => {
2279
+ if (!i && m === z.TAKE_PROFIT)
2280
+ return {
2281
+ isError: E(n || 0).gte(E(e || 0)),
2282
+ value: e
2283
+ };
2284
+ }, Fa = (e, n) => e === z.STOP_LOSS || e === z.TAKE_PROFIT ? {
2285
+ isError: le(n) > 5184e6,
2286
+ value: 5184e6
2287
+ } : {
2288
+ isError: le(n) > Ee,
2289
+ // 365 days
2290
+ value: Ee
2291
+ }, Da = (e) => ({
2292
+ isError: le(e) < Ke,
2293
+ value: Ke
2294
+ }), ka = (e) => ({
2295
+ isError: le(e) < Me,
2296
+ value: Me
2297
+ }), Sa = (e, n, i) => ({
2298
+ isError: E(n || 0).multipliedBy(e || 0).isLessThan(i),
2299
+ value: i
2300
+ }), Ba = (e, n, i) => ({
2301
+ isError: i === z.TWAP && E(e).isGreaterThan(n),
2302
+ value: n
2303
+ }), pn = (e, n) => {
2304
+ if (e === pe.Pancake)
2305
+ switch (n) {
2306
+ case 56:
2307
+ return _.PancakeSwap;
2308
+ case 42161:
2309
+ return _.PancakeSwapArbitrum;
2310
+ case 8453:
2311
+ return _.PancakeSwapBase;
2312
+ case 59144:
2313
+ return _.PancakeSwapLinea;
2314
+ default:
2315
+ return _.PancakeSwap;
2316
+ }
2317
+ if (e === pe.Sushiswap)
2318
+ switch (n) {
2319
+ case 1:
2320
+ return _.SushiEth;
2321
+ case 42161:
2322
+ return _.SushiArb;
2323
+ case 8453:
2324
+ return _.SushiBase;
2325
+ case 747474:
2326
+ return _.SushiKatana;
2327
+ default:
2328
+ return _.SushiEth;
2329
+ }
2330
+ if (e === pe.Quick)
2331
+ switch (n) {
2332
+ case 137:
2333
+ return _.QuickSwap;
2334
+ case 8453:
2335
+ return _.QuickSwapBase;
2336
+ default:
2337
+ return _.QuickSwap;
2338
+ }
2339
+ if (e === pe.Thena)
2340
+ switch (n) {
2341
+ case 56:
2342
+ return _.Thena;
2343
+ default:
2344
+ return _.Thena;
2345
+ }
2346
+ if (e === pe.Spooky)
2347
+ switch (n) {
2348
+ case 250:
2349
+ return _.SpookySwap;
2350
+ case 146:
2351
+ return _.SpookySwapSonic;
2352
+ default:
2353
+ return _.SpookySwap;
2354
+ }
2355
+ if (e === pe.Lynex)
2356
+ switch (n) {
2357
+ case 59144:
2358
+ return _.Lynex;
2359
+ default:
2360
+ return _.Lynex;
2361
+ }
2362
+ if (e === pe.Swapx)
2363
+ switch (n) {
2364
+ case 146:
2365
+ return _.SwapX;
2366
+ default:
2367
+ return _.SwapX;
2368
+ }
2369
+ if (e === pe.Blackhole)
2370
+ switch (n) {
2371
+ case 43114:
2372
+ return _.BlackholeAvax;
2373
+ default:
2374
+ return _.BlackholeAvax;
2375
+ }
2376
+ }, un = (e, n = 0) => {
2377
+ const { abi: i, ...m } = et.config(n, e);
2378
+ if (!m.reactor)
2379
+ throw new Error(
2380
+ `Missing config for partner "${e}" on chain ${n}: reactor address not found`
2381
+ );
2382
+ return {
2383
+ ...m,
2384
+ partner: e,
2385
+ twapConfig: pn(e, n)
2386
+ };
2387
+ }, ln = () => {
2388
+ const e = et.raw;
2389
+ return Object.entries(e).filter(([n]) => n !== "*").flatMap(([n, i]) => {
2390
+ const m = i == null ? void 0 : i.dex;
2391
+ return !m || typeof m != "object" ? [] : Object.entries(m).map(([d]) => ({
2392
+ chainId: Number(n),
2393
+ name: d,
2394
+ config: un(d, Number(n))
2395
+ }));
2396
+ }).sort((n, i) => n.name.localeCompare(i.name));
2397
+ }, _a = (e) => {
2398
+ const n = ke(
2399
+ xe.MIN_CHUNK_SIZE_USD
2400
+ );
2401
+ return n ? parseInt(n) : e;
2402
+ }, Oa = ({
2403
+ marketPrice: e,
2404
+ typedInputAmount: n,
2405
+ srcUsd1Token: i,
2406
+ marketPriceLoading: m,
2407
+ triggerPriceError: d,
2408
+ limitPriceError: h,
2409
+ tradesError: g,
2410
+ fillDelayError: x,
2411
+ durationError: C,
2412
+ balanceError: D,
2413
+ minTradeSizeError: S
2414
+ }) => {
2415
+ if (!ke(xe.IGNORE_ERRORS) && !(E(e || 0).isZero() || E(n || 0).isZero() || E(i || "0").isZero() || m))
2416
+ return S || d || h || g || x || C || D;
2417
+ }, tt = (e, n) => {
2418
+ const i = Date.now().toString(), m = parseInt((e / 1e3).toFixed(0)), d = on(n / 1e3), h = ke(xe.FRESHNESS), g = h ? parseInt(h) : 60;
2419
+ return {
2420
+ nonce: i,
2421
+ epoch: m,
2422
+ deadline: d,
2423
+ freshness: g
2424
+ };
2425
+ }, fn = ({
2426
+ chainId: e,
2427
+ srcToken: n,
2428
+ dstToken: i,
2429
+ srcAmount: m,
2430
+ deadlineMillis: d,
2431
+ fillDelayMillis: h,
2432
+ slippage: g,
2433
+ account: x,
2434
+ srcAmountPerTrade: C,
2435
+ dstMinAmountPerTrade: D = "0",
2436
+ triggerAmountPerTrade: S = "0",
2437
+ config: T,
2438
+ module: w
2439
+ }) => {
2440
+ const { nonce: R, epoch: I, deadline: ie, freshness: ee } = tt(
2441
+ h,
2442
+ d
2443
+ ), fe = w === z.TAKE_PROFIT ? ze : S, b = w === z.TAKE_PROFIT ? S : D, me = {
2444
+ permitted: {
2445
+ token: n,
2446
+ amount: m
2447
+ },
2448
+ spender: T.reactor,
2449
+ nonce: R,
2450
+ deadline: ie,
2451
+ witness: {
2452
+ reactor: T.reactor,
2453
+ executor: T.executor,
2454
+ exchange: {
2455
+ adapter: T.adapter,
2456
+ ref: T.fee,
2457
+ share: 0,
2458
+ data: "0x"
2459
+ },
2460
+ swapper: x,
2461
+ nonce: R,
2462
+ deadline: ie,
2463
+ chainid: e,
2464
+ exclusivity: 0,
2465
+ epoch: I,
2466
+ slippage: g,
2467
+ freshness: ee,
2468
+ input: {
2469
+ token: n,
2470
+ amount: C,
2471
+ maxAmount: m
2472
+ },
2473
+ output: {
2474
+ token: i,
2475
+ limit: E(b || 0).toFixed(),
2476
+ stop: E(fe || 0).toFixed(),
2477
+ recipient: x
2478
+ }
2479
+ }
2480
+ };
2481
+ return {
2482
+ domain: {
2483
+ name: "RePermit",
2484
+ version: "1",
2485
+ chainId: e,
2486
+ verifyingContract: T.repermit
2487
+ },
2488
+ order: me,
2489
+ types: Jt,
2490
+ primaryType: Ze
2491
+ };
2492
+ }, mn = ({
2493
+ chainId: e,
2494
+ srcToken: n,
2495
+ dstToken: i,
2496
+ srcAmount: m,
2497
+ deadlineMillis: d,
2498
+ fillDelayMillis: h,
2499
+ slippage: g,
2500
+ account: x,
2501
+ srcAmountPerTrade: C,
2502
+ dstMinAmountPerTrade: D = "0",
2503
+ triggerAmountPerTrade: S = "0",
2504
+ config: T,
2505
+ module: w
2506
+ }) => {
2507
+ const { nonce: R, epoch: I, deadline: ie, freshness: ee } = tt(
2508
+ h,
2509
+ d
2510
+ ), fe = Math.floor(Date.now() / 1e3).toString(), b = D, me = w === z.STOP_LOSS ? S : "0", Ae = w === z.TAKE_PROFIT ? S : "0", be = {
2511
+ permitted: {
2512
+ token: n,
2513
+ amount: m
2514
+ },
2515
+ spender: T.reactor,
2516
+ nonce: R,
2517
+ deadline: ie,
2518
+ witness: {
2519
+ reactor: T.reactor,
2520
+ executor: T.executor,
2521
+ exchange: {
2522
+ adapter: T.adapter,
2523
+ ref: T.fee,
2524
+ share: 0,
2525
+ data: "0x"
2526
+ },
2527
+ swapper: x,
2528
+ nonce: R,
2529
+ start: fe,
2530
+ deadline: ie,
2531
+ chainid: e,
2532
+ exclusivity: 0,
2533
+ epoch: I,
2534
+ slippage: g,
2535
+ freshness: ee,
2536
+ input: {
2537
+ token: n,
2538
+ amount: C,
2539
+ maxAmount: m
2540
+ },
2541
+ output: {
2542
+ token: i,
2543
+ limit: E(b || 0).toFixed(),
2544
+ triggerLower: E(me || 0).toFixed(),
2545
+ triggerUpper: E(Ae || 0).toFixed(),
2546
+ recipient: x
2547
+ }
2548
+ }
2549
+ };
2550
+ return {
2551
+ domain: {
2552
+ name: "RePermit",
2553
+ version: "1",
2554
+ chainId: e,
2555
+ verifyingContract: T.repermit
2556
+ },
2557
+ order: be,
2558
+ types: en,
2559
+ primaryType: Ze
2560
+ };
2561
+ }, va = (e) => Number(We) >= 2 ? mn(e) : fn(e), yn = 0.7, hn = `https://bi.orbs.network/putes/twap-ui-${yn}`;
2562
+ let Ue = "unknown";
2563
+ function Ra(e) {
2564
+ Ue = e;
2565
+ }
2566
+ function Ie() {
2567
+ const e = Math.random().toString(36).substring(2, 16), n = Math.random().toString(36).substring(2, 16), i = Date.now().toString(36);
2568
+ return `id_${e + n + i}`;
2569
+ }
2570
+ const An = (e, n, i) => {
2571
+ var m, d, h, g, x, C, D, S, T;
2572
+ return {
2573
+ spotVersion: Ve.version,
2574
+ partner: e.partner,
2575
+ adapter: e.adapter,
2576
+ cosigner: e.cosigner,
2577
+ executor: e.executor,
2578
+ fee: e.fee,
2579
+ reactor: e.reactor,
2580
+ refinery: e.refinery,
2581
+ repermit: e.repermit,
2582
+ router: e.router,
2583
+ type: e.type,
2584
+ wm: e.wm,
2585
+ chainName: ((m = e.twapConfig) == null ? void 0 : m.chainName) || "",
2586
+ chainId: i || 0,
2587
+ twapVersion: ((d = e.twapConfig) == null ? void 0 : d.twapVersion) || 0,
2588
+ twapAddress: ((h = e.twapConfig) == null ? void 0 : h.twapAddress) || "",
2589
+ lensAddress: ((g = e.twapConfig) == null ? void 0 : g.lensAddress) || "",
2590
+ bidDelaySeconds: ((x = e.twapConfig) == null ? void 0 : x.bidDelaySeconds) || 0,
2591
+ minChunkSizeUsd: n,
2592
+ name: ((C = e.twapConfig) == null ? void 0 : C.name) || "",
2593
+ exchangeAddress: ((D = e.twapConfig) == null ? void 0 : D.exchangeAddress) || "",
2594
+ exchangeType: ((S = e.twapConfig) == null ? void 0 : S.exchangeType) || "",
2595
+ pathfinderKey: ((T = e.twapConfig) == null ? void 0 : T.pathfinderKey) || ""
2596
+ };
2597
+ }, je = async (e) => {
2598
+ try {
2599
+ await fetch(hn, {
2600
+ method: "POST",
2601
+ headers: {
2602
+ Accept: "application/json",
2603
+ "Content-Type": "application/json"
2604
+ },
2605
+ body: JSON.stringify(e)
2606
+ }).then();
2607
+ } catch (n) {
2608
+ console.error("Failed to send BI", n);
2609
+ }
2610
+ };
2611
+ class bn {
2612
+ constructor() {
2613
+ Ce(this, "timeout");
2614
+ Ce(this, "config");
2615
+ Ce(this, "data", {
2616
+ _id: Ie()
2617
+ });
2618
+ }
2619
+ async updateAndSend(n = {}, i = !1, m) {
2620
+ try {
2621
+ this.data = {
2622
+ ...this.data,
2623
+ ...n
2624
+ }, i ? (await je(this.data), m == null || m()) : (clearTimeout(this.timeout), this.timeout = setTimeout(() => {
2625
+ je(this.data), m == null || m();
2626
+ }, 1e3));
2627
+ } catch (d) {
2628
+ console.error("Failed to update and send BI", d);
2629
+ }
2630
+ }
2631
+ onCancelOrderRequest(n, i) {
2632
+ this.updateAndSend({
2633
+ cancelOrderIdsV1: i === 1 ? n : void 0,
2634
+ cancelOrderIdsV2: i === 2 ? n : void 0,
2635
+ action: "cancel order",
2636
+ cancelOrderSuccess: !1,
2637
+ cancelOrderTxHash: void 0,
2638
+ actionError: void 0
2639
+ });
2640
+ }
2641
+ onCancelOrderSuccess(n) {
2642
+ this.updateAndSend({
2643
+ cancelOrderTxHash: n,
2644
+ cancelOrderSuccess: !0
2645
+ });
2646
+ }
2647
+ onCancelOrderError(n) {
2648
+ this.onTxError(n);
2649
+ }
2650
+ onWrapSuccess(n) {
2651
+ this.updateAndSend({
2652
+ wrapTxHash: n
2653
+ });
2654
+ }
2655
+ onWrapRequest() {
2656
+ this.updateAndSend({
2657
+ action: "wrap"
2658
+ });
2659
+ }
2660
+ onWrapError(n) {
2661
+ this.onTxError(n);
2662
+ }
2663
+ onApproveRequest() {
2664
+ this.updateAndSend({
2665
+ action: "approve"
2666
+ });
2667
+ }
2668
+ onApproveSuccess(n) {
2669
+ this.updateAndSend({
2670
+ approvalTxHash: n
2671
+ });
2672
+ }
2673
+ onApproveError(n) {
2674
+ this.onTxError(n);
2675
+ }
2676
+ onCrash(n) {
2677
+ var i;
2678
+ this.updateAndSend({ action: "crash", actionError: ((i = n == null ? void 0 : n.message) == null ? void 0 : i.toLowerCase()) || (n == null ? void 0 : n.toLowerCase()) });
2679
+ }
2680
+ onTxError(n) {
2681
+ var m;
2682
+ const i = ((m = n == null ? void 0 : n.message) == null ? void 0 : m.toLowerCase()) || (n == null ? void 0 : n.toLowerCase());
2683
+ this.updateAndSend({ actionError: i });
2684
+ }
2685
+ onRequestOrder({
2686
+ account: n,
2687
+ chainId: i,
2688
+ module: m,
2689
+ srcToken: d,
2690
+ dstToken: h,
2691
+ fromTokenAmount: g,
2692
+ srcChunkAmount: x,
2693
+ minDstAmountOutPerTrade: C = "",
2694
+ triggerPricePerTrade: D = "",
2695
+ deadline: S,
2696
+ fillDelay: T,
2697
+ slippage: w,
2698
+ isMarketOrder: R,
2699
+ chunksAmount: I
2700
+ }) {
2701
+ this.updateAndSend({
2702
+ toTokenAddress: h.address,
2703
+ toTokenSymbol: h.symbol,
2704
+ fromTokenAddress: d.address,
2705
+ fromTokenSymbol: d.symbol,
2706
+ fromTokenAmount: g,
2707
+ chunksAmount: I,
2708
+ srcChunkAmount: x,
2709
+ minDstAmountOutPerTrade: C,
2710
+ triggerPricePerTrade: D,
2711
+ deadline: S,
2712
+ fillDelay: T,
2713
+ slippage: w,
2714
+ chainId: i,
2715
+ walletAddress: n,
2716
+ module: m,
2717
+ orderType: R ? "market" : "limit",
2718
+ actionError: void 0
2719
+ });
2720
+ }
2721
+ onSignOrderRequest(n) {
2722
+ this.updateAndSend({
2723
+ action: "sign order",
2724
+ order: n
2725
+ });
2726
+ }
2727
+ onSignOrderError(n) {
2728
+ this.onTxError(n);
2729
+ }
2730
+ onSignOrderSuccess(n) {
2731
+ this.updateAndSend({
2732
+ action: "sign order",
2733
+ signature: n
2734
+ });
2735
+ }
2736
+ init(n, i, m) {
2737
+ var d;
2738
+ this.config = n, m !== ((d = this.data) == null ? void 0 : d.chainId) && (this.data = {
2739
+ _id: Ie(),
2740
+ action: "module-import",
2741
+ uiVersion: Ue,
2742
+ ...An(n, i, m),
2743
+ origin: window.location.origin
2744
+ }, this.updateAndSend(this.data));
2745
+ }
2746
+ onCreateOrderError(n) {
2747
+ this.onTxError(n);
2748
+ }
2749
+ onCreateOrderRequest() {
2750
+ this.updateAndSend({
2751
+ action: "create order"
2752
+ });
2753
+ }
2754
+ async onCreateOrderSuccess(n) {
2755
+ this.updateAndSend(
2756
+ {
2757
+ orderHash: n,
2758
+ orderSuccess: !0
2759
+ },
2760
+ void 0,
2761
+ () => {
2762
+ this.data = {
2763
+ _id: Ie(),
2764
+ action: "reset",
2765
+ uiVersion: Ue,
2766
+ origin: this.data.origin,
2767
+ spotVersion: Ve.version,
2768
+ partner: this.data.partner,
2769
+ adapter: this.data.adapter,
2770
+ cosigner: this.data.cosigner,
2771
+ executor: this.data.executor,
2772
+ fee: this.data.fee,
2773
+ reactor: this.data.reactor,
2774
+ refinery: this.data.refinery,
2775
+ repermit: this.data.repermit,
2776
+ router: this.data.router,
2777
+ type: this.data.type,
2778
+ wm: this.data.wm,
2779
+ chainName: this.data.chainName || "",
2780
+ chainId: this.data.chainId || 0,
2781
+ twapVersion: this.data.twapVersion || 0,
2782
+ twapAddress: this.data.twapAddress || "",
2783
+ lensAddress: this.data.lensAddress || "",
2784
+ bidDelaySeconds: this.data.bidDelaySeconds || 0,
2785
+ minChunkSizeUsd: this.data.minChunkSizeUsd || 0,
2786
+ name: this.data.name || "",
2787
+ exchangeAddress: this.data.exchangeAddress || "",
2788
+ exchangeType: this.data.exchangeType || "",
2789
+ pathfinderKey: this.data.pathfinderKey || ""
2790
+ };
2791
+ }
2792
+ );
2793
+ }
2794
+ onLoad() {
2795
+ this.updateAndSend({
2796
+ action: "module-import",
2797
+ origin: window.location.origin
2798
+ });
2799
+ }
2800
+ }
2801
+ const Ne = new bn(), gn = (e) => {
2802
+ var x;
2803
+ const n = E(e.order.witness.output.limit || 0).gt(1), i = e.order.witness.output.stop, m = e.order.witness.output.triggerUpper, d = E(i || 0).eq(ze) || E(m || 0).gt(0), h = E(i || 0).gt(0), g = ((x = e.metadata.chunks) == null ? void 0 : x.length) || E(e.order.witness.input.maxAmount).div(E(e.order.witness.input.amount)).toNumber();
2804
+ return d ? q.TAKE_PROFIT : h ? n ? q.STOP_LOSS_LIMIT : q.STOP_LOSS_MARKET : n ? g > 1 && n ? q.TWAP_LIMIT : n ? q.LIMIT : q.TWAP_MARKET : q.TWAP_MARKET;
2805
+ }, En = (e) => {
2806
+ var d;
2807
+ const n = ((d = e.metadata.chunks) == null ? void 0 : d.filter((h) => h.status === "success").length) || 0, i = e.metadata.expectedChunks || 0, m = E(n).dividedBy(i).toNumber();
2808
+ return m >= 0.99 ? 100 : m <= 0 ? 0 : Number((m * 100).toFixed(2));
2809
+ }, xn = (e, n) => e.metadata.status === "completed" || n >= 99 ? re.Completed : ["pending", "eligible"].includes(e.metadata.status) ? re.Open : e.metadata.description.toLowerCase() === "cancelled by contract" ? re.Cancelled : re.Expired, Tn = (e) => {
2810
+ var i;
2811
+ return (((i = e.metadata.chunks) == null ? void 0 : i.filter((m) => m.status === "success")) || []).map((m) => ({
2812
+ inAmount: m.inAmount,
2813
+ outAmount: m.outAmount,
2814
+ timestamp: new Date(m.timestamp).getTime(),
2815
+ txHash: m.txHash
2816
+ }));
2817
+ }, Cn = (e, n) => {
2818
+ var m;
2819
+ const i = e.length;
2820
+ return i >= n && ((m = e[i - 1]) == null ? void 0 : m.timestamp) || 0;
2821
+ }, wn = (e) => E(e.metadata.displayOnlyInputTokenPriceUSD).dividedBy(1e18).toFixed(), $e = (e) => Number(e.order.witness.output.limit) === 1 ? "" : e.order.witness.output.limit, Fn = (e) => {
2822
+ const {
2823
+ triggerLower: n = "0",
2824
+ triggerUpper: i = "0"
2825
+ } = e.order.witness.output, m = $e(e), d = e.metadata.expectedChunks || 1, h = E(i || 0).gt(0);
2826
+ return {
2827
+ dstMinAmountPerTrade: m,
2828
+ triggerPricePerTrade: h ? i : n,
2829
+ dstMinAmountTotal: E(m).multipliedBy(d).toFixed()
2830
+ };
2831
+ }, Dn = (e) => {
2832
+ const n = $e(e), i = E(e.order.witness.output.stop || 0).eq(ze), m = e.metadata.expectedChunks || 1;
2833
+ return {
2834
+ dstMinAmountPerTrade: i ? "" : n,
2835
+ triggerPricePerTrade: i ? n : E(e.order.witness.output.stop || "").toFixed(),
2836
+ dstMinAmountTotal: i ? "" : E(n).multipliedBy(m).toFixed()
2837
+ };
2838
+ }, kn = (e) => Number(We) >= 2 ? Fn(e) : Dn(e), nt = (e) => {
2839
+ const n = En(e), i = $e(e), m = e.metadata.expectedChunks || 1, d = Tn(e);
2840
+ return {
2841
+ id: e.hash,
2842
+ hash: e.hash,
2843
+ version: 2,
2844
+ type: gn(e),
2845
+ maker: e.order.witness.swapper,
2846
+ progress: n,
2847
+ srcAmountFilled: d.reduce((h, g) => h.plus(g.inAmount), new E(0)).toFixed() || "",
2848
+ dstAmountFilled: d.reduce((h, g) => h.plus(g.outAmount), new E(0)).toFixed() || "",
2849
+ fills: d,
2850
+ srcTokenAddress: e.order.witness.input.token,
2851
+ dstTokenAddress: e.order.witness.output.token,
2852
+ orderDollarValueIn: wn(e),
2853
+ fillDelay: e.order.witness.epoch * 1e3,
2854
+ deadline: Number(e.order.deadline) * 1e3,
2855
+ createdAt: new Date(e.timestamp).getTime(),
2856
+ srcAmount: e.order.witness.input.maxAmount,
2857
+ srcAmountPerTrade: e.order.witness.input.amount,
2858
+ totalTradesAmount: m,
2859
+ isMarketPrice: E(i || 0).lte(1),
2860
+ chainId: e.order.witness.chainid,
2861
+ filledOrderTimestamp: Cn(d, m),
2862
+ status: xn(e, n),
2863
+ rawOrder: e,
2864
+ ...kn(e)
2865
+ };
2866
+ }, Sn = async ({
2867
+ chainId: e,
2868
+ signal: n,
2869
+ account: i,
2870
+ exchange: m,
2871
+ isDev: d = !1
2872
+ }) => {
2873
+ try {
2874
+ if (!i) return [];
2875
+ const h = m ? `&exchange=${m}` : "", x = await (await fetch(
2876
+ `${Ye(d)}/orders?swapper=${i}&chainId=${e}${h}`,
2877
+ {
2878
+ signal: n
2879
+ }
2880
+ )).json();
2881
+ return !x || !Array.isArray(x.orders) ? [] : x.orders.map(nt);
2882
+ } catch {
2883
+ return [];
2884
+ }
2885
+ }, Pa = async (e, n, i = !1) => {
2886
+ try {
2887
+ const m = {
2888
+ signature: n,
2889
+ order: e,
2890
+ status: "pending"
2891
+ };
2892
+ Ne.onCreateOrderRequest();
2893
+ const d = await fetch(`${Ye(i)}/orders/new`, {
2894
+ method: "POST",
2895
+ body: JSON.stringify(m)
2896
+ }), h = await d.json().catch(() => ({}));
2897
+ if (!d.ok || !(h != null && h.success)) {
2898
+ const x = (h == null ? void 0 : h.message) ?? d.statusText ?? "Request failed", C = (h == null ? void 0 : h.code) ?? d.status;
2899
+ throw new Error(`error:${x}, code:${C}`);
2900
+ }
2901
+ if (!h.signedOrder || typeof h.signedOrder != "object")
2902
+ throw new Error("Invalid API response: missing signedOrder");
2903
+ const g = nt(h.signedOrder);
2904
+ return Ne.onCreateOrderSuccess(g.id), g;
2905
+ } catch (m) {
2906
+ throw Ne.onCreateOrderError(m), console.error(m), m;
2907
+ }
2908
+ }, ce = (e, n) => e && e.length ? e.map(n || ((i) => `${i}`)) : void 0, Bn = (e) => {
2909
+ if (e)
2910
+ return jt[e];
2911
+ }, He = async ({
2912
+ chainId: e,
2913
+ buildQuery: n,
2914
+ extractResults: i,
2915
+ signal: m,
2916
+ retries: d = 1,
2917
+ limit: h = 1e3,
2918
+ page: g
2919
+ }) => {
2920
+ const x = Bn(e);
2921
+ if (!x) throw new In();
2922
+ const C = async (T) => {
2923
+ let w = 0;
2924
+ for (; w <= d; )
2925
+ try {
2926
+ const R = await fetch(x, {
2927
+ method: "POST",
2928
+ body: JSON.stringify({ query: T }),
2929
+ signal: m,
2930
+ headers: { "Content-Type": "application/json" }
2931
+ });
2932
+ if (!R.ok) throw new Error(`HTTP error: ${R.status}`);
2933
+ const I = await R.json();
2934
+ if (I.errors)
2935
+ throw new Error(I.errors[0].message);
2936
+ return i(I);
2937
+ } catch (R) {
2938
+ if (w === d) throw R;
2939
+ await new Promise((I) => setTimeout(I, 500 * 2 ** w)), w++;
2940
+ }
2941
+ return [];
2942
+ };
2943
+ let D = 0;
2944
+ const S = [];
2945
+ if (g !== void 0) {
2946
+ const T = n(g, h);
2947
+ try {
2948
+ return await C(T);
2949
+ } catch {
2950
+ console.warn(`Page ${g} failed, retrying one final time...`);
2951
+ try {
2952
+ return await C(T);
2953
+ } catch {
2954
+ return [];
2955
+ }
2956
+ }
2957
+ }
2958
+ for (; ; ) {
2959
+ const T = n(D, h);
2960
+ let w;
2961
+ try {
2962
+ w = await C(T);
2963
+ } catch {
2964
+ console.warn(`Page ${D} failed, retrying one final time...`);
2965
+ try {
2966
+ w = await C(T);
2967
+ } catch {
2968
+ return S;
2969
+ }
2970
+ }
2971
+ if (S.push(...w), w.length < h) break;
2972
+ D++;
2973
+ }
2974
+ return S;
2975
+ }, at = (e) => e.map((n) => ({
2976
+ inAmount: n.srcAmountIn,
2977
+ outAmount: n.dstAmountOut,
2978
+ timestamp: n.timestamp,
2979
+ txHash: n.transactionHash
2980
+ })), Qe = (e, n) => {
2981
+ const i = E(e || 0).gt(1);
2982
+ return !i && n === 1 ? q.TWAP_MARKET : n > 1 && i ? q.TWAP_LIMIT : i ? q.LIMIT : q.TWAP_MARKET;
2983
+ }, _n = (e, n, i, m) => {
2984
+ var w;
2985
+ const d = at(i || []), h = new E(e.ask_srcAmount || 0).div(e.ask_srcBidAmount).integerValue(E.ROUND_FLOOR).toNumber(), x = (i == null ? void 0 : i.length) === h ? (w = i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1]) == null ? void 0 : w.timestamp : void 0, C = d.reduce((R, I) => R.plus(I.inAmount), new E(0)).toFixed(), D = d.reduce((R, I) => R.plus(I.outAmount), new E(0)).toFixed(), S = st(e.ask_srcAmount, C), T = Qe(e.ask_dstMinAmount, h);
2986
+ return {
2987
+ version: 1,
2988
+ id: e.Contract_id.toString(),
2989
+ hash: "",
2990
+ type: Qe(e.ask_dstMinAmount, h),
2991
+ srcTokenAddress: e.ask_srcToken,
2992
+ dstTokenAddress: e.ask_dstToken,
2993
+ exchangeAddress: e.exchange,
2994
+ twapAddress: e.twapAddress,
2995
+ maker: e.maker,
2996
+ progress: S,
2997
+ dstAmountFilled: D,
2998
+ srcAmountFilled: C,
2999
+ orderDollarValueIn: E(e.dollarValueIn || 0).toFixed(6),
3000
+ srcAmount: e.ask_srcAmount,
3001
+ dstMinAmountTotal: E(e.ask_dstMinAmount).multipliedBy(h).toString(),
3002
+ fills: d,
3003
+ fillDelay: e.ask_fillDelay,
3004
+ deadline: e.ask_deadline * 1e3,
3005
+ createdAt: new Date(e.timestamp).getTime(),
3006
+ dstMinAmountPerTrade: E(e.ask_dstMinAmount).eq(1) ? "" : e.ask_dstMinAmount,
3007
+ triggerPricePerTrade: "",
3008
+ srcAmountPerTrade: e.ask_srcBidAmount,
3009
+ txHash: e.transactionHash,
3010
+ totalTradesAmount: h,
3011
+ isMarketPrice: [q.TWAP_MARKET].includes(T),
3012
+ chainId: n,
3013
+ filledOrderTimestamp: x || 0,
3014
+ status: m,
3015
+ rawOrder: e
3016
+ };
3017
+ }, On = (e) => {
3018
+ var T;
3019
+ if (!e) return "";
3020
+ const n = ce(
3021
+ e.accounts,
3022
+ (w) => `"${w.toLowerCase()}"`
3023
+ ), i = ce(
3024
+ dn(e.configs),
3025
+ (w) => `"${w.toLowerCase()}"`
3026
+ ), m = ce(
3027
+ e.inTokenSymbols,
3028
+ (w) => `"${w.toUpperCase()}"`
3029
+ ), d = ce(
3030
+ e.outTokenSymbols,
3031
+ (w) => `"${w.toUpperCase()}"`
3032
+ ), h = ce(
3033
+ e.inTokenAddresses,
3034
+ (w) => `"${w.toLowerCase()}"`
3035
+ ), g = ce(
3036
+ e.outTokenAddresses,
3037
+ (w) => `"${w.toLowerCase()}"`
3038
+ ), x = ce(
3039
+ e.transactionHashes,
3040
+ (w) => `"${w.toLowerCase()}"`
3041
+ ), C = ce(e.orderIds, (w) => `"${w}"`), D = i != null && i.length ? "" : ce(
3042
+ (T = e.configs) == null ? void 0 : T.map((w) => w.twapAddress),
3043
+ (w) => `"${w.toLowerCase()}"`
3044
+ ), S = e.minDollarValueIn;
3045
+ return [
3046
+ i ? `exchange_in: [${i.join(", ")}]` : "",
3047
+ D ? `twapAddress_in: [${D.join(", ")}]` : "",
3048
+ n ? `maker_in: [${n.join(", ")}]` : "",
3049
+ x ? `transactionHash_in: [${x.join(", ")}]` : "",
3050
+ C ? `Contract_id_in: [${C.join(", ")}]` : "",
3051
+ S ? `dollarValueIn_gte: ${S}` : "",
3052
+ m ? `srcTokenSymbol_in: [${m.join(", ")}]` : "",
3053
+ d ? `dstTokenSymbol_in: [${d.join(", ")}]` : "",
3054
+ h ? `srcTokenAddress_in: [${h.join(", ")}]` : "",
3055
+ g ? `dstTokenAddress_in: [${g.join(", ")}]` : "",
3056
+ e != null && e.startDate ? `blockTimestamp_gte: ${e.startDate}` : "",
3057
+ e != null && e.endDate ? `blockTimestamp_lte: ${e.endDate}` : "",
3058
+ (e == null ? void 0 : e.orderType) === "limit" ? "ask_dstMinAmount_gt: 1" : "",
3059
+ (e == null ? void 0 : e.orderType) === "market" ? "ask_dstMinAmount_lte: 1" : ""
3060
+ ].filter(Boolean).join(", ");
3061
+ };
3062
+ async function vn({
3063
+ chainId: e,
3064
+ signal: n,
3065
+ page: i,
3066
+ limit: m,
3067
+ filters: d
3068
+ }) {
3069
+ const h = m || 1e3, g = On(d);
3070
+ return await He({
3071
+ chainId: e,
3072
+ signal: n,
3073
+ limit: h,
3074
+ page: i,
3075
+ buildQuery: (C, D) => `
3076
+ {
3077
+ orderCreateds(
3078
+ ${g ? `where: { ${g} }` : ""},
3079
+ first: ${D},
3080
+ skip: ${C * D},
3081
+ orderBy: timestamp,
3082
+ orderDirection: desc,
3083
+ ) {
3084
+ id
3085
+ twapAddress
3086
+ Contract_id
3087
+ ask_bidDelay
3088
+ ask_data
3089
+ ask_deadline
3090
+ ask_dstMinAmount
3091
+ ask_dstToken
3092
+ ask_fillDelay
3093
+ ask_exchange
3094
+ ask_srcToken
3095
+ ask_srcBidAmount
3096
+ ask_srcAmount
3097
+ blockNumber
3098
+ blockTimestamp
3099
+ dex
3100
+ dollarValueIn
3101
+ dstTokenSymbol
3102
+ exchange
3103
+ maker
3104
+ srcTokenSymbol
3105
+ timestamp
3106
+ transactionHash
3107
+ }
3108
+ }
3109
+ `,
3110
+ extractResults: (C) => {
3111
+ var D;
3112
+ return ((D = C.data) == null ? void 0 : D.orderCreateds) || [];
3113
+ }
3114
+ });
3115
+ }
3116
+ const Rn = async ({
3117
+ chainId: e,
3118
+ orders: n,
3119
+ signal: i
3120
+ }) => {
3121
+ if (n.length === 0) return [];
3122
+ const m = Le(n.map((x) => x.Contract_id.toString()));
3123
+ if (!m.length) return [];
3124
+ const h = `where: { twapId_in: [${m.map((x) => `"${x}"`).join(", ")}]}`;
3125
+ return await He({
3126
+ chainId: e,
3127
+ signal: i,
3128
+ limit: 1e3,
3129
+ buildQuery: (x, C) => `
3130
+ {
3131
+ statusNews(
3132
+ first: ${C},
3133
+ skip: ${x * C},
3134
+ ${h}
3135
+ ) {
3136
+ twapId
3137
+ twapAddress
3138
+ status
3139
+ }
3140
+ }
3141
+ `,
3142
+ extractResults: (x) => {
3143
+ var C;
3144
+ return ((C = x.data) == null ? void 0 : C.statusNews) || [];
3145
+ }
3146
+ });
3147
+ };
3148
+ function Le(e) {
3149
+ return Array.from(new Set(e));
3150
+ }
3151
+ const Pn = async ({
3152
+ chainId: e,
3153
+ orders: n,
3154
+ signal: i
3155
+ }) => {
3156
+ const m = Le(n.map((T) => T.Contract_id)), d = Le(n.map((T) => T.twapAddress)).filter(Boolean);
3157
+ if (m.length === 0) return [];
3158
+ const h = m.join(", "), g = d.map((T) => `"${T}"`).join(", "), x = d.length ? `twapAddress_in: [${g}]` : "", D = `where: { ${[
3159
+ `TWAP_id_in: [${h}]`,
3160
+ x
3161
+ ].filter(Boolean).join(", ")} }`;
3162
+ return await He({
3163
+ chainId: e,
3164
+ signal: i,
3165
+ limit: 1e3,
3166
+ buildQuery: (T, w) => `
3167
+ {
3168
+ orderFilleds(first: ${w}, orderBy: timestamp, skip: ${T * w}, ${D}) {
3169
+ id
3170
+ dstAmountOut
3171
+ dstFee
3172
+ srcFilledAmount
3173
+ twapAddress
3174
+ exchange
3175
+ TWAP_id
3176
+ srcAmountIn
3177
+ timestamp
3178
+ transactionHash
3179
+ dollarValueIn
3180
+ dollarValueOut
3181
+ }
3182
+ }
3183
+ `,
3184
+ extractResults: (T) => {
3185
+ var w;
3186
+ return (((w = T.data) == null ? void 0 : w.orderFilleds) || []).map((R) => ({
3187
+ ...R,
3188
+ timestamp: new Date(R.timestamp).getTime()
3189
+ }));
3190
+ }
3191
+ });
3192
+ };
3193
+ class In extends Error {
3194
+ constructor() {
3195
+ super("No graph endpoint found"), this.name = "NoGraphEndpointError";
3196
+ }
3197
+ }
3198
+ const Nn = async ({
3199
+ chainId: e,
3200
+ signal: n,
3201
+ page: i,
3202
+ limit: m,
3203
+ filters: d
3204
+ }) => {
3205
+ try {
3206
+ const h = await vn({
3207
+ chainId: e,
3208
+ signal: n,
3209
+ page: i,
3210
+ limit: m,
3211
+ filters: d
3212
+ }), [g, x] = await Promise.all([
3213
+ Pn({ chainId: e, orders: h, signal: n }),
3214
+ Rn({ chainId: e, orders: h, signal: n })
3215
+ ]), C = h.map((S) => {
3216
+ const T = g == null ? void 0 : g.filter(
3217
+ (w) => w.TWAP_id === Number(S.Contract_id) && De(w.exchange, S.exchange) && De(w.twapAddress, S.twapAddress)
3218
+ );
3219
+ return _n(
3220
+ S,
3221
+ e,
3222
+ T,
3223
+ Mn(S, T || [], x)
3224
+ );
3225
+ }).sort((S, T) => T.createdAt - S.createdAt), D = /* @__PURE__ */ new Set();
3226
+ return C.filter((S) => D.has(S.id) ? !1 : (D.add(S.id), !0));
3227
+ } catch {
3228
+ return [];
3229
+ }
3230
+ }, Mn = (e, n, i) => {
3231
+ var x;
3232
+ const m = (x = i == null ? void 0 : i.find(
3233
+ (C) => C.twapId === e.Contract_id.toString() && De(C.twapAddress, e.twapAddress)
3234
+ )) == null ? void 0 : x.status, h = at(n).reduce((C, D) => C.plus(D.inAmount), new E(0)).toFixed(), g = st(e.ask_srcAmount, h);
3235
+ return Un(g, e.ask_deadline * 1e3, m);
3236
+ }, st = (e, n) => {
3237
+ if (!n || !e) return 0;
3238
+ const i = E(n).dividedBy(e).toNumber();
3239
+ return i >= 0.99 ? 100 : i <= 0 ? 0 : Number((i * 100).toFixed(2));
3240
+ }, Un = (e, n, i) => e === 100 ? re.Completed : i === "CANCELLED" ? re.Cancelled : i === "COMPLETED" ? re.Completed : n > Date.now() ? re.Open : re.Expired, Ia = async ({
3241
+ signal: e,
3242
+ page: n,
3243
+ chainId: i,
3244
+ limit: m,
3245
+ config: d,
3246
+ account: h,
3247
+ isDev: g = !1
3248
+ }) => (await Promise.all([
3249
+ d ? Nn({ chainId: i, signal: e, page: n, limit: m, filters: { accounts: [h], configs: d.twapConfig ? [d.twapConfig] : [] } }) : Promise.resolve([]),
3250
+ Sn({ chainId: i, signal: e, account: h, exchange: d == null ? void 0 : d.adapter, isDev: g })
3251
+ ]).then(([D, S]) => [...D, ...S])).sort((D, S) => S.createdAt - D.createdAt);
3252
+ export {
3253
+ sa as CRASH_ERROR_MESSAGE,
3254
+ _ as Configs,
3255
+ Ge as DEFAULT_FILL_DELAY,
3256
+ na as DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE,
3257
+ ea as DEFAULT_STOP_LOSS_PERCENTAGE,
3258
+ aa as DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE,
3259
+ ta as DEFAULT_TAKE_PROFIT_PERCENTAGE,
3260
+ Jn as DISCLAIMER_URL,
3261
+ Jt as EIP712_TYPES,
3262
+ en as EIP712_TYPES_DEV,
3263
+ Wn as ERC20_ABI,
3264
+ qn as EXCLUSIVITY_OVERRIDE_BPS,
3265
+ Gn as FEES,
3266
+ Vn as IWETH_ABI,
3267
+ $t as InputErrors,
3268
+ Zt as LEGACY_EXCHANGES_MAP,
3269
+ Ee as MAX_ORDER_DURATION_MILLIS,
3270
+ Kn as MIN_CHUNKS,
3271
+ Me as MIN_FILL_DELAY_MILLIS,
3272
+ Xt as MIN_FILL_DELAY_MINUTES,
3273
+ Ke as MIN_ORDER_DURATION_MILLIS,
3274
+ z as Module,
3275
+ Qn as ORBS_LOGO,
3276
+ Yn as ORBS_LOGO_FALLBACK,
3277
+ jn as ORBS_SLTP_FAQ_URL,
3278
+ Xn as ORBS_TWAP_FAQ_URL,
3279
+ Zn as ORBS_WEBSITE_URL,
3280
+ zt as OrderFilter,
3281
+ re as OrderStatus,
3282
+ q as OrderType,
3283
+ pe as Partners,
3284
+ xe as QUERY_PARAMS,
3285
+ zn as REPERMIT_ABI,
3286
+ Ze as REPERMIT_PRIMARY_TYPE,
3287
+ We as SPOT_VERSION,
3288
+ Hn as SUGGEST_CHUNK_VALUE,
3289
+ jt as THE_GRAPH_ORDERS_API,
3290
+ $n as TWAP_ABI,
3291
+ ae as TimeUnit,
3292
+ Ne as analytics,
3293
+ va as buildRePermitOrderData,
3294
+ nt as buildV2Order,
3295
+ De as eqIgnoreCase,
3296
+ Ia as getAccountOrders,
3297
+ Ye as getApiEndpoint,
3298
+ ha as getChunks,
3299
+ un as getConfig,
3300
+ ba as getDeadline,
3301
+ la as getDestTokenAmount,
3302
+ fa as getDestTokenMinAmountPerChunk,
3303
+ ya as getDuration,
3304
+ Oa as getErrors,
3305
+ cn as getEstimatedDelayBetweenChunksMillis,
3306
+ Ba as getMaxChunksError,
3307
+ Ea as getMaxFillDelayError,
3308
+ Fa as getMaxOrderDurationError,
3309
+ Aa as getMaxPossibleChunks,
3310
+ _a as getMinChunkSizeUsd,
3311
+ ka as getMinFillDelayError,
3312
+ Da as getMinOrderDurationError,
3313
+ Sa as getMinTradeSizeError,
3314
+ ia as getNetwork,
3315
+ ca as getOrderExecutionRate,
3316
+ oa as getOrderFillDelayMillis,
3317
+ pa as getOrderLimitPriceRate,
3318
+ da as getPartnerChains,
3319
+ G as getPartnerIdentifier,
3320
+ ln as getPartners,
3321
+ ga as getSrcTokenChunkAmount,
3322
+ Ca as getStopLossLimitPriceError,
3323
+ xa as getStopLossPriceError,
3324
+ wa as getTakeProfitLimitPriceError,
3325
+ Ta as getTakeProfitPriceError,
3326
+ ma as getTriggerPricePerChunk,
3327
+ ua as getTriggerPricePerTrade,
3328
+ ra as isNativeAddress,
3329
+ ze as maxUint256,
3330
+ Yt as nativeTokenAddresses,
3331
+ K as networks,
3332
+ Ra as setUIVersion,
3333
+ Pa as submitOrder,
3334
+ Qt as zeroAddress
3335
+ };