@argent/x-shared 1.37.0 → 1.38.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 (669) hide show
  1. package/dist/.eslintrc.d.cts +45 -0
  2. package/dist/_virtual/_commonjsHelpers.cjs +1 -0
  3. package/dist/_virtual/_commonjsHelpers.js +6 -0
  4. package/dist/_virtual/semver.cjs +1 -0
  5. package/dist/_virtual/semver.js +4 -0
  6. package/dist/commitlint.config.d.cts +2 -0
  7. package/dist/index.cjs +1 -0
  8. package/dist/index.d.ts +2 -19
  9. package/dist/index.js +424 -4
  10. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -0
  11. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js +14 -0
  12. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -0
  13. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js +88 -0
  14. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -0
  15. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js +203 -0
  16. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.cjs +1 -0
  17. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.js +68 -0
  18. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -0
  19. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js +166 -0
  20. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -0
  21. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +581 -0
  22. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
  23. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js +48 -0
  24. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.cjs +1 -0
  25. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js +4 -0
  26. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.cjs +1 -0
  27. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js +42 -0
  28. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.cjs +1 -0
  29. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js +47 -0
  30. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
  31. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js +31 -0
  32. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.cjs +1 -0
  33. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js +61 -0
  34. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
  35. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js +21 -0
  36. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.cjs +1 -0
  37. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js +114 -0
  38. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
  39. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js +107 -0
  40. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.cjs +1 -0
  41. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js +38 -0
  42. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
  43. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.js +32 -0
  44. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
  45. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.js +21 -0
  46. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
  47. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js +107 -0
  48. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.cjs +1 -0
  49. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.js +44 -0
  50. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -0
  51. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +622 -0
  52. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.cjs +1 -0
  53. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +20 -0
  54. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.cjs +1 -0
  55. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +20 -0
  56. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.cjs +1 -0
  57. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +6 -0
  58. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.cjs +1 -0
  59. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +20 -0
  60. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.cjs +1 -0
  61. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +6 -0
  62. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.cjs +1 -0
  63. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +13 -0
  64. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.cjs +1 -0
  65. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
  66. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.cjs +1 -0
  67. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js +8 -0
  68. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.cjs +1 -0
  69. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js +9 -0
  70. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.cjs +1 -0
  71. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +10 -0
  72. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.cjs +1 -0
  73. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js +9 -0
  74. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.cjs +1 -0
  75. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
  76. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.cjs +1 -0
  77. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js +9 -0
  78. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.cjs +1 -0
  79. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js +6 -0
  80. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.cjs +1 -0
  81. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +16 -0
  82. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.cjs +1 -0
  83. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js +33 -0
  84. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.cjs +1 -0
  85. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +6 -0
  86. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.cjs +1 -0
  87. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +5 -0
  88. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.cjs +1 -0
  89. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js +9 -0
  90. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.cjs +1 -0
  91. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
  92. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.cjs +1 -0
  93. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +8 -0
  94. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.cjs +1 -0
  95. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +9 -0
  96. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.cjs +1 -0
  97. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
  98. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -0
  99. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +6 -0
  100. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.cjs +1 -0
  101. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +7 -0
  102. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.cjs +1 -0
  103. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +7 -0
  104. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.cjs +1 -0
  105. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +13 -0
  106. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.cjs +1 -0
  107. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +9 -0
  108. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.cjs +1 -0
  109. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +9 -0
  110. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.cjs +1 -0
  111. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +7 -0
  112. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.cjs +1 -0
  113. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +11 -0
  114. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.cjs +1 -0
  115. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +6 -0
  116. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.cjs +1 -0
  117. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +12 -0
  118. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.cjs +1 -0
  119. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +8 -0
  120. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.cjs +1 -0
  121. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +7 -0
  122. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.cjs +1 -0
  123. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +8 -0
  124. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.cjs +1 -0
  125. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +13 -0
  126. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.cjs +1 -0
  127. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  128. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.cjs +1 -0
  129. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +7 -0
  130. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.cjs +1 -0
  131. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +7 -0
  132. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.cjs +1 -0
  133. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +8 -0
  134. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.cjs +1 -0
  135. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +5 -0
  136. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.cjs +1 -0
  137. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
  138. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.cjs +1 -0
  139. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
  140. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.cjs +1 -0
  141. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +7 -0
  142. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.cjs +1 -0
  143. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +6 -0
  144. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.cjs +1 -0
  145. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +9 -0
  146. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.cjs +1 -0
  147. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js +9 -0
  148. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.cjs +1 -0
  149. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +17 -0
  150. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.cjs +1 -0
  151. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +6 -0
  152. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.cjs +1 -0
  153. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +12 -0
  154. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.cjs +1 -0
  155. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
  156. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.cjs +1 -0
  157. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js +5 -0
  158. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.cjs +1 -0
  159. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js +7 -0
  160. package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs +1 -0
  161. package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js +134 -0
  162. package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.cjs +1 -0
  163. package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js +629 -0
  164. package/dist/simulation.cjs +1 -0
  165. package/dist/simulation.d.ts +1 -1
  166. package/dist/simulation.js +69 -1
  167. package/dist/src/account/account.model.cjs +1 -0
  168. package/dist/src/account/account.model.js +45 -0
  169. package/dist/src/account/accountv4.cjs +1 -0
  170. package/dist/src/account/accountv4.js +14 -0
  171. package/dist/src/account/preferences.model.cjs +1 -0
  172. package/dist/src/account/preferences.model.js +11 -0
  173. package/dist/src/assets/tokens.json.cjs +1 -0
  174. package/dist/src/assets/tokens.json.js +181 -0
  175. package/dist/src/backend/schema.cjs +1 -0
  176. package/dist/src/backend/schema.js +14 -0
  177. package/dist/src/bigdecimal/constants.cjs +1 -0
  178. package/dist/src/bigdecimal/constants.js +4 -0
  179. package/dist/src/bigdecimal/createUnitsSchema.cjs +1 -0
  180. package/dist/src/bigdecimal/createUnitsSchema.js +8 -0
  181. package/dist/src/bigdecimal/formatUnits.cjs +1 -0
  182. package/dist/src/bigdecimal/formatUnits.js +11 -0
  183. package/dist/src/bigdecimal/index.cjs +1 -0
  184. package/dist/src/bigdecimal/index.js +33 -0
  185. package/dist/src/bigdecimal/lib.cjs +1 -0
  186. package/dist/src/bigdecimal/lib.js +53 -0
  187. package/dist/src/bigdecimal/parseUnits.cjs +1 -0
  188. package/dist/src/bigdecimal/parseUnits.js +11 -0
  189. package/dist/src/bigdecimal/utils.cjs +1 -0
  190. package/dist/src/bigdecimal/utils.js +37 -0
  191. package/dist/src/cache/CacheService.cjs +1 -0
  192. package/dist/src/cache/CacheService.js +37 -0
  193. package/dist/src/chains/starknet/address.cjs +1 -0
  194. package/dist/src/chains/starknet/address.js +64 -0
  195. package/dist/src/chains/starknet/addressDomain.cjs +1 -0
  196. package/dist/src/chains/starknet/addressDomain.js +29 -0
  197. package/dist/src/chains/starknet/addressInput.cjs +1 -0
  198. package/dist/src/chains/starknet/addressInput.js +7 -0
  199. package/dist/src/chains/starknet/argentName.cjs +1 -0
  200. package/dist/src/chains/starknet/argentName.js +14 -0
  201. package/dist/src/chains/starknet/cairoVersionSchema.cjs +1 -0
  202. package/dist/src/chains/starknet/cairoVersionSchema.js +5 -0
  203. package/dist/src/chains/starknet/constants.cjs +1 -0
  204. package/dist/src/chains/starknet/constants.js +10 -0
  205. package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -0
  206. package/dist/src/chains/starknet/getAddressFromArgentName.js +48 -0
  207. package/dist/src/chains/starknet/getAddressFromStarkName.cjs +1 -0
  208. package/dist/src/chains/starknet/getAddressFromStarkName.js +70 -0
  209. package/dist/src/chains/starknet/network.cjs +1 -0
  210. package/dist/src/chains/starknet/network.js +20 -0
  211. package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -0
  212. package/dist/src/chains/starknet/services/address/StarknetAddressService.js +38 -0
  213. package/dist/src/chains/starknet/services/deploymentData/constants.cjs +1 -0
  214. package/dist/src/chains/starknet/services/deploymentData/constants.js +22 -0
  215. package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.cjs +1 -0
  216. package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.js +19 -0
  217. package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs +1 -0
  218. package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.js +69 -0
  219. package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.cjs +1 -0
  220. package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.js +59 -0
  221. package/dist/src/chains/starknet/starknetId.cjs +1 -0
  222. package/dist/src/chains/starknet/starknetId.js +14 -0
  223. package/dist/src/errors/account.cjs +1 -0
  224. package/dist/src/errors/account.js +14 -0
  225. package/dist/src/errors/address.cjs +1 -0
  226. package/dist/src/errors/address.js +14 -0
  227. package/dist/src/errors/baseErrors.cjs +1 -0
  228. package/dist/src/errors/baseErrors.js +15 -0
  229. package/dist/src/errors/call.cjs +1 -0
  230. package/dist/src/errors/call.js +14 -0
  231. package/dist/src/errors/network.cjs +1 -0
  232. package/dist/src/errors/network.js +14 -0
  233. package/dist/src/errors/review.cjs +1 -0
  234. package/dist/src/errors/review.js +14 -0
  235. package/dist/src/errors/swap.cjs +1 -0
  236. package/dist/src/errors/swap.js +14 -0
  237. package/dist/src/features/simulation/activity/normalize.cjs +1 -0
  238. package/dist/src/features/simulation/activity/normalize.js +40 -0
  239. package/dist/src/features/simulation/activity/schema.cjs +1 -0
  240. package/dist/src/features/simulation/activity/schema.js +236 -0
  241. package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -0
  242. package/dist/src/features/simulation/activity/utils/createNativeActivity.js +31 -0
  243. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -0
  244. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +24 -0
  245. package/dist/src/features/simulation/activity/utils/getOverallLastModified.cjs +1 -0
  246. package/dist/src/features/simulation/activity/utils/getOverallLastModified.js +6 -0
  247. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -0
  248. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +10 -0
  249. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -0
  250. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +11 -0
  251. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -0
  252. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +26 -0
  253. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -0
  254. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +22 -0
  255. package/dist/src/features/simulation/activity/utils/parseAccountActivities.cjs +1 -0
  256. package/dist/src/features/simulation/activity/utils/parseAccountActivities.js +13 -0
  257. package/dist/src/features/simulation/activity/utils/parseFinanceActivities.cjs +1 -0
  258. package/dist/src/features/simulation/activity/utils/parseFinanceActivities.js +33 -0
  259. package/dist/src/features/simulation/fees/schema.cjs +1 -0
  260. package/dist/src/features/simulation/fees/schema.js +20 -0
  261. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -0
  262. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +18 -0
  263. package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -0
  264. package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +6 -0
  265. package/dist/src/features/simulation/transactionReview/schema.cjs +1 -0
  266. package/dist/src/features/simulation/transactionReview/schema.js +215 -0
  267. package/dist/src/features/simulation/warning/helper.cjs +1 -0
  268. package/dist/src/features/simulation/warning/helper.js +12 -0
  269. package/dist/src/features/simulation/warning/schema.cjs +1 -0
  270. package/dist/src/features/simulation/warning/schema.js +11 -0
  271. package/dist/src/features/swap/models/order.model.cjs +1 -0
  272. package/dist/src/features/swap/models/order.model.js +20 -0
  273. package/dist/src/features/swap/models/quote.model.cjs +1 -0
  274. package/dist/src/features/swap/models/quote.model.js +36 -0
  275. package/dist/src/features/swap/models/trade.model.cjs +1 -0
  276. package/dist/src/features/swap/models/trade.model.js +28 -0
  277. package/dist/src/features/swap/services/implementation.cjs +1 -0
  278. package/dist/src/features/swap/services/implementation.js +76 -0
  279. package/dist/src/features/swap/utils/slippage.cjs +1 -0
  280. package/dist/src/features/swap/utils/slippage.js +28 -0
  281. package/dist/src/features/swap/utils/totalFee.cjs +1 -0
  282. package/dist/src/features/swap/utils/totalFee.js +13 -0
  283. package/dist/src/http/DateService.cjs +1 -0
  284. package/dist/src/http/DateService.js +17 -0
  285. package/dist/src/http/HttpError.cjs +1 -0
  286. package/dist/src/http/HttpError.js +8 -0
  287. package/dist/src/http/HttpService.cjs +1 -0
  288. package/dist/src/http/HttpService.js +90 -0
  289. package/dist/src/http/IHttpService.cjs +1 -0
  290. package/dist/src/http/IHttpService.js +7 -0
  291. package/dist/src/http/SWRService.cjs +1 -0
  292. package/dist/src/http/SWRService.js +60 -0
  293. package/dist/src/http/fetcher.cjs +1 -0
  294. package/dist/src/http/fetcher.js +36 -0
  295. package/dist/{http → src/http}/index.d.ts +0 -1
  296. package/dist/src/http/time.cjs +1 -0
  297. package/dist/src/http/time.js +19 -0
  298. package/dist/src/index.d.ts +17 -0
  299. package/dist/src/knownDapps/KnownDappsBackendService.cjs +1 -0
  300. package/dist/src/knownDapps/KnownDappsBackendService.js +16 -0
  301. package/dist/src/knownDapps/schema.cjs +1 -0
  302. package/dist/src/knownDapps/schema.js +44 -0
  303. package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -0
  304. package/dist/src/knownDapps/utils/getDapplandUrl.js +12 -0
  305. package/dist/src/nameResolution/ResolveNameService.cjs +1 -0
  306. package/dist/src/nameResolution/ResolveNameService.js +42 -0
  307. package/dist/src/nameResolution/schema.cjs +1 -0
  308. package/dist/src/nameResolution/schema.js +25 -0
  309. package/dist/src/nfts/BackendNftService.cjs +1 -0
  310. package/dist/src/nfts/BackendNftService.js +119 -0
  311. package/dist/src/nfts/BackendPaginationError.cjs +1 -0
  312. package/dist/src/nfts/BackendPaginationError.js +13 -0
  313. package/dist/{nfts → src/nfts}/index.d.ts +0 -1
  314. package/dist/src/nfts/utils.cjs +1 -0
  315. package/dist/src/nfts/utils.js +14 -0
  316. package/dist/src/onchainRecovery/OnchainRecoveryService.cjs +1 -0
  317. package/dist/src/onchainRecovery/OnchainRecoveryService.js +69 -0
  318. package/dist/src/onchainRecovery/schema.cjs +1 -0
  319. package/dist/src/onchainRecovery/schema.js +49 -0
  320. package/dist/src/platform/isBraveBrowser.cjs +1 -0
  321. package/dist/src/platform/isBraveBrowser.js +11 -0
  322. package/dist/src/platform/isBrowser.cjs +1 -0
  323. package/dist/src/platform/isBrowser.js +28 -0
  324. package/dist/src/signer/multisigner.cjs +1 -0
  325. package/dist/src/signer/multisigner.js +19 -0
  326. package/dist/src/signer/seedphrase.cjs +1 -0
  327. package/dist/src/signer/seedphrase.js +7 -0
  328. package/dist/src/tokens/balances.cjs +1 -0
  329. package/dist/src/tokens/balances.js +38 -0
  330. package/dist/src/tokens/constants.cjs +1 -0
  331. package/dist/src/tokens/constants.js +4 -0
  332. package/dist/src/tokens/convertTokenAmountToCurrencyValue.cjs +1 -0
  333. package/dist/src/tokens/convertTokenAmountToCurrencyValue.js +16 -0
  334. package/dist/src/tokens/convertTokenUnitAmountWithDecimals.cjs +1 -0
  335. package/dist/src/tokens/convertTokenUnitAmountWithDecimals.js +11 -0
  336. package/dist/src/tokens/ensureDecimals.cjs +1 -0
  337. package/dist/src/tokens/ensureDecimals.js +5 -0
  338. package/dist/src/tokens/getCurrencySymbol.cjs +1 -0
  339. package/dist/src/tokens/getCurrencySymbol.js +15 -0
  340. package/dist/src/tokens/isUnlimitedAmount.cjs +1 -0
  341. package/dist/src/tokens/isUnlimitedAmount.js +5 -0
  342. package/dist/src/tokens/prettifyCurrencyValue.cjs +1 -0
  343. package/dist/src/tokens/prettifyCurrencyValue.js +11 -0
  344. package/dist/src/tokens/prettifyTokenAmount.cjs +1 -0
  345. package/dist/src/tokens/prettifyTokenAmount.js +23 -0
  346. package/dist/src/tokens/service/implementation.cjs +1 -0
  347. package/dist/{tokens → src/tokens}/service/implementation.d.ts +21 -2
  348. package/dist/src/tokens/service/implementation.js +64 -0
  349. package/dist/src/tokens/service/tokenError.cjs +1 -0
  350. package/dist/src/tokens/service/tokenError.js +14 -0
  351. package/dist/src/tokens/service/types/backend.model.cjs +1 -0
  352. package/dist/{tokens → src/tokens}/service/types/backend.model.d.ts +818 -73
  353. package/dist/src/tokens/service/types/backend.model.js +134 -0
  354. package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -0
  355. package/dist/{tokens → src/tokens}/service/types/defiPosition.model.d.ts +1024 -64
  356. package/dist/src/tokens/service/types/defiPosition.model.js +75 -0
  357. package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -0
  358. package/dist/{tokens → src/tokens}/service/types/defiPositionType.model.d.ts +1 -1
  359. package/dist/src/tokens/service/types/defiPositionType.model.js +10 -0
  360. package/dist/src/tokens/service/types/unclaimedRewards.model.cjs +1 -0
  361. package/dist/src/tokens/service/types/unclaimedRewards.model.js +16 -0
  362. package/dist/src/tokens/service/types/webToken.model.cjs +1 -0
  363. package/dist/src/tokens/service/types/webToken.model.js +45 -0
  364. package/dist/src/transactions/amount.cjs +1 -0
  365. package/dist/src/transactions/amount.js +24 -0
  366. package/dist/src/transactions/buildTransactions.cjs +1 -0
  367. package/dist/src/transactions/buildTransactions.js +34 -0
  368. package/dist/src/transactions/errors.cjs +1 -0
  369. package/dist/src/transactions/errors.js +19 -0
  370. package/dist/src/transactions/estimate/argentMaxFee.cjs +1 -0
  371. package/dist/src/transactions/estimate/argentMaxFee.js +13 -0
  372. package/dist/src/transactions/estimate/error.cjs +1 -0
  373. package/dist/src/transactions/estimate/error.js +14 -0
  374. package/dist/src/transactions/estimate/model.cjs +1 -0
  375. package/dist/src/transactions/estimate/model.js +14 -0
  376. package/dist/src/transactions/estimate/utils.cjs +1 -0
  377. package/dist/src/transactions/estimate/utils.js +232 -0
  378. package/dist/src/transactions/findTransfersAndApprovals.cjs +1 -0
  379. package/dist/src/transactions/findTransfersAndApprovals.js +31 -0
  380. package/dist/src/transactions/getPrettyRcpError.cjs +1 -0
  381. package/dist/src/transactions/getPrettyRcpError.js +11 -0
  382. package/dist/src/transactions/getTransactionVersion.cjs +1 -0
  383. package/dist/src/transactions/getTransactionVersion.js +18 -0
  384. package/dist/{transactions → src/transactions}/index.d.ts +0 -6
  385. package/dist/src/transactions/service/implementation.cjs +1 -0
  386. package/dist/src/transactions/service/implementation.js +182 -0
  387. package/dist/src/transactions/service/types.cjs +1 -0
  388. package/dist/src/transactions/service/types.js +10 -0
  389. package/dist/src/transactions/transactionReviewTypes.cjs +1 -0
  390. package/dist/src/transactions/transactionReviewTypes.js +10 -0
  391. package/dist/src/transactions/transactionVersion.cjs +1 -0
  392. package/dist/src/transactions/transactionVersion.js +14 -0
  393. package/dist/src/transactions/txv3.cjs +1 -0
  394. package/dist/src/transactions/txv3.js +14 -0
  395. package/dist/src/utils/address.cjs +1 -0
  396. package/dist/src/utils/address.js +4 -0
  397. package/dist/src/utils/arrays.cjs +1 -0
  398. package/dist/src/utils/arrays.js +4 -0
  399. package/dist/src/utils/avatarImage.cjs +4 -0
  400. package/dist/src/utils/avatarImage.js +42 -0
  401. package/dist/src/utils/base58.cjs +1 -0
  402. package/dist/src/utils/base58.js +15 -0
  403. package/dist/src/utils/bigNumber.cjs +1 -0
  404. package/dist/src/utils/bigNumber.js +7 -0
  405. package/dist/src/utils/bips.cjs +1 -0
  406. package/dist/src/utils/bips.js +11 -0
  407. package/dist/src/utils/daysBetween.cjs +1 -0
  408. package/dist/src/utils/daysBetween.js +7 -0
  409. package/dist/src/utils/env.cjs +1 -0
  410. package/dist/src/utils/env.js +4 -0
  411. package/dist/src/utils/hex.cjs +1 -0
  412. package/dist/src/utils/hex.js +9 -0
  413. package/dist/src/utils/id.cjs +1 -0
  414. package/dist/src/utils/id.js +8 -0
  415. package/dist/{utils → src/utils}/index.d.ts +0 -1
  416. package/dist/src/utils/initials.cjs +1 -0
  417. package/dist/src/utils/initials.js +16 -0
  418. package/dist/src/utils/isContractDeployed.cjs +1 -0
  419. package/dist/src/utils/isContractDeployed.js +10 -0
  420. package/dist/src/utils/nonNullable.cjs +1 -0
  421. package/dist/src/utils/nonNullable.js +7 -0
  422. package/dist/src/utils/number/isAllowedAddressHexInputValue.cjs +1 -0
  423. package/dist/src/utils/number/isAllowedAddressHexInputValue.js +7 -0
  424. package/dist/src/utils/number/isAllowedNumericInputValue.cjs +1 -0
  425. package/dist/src/utils/number/isAllowedNumericInputValue.js +8 -0
  426. package/dist/src/utils/number/isNumeric.cjs +1 -0
  427. package/dist/src/utils/number/isNumeric.js +4 -0
  428. package/dist/src/utils/number/prettifyNumber.cjs +1 -0
  429. package/dist/src/utils/number/prettifyNumber.js +47 -0
  430. package/dist/src/utils/parseAmount.cjs +1 -0
  431. package/dist/src/utils/parseAmount.js +14 -0
  432. package/dist/src/utils/pluralise.cjs +1 -0
  433. package/dist/src/utils/pluralise.js +4 -0
  434. package/dist/src/utils/readFileAsString.cjs +1 -0
  435. package/dist/src/utils/readFileAsString.js +10 -0
  436. package/dist/src/utils/schemas.cjs +1 -0
  437. package/dist/src/utils/schemas.js +29 -0
  438. package/dist/src/utils/starknet/starknet.cjs +1 -0
  439. package/dist/src/utils/starknet/starknet.js +57 -0
  440. package/dist/src/utils/starknet/starknetLibTypes.cjs +1 -0
  441. package/dist/src/utils/starknet/starknetLibTypes.js +7 -0
  442. package/dist/src/utils/starknet/starknetSchemas.cjs +1 -0
  443. package/dist/src/utils/starknet/starknetSchemas.js +102 -0
  444. package/dist/src/utils/transactions.cjs +1 -0
  445. package/dist/src/utils/transactions.js +11 -0
  446. package/dist/src/utils/url/urlWithQuery.cjs +1 -0
  447. package/dist/src/utils/url/urlWithQuery.js +9 -0
  448. package/dist/src/utils/voidify.cjs +1 -0
  449. package/dist/src/utils/voidify.js +8 -0
  450. package/dist/swap.cjs +1 -0
  451. package/dist/swap.d.ts +1 -1
  452. package/dist/swap.js +20 -1
  453. package/package.json +14 -28
  454. package/dist/bips-DKbEGvGl.mjs +0 -114
  455. package/dist/bips-DxN0hSiY.js +0 -1
  456. package/dist/hooks/index.d.ts +0 -2
  457. package/dist/hooks/useDebounce.d.ts +0 -1
  458. package/dist/hooks/useDebouncedValue.d.ts +0 -1
  459. package/dist/http/swr.d.ts +0 -21
  460. package/dist/index.mjs +0 -4466
  461. package/dist/nfts/useNfts.d.ts +0 -23
  462. package/dist/providers/WebAmplitude/WebAmplitudeProvider.d.ts +0 -7
  463. package/dist/providers/WebAmplitude/index.d.ts +0 -2
  464. package/dist/providers/WebAmplitude/service.d.ts +0 -7
  465. package/dist/providers/WebAmplitude/types.d.ts +0 -6
  466. package/dist/providers/WebAmplitude/utils.d.ts +0 -2
  467. package/dist/providers/index.d.ts +0 -1
  468. package/dist/simulation.mjs +0 -255
  469. package/dist/swap.mjs +0 -183
  470. package/dist/transactionVersion-C7p_qk9x.js +0 -1
  471. package/dist/transactionVersion-Cjoucwcx.mjs +0 -793
  472. package/dist/transactions/useBalanceChange.d.ts +0 -5
  473. package/dist/transactions/useErc20Transactions.d.ts +0 -6
  474. package/dist/transactions/useErc721Transactions.d.ts +0 -5
  475. package/dist/transactions/useErc721Transfers.d.ts +0 -5
  476. package/dist/transactions/useMaxAmountTransaction.d.ts +0 -7
  477. package/dist/transactions/useTransactionReview.d.ts +0 -15
  478. package/dist/transactions/useTransactionReviewV2web.d.ts +0 -1004
  479. package/dist/utils/useEventEmitter.d.ts +0 -67
  480. package/dist/webToken.model-5HUiR8ER.js +0 -1
  481. package/dist/webToken.model-CpudLBp0.mjs +0 -1913
  482. package/dist/{account → src/account}/account.model.d.ts +0 -0
  483. package/dist/{account → src/account}/accountv4.d.ts +0 -0
  484. package/dist/{account → src/account}/index.d.ts +0 -0
  485. package/dist/{account → src/account}/preferences.model.d.ts +0 -0
  486. package/dist/{backend → src/backend}/index.d.ts +0 -0
  487. package/dist/{backend → src/backend}/schema.d.ts +0 -0
  488. package/dist/{backend → src/backend}/types.d.ts +0 -0
  489. package/dist/{bigdecimal → src/bigdecimal}/constants.d.ts +0 -0
  490. package/dist/{bigdecimal → src/bigdecimal}/createUnitsSchema.d.ts +0 -0
  491. package/dist/{bigdecimal → src/bigdecimal}/formatUnits.d.ts +0 -0
  492. package/dist/{bigdecimal → src/bigdecimal}/index.d.ts +0 -0
  493. package/dist/{bigdecimal → src/bigdecimal}/lib.d.ts +0 -0
  494. package/dist/{bigdecimal → src/bigdecimal}/parseUnits.d.ts +0 -0
  495. package/dist/{bigdecimal → src/bigdecimal}/type.d.ts +0 -0
  496. package/dist/{bigdecimal → src/bigdecimal}/types.d.ts +0 -0
  497. package/dist/{bigdecimal → src/bigdecimal}/utils.d.ts +0 -0
  498. package/dist/{cache → src/cache}/CacheService.d.ts +0 -0
  499. package/dist/{cache → src/cache}/ICacheService.d.ts +0 -0
  500. package/dist/{cache → src/cache}/index.d.ts +0 -0
  501. package/dist/{chains → src/chains}/index.d.ts +0 -0
  502. package/dist/{chains → src/chains}/starknet/address.d.ts +0 -0
  503. package/dist/{chains → src/chains}/starknet/addressDomain.d.ts +0 -0
  504. package/dist/{chains → src/chains}/starknet/addressInput.d.ts +0 -0
  505. package/dist/{chains → src/chains}/starknet/argentName.d.ts +0 -0
  506. package/dist/{chains → src/chains}/starknet/cairoVersionSchema.d.ts +0 -0
  507. package/dist/{chains → src/chains}/starknet/constants.d.ts +0 -0
  508. package/dist/{chains → src/chains}/starknet/getAddressFromArgentName.d.ts +0 -0
  509. package/dist/{chains → src/chains}/starknet/getAddressFromStarkName.d.ts +0 -0
  510. package/dist/{chains → src/chains}/starknet/index.d.ts +0 -0
  511. package/dist/{chains → src/chains}/starknet/network.d.ts +0 -0
  512. package/dist/{chains → src/chains}/starknet/services/address/IStarknetAddressService.d.ts +0 -0
  513. package/dist/{chains → src/chains}/starknet/services/address/StarknetAddressService.d.ts +0 -0
  514. package/dist/{chains → src/chains}/starknet/services/address/index.d.ts +0 -0
  515. package/dist/{chains → src/chains}/starknet/services/deploymentData/constants.d.ts +0 -0
  516. package/dist/{chains → src/chains}/starknet/services/deploymentData/deploymentData.schema.d.ts +0 -0
  517. package/dist/{chains → src/chains}/starknet/services/deploymentData/findImplementationForAccount.d.ts +0 -0
  518. package/dist/{chains → src/chains}/starknet/services/deploymentData/getAccountClassHash.d.ts +0 -0
  519. package/dist/{chains → src/chains}/starknet/services/deploymentData/index.d.ts +0 -0
  520. package/dist/{chains → src/chains}/starknet/services/index.d.ts +0 -0
  521. package/dist/{chains → src/chains}/starknet/starknetId.d.ts +0 -0
  522. package/dist/{errors → src/errors}/account.d.ts +0 -0
  523. package/dist/{errors → src/errors}/address.d.ts +0 -0
  524. package/dist/{errors → src/errors}/baseErrors.d.ts +0 -0
  525. package/dist/{errors → src/errors}/call.d.ts +0 -0
  526. package/dist/{errors → src/errors}/network.d.ts +0 -0
  527. package/dist/{errors → src/errors}/review.d.ts +0 -0
  528. package/dist/{errors → src/errors}/swap.d.ts +0 -0
  529. package/dist/{features → src/features}/simulation/activity/index.d.ts +0 -0
  530. package/dist/{features → src/features}/simulation/activity/normalize.d.ts +0 -0
  531. package/dist/{features → src/features}/simulation/activity/schema.d.ts +200 -200
  532. package/dist/{features → src/features}/simulation/activity/utils/createNativeActivity.d.ts +6 -6
  533. package/dist/{features → src/features}/simulation/activity/utils/getAnyActivityTitle.d.ts +0 -0
  534. package/dist/{features → src/features}/simulation/activity/utils/getOverallLastModified.d.ts +0 -0
  535. package/dist/{features → src/features}/simulation/activity/utils/hasDelegationActivity.d.ts +0 -0
  536. package/dist/{features → src/features}/simulation/activity/utils/index.d.ts +0 -0
  537. package/dist/{features → src/features}/simulation/activity/utils/isMulticallWithDeploymentActivity.d.ts +0 -0
  538. package/dist/{features → src/features}/simulation/activity/utils/isRejectOnChainActivity.d.ts +0 -0
  539. package/dist/{features → src/features}/simulation/activity/utils/isUpgradeActivity.d.ts +0 -0
  540. package/dist/{features → src/features}/simulation/activity/utils/parseAccountActivities.d.ts +0 -0
  541. package/dist/{features → src/features}/simulation/activity/utils/parseFinanceActivities.d.ts +0 -0
  542. package/dist/{features → src/features}/simulation/fees/index.d.ts +0 -0
  543. package/dist/{features → src/features}/simulation/fees/schema.d.ts +0 -0
  544. package/dist/{features → src/features}/simulation/index.d.ts +0 -0
  545. package/dist/{features → src/features}/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.d.ts +0 -0
  546. package/dist/{features → src/features}/simulation/transactionReview/getMessageFromSimulationError.d.ts +0 -0
  547. package/dist/{features → src/features}/simulation/transactionReview/index.d.ts +0 -0
  548. package/dist/{features → src/features}/simulation/transactionReview/schema.d.ts +1324 -1324
  549. package/dist/{features → src/features}/simulation/warning/helper.d.ts +0 -0
  550. package/dist/{features → src/features}/simulation/warning/index.d.ts +0 -0
  551. package/dist/{features → src/features}/simulation/warning/schema.d.ts +0 -0
  552. package/dist/{features → src/features}/swap/index.d.ts +0 -0
  553. package/dist/{features → src/features}/swap/models/index.d.ts +0 -0
  554. package/dist/{features → src/features}/swap/models/order.model.d.ts +0 -0
  555. package/dist/{features → src/features}/swap/models/quote.model.d.ts +0 -0
  556. package/dist/{features → src/features}/swap/models/trade.model.d.ts +0 -0
  557. package/dist/{features → src/features}/swap/services/implementation.d.ts +0 -0
  558. package/dist/{features → src/features}/swap/services/index.d.ts +0 -0
  559. package/dist/{features → src/features}/swap/services/interface.d.ts +0 -0
  560. package/dist/{features → src/features}/swap/services/order.mock.d.ts +0 -0
  561. package/dist/{features → src/features}/swap/services/quote.mock.d.ts +0 -0
  562. package/dist/{features → src/features}/swap/tests/token.mock.d.ts +0 -0
  563. package/dist/{features → src/features}/swap/tests/trade.mock.d.ts +0 -0
  564. package/dist/{features → src/features}/swap/tests/walletAccount.mock.d.ts +0 -0
  565. package/dist/{features → src/features}/swap/utils/index.d.ts +0 -0
  566. package/dist/{features → src/features}/swap/utils/slippage.d.ts +0 -0
  567. package/dist/{features → src/features}/swap/utils/totalFee.d.ts +0 -0
  568. package/dist/{http → src/http}/DateService.d.ts +0 -0
  569. package/dist/{http → src/http}/HttpError.d.ts +0 -0
  570. package/dist/{http → src/http}/HttpService.d.ts +0 -0
  571. package/dist/{http → src/http}/IDateService.d.ts +0 -0
  572. package/dist/{http → src/http}/IHttpService.d.ts +0 -0
  573. package/dist/{http → src/http}/SWRService.d.ts +0 -0
  574. package/dist/{http → src/http}/apiData.d.ts +0 -0
  575. package/dist/{http → src/http}/fetcher.d.ts +0 -0
  576. package/dist/{http → src/http}/time.d.ts +0 -0
  577. package/dist/{knownDapps → src/knownDapps}/IKnownDappsBackendService.d.ts +0 -0
  578. package/dist/{knownDapps → src/knownDapps}/KnownDappsBackendService.d.ts +0 -0
  579. package/dist/{knownDapps → src/knownDapps}/index.d.ts +0 -0
  580. package/dist/{knownDapps → src/knownDapps}/schema.d.ts +0 -0
  581. package/dist/{knownDapps → src/knownDapps}/utils/getDapplandUrl.d.ts +0 -0
  582. package/dist/{knownDapps → src/knownDapps}/utils/index.d.ts +0 -0
  583. package/dist/{nameResolution → src/nameResolution}/IResolveNameService.d.ts +0 -0
  584. package/dist/{nameResolution → src/nameResolution}/ResolveNameService.d.ts +0 -0
  585. package/dist/{nameResolution → src/nameResolution}/index.d.ts +0 -0
  586. package/dist/{nameResolution → src/nameResolution}/schema.d.ts +0 -0
  587. package/dist/{nfts → src/nfts}/BackendNftService.d.ts +0 -0
  588. package/dist/{nfts → src/nfts}/BackendPaginationError.d.ts +0 -0
  589. package/dist/{nfts → src/nfts}/INFTService.d.ts +0 -0
  590. package/dist/{nfts → src/nfts}/utils.d.ts +0 -0
  591. package/dist/{onchainRecovery → src/onchainRecovery}/IOnchainRecoveryService.d.ts +0 -0
  592. package/dist/{onchainRecovery → src/onchainRecovery}/OnchainRecoveryService.d.ts +0 -0
  593. package/dist/{onchainRecovery → src/onchainRecovery}/index.d.ts +0 -0
  594. package/dist/{onchainRecovery → src/onchainRecovery}/schema.d.ts +0 -0
  595. package/dist/{platform → src/platform}/index.d.ts +0 -0
  596. package/dist/{platform → src/platform}/isBraveBrowser.d.ts +0 -0
  597. package/dist/{platform → src/platform}/isBrowser.d.ts +0 -0
  598. package/dist/{signer → src/signer}/index.d.ts +0 -0
  599. package/dist/{signer → src/signer}/multisigner.d.ts +0 -0
  600. package/dist/{signer → src/signer}/seedphrase.d.ts +0 -0
  601. package/dist/{tokens → src/tokens}/balances.d.ts +0 -0
  602. package/dist/{tokens → src/tokens}/constants.d.ts +0 -0
  603. package/dist/{tokens → src/tokens}/convertTokenAmountToCurrencyValue.d.ts +0 -0
  604. package/dist/{tokens → src/tokens}/convertTokenUnitAmountWithDecimals.d.ts +0 -0
  605. package/dist/{tokens → src/tokens}/ensureDecimals.d.ts +0 -0
  606. package/dist/{tokens → src/tokens}/getCurrencySymbol.d.ts +0 -0
  607. package/dist/{tokens → src/tokens}/index.d.ts +0 -0
  608. package/dist/{tokens → src/tokens}/isUnlimitedAmount.d.ts +0 -0
  609. package/dist/{tokens → src/tokens}/prettifyCurrencyValue.d.ts +0 -0
  610. package/dist/{tokens → src/tokens}/prettifyTokenAmount.d.ts +0 -0
  611. package/dist/{tokens → src/tokens}/service/index.d.ts +0 -0
  612. package/dist/{tokens → src/tokens}/service/interface.d.ts +0 -0
  613. package/dist/{tokens → src/tokens}/service/tokenError.d.ts +0 -0
  614. package/dist/{tokens → src/tokens}/service/types/index.d.ts +0 -0
  615. package/dist/{tokens → src/tokens}/service/types/unclaimedRewards.model.d.ts +0 -0
  616. package/dist/{tokens → src/tokens}/service/types/webToken.model.d.ts +0 -0
  617. package/dist/{tokens → src/tokens}/token.d.ts +0 -0
  618. package/dist/{transactions → src/transactions}/aggregatedSimDataTypes.d.ts +0 -0
  619. package/dist/{transactions → src/transactions}/amount.d.ts +0 -0
  620. package/dist/{transactions → src/transactions}/buildTransactions.d.ts +0 -0
  621. package/dist/{transactions → src/transactions}/deployAccountTypes.d.ts +0 -0
  622. package/dist/{transactions → src/transactions}/errors.d.ts +0 -0
  623. package/dist/{transactions → src/transactions}/estimate/argentMaxFee.d.ts +0 -0
  624. package/dist/{transactions → src/transactions}/estimate/error.d.ts +0 -0
  625. package/dist/{transactions → src/transactions}/estimate/index.d.ts +0 -0
  626. package/dist/{transactions → src/transactions}/estimate/model.d.ts +0 -0
  627. package/dist/{transactions → src/transactions}/estimate/utils.d.ts +0 -0
  628. package/dist/{transactions → src/transactions}/findTransfersAndApprovals.d.ts +0 -0
  629. package/dist/{transactions → src/transactions}/getPrettyRcpError.d.ts +0 -0
  630. package/dist/{transactions → src/transactions}/getTransactionVersion.d.ts +0 -0
  631. package/dist/{transactions → src/transactions}/service/implementation.d.ts +0 -0
  632. package/dist/{transactions → src/transactions}/service/index.d.ts +0 -0
  633. package/dist/{transactions → src/transactions}/service/interface.d.ts +0 -0
  634. package/dist/{transactions → src/transactions}/service/types.d.ts +2 -2
  635. /package/dist/{transactions → src/transactions}/transactionAction.d.ts +0 -0
  636. /package/dist/{transactions → src/transactions}/transactionReviewTypes.d.ts +0 -0
  637. /package/dist/{transactions → src/transactions}/transactionSimulationTypes.d.ts +0 -0
  638. /package/dist/{transactions → src/transactions}/transactionVersion.d.ts +0 -0
  639. /package/dist/{transactions → src/transactions}/txv3.d.ts +0 -0
  640. /package/dist/{transactions → src/transactions}/types.d.ts +0 -0
  641. /package/dist/{utils → src/utils}/address.d.ts +0 -0
  642. /package/dist/{utils → src/utils}/arrays.d.ts +0 -0
  643. /package/dist/{utils → src/utils}/avatarImage.d.ts +0 -0
  644. /package/dist/{utils → src/utils}/base58.d.ts +0 -0
  645. /package/dist/{utils → src/utils}/bigNumber.d.ts +0 -0
  646. /package/dist/{utils → src/utils}/bips.d.ts +0 -0
  647. /package/dist/{utils → src/utils}/daysBetween.d.ts +0 -0
  648. /package/dist/{utils → src/utils}/env.d.ts +0 -0
  649. /package/dist/{utils → src/utils}/hex.d.ts +0 -0
  650. /package/dist/{utils → src/utils}/id.d.ts +0 -0
  651. /package/dist/{utils → src/utils}/initials.d.ts +0 -0
  652. /package/dist/{utils → src/utils}/isContractDeployed.d.ts +0 -0
  653. /package/dist/{utils → src/utils}/nonNullable.d.ts +0 -0
  654. /package/dist/{utils → src/utils}/number/index.d.ts +0 -0
  655. /package/dist/{utils → src/utils}/number/isAllowedAddressHexInputValue.d.ts +0 -0
  656. /package/dist/{utils → src/utils}/number/isAllowedNumericInputValue.d.ts +0 -0
  657. /package/dist/{utils → src/utils}/number/isNumeric.d.ts +0 -0
  658. /package/dist/{utils → src/utils}/number/prettifyNumber.d.ts +0 -0
  659. /package/dist/{utils → src/utils}/parseAmount.d.ts +0 -0
  660. /package/dist/{utils → src/utils}/pluralise.d.ts +0 -0
  661. /package/dist/{utils → src/utils}/readFileAsString.d.ts +0 -0
  662. /package/dist/{utils → src/utils}/schemas.d.ts +0 -0
  663. /package/dist/{utils → src/utils}/starknet/starknet.d.ts +0 -0
  664. /package/dist/{utils → src/utils}/starknet/starknetLibTypes.d.ts +0 -0
  665. /package/dist/{utils → src/utils}/starknet/starknetSchemas.d.ts +0 -0
  666. /package/dist/{utils → src/utils}/transactions.d.ts +0 -0
  667. /package/dist/{utils → src/utils}/url/index.d.ts +0 -0
  668. /package/dist/{utils → src/utils}/url/urlWithQuery.d.ts +0 -0
  669. /package/dist/{utils → src/utils}/voidify.d.ts +0 -0
@@ -1,1913 +0,0 @@
1
- import { z as t } from "zod";
2
- import { validateChecksumAddress as Hr, validateAndParseAddress as Wr, getChecksumAddress as Zr, num as Xe, constants as Yr, CairoCustomEnum as Kr } from "starknet";
3
- import { memoize as Er, noop as Jr } from "lodash-es";
4
- import { createContext as Qr, useContext as et, useEffect as rt } from "react";
5
- import "swr";
6
- import "@scure/base";
7
- import { jsx as tt } from "react/jsx-runtime";
8
- function an(s, f) {
9
- let [A, v = ""] = s.split(".");
10
- const N = A.startsWith("-");
11
- return N && (A = A.slice(1)), v.length > f ? Number(v[f]) >= 5 ? v = (BigInt(v.slice(0, f)) + 1n).toString().padStart(f, "0") : v = v.slice(0, f) : v = v.padEnd(f, "0"), {
12
- value: BigInt(`${N ? "-" : ""}${A}${v}`),
13
- decimals: f
14
- };
15
- }
16
- const pr = t.string().refine((s) => {
17
- if (s.toLowerCase() === s)
18
- return !0;
19
- try {
20
- return Hr(s) && ct(s);
21
- } catch {
22
- }
23
- return !1;
24
- }, "Invalid address (checksum error)"), nt = t.string().refine((s) => {
25
- try {
26
- return Wr(s);
27
- } catch {
28
- }
29
- return !1;
30
- }, "Invalid address (validation error)"), Pe = t.string().regex(/^0x[0-9a-fA-F]+$/, "Invalid address"), st = Pe.min(50, "Addresses must at least be 50 characters long").max(66, "Addresses must at most be 66 characters long"), it = Pe.length(66, "Address must be 66 characters long"), Re = st.pipe(pr).transform((s) => `0x${(s.startsWith("0x") ? s.slice(2) : s).padStart(64, "0")}`), on = Re.or(t.literal("")).transform((s) => s === "" ? void 0 : s).optional(), er = Pe.transform((s) => `0x${s.replace(/^0x/, "").toLowerCase().padStart(64, "0")}`), at = (s) => Re.safeParse(s).success, ot = at, _e = (s) => Zr(s), cn = (s) => {
31
- const f = _e(s), A = f.slice(0, 2), v = f.slice(2, 6), N = f.slice(-4);
32
- return `${A}${v}…${N}`;
33
- }, ln = (s) => {
34
- const f = _e(s), A = f.slice(0, 2), N = f.slice(2).match(/.{1,4}/g) || [];
35
- return `${A} ${N.join(" ")}`;
36
- }, ct = (s) => !/^0x[0-9a-f]{63,64}$/.test(s), lt = (s, f) => {
37
- try {
38
- return !s || !f ? !1 : Xe.hexToDecimalString(s) === Xe.hexToDecimalString(f);
39
- } catch {
40
- }
41
- return !1;
42
- }, ut = (s) => {
43
- try {
44
- return Xe.toBigInt(Pe.parse(s)) === Yr.ZERO;
45
- } catch {
46
- }
47
- return !1;
48
- }, un = (s, f) => !!(f != null && f.some((A) => lt(A, s))), fn = Er((s) => {
49
- const f = s.slice(0, 6), A = s.slice(-4);
50
- return `${f}…${A}`;
51
- }), hn = Er((s, f) => {
52
- if (s.length < f)
53
- return s;
54
- const A = Math.floor((f - 1) / 2), v = s.slice(0, A), N = s.slice(-A);
55
- return `${v}…${N}`;
56
- }), En = t.string().regex(/^[a-zA-Z0-9.-]*$/g, "Invalid address character").max(66, "Address cannot be over 66 characters"), ft = it.pipe(pr).pipe(nt), ke = t.string().regex(/^([a-zA-Z0-9-]+\.)+argent.xyz$/, "Invalid Argent name").max(253, "Argent name cannot be over 253 characters"), ht = (s) => ke.safeParse(s).success, Et = (s, f) => {
57
- try {
58
- return f ? Ve(s) === Ve(f) : !1;
59
- } catch {
60
- }
61
- return !1;
62
- }, Ve = (s) => ke.parse(s).toLowerCase(), rr = t.string().regex(/^([a-zA-Z0-9-]+\.)+stark$/, "Invalid Starknet ID").max(50, "Starknet ID cannot be over 50 characters"), pt = (s) => rr.safeParse(s).success, dt = (s, f) => {
63
- try {
64
- return f ? qe(s) === qe(f) : !1;
65
- } catch {
66
- }
67
- return !1;
68
- }, qe = (s) => rr.parse(s).toLowerCase(), tr = t.union([
69
- ke,
70
- rr
71
- ]), pn = t.union([
72
- Re,
73
- tr
74
- ]), dn = t.union([
75
- ft,
76
- tr
77
- ]), mn = (s) => tr.safeParse(s).success, gn = (s, f) => {
78
- try {
79
- return f ? Et(s, f) || dt(s, f) : !1;
80
- } catch {
81
- }
82
- return !1;
83
- }, In = (s) => pt(s) ? qe(s) : ht(s) ? Ve(s) : _e(s), mt = t.union([t.literal("0"), t.literal("1")]);
84
- function gt(s) {
85
- var f = [];
86
- if (s.length === 0)
87
- return "";
88
- if (typeof s[0] != "string")
89
- throw new TypeError("Url must be a string. Received " + s[0]);
90
- if (s[0].match(/^[^/:]+:\/*$/) && s.length > 1) {
91
- var A = s.shift();
92
- s[0] = A + s[0];
93
- }
94
- s[0].match(/^file:\/\/\//) ? s[0] = s[0].replace(/^([^/:]+):\/*/, "$1:///") : s[0] = s[0].replace(/^([^/:]+):\/*/, "$1://");
95
- for (var v = 0; v < s.length; v++) {
96
- var N = s[v];
97
- if (typeof N != "string")
98
- throw new TypeError("Url must be a string. Received " + N);
99
- N !== "" && (v > 0 && (N = N.replace(/^[\/]+/, "")), v < s.length - 1 ? N = N.replace(/[\/]+$/, "") : N = N.replace(/[\/]+$/, "/"), f.push(N));
100
- }
101
- var M = f.join("/");
102
- M = M.replace(/\/(\?|&|#[^!])/g, "$1");
103
- var x = M.split("?");
104
- return M = x.shift() + (x.length > 0 ? "?" : "") + x.join("&"), M;
105
- }
106
- function It() {
107
- var s;
108
- return typeof arguments[0] == "object" ? s = arguments[0] : s = [].slice.call(arguments), gt(s);
109
- }
110
- class je extends Error {
111
- constructor({ code: f, message: A, options: v = {} }, N) {
112
- const { error: M, context: x } = v;
113
- super(A, { cause: M }), this.errorMessages = N, this.name = "BaseError", this.context = x, this.code = f, this.setMessageByCode(f, A);
114
- }
115
- setMessageByCode(f, A) {
116
- !f || !this.errorMessages || A || (this.message = this.errorMessages[f]);
117
- }
118
- toString() {
119
- return this.message || "";
120
- }
121
- }
122
- var ze;
123
- (function(s) {
124
- s.NOT_VALID = "Invalid address", s.NOT_FOUND = "Address not found", s.STARKNAME_NOT_FOUND = "Stark name not found", s.STARKNAME_ERROR = "Could not get address from stark name", s.STARKNAME_INVALID_ADDRESS = "Stark name resolved to an invalid address", s.ARGENT_NAME_NOT_FOUND = "Argent name not found", s.NO_ADDRESS_FROM_ARGENT_NAME = "Could not get address from Argent name", s.ARGENT_NAME_INVALID_ADDRESS = "Argent name resolved to an invalid address", s.NO_ADDRESS_FROM_DOMAIN = "Could not get address from domain", s.ARGENT_NAME_INVALID_NETWORK = "Argent name is not enabled on the requested network";
125
- })(ze || (ze = {}));
126
- class ye extends je {
127
- constructor(f) {
128
- super(f, ze), this.name = "AddressError";
129
- }
130
- }
131
- class nr extends Error {
132
- constructor(f, A, v) {
133
- super(f), this.status = A, this.data = v, Object.setPrototypeOf(this, nr.prototype);
134
- }
135
- }
136
- var or;
137
- (function(s) {
138
- s.FAILED_TO_FETCH_URL = "Failed to fetch url", s.FAILED_TO_POST_URL = "Failed to post url";
139
- })(or || (or = {}));
140
- const Rn = t.object({
141
- walletAddress: er,
142
- ens: ke,
143
- chain: t.enum(["ethereum", "starknet"]),
144
- deleted: t.boolean(),
145
- walletDeployed: t.boolean()
146
- }).or(t.object({
147
- status: t.string()
148
- }));
149
- async function Nn(s, f, A, v = "starknet") {
150
- const N = {
151
- ens: s,
152
- chain: v
153
- }, M = new URLSearchParams(N), x = It(A, "wallet", `?${M}`);
154
- try {
155
- const j = await f.get(x), D = j && "walletAddress" in j ? j.walletAddress : void 0;
156
- if (!D)
157
- throw new ye({
158
- code: "NO_ADDRESS_FROM_ARGENT_NAME"
159
- });
160
- if (ut(D))
161
- throw new ye({
162
- code: "ARGENT_NAME_NOT_FOUND",
163
- message: `${s} not found`
164
- });
165
- if (!ot(D))
166
- throw new ye({
167
- code: "ARGENT_NAME_INVALID_ADDRESS",
168
- message: `${s} resolved to an invalid address (${D})`
169
- });
170
- return _e(D);
171
- } catch (j) {
172
- throw j instanceof nr && j.status === 404 ? new ye({
173
- code: "ARGENT_NAME_NOT_FOUND",
174
- message: `${s} not found`
175
- }) : j;
176
- }
177
- }
178
- var He;
179
- (function(s) {
180
- s.NOT_VALID = "Invalid call";
181
- })(He || (He = {}));
182
- class On extends je {
183
- constructor(f) {
184
- super(f, He), this.name = "CallError";
185
- }
186
- }
187
- var We;
188
- (function(s) {
189
- s.NO_NETWORK_OR_MULTICALL = "Missing networkId or multicall", s.NOT_FOUND = "Network not found";
190
- })(We || (We = {}));
191
- class An extends je {
192
- constructor(f) {
193
- super(f, We), this.name = "NetworkError";
194
- }
195
- }
196
- const ve = t.union([t.string(), t.number(), t.bigint()]), Rt = t.object({
197
- low: ve,
198
- high: ve
199
- }), Nt = t.array(t.string()).and(t.object({
200
- __compiled__: t.boolean().optional()
201
- }).optional()), Ot = t.lazy(() => t.array(t.union([be, t.array(be), sr]))), be = t.union([
202
- ve,
203
- Rt,
204
- t.any(),
205
- t.boolean()
206
- ]), At = t.lazy(() => t.record(t.union([be, t.array(be), sr]))), sr = t.lazy(() => t.union([At, Ot])), St = t.union([sr, Nt]).optional(), Tt = t.lazy(() => t.object({
207
- contractAddress: t.string(),
208
- calldata: St,
209
- entrypoint: t.string().optional()
210
- })), Sn = t.lazy(() => Tt.and(t.object({
211
- entrypoint: t.string()
212
- }))), le = t.string().refine((s) => typeof parseInt(s) == "number"), Tn = t.tuple([le]), wn = t.tuple([le]), vn = t.object({
213
- new_threshold: t.string().refine((s) => typeof parseInt(s) == "number"),
214
- signers_to_add: t.array(le)
215
- }), Ln = t.object({
216
- new_threshold: t.string().refine((s) => typeof parseInt(s) == "number"),
217
- signers_to_remove: t.array(le)
218
- }), yn = t.object({
219
- signer_to_remove: le,
220
- signer_to_add: le
221
- }), Cn = t.tuple([le]), Dn = t.tuple([le]), bn = t.tuple([le]), Pn = t.tuple([le]).rest(le), _n = t.object({
222
- recipient: Re,
223
- amount: t.object({
224
- low: ve,
225
- high: ve
226
- })
227
- }), wt = t.string().regex(/^(0x)?[0-9a-fA-F]+$/, "Invalid hex string"), dr = wt.transform((s) => {
228
- const f = s.startsWith("0x") ? s.slice(2) : s;
229
- return `0x${f.length % 2 === 0 ? f : `0${f}`}`;
230
- }), kn = t.object({
231
- cairoVersion: mt,
232
- accountClassHash: dr
233
- }), vt = t.array(t.string()), jn = t.object({
234
- implementation: t.string(),
235
- selector: dr,
236
- calldata: vt
237
- }), Fn = t.object({
238
- owner: t.string(),
239
- guardian: t.string().optional().transform((s) => s ?? "0")
240
- });
241
- var cr;
242
- (function(s) {
243
- s.Starknet = "Starknet", s.Secp256k1 = "Secp256k1", s.Secp256r1 = "Secp256r1", s.Eip191 = "Eip191", s.Webauthn = "Webauthn";
244
- })(cr || (cr = {}));
245
- function Un(s, f) {
246
- const A = {
247
- Starknet: void 0,
248
- Secp256k1: void 0,
249
- Secp256r1: void 0,
250
- Eip191: void 0,
251
- Webauthn: void 0
252
- };
253
- return A[f] = s, new Kr(A);
254
- }
255
- var Ze;
256
- (function(s) {
257
- s.NOT_FOUND = "Account not found", s.CALCULATED_ADDRESS_NO_MATCH = "Calculated address does not match account address";
258
- })(Ze || (Ze = {}));
259
- class Bn extends je {
260
- constructor(f) {
261
- super(f, Ze), this.name = "AccountError";
262
- }
263
- }
264
- function Lt(s) {
265
- return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
266
- }
267
- var Ye = { exports: {} };
268
- (function(s, f) {
269
- f = s.exports = b;
270
- var A;
271
- typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? A = function() {
272
- var e = Array.prototype.slice.call(arguments, 0);
273
- e.unshift("SEMVER"), console.log.apply(console, e);
274
- } : A = function() {
275
- }, f.SEMVER_SPEC_VERSION = "2.0.0";
276
- var v = 256, N = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
277
- 9007199254740991, M = 16, x = v - 6, j = f.re = [], D = f.safeRe = [], I = f.src = [], d = f.tokens = {}, K = 0;
278
- function P(e) {
279
- d[e] = K++;
280
- }
281
- var pe = "[a-zA-Z0-9-]", ne = [
282
- ["\\s", 1],
283
- ["\\d", v],
284
- [pe, x]
285
- ];
286
- function de(e) {
287
- for (var a = 0; a < ne.length; a++) {
288
- var c = ne[a][0], R = ne[a][1];
289
- e = e.split(c + "*").join(c + "{0," + R + "}").split(c + "+").join(c + "{1," + R + "}");
290
- }
291
- return e;
292
- }
293
- P("NUMERICIDENTIFIER"), I[d.NUMERICIDENTIFIER] = "0|[1-9]\\d*", P("NUMERICIDENTIFIERLOOSE"), I[d.NUMERICIDENTIFIERLOOSE] = "\\d+", P("NONNUMERICIDENTIFIER"), I[d.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + pe + "*", P("MAINVERSION"), I[d.MAINVERSION] = "(" + I[d.NUMERICIDENTIFIER] + ")\\.(" + I[d.NUMERICIDENTIFIER] + ")\\.(" + I[d.NUMERICIDENTIFIER] + ")", P("MAINVERSIONLOOSE"), I[d.MAINVERSIONLOOSE] = "(" + I[d.NUMERICIDENTIFIERLOOSE] + ")\\.(" + I[d.NUMERICIDENTIFIERLOOSE] + ")\\.(" + I[d.NUMERICIDENTIFIERLOOSE] + ")", P("PRERELEASEIDENTIFIER"), I[d.PRERELEASEIDENTIFIER] = "(?:" + I[d.NUMERICIDENTIFIER] + "|" + I[d.NONNUMERICIDENTIFIER] + ")", P("PRERELEASEIDENTIFIERLOOSE"), I[d.PRERELEASEIDENTIFIERLOOSE] = "(?:" + I[d.NUMERICIDENTIFIERLOOSE] + "|" + I[d.NONNUMERICIDENTIFIER] + ")", P("PRERELEASE"), I[d.PRERELEASE] = "(?:-(" + I[d.PRERELEASEIDENTIFIER] + "(?:\\." + I[d.PRERELEASEIDENTIFIER] + ")*))", P("PRERELEASELOOSE"), I[d.PRERELEASELOOSE] = "(?:-?(" + I[d.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + I[d.PRERELEASEIDENTIFIERLOOSE] + ")*))", P("BUILDIDENTIFIER"), I[d.BUILDIDENTIFIER] = pe + "+", P("BUILD"), I[d.BUILD] = "(?:\\+(" + I[d.BUILDIDENTIFIER] + "(?:\\." + I[d.BUILDIDENTIFIER] + ")*))", P("FULL"), P("FULLPLAIN"), I[d.FULLPLAIN] = "v?" + I[d.MAINVERSION] + I[d.PRERELEASE] + "?" + I[d.BUILD] + "?", I[d.FULL] = "^" + I[d.FULLPLAIN] + "$", P("LOOSEPLAIN"), I[d.LOOSEPLAIN] = "[v=\\s]*" + I[d.MAINVERSIONLOOSE] + I[d.PRERELEASELOOSE] + "?" + I[d.BUILD] + "?", P("LOOSE"), I[d.LOOSE] = "^" + I[d.LOOSEPLAIN] + "$", P("GTLT"), I[d.GTLT] = "((?:<|>)?=?)", P("XRANGEIDENTIFIERLOOSE"), I[d.XRANGEIDENTIFIERLOOSE] = I[d.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*", P("XRANGEIDENTIFIER"), I[d.XRANGEIDENTIFIER] = I[d.NUMERICIDENTIFIER] + "|x|X|\\*", P("XRANGEPLAIN"), I[d.XRANGEPLAIN] = "[v=\\s]*(" + I[d.XRANGEIDENTIFIER] + ")(?:\\.(" + I[d.XRANGEIDENTIFIER] + ")(?:\\.(" + I[d.XRANGEIDENTIFIER] + ")(?:" + I[d.PRERELEASE] + ")?" + I[d.BUILD] + "?)?)?", P("XRANGEPLAINLOOSE"), I[d.XRANGEPLAINLOOSE] = "[v=\\s]*(" + I[d.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + I[d.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + I[d.XRANGEIDENTIFIERLOOSE] + ")(?:" + I[d.PRERELEASELOOSE] + ")?" + I[d.BUILD] + "?)?)?", P("XRANGE"), I[d.XRANGE] = "^" + I[d.GTLT] + "\\s*" + I[d.XRANGEPLAIN] + "$", P("XRANGELOOSE"), I[d.XRANGELOOSE] = "^" + I[d.GTLT] + "\\s*" + I[d.XRANGEPLAINLOOSE] + "$", P("COERCE"), I[d.COERCE] = "(^|[^\\d])(\\d{1," + M + "})(?:\\.(\\d{1," + M + "}))?(?:\\.(\\d{1," + M + "}))?(?:$|[^\\d])", P("COERCERTL"), j[d.COERCERTL] = new RegExp(I[d.COERCE], "g"), D[d.COERCERTL] = new RegExp(de(I[d.COERCE]), "g"), P("LONETILDE"), I[d.LONETILDE] = "(?:~>?)", P("TILDETRIM"), I[d.TILDETRIM] = "(\\s*)" + I[d.LONETILDE] + "\\s+", j[d.TILDETRIM] = new RegExp(I[d.TILDETRIM], "g"), D[d.TILDETRIM] = new RegExp(de(I[d.TILDETRIM]), "g");
294
- var me = "$1~";
295
- P("TILDE"), I[d.TILDE] = "^" + I[d.LONETILDE] + I[d.XRANGEPLAIN] + "$", P("TILDELOOSE"), I[d.TILDELOOSE] = "^" + I[d.LONETILDE] + I[d.XRANGEPLAINLOOSE] + "$", P("LONECARET"), I[d.LONECARET] = "(?:\\^)", P("CARETTRIM"), I[d.CARETTRIM] = "(\\s*)" + I[d.LONECARET] + "\\s+", j[d.CARETTRIM] = new RegExp(I[d.CARETTRIM], "g"), D[d.CARETTRIM] = new RegExp(de(I[d.CARETTRIM]), "g");
296
- var Te = "$1^";
297
- P("CARET"), I[d.CARET] = "^" + I[d.LONECARET] + I[d.XRANGEPLAIN] + "$", P("CARETLOOSE"), I[d.CARETLOOSE] = "^" + I[d.LONECARET] + I[d.XRANGEPLAINLOOSE] + "$", P("COMPARATORLOOSE"), I[d.COMPARATORLOOSE] = "^" + I[d.GTLT] + "\\s*(" + I[d.LOOSEPLAIN] + ")$|^$", P("COMPARATOR"), I[d.COMPARATOR] = "^" + I[d.GTLT] + "\\s*(" + I[d.FULLPLAIN] + ")$|^$", P("COMPARATORTRIM"), I[d.COMPARATORTRIM] = "(\\s*)" + I[d.GTLT] + "\\s*(" + I[d.LOOSEPLAIN] + "|" + I[d.XRANGEPLAIN] + ")", j[d.COMPARATORTRIM] = new RegExp(I[d.COMPARATORTRIM], "g"), D[d.COMPARATORTRIM] = new RegExp(de(I[d.COMPARATORTRIM]), "g");
298
- var T = "$1$2$3";
299
- P("HYPHENRANGE"), I[d.HYPHENRANGE] = "^\\s*(" + I[d.XRANGEPLAIN] + ")\\s+-\\s+(" + I[d.XRANGEPLAIN] + ")\\s*$", P("HYPHENRANGELOOSE"), I[d.HYPHENRANGELOOSE] = "^\\s*(" + I[d.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + I[d.XRANGEPLAINLOOSE] + ")\\s*$", P("STAR"), I[d.STAR] = "(<|>)?=?\\s*\\*";
300
- for (var re = 0; re < K; re++)
301
- A(re, I[re]), j[re] || (j[re] = new RegExp(I[re]), D[re] = new RegExp(de(I[re])));
302
- f.parse = ue;
303
- function ue(e, a) {
304
- if ((!a || typeof a != "object") && (a = {
305
- loose: !!a,
306
- includePrerelease: !1
307
- }), e instanceof b)
308
- return e;
309
- if (typeof e != "string" || e.length > v)
310
- return null;
311
- var c = a.loose ? D[d.LOOSE] : D[d.FULL];
312
- if (!c.test(e))
313
- return null;
314
- try {
315
- return new b(e, a);
316
- } catch {
317
- return null;
318
- }
319
- }
320
- f.valid = we;
321
- function we(e, a) {
322
- var c = ue(e, a);
323
- return c ? c.version : null;
324
- }
325
- f.clean = J;
326
- function J(e, a) {
327
- var c = ue(e.trim().replace(/^[=v]+/, ""), a);
328
- return c ? c.version : null;
329
- }
330
- f.SemVer = b;
331
- function b(e, a) {
332
- if ((!a || typeof a != "object") && (a = {
333
- loose: !!a,
334
- includePrerelease: !1
335
- }), e instanceof b) {
336
- if (e.loose === a.loose)
337
- return e;
338
- e = e.version;
339
- } else if (typeof e != "string")
340
- throw new TypeError("Invalid Version: " + e);
341
- if (e.length > v)
342
- throw new TypeError("version is longer than " + v + " characters");
343
- if (!(this instanceof b))
344
- return new b(e, a);
345
- A("SemVer", e, a), this.options = a, this.loose = !!a.loose;
346
- var c = e.trim().match(a.loose ? D[d.LOOSE] : D[d.FULL]);
347
- if (!c)
348
- throw new TypeError("Invalid Version: " + e);
349
- if (this.raw = e, this.major = +c[1], this.minor = +c[2], this.patch = +c[3], this.major > N || this.major < 0)
350
- throw new TypeError("Invalid major version");
351
- if (this.minor > N || this.minor < 0)
352
- throw new TypeError("Invalid minor version");
353
- if (this.patch > N || this.patch < 0)
354
- throw new TypeError("Invalid patch version");
355
- c[4] ? this.prerelease = c[4].split(".").map(function(R) {
356
- if (/^[0-9]+$/.test(R)) {
357
- var S = +R;
358
- if (S >= 0 && S < N)
359
- return S;
360
- }
361
- return R;
362
- }) : this.prerelease = [], this.build = c[5] ? c[5].split(".") : [], this.format();
363
- }
364
- b.prototype.format = function() {
365
- return this.version = this.major + "." + this.minor + "." + this.patch, this.prerelease.length && (this.version += "-" + this.prerelease.join(".")), this.version;
366
- }, b.prototype.toString = function() {
367
- return this.version;
368
- }, b.prototype.compare = function(e) {
369
- return A("SemVer.compare", this.version, this.options, e), e instanceof b || (e = new b(e, this.options)), this.compareMain(e) || this.comparePre(e);
370
- }, b.prototype.compareMain = function(e) {
371
- return e instanceof b || (e = new b(e, this.options)), E(this.major, e.major) || E(this.minor, e.minor) || E(this.patch, e.patch);
372
- }, b.prototype.comparePre = function(e) {
373
- if (e instanceof b || (e = new b(e, this.options)), this.prerelease.length && !e.prerelease.length)
374
- return -1;
375
- if (!this.prerelease.length && e.prerelease.length)
376
- return 1;
377
- if (!this.prerelease.length && !e.prerelease.length)
378
- return 0;
379
- var a = 0;
380
- do {
381
- var c = this.prerelease[a], R = e.prerelease[a];
382
- if (A("prerelease compare", a, c, R), c === void 0 && R === void 0)
383
- return 0;
384
- if (R === void 0)
385
- return 1;
386
- if (c === void 0)
387
- return -1;
388
- if (c === R)
389
- continue;
390
- return E(c, R);
391
- } while (++a);
392
- }, b.prototype.compareBuild = function(e) {
393
- e instanceof b || (e = new b(e, this.options));
394
- var a = 0;
395
- do {
396
- var c = this.build[a], R = e.build[a];
397
- if (A("prerelease compare", a, c, R), c === void 0 && R === void 0)
398
- return 0;
399
- if (R === void 0)
400
- return 1;
401
- if (c === void 0)
402
- return -1;
403
- if (c === R)
404
- continue;
405
- return E(c, R);
406
- } while (++a);
407
- }, b.prototype.inc = function(e, a) {
408
- switch (e) {
409
- case "premajor":
410
- this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", a);
411
- break;
412
- case "preminor":
413
- this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", a);
414
- break;
415
- case "prepatch":
416
- this.prerelease.length = 0, this.inc("patch", a), this.inc("pre", a);
417
- break;
418
- case "prerelease":
419
- this.prerelease.length === 0 && this.inc("patch", a), this.inc("pre", a);
420
- break;
421
- case "major":
422
- (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
423
- break;
424
- case "minor":
425
- (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
426
- break;
427
- case "patch":
428
- this.prerelease.length === 0 && this.patch++, this.prerelease = [];
429
- break;
430
- case "pre":
431
- if (this.prerelease.length === 0)
432
- this.prerelease = [0];
433
- else {
434
- for (var c = this.prerelease.length; --c >= 0; )
435
- typeof this.prerelease[c] == "number" && (this.prerelease[c]++, c = -2);
436
- c === -1 && this.prerelease.push(0);
437
- }
438
- a && (this.prerelease[0] === a ? isNaN(this.prerelease[1]) && (this.prerelease = [a, 0]) : this.prerelease = [a, 0]);
439
- break;
440
- default:
441
- throw new Error("invalid increment argument: " + e);
442
- }
443
- return this.format(), this.raw = this.version, this;
444
- }, f.inc = r;
445
- function r(e, a, c, R) {
446
- typeof c == "string" && (R = c, c = void 0);
447
- try {
448
- return new b(e, c).inc(a, R).version;
449
- } catch {
450
- return null;
451
- }
452
- }
453
- f.diff = n;
454
- function n(e, a) {
455
- if (q(e, a))
456
- return null;
457
- var c = ue(e), R = ue(a), S = "";
458
- if (c.prerelease.length || R.prerelease.length) {
459
- S = "pre";
460
- var w = "prerelease";
461
- }
462
- for (var L in c)
463
- if ((L === "major" || L === "minor" || L === "patch") && c[L] !== R[L])
464
- return S + L;
465
- return w;
466
- }
467
- f.compareIdentifiers = E;
468
- var i = /^[0-9]+$/;
469
- function E(e, a) {
470
- var c = i.test(e), R = i.test(a);
471
- return c && R && (e = +e, a = +a), e === a ? 0 : c && !R ? -1 : R && !c ? 1 : e < a ? -1 : 1;
472
- }
473
- f.rcompareIdentifiers = l;
474
- function l(e, a) {
475
- return E(a, e);
476
- }
477
- f.major = h;
478
- function h(e, a) {
479
- return new b(e, a).major;
480
- }
481
- f.minor = g;
482
- function g(e, a) {
483
- return new b(e, a).minor;
484
- }
485
- f.patch = o;
486
- function o(e, a) {
487
- return new b(e, a).patch;
488
- }
489
- f.compare = u;
490
- function u(e, a, c) {
491
- return new b(e, c).compare(new b(a, c));
492
- }
493
- f.compareLoose = m;
494
- function m(e, a) {
495
- return u(e, a, !0);
496
- }
497
- f.compareBuild = p;
498
- function p(e, a, c) {
499
- var R = new b(e, c), S = new b(a, c);
500
- return R.compare(S) || R.compareBuild(S);
501
- }
502
- f.rcompare = O;
503
- function O(e, a, c) {
504
- return u(a, e, c);
505
- }
506
- f.sort = y;
507
- function y(e, a) {
508
- return e.sort(function(c, R) {
509
- return f.compareBuild(c, R, a);
510
- });
511
- }
512
- f.rsort = C;
513
- function C(e, a) {
514
- return e.sort(function(c, R) {
515
- return f.compareBuild(R, c, a);
516
- });
517
- }
518
- f.gt = F;
519
- function F(e, a, c) {
520
- return u(e, a, c) > 0;
521
- }
522
- f.lt = V;
523
- function V(e, a, c) {
524
- return u(e, a, c) < 0;
525
- }
526
- f.eq = q;
527
- function q(e, a, c) {
528
- return u(e, a, c) === 0;
529
- }
530
- f.neq = B;
531
- function B(e, a, c) {
532
- return u(e, a, c) !== 0;
533
- }
534
- f.gte = X;
535
- function X(e, a, c) {
536
- return u(e, a, c) >= 0;
537
- }
538
- f.lte = H;
539
- function H(e, a, c) {
540
- return u(e, a, c) <= 0;
541
- }
542
- f.cmp = ge;
543
- function ge(e, a, c, R) {
544
- switch (a) {
545
- case "===":
546
- return typeof e == "object" && (e = e.version), typeof c == "object" && (c = c.version), e === c;
547
- case "!==":
548
- return typeof e == "object" && (e = e.version), typeof c == "object" && (c = c.version), e !== c;
549
- case "":
550
- case "=":
551
- case "==":
552
- return q(e, c, R);
553
- case "!=":
554
- return B(e, c, R);
555
- case ">":
556
- return F(e, c, R);
557
- case ">=":
558
- return X(e, c, R);
559
- case "<":
560
- return V(e, c, R);
561
- case "<=":
562
- return H(e, c, R);
563
- default:
564
- throw new TypeError("Invalid operator: " + a);
565
- }
566
- }
567
- f.Comparator = Y;
568
- function Y(e, a) {
569
- if ((!a || typeof a != "object") && (a = {
570
- loose: !!a,
571
- includePrerelease: !1
572
- }), e instanceof Y) {
573
- if (e.loose === !!a.loose)
574
- return e;
575
- e = e.value;
576
- }
577
- if (!(this instanceof Y))
578
- return new Y(e, a);
579
- e = e.trim().split(/\s+/).join(" "), A("comparator", e, a), this.options = a, this.loose = !!a.loose, this.parse(e), this.semver === fe ? this.value = "" : this.value = this.operator + this.semver.version, A("comp", this);
580
- }
581
- var fe = {};
582
- Y.prototype.parse = function(e) {
583
- var a = this.options.loose ? D[d.COMPARATORLOOSE] : D[d.COMPARATOR], c = e.match(a);
584
- if (!c)
585
- throw new TypeError("Invalid comparator: " + e);
586
- this.operator = c[1] !== void 0 ? c[1] : "", this.operator === "=" && (this.operator = ""), c[2] ? this.semver = new b(c[2], this.options.loose) : this.semver = fe;
587
- }, Y.prototype.toString = function() {
588
- return this.value;
589
- }, Y.prototype.test = function(e) {
590
- if (A("Comparator.test", e, this.options.loose), this.semver === fe || e === fe)
591
- return !0;
592
- if (typeof e == "string")
593
- try {
594
- e = new b(e, this.options);
595
- } catch {
596
- return !1;
597
- }
598
- return ge(e, this.operator, this.semver, this.options);
599
- }, Y.prototype.intersects = function(e, a) {
600
- if (!(e instanceof Y))
601
- throw new TypeError("a Comparator is required");
602
- (!a || typeof a != "object") && (a = {
603
- loose: !!a,
604
- includePrerelease: !1
605
- });
606
- var c;
607
- if (this.operator === "")
608
- return this.value === "" ? !0 : (c = new G(e.value, a), Le(this.value, c, a));
609
- if (e.operator === "")
610
- return e.value === "" ? !0 : (c = new G(this.value, a), Le(e.semver, c, a));
611
- var R = (this.operator === ">=" || this.operator === ">") && (e.operator === ">=" || e.operator === ">"), S = (this.operator === "<=" || this.operator === "<") && (e.operator === "<=" || e.operator === "<"), w = this.semver.version === e.semver.version, L = (this.operator === ">=" || this.operator === "<=") && (e.operator === ">=" || e.operator === "<="), $ = ge(this.semver, "<", e.semver, a) && (this.operator === ">=" || this.operator === ">") && (e.operator === "<=" || e.operator === "<"), k = ge(this.semver, ">", e.semver, a) && (this.operator === "<=" || this.operator === "<") && (e.operator === ">=" || e.operator === ">");
612
- return R || S || w && L || $ || k;
613
- }, f.Range = G;
614
- function G(e, a) {
615
- if ((!a || typeof a != "object") && (a = {
616
- loose: !!a,
617
- includePrerelease: !1
618
- }), e instanceof G)
619
- return e.loose === !!a.loose && e.includePrerelease === !!a.includePrerelease ? e : new G(e.raw, a);
620
- if (e instanceof Y)
621
- return new G(e.value, a);
622
- if (!(this instanceof G))
623
- return new G(e, a);
624
- if (this.options = a, this.loose = !!a.loose, this.includePrerelease = !!a.includePrerelease, this.raw = e.trim().split(/\s+/).join(" "), this.set = this.raw.split("||").map(function(c) {
625
- return this.parseRange(c.trim());
626
- }, this).filter(function(c) {
627
- return c.length;
628
- }), !this.set.length)
629
- throw new TypeError("Invalid SemVer Range: " + this.raw);
630
- this.format();
631
- }
632
- G.prototype.format = function() {
633
- return this.range = this.set.map(function(e) {
634
- return e.join(" ").trim();
635
- }).join("||").trim(), this.range;
636
- }, G.prototype.toString = function() {
637
- return this.range;
638
- }, G.prototype.parseRange = function(e) {
639
- var a = this.options.loose, c = a ? D[d.HYPHENRANGELOOSE] : D[d.HYPHENRANGE];
640
- e = e.replace(c, Fr), A("hyphen replace", e), e = e.replace(D[d.COMPARATORTRIM], T), A("comparator trim", e, D[d.COMPARATORTRIM]), e = e.replace(D[d.TILDETRIM], me), e = e.replace(D[d.CARETTRIM], Te), e = e.split(/\s+/).join(" ");
641
- var R = a ? D[d.COMPARATORLOOSE] : D[d.COMPARATOR], S = e.split(" ").map(function(w) {
642
- return Z(w, this.options);
643
- }, this).join(" ").split(/\s+/);
644
- return this.options.loose && (S = S.filter(function(w) {
645
- return !!w.match(R);
646
- })), S = S.map(function(w) {
647
- return new Y(w, this.options);
648
- }, this), S;
649
- }, G.prototype.intersects = function(e, a) {
650
- if (!(e instanceof G))
651
- throw new TypeError("a Range is required");
652
- return this.set.some(function(c) {
653
- return Ne(c, a) && e.set.some(function(R) {
654
- return Ne(R, a) && c.every(function(S) {
655
- return R.every(function(w) {
656
- return S.intersects(w, a);
657
- });
658
- });
659
- });
660
- });
661
- };
662
- function Ne(e, a) {
663
- for (var c = !0, R = e.slice(), S = R.pop(); c && R.length; )
664
- c = R.every(function(w) {
665
- return S.intersects(w, a);
666
- }), S = R.pop();
667
- return c;
668
- }
669
- f.toComparators = Q;
670
- function Q(e, a) {
671
- return new G(e, a).set.map(function(c) {
672
- return c.map(function(R) {
673
- return R.value;
674
- }).join(" ").trim().split(" ");
675
- });
676
- }
677
- function Z(e, a) {
678
- return A("comp", e, a), e = br(e, a), A("caret", e), e = Cr(e, a), A("tildes", e), e = _r(e, a), A("xrange", e), e = jr(e, a), A("stars", e), e;
679
- }
680
- function U(e) {
681
- return !e || e.toLowerCase() === "x" || e === "*";
682
- }
683
- function Cr(e, a) {
684
- return e.trim().split(/\s+/).map(function(c) {
685
- return Dr(c, a);
686
- }).join(" ");
687
- }
688
- function Dr(e, a) {
689
- var c = a.loose ? D[d.TILDELOOSE] : D[d.TILDE];
690
- return e.replace(c, function(R, S, w, L, $) {
691
- A("tilde", e, R, S, w, L, $);
692
- var k;
693
- return U(S) ? k = "" : U(w) ? k = ">=" + S + ".0.0 <" + (+S + 1) + ".0.0" : U(L) ? k = ">=" + S + "." + w + ".0 <" + S + "." + (+w + 1) + ".0" : $ ? (A("replaceTilde pr", $), k = ">=" + S + "." + w + "." + L + "-" + $ + " <" + S + "." + (+w + 1) + ".0") : k = ">=" + S + "." + w + "." + L + " <" + S + "." + (+w + 1) + ".0", A("tilde return", k), k;
694
- });
695
- }
696
- function br(e, a) {
697
- return e.trim().split(/\s+/).map(function(c) {
698
- return Pr(c, a);
699
- }).join(" ");
700
- }
701
- function Pr(e, a) {
702
- A("caret", e, a);
703
- var c = a.loose ? D[d.CARETLOOSE] : D[d.CARET];
704
- return e.replace(c, function(R, S, w, L, $) {
705
- A("caret", e, R, S, w, L, $);
706
- var k;
707
- return U(S) ? k = "" : U(w) ? k = ">=" + S + ".0.0 <" + (+S + 1) + ".0.0" : U(L) ? S === "0" ? k = ">=" + S + "." + w + ".0 <" + S + "." + (+w + 1) + ".0" : k = ">=" + S + "." + w + ".0 <" + (+S + 1) + ".0.0" : $ ? (A("replaceCaret pr", $), S === "0" ? w === "0" ? k = ">=" + S + "." + w + "." + L + "-" + $ + " <" + S + "." + w + "." + (+L + 1) : k = ">=" + S + "." + w + "." + L + "-" + $ + " <" + S + "." + (+w + 1) + ".0" : k = ">=" + S + "." + w + "." + L + "-" + $ + " <" + (+S + 1) + ".0.0") : (A("no pr"), S === "0" ? w === "0" ? k = ">=" + S + "." + w + "." + L + " <" + S + "." + w + "." + (+L + 1) : k = ">=" + S + "." + w + "." + L + " <" + S + "." + (+w + 1) + ".0" : k = ">=" + S + "." + w + "." + L + " <" + (+S + 1) + ".0.0"), A("caret return", k), k;
708
- });
709
- }
710
- function _r(e, a) {
711
- return A("replaceXRanges", e, a), e.split(/\s+/).map(function(c) {
712
- return kr(c, a);
713
- }).join(" ");
714
- }
715
- function kr(e, a) {
716
- e = e.trim();
717
- var c = a.loose ? D[d.XRANGELOOSE] : D[d.XRANGE];
718
- return e.replace(c, function(R, S, w, L, $, k) {
719
- A("xRange", e, R, S, w, L, $, k);
720
- var he = U(w), Ee = he || U(L), se = Ee || U($), te = se;
721
- return S === "=" && te && (S = ""), k = a.includePrerelease ? "-0" : "", he ? S === ">" || S === "<" ? R = "<0.0.0-0" : R = "*" : S && te ? (Ee && (L = 0), $ = 0, S === ">" ? (S = ">=", Ee ? (w = +w + 1, L = 0, $ = 0) : (L = +L + 1, $ = 0)) : S === "<=" && (S = "<", Ee ? w = +w + 1 : L = +L + 1), R = S + w + "." + L + "." + $ + k) : Ee ? R = ">=" + w + ".0.0" + k + " <" + (+w + 1) + ".0.0" + k : se && (R = ">=" + w + "." + L + ".0" + k + " <" + w + "." + (+L + 1) + ".0" + k), A("xRange return", R), R;
722
- });
723
- }
724
- function jr(e, a) {
725
- return A("replaceStars", e, a), e.trim().replace(D[d.STAR], "");
726
- }
727
- function Fr(e, a, c, R, S, w, L, $, k, he, Ee, se, te) {
728
- return U(c) ? a = "" : U(R) ? a = ">=" + c + ".0.0" : U(S) ? a = ">=" + c + "." + R + ".0" : a = ">=" + a, U(k) ? $ = "" : U(he) ? $ = "<" + (+k + 1) + ".0.0" : U(Ee) ? $ = "<" + k + "." + (+he + 1) + ".0" : se ? $ = "<=" + k + "." + he + "." + Ee + "-" + se : $ = "<=" + $, (a + " " + $).trim();
729
- }
730
- G.prototype.test = function(e) {
731
- if (!e)
732
- return !1;
733
- if (typeof e == "string")
734
- try {
735
- e = new b(e, this.options);
736
- } catch {
737
- return !1;
738
- }
739
- for (var a = 0; a < this.set.length; a++)
740
- if (Ur(this.set[a], e, this.options))
741
- return !0;
742
- return !1;
743
- };
744
- function Ur(e, a, c) {
745
- for (var R = 0; R < e.length; R++)
746
- if (!e[R].test(a))
747
- return !1;
748
- if (a.prerelease.length && !c.includePrerelease) {
749
- for (R = 0; R < e.length; R++)
750
- if (A(e[R].semver), e[R].semver !== fe && e[R].semver.prerelease.length > 0) {
751
- var S = e[R].semver;
752
- if (S.major === a.major && S.minor === a.minor && S.patch === a.patch)
753
- return !0;
754
- }
755
- return !1;
756
- }
757
- return !0;
758
- }
759
- f.satisfies = Le;
760
- function Le(e, a, c) {
761
- try {
762
- a = new G(a, c);
763
- } catch {
764
- return !1;
765
- }
766
- return a.test(e);
767
- }
768
- f.maxSatisfying = Br;
769
- function Br(e, a, c) {
770
- var R = null, S = null;
771
- try {
772
- var w = new G(a, c);
773
- } catch {
774
- return null;
775
- }
776
- return e.forEach(function(L) {
777
- w.test(L) && (!R || S.compare(L) === -1) && (R = L, S = new b(R, c));
778
- }), R;
779
- }
780
- f.minSatisfying = xr;
781
- function xr(e, a, c) {
782
- var R = null, S = null;
783
- try {
784
- var w = new G(a, c);
785
- } catch {
786
- return null;
787
- }
788
- return e.forEach(function(L) {
789
- w.test(L) && (!R || S.compare(L) === 1) && (R = L, S = new b(R, c));
790
- }), R;
791
- }
792
- f.minVersion = Mr;
793
- function Mr(e, a) {
794
- e = new G(e, a);
795
- var c = new b("0.0.0");
796
- if (e.test(c) || (c = new b("0.0.0-0"), e.test(c)))
797
- return c;
798
- c = null;
799
- for (var R = 0; R < e.set.length; ++R) {
800
- var S = e.set[R];
801
- S.forEach(function(w) {
802
- var L = new b(w.semver.version);
803
- switch (w.operator) {
804
- case ">":
805
- L.prerelease.length === 0 ? L.patch++ : L.prerelease.push(0), L.raw = L.format();
806
- case "":
807
- case ">=":
808
- (!c || F(c, L)) && (c = L);
809
- break;
810
- case "<":
811
- case "<=":
812
- break;
813
- default:
814
- throw new Error("Unexpected operation: " + w.operator);
815
- }
816
- });
817
- }
818
- return c && e.test(c) ? c : null;
819
- }
820
- f.validRange = Gr;
821
- function Gr(e, a) {
822
- try {
823
- return new G(e, a).range || "*";
824
- } catch {
825
- return null;
826
- }
827
- }
828
- f.ltr = $r;
829
- function $r(e, a, c) {
830
- return Ue(e, a, "<", c);
831
- }
832
- f.gtr = Xr;
833
- function Xr(e, a, c) {
834
- return Ue(e, a, ">", c);
835
- }
836
- f.outside = Ue;
837
- function Ue(e, a, c, R) {
838
- e = new b(e, R), a = new G(a, R);
839
- var S, w, L, $, k;
840
- switch (c) {
841
- case ">":
842
- S = F, w = H, L = V, $ = ">", k = ">=";
843
- break;
844
- case "<":
845
- S = V, w = X, L = F, $ = "<", k = "<=";
846
- break;
847
- default:
848
- throw new TypeError('Must provide a hilo val of "<" or ">"');
849
- }
850
- if (Le(e, a, R))
851
- return !1;
852
- for (var he = 0; he < a.set.length; ++he) {
853
- var Ee = a.set[he], se = null, te = null;
854
- if (Ee.forEach(function(Oe) {
855
- Oe.semver === fe && (Oe = new Y(">=0.0.0")), se = se || Oe, te = te || Oe, S(Oe.semver, se.semver, R) ? se = Oe : L(Oe.semver, te.semver, R) && (te = Oe);
856
- }), se.operator === $ || se.operator === k || (!te.operator || te.operator === $) && w(e, te.semver))
857
- return !1;
858
- if (te.operator === k && L(e, te.semver))
859
- return !1;
860
- }
861
- return !0;
862
- }
863
- f.prerelease = Vr;
864
- function Vr(e, a) {
865
- var c = ue(e, a);
866
- return c && c.prerelease.length ? c.prerelease : null;
867
- }
868
- f.intersects = qr;
869
- function qr(e, a, c) {
870
- return e = new G(e, c), a = new G(a, c), e.intersects(a);
871
- }
872
- f.coerce = zr;
873
- function zr(e, a) {
874
- if (e instanceof b)
875
- return e;
876
- if (typeof e == "number" && (e = String(e)), typeof e != "string")
877
- return null;
878
- a = a || {};
879
- var c = null;
880
- if (!a.rtl)
881
- c = e.match(D[d.COERCE]);
882
- else {
883
- for (var R; (R = D[d.COERCERTL].exec(e)) && (!c || c.index + c[0].length !== e.length); )
884
- (!c || R.index + R[0].length !== c.index + c[0].length) && (c = R), D[d.COERCERTL].lastIndex = R.index + R[1].length + R[2].length;
885
- D[d.COERCERTL].lastIndex = -1;
886
- }
887
- return c === null ? null : ue(c[2] + "." + (c[3] || "0") + "." + (c[4] || "0"), a);
888
- }
889
- })(Ye, Ye.exports);
890
- var yt = Ye.exports;
891
- const xn = /* @__PURE__ */ Lt(yt), Mn = (s) => s == null ? [] : Array.isArray(s) ? s : [s], Gn = t.any().refine((s) => typeof s == "bigint", {
892
- message: "Value must be a BigInt"
893
- }).transform((s) => BigInt(s));
894
- var Ct = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Be = Math.ceil, ae = Math.floor, ee = "[BigNumber Error] ", lr = ee + "Number primitive has more than 15 significant digits: ", ce = 1e14, _ = 14, xe = 9007199254740991, Me = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ae = 1e7, W = 1e9;
895
- function mr(s) {
896
- var f, A, v, N = T.prototype = { constructor: T, toString: null, valueOf: null }, M = new T(1), x = 20, j = 4, D = -7, I = 21, d = -1e7, K = 1e7, P = !1, pe = 1, ne = 0, de = {
897
- prefix: "",
898
- groupSize: 3,
899
- secondaryGroupSize: 0,
900
- groupSeparator: ",",
901
- decimalSeparator: ".",
902
- fractionGroupSize: 0,
903
- fractionGroupSeparator: " ",
904
- // non-breaking space
905
- suffix: ""
906
- }, me = "0123456789abcdefghijklmnopqrstuvwxyz", Te = !0;
907
- function T(r, n) {
908
- var i, E, l, h, g, o, u, m, p = this;
909
- if (!(p instanceof T)) return new T(r, n);
910
- if (n == null) {
911
- if (r && r._isBigNumber === !0) {
912
- p.s = r.s, !r.c || r.e > K ? p.c = p.e = null : r.e < d ? p.c = [p.e = 0] : (p.e = r.e, p.c = r.c.slice());
913
- return;
914
- }
915
- if ((o = typeof r == "number") && r * 0 == 0) {
916
- if (p.s = 1 / r < 0 ? (r = -r, -1) : 1, r === ~~r) {
917
- for (h = 0, g = r; g >= 10; g /= 10, h++) ;
918
- h > K ? p.c = p.e = null : (p.e = h, p.c = [r]);
919
- return;
920
- }
921
- m = String(r);
922
- } else {
923
- if (!Ct.test(m = String(r))) return v(p, m, o);
924
- p.s = m.charCodeAt(0) == 45 ? (m = m.slice(1), -1) : 1;
925
- }
926
- (h = m.indexOf(".")) > -1 && (m = m.replace(".", "")), (g = m.search(/e/i)) > 0 ? (h < 0 && (h = g), h += +m.slice(g + 1), m = m.substring(0, g)) : h < 0 && (h = m.length);
927
- } else {
928
- if (z(n, 2, me.length, "Base"), n == 10 && Te)
929
- return p = new T(r), J(p, x + p.e + 1, j);
930
- if (m = String(r), o = typeof r == "number") {
931
- if (r * 0 != 0) return v(p, m, o, n);
932
- if (p.s = 1 / r < 0 ? (m = m.slice(1), -1) : 1, T.DEBUG && m.replace(/^0\.0*|\./, "").length > 15)
933
- throw Error(lr + r);
934
- } else
935
- p.s = m.charCodeAt(0) === 45 ? (m = m.slice(1), -1) : 1;
936
- for (i = me.slice(0, n), h = g = 0, u = m.length; g < u; g++)
937
- if (i.indexOf(E = m.charAt(g)) < 0) {
938
- if (E == ".") {
939
- if (g > h) {
940
- h = u;
941
- continue;
942
- }
943
- } else if (!l && (m == m.toUpperCase() && (m = m.toLowerCase()) || m == m.toLowerCase() && (m = m.toUpperCase()))) {
944
- l = !0, g = -1, h = 0;
945
- continue;
946
- }
947
- return v(p, String(r), o, n);
948
- }
949
- o = !1, m = A(m, n, 10, p.s), (h = m.indexOf(".")) > -1 ? m = m.replace(".", "") : h = m.length;
950
- }
951
- for (g = 0; m.charCodeAt(g) === 48; g++) ;
952
- for (u = m.length; m.charCodeAt(--u) === 48; ) ;
953
- if (m = m.slice(g, ++u)) {
954
- if (u -= g, o && T.DEBUG && u > 15 && (r > xe || r !== ae(r)))
955
- throw Error(lr + p.s * r);
956
- if ((h = h - g - 1) > K)
957
- p.c = p.e = null;
958
- else if (h < d)
959
- p.c = [p.e = 0];
960
- else {
961
- if (p.e = h, p.c = [], g = (h + 1) % _, h < 0 && (g += _), g < u) {
962
- for (g && p.c.push(+m.slice(0, g)), u -= _; g < u; )
963
- p.c.push(+m.slice(g, g += _));
964
- g = _ - (m = m.slice(g)).length;
965
- } else
966
- g -= u;
967
- for (; g--; m += "0") ;
968
- p.c.push(+m);
969
- }
970
- } else
971
- p.c = [p.e = 0];
972
- }
973
- T.clone = mr, T.ROUND_UP = 0, T.ROUND_DOWN = 1, T.ROUND_CEIL = 2, T.ROUND_FLOOR = 3, T.ROUND_HALF_UP = 4, T.ROUND_HALF_DOWN = 5, T.ROUND_HALF_EVEN = 6, T.ROUND_HALF_CEIL = 7, T.ROUND_HALF_FLOOR = 8, T.EUCLID = 9, T.config = T.set = function(r) {
974
- var n, i;
975
- if (r != null)
976
- if (typeof r == "object") {
977
- if (r.hasOwnProperty(n = "DECIMAL_PLACES") && (i = r[n], z(i, 0, W, n), x = i), r.hasOwnProperty(n = "ROUNDING_MODE") && (i = r[n], z(i, 0, 8, n), j = i), r.hasOwnProperty(n = "EXPONENTIAL_AT") && (i = r[n], i && i.pop ? (z(i[0], -W, 0, n), z(i[1], 0, W, n), D = i[0], I = i[1]) : (z(i, -W, W, n), D = -(I = i < 0 ? -i : i))), r.hasOwnProperty(n = "RANGE"))
978
- if (i = r[n], i && i.pop)
979
- z(i[0], -W, -1, n), z(i[1], 1, W, n), d = i[0], K = i[1];
980
- else if (z(i, -W, W, n), i)
981
- d = -(K = i < 0 ? -i : i);
982
- else
983
- throw Error(ee + n + " cannot be zero: " + i);
984
- if (r.hasOwnProperty(n = "CRYPTO"))
985
- if (i = r[n], i === !!i)
986
- if (i)
987
- if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
988
- P = i;
989
- else
990
- throw P = !i, Error(ee + "crypto unavailable");
991
- else
992
- P = i;
993
- else
994
- throw Error(ee + n + " not true or false: " + i);
995
- if (r.hasOwnProperty(n = "MODULO_MODE") && (i = r[n], z(i, 0, 9, n), pe = i), r.hasOwnProperty(n = "POW_PRECISION") && (i = r[n], z(i, 0, W, n), ne = i), r.hasOwnProperty(n = "FORMAT"))
996
- if (i = r[n], typeof i == "object") de = i;
997
- else throw Error(ee + n + " not an object: " + i);
998
- if (r.hasOwnProperty(n = "ALPHABET"))
999
- if (i = r[n], typeof i == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(i))
1000
- Te = i.slice(0, 10) == "0123456789", me = i;
1001
- else
1002
- throw Error(ee + n + " invalid: " + i);
1003
- } else
1004
- throw Error(ee + "Object expected: " + r);
1005
- return {
1006
- DECIMAL_PLACES: x,
1007
- ROUNDING_MODE: j,
1008
- EXPONENTIAL_AT: [D, I],
1009
- RANGE: [d, K],
1010
- CRYPTO: P,
1011
- MODULO_MODE: pe,
1012
- POW_PRECISION: ne,
1013
- FORMAT: de,
1014
- ALPHABET: me
1015
- };
1016
- }, T.isBigNumber = function(r) {
1017
- if (!r || r._isBigNumber !== !0) return !1;
1018
- if (!T.DEBUG) return !0;
1019
- var n, i, E = r.c, l = r.e, h = r.s;
1020
- e: if ({}.toString.call(E) == "[object Array]") {
1021
- if ((h === 1 || h === -1) && l >= -W && l <= W && l === ae(l)) {
1022
- if (E[0] === 0) {
1023
- if (l === 0 && E.length === 1) return !0;
1024
- break e;
1025
- }
1026
- if (n = (l + 1) % _, n < 1 && (n += _), String(E[0]).length == n) {
1027
- for (n = 0; n < E.length; n++)
1028
- if (i = E[n], i < 0 || i >= ce || i !== ae(i)) break e;
1029
- if (i !== 0) return !0;
1030
- }
1031
- }
1032
- } else if (E === null && l === null && (h === null || h === 1 || h === -1))
1033
- return !0;
1034
- throw Error(ee + "Invalid BigNumber: " + r);
1035
- }, T.maximum = T.max = function() {
1036
- return ue(arguments, -1);
1037
- }, T.minimum = T.min = function() {
1038
- return ue(arguments, 1);
1039
- }, T.random = function() {
1040
- var r = 9007199254740992, n = Math.random() * r & 2097151 ? function() {
1041
- return ae(Math.random() * r);
1042
- } : function() {
1043
- return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
1044
- };
1045
- return function(i) {
1046
- var E, l, h, g, o, u = 0, m = [], p = new T(M);
1047
- if (i == null ? i = x : z(i, 0, W), g = Be(i / _), P)
1048
- if (crypto.getRandomValues) {
1049
- for (E = crypto.getRandomValues(new Uint32Array(g *= 2)); u < g; )
1050
- o = E[u] * 131072 + (E[u + 1] >>> 11), o >= 9e15 ? (l = crypto.getRandomValues(new Uint32Array(2)), E[u] = l[0], E[u + 1] = l[1]) : (m.push(o % 1e14), u += 2);
1051
- u = g / 2;
1052
- } else if (crypto.randomBytes) {
1053
- for (E = crypto.randomBytes(g *= 7); u < g; )
1054
- o = (E[u] & 31) * 281474976710656 + E[u + 1] * 1099511627776 + E[u + 2] * 4294967296 + E[u + 3] * 16777216 + (E[u + 4] << 16) + (E[u + 5] << 8) + E[u + 6], o >= 9e15 ? crypto.randomBytes(7).copy(E, u) : (m.push(o % 1e14), u += 7);
1055
- u = g / 7;
1056
- } else
1057
- throw P = !1, Error(ee + "crypto unavailable");
1058
- if (!P)
1059
- for (; u < g; )
1060
- o = n(), o < 9e15 && (m[u++] = o % 1e14);
1061
- for (g = m[--u], i %= _, g && i && (o = Me[_ - i], m[u] = ae(g / o) * o); m[u] === 0; m.pop(), u--) ;
1062
- if (u < 0)
1063
- m = [h = 0];
1064
- else {
1065
- for (h = -1; m[0] === 0; m.splice(0, 1), h -= _) ;
1066
- for (u = 1, o = m[0]; o >= 10; o /= 10, u++) ;
1067
- u < _ && (h -= _ - u);
1068
- }
1069
- return p.e = h, p.c = m, p;
1070
- };
1071
- }(), T.sum = function() {
1072
- for (var r = 1, n = arguments, i = new T(n[0]); r < n.length; ) i = i.plus(n[r++]);
1073
- return i;
1074
- }, A = /* @__PURE__ */ function() {
1075
- var r = "0123456789";
1076
- function n(i, E, l, h) {
1077
- for (var g, o = [0], u, m = 0, p = i.length; m < p; ) {
1078
- for (u = o.length; u--; o[u] *= E) ;
1079
- for (o[0] += h.indexOf(i.charAt(m++)), g = 0; g < o.length; g++)
1080
- o[g] > l - 1 && (o[g + 1] == null && (o[g + 1] = 0), o[g + 1] += o[g] / l | 0, o[g] %= l);
1081
- }
1082
- return o.reverse();
1083
- }
1084
- return function(i, E, l, h, g) {
1085
- var o, u, m, p, O, y, C, F, V = i.indexOf("."), q = x, B = j;
1086
- for (V >= 0 && (p = ne, ne = 0, i = i.replace(".", ""), F = new T(E), y = F.pow(i.length - V), ne = p, F.c = n(
1087
- Ie(ie(y.c), y.e, "0"),
1088
- 10,
1089
- l,
1090
- r
1091
- ), F.e = F.c.length), C = n(i, E, l, g ? (o = me, r) : (o = r, me)), m = p = C.length; C[--p] == 0; C.pop()) ;
1092
- if (!C[0]) return o.charAt(0);
1093
- if (V < 0 ? --m : (y.c = C, y.e = m, y.s = h, y = f(y, F, q, B, l), C = y.c, O = y.r, m = y.e), u = m + q + 1, V = C[u], p = l / 2, O = O || u < 0 || C[u + 1] != null, O = B < 4 ? (V != null || O) && (B == 0 || B == (y.s < 0 ? 3 : 2)) : V > p || V == p && (B == 4 || O || B == 6 && C[u - 1] & 1 || B == (y.s < 0 ? 8 : 7)), u < 1 || !C[0])
1094
- i = O ? Ie(o.charAt(1), -q, o.charAt(0)) : o.charAt(0);
1095
- else {
1096
- if (C.length = u, O)
1097
- for (--l; ++C[--u] > l; )
1098
- C[u] = 0, u || (++m, C = [1].concat(C));
1099
- for (p = C.length; !C[--p]; ) ;
1100
- for (V = 0, i = ""; V <= p; i += o.charAt(C[V++])) ;
1101
- i = Ie(i, m, o.charAt(0));
1102
- }
1103
- return i;
1104
- };
1105
- }(), f = /* @__PURE__ */ function() {
1106
- function r(E, l, h) {
1107
- var g, o, u, m, p = 0, O = E.length, y = l % Ae, C = l / Ae | 0;
1108
- for (E = E.slice(); O--; )
1109
- u = E[O] % Ae, m = E[O] / Ae | 0, g = C * u + m * y, o = y * u + g % Ae * Ae + p, p = (o / h | 0) + (g / Ae | 0) + C * m, E[O] = o % h;
1110
- return p && (E = [p].concat(E)), E;
1111
- }
1112
- function n(E, l, h, g) {
1113
- var o, u;
1114
- if (h != g)
1115
- u = h > g ? 1 : -1;
1116
- else
1117
- for (o = u = 0; o < h; o++)
1118
- if (E[o] != l[o]) {
1119
- u = E[o] > l[o] ? 1 : -1;
1120
- break;
1121
- }
1122
- return u;
1123
- }
1124
- function i(E, l, h, g) {
1125
- for (var o = 0; h--; )
1126
- E[h] -= o, o = E[h] < l[h] ? 1 : 0, E[h] = o * g + E[h] - l[h];
1127
- for (; !E[0] && E.length > 1; E.splice(0, 1)) ;
1128
- }
1129
- return function(E, l, h, g, o) {
1130
- var u, m, p, O, y, C, F, V, q, B, X, H, ge, Y, fe, G, Ne, Q = E.s == l.s ? 1 : -1, Z = E.c, U = l.c;
1131
- if (!Z || !Z[0] || !U || !U[0])
1132
- return new T(
1133
- // Return NaN if either NaN, or both Infinity or 0.
1134
- !E.s || !l.s || (Z ? U && Z[0] == U[0] : !U) ? NaN : (
1135
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
1136
- Z && Z[0] == 0 || !U ? Q * 0 : Q / 0
1137
- )
1138
- );
1139
- for (V = new T(Q), q = V.c = [], m = E.e - l.e, Q = h + m + 1, o || (o = ce, m = oe(E.e / _) - oe(l.e / _), Q = Q / _ | 0), p = 0; U[p] == (Z[p] || 0); p++) ;
1140
- if (U[p] > (Z[p] || 0) && m--, Q < 0)
1141
- q.push(1), O = !0;
1142
- else {
1143
- for (Y = Z.length, G = U.length, p = 0, Q += 2, y = ae(o / (U[0] + 1)), y > 1 && (U = r(U, y, o), Z = r(Z, y, o), G = U.length, Y = Z.length), ge = G, B = Z.slice(0, G), X = B.length; X < G; B[X++] = 0) ;
1144
- Ne = U.slice(), Ne = [0].concat(Ne), fe = U[0], U[1] >= o / 2 && fe++;
1145
- do {
1146
- if (y = 0, u = n(U, B, G, X), u < 0) {
1147
- if (H = B[0], G != X && (H = H * o + (B[1] || 0)), y = ae(H / fe), y > 1)
1148
- for (y >= o && (y = o - 1), C = r(U, y, o), F = C.length, X = B.length; n(C, B, F, X) == 1; )
1149
- y--, i(C, G < F ? Ne : U, F, o), F = C.length, u = 1;
1150
- else
1151
- y == 0 && (u = y = 1), C = U.slice(), F = C.length;
1152
- if (F < X && (C = [0].concat(C)), i(B, C, X, o), X = B.length, u == -1)
1153
- for (; n(U, B, G, X) < 1; )
1154
- y++, i(B, G < X ? Ne : U, X, o), X = B.length;
1155
- } else u === 0 && (y++, B = [0]);
1156
- q[p++] = y, B[0] ? B[X++] = Z[ge] || 0 : (B = [Z[ge]], X = 1);
1157
- } while ((ge++ < Y || B[0] != null) && Q--);
1158
- O = B[0] != null, q[0] || q.splice(0, 1);
1159
- }
1160
- if (o == ce) {
1161
- for (p = 1, Q = q[0]; Q >= 10; Q /= 10, p++) ;
1162
- J(V, h + (V.e = p + m * _ - 1) + 1, g, O);
1163
- } else
1164
- V.e = m, V.r = +O;
1165
- return V;
1166
- };
1167
- }();
1168
- function re(r, n, i, E) {
1169
- var l, h, g, o, u;
1170
- if (i == null ? i = j : z(i, 0, 8), !r.c) return r.toString();
1171
- if (l = r.c[0], g = r.e, n == null)
1172
- u = ie(r.c), u = E == 1 || E == 2 && (g <= D || g >= I) ? De(u, g) : Ie(u, g, "0");
1173
- else if (r = J(new T(r), n, i), h = r.e, u = ie(r.c), o = u.length, E == 1 || E == 2 && (n <= h || h <= D)) {
1174
- for (; o < n; u += "0", o++) ;
1175
- u = De(u, h);
1176
- } else if (n -= g, u = Ie(u, h, "0"), h + 1 > o) {
1177
- if (--n > 0) for (u += "."; n--; u += "0") ;
1178
- } else if (n += h - o, n > 0)
1179
- for (h + 1 == o && (u += "."); n--; u += "0") ;
1180
- return r.s < 0 && l ? "-" + u : u;
1181
- }
1182
- function ue(r, n) {
1183
- for (var i, E, l = 1, h = new T(r[0]); l < r.length; l++)
1184
- E = new T(r[l]), (!E.s || (i = Se(h, E)) === n || i === 0 && h.s === n) && (h = E);
1185
- return h;
1186
- }
1187
- function we(r, n, i) {
1188
- for (var E = 1, l = n.length; !n[--l]; n.pop()) ;
1189
- for (l = n[0]; l >= 10; l /= 10, E++) ;
1190
- return (i = E + i * _ - 1) > K ? r.c = r.e = null : i < d ? r.c = [r.e = 0] : (r.e = i, r.c = n), r;
1191
- }
1192
- v = /* @__PURE__ */ function() {
1193
- var r = /^(-?)0([xbo])(?=\w[\w.]*$)/i, n = /^([^.]+)\.$/, i = /^\.([^.]+)$/, E = /^-?(Infinity|NaN)$/, l = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1194
- return function(h, g, o, u) {
1195
- var m, p = o ? g : g.replace(l, "");
1196
- if (E.test(p))
1197
- h.s = isNaN(p) ? null : p < 0 ? -1 : 1;
1198
- else {
1199
- if (!o && (p = p.replace(r, function(O, y, C) {
1200
- return m = (C = C.toLowerCase()) == "x" ? 16 : C == "b" ? 2 : 8, !u || u == m ? y : O;
1201
- }), u && (m = u, p = p.replace(n, "$1").replace(i, "0.$1")), g != p))
1202
- return new T(p, m);
1203
- if (T.DEBUG)
1204
- throw Error(ee + "Not a" + (u ? " base " + u : "") + " number: " + g);
1205
- h.s = null;
1206
- }
1207
- h.c = h.e = null;
1208
- };
1209
- }();
1210
- function J(r, n, i, E) {
1211
- var l, h, g, o, u, m, p, O = r.c, y = Me;
1212
- if (O) {
1213
- e: {
1214
- for (l = 1, o = O[0]; o >= 10; o /= 10, l++) ;
1215
- if (h = n - l, h < 0)
1216
- h += _, g = n, u = O[m = 0], p = ae(u / y[l - g - 1] % 10);
1217
- else if (m = Be((h + 1) / _), m >= O.length)
1218
- if (E) {
1219
- for (; O.length <= m; O.push(0)) ;
1220
- u = p = 0, l = 1, h %= _, g = h - _ + 1;
1221
- } else
1222
- break e;
1223
- else {
1224
- for (u = o = O[m], l = 1; o >= 10; o /= 10, l++) ;
1225
- h %= _, g = h - _ + l, p = g < 0 ? 0 : ae(u / y[l - g - 1] % 10);
1226
- }
1227
- if (E = E || n < 0 || // Are there any non-zero digits after the rounding digit?
1228
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
1229
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
1230
- O[m + 1] != null || (g < 0 ? u : u % y[l - g - 1]), E = i < 4 ? (p || E) && (i == 0 || i == (r.s < 0 ? 3 : 2)) : p > 5 || p == 5 && (i == 4 || E || i == 6 && // Check whether the digit to the left of the rounding digit is odd.
1231
- (h > 0 ? g > 0 ? u / y[l - g] : 0 : O[m - 1]) % 10 & 1 || i == (r.s < 0 ? 8 : 7)), n < 1 || !O[0])
1232
- return O.length = 0, E ? (n -= r.e + 1, O[0] = y[(_ - n % _) % _], r.e = -n || 0) : O[0] = r.e = 0, r;
1233
- if (h == 0 ? (O.length = m, o = 1, m--) : (O.length = m + 1, o = y[_ - h], O[m] = g > 0 ? ae(u / y[l - g] % y[g]) * o : 0), E)
1234
- for (; ; )
1235
- if (m == 0) {
1236
- for (h = 1, g = O[0]; g >= 10; g /= 10, h++) ;
1237
- for (g = O[0] += o, o = 1; g >= 10; g /= 10, o++) ;
1238
- h != o && (r.e++, O[0] == ce && (O[0] = 1));
1239
- break;
1240
- } else {
1241
- if (O[m] += o, O[m] != ce) break;
1242
- O[m--] = 0, o = 1;
1243
- }
1244
- for (h = O.length; O[--h] === 0; O.pop()) ;
1245
- }
1246
- r.e > K ? r.c = r.e = null : r.e < d && (r.c = [r.e = 0]);
1247
- }
1248
- return r;
1249
- }
1250
- function b(r) {
1251
- var n, i = r.e;
1252
- return i === null ? r.toString() : (n = ie(r.c), n = i <= D || i >= I ? De(n, i) : Ie(n, i, "0"), r.s < 0 ? "-" + n : n);
1253
- }
1254
- return N.absoluteValue = N.abs = function() {
1255
- var r = new T(this);
1256
- return r.s < 0 && (r.s = 1), r;
1257
- }, N.comparedTo = function(r, n) {
1258
- return Se(this, new T(r, n));
1259
- }, N.decimalPlaces = N.dp = function(r, n) {
1260
- var i, E, l, h = this;
1261
- if (r != null)
1262
- return z(r, 0, W), n == null ? n = j : z(n, 0, 8), J(new T(h), r + h.e + 1, n);
1263
- if (!(i = h.c)) return null;
1264
- if (E = ((l = i.length - 1) - oe(this.e / _)) * _, l = i[l]) for (; l % 10 == 0; l /= 10, E--) ;
1265
- return E < 0 && (E = 0), E;
1266
- }, N.dividedBy = N.div = function(r, n) {
1267
- return f(this, new T(r, n), x, j);
1268
- }, N.dividedToIntegerBy = N.idiv = function(r, n) {
1269
- return f(this, new T(r, n), 0, 1);
1270
- }, N.exponentiatedBy = N.pow = function(r, n) {
1271
- var i, E, l, h, g, o, u, m, p, O = this;
1272
- if (r = new T(r), r.c && !r.isInteger())
1273
- throw Error(ee + "Exponent not an integer: " + b(r));
1274
- if (n != null && (n = new T(n)), o = r.e > 14, !O.c || !O.c[0] || O.c[0] == 1 && !O.e && O.c.length == 1 || !r.c || !r.c[0])
1275
- return p = new T(Math.pow(+b(O), o ? r.s * (2 - Ce(r)) : +b(r))), n ? p.mod(n) : p;
1276
- if (u = r.s < 0, n) {
1277
- if (n.c ? !n.c[0] : !n.s) return new T(NaN);
1278
- E = !u && O.isInteger() && n.isInteger(), E && (O = O.mod(n));
1279
- } else {
1280
- if (r.e > 9 && (O.e > 0 || O.e < -1 || (O.e == 0 ? O.c[0] > 1 || o && O.c[1] >= 24e7 : O.c[0] < 8e13 || o && O.c[0] <= 9999975e7)))
1281
- return h = O.s < 0 && Ce(r) ? -0 : 0, O.e > -1 && (h = 1 / h), new T(u ? 1 / h : h);
1282
- ne && (h = Be(ne / _ + 2));
1283
- }
1284
- for (o ? (i = new T(0.5), u && (r.s = 1), m = Ce(r)) : (l = Math.abs(+b(r)), m = l % 2), p = new T(M); ; ) {
1285
- if (m) {
1286
- if (p = p.times(O), !p.c) break;
1287
- h ? p.c.length > h && (p.c.length = h) : E && (p = p.mod(n));
1288
- }
1289
- if (l) {
1290
- if (l = ae(l / 2), l === 0) break;
1291
- m = l % 2;
1292
- } else if (r = r.times(i), J(r, r.e + 1, 1), r.e > 14)
1293
- m = Ce(r);
1294
- else {
1295
- if (l = +b(r), l === 0) break;
1296
- m = l % 2;
1297
- }
1298
- O = O.times(O), h ? O.c && O.c.length > h && (O.c.length = h) : E && (O = O.mod(n));
1299
- }
1300
- return E ? p : (u && (p = M.div(p)), n ? p.mod(n) : h ? J(p, ne, j, g) : p);
1301
- }, N.integerValue = function(r) {
1302
- var n = new T(this);
1303
- return r == null ? r = j : z(r, 0, 8), J(n, n.e + 1, r);
1304
- }, N.isEqualTo = N.eq = function(r, n) {
1305
- return Se(this, new T(r, n)) === 0;
1306
- }, N.isFinite = function() {
1307
- return !!this.c;
1308
- }, N.isGreaterThan = N.gt = function(r, n) {
1309
- return Se(this, new T(r, n)) > 0;
1310
- }, N.isGreaterThanOrEqualTo = N.gte = function(r, n) {
1311
- return (n = Se(this, new T(r, n))) === 1 || n === 0;
1312
- }, N.isInteger = function() {
1313
- return !!this.c && oe(this.e / _) > this.c.length - 2;
1314
- }, N.isLessThan = N.lt = function(r, n) {
1315
- return Se(this, new T(r, n)) < 0;
1316
- }, N.isLessThanOrEqualTo = N.lte = function(r, n) {
1317
- return (n = Se(this, new T(r, n))) === -1 || n === 0;
1318
- }, N.isNaN = function() {
1319
- return !this.s;
1320
- }, N.isNegative = function() {
1321
- return this.s < 0;
1322
- }, N.isPositive = function() {
1323
- return this.s > 0;
1324
- }, N.isZero = function() {
1325
- return !!this.c && this.c[0] == 0;
1326
- }, N.minus = function(r, n) {
1327
- var i, E, l, h, g = this, o = g.s;
1328
- if (r = new T(r, n), n = r.s, !o || !n) return new T(NaN);
1329
- if (o != n)
1330
- return r.s = -n, g.plus(r);
1331
- var u = g.e / _, m = r.e / _, p = g.c, O = r.c;
1332
- if (!u || !m) {
1333
- if (!p || !O) return p ? (r.s = -n, r) : new T(O ? g : NaN);
1334
- if (!p[0] || !O[0])
1335
- return O[0] ? (r.s = -n, r) : new T(p[0] ? g : (
1336
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
1337
- j == 3 ? -0 : 0
1338
- ));
1339
- }
1340
- if (u = oe(u), m = oe(m), p = p.slice(), o = u - m) {
1341
- for ((h = o < 0) ? (o = -o, l = p) : (m = u, l = O), l.reverse(), n = o; n--; l.push(0)) ;
1342
- l.reverse();
1343
- } else
1344
- for (E = (h = (o = p.length) < (n = O.length)) ? o : n, o = n = 0; n < E; n++)
1345
- if (p[n] != O[n]) {
1346
- h = p[n] < O[n];
1347
- break;
1348
- }
1349
- if (h && (l = p, p = O, O = l, r.s = -r.s), n = (E = O.length) - (i = p.length), n > 0) for (; n--; p[i++] = 0) ;
1350
- for (n = ce - 1; E > o; ) {
1351
- if (p[--E] < O[E]) {
1352
- for (i = E; i && !p[--i]; p[i] = n) ;
1353
- --p[i], p[E] += ce;
1354
- }
1355
- p[E] -= O[E];
1356
- }
1357
- for (; p[0] == 0; p.splice(0, 1), --m) ;
1358
- return p[0] ? we(r, p, m) : (r.s = j == 3 ? -1 : 1, r.c = [r.e = 0], r);
1359
- }, N.modulo = N.mod = function(r, n) {
1360
- var i, E, l = this;
1361
- return r = new T(r, n), !l.c || !r.s || r.c && !r.c[0] ? new T(NaN) : !r.c || l.c && !l.c[0] ? new T(l) : (pe == 9 ? (E = r.s, r.s = 1, i = f(l, r, 0, 3), r.s = E, i.s *= E) : i = f(l, r, 0, pe), r = l.minus(i.times(r)), !r.c[0] && pe == 1 && (r.s = l.s), r);
1362
- }, N.multipliedBy = N.times = function(r, n) {
1363
- var i, E, l, h, g, o, u, m, p, O, y, C, F, V, q, B = this, X = B.c, H = (r = new T(r, n)).c;
1364
- if (!X || !H || !X[0] || !H[0])
1365
- return !B.s || !r.s || X && !X[0] && !H || H && !H[0] && !X ? r.c = r.e = r.s = null : (r.s *= B.s, !X || !H ? r.c = r.e = null : (r.c = [0], r.e = 0)), r;
1366
- for (E = oe(B.e / _) + oe(r.e / _), r.s *= B.s, u = X.length, O = H.length, u < O && (F = X, X = H, H = F, l = u, u = O, O = l), l = u + O, F = []; l--; F.push(0)) ;
1367
- for (V = ce, q = Ae, l = O; --l >= 0; ) {
1368
- for (i = 0, y = H[l] % q, C = H[l] / q | 0, g = u, h = l + g; h > l; )
1369
- m = X[--g] % q, p = X[g] / q | 0, o = C * m + p * y, m = y * m + o % q * q + F[h] + i, i = (m / V | 0) + (o / q | 0) + C * p, F[h--] = m % V;
1370
- F[h] = i;
1371
- }
1372
- return i ? ++E : F.splice(0, 1), we(r, F, E);
1373
- }, N.negated = function() {
1374
- var r = new T(this);
1375
- return r.s = -r.s || null, r;
1376
- }, N.plus = function(r, n) {
1377
- var i, E = this, l = E.s;
1378
- if (r = new T(r, n), n = r.s, !l || !n) return new T(NaN);
1379
- if (l != n)
1380
- return r.s = -n, E.minus(r);
1381
- var h = E.e / _, g = r.e / _, o = E.c, u = r.c;
1382
- if (!h || !g) {
1383
- if (!o || !u) return new T(l / 0);
1384
- if (!o[0] || !u[0]) return u[0] ? r : new T(o[0] ? E : l * 0);
1385
- }
1386
- if (h = oe(h), g = oe(g), o = o.slice(), l = h - g) {
1387
- for (l > 0 ? (g = h, i = u) : (l = -l, i = o), i.reverse(); l--; i.push(0)) ;
1388
- i.reverse();
1389
- }
1390
- for (l = o.length, n = u.length, l - n < 0 && (i = u, u = o, o = i, n = l), l = 0; n; )
1391
- l = (o[--n] = o[n] + u[n] + l) / ce | 0, o[n] = ce === o[n] ? 0 : o[n] % ce;
1392
- return l && (o = [l].concat(o), ++g), we(r, o, g);
1393
- }, N.precision = N.sd = function(r, n) {
1394
- var i, E, l, h = this;
1395
- if (r != null && r !== !!r)
1396
- return z(r, 1, W), n == null ? n = j : z(n, 0, 8), J(new T(h), r, n);
1397
- if (!(i = h.c)) return null;
1398
- if (l = i.length - 1, E = l * _ + 1, l = i[l]) {
1399
- for (; l % 10 == 0; l /= 10, E--) ;
1400
- for (l = i[0]; l >= 10; l /= 10, E++) ;
1401
- }
1402
- return r && h.e + 1 > E && (E = h.e + 1), E;
1403
- }, N.shiftedBy = function(r) {
1404
- return z(r, -xe, xe), this.times("1e" + r);
1405
- }, N.squareRoot = N.sqrt = function() {
1406
- var r, n, i, E, l, h = this, g = h.c, o = h.s, u = h.e, m = x + 4, p = new T("0.5");
1407
- if (o !== 1 || !g || !g[0])
1408
- return new T(!o || o < 0 && (!g || g[0]) ? NaN : g ? h : 1 / 0);
1409
- if (o = Math.sqrt(+b(h)), o == 0 || o == 1 / 0 ? (n = ie(g), (n.length + u) % 2 == 0 && (n += "0"), o = Math.sqrt(+n), u = oe((u + 1) / 2) - (u < 0 || u % 2), o == 1 / 0 ? n = "5e" + u : (n = o.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + u), i = new T(n)) : i = new T(o + ""), i.c[0]) {
1410
- for (u = i.e, o = u + m, o < 3 && (o = 0); ; )
1411
- if (l = i, i = p.times(l.plus(f(h, l, m, 1))), ie(l.c).slice(0, o) === (n = ie(i.c)).slice(0, o))
1412
- if (i.e < u && --o, n = n.slice(o - 3, o + 1), n == "9999" || !E && n == "4999") {
1413
- if (!E && (J(l, l.e + x + 2, 0), l.times(l).eq(h))) {
1414
- i = l;
1415
- break;
1416
- }
1417
- m += 4, o += 4, E = 1;
1418
- } else {
1419
- (!+n || !+n.slice(1) && n.charAt(0) == "5") && (J(i, i.e + x + 2, 1), r = !i.times(i).eq(h));
1420
- break;
1421
- }
1422
- }
1423
- return J(i, i.e + x + 1, j, r);
1424
- }, N.toExponential = function(r, n) {
1425
- return r != null && (z(r, 0, W), r++), re(this, r, n, 1);
1426
- }, N.toFixed = function(r, n) {
1427
- return r != null && (z(r, 0, W), r = r + this.e + 1), re(this, r, n);
1428
- }, N.toFormat = function(r, n, i) {
1429
- var E, l = this;
1430
- if (i == null)
1431
- r != null && n && typeof n == "object" ? (i = n, n = null) : r && typeof r == "object" ? (i = r, r = n = null) : i = de;
1432
- else if (typeof i != "object")
1433
- throw Error(ee + "Argument not an object: " + i);
1434
- if (E = l.toFixed(r, n), l.c) {
1435
- var h, g = E.split("."), o = +i.groupSize, u = +i.secondaryGroupSize, m = i.groupSeparator || "", p = g[0], O = g[1], y = l.s < 0, C = y ? p.slice(1) : p, F = C.length;
1436
- if (u && (h = o, o = u, u = h, F -= h), o > 0 && F > 0) {
1437
- for (h = F % o || o, p = C.substr(0, h); h < F; h += o) p += m + C.substr(h, o);
1438
- u > 0 && (p += m + C.slice(h)), y && (p = "-" + p);
1439
- }
1440
- E = O ? p + (i.decimalSeparator || "") + ((u = +i.fractionGroupSize) ? O.replace(
1441
- new RegExp("\\d{" + u + "}\\B", "g"),
1442
- "$&" + (i.fractionGroupSeparator || "")
1443
- ) : O) : p;
1444
- }
1445
- return (i.prefix || "") + E + (i.suffix || "");
1446
- }, N.toFraction = function(r) {
1447
- var n, i, E, l, h, g, o, u, m, p, O, y, C = this, F = C.c;
1448
- if (r != null && (o = new T(r), !o.isInteger() && (o.c || o.s !== 1) || o.lt(M)))
1449
- throw Error(ee + "Argument " + (o.isInteger() ? "out of range: " : "not an integer: ") + b(o));
1450
- if (!F) return new T(C);
1451
- for (n = new T(M), m = i = new T(M), E = u = new T(M), y = ie(F), h = n.e = y.length - C.e - 1, n.c[0] = Me[(g = h % _) < 0 ? _ + g : g], r = !r || o.comparedTo(n) > 0 ? h > 0 ? n : m : o, g = K, K = 1 / 0, o = new T(y), u.c[0] = 0; p = f(o, n, 0, 1), l = i.plus(p.times(E)), l.comparedTo(r) != 1; )
1452
- i = E, E = l, m = u.plus(p.times(l = m)), u = l, n = o.minus(p.times(l = n)), o = l;
1453
- return l = f(r.minus(i), E, 0, 1), u = u.plus(l.times(m)), i = i.plus(l.times(E)), u.s = m.s = C.s, h = h * 2, O = f(m, E, h, j).minus(C).abs().comparedTo(
1454
- f(u, i, h, j).minus(C).abs()
1455
- ) < 1 ? [m, E] : [u, i], K = g, O;
1456
- }, N.toNumber = function() {
1457
- return +b(this);
1458
- }, N.toPrecision = function(r, n) {
1459
- return r != null && z(r, 1, W), re(this, r, n, 2);
1460
- }, N.toString = function(r) {
1461
- var n, i = this, E = i.s, l = i.e;
1462
- return l === null ? E ? (n = "Infinity", E < 0 && (n = "-" + n)) : n = "NaN" : (r == null ? n = l <= D || l >= I ? De(ie(i.c), l) : Ie(ie(i.c), l, "0") : r === 10 && Te ? (i = J(new T(i), x + l + 1, j), n = Ie(ie(i.c), i.e, "0")) : (z(r, 2, me.length, "Base"), n = A(Ie(ie(i.c), l, "0"), 10, r, E, !0)), E < 0 && i.c[0] && (n = "-" + n)), n;
1463
- }, N.valueOf = N.toJSON = function() {
1464
- return b(this);
1465
- }, N._isBigNumber = !0, N[Symbol.toStringTag] = "BigNumber", N[Symbol.for("nodejs.util.inspect.custom")] = N.valueOf, s != null && T.set(s), T;
1466
- }
1467
- function oe(s) {
1468
- var f = s | 0;
1469
- return s > 0 || s === f ? f : f - 1;
1470
- }
1471
- function ie(s) {
1472
- for (var f, A, v = 1, N = s.length, M = s[0] + ""; v < N; ) {
1473
- for (f = s[v++] + "", A = _ - f.length; A--; f = "0" + f) ;
1474
- M += f;
1475
- }
1476
- for (N = M.length; M.charCodeAt(--N) === 48; ) ;
1477
- return M.slice(0, N + 1 || 1);
1478
- }
1479
- function Se(s, f) {
1480
- var A, v, N = s.c, M = f.c, x = s.s, j = f.s, D = s.e, I = f.e;
1481
- if (!x || !j) return null;
1482
- if (A = N && !N[0], v = M && !M[0], A || v) return A ? v ? 0 : -j : x;
1483
- if (x != j) return x;
1484
- if (A = x < 0, v = D == I, !N || !M) return v ? 0 : !N ^ A ? 1 : -1;
1485
- if (!v) return D > I ^ A ? 1 : -1;
1486
- for (j = (D = N.length) < (I = M.length) ? D : I, x = 0; x < j; x++) if (N[x] != M[x]) return N[x] > M[x] ^ A ? 1 : -1;
1487
- return D == I ? 0 : D > I ^ A ? 1 : -1;
1488
- }
1489
- function z(s, f, A, v) {
1490
- if (s < f || s > A || s !== ae(s))
1491
- throw Error(ee + (v || "Argument") + (typeof s == "number" ? s < f || s > A ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(s));
1492
- }
1493
- function Ce(s) {
1494
- var f = s.c.length - 1;
1495
- return oe(s.e / _) == f && s.c[f] % 2 != 0;
1496
- }
1497
- function De(s, f) {
1498
- return (s.length > 1 ? s.charAt(0) + "." + s.slice(1) : s) + (f < 0 ? "e" : "e+") + f;
1499
- }
1500
- function Ie(s, f, A) {
1501
- var v, N;
1502
- if (f < 0) {
1503
- for (N = A + "."; ++f; N += A) ;
1504
- s = N + s;
1505
- } else if (v = s.length, ++f > v) {
1506
- for (N = A, f -= v; --f; N += A) ;
1507
- s += N;
1508
- } else f < v && (s = s.slice(0, f) + "." + s.slice(f));
1509
- return s;
1510
- }
1511
- var $n = mr();
1512
- const Xn = t.boolean().transform((s) => String(s)), Vn = t.string().transform((s) => s === "true");
1513
- function ur(s) {
1514
- return t.object(s).passthrough().superRefine((f) => {
1515
- const A = Object.keys(s), v = Object.keys(f).filter((N) => !A.includes(N));
1516
- v.length > 0 && `${v.join(", ")}`;
1517
- });
1518
- }
1519
- function Dt(s) {
1520
- const f = ur(s);
1521
- return Object.assign(f, {
1522
- extend: (A) => ur({ ...s, ...A })
1523
- });
1524
- }
1525
- const qn = (s, f) => {
1526
- try {
1527
- return { success: !0, data: s.parse(f) };
1528
- } catch (A) {
1529
- if (A instanceof t.ZodError)
1530
- return console.error("Validation warnings:", A.errors), { success: !1, error: A };
1531
- throw A;
1532
- }
1533
- };
1534
- var Ke;
1535
- (function(s) {
1536
- s[s.function = 0] = "function", s[s.l1_handler = 1] = "l1_handler", s[s.constructor = 2] = "constructor";
1537
- })(Ke || (Ke = {}));
1538
- const gr = t.array(t.string()), Ge = t.object({
1539
- selector: t.string(),
1540
- offset: t.string(),
1541
- builtins: gr.optional()
1542
- }), Ir = t.object({
1543
- CONSTRUCTOR: t.array(Ge),
1544
- EXTERNAL: t.array(Ge),
1545
- L1_HANDLER: t.array(Ge)
1546
- }), zn = t.string(), bt = t.object({
1547
- builtins: gr,
1548
- data: t.array(t.string())
1549
- }), Je = t.object({
1550
- name: t.string(),
1551
- type: t.union([t.literal("felt"), t.literal("felt*"), t.string()])
1552
- }), Pt = t.nativeEnum(Ke), _t = t.object({
1553
- inputs: t.array(Je),
1554
- name: t.string(),
1555
- outputs: t.array(Je),
1556
- stateMutability: t.literal("view").optional(),
1557
- state_mutability: t.string().optional(),
1558
- type: Pt
1559
- }), Qe = t.object({
1560
- name: t.string(),
1561
- type: t.union([t.literal("felt"), t.literal("felt*"), t.string()]),
1562
- kind: t.union([t.literal("key"), t.literal("data")])
1563
- }), kt = t.object({
1564
- name: t.string(),
1565
- type: t.literal("event"),
1566
- data: t.array(Qe),
1567
- keys: t.array(Qe)
1568
- }), jt = t.object({
1569
- name: t.string(),
1570
- members: t.array(Qe),
1571
- kind: t.literal("struct"),
1572
- type: t.literal("event")
1573
- }), Ft = t.object({
1574
- members: t.array(Je.and(t.object({
1575
- offset: t.number()
1576
- }))),
1577
- name: t.string(),
1578
- size: t.number(),
1579
- type: t.literal("struct")
1580
- }), Ut = t.union([jt, kt]), Rr = t.array(t.union([_t, Ut, Ft, t.any()])), Bt = t.object({
1581
- program: bt,
1582
- entry_points_by_type: Ir,
1583
- abi: Rr
1584
- }), Nr = t.array(t.string()), xt = t.object({
1585
- type_names: t.array(t.tuple([t.number(), t.string()])),
1586
- libfunc_names: t.array(t.tuple([t.number(), t.string()])),
1587
- user_func_names: t.array(t.tuple([t.number(), t.string()]))
1588
- }), $e = t.object({
1589
- selector: t.string(),
1590
- function_idx: t.number()
1591
- }), Mt = t.object({
1592
- CONSTRUCTOR: t.array($e),
1593
- EXTERNAL: t.array($e),
1594
- L1_HANDLER: t.array($e)
1595
- }), Gt = t.object({
1596
- sierra_program: Nr,
1597
- sierra_program_debug_info: xt.optional(),
1598
- contract_class_version: t.string(),
1599
- entry_points_by_type: Mt,
1600
- abi: Rr
1601
- }), $t = t.array(t.tuple([t.number(), t.array(t.string())])), Xt = t.object({
1602
- prime: t.string(),
1603
- compiler_version: t.string(),
1604
- bytecode: Nr,
1605
- hints: t.array(t.any()),
1606
- pythonic_hints: $t,
1607
- entry_points_by_type: Ir
1608
- }), Hn = Xt, Wn = t.union([
1609
- Bt,
1610
- Gt
1611
- ]), Or = Qr(null), Ar = () => et(Or), Zn = () => {
1612
- var s;
1613
- return !!((s = Ar()) != null && s.emitter);
1614
- }, Yn = ({ emitter: s, children: f }) => /* @__PURE__ */ tt(Or.Provider, { value: {
1615
- emitter: s
1616
- }, children: f });
1617
- let fr = !1;
1618
- const Sr = () => {
1619
- var A;
1620
- const s = (A = Ar()) == null ? void 0 : A.emitter;
1621
- if (!s && !fr) {
1622
- fr = !0;
1623
- return;
1624
- }
1625
- return s;
1626
- }, Kn = () => {
1627
- const s = Sr();
1628
- return s ? s.emit.bind(s) : Jr;
1629
- }, Jn = () => {
1630
- const s = Sr();
1631
- return (A, v) => {
1632
- rt(() => s ? s.on(A, v) : void 0, [A, v]);
1633
- };
1634
- }, Vt = t.union([
1635
- t.literal("concentratedLiquidityPosition"),
1636
- t.literal("collateralizedDebtPosition"),
1637
- t.literal("staking")
1638
- ]), Qn = t.object({
1639
- status: t.literal("initialising")
1640
- }).or(t.object({
1641
- status: t.literal("initialised"),
1642
- balances: t.array(t.object({
1643
- tokenAddress: er,
1644
- tokenBalance: t.string()
1645
- }))
1646
- })), ir = t.object({
1647
- id: t.number(),
1648
- address: Re,
1649
- brandColor: t.string().optional(),
1650
- name: t.string(),
1651
- symbol: t.string(),
1652
- decimals: t.number(),
1653
- iconUrl: t.string().optional(),
1654
- sendable: t.boolean(),
1655
- popular: t.boolean(),
1656
- refundable: t.boolean(),
1657
- listed: t.boolean(),
1658
- tradable: t.boolean(),
1659
- category: t.union([
1660
- t.literal("tokens"),
1661
- t.literal("currencies"),
1662
- t.literal("savings")
1663
- ]),
1664
- pricingId: t.number().optional(),
1665
- dappId: t.string().optional(),
1666
- marketData: t.object({
1667
- marketCap: t.number(),
1668
- marketCap24hChange: t.number(),
1669
- dailyVolume: t.number(),
1670
- rank: t.number()
1671
- }).optional(),
1672
- tags: t.array(t.string()).optional()
1673
- }), es = t.object({
1674
- tokens: t.array(ir)
1675
- }), rs = ir, Tr = t.object({
1676
- pricingId: t.number(),
1677
- ethValue: t.string(),
1678
- ccyValue: t.string(),
1679
- ethDayChange: t.string(),
1680
- ccyDayChange: t.string()
1681
- }), ts = t.object({
1682
- prices: t.array(Tr)
1683
- }), hr = t.object({
1684
- tokenAddress: er,
1685
- principal: t.string(),
1686
- accruedFees: t.string(),
1687
- minPrice: t.string(),
1688
- maxPrice: t.string(),
1689
- currentPrice: t.string()
1690
- }), ar = t.object({
1691
- tokenAddress: Re.optional(),
1692
- totalBalances: t.record(t.string())
1693
- }), wr = ar.extend({
1694
- tokenId: t.string(),
1695
- data: t.object({
1696
- poolFeePercentage: t.string(),
1697
- tickSpacingPercentage: t.string().optional(),
1698
- token0: hr,
1699
- token1: hr
1700
- })
1701
- }), ns = t.array(wr), vr = ar.extend({
1702
- data: t.object({
1703
- apy: t.string()
1704
- }),
1705
- investmentId: t.string().optional()
1706
- }), ss = t.array(vr), Lr = ar.extend({
1707
- data: t.object({
1708
- apy: t.string().optional(),
1709
- group: t.number().optional(),
1710
- collateral: t.boolean(),
1711
- debt: t.boolean(),
1712
- lending: t.boolean()
1713
- })
1714
- }), is = t.array(Lr), qt = t.array(wr.or(Lr).or(vr)), zt = Dt({
1715
- name: t.string(),
1716
- manageUrl: t.string(),
1717
- type: Vt,
1718
- groups: t.record(t.object({
1719
- name: t.string().optional(),
1720
- healthRatio: t.string().optional()
1721
- })).optional(),
1722
- positions: qt
1723
- }), Ht = t.object({
1724
- dappId: t.string(),
1725
- products: t.array(zt)
1726
- }), as = t.object({
1727
- dapps: t.array(Ht)
1728
- }), Wt = t.object({
1729
- name: t.string().optional(),
1730
- tokenAddress: Re,
1731
- amount: t.string().optional(),
1732
- claimUrl: t.string().optional(),
1733
- claimStart: t.number(),
1734
- claimEnd: t.number().optional()
1735
- }), os = t.object({
1736
- accountAddress: Re,
1737
- chain: t.string(),
1738
- airdrops: t.array(Wt)
1739
- }), Fe = t.object({
1740
- address: Re,
1741
- networkId: t.string({ required_error: "Network is required" })
1742
- }, { required_error: "Token is required" }), cs = Fe.required().extend({
1743
- balance: t.string()
1744
- }), yr = Fe.required().extend({
1745
- id: t.number().optional(),
1746
- name: t.string().optional(),
1747
- symbol: t.string().optional(),
1748
- decimals: t.coerce.number().optional(),
1749
- iconUrl: t.string().url("").optional().or(t.literal("")),
1750
- // fallback since some iconUrls are empty, causing validation to fail
1751
- pricingId: t.number().optional(),
1752
- category: t.string().optional(),
1753
- dappId: t.string().optional(),
1754
- brandColor: t.string().optional()
1755
- }), Zt = yr.extend({
1756
- balance: t.string()
1757
- }), Yt = yr.extend({
1758
- currencyValue: t.string(),
1759
- currencySymbol: t.string().optional(),
1760
- ccyDayChange: t.string().optional(),
1761
- ethDayChange: t.string().optional(),
1762
- unitCurrencyValue: t.string().optional()
1763
- }), Kt = Yt.extend({
1764
- ...Zt.shape
1765
- }), ls = t.array(Kt), us = Fe.extend({
1766
- ...Tr.shape
1767
- }), fs = Fe.extend({
1768
- ...ir.shape
1769
- });
1770
- export {
1771
- En as $,
1772
- ye as A,
1773
- $n as B,
1774
- On as C,
1775
- qn as D,
1776
- as as E,
1777
- _n as F,
1778
- Mn as G,
1779
- nr as H,
1780
- pr as I,
1781
- nt as J,
1782
- Pe as K,
1783
- st as L,
1784
- cr as M,
1785
- An as N,
1786
- it as O,
1787
- on as P,
1788
- cn as Q,
1789
- ln as R,
1790
- un as S,
1791
- fn as T,
1792
- hn as U,
1793
- tr as V,
1794
- pn as W,
1795
- dn as X,
1796
- mn as Y,
1797
- gn as Z,
1798
- In as _,
1799
- or as a,
1800
- Je as a$,
1801
- ft as a0,
1802
- ke as a1,
1803
- Et as a2,
1804
- Ve as a3,
1805
- mt as a4,
1806
- Rn as a5,
1807
- dt as a6,
1808
- qe as a7,
1809
- je as a8,
1810
- ir as a9,
1811
- Xn as aA,
1812
- Vn as aB,
1813
- Dt as aC,
1814
- ve as aD,
1815
- Rt as aE,
1816
- Nt as aF,
1817
- Ot as aG,
1818
- be as aH,
1819
- At as aI,
1820
- sr as aJ,
1821
- St as aK,
1822
- Tt as aL,
1823
- le as aM,
1824
- Tn as aN,
1825
- wn as aO,
1826
- vn as aP,
1827
- Ln as aQ,
1828
- yn as aR,
1829
- Cn as aS,
1830
- Dn as aT,
1831
- bn as aU,
1832
- Pn as aV,
1833
- gr as aW,
1834
- Ge as aX,
1835
- Ir as aY,
1836
- zn as aZ,
1837
- bt as a_,
1838
- Tr as aa,
1839
- ts as ab,
1840
- hr as ac,
1841
- wr as ad,
1842
- ns as ae,
1843
- vr as af,
1844
- ss as ag,
1845
- Lr as ah,
1846
- is as ai,
1847
- qt as aj,
1848
- zt as ak,
1849
- Ht as al,
1850
- Wt as am,
1851
- os as an,
1852
- Vt as ao,
1853
- Fe as ap,
1854
- cs as aq,
1855
- yr as ar,
1856
- Zt as as,
1857
- Yt as at,
1858
- Kt as au,
1859
- ls as av,
1860
- us as aw,
1861
- fs as ax,
1862
- Gn as ay,
1863
- wt as az,
1864
- ot as b,
1865
- Pt as b0,
1866
- _t as b1,
1867
- Qe as b2,
1868
- kt as b3,
1869
- jt as b4,
1870
- Ft as b5,
1871
- Ut as b6,
1872
- Rr as b7,
1873
- Bt as b8,
1874
- Nr as b9,
1875
- xt as ba,
1876
- $e as bb,
1877
- Mt as bc,
1878
- Gt as bd,
1879
- $t as be,
1880
- Xt as bf,
1881
- Hn as bg,
1882
- Wn as bh,
1883
- Ar as bi,
1884
- Zn as bj,
1885
- Yn as bk,
1886
- Sr as bl,
1887
- Kn as bm,
1888
- Jn as bn,
1889
- Sn as c,
1890
- at as d,
1891
- pt as e,
1892
- ht as f,
1893
- Nn as g,
1894
- lt as h,
1895
- ut as i,
1896
- kn as j,
1897
- Bn as k,
1898
- Un as l,
1899
- jn as m,
1900
- _e as n,
1901
- Fn as o,
1902
- an as p,
1903
- er as q,
1904
- rr as r,
1905
- xn as s,
1906
- Re as t,
1907
- It as u,
1908
- dr as v,
1909
- Lt as w,
1910
- es as x,
1911
- rs as y,
1912
- Qn as z
1913
- };