@ultrade/shared 1.0.27 → 1.0.28

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 (210) hide show
  1. package/dist/browser/common/index.js +1 -7
  2. package/dist/browser/{common/utils/social.js → constants/env.js} +1 -1
  3. package/dist/browser/constants/index.js +1 -1
  4. package/dist/browser/enums/index.js +1 -1
  5. package/dist/browser/helpers/algo.helper.js +1 -1
  6. package/dist/browser/helpers/assert.helper.js +1 -1
  7. package/dist/browser/helpers/atomic.helper.js +1 -1
  8. package/dist/browser/helpers/balance.helper.js +1 -1
  9. package/dist/browser/helpers/codex/common.helper.js +2 -2
  10. package/dist/browser/helpers/codex/index.js +2 -2
  11. package/dist/browser/helpers/codex/mbr.helper.js +1 -1
  12. package/dist/browser/helpers/codex/mna.helper.js +1 -1
  13. package/dist/browser/helpers/codex/order.helper.js +1 -1
  14. package/dist/browser/helpers/codex/setGlobal.helper.js +1 -1
  15. package/dist/browser/{common/mappers/codexBalance.mapper.js → helpers/codex/tokens.js} +1 -1
  16. package/dist/browser/helpers/codex/transfer.helper.js +2 -2
  17. package/dist/browser/helpers/codex/txn.helper.js +1 -1
  18. package/dist/browser/helpers/codex.helper.js +6 -6
  19. package/dist/browser/helpers/eth.helper.js +2 -2
  20. package/dist/browser/helpers/order.helper.js +1 -1
  21. package/dist/browser/helpers/pair.helper.js +1 -1
  22. package/dist/browser/helpers/pointSystem.helper.js +1 -1
  23. package/dist/browser/helpers/withdraw.helper.js +2 -2
  24. package/dist/browser/interfaces/index.js +1 -1
  25. package/dist/browser/services/index.js +11 -0
  26. package/dist/browser/types/index.js +1 -1
  27. package/dist/{src/common → common}/index.d.ts +0 -1
  28. package/dist/{src/common → common}/utils/index.d.ts +3 -0
  29. package/dist/constants/env.d.ts +6 -0
  30. package/dist/{src/constants → constants}/index.d.ts +1 -0
  31. package/dist/constants/social.d.ts +4 -0
  32. package/dist/{src/enums → enums}/db/index.d.ts +1 -0
  33. package/dist/enums/db/pending-actions.enum.d.ts +6 -0
  34. package/dist/{src/enums → enums}/db/relayer.enum.d.ts +1 -0
  35. package/dist/{src/enums → enums}/index.d.ts +2 -0
  36. package/dist/enums/points.enum.d.ts +4 -0
  37. package/dist/enums/socket.enum.d.ts +18 -0
  38. package/dist/{src/helpers → helpers}/codex/common.helper.d.ts +2 -5
  39. package/dist/{src/helpers → helpers}/codex/index.d.ts +2 -0
  40. package/dist/helpers/codex/tokens.d.ts +5 -0
  41. package/dist/{src/helpers → helpers}/codex.helper.d.ts +1 -0
  42. package/dist/{src/common/utils → helpers}/decode.d.ts +1 -1
  43. package/dist/interfaces/algostreamer/index.d.ts +50 -0
  44. package/dist/{src/interfaces → interfaces}/index.d.ts +2 -0
  45. package/dist/{src/interfaces → interfaces}/order.interface.d.ts +1 -0
  46. package/dist/interfaces/socket.interface.d.ts +16 -0
  47. package/dist/node/common/index.js +1 -1
  48. package/dist/node/constants/env.js +1 -0
  49. package/dist/node/constants/index.js +1 -1
  50. package/dist/node/enums/index.js +1 -1
  51. package/dist/node/helpers/algo.helper.js +1 -1
  52. package/dist/node/helpers/assert.helper.js +1 -1
  53. package/dist/node/helpers/atomic.helper.js +1 -1
  54. package/dist/node/helpers/balance.helper.js +1 -1
  55. package/dist/node/helpers/codex/common.helper.js +2 -2
  56. package/dist/node/helpers/codex/index.js +2 -2
  57. package/dist/node/helpers/codex/mbr.helper.js +1 -1
  58. package/dist/node/helpers/codex/mna.helper.js +1 -1
  59. package/dist/node/helpers/codex/order.helper.js +1 -1
  60. package/dist/node/helpers/codex/setGlobal.helper.js +1 -1
  61. package/dist/node/helpers/codex/tokens.js +1 -0
  62. package/dist/node/helpers/codex/transfer.helper.js +2 -2
  63. package/dist/node/helpers/codex/txn.helper.js +1 -1
  64. package/dist/node/helpers/codex.helper.js +6 -6
  65. package/dist/node/helpers/eth.helper.js +2 -2
  66. package/dist/node/helpers/order.helper.js +1 -1
  67. package/dist/node/helpers/pair.helper.js +1 -1
  68. package/dist/node/helpers/pointSystem.helper.js +1 -1
  69. package/dist/node/helpers/withdraw.helper.js +2 -2
  70. package/dist/node/interfaces/index.js +1 -1
  71. package/dist/node/services/index.js +1 -0
  72. package/dist/node/types/index.js +1 -1
  73. package/dist/services/index.d.ts +2 -0
  74. package/dist/services/pairParam.service.d.ts +14 -0
  75. package/dist/services/tmc.service.d.ts +33 -0
  76. package/dist/{src/types → types}/api/request.types.d.ts +10 -10
  77. package/dist/{src/types → types}/settings.type.d.ts +3 -3
  78. package/package.json +39 -5
  79. package/dist/browser/common/big-number.helper.js +0 -11
  80. package/dist/browser/common/mappers/codexAsset.mapper.js +0 -11
  81. package/dist/browser/common/mappers/index.js +0 -11
  82. package/dist/browser/common/mappers/trade.mapper.js +0 -11
  83. package/dist/browser/common/utils/assert.js +0 -11
  84. package/dist/browser/common/utils/index.js +0 -11
  85. package/dist/browser/common/utils/stat.js +0 -11
  86. package/dist/browser/helpers/vaa.helper.js +0 -11
  87. package/dist/node/common/big-number.helper.js +0 -1
  88. package/dist/node/common/mappers/codexAsset.mapper.js +0 -1
  89. package/dist/node/common/mappers/codexBalance.mapper.js +0 -1
  90. package/dist/node/common/mappers/index.js +0 -1
  91. package/dist/node/common/mappers/trade.mapper.js +0 -1
  92. package/dist/node/common/utils/assert.js +0 -1
  93. package/dist/node/common/utils/index.js +0 -1
  94. package/dist/node/common/utils/social.js +0 -1
  95. package/dist/node/common/utils/stat.js +0 -1
  96. package/dist/node/helpers/vaa.helper.js +0 -0
  97. package/dist/src/helpers/vaa.helper.d.ts +0 -0
  98. /package/dist/browser/{common → helpers}/auth.helper.js +0 -0
  99. /package/dist/browser/{common/utils → helpers}/decode.js +0 -0
  100. /package/dist/{src/common → common}/big-number.helper.d.ts +0 -0
  101. /package/dist/{src/common → common}/mappers/codexAsset.mapper.d.ts +0 -0
  102. /package/dist/{src/common → common}/mappers/codexBalance.mapper.d.ts +0 -0
  103. /package/dist/{src/common → common}/mappers/index.d.ts +0 -0
  104. /package/dist/{src/common → common}/mappers/trade.mapper.d.ts +0 -0
  105. /package/dist/{src/common → common}/utils/assert.d.ts +0 -0
  106. /package/dist/{src/common → common}/utils/social.d.ts +0 -0
  107. /package/dist/{src/common → common}/utils/stat.d.ts +0 -0
  108. /package/dist/{src/constants → constants}/auth.d.ts +0 -0
  109. /package/dist/{src/constants → constants}/cctp.d.ts +0 -0
  110. /package/dist/{src/constants → constants}/codex.d.ts +0 -0
  111. /package/dist/{src/constants → constants}/frontend.d.ts +0 -0
  112. /package/dist/{src/constants → constants}/response.d.ts +0 -0
  113. /package/dist/{src/constants → constants}/settings.d.ts +0 -0
  114. /package/dist/{src/constants → constants}/withdrawalWalletsMessage.d.ts +0 -0
  115. /package/dist/{src/enums → enums}/chains.enum.d.ts +0 -0
  116. /package/dist/{src/enums → enums}/db/account/index.d.ts +0 -0
  117. /package/dist/{src/enums → enums}/db/affiliate.enum.d.ts +0 -0
  118. /package/dist/{src/enums → enums}/db/available-pair-settings.enum.d.ts +0 -0
  119. /package/dist/{src/enums → enums}/db/common.enum.d.ts +0 -0
  120. /package/dist/{src/enums → enums}/db/component/index.d.ts +0 -0
  121. /package/dist/{src/enums → enums}/db/market-maker.enum.d.ts +0 -0
  122. /package/dist/{src/enums → enums}/db/notification-center/userNotification.enum.d.ts +0 -0
  123. /package/dist/{src/enums → enums}/db/order-side.enum.d.ts +0 -0
  124. /package/dist/{src/enums → enums}/db/order-status.enum.d.ts +0 -0
  125. /package/dist/{src/enums → enums}/db/order-type.enum.d.ts +0 -0
  126. /package/dist/{src/enums → enums}/db/setting-type.enum.d.ts +0 -0
  127. /package/dist/{src/enums → enums}/db/social-action.enum.d.ts +0 -0
  128. /package/dist/{src/enums → enums}/db/social-prompt.enum.d.ts +0 -0
  129. /package/dist/{src/enums → enums}/db/social.enum.d.ts +0 -0
  130. /package/dist/{src/enums → enums}/db/state-type.enum.d.ts +0 -0
  131. /package/dist/{src/enums → enums}/db/trade.enums.d.ts +0 -0
  132. /package/dist/{src/enums → enums}/db/tradingKeyType.enum.d.ts +0 -0
  133. /package/dist/{src/enums → enums}/db/upgrade.enum.d.ts +0 -0
  134. /package/dist/{src/enums → enums}/db/withdrawal-wallet.enum.d.ts +0 -0
  135. /package/dist/{src/enums → enums}/maintenanceMode.enum.d.ts +0 -0
  136. /package/dist/{src/enums → enums}/notification.enum.d.ts +0 -0
  137. /package/dist/{src/enums → enums}/rabbitMq.d.ts +0 -0
  138. /package/dist/{src/enums → enums}/settings.enum.d.ts +0 -0
  139. /package/dist/{src/enums → enums}/social.enum.d.ts +0 -0
  140. /package/dist/{src/helpers → helpers}/Encoding.d.ts +0 -0
  141. /package/dist/{src/helpers → helpers}/algo.helper.d.ts +0 -0
  142. /package/dist/{src/helpers → helpers}/assert.helper.d.ts +0 -0
  143. /package/dist/{src/helpers → helpers}/atomic.helper.d.ts +0 -0
  144. /package/dist/{src/common → helpers}/auth.helper.d.ts +0 -0
  145. /package/dist/{src/helpers → helpers}/balance.helper.d.ts +0 -0
  146. /package/dist/{src/helpers → helpers}/codex/mbr.helper.d.ts +0 -0
  147. /package/dist/{src/helpers → helpers}/codex/mna.helper.d.ts +0 -0
  148. /package/dist/{src/helpers → helpers}/codex/order.helper.d.ts +0 -0
  149. /package/dist/{src/helpers → helpers}/codex/setGlobal.helper.d.ts +0 -0
  150. /package/dist/{src/helpers → helpers}/codex/transfer.helper.d.ts +0 -0
  151. /package/dist/{src/helpers → helpers}/codex/txn.helper.d.ts +0 -0
  152. /package/dist/{src/helpers → helpers}/eth.helper.d.ts +0 -0
  153. /package/dist/{src/helpers → helpers}/index.d.ts +0 -0
  154. /package/dist/{src/helpers → helpers}/interval.helpers.d.ts +0 -0
  155. /package/dist/{src/helpers → helpers}/liquidity.helper.d.ts +0 -0
  156. /package/dist/{src/helpers → helpers}/order.helper.d.ts +0 -0
  157. /package/dist/{src/helpers → helpers}/pair.helper.d.ts +0 -0
  158. /package/dist/{src/helpers → helpers}/pointSystem.helper.d.ts +0 -0
  159. /package/dist/{src/helpers → helpers}/ticker.helpers.d.ts +0 -0
  160. /package/dist/{src/helpers → helpers}/withdraw.helper.d.ts +0 -0
  161. /package/dist/{src/interfaces → interfaces}/accountInfo.interface.d.ts +0 -0
  162. /package/dist/{src/interfaces → interfaces}/api/affiliate.interface.d.ts +0 -0
  163. /package/dist/{src/interfaces → interfaces}/api/index.d.ts +0 -0
  164. /package/dist/{src/interfaces → interfaces}/cache.interface.d.ts +0 -0
  165. /package/dist/{src/interfaces → interfaces}/db/baseModel.interface.d.ts +0 -0
  166. /package/dist/{src/interfaces → interfaces}/db/hummingbot/index.d.ts +0 -0
  167. /package/dist/{src/interfaces → interfaces}/db/index.d.ts +0 -0
  168. /package/dist/{src/interfaces → interfaces}/db/market/index.d.ts +0 -0
  169. /package/dist/{src/interfaces → interfaces}/db/marketing/index.d.ts +0 -0
  170. /package/dist/{src/interfaces → interfaces}/db/notification_center/index.d.ts +0 -0
  171. /package/dist/{src/interfaces → interfaces}/db/relayer/index.d.ts +0 -0
  172. /package/dist/{src/interfaces → interfaces}/db/social/index.d.ts +0 -0
  173. /package/dist/{src/interfaces → interfaces}/db/softDeleteModel.interface.d.ts +0 -0
  174. /package/dist/{src/interfaces → interfaces}/db/white_label/index.d.ts +0 -0
  175. /package/dist/{src/interfaces → interfaces}/db/withdrawal_wallets/index.d.ts +0 -0
  176. /package/dist/{src/interfaces → interfaces}/dto/index.d.ts +0 -0
  177. /package/dist/{src/interfaces → interfaces}/emailService.interface.d.ts +0 -0
  178. /package/dist/{src/interfaces → interfaces}/kmsService.interface.d.ts +0 -0
  179. /package/dist/{src/interfaces → interfaces}/last-look-trade.interface.d.ts +0 -0
  180. /package/dist/{src/interfaces → interfaces}/market.interface.d.ts +0 -0
  181. /package/dist/{src/interfaces → interfaces}/pagination.interface.d.ts +0 -0
  182. /package/dist/{src/interfaces → interfaces}/pair.interface.d.ts +0 -0
  183. /package/dist/{src/interfaces → interfaces}/query.interface.d.ts +0 -0
  184. /package/dist/{src/interfaces → interfaces}/services/accountCache.interface.d.ts +0 -0
  185. /package/dist/{src/interfaces → interfaces}/services/algod.interface.d.ts +0 -0
  186. /package/dist/{src/interfaces → interfaces}/services/balances.interface.d.ts +0 -0
  187. /package/dist/{src/interfaces → interfaces}/services/coin-market-cap.interface.d.ts +0 -0
  188. /package/dist/{src/interfaces → interfaces}/services/index.d.ts +0 -0
  189. /package/dist/{src/interfaces → interfaces}/services/price-model.interface.d.ts +0 -0
  190. /package/dist/{src/interfaces → interfaces}/services/price-service.interface.d.ts +0 -0
  191. /package/dist/{src/interfaces → interfaces}/services/socialActivity.interface.d.ts +0 -0
  192. /package/dist/{src/interfaces → interfaces}/services/tmc.interface.d.ts +0 -0
  193. /package/dist/{src/interfaces → interfaces}/settings.interface.d.ts +0 -0
  194. /package/dist/{src/interfaces → interfaces}/streaming.interface.d.ts +0 -0
  195. /package/dist/{src/interfaces → interfaces}/timestream.interface.d.ts +0 -0
  196. /package/dist/{src/interfaces → interfaces}/trading.interface.d.ts +0 -0
  197. /package/dist/{src/interfaces → interfaces}/tradingKey.interface.d.ts +0 -0
  198. /package/dist/{src/interfaces → interfaces}/transfer.interface.d.ts +0 -0
  199. /package/dist/{src/interfaces → interfaces}/wallet.interface.d.ts +0 -0
  200. /package/dist/{src/interfaces → interfaces}/withdrawalWallets.interface.d.ts +0 -0
  201. /package/dist/node/{common → helpers}/auth.helper.js +0 -0
  202. /package/dist/node/{common/utils → helpers}/decode.js +0 -0
  203. /package/dist/{src/types → types}/algo-order.type.d.ts +0 -0
  204. /package/dist/{src/types → types}/amm/amm.d.ts +0 -0
  205. /package/dist/{src/types → types}/balance-result.types.d.ts +0 -0
  206. /package/dist/{src/types → types}/codex.types.d.ts +0 -0
  207. /package/dist/{src/types → types}/hummingbots.types.d.ts +0 -0
  208. /package/dist/{src/types → types}/index.d.ts +0 -0
  209. /package/dist/{src/types → types}/notification.type.d.ts +0 -0
  210. /package/dist/{src/types → types}/state.type.d.ts +0 -0
@@ -0,0 +1,11 @@
1
+ function O(){throw new Error("setTimeout has not been defined")}function Z(){throw new Error("clearTimeout has not been defined")}var y=O,_=Z;typeof globalThis.setTimeout=="function"&&(y=setTimeout);typeof globalThis.clearTimeout=="function"&&(_=clearTimeout);function G(e){if(y===setTimeout)return setTimeout(e,0);if((y===O||!y)&&setTimeout)return y=setTimeout,setTimeout(e,0);try{return y(e,0)}catch{try{return y.call(null,e,0)}catch{return y.call(this,e,0)}}}function pr(e){if(_===clearTimeout)return clearTimeout(e);if((_===Z||!_)&&clearTimeout)return _=clearTimeout,clearTimeout(e);try{return _(e)}catch{try{return _.call(null,e)}catch{return _.call(this,e)}}}var I=[],C=!1,R,b=-1;function wr(){!C||!R||(C=!1,R.length?I=R.concat(I):b=-1,I.length&&X())}function X(){if(!C){var e=G(wr);C=!0;for(var r=I.length;r;){for(R=I,I=[];++b<r;)R&&R[b].run();b=-1,r=I.length}R=null,C=!1,pr(e)}}function mr(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];I.push(new H(e,r)),I.length===1&&!C&&G(X)}function H(e,r){this.fun=e,this.array=r}H.prototype.run=function(){this.fun.apply(null,this.array)};var xr="browser",Er="browser",gr=!0,Ar={},Ir=[],dr="",yr={},_r={},Rr={};function v(){}var vr=v,Tr=v,Ur=v,Mr=v,Cr=v,Br=v,br=v;function Nr(e){throw new Error("process.binding is not supported")}function Dr(){return"/"}function Sr(e){throw new Error("process.chdir is not supported")}function Pr(){return 0}var M=globalThis.performance||{},Yr=M.now||M.mozNow||M.msNow||M.oNow||M.webkitNow||function(){return new Date().getTime()};function kr(e){var r=Yr.call(M)*.001,n=Math.floor(r),i=Math.floor(r%1*1e9);return e&&(n=n-e[0],i=i-e[1],i<0&&(n--,i+=1e9)),[n,i]}var Lr=new Date;function Fr(){var e=new Date,r=e-Lr;return r/1e3}var B={nextTick:mr,title:xr,browser:gr,env:Ar,argv:Ir,version:dr,versions:yr,on:vr,addListener:Tr,once:Ur,off:Mr,removeListener:Cr,removeAllListeners:Br,emit:br,binding:Nr,cwd:Dr,chdir:Sr,umask:Pr,hrtime:kr,platform:Er,release:_r,config:Rr,uptime:Fr},$={};Object.keys($).forEach(e=>{let r=e.split("."),n=B;for(let i=0;i<r.length;i++){let t=r[i];i===r.length-1?n[t]=$[e]:n=n[t]||(n[t]={})}});var g=[],x=[],Vr=typeof Uint8Array<"u"?Uint8Array:Array,F=!1;function K(){F=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,n=e.length;r<n;++r)g[r]=e[r],x[e.charCodeAt(r)]=r;x[45]=62,x[95]=63}function Wr(e){F||K();var r,n,i,t,o,u,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[a-2]==="="?2:e[a-1]==="="?1:0,u=new Vr(a*3/4-o),i=o>0?a-4:a;var c=0;for(r=0,n=0;r<i;r+=4,n+=3)t=x[e.charCodeAt(r)]<<18|x[e.charCodeAt(r+1)]<<12|x[e.charCodeAt(r+2)]<<6|x[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=t&255;return o===2?(t=x[e.charCodeAt(r)]<<2|x[e.charCodeAt(r+1)]>>4,u[c++]=t&255):o===1&&(t=x[e.charCodeAt(r)]<<10|x[e.charCodeAt(r+1)]<<4|x[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=t&255),u}function $r(e){return g[e>>18&63]+g[e>>12&63]+g[e>>6&63]+g[e&63]}function Or(e,r,n){for(var i,t=[],o=r;o<n;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],t.push($r(i));return t.join("")}function q(e){F||K();for(var r,n=e.length,i=n%3,t="",o=[],u=16383,a=0,c=n-i;a<c;a+=u)o.push(Or(e,a,a+u>c?c:a+u));return i===1?(r=e[n-1],t+=g[r>>2],t+=g[r<<4&63],t+="=="):i===2&&(r=(e[n-2]<<8)+e[n-1],t+=g[r>>10],t+=g[r>>4&63],t+=g[r<<2&63],t+="="),o.push(t),o.join("")}f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function N(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(e,r){if(N()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=f.prototype):(e===null&&(e=new f(r)),e.length=r),e}function f(e,r,n){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(e,r,n);if(typeof e=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return V(this,e)}return Q(this,e,r,n)}f.poolSize=8192;f._augment=function(e){return e.__proto__=f.prototype,e};function Q(e,r,n,i){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?Xr(e,r,n,i):typeof r=="string"?Gr(e,r,n):Hr(e,r)}f.from=function(e,r,n){return Q(null,e,r,n)};f.kMaxLength=N();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&f[Symbol.species]);function j(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Zr(e,r,n,i){return j(r),r<=0?d(e,r):n!==void 0?typeof i=="string"?d(e,r).fill(n,i):d(e,r).fill(n):d(e,r)}f.alloc=function(e,r,n){return Zr(null,e,r,n)};function V(e,r){if(j(r),e=d(e,r<0?0:W(r)|0),!f.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}f.allocUnsafe=function(e){return V(null,e)};f.allocUnsafeSlow=function(e){return V(null,e)};function Gr(e,r,n){if((typeof n!="string"||n==="")&&(n="utf8"),!f.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=rr(r,n)|0;e=d(e,i);var t=e.write(r,n);return t!==i&&(e=e.slice(0,t)),e}function L(e,r){var n=r.length<0?0:W(r.length)|0;e=d(e,n);for(var i=0;i<n;i+=1)e[i]=r[i]&255;return e}function Xr(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return n===void 0&&i===void 0?r=new Uint8Array(r):i===void 0?r=new Uint8Array(r,n):r=new Uint8Array(r,n,i),f.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=f.prototype):e=L(e,r),e}function Hr(e,r){if(A(r)){var n=W(r.length)|0;return e=d(e,n),e.length===0||r.copy(e,0,0,n),e}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||pn(r.length)?d(e,0):L(e,r);if(r.type==="Buffer"&&Array.isArray(r.data))return L(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function W(e){if(e>=N())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+N().toString(16)+" bytes");return e|0}f.isBuffer=wn;function A(e){return!!(e!=null&&e._isBuffer)}f.compare=function(r,n){if(!A(r)||!A(n))throw new TypeError("Arguments must be Buffers");if(r===n)return 0;for(var i=r.length,t=n.length,o=0,u=Math.min(i,t);o<u;++o)if(r[o]!==n[o]){i=r[o],t=n[o];break}return i<t?-1:t<i?1:0};f.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(r,n){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return f.alloc(0);var i;if(n===void 0)for(n=0,i=0;i<r.length;++i)n+=r[i].length;var t=f.allocUnsafe(n),o=0;for(i=0;i<r.length;++i){var u=r[i];if(!A(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(t,o),o+=u.length}return t};function rr(e,r){if(A(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return fr(e).length;default:if(i)return D(e).length;r=(""+r).toLowerCase(),i=!0}}f.byteLength=rr;function qr(e,r,n){var i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,r>>>=0,n<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return on(this,r,n);case"utf8":case"utf-8":return ir(this,r,n);case"ascii":return en(this,r,n);case"latin1":case"binary":return tn(this,r,n);case"base64":return rn(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return un(this,r,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}f.prototype._isBuffer=!0;function T(e,r,n){var i=e[r];e[r]=e[n],e[n]=i}f.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<r;n+=2)T(this,n,n+1);return this};f.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<r;n+=4)T(this,n,n+3),T(this,n+1,n+2);return this};f.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<r;n+=8)T(this,n,n+7),T(this,n+1,n+6),T(this,n+2,n+5),T(this,n+3,n+4);return this};f.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?ir(this,0,r):qr.apply(this,arguments)};f.prototype.equals=function(r){if(!A(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:f.compare(this,r)===0};f.prototype.compare=function(r,n,i,t,o){if(!A(r))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),i===void 0&&(i=r?r.length:0),t===void 0&&(t=0),o===void 0&&(o=this.length),n<0||i>r.length||t<0||o>this.length)throw new RangeError("out of range index");if(t>=o&&n>=i)return 0;if(t>=o)return-1;if(n>=i)return 1;if(n>>>=0,i>>>=0,t>>>=0,o>>>=0,this===r)return 0;for(var u=o-t,a=i-n,c=Math.min(u,a),s=this.slice(t,o),l=r.slice(n,i),h=0;h<c;++h)if(s[h]!==l[h]){u=s[h],a=l[h];break}return u<a?-1:a<u?1:0};function nr(e,r,n,i,t){if(e.length===0)return-1;if(typeof n=="string"?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=t?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(t)return-1;n=e.length-1}else if(n<0)if(t)n=0;else return-1;if(typeof r=="string"&&(r=f.from(r,i)),A(r))return r.length===0?-1:z(e,r,n,i,t);if(typeof r=="number")return r=r&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?t?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):z(e,[r],n,i,t);throw new TypeError("val must be string, number or Buffer")}function z(e,r,n,i,t){var o=1,u=e.length,a=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,a/=2,n/=2}function c(m,U){return o===1?m[U]:m.readUInt16BE(U*o)}var s;if(t){var l=-1;for(s=n;s<u;s++)if(c(e,s)===c(r,l===-1?0:s-l)){if(l===-1&&(l=s),s-l+1===a)return l*o}else l!==-1&&(s-=s-l),l=-1}else for(n+a>u&&(n=u-a),s=n;s>=0;s--){for(var h=!0,E=0;E<a;E++)if(c(e,s+E)!==c(r,E)){h=!1;break}if(h)return s}return-1}f.prototype.includes=function(r,n,i){return this.indexOf(r,n,i)!==-1};f.prototype.indexOf=function(r,n,i){return nr(this,r,n,i,!0)};f.prototype.lastIndexOf=function(r,n,i){return nr(this,r,n,i,!1)};function zr(e,r,n,i){n=Number(n)||0;var t=e.length-n;i?(i=Number(i),i>t&&(i=t)):i=t;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var u=0;u<i;++u){var a=parseInt(r.substr(u*2,2),16);if(isNaN(a))return u;e[n+u]=a}return u}function Jr(e,r,n,i){return Y(D(r,e.length-n),e,n,i)}function er(e,r,n,i){return Y(sn(r),e,n,i)}function Kr(e,r,n,i){return er(e,r,n,i)}function Qr(e,r,n,i){return Y(fr(r),e,n,i)}function jr(e,r,n,i){return Y(ln(r,e.length-n),e,n,i)}f.prototype.write=function(r,n,i,t){if(n===void 0)t="utf8",i=this.length,n=0;else if(i===void 0&&typeof n=="string")t=n,i=this.length,n=0;else if(isFinite(n))n=n|0,isFinite(i)?(i=i|0,t===void 0&&(t="utf8")):(t=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-n;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");t||(t="utf8");for(var u=!1;;)switch(t){case"hex":return zr(this,r,n,i);case"utf8":case"utf-8":return Jr(this,r,n,i);case"ascii":return er(this,r,n,i);case"latin1":case"binary":return Kr(this,r,n,i);case"base64":return Qr(this,r,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jr(this,r,n,i);default:if(u)throw new TypeError("Unknown encoding: "+t);t=(""+t).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(e,r,n){return r===0&&n===e.length?q(e):q(e.slice(r,n))}function ir(e,r,n){n=Math.min(e.length,n);for(var i=[],t=r;t<n;){var o=e[t],u=null,a=o>239?4:o>223?3:o>191?2:1;if(t+a<=n){var c,s,l,h;switch(a){case 1:o<128&&(u=o);break;case 2:c=e[t+1],(c&192)===128&&(h=(o&31)<<6|c&63,h>127&&(u=h));break;case 3:c=e[t+1],s=e[t+2],(c&192)===128&&(s&192)===128&&(h=(o&15)<<12|(c&63)<<6|s&63,h>2047&&(h<55296||h>57343)&&(u=h));break;case 4:c=e[t+1],s=e[t+2],l=e[t+3],(c&192)===128&&(s&192)===128&&(l&192)===128&&(h=(o&15)<<18|(c&63)<<12|(s&63)<<6|l&63,h>65535&&h<1114112&&(u=h))}}u===null?(u=65533,a=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|u&1023),i.push(u),t+=a}return nn(i)}var J=4096;function nn(e){var r=e.length;if(r<=J)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<r;)n+=String.fromCharCode.apply(String,e.slice(i,i+=J));return n}function en(e,r,n){var i="";n=Math.min(e.length,n);for(var t=r;t<n;++t)i+=String.fromCharCode(e[t]&127);return i}function tn(e,r,n){var i="";n=Math.min(e.length,n);for(var t=r;t<n;++t)i+=String.fromCharCode(e[t]);return i}function on(e,r,n){var i=e.length;(!r||r<0)&&(r=0),(!n||n<0||n>i)&&(n=i);for(var t="",o=r;o<n;++o)t+=hn(e[o]);return t}function un(e,r,n){for(var i=e.slice(r,n),t="",o=0;o<i.length;o+=2)t+=String.fromCharCode(i[o]+i[o+1]*256);return t}f.prototype.slice=function(r,n){var i=this.length;r=~~r,n=n===void 0?i:~~n,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),n<0?(n+=i,n<0&&(n=0)):n>i&&(n=i),n<r&&(n=r);var t;if(f.TYPED_ARRAY_SUPPORT)t=this.subarray(r,n),t.__proto__=f.prototype;else{var o=n-r;t=new f(o,void 0);for(var u=0;u<o;++u)t[u]=this[u+r]}return t};function p(e,r,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>n)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(r,n,i){r=r|0,n=n|0,i||p(r,n,this.length);for(var t=this[r],o=1,u=0;++u<n&&(o*=256);)t+=this[r+u]*o;return t};f.prototype.readUIntBE=function(r,n,i){r=r|0,n=n|0,i||p(r,n,this.length);for(var t=this[r+--n],o=1;n>0&&(o*=256);)t+=this[r+--n]*o;return t};f.prototype.readUInt8=function(r,n){return n||p(r,1,this.length),this[r]};f.prototype.readUInt16LE=function(r,n){return n||p(r,2,this.length),this[r]|this[r+1]<<8};f.prototype.readUInt16BE=function(r,n){return n||p(r,2,this.length),this[r]<<8|this[r+1]};f.prototype.readUInt32LE=function(r,n){return n||p(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};f.prototype.readUInt32BE=function(r,n){return n||p(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};f.prototype.readIntLE=function(r,n,i){r=r|0,n=n|0,i||p(r,n,this.length);for(var t=this[r],o=1,u=0;++u<n&&(o*=256);)t+=this[r+u]*o;return o*=128,t>=o&&(t-=Math.pow(2,8*n)),t};f.prototype.readIntBE=function(r,n,i){r=r|0,n=n|0,i||p(r,n,this.length);for(var t=n,o=1,u=this[r+--t];t>0&&(o*=256);)u+=this[r+--t]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*n)),u};f.prototype.readInt8=function(r,n){return n||p(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};f.prototype.readInt16LE=function(r,n){n||p(r,2,this.length);var i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};f.prototype.readInt16BE=function(r,n){n||p(r,2,this.length);var i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};f.prototype.readInt32LE=function(r,n){return n||p(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};f.prototype.readInt32BE=function(r,n){return n||p(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};f.prototype.readFloatLE=function(r,n){return n||p(r,4,this.length),k(this,r,!0,23,4)};f.prototype.readFloatBE=function(r,n){return n||p(r,4,this.length),k(this,r,!1,23,4)};f.prototype.readDoubleLE=function(r,n){return n||p(r,8,this.length),k(this,r,!0,52,8)};f.prototype.readDoubleBE=function(r,n){return n||p(r,8,this.length),k(this,r,!1,52,8)};function w(e,r,n,i,t,o){if(!A(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>t||r<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(r,n,i,t){if(r=+r,n=n|0,i=i|0,!t){var o=Math.pow(2,8*i)-1;w(this,r,n,i,o,0)}var u=1,a=0;for(this[n]=r&255;++a<i&&(u*=256);)this[n+a]=r/u&255;return n+i};f.prototype.writeUIntBE=function(r,n,i,t){if(r=+r,n=n|0,i=i|0,!t){var o=Math.pow(2,8*i)-1;w(this,r,n,i,o,0)}var u=i-1,a=1;for(this[n+u]=r&255;--u>=0&&(a*=256);)this[n+u]=r/a&255;return n+i};f.prototype.writeUInt8=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,1,255,0),f.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[n]=r&255,n+1};function S(e,r,n,i){r<0&&(r=65535+r+1);for(var t=0,o=Math.min(e.length-n,2);t<o;++t)e[n+t]=(r&255<<8*(i?t:1-t))>>>(i?t:1-t)*8}f.prototype.writeUInt16LE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[n]=r&255,this[n+1]=r>>>8):S(this,r,n,!0),n+2};f.prototype.writeUInt16BE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[n]=r>>>8,this[n+1]=r&255):S(this,r,n,!1),n+2};function P(e,r,n,i){r<0&&(r=4294967295+r+1);for(var t=0,o=Math.min(e.length-n,4);t<o;++t)e[n+t]=r>>>(i?t:3-t)*8&255}f.prototype.writeUInt32LE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=r&255):P(this,r,n,!0),n+4};f.prototype.writeUInt32BE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255):P(this,r,n,!1),n+4};f.prototype.writeIntLE=function(r,n,i,t){if(r=+r,n=n|0,!t){var o=Math.pow(2,8*i-1);w(this,r,n,i,o-1,-o)}var u=0,a=1,c=0;for(this[n]=r&255;++u<i&&(a*=256);)r<0&&c===0&&this[n+u-1]!==0&&(c=1),this[n+u]=(r/a>>0)-c&255;return n+i};f.prototype.writeIntBE=function(r,n,i,t){if(r=+r,n=n|0,!t){var o=Math.pow(2,8*i-1);w(this,r,n,i,o-1,-o)}var u=i-1,a=1,c=0;for(this[n+u]=r&255;--u>=0&&(a*=256);)r<0&&c===0&&this[n+u+1]!==0&&(c=1),this[n+u]=(r/a>>0)-c&255;return n+i};f.prototype.writeInt8=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,1,127,-128),f.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[n]=r&255,n+1};f.prototype.writeInt16LE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[n]=r&255,this[n+1]=r>>>8):S(this,r,n,!0),n+2};f.prototype.writeInt16BE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[n]=r>>>8,this[n+1]=r&255):S(this,r,n,!1),n+2};f.prototype.writeInt32LE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[n]=r&255,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24):P(this,r,n,!0),n+4};f.prototype.writeInt32BE=function(r,n,i){return r=+r,n=n|0,i||w(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),f.TYPED_ARRAY_SUPPORT?(this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255):P(this,r,n,!1),n+4};function tr(e,r,n,i,t,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function or(e,r,n,i,t){return t||tr(e,r,n,4,34028234663852886e22,-34028234663852886e22),cr(e,r,n,i,23,4),n+4}f.prototype.writeFloatLE=function(r,n,i){return or(this,r,n,!0,i)};f.prototype.writeFloatBE=function(r,n,i){return or(this,r,n,!1,i)};function ur(e,r,n,i,t){return t||tr(e,r,n,8,17976931348623157e292,-17976931348623157e292),cr(e,r,n,i,52,8),n+8}f.prototype.writeDoubleLE=function(r,n,i){return ur(this,r,n,!0,i)};f.prototype.writeDoubleBE=function(r,n,i){return ur(this,r,n,!1,i)};f.prototype.copy=function(r,n,i,t){if(i||(i=0),!t&&t!==0&&(t=this.length),n>=r.length&&(n=r.length),n||(n=0),t>0&&t<i&&(t=i),t===i||r.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(t<0)throw new RangeError("sourceEnd out of bounds");t>this.length&&(t=this.length),r.length-n<t-i&&(t=r.length-n+i);var o=t-i,u;if(this===r&&i<n&&n<t)for(u=o-1;u>=0;--u)r[u+n]=this[u+i];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)r[u+n]=this[u+i];else Uint8Array.prototype.set.call(r,this.subarray(i,i+o),n);return o};f.prototype.fill=function(r,n,i,t){if(typeof r=="string"){if(typeof n=="string"?(t=n,n=0,i=this.length):typeof i=="string"&&(t=i,i=this.length),r.length===1){var o=r.charCodeAt(0);o<256&&(r=o)}if(t!==void 0&&typeof t!="string")throw new TypeError("encoding must be a string");if(typeof t=="string"&&!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t)}else typeof r=="number"&&(r=r&255);if(n<0||this.length<n||this.length<i)throw new RangeError("Out of range index");if(i<=n)return this;n=n>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);var u;if(typeof r=="number")for(u=n;u<i;++u)this[u]=r;else{var a=A(r)?r:D(new f(r,t).toString()),c=a.length;for(u=0;u<i-n;++u)this[u+n]=a[u%c]}return this};var fn=/[^+\/0-9A-Za-z-_]/g;function an(e){if(e=cn(e).replace(fn,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function cn(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function hn(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,r){r=r||1/0;for(var n,i=e.length,t=null,o=[],u=0;u<i;++u){if(n=e.charCodeAt(u),n>55295&&n<57344){if(!t){if(n>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===i){(r-=3)>-1&&o.push(239,191,189);continue}t=n;continue}if(n<56320){(r-=3)>-1&&o.push(239,191,189),t=n;continue}n=(t-55296<<10|n-56320)+65536}else t&&(r-=3)>-1&&o.push(239,191,189);if(t=null,n<128){if((r-=1)<0)break;o.push(n)}else if(n<2048){if((r-=2)<0)break;o.push(n>>6|192,n&63|128)}else if(n<65536){if((r-=3)<0)break;o.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((r-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return o}function sn(e){for(var r=[],n=0;n<e.length;++n)r.push(e.charCodeAt(n)&255);return r}function ln(e,r){for(var n,i,t,o=[],u=0;u<e.length&&!((r-=2)<0);++u)n=e.charCodeAt(u),i=n>>8,t=n%256,o.push(t),o.push(i);return o}function fr(e){return Wr(an(e))}function Y(e,r,n,i){for(var t=0;t<i&&!(t+n>=r.length||t>=e.length);++t)r[t+n]=e[t];return t}function pn(e){return e!==e}function wn(e){return e!=null&&(!!e._isBuffer||ar(e)||mn(e))}function ar(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function mn(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&ar(e.slice(0,0))}function k(e,r,n,i,t){var o,u,a=t*8-i-1,c=(1<<a)-1,s=c>>1,l=-7,h=n?t-1:0,E=n?-1:1,m=e[r+h];for(h+=E,o=m&(1<<-l)-1,m>>=-l,l+=a;l>0;o=o*256+e[r+h],h+=E,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=i;l>0;u=u*256+e[r+h],h+=E,l-=8);if(o===0)o=1-s;else{if(o===c)return u?NaN:(m?-1:1)*(1/0);u=u+Math.pow(2,i),o=o-s}return(m?-1:1)*u*Math.pow(2,o-i)}function cr(e,r,n,i,t,o){var u,a,c,s=o*8-t-1,l=(1<<s)-1,h=l>>1,E=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:o-1,U=i?1:-1,lr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+h>=1?r+=E/c:r+=E*Math.pow(2,1-h),r*c>=2&&(u++,c/=2),u+h>=l?(a=0,u=l):u+h>=1?(a=(r*c-1)*Math.pow(2,t),u=u+h):(a=r*Math.pow(2,h-1)*Math.pow(2,t),u=0));t>=8;e[n+m]=a&255,m+=U,a/=256,t-=8);for(u=u<<t|a,s+=t;s>0;e[n+m]=u&255,m+=U,u/=256,s-=8);e[n+m-U]|=lr*128}var hr=class{constructor(r){let n=typeof r=="string"?JSON.parse(r):r;this.tmcContracts=n,this.tmcContractsByWhId=new Map(this.tmcContracts.map(i=>[Number(i.whChainId),i]))}hexZeroPad(r,n){r.startsWith("0x")&&(r=r.slice(2));let i=n*2-r.length;if(i<0)throw new Error("Hex string is longer than the provided length");return"0x"+"0".repeat(i)+r}isSupportedEvmTmcChain(r){return!!this.tmcContractsByWhId.get(r)}isEVMTMC(r,n){if(r==1||r==8||!this.isSupportedEvmTmcChain(r))return!1;let i=this.getTMC(r);return i?n.toLowerCase()==i.toLowerCase():!1}getTMC(r){return this.tmcContractsByWhId.get(r)?.tmc}getDispencer(r){return this.tmcContractsByWhId.get(r)?.dispencer}getProviderUrl(r){return this.tmcContractsByWhId.get(r)?.providerUrl}getWssUrl(r){return this.tmcContractsByWhId.get(r)?.wss}getTmcContracts(){return this.tmcContractsByWhId}getTmcAddresses(){return this.tmcContracts.map(r=>r.tmc).filter(r=>!!r)}getAvailableChains(){return this.tmcContracts.filter(r=>!!r.tmc).map(r=>r.chainId)}getAvailableWhChains(){return this.tmcContracts.filter(r=>!!r.tmc).map(r=>Number(r.whChainId))}getTmcRelayerConfig(){return this.tmcContracts.reduce((r,n)=>(n.tmc&&(r[Number(n.whChainId)]=n.tmc),r),{})}getAvaibleEvmChainIds(){return this.tmcContracts.filter(r=>!!r.tmc&&Number(r.chainId)).map(r=>Number(r.chainId))}getTmcByEvmChainId(r){return this.tmcContracts.find(i=>Number(i.chainId)===r).tmc}getTmcEvmMap(){return new Map(this.tmcContracts.filter(r=>!!r.tmc).map(r=>[Number(r.chainId),r]))}};var sr=class{validateMos(r,n,i){let o=Number(r)/Math.pow(10,i)*n;if(o<1)throw new Error(`MOS value ($${o.toFixed(2)}) must be greater or equal to 1$.`);if(o>20)throw new Error(`MOS value ($${o.toFixed(2)}) must be less or equal to 20$.`);return!0}validateMsi(r,n,i){let o=Number(r)/Math.pow(10,i)*n;if(o<.1)throw new Error(`MSI value ($${o.toFixed(2)}) must be greater or equal to ${.1}$.`);return!0}validateMpi(r,n,i,t){let a=(typeof r=="string"?parseFloat(r):r)/Math.pow(10,t)*i/n/100;if(a>.1||a<.003)throw new Error(`MPI validation failed: ratio = ${a.toFixed(4)}, must be between 0.3 and 10 bps`);return!0}validateMpiFactored(r,n,i){let u=(typeof r=="string"?parseFloat(r):r)/Math.pow(10,18)*i/n*100;if(u>.1||u<.003)throw new Error(`MPI (factored) validation failed: bps = ${(u*100).toFixed(4)}, must be between 0.3 and 10 bps`);return!0}validateMarketParameters(r){let{baseDollarValue:n,priceDollarValue:i,baseDecimal:t,mos:o,msi:u,mpi:a}=r;if(n<=0)throw new Error(`Invalid base token dollar value: ${n}`);if(i<=0)throw new Error(`Invalid price token dollar value: ${i}`);return this.validateMos(o,n,t),this.validateMsi(u,n,t),this.validateMpiFactored(a,n,i),!0}};export{sr as PairParamService,hr as TMCManager};
2
+ /*! Bundled license information:
3
+
4
+ @esbuild-plugins/node-globals-polyfill/Buffer.js:
5
+ (*!
6
+ * The buffer module from node.js, for the browser.
7
+ *
8
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
9
+ * @license MIT
10
+ *)
11
+ */
@@ -1,4 +1,4 @@
1
- function K(){throw new Error("setTimeout has not been defined")}function G(){throw new Error("clearTimeout has not been defined")}var A=K,R=G;typeof globalThis.setTimeout=="function"&&(A=setTimeout);typeof globalThis.clearTimeout=="function"&&(R=clearTimeout);function z(t){if(A===setTimeout)return setTimeout(t,0);if((A===K||!A)&&setTimeout)return A=setTimeout,setTimeout(t,0);try{return A(t,0)}catch{try{return A.call(null,t,0)}catch{return A.call(this,t,0)}}}function br(t){if(R===clearTimeout)return clearTimeout(t);if((R===G||!R)&&clearTimeout)return R=clearTimeout,clearTimeout(t);try{return R(t)}catch{try{return R.call(null,t)}catch{return R.call(this,t)}}}var y=[],P=!1,I,C=-1;function dr(){!P||!I||(P=!1,I.length?y=I.concat(y):C=-1,y.length&&X())}function X(){if(!P){var t=z(dr);P=!0;for(var r=y.length;r;){for(I=y,y=[];++C<r;)I&&I[C].run();C=-1,r=y.length}I=null,P=!1,br(t)}}function xr(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];y.push(new J(t,r)),y.length===1&&!P&&z(X)}function J(t,r){this.fun=t,this.array=r}J.prototype.run=function(){this.fun.apply(null,this.array)};var Er="browser",_r="browser",Tr=!0,yr={},wr=[],Ar="",Rr={},Ir={},vr={};function v(){}var kr=v,Nr=v,Sr=v,Pr=v,Cr=v,Br=v,Dr=v;function Or(t){throw new Error("process.binding is not supported")}function Mr(){return"/"}function Ur(t){throw new Error("process.chdir is not supported")}function Lr(){return 0}var S=globalThis.performance||{},Yr=S.now||S.mozNow||S.msNow||S.oNow||S.webkitNow||function(){return new Date().getTime()};function Fr(t){var r=Yr.call(S)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}var Wr=new Date;function Vr(){var t=new Date,r=t-Wr;return r/1e3}var h={nextTick:xr,title:Er,browser:Tr,env:yr,argv:wr,version:Ar,versions:Rr,on:kr,addListener:Nr,once:Sr,off:Pr,removeListener:Cr,removeAllListeners:Br,emit:Dr,binding:Or,cwd:Mr,chdir:Ur,umask:Lr,hrtime:Fr,platform:_r,release:Ir,config:vr,uptime:Vr},H={};Object.keys(H).forEach(t=>{let r=t.split("."),e=h;for(let n=0;n<r.length;n++){let i=r[n];n===r.length-1?e[i]=H[t]:e=e[i]||(e[i]={})}});var _=[],x=[],Hr=typeof Uint8Array<"u"?Uint8Array:Array,F=!1;function Q(){F=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)_[r]=t[r],x[t.charCodeAt(r)]=r;x[45]=62,x[95]=63}function Kr(t){F||Q();var r,e,n,i,a,o,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[s-2]==="="?2:t[s-1]==="="?1:0,o=new Hr(s*3/4-a),n=a>0?s-4:s;var c=0;for(r=0,e=0;r<n;r+=4,e+=3)i=x[t.charCodeAt(r)]<<18|x[t.charCodeAt(r+1)]<<12|x[t.charCodeAt(r+2)]<<6|x[t.charCodeAt(r+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=i&255;return a===2?(i=x[t.charCodeAt(r)]<<2|x[t.charCodeAt(r+1)]>>4,o[c++]=i&255):a===1&&(i=x[t.charCodeAt(r)]<<10|x[t.charCodeAt(r+1)]<<4|x[t.charCodeAt(r+2)]>>2,o[c++]=i>>8&255,o[c++]=i&255),o}function Gr(t){return _[t>>18&63]+_[t>>12&63]+_[t>>6&63]+_[t&63]}function zr(t,r,e){for(var n,i=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Gr(n));return i.join("")}function q(t){F||Q();for(var r,e=t.length,n=e%3,i="",a=[],o=16383,s=0,c=e-n;s<c;s+=o)a.push(zr(t,s,s+o>c?c:s+o));return n===1?(r=t[e-1],i+=_[r>>2],i+=_[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=_[r>>10],i+=_[r>>4&63],i+=_[r<<2&63],i+="="),a.push(i),a.join("")}u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function B(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(t,r){if(B()<r)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=u.prototype):(t===null&&(t=new u(r)),t.length=r),t}function u(t,r,e){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return W(this,t)}return j(this,t,r,e)}u.poolSize=8192;u._augment=function(t){return t.__proto__=u.prototype,t};function j(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?qr(t,r,e,n):typeof r=="string"?Jr(t,r,e):$r(t,r)}u.from=function(t,r,e){return j(null,t,r,e)};u.kMaxLength=B();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&u[Symbol.species]);function rr(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Xr(t,r,e,n){return rr(r),r<=0?w(t,r):e!==void 0?typeof n=="string"?w(t,r).fill(e,n):w(t,r).fill(e):w(t,r)}u.alloc=function(t,r,e){return Xr(null,t,r,e)};function W(t,r){if(rr(r),t=w(t,r<0?0:V(r)|0),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}u.allocUnsafe=function(t){return W(null,t)};u.allocUnsafeSlow=function(t){return W(null,t)};function Jr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=er(r,e)|0;t=w(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function Y(t,r){var e=r.length<0?0:V(r.length)|0;t=w(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function qr(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),u.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=u.prototype):t=Y(t,r),t}function $r(t,r){if(T(r)){var e=V(r.length)|0;return t=w(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||he(r.length)?w(t,0):Y(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return Y(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function V(t){if(t>=B())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B().toString(16)+" bytes");return t|0}u.isBuffer=be;function T(t){return!!(t!=null&&t._isBuffer)}u.compare=function(r,e){if(!T(r)||!T(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,a=0,o=Math.min(n,i);a<o;++a)if(r[a]!==e[a]){n=r[a],i=e[a];break}return n<i?-1:i<n?1:0};u.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};u.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return u.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=u.allocUnsafe(e),a=0;for(n=0;n<r.length;++n){var o=r[n];if(!T(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function er(t,r){if(T(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return sr(t).length;default:if(n)return D(t).length;r=(""+r).toLowerCase(),n=!0}}u.byteLength=er;function Zr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return ue(this,r,e);case"utf8":case"utf-8":return ir(this,r,e);case"ascii":return ae(this,r,e);case"latin1":case"binary":return oe(this,r,e);case"base64":return ne(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function k(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}u.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)k(this,e,e+1);return this};u.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)k(this,e,e+3),k(this,e+1,e+2);return this};u.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)k(this,e,e+7),k(this,e+1,e+6),k(this,e+2,e+5),k(this,e+3,e+4);return this};u.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?ir(this,0,r):Zr.apply(this,arguments)};u.prototype.equals=function(r){if(!T(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:u.compare(this,r)===0};u.prototype.compare=function(r,e,n,i,a){if(!T(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===r)return 0;for(var o=a-i,s=n-e,c=Math.min(o,s),f=this.slice(i,a),m=r.slice(e,n),p=0;p<c;++p)if(f[p]!==m[p]){o=f[p],s=m[p];break}return o<s?-1:s<o?1:0};function tr(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=u.from(r,n)),T(r))return r.length===0?-1:$(t,r,e,n,i);if(typeof r=="number")return r=r&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):$(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function $(t,r,e,n,i){var a=1,o=t.length,s=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,o/=2,s/=2,e/=2}function c(d,N){return a===1?d[N]:d.readUInt16BE(N*a)}var f;if(i){var m=-1;for(f=e;f<o;f++)if(c(t,f)===c(r,m===-1?0:f-m)){if(m===-1&&(m=f),f-m+1===s)return m*a}else m!==-1&&(f-=f-m),m=-1}else for(e+s>o&&(e=o-s),f=e;f>=0;f--){for(var p=!0,E=0;E<s;E++)if(c(t,f+E)!==c(r,E)){p=!1;break}if(p)return f}return-1}u.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};u.prototype.indexOf=function(r,e,n){return tr(this,r,e,n,!0)};u.prototype.lastIndexOf=function(r,e,n){return tr(this,r,e,n,!1)};function Qr(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(r.substr(o*2,2),16);if(isNaN(s))return o;t[e+o]=s}return o}function jr(t,r,e,n){return U(D(r,t.length-e),t,e,n)}function nr(t,r,e,n){return U(me(r),t,e,n)}function re(t,r,e,n){return nr(t,r,e,n)}function ee(t,r,e,n){return U(sr(r),t,e,n)}function te(t,r,e,n){return U(ge(r,t.length-e),t,e,n)}u.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-e;if((n===void 0||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return Qr(this,r,e,n);case"utf8":case"utf-8":return jr(this,r,e,n);case"ascii":return nr(this,r,e,n);case"latin1":case"binary":return re(this,r,e,n);case"base64":return ee(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,r,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(t,r,e){return r===0&&e===t.length?q(t):q(t.slice(r,e))}function ir(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var a=t[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=e){var c,f,m,p;switch(s){case 1:a<128&&(o=a);break;case 2:c=t[i+1],(c&192)===128&&(p=(a&31)<<6|c&63,p>127&&(o=p));break;case 3:c=t[i+1],f=t[i+2],(c&192)===128&&(f&192)===128&&(p=(a&15)<<12|(c&63)<<6|f&63,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:c=t[i+1],f=t[i+2],m=t[i+3],(c&192)===128&&(f&192)===128&&(m&192)===128&&(p=(a&15)<<18|(c&63)<<12|(f&63)<<6|m&63,p>65535&&p<1114112&&(o=p))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return ie(n)}var Z=4096;function ie(t){var r=t.length;if(r<=Z)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return e}function ae(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function oe(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function ue(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=r;a<e;++a)i+=fe(t[a]);return i}function se(t,r,e){for(var n=t.slice(r,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}u.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(u.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=u.prototype;else{var a=e-r;i=new u(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+r]}return i};function g(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return i};u.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i};u.prototype.readUInt8=function(r,e){return e||g(r,1,this.length),this[r]};u.prototype.readUInt16LE=function(r,e){return e||g(r,2,this.length),this[r]|this[r+1]<<8};u.prototype.readUInt16BE=function(r,e){return e||g(r,2,this.length),this[r]<<8|this[r+1]};u.prototype.readUInt32LE=function(r,e){return e||g(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};u.prototype.readUInt32BE=function(r,e){return e||g(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};u.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};u.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=e,a=1,o=this[r+--i];i>0&&(a*=256);)o+=this[r+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*e)),o};u.prototype.readInt8=function(r,e){return e||g(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};u.prototype.readInt16LE=function(r,e){e||g(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(r,e){e||g(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(r,e){return e||g(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};u.prototype.readInt32BE=function(r,e){return e||g(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};u.prototype.readFloatLE=function(r,e){return e||g(r,4,this.length),L(this,r,!0,23,4)};u.prototype.readFloatBE=function(r,e){return e||g(r,4,this.length),L(this,r,!1,23,4)};u.prototype.readDoubleLE=function(r,e){return e||g(r,8,this.length),L(this,r,!0,52,8)};u.prototype.readDoubleBE=function(r,e){return e||g(r,8,this.length),L(this,r,!1,52,8)};function b(t,r,e,n,i,a){if(!T(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;b(this,r,e,n,a,0)}var o=1,s=0;for(this[e]=r&255;++s<n&&(o*=256);)this[e+s]=r/o&255;return e+n};u.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;b(this,r,e,n,a,0)}var o=n-1,s=1;for(this[e+o]=r&255;--o>=0&&(s*=256);)this[e+o]=r/s&255;return e+n};u.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function O(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,a=Math.min(t.length-e,2);i<a;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}u.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):O(this,r,e,!0),e+2};u.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):O(this,r,e,!1),e+2};function M(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,a=Math.min(t.length-e,4);i<a;++i)t[e+i]=r>>>(n?i:3-i)*8&255}u.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):M(this,r,e,!0),e+4};u.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};u.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);b(this,r,e,n,a-1,-a)}var o=0,s=1,c=0;for(this[e]=r&255;++o<n&&(s*=256);)r<0&&c===0&&this[e+o-1]!==0&&(c=1),this[e+o]=(r/s>>0)-c&255;return e+n};u.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);b(this,r,e,n,a-1,-a)}var o=n-1,s=1,c=0;for(this[e+o]=r&255;--o>=0&&(s*=256);)r<0&&c===0&&this[e+o+1]!==0&&(c=1),this[e+o]=(r/s>>0)-c&255;return e+n};u.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};u.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):O(this,r,e,!0),e+2};u.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):O(this,r,e,!1),e+2};u.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):M(this,r,e,!0),e+4};u.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};function ar(t,r,e,n,i,a){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function or(t,r,e,n,i){return i||ar(t,r,e,4,34028234663852886e22,-34028234663852886e22),cr(t,r,e,n,23,4),e+4}u.prototype.writeFloatLE=function(r,e,n){return or(this,r,e,!0,n)};u.prototype.writeFloatBE=function(r,e,n){return or(this,r,e,!1,n)};function ur(t,r,e,n,i){return i||ar(t,r,e,8,17976931348623157e292,-17976931348623157e292),cr(t,r,e,n,52,8),e+8}u.prototype.writeDoubleLE=function(r,e,n){return ur(this,r,e,!0,n)};u.prototype.writeDoubleBE=function(r,e,n){return ur(this,r,e,!1,n)};u.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var a=i-n,o;if(this===r&&n<e&&e<i)for(o=a-1;o>=0;--o)r[o+e]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)r[o+e]=this[o+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};u.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var o;if(typeof r=="number")for(o=e;o<n;++o)this[o]=r;else{var s=T(r)?r:D(new u(r,i).toString()),c=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%c]}return this};var le=/[^+\/0-9A-Za-z-_]/g;function ce(t){if(t=pe(t).replace(le,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function pe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function fe(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,r){r=r||1/0;for(var e,n=t.length,i=null,a=[],o=0;o<n;++o){if(e=t.charCodeAt(o),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(r-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function me(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function ge(t,r){for(var e,n,i,a=[],o=0;o<t.length&&!((r-=2)<0);++o)e=t.charCodeAt(o),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function sr(t){return Kr(ce(t))}function U(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function he(t){return t!==t}function be(t){return t!=null&&(!!t._isBuffer||lr(t)||de(t))}function lr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function de(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&lr(t.slice(0,0))}function L(t,r,e,n,i){var a,o,s=i*8-n-1,c=(1<<s)-1,f=c>>1,m=-7,p=e?i-1:0,E=e?-1:1,d=t[r+p];for(p+=E,a=d&(1<<-m)-1,d>>=-m,m+=s;m>0;a=a*256+t[r+p],p+=E,m-=8);for(o=a&(1<<-m)-1,a>>=-m,m+=n;m>0;o=o*256+t[r+p],p+=E,m-=8);if(a===0)a=1-f;else{if(a===c)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-f}return(d?-1:1)*o*Math.pow(2,a-n)}function cr(t,r,e,n,i,a){var o,s,c,f=a*8-i-1,m=(1<<f)-1,p=m>>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,N=n?1:-1,hr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,o=m):(o=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+p>=1?r+=E/c:r+=E*Math.pow(2,1-p),r*c>=2&&(o++,c/=2),o+p>=m?(s=0,o=m):o+p>=1?(s=(r*c-1)*Math.pow(2,i),o=o+p):(s=r*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;t[e+d]=s&255,d+=N,s/=256,i-=8);for(o=o<<i|s,f+=i;f>0;t[e+d]=o&255,d+=N,o/=256,f-=8);t[e+d-N]|=hr*128}var xe=(l=>(l.ENABLED="company.enabled",l.APP_TITLE="company.appTitle",l.DOMAIN="company.domain",l.LOGO="appearance.logo",l.AMM="product.amm",l.OBDEX="product.obdex",l.THEMES="appearance.themes",l.DIRECT_SETTLE="company.directSettlement",l.AMM_FEE="company.ammFee",l.FEE_SHARE="company.feeShare",l.MIN_FEE="company.minFee",l.MAKER_FEE="company.makerFee",l.TAKER_FEE="company.takerFee",l.GEOBLOCK="company.geoblock",l.EMBEDDED_APP_URL="company.embeddedAppUrl",l.PRODUCT_OBDEX="product.obdex",l.PRODUCT_AMM="product.amm",l.NEW_TAB="appearance.newTab",l.APPEARANCE_TARGET="appearance.target",l.CUSTOM_MENU_ITEMS="appearance.customMenuItems",l.REPORT_BUTTONS="appearance.reportButtons",l.APPEARANCE_CHART_TYPE="appearance.chartType",l.APPEARANCE_CHART_INT="appearance.chartInt",l.PINNED_PAIRS="markets.pinnedPairs",l.KYC_TRADE_REQUIREMENT_ENABLED="markets.kycTradeRequirementEnabled",l.FORCE_SETTING_FLAG="company.forceSetting",l.AFFILIATE_DASHBOARD_VISIBILITY="product.affiliateDashboardVisibility",l.AFFILIATE_DASHBOARD_THRESHOLD="product.affiliateDashboardThreshold",l.AFFILIATE_DEFAULT_FEE_SHARE="product.affiliateDefaultFeeShare",l.AFFILIATE_POINTS_REWARD="product.affiliatePointsReward",l.POINT_SYSTEM_MODE="product.pointSystem",l.POINT_SYSTEM_TELEGRAM_API_TOKEN="point-system.telegramApiToken",l.POINT_SYSTEM_TELEGRAM_ENABLED="point-system.telegramEnabled",l.POINT_SYSTEM_TELEGRAM_GROUP_ID="point-system.telegramGroupId",l.POINT_SYSTEM_TELEGRAM_BOT_NAME="point-system.telegramBotName",l.POINT_SYSTEM_TELEGRAM_BOT_ID="point-system.telegramBotId",l.POINT_SYSTEM_TELEGRAM_GROUP_NAME="point-system.telegramGroupName",l.POINT_SYSTEM_TELEGRAM_WEBHOOK_TOKEN="point-system.telegramWebhookToken",l.POINT_SYSTEM_DISCORD_CLIENT_ID="point-system.discordClientId",l.POINT_SYSTEM_DISCORD_CLIENT_SECRET="point-system.discordClientSecret",l.POINT_SYSTEM_DISCORD_SERVER_ID="point-system.discordServerId",l.POINT_SYSTEM_DISCORD_ENABLED="point-system.discordEnabled",l.POINT_SYSTEM_TWITTER_CLIENT_ID="point-system.twitterClientId",l.POINT_SYSTEM_TWITTER_CLIENT_SECRET="point-system.twitterClientSecret",l.POINT_SYSTEM_TWITTER_BEARER_TOKEN="point-system.twitterBearerToken",l.POINT_SYSTEM_TWITTER_REFRESH_TOKEN="point-system.twitterRefreshToken",l.POINT_SYSTEM_TWITTER_ENABLED="point-system.twitterEnabled",l.POINT_SYSTEM_TWITTER_JOB_ENABLED="point-system.twitterJobEnabled",l.POINT_SYSTEM_TWITTER_HASHTAGS="point-system.twitterHashtags",l.POINT_SYSTEM_TWITTER_TWEET_EXP_TIME="point-system.twitterPostDefaultExpirationTime",l.POINT_SYSTEM_TWITTER_ACCOUNT_NAME="point-system.twitterAccountName",l.POINT_SYSTEM_TWITTER_ACCOUNT_ID="point-system.twitterAccountId",l.POINT_SYSTEM_TWITTER_WEBHOOK_TOKEN="point-system.twitterWebhookToken",l.POINT_SYSTEM_GUIDE_LINK="point-system.guideLink",l))(xe||{}),Ee=(n=>(n.DISABLED="disabled",n.ENABLED_FOR_ALL="enabled for all",n.ENABLED_FOR_AFFILIATES="enabled for affiliates",n))(Ee||{}),_e=(o=>(o.API_TOKEN="apiToken",o.CLIENT_ID="clientId",o.CLIENT_SECRET="clientSecret",o.BEARER_TOKEN="bearerToken",o.REFRESH_TOKEN="refreshToken",o.ACCESS_TOKEN="accessToken",o))(_e||{}),Ve={"point-system.telegramApiToken":"apiToken","point-system.discordClientId":"clientId","point-system.discordClientSecret":"clientSecret","point-system.twitterClientSecret":"clientSecret","point-system.twitterClientId":"clientId","point-system.twitterBearerToken":"bearerToken","point-system.twitterRefreshToken":"refreshToken"},He=["primary-1","primary-2","main-background","primary-text","module-background","buy-text","buy-background","sell-text","sell-background","secondary-text","input-background-default","input-background-hover","input-background-disabled","input-border-default","module-border","button-disabled","button-border","input-border-active","active-element-default","hover-element-default","dropdown-shadow","button-text","pair-active-row"],Ke=`{"theme1":{"value":"${h.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`,Ge='{"theme1":{"name":"dark","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(1, 1, 1, 1)","primary-text":"rgba(255, 255, 255, 1)","module-background":"rgba(19, 23, 34, 1)","buy-text":"rgba(82, 164, 154, 1)","buy-background":"rgba(2, 199, 122, 0.25)","sell-text":"rgba(221, 94, 86, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","input-background-default":"rgba(13, 15, 21, 1)","input-background-hover":"rgba(28, 33, 45, 1)","input-background-disabled":"rgba(25, 29, 41, 1)","input-border-default":"rgba(28, 33, 45, 1)","module-border":"rgba(28, 33, 45, 1)","button-disabled":"rgba(111, 113, 118, 1)","button-border":"rgba(255, 255, 255, 1)","input-border-active":"rgba(185, 163, 238, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgba(28, 33, 45, 1)"}},"theme2":{"name":"light","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(249, 248, 248, 1)","primary-text":"rgba(0, 0, 0, 1)","module-background":"rgba(255, 255, 255, 1)","buy-text":"rgba(0, 112, 98, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-text":"rgba(195, 12, 1, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","button-disabled":"rgba(203, 199, 199, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(249, 248, 248, 1)","input-border-default":"rgba(228, 225, 225, 1)","module-border":"rgba(228, 225, 225, 1)","button-border":"rgba(170, 167, 167, 1)","input-border-active":"rgba(0, 0, 0, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}},"theme3":{"name":"purple","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(255, 255, 255, 1)","primary-text":"rgba(0, 0, 0, 1)","secondary-text":"rgba(127, 127, 127, 1)","buy-text":"rgba(0, 112, 98, 1)","sell-text":"rgba(195, 12, 1, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-background":"rgba(255, 59, 105, 0.25)","module-background":"rgba(254, 250, 255, 1)","module-border":"rgba(228, 225, 225, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(254, 250, 255, 1)","input-border-default":"rgba(228, 225, 225, 1)","input-border-active":"rgba(0, 0, 0, 1)","button-border":"rgba(170, 167, 167, 1)","button-disabled":"rgba(203, 199, 199, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}}',Te=(n=>(n.theme1='{"name":"dark","id":"theme1","active":true, "chartColors":{"bullish_candle_color": "rgba(2, 199, 122, 0.25)","bearish_candle_color": "rgba(221, 94, 86, 1)","bullish_wick_color": "rgba(2, 199, 122, 0.25)","bearish_wick_color": "rgba(221, 94, 86, 1)","bullish_outline_color": "rgba(2, 199, 122, 0.25)","bearish_outline_color": "rgba(221, 94, 86, 1)","line_color": "rgba(41, 98, 255, 1)","chart_background": "rgba(19, 23, 34, 1)","chart_text": "rgba(127, 127, 127, 1)"}, "colors":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(1, 1, 1, 1)","primary-text":"rgba(255, 255, 255, 1)","module-background":"rgba(19, 23, 34, 1)","buy-text":"rgba(82, 164, 154, 1)","buy-background":"rgba(2, 199, 122, 0.25)","sell-text":"rgba(221, 94, 86, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","input-background-default":"rgba(13, 15, 21, 1)","input-background-hover":"rgba(28, 33, 45, 1)","input-background-disabled":"rgba(25, 29, 41, 1)","input-border-default":"rgba(28, 33, 45, 1)","module-border":"rgba(28, 33, 45, 1)","button-disabled":"rgba(111, 113, 118, 1)","button-border":"rgba(255, 255, 255, 1)","input-border-active":"rgba(185, 163, 238, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgba(28, 33, 45, 1)"}}',n.theme2='{"name":"light","id":"theme2","active":true, "chartColors":{"bullish_candle_color": "rgba(0, 112, 98, 1)","bearish_candle_color": "rgba(195, 12, 1, 1)","bullish_wick_color": "rgba(0, 112, 98, 1)","bearish_wick_color": "rgba(195, 12, 1, 1)","bullish_outline_color": "rgba(0, 112, 98, 1)","bearish_outline_color": "rgba(195, 12, 1, 1)","line_color": "rgba(41, 98, 255, 1)","chart_background": "rgba(255, 255, 255, 1)","chart_text": "rgba(127, 127, 127, 1)"}, "colors":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(249, 248, 248, 1)","primary-text":"rgba(0, 0, 0, 1)","module-background":"rgba(255, 255, 255, 1)","buy-text":"rgba(0, 112, 98, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-text":"rgba(195, 12, 1, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","button-disabled":"rgba(203, 199, 199, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(249, 248, 248, 1)","input-border-default":"rgba(228, 225, 225, 1)","module-border":"rgba(228, 225, 225, 1)","button-border":"rgba(170, 167, 167, 1)","input-border-active":"rgba(0, 0, 0, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}',n.theme3='{"name":"purple","id":"theme3","active":true, "chartColors":{"bullish_candle_color": "rgba(0, 112, 98, 1)","bearish_candle_color": "rgba(195, 12, 1, 1)","bullish_wick_color": "rgba(0, 112, 98, 1)","bearish_wick_color": "rgba(195, 12, 1, 1)","bullish_outline_color": "rgba(0, 112, 98, 1)","bearish_outline_color": "rgba(195, 12, 1, 1)","line_color": "rgba(41, 98, 255, 1)","chart_background": "rgba(254, 250, 255, 1)","chart_text": "rgba(127, 127, 127, 1)"}, "colors":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(255, 255, 255, 1)","primary-text":"rgba(0, 0, 0, 1)","secondary-text":"rgba(127, 127, 127, 1)","buy-text":"rgba(0, 112, 98, 1)","sell-text":"rgba(195, 12, 1, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-background":"rgba(255, 59, 105, 0.25)","module-background":"rgba(254, 250, 255, 1)","module-border":"rgba(228, 225, 225, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(254, 250, 255, 1)","input-border-default":"rgba(228, 225, 225, 1)","input-border-active":"rgba(0, 0, 0, 1)","button-border":"rgba(170, 167, 167, 1)","button-disabled":"rgba(203, 199, 199, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}',n))(Te||{});var ye=(a=>(a.STABLE="stable",a.CPMM="constant_product",a.LEND="lending",a.NANO="nano",a.MVNANO="mvnano",a))(ye||{}),we=(a=>(a[a.ultrade=0]="ultrade",a[a.tinyman=1]="tinyman",a[a.pactfi=2]="pactfi",a[a.humble=3]="humble",a[a.algofi=4]="algofi",a))(we||{}),Ae=(a=>(a.ultrade="U",a.tinyman="T",a.pactfi="P",a.humble="H",a.algofi="A",a))(Ae||{}),Re=(a=>(a[a.ultrade=1]="ultrade",a[a.tinyman=2]="tinyman",a[a.pactfi=1]="pactfi",a[a.humble=1]="humble",a[a.algofi=2]="algofi",a))(Re||{}),pr={V1_1:"v1_1",V2:"v2"},qe={[pr.V1_1]:{testnet:62368684,mainnet:552635992},[pr.V2]:{testnet:148607e3,mainnet:1002541853}},Ie=(e=>(e.ASSETS="assets.json",e.TOP_ASSETS="topAssets.json",e))(Ie||{});var ve=(i=>(i.last_7_days="last_7_days",i.last_30_days="last_30_days",i.last_90_days="last_90_days",i.last_year="last_year",i))(ve||{}),fr=class{constructor(){this.timeRange="last_30_days";this.sortBy="volume_usd";this.order="desc";this.limit=20;this.page=1}},mr=class{constructor(){this.timeRange="last_30_days";this.sortBy="volume_usd";this.order="desc";this.limit=20;this.page=1}},ke=(i=>(i.volume="volume",i.fees="fees",i.orders="orders",i.dau="dau",i))(ke||{}),gr=class{constructor(){this.type="volume";this.timeRange="last_7_days"}};var Ne=(a=>(a.PREPARING="provisioning",a.STOPPING="stopping",a.RUNNING="running",a.STOPPED="stopped",a.FAILED="failed",a))(Ne||{});export{Ee as AffDashboardVisibilitySettingEnum,Ie as AmmBucketKeys,Ae as AmmChars,Re as AmmForeignResources,we as AmmIds,pr as CONTRACT_VERSION,gr as ChartQueryDto,_e as CredentialNameEnum,Ne as HummingbotInstanceStatus,fr as PairsQueryDto,ye as PoolType,xe as SettingIds,ve as SmallTimeframeEnum,ke as StatisticTypeQuery,mr as UsersQueryDto,qe as VALIDATOR_APP_ID,Ke as defaultLogoSettingValue,Ge as defaultThemeSettingValue,Te as defaultThemesValue,He as requiredColors,Ve as settingIdToSecretType};
1
+ function G(){throw new Error("setTimeout has not been defined")}function H(){throw new Error("clearTimeout has not been defined")}var A=G,R=H;typeof globalThis.setTimeout=="function"&&(A=setTimeout);typeof globalThis.clearTimeout=="function"&&(R=clearTimeout);function z(t){if(A===setTimeout)return setTimeout(t,0);if((A===G||!A)&&setTimeout)return A=setTimeout,setTimeout(t,0);try{return A(t,0)}catch{try{return A.call(null,t,0)}catch{return A.call(this,t,0)}}}function br(t){if(R===clearTimeout)return clearTimeout(t);if((R===H||!R)&&clearTimeout)return R=clearTimeout,clearTimeout(t);try{return R(t)}catch{try{return R.call(null,t)}catch{return R.call(this,t)}}}var y=[],S=!1,I,C=-1;function dr(){!S||!I||(S=!1,I.length?y=I.concat(y):C=-1,y.length&&X())}function X(){if(!S){var t=z(dr);S=!0;for(var r=y.length;r;){for(I=y,y=[];++C<r;)I&&I[C].run();C=-1,r=y.length}I=null,S=!1,br(t)}}function xr(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];y.push(new J(t,r)),y.length===1&&!S&&z(X)}function J(t,r){this.fun=t,this.array=r}J.prototype.run=function(){this.fun.apply(null,this.array)};var Er="browser",_r="browser",Tr=!0,yr={},wr=[],Ar="",Rr={},Ir={},vr={};function v(){}var kr=v,Nr=v,Pr=v,Sr=v,Cr=v,Br=v,Dr=v;function Or(t){throw new Error("process.binding is not supported")}function Mr(){return"/"}function Ur(t){throw new Error("process.chdir is not supported")}function Lr(){return 0}var P=globalThis.performance||{},Yr=P.now||P.mozNow||P.msNow||P.oNow||P.webkitNow||function(){return new Date().getTime()};function Fr(t){var r=Yr.call(P)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}var Wr=new Date;function Vr(){var t=new Date,r=t-Wr;return r/1e3}var h={nextTick:xr,title:Er,browser:Tr,env:yr,argv:wr,version:Ar,versions:Rr,on:kr,addListener:Nr,once:Pr,off:Sr,removeListener:Cr,removeAllListeners:Br,emit:Dr,binding:Or,cwd:Mr,chdir:Ur,umask:Lr,hrtime:Fr,platform:_r,release:Ir,config:vr,uptime:Vr},K={};Object.keys(K).forEach(t=>{let r=t.split("."),e=h;for(let n=0;n<r.length;n++){let i=r[n];n===r.length-1?e[i]=K[t]:e=e[i]||(e[i]={})}});var _=[],x=[],Kr=typeof Uint8Array<"u"?Uint8Array:Array,F=!1;function Q(){F=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)_[r]=t[r],x[t.charCodeAt(r)]=r;x[45]=62,x[95]=63}function Gr(t){F||Q();var r,e,n,i,a,o,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[s-2]==="="?2:t[s-1]==="="?1:0,o=new Kr(s*3/4-a),n=a>0?s-4:s;var c=0;for(r=0,e=0;r<n;r+=4,e+=3)i=x[t.charCodeAt(r)]<<18|x[t.charCodeAt(r+1)]<<12|x[t.charCodeAt(r+2)]<<6|x[t.charCodeAt(r+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=i&255;return a===2?(i=x[t.charCodeAt(r)]<<2|x[t.charCodeAt(r+1)]>>4,o[c++]=i&255):a===1&&(i=x[t.charCodeAt(r)]<<10|x[t.charCodeAt(r+1)]<<4|x[t.charCodeAt(r+2)]>>2,o[c++]=i>>8&255,o[c++]=i&255),o}function Hr(t){return _[t>>18&63]+_[t>>12&63]+_[t>>6&63]+_[t&63]}function zr(t,r,e){for(var n,i=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Hr(n));return i.join("")}function q(t){F||Q();for(var r,e=t.length,n=e%3,i="",a=[],o=16383,s=0,c=e-n;s<c;s+=o)a.push(zr(t,s,s+o>c?c:s+o));return n===1?(r=t[e-1],i+=_[r>>2],i+=_[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=_[r>>10],i+=_[r>>4&63],i+=_[r<<2&63],i+="="),a.push(i),a.join("")}u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function B(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(t,r){if(B()<r)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=u.prototype):(t===null&&(t=new u(r)),t.length=r),t}function u(t,r,e){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return W(this,t)}return j(this,t,r,e)}u.poolSize=8192;u._augment=function(t){return t.__proto__=u.prototype,t};function j(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?qr(t,r,e,n):typeof r=="string"?Jr(t,r,e):$r(t,r)}u.from=function(t,r,e){return j(null,t,r,e)};u.kMaxLength=B();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&u[Symbol.species]);function rr(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Xr(t,r,e,n){return rr(r),r<=0?w(t,r):e!==void 0?typeof n=="string"?w(t,r).fill(e,n):w(t,r).fill(e):w(t,r)}u.alloc=function(t,r,e){return Xr(null,t,r,e)};function W(t,r){if(rr(r),t=w(t,r<0?0:V(r)|0),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}u.allocUnsafe=function(t){return W(null,t)};u.allocUnsafeSlow=function(t){return W(null,t)};function Jr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=er(r,e)|0;t=w(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function Y(t,r){var e=r.length<0?0:V(r.length)|0;t=w(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function qr(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),u.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=u.prototype):t=Y(t,r),t}function $r(t,r){if(T(r)){var e=V(r.length)|0;return t=w(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||he(r.length)?w(t,0):Y(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return Y(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function V(t){if(t>=B())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B().toString(16)+" bytes");return t|0}u.isBuffer=be;function T(t){return!!(t!=null&&t._isBuffer)}u.compare=function(r,e){if(!T(r)||!T(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,a=0,o=Math.min(n,i);a<o;++a)if(r[a]!==e[a]){n=r[a],i=e[a];break}return n<i?-1:i<n?1:0};u.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};u.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return u.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=u.allocUnsafe(e),a=0;for(n=0;n<r.length;++n){var o=r[n];if(!T(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function er(t,r){if(T(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return sr(t).length;default:if(n)return D(t).length;r=(""+r).toLowerCase(),n=!0}}u.byteLength=er;function Zr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return ue(this,r,e);case"utf8":case"utf-8":return ir(this,r,e);case"ascii":return ae(this,r,e);case"latin1":case"binary":return oe(this,r,e);case"base64":return ne(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function k(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}u.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)k(this,e,e+1);return this};u.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)k(this,e,e+3),k(this,e+1,e+2);return this};u.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)k(this,e,e+7),k(this,e+1,e+6),k(this,e+2,e+5),k(this,e+3,e+4);return this};u.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?ir(this,0,r):Zr.apply(this,arguments)};u.prototype.equals=function(r){if(!T(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:u.compare(this,r)===0};u.prototype.compare=function(r,e,n,i,a){if(!T(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===r)return 0;for(var o=a-i,s=n-e,c=Math.min(o,s),f=this.slice(i,a),m=r.slice(e,n),p=0;p<c;++p)if(f[p]!==m[p]){o=f[p],s=m[p];break}return o<s?-1:s<o?1:0};function tr(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=u.from(r,n)),T(r))return r.length===0?-1:$(t,r,e,n,i);if(typeof r=="number")return r=r&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):$(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function $(t,r,e,n,i){var a=1,o=t.length,s=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,o/=2,s/=2,e/=2}function c(d,N){return a===1?d[N]:d.readUInt16BE(N*a)}var f;if(i){var m=-1;for(f=e;f<o;f++)if(c(t,f)===c(r,m===-1?0:f-m)){if(m===-1&&(m=f),f-m+1===s)return m*a}else m!==-1&&(f-=f-m),m=-1}else for(e+s>o&&(e=o-s),f=e;f>=0;f--){for(var p=!0,E=0;E<s;E++)if(c(t,f+E)!==c(r,E)){p=!1;break}if(p)return f}return-1}u.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};u.prototype.indexOf=function(r,e,n){return tr(this,r,e,n,!0)};u.prototype.lastIndexOf=function(r,e,n){return tr(this,r,e,n,!1)};function Qr(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(r.substr(o*2,2),16);if(isNaN(s))return o;t[e+o]=s}return o}function jr(t,r,e,n){return U(D(r,t.length-e),t,e,n)}function nr(t,r,e,n){return U(me(r),t,e,n)}function re(t,r,e,n){return nr(t,r,e,n)}function ee(t,r,e,n){return U(sr(r),t,e,n)}function te(t,r,e,n){return U(ge(r,t.length-e),t,e,n)}u.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-e;if((n===void 0||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return Qr(this,r,e,n);case"utf8":case"utf-8":return jr(this,r,e,n);case"ascii":return nr(this,r,e,n);case"latin1":case"binary":return re(this,r,e,n);case"base64":return ee(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,r,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(t,r,e){return r===0&&e===t.length?q(t):q(t.slice(r,e))}function ir(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var a=t[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=e){var c,f,m,p;switch(s){case 1:a<128&&(o=a);break;case 2:c=t[i+1],(c&192)===128&&(p=(a&31)<<6|c&63,p>127&&(o=p));break;case 3:c=t[i+1],f=t[i+2],(c&192)===128&&(f&192)===128&&(p=(a&15)<<12|(c&63)<<6|f&63,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:c=t[i+1],f=t[i+2],m=t[i+3],(c&192)===128&&(f&192)===128&&(m&192)===128&&(p=(a&15)<<18|(c&63)<<12|(f&63)<<6|m&63,p>65535&&p<1114112&&(o=p))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return ie(n)}var Z=4096;function ie(t){var r=t.length;if(r<=Z)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return e}function ae(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function oe(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function ue(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=r;a<e;++a)i+=fe(t[a]);return i}function se(t,r,e){for(var n=t.slice(r,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}u.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(u.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=u.prototype;else{var a=e-r;i=new u(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+r]}return i};function g(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return i};u.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i};u.prototype.readUInt8=function(r,e){return e||g(r,1,this.length),this[r]};u.prototype.readUInt16LE=function(r,e){return e||g(r,2,this.length),this[r]|this[r+1]<<8};u.prototype.readUInt16BE=function(r,e){return e||g(r,2,this.length),this[r]<<8|this[r+1]};u.prototype.readUInt32LE=function(r,e){return e||g(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};u.prototype.readUInt32BE=function(r,e){return e||g(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};u.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};u.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||g(r,e,this.length);for(var i=e,a=1,o=this[r+--i];i>0&&(a*=256);)o+=this[r+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*e)),o};u.prototype.readInt8=function(r,e){return e||g(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};u.prototype.readInt16LE=function(r,e){e||g(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(r,e){e||g(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(r,e){return e||g(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};u.prototype.readInt32BE=function(r,e){return e||g(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};u.prototype.readFloatLE=function(r,e){return e||g(r,4,this.length),L(this,r,!0,23,4)};u.prototype.readFloatBE=function(r,e){return e||g(r,4,this.length),L(this,r,!1,23,4)};u.prototype.readDoubleLE=function(r,e){return e||g(r,8,this.length),L(this,r,!0,52,8)};u.prototype.readDoubleBE=function(r,e){return e||g(r,8,this.length),L(this,r,!1,52,8)};function b(t,r,e,n,i,a){if(!T(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;b(this,r,e,n,a,0)}var o=1,s=0;for(this[e]=r&255;++s<n&&(o*=256);)this[e+s]=r/o&255;return e+n};u.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;b(this,r,e,n,a,0)}var o=n-1,s=1;for(this[e+o]=r&255;--o>=0&&(s*=256);)this[e+o]=r/s&255;return e+n};u.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function O(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,a=Math.min(t.length-e,2);i<a;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}u.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):O(this,r,e,!0),e+2};u.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):O(this,r,e,!1),e+2};function M(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,a=Math.min(t.length-e,4);i<a;++i)t[e+i]=r>>>(n?i:3-i)*8&255}u.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):M(this,r,e,!0),e+4};u.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};u.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);b(this,r,e,n,a-1,-a)}var o=0,s=1,c=0;for(this[e]=r&255;++o<n&&(s*=256);)r<0&&c===0&&this[e+o-1]!==0&&(c=1),this[e+o]=(r/s>>0)-c&255;return e+n};u.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);b(this,r,e,n,a-1,-a)}var o=n-1,s=1,c=0;for(this[e+o]=r&255;--o>=0&&(s*=256);)r<0&&c===0&&this[e+o+1]!==0&&(c=1),this[e+o]=(r/s>>0)-c&255;return e+n};u.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};u.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):O(this,r,e,!0),e+2};u.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):O(this,r,e,!1),e+2};u.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):M(this,r,e,!0),e+4};u.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||b(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};function ar(t,r,e,n,i,a){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function or(t,r,e,n,i){return i||ar(t,r,e,4,34028234663852886e22,-34028234663852886e22),cr(t,r,e,n,23,4),e+4}u.prototype.writeFloatLE=function(r,e,n){return or(this,r,e,!0,n)};u.prototype.writeFloatBE=function(r,e,n){return or(this,r,e,!1,n)};function ur(t,r,e,n,i){return i||ar(t,r,e,8,17976931348623157e292,-17976931348623157e292),cr(t,r,e,n,52,8),e+8}u.prototype.writeDoubleLE=function(r,e,n){return ur(this,r,e,!0,n)};u.prototype.writeDoubleBE=function(r,e,n){return ur(this,r,e,!1,n)};u.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var a=i-n,o;if(this===r&&n<e&&e<i)for(o=a-1;o>=0;--o)r[o+e]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)r[o+e]=this[o+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};u.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var o;if(typeof r=="number")for(o=e;o<n;++o)this[o]=r;else{var s=T(r)?r:D(new u(r,i).toString()),c=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%c]}return this};var le=/[^+\/0-9A-Za-z-_]/g;function ce(t){if(t=pe(t).replace(le,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function pe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function fe(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,r){r=r||1/0;for(var e,n=t.length,i=null,a=[],o=0;o<n;++o){if(e=t.charCodeAt(o),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(r-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function me(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function ge(t,r){for(var e,n,i,a=[],o=0;o<t.length&&!((r-=2)<0);++o)e=t.charCodeAt(o),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function sr(t){return Gr(ce(t))}function U(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function he(t){return t!==t}function be(t){return t!=null&&(!!t._isBuffer||lr(t)||de(t))}function lr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function de(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&lr(t.slice(0,0))}function L(t,r,e,n,i){var a,o,s=i*8-n-1,c=(1<<s)-1,f=c>>1,m=-7,p=e?i-1:0,E=e?-1:1,d=t[r+p];for(p+=E,a=d&(1<<-m)-1,d>>=-m,m+=s;m>0;a=a*256+t[r+p],p+=E,m-=8);for(o=a&(1<<-m)-1,a>>=-m,m+=n;m>0;o=o*256+t[r+p],p+=E,m-=8);if(a===0)a=1-f;else{if(a===c)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-f}return(d?-1:1)*o*Math.pow(2,a-n)}function cr(t,r,e,n,i,a){var o,s,c,f=a*8-i-1,m=(1<<f)-1,p=m>>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,N=n?1:-1,hr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,o=m):(o=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+p>=1?r+=E/c:r+=E*Math.pow(2,1-p),r*c>=2&&(o++,c/=2),o+p>=m?(s=0,o=m):o+p>=1?(s=(r*c-1)*Math.pow(2,i),o=o+p):(s=r*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;t[e+d]=s&255,d+=N,s/=256,i-=8);for(o=o<<i|s,f+=i;f>0;t[e+d]=o&255,d+=N,o/=256,f-=8);t[e+d-N]|=hr*128}var xe=(l=>(l.ENABLED="company.enabled",l.APP_TITLE="company.appTitle",l.DOMAIN="company.domain",l.LOGO="appearance.logo",l.AMM="product.amm",l.OBDEX="product.obdex",l.THEMES="appearance.themes",l.DIRECT_SETTLE="company.directSettlement",l.AMM_FEE="company.ammFee",l.FEE_SHARE="company.feeShare",l.MIN_FEE="company.minFee",l.MAKER_FEE="company.makerFee",l.TAKER_FEE="company.takerFee",l.GEOBLOCK="company.geoblock",l.EMBEDDED_APP_URL="company.embeddedAppUrl",l.PRODUCT_OBDEX="product.obdex",l.PRODUCT_AMM="product.amm",l.NEW_TAB="appearance.newTab",l.APPEARANCE_TARGET="appearance.target",l.CUSTOM_MENU_ITEMS="appearance.customMenuItems",l.REPORT_BUTTONS="appearance.reportButtons",l.APPEARANCE_CHART_TYPE="appearance.chartType",l.APPEARANCE_CHART_INT="appearance.chartInt",l.PINNED_PAIRS="markets.pinnedPairs",l.KYC_TRADE_REQUIREMENT_ENABLED="markets.kycTradeRequirementEnabled",l.FORCE_SETTING_FLAG="company.forceSetting",l.AFFILIATE_DASHBOARD_VISIBILITY="product.affiliateDashboardVisibility",l.AFFILIATE_DASHBOARD_THRESHOLD="product.affiliateDashboardThreshold",l.AFFILIATE_DEFAULT_FEE_SHARE="product.affiliateDefaultFeeShare",l.AFFILIATE_POINTS_REWARD="product.affiliatePointsReward",l.POINT_SYSTEM_MODE="product.pointSystem",l.POINT_SYSTEM_TELEGRAM_API_TOKEN="point-system.telegramApiToken",l.POINT_SYSTEM_TELEGRAM_ENABLED="point-system.telegramEnabled",l.POINT_SYSTEM_TELEGRAM_GROUP_ID="point-system.telegramGroupId",l.POINT_SYSTEM_TELEGRAM_BOT_NAME="point-system.telegramBotName",l.POINT_SYSTEM_TELEGRAM_BOT_ID="point-system.telegramBotId",l.POINT_SYSTEM_TELEGRAM_GROUP_NAME="point-system.telegramGroupName",l.POINT_SYSTEM_TELEGRAM_WEBHOOK_TOKEN="point-system.telegramWebhookToken",l.POINT_SYSTEM_DISCORD_CLIENT_ID="point-system.discordClientId",l.POINT_SYSTEM_DISCORD_CLIENT_SECRET="point-system.discordClientSecret",l.POINT_SYSTEM_DISCORD_SERVER_ID="point-system.discordServerId",l.POINT_SYSTEM_DISCORD_ENABLED="point-system.discordEnabled",l.POINT_SYSTEM_TWITTER_CLIENT_ID="point-system.twitterClientId",l.POINT_SYSTEM_TWITTER_CLIENT_SECRET="point-system.twitterClientSecret",l.POINT_SYSTEM_TWITTER_BEARER_TOKEN="point-system.twitterBearerToken",l.POINT_SYSTEM_TWITTER_REFRESH_TOKEN="point-system.twitterRefreshToken",l.POINT_SYSTEM_TWITTER_ENABLED="point-system.twitterEnabled",l.POINT_SYSTEM_TWITTER_JOB_ENABLED="point-system.twitterJobEnabled",l.POINT_SYSTEM_TWITTER_HASHTAGS="point-system.twitterHashtags",l.POINT_SYSTEM_TWITTER_TWEET_EXP_TIME="point-system.twitterPostDefaultExpirationTime",l.POINT_SYSTEM_TWITTER_ACCOUNT_NAME="point-system.twitterAccountName",l.POINT_SYSTEM_TWITTER_ACCOUNT_ID="point-system.twitterAccountId",l.POINT_SYSTEM_TWITTER_WEBHOOK_TOKEN="point-system.twitterWebhookToken",l.POINT_SYSTEM_GUIDE_LINK="point-system.guideLink",l))(xe||{}),Ee=(n=>(n.DISABLED="disabled",n.ENABLED_FOR_ALL="enabled for all",n.ENABLED_FOR_AFFILIATES="enabled for affiliates",n))(Ee||{}),_e=(o=>(o.API_TOKEN="apiToken",o.CLIENT_ID="clientId",o.CLIENT_SECRET="clientSecret",o.BEARER_TOKEN="bearerToken",o.REFRESH_TOKEN="refreshToken",o.ACCESS_TOKEN="accessToken",o))(_e||{}),Ve={"point-system.telegramApiToken":"apiToken","point-system.discordClientId":"clientId","point-system.discordClientSecret":"clientSecret","point-system.twitterClientSecret":"clientSecret","point-system.twitterClientId":"clientId","point-system.twitterBearerToken":"bearerToken","point-system.twitterRefreshToken":"refreshToken"},Ke=["primary-1","primary-2","main-background","primary-text","module-background","buy-text","buy-background","sell-text","sell-background","secondary-text","input-background-default","input-background-hover","input-background-disabled","input-border-default","module-border","button-disabled","button-border","input-border-active","active-element-default","hover-element-default","dropdown-shadow","button-text","pair-active-row"],Ge=`{"theme1":{"value":"${h.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`,He='{"theme1":{"name":"dark","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(1, 1, 1, 1)","primary-text":"rgba(255, 255, 255, 1)","module-background":"rgba(19, 23, 34, 1)","buy-text":"rgba(82, 164, 154, 1)","buy-background":"rgba(2, 199, 122, 0.25)","sell-text":"rgba(221, 94, 86, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","input-background-default":"rgba(13, 15, 21, 1)","input-background-hover":"rgba(28, 33, 45, 1)","input-background-disabled":"rgba(25, 29, 41, 1)","input-border-default":"rgba(28, 33, 45, 1)","module-border":"rgba(28, 33, 45, 1)","button-disabled":"rgba(111, 113, 118, 1)","button-border":"rgba(255, 255, 255, 1)","input-border-active":"rgba(185, 163, 238, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgba(28, 33, 45, 1)"}},"theme2":{"name":"light","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(249, 248, 248, 1)","primary-text":"rgba(0, 0, 0, 1)","module-background":"rgba(255, 255, 255, 1)","buy-text":"rgba(0, 112, 98, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-text":"rgba(195, 12, 1, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","button-disabled":"rgba(203, 199, 199, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(249, 248, 248, 1)","input-border-default":"rgba(228, 225, 225, 1)","module-border":"rgba(228, 225, 225, 1)","button-border":"rgba(170, 167, 167, 1)","input-border-active":"rgba(0, 0, 0, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}},"theme3":{"name":"purple","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(255, 255, 255, 1)","primary-text":"rgba(0, 0, 0, 1)","secondary-text":"rgba(127, 127, 127, 1)","buy-text":"rgba(0, 112, 98, 1)","sell-text":"rgba(195, 12, 1, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-background":"rgba(255, 59, 105, 0.25)","module-background":"rgba(254, 250, 255, 1)","module-border":"rgba(228, 225, 225, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(254, 250, 255, 1)","input-border-default":"rgba(228, 225, 225, 1)","input-border-active":"rgba(0, 0, 0, 1)","button-border":"rgba(170, 167, 167, 1)","button-disabled":"rgba(203, 199, 199, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}}',Te=(n=>(n.theme1='{"name":"dark","id":"theme1","active":true, "chartColors":{"bullish_candle_color": "rgba(2, 199, 122, 0.25)","bearish_candle_color": "rgba(221, 94, 86, 1)","bullish_wick_color": "rgba(2, 199, 122, 0.25)","bearish_wick_color": "rgba(221, 94, 86, 1)","bullish_outline_color": "rgba(2, 199, 122, 0.25)","bearish_outline_color": "rgba(221, 94, 86, 1)","line_color": "rgba(41, 98, 255, 1)","chart_background": "rgba(19, 23, 34, 1)","chart_text": "rgba(127, 127, 127, 1)"}, "colors":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(1, 1, 1, 1)","primary-text":"rgba(255, 255, 255, 1)","module-background":"rgba(19, 23, 34, 1)","buy-text":"rgba(82, 164, 154, 1)","buy-background":"rgba(2, 199, 122, 0.25)","sell-text":"rgba(221, 94, 86, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","input-background-default":"rgba(13, 15, 21, 1)","input-background-hover":"rgba(28, 33, 45, 1)","input-background-disabled":"rgba(25, 29, 41, 1)","input-border-default":"rgba(28, 33, 45, 1)","module-border":"rgba(28, 33, 45, 1)","button-disabled":"rgba(111, 113, 118, 1)","button-border":"rgba(255, 255, 255, 1)","input-border-active":"rgba(185, 163, 238, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgba(28, 33, 45, 1)"}}',n.theme2='{"name":"light","id":"theme2","active":true, "chartColors":{"bullish_candle_color": "rgba(0, 112, 98, 1)","bearish_candle_color": "rgba(195, 12, 1, 1)","bullish_wick_color": "rgba(0, 112, 98, 1)","bearish_wick_color": "rgba(195, 12, 1, 1)","bullish_outline_color": "rgba(0, 112, 98, 1)","bearish_outline_color": "rgba(195, 12, 1, 1)","line_color": "rgba(41, 98, 255, 1)","chart_background": "rgba(255, 255, 255, 1)","chart_text": "rgba(127, 127, 127, 1)"}, "colors":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(249, 248, 248, 1)","primary-text":"rgba(0, 0, 0, 1)","module-background":"rgba(255, 255, 255, 1)","buy-text":"rgba(0, 112, 98, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-text":"rgba(195, 12, 1, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","button-disabled":"rgba(203, 199, 199, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(249, 248, 248, 1)","input-border-default":"rgba(228, 225, 225, 1)","module-border":"rgba(228, 225, 225, 1)","button-border":"rgba(170, 167, 167, 1)","input-border-active":"rgba(0, 0, 0, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}',n.theme3='{"name":"purple","id":"theme3","active":true, "chartColors":{"bullish_candle_color": "rgba(0, 112, 98, 1)","bearish_candle_color": "rgba(195, 12, 1, 1)","bullish_wick_color": "rgba(0, 112, 98, 1)","bearish_wick_color": "rgba(195, 12, 1, 1)","bullish_outline_color": "rgba(0, 112, 98, 1)","bearish_outline_color": "rgba(195, 12, 1, 1)","line_color": "rgba(41, 98, 255, 1)","chart_background": "rgba(254, 250, 255, 1)","chart_text": "rgba(127, 127, 127, 1)"}, "colors":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(255, 255, 255, 1)","primary-text":"rgba(0, 0, 0, 1)","secondary-text":"rgba(127, 127, 127, 1)","buy-text":"rgba(0, 112, 98, 1)","sell-text":"rgba(195, 12, 1, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-background":"rgba(255, 59, 105, 0.25)","module-background":"rgba(254, 250, 255, 1)","module-border":"rgba(228, 225, 225, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(254, 250, 255, 1)","input-border-default":"rgba(228, 225, 225, 1)","input-border-active":"rgba(0, 0, 0, 1)","button-border":"rgba(170, 167, 167, 1)","button-disabled":"rgba(203, 199, 199, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}',n))(Te||{});var ye=(a=>(a.STABLE="stable",a.CPMM="constant_product",a.LEND="lending",a.NANO="nano",a.MVNANO="mvnano",a))(ye||{}),we=(a=>(a[a.ultrade=0]="ultrade",a[a.tinyman=1]="tinyman",a[a.pactfi=2]="pactfi",a[a.humble=3]="humble",a[a.algofi=4]="algofi",a))(we||{}),Ae=(a=>(a.ultrade="U",a.tinyman="T",a.pactfi="P",a.humble="H",a.algofi="A",a))(Ae||{}),Re=(a=>(a[a.ultrade=1]="ultrade",a[a.tinyman=2]="tinyman",a[a.pactfi=1]="pactfi",a[a.humble=1]="humble",a[a.algofi=2]="algofi",a))(Re||{}),pr={V1_1:"v1_1",V2:"v2"},qe={[pr.V1_1]:{testnet:62368684,mainnet:552635992},[pr.V2]:{testnet:148607e3,mainnet:1002541853}},Ie=(e=>(e.ASSETS="assets.json",e.TOP_ASSETS="topAssets.json",e))(Ie||{});var ve=(i=>(i.last_7_days="last_7_days",i.last_30_days="last_30_days",i.last_90_days="last_90_days",i.last_year="last_year",i))(ve||{}),fr=class{constructor(){this.timeRange="last_30_days";this.sortBy="volume_usd";this.order="desc";this.limit=20;this.page=1}},mr=class{constructor(){this.timeRange="last_30_days";this.sortBy="volume_usd";this.order="desc";this.limit=20;this.page=1}},ke=(i=>(i.volume="volume",i.fees="fees",i.orders="orders",i.dau="dau",i))(ke||{}),gr=class{constructor(){this.type="volume";this.timeRange="last_7_days"}};var Ne=(a=>(a.PREPARING="provisioning",a.STOPPING="stopping",a.RUNNING="running",a.STOPPED="stopped",a.FAILED="failed",a))(Ne||{});export{Ee as AffDashboardVisibilitySettingEnum,Ie as AmmBucketKeys,Ae as AmmChars,Re as AmmForeignResources,we as AmmIds,pr as CONTRACT_VERSION,gr as ChartQueryDto,_e as CredentialNameEnum,Ne as HummingbotInstanceStatus,fr as PairsQueryDto,ye as PoolType,xe as SettingIds,ve as SmallTimeframeEnum,ke as StatisticTypeQuery,mr as UsersQueryDto,qe as VALIDATOR_APP_ID,Ge as defaultLogoSettingValue,He as defaultThemeSettingValue,Te as defaultThemesValue,Ke as requiredColors,Ve as settingIdToSecretType};
2
2
  /*! Bundled license information:
3
3
 
4
4
  @esbuild-plugins/node-globals-polyfill/Buffer.js:
@@ -1,4 +1,3 @@
1
1
  export * from './mappers';
2
2
  export * from './utils';
3
- export * from './auth.helper';
4
3
  export * from './big-number.helper';
@@ -7,3 +7,6 @@ export declare function cutEvent(event: any): {
7
7
  };
8
8
  export declare function maskingString(str: string): string;
9
9
  export declare function removeField(obj: any, fieldToRemove: string): any;
10
+ export * from './assert';
11
+ export * from './social';
12
+ export * from './stat';
@@ -0,0 +1,6 @@
1
+ export declare const ALGO_NETWORK: string;
2
+ export declare const NETWORK: string;
3
+ export declare const WH_CORE_ID: number;
4
+ export declare const SUPER_APP_ID: number;
5
+ export declare const CODEX_APP_ID: number;
6
+ export declare const MSG_PROC_ID: number;
@@ -5,3 +5,4 @@ export * from './response';
5
5
  export * from './settings';
6
6
  export * from './withdrawalWalletsMessage';
7
7
  export * from './frontend';
8
+ export * from './social';
@@ -0,0 +1,4 @@
1
+ import { ITwitterAccountSettings } from '../interfaces/index.ts';
2
+ import { TwitterAction } from '../enums/index.ts';
3
+ export declare const twitterActionToPermissionMap: Record<TwitterAction, keyof ITwitterAccountSettings>;
4
+ export declare const POINTS_MAX_VALUE = 99999999;
@@ -18,4 +18,5 @@ export * from './setting-type.enum';
18
18
  export * from './state-type.enum';
19
19
  export * from './upgrade.enum';
20
20
  export * from './withdrawal-wallet.enum';
21
+ export * from './pending-actions.enum';
21
22
  export { AvailablePairSettings, OrderSide, OrderStatus, OrderType, TradingKeyType, };
@@ -0,0 +1,6 @@
1
+ export declare enum PendingActionsSortByEnum {
2
+ TIMESTAMP = "timestamp",
3
+ TYPE = "action_type",
4
+ CHAIN = "login_chain_id",
5
+ STATUS = "status"
6
+ }
@@ -6,6 +6,7 @@ export declare enum OperationStatusEnum {
6
6
  }
7
7
  export declare enum ActionTypeEnum {
8
8
  Deposit = "deposit",
9
+ FastDeposit = "fast_deposit",
9
10
  Withdraw = "withdraw",
10
11
  Rebalance = "rebalance"
11
12
  }
@@ -4,4 +4,6 @@ export * from "./notification.enum";
4
4
  export * from "./social.enum";
5
5
  export * from "./db";
6
6
  export * from "./rabbitMq";
7
+ export * from "./points.enum";
7
8
  export * from './settings.enum';
9
+ export * from './socket.enum';
@@ -0,0 +1,4 @@
1
+ export declare enum PointsSortByEnum {
2
+ NAME = "name",
3
+ POINTS = "points"
4
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum STREAMS {
2
+ QUOTE = 1,
3
+ LAST_PRICE = 2,
4
+ DEPTH = 3,
5
+ LAST_CANDLESTICK = 4,
6
+ ORDERS = 5,
7
+ TRADES = 6,
8
+ SYSTEM = 7,
9
+ WALLET_TRANSACTIONS = 8,
10
+ ALL_STAT = 9,
11
+ CODEX_ASSETS = 12,
12
+ CODEX_BALANCES = 10,
13
+ LAST_LOOK = 11,
14
+ SETTINGS_UPDATE = 13,
15
+ NEW_NOTIFICATION = 14,
16
+ POINT_SYSTEM_SETTINGS_UPDATE = 15
17
+ }
18
+ export declare const PRIVATE_STREAMS: STREAMS[];
@@ -1,5 +1,4 @@
1
1
  import { Chains } from '../../enums';
2
- import { AddressChain } from '../../interfaces/pair.interface';
3
2
  import { TechnologyType } from '../../interfaces/wallet.interface';
4
3
  export interface IMsgArgs {
5
4
  message: string;
@@ -18,7 +17,5 @@ export declare const getPublicKey: (address: string, chain: number, message: str
18
17
  export declare const getPrefixedMessage: (message: string, encoding: BufferEncoding | undefined, chain: number) => Buffer;
19
18
  export declare const getProviderChainId: (technology: TechnologyType) => Chains;
20
19
  export declare const encodeAddress: (address: string, chain: number) => Uint8Array;
21
- export declare const unified_CCTP_token = "CCTPUSDC";
22
- export declare const unified_CCTP_ChainID = 65537;
23
- export declare function getUnifiedUSDC(): Buffer;
24
- export declare function getUnifiedUSDCToken(): AddressChain;
20
+ export declare const getChainId: (address: string) => Chains.Solana | Chains.Algorand | Chains.Polygon;
21
+ export declare const detectChainByAddress: (address: string) => Chains.Solana | Chains.Algorand | Chains.Polygon | 0;
@@ -2,5 +2,7 @@ export * from './common.helper';
2
2
  export * from './mbr.helper';
3
3
  export * from './mna.helper';
4
4
  export * from './order.helper';
5
+ export * from './setGlobal.helper';
6
+ export * from './tokens';
5
7
  export * from './transfer.helper';
6
8
  export * from './txn.helper';
@@ -0,0 +1,5 @@
1
+ import { PairToken } from '../../interfaces/pair.interface';
2
+ export declare const unified_CCTP_token = "CCTPUSDC";
3
+ export declare const unified_CCTP_ChainID = 65537;
4
+ export declare function getUnifiedUSDC(): Buffer;
5
+ export declare function getUnifiedUSDCToken(): PairToken;
@@ -104,3 +104,4 @@ export declare const makeSetCompanyFeeTxn: (algoClient: algosdk.Algodv2, { fee,
104
104
  export declare const makeUpdateTokenInfoTxns: (appId: number, superId: number, sender: string, params: algosdk.SuggestedParams, balances: Record<string, number>, token: PairTokenInfo) => algosdk.Transaction[];
105
105
  export declare const makeUpdatePairInfoTxn: (appId: number, superId: number, sender: string, params: algosdk.SuggestedParams, baseToken: PairToken, priceToken: PairToken, minSize: string, minPriceIncrement: string, minSizeIncrement: string) => algosdk.Transaction;
106
106
  export declare const getUpgradeImpMsg: (chainId: number, implementationAddress: string) => Uint8Array<ArrayBufferLike>;
107
+ export declare const getSetCCTPContractsMsg: (chainId: number, tokenMessengerAddress: string, messageTransmitterAddress: string) => Uint8Array<ArrayBufferLike>;
@@ -1,4 +1,4 @@
1
- import { AlgoOrder } from "../../types/algo-order.type";
1
+ import { AlgoOrder } from "../types/index.ts";
2
2
  export declare const getAccounInfoFormLocalStorage: (localState: any) => any;
3
3
  export declare function unpackData(data: any, format: any): any;
4
4
  export declare function decodeString(value: Uint8Array): string;
@@ -0,0 +1,50 @@
1
+ interface ICodexBalanceLog {
2
+ loginAddr: string;
3
+ loginChainID: string;
4
+ tokenAddr: string;
5
+ tokenChainID: string;
6
+ amount: string;
7
+ }
8
+ export interface ICodexDepositLog extends ICodexBalanceLog {
9
+ sender: string;
10
+ senderChainID: string;
11
+ fee?: string;
12
+ }
13
+ export interface ICodexWithdrawal extends ICodexBalanceLog {
14
+ destAddr: string;
15
+ destChainID: string;
16
+ fee: string;
17
+ txnId: string;
18
+ msgHash: string;
19
+ }
20
+ export interface ICodexTransfer {
21
+ transferId: number;
22
+ transferFee: number;
23
+ completedAt: number;
24
+ txnId: string;
25
+ loginAddr: string;
26
+ loginChainID: string;
27
+ destAddr: string;
28
+ destChainID: string;
29
+ tokenAddr: string;
30
+ tokenChainID: string;
31
+ amount: string;
32
+ }
33
+ export interface StreamerVaa {
34
+ amount: string;
35
+ emitterId: number;
36
+ loginAddr: string;
37
+ loginChainID: string;
38
+ destAddr: string;
39
+ destChainID: string;
40
+ sender: string;
41
+ senderChainID: string;
42
+ tokenAddr: string;
43
+ tokenChainID: string;
44
+ sequence: string;
45
+ vaaType: 'withdraw' | 'deposit' | 'fast_deposit';
46
+ txnId: string;
47
+ fee: string;
48
+ msgHash?: string;
49
+ }
50
+ export {};
@@ -20,3 +20,5 @@ export * from "./kmsService.interface";
20
20
  export * from "./services";
21
21
  export * from "./pagination.interface";
22
22
  export * from './settings.interface';
23
+ export * from './socket.interface';
24
+ export * from './algostreamer';
@@ -138,6 +138,7 @@ export interface ProcessOrder {
138
138
  companyId: number;
139
139
  expiryAt: Date;
140
140
  message: string;
141
+ messageHash: string;
141
142
  signature: string;
142
143
  tradingKey?: string;
143
144
  }
@@ -0,0 +1,16 @@
1
+ import { STREAMS } from "../enums/index.ts";
2
+ export interface WSOptions {
3
+ address: string;
4
+ token?: string;
5
+ tradingKey?: string;
6
+ message?: string;
7
+ signature?: string;
8
+ depth?: number;
9
+ companyId?: number;
10
+ interval?: string;
11
+ }
12
+ export interface SubscribeOptions {
13
+ symbol: string;
14
+ streams: STREAMS[];
15
+ options: WSOptions;
16
+ }
@@ -1 +1 @@
1
- var V=Object.create;var l=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var q=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},x=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of K(t))!Y.call(e,o)&&o!==r&&l(e,o,{get:()=>t[o],enumerable:!(n=W(t,o))||n.enumerable});return e};var u=(e,t,r)=>(r=e!=null?V(z(e)):{},x(t||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),X=e=>x(l({},"__esModule",{value:!0}),e);var fe={};q(fe,{Operations:()=>L,absolute:()=>re,bn_operation:()=>p,ceil:()=>ne,convertFromBaseUnits:()=>he,convertToBaseUnits:()=>be,cutEvent:()=>te,divide:()=>ce,encodeMessage:()=>Te,equal:()=>I,equalIgnoreCase:()=>b,floor:()=>ie,generateTxnForSign:()=>M,getDomains:()=>ee,getRandomInt:()=>Z,greaterThan:()=>de,greaterThanOrEqual:()=>le,isMaker:()=>k,lessThan:()=>ue,lessThanOrEqual:()=>me,listDateFormat:()=>Q,mapToCodexAssetDto:()=>$,mapToCodexBalanceDto:()=>j,mapToOrderTradeDto:()=>Ie,mapToUserTradeDto:()=>Ae,maskingString:()=>E,minus:()=>pe,mod:()=>U,modZero:()=>Ee,multiply:()=>w,plus:()=>A,removeField:()=>h,round:()=>se,roundNumber:()=>T,signTxn:()=>ge,toFixed:()=>oe,toUsd:()=>ae});module.exports=X(fe);function $(e,t){return{id:e.id,address:e.address,chainId:e.chainId,name:e.name,unitName:e.unitName,decimals:e.decimals,isGas:e.isGas,img:e.img,cmcLink:e.cmcLink,isArchived:t?t(e):!1}}function j(e){return{hash:e.hash,loginAddress:e.loginAddress,loginChainId:e.loginChainId,tokenId:e.token?.id,tokenAddress:e.tokenId,tokenChainId:e.tokenChainId,amount:e.amount,lockedAmount:e.lockedAmount}}var O=(r=>(r[r.Buy=0]="Buy",r[r.Sell=1]="Sell",r))(O||{}),a=O;var N=(o=>(o.GLOBAL_PAIR_DELISTING="GLOBAL_PAIR_DELISTING",o.GLOBAL_NEW_PAIR_LISTING="GLOBAL_NEW_PAIR_LISTING",o.GLOBAL_SYSTEM_MAINTENANCE="GLOBAL_SYSTEM_MAINTENANCE",o.GLOBAL_SMART_CONTRACT_UPDATE="GLOBAL_SMART_CONTRACT_UPDATE",o))(N||{}),R=(n=>(n.ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT="ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT",n.ACCOUNT_KYC_STATUS_CHANGED="ACCOUNT_KYC_STATUS_CHANGED",n.ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED="ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED",n))(R||{}),ze={...N,...R};function C(e){switch(e){case a.Buy:return"B";case a.Sell:return"S";default:throw new Error("Unknown order side type: "+e)}}var Q=e=>{let t=new Date(e),r=t.toLocaleDateString("default",{year:"numeric",month:"numeric",day:"numeric"}),n=t.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"});return r+" "+n},b=(e,t)=>String(e).toLowerCase()===String(t).toLowerCase();function Z(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function ee(e){let t=[],r=e.split(".");for(let n=0;n<r.length-1;n++)t.push(r.slice(n).join("."));return t}function te(e){let t=e.headers&&d({Authorization:e.headers.Authorization?.substring(0,200),"CloudFront-Viewer-Country":e.headers["CloudFront-Viewer-Country"],Host:e.headers.Host,origin:e.headers.origin,Referer:e.headers.Referer,"User-Agent":e.headers["User-Agent"],"wl-domain":e.headers["wl-domain"],"X-API-Key":E(e.headers["X-API-Key"]),"X-Forwarded-For":e.headers["X-Forwarded-For"],"X-Forwarded-Port":e.headers["X-Forwarded-Port"],"X-Forwarded-Proto":e.headers["X-Forwarded-Proto"],"X-Trading-Key":e.headers["X-Trading-Key"],"X-Wallet-Address":e.headers["X-Wallet-Address"],"X-Wallet-Token":e.headers["X-Wallet-Token"],accessToken:E(e.headers.accessToken),companyId:e.headers.companyId,seasonId:e.headers.seasonId}),r=e.requestContext&&d({identity:e.requestContext.identity&&d({userAgent:e.requestContext.identity.userAgent,sourceIp:e.requestContext.identity.sourceIp}),domainName:e.requestContext.domainName});return d({manage:e.manage,path:e.path,httpMethod:e.httpMethod,headers:t,requestContext:r})}function E(e){if(!e?.length)return e;let t=Math.round(e.length/3),r=t,n=e.length-t;return e.substring(0,r)+"*".repeat(t)+e.substring(n)}function h(e,t){return Array.isArray(e)?e.map(r=>h(r,t)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).filter(([r])=>r!==t).map(([r,n])=>[r,h(n,t)])):e}function d(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var i=u(require("bignumber.js"));i.default.config({DECIMAL_PLACES:40,EXPONENTIAL_AT:45});var L=(s=>(s.MINUS="-",s.PLUS="+",s.MULTIPLY="*",s.DIVIDE="/",s.GREATER_THAN_OR_EQUAL=">=",s.GREATER_THAN=">",s.LESS_THAN_OR_EQUAL="<=",s.LESS_THAN="<",s.EQUAL="==",s.MOD="mod",s))(L||{});function re(e){return new i.default(e).abs().toString()}function ne(e){let r=new i.default(String(e)).integerValue(i.default.ROUND_CEIL).toString();return I(e,r)||console.log("Ceil value",{value:e,res:r}),r}function oe(e,t,r=!1){let n=new i.default(String(e)),o;if(r){let c=n.toFixed(),_=c.indexOf(".");if(_>=0){let v=c.slice(_+1),f=0;for(let s of v)if(s==="0")f++;else break;let H=f+1;o=n.toFixed(H,i.default.ROUND_UP)}else o=n.toFixed(0)}else o=n.toFixed(t);return console.log("Fixed value",{value:e,res:o}),o}function ie(e){let r=new i.default(String(e)).integerValue(i.default.ROUND_FLOOR).toString();return console.log("Floor value",{value:e,res:r}),r}function se(e){let r=new i.default(String(e)).integerValue(i.default.ROUND_HALF_UP).toString();return console.log("Round value",{value:e,res:r}),r}function A(e,t){return p(e,t,"+")}function pe(e,t){return p(e,t,"-")}function w(e,t){return p(e,t,"*")}function ae(e,t){return w(e,t||0)}function ce(e,t){return p(e,t,"/")}function le(e,t){return!!p(e,t,">=")}function de(e,t){return!!p(e,t,">")}function me(e,t){return!!p(e,t,"<=")}function ue(e,t){return!!p(e,t,"<")}function I(e,t){return!!p(e,t,"==")}function U(e,t){return p(e,t,"mod")}function Ee(e,t){return I(U(e,t),0)}function p(e,t,r){switch(e=new i.default(String(e)),t=new i.default(String(t)),r.toLowerCase()){case"-":return e.minus(t).toString();case"+":return e.plus(t).toString();case"*":case"x":return e.multipliedBy(t).toString();case"\xF7":case"/":return e.dividedBy(t).toString();case">=":return e.isGreaterThanOrEqualTo(t);case">":return e.isGreaterThan(t);case"<=":return e.isLessThanOrEqualTo(t);case"<":return e.isLessThan(t);case"==":return e.isEqualTo(t);case"mod":return e.modulo(t);default:break}}function D(e){if(e.toString().includes("e")){let t=e.toString().split("e");return[parseFloat(t[0]),parseFloat(t[1])]}return[e,0]}function y(e,t){return e+(t<0?`e${t}`:`e+${t}`)}function T({decimalPlaces:e=0},t){if(e>0){let[r,n]=D(t),[o,c]=D(Math.round(Number(y(r,n+e))));return Number(y(o,c-e))}return Math.round(t)}function he(e,t){let r=Number(e);return T({decimalPlaces:r},Math.pow(10,-r)*Number(t))}function be(e,t){let r=Math.pow(10,Number(e))*Number(t);return T({decimalPlaces:0},r)}function Ae(e,t,r){let n=e.buyOrder&&e.sellOrder?e.buyOrderId>e.sellOrderId?e.buyOrder:e.sellOrder:e.buyOrder||e.sellOrder;return{pairId:e.pairId,orderId:n?.id,orderSide:n&&C(n.side),...P(t,r),...S(e,n)}}function Ie(e,t,r,n,o){return{id:e.id,pairId:e.pairId,pair:r||e.pair?.pairKey,...P(n,o),amount:e.amount,price:e.price,total:e.total,filledAmount:e.filledAmount,filledTotal:e.filledTotal,avgPrice:e.excutedPrice,status:e.status,side:e.side,type:e.type,userId:e.userId,createdAt:e.createdAt?.getTime(),completedAt:e.completedAt?.getTime()||null,updatedAt:e.updatedAt?.getTime(),trades:t&&t.map(c=>S(c,e))}}function P(e,t){return{baseTokenId:e?.id,baseTokenDecimal:e?.decimals,quoteTokenId:t?.id,quoteTokenDecimal:t?.decimals}}function S(e,t){return{tradeId:e.tradeId,status:e.txStatus,amount:e.amount,total:e.total,price:e.price,fee:t&&e.tradeFees.filter(r=>b(r.address,t.userId)).reduce((r,n)=>A(r,n.fee),"0"),createdAt:e.createdAt?.getTime(),updatedAt:e.updatedAt?.getTime(),isBuyer:t&&t.side===a.Buy,isMaker:t&&k(t.side,e.tradeSide)}}function k(e,t){return e===a.Buy&&t===a.Sell||e===a.Sell&&t===a.Buy}var m=u(require("algosdk"));var g=u(require("algosdk")),F=require("buffer"),G=require("algosdk");function B(e){return new Uint8Array(F.Buffer.from(e))}function Te(e){return B(e)}function M(e,t,r){return m.default.makePaymentTxnWithSuggestedParamsFromObject({from:e,to:e,amount:0,note:t&&new Uint8Array(Buffer.from(t,r)),suggestedParams:{fee:0,firstRound:1,lastRound:2,genesisHash:"SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=",genesisID:"testnet-v1.0"}})}function ge(e,t,r,n){return _e(M(e,t,r),n)}async function _e(e,t){let r=m.default.encodeUnsignedTransaction(e),n=await t([r]),o=m.default.decodeSignedTransaction(n[0]);return new Uint8Array(o.sig)}0&&(module.exports={Operations,absolute,bn_operation,ceil,convertFromBaseUnits,convertToBaseUnits,cutEvent,divide,encodeMessage,equal,equalIgnoreCase,floor,generateTxnForSign,getDomains,getRandomInt,greaterThan,greaterThanOrEqual,isMaker,lessThan,lessThanOrEqual,listDateFormat,mapToCodexAssetDto,mapToCodexBalanceDto,mapToOrderTradeDto,mapToUserTradeDto,maskingString,minus,mod,modZero,multiply,plus,removeField,round,roundNumber,signTxn,toFixed,toUsd});
1
+ var B=Object.create;var m=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var W=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},x=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of M(t))!V.call(e,p)&&p!==r&&m(e,p,{get:()=>t[p],enumerable:!(o=v(t,p))||o.enumerable});return e};var K=(e,t,r)=>(r=e!=null?B(H(e)):{},x(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),Y=e=>x(m({},"__esModule",{value:!0}),e);var be={};W(be,{Operations:()=>F,absolute:()=>Q,assert:()=>J,bn_operation:()=>s,ceil:()=>$,changes24H:()=>ce,convertFromBaseUnits:()=>se,convertToBaseUnits:()=>ae,cutEvent:()=>de,divide:()=>b,equal:()=>I,equalIgnoreCase:()=>N,floor:()=>ee,getDomains:()=>Ee,getGlobalPointSystemId:()=>j,getRandomInt:()=>le,greaterThan:()=>E,greaterThanOrEqual:()=>oe,isMaker:()=>G,lessThan:()=>ne,lessThanOrEqual:()=>pe,listDateFormat:()=>me,mapToCodexAssetDto:()=>X,mapToCodexBalanceDto:()=>q,mapToOrderTradeDto:()=>ue,mapToUserTradeDto:()=>he,maskingString:()=>A,minus:()=>u,mod:()=>w,modZero:()=>ie,multiply:()=>l,plus:()=>h,removeField:()=>T,round:()=>te,roundNumber:()=>_,toFixed:()=>Z,toUsd:()=>re});module.exports=Y(be);function X(e,t){return{id:e.id,address:e.address,chainId:e.chainId,name:e.name,unitName:e.unitName,decimals:e.decimals,isGas:e.isGas,img:e.img,cmcLink:e.cmcLink,isArchived:t?t(e):!1}}function q(e){return{hash:e.hash,loginAddress:e.loginAddress,loginChainId:e.loginChainId,tokenId:e.token?.id,tokenAddress:e.tokenId,tokenChainId:e.tokenChainId,amount:e.amount,lockedAmount:e.lockedAmount}}var D=(r=>(r[r.Buy=0]="Buy",r[r.Sell=1]="Sell",r))(D||{}),a=D;var L=(p=>(p.GLOBAL_PAIR_DELISTING="GLOBAL_PAIR_DELISTING",p.GLOBAL_NEW_PAIR_LISTING="GLOBAL_NEW_PAIR_LISTING",p.GLOBAL_SYSTEM_MAINTENANCE="GLOBAL_SYSTEM_MAINTENANCE",p.GLOBAL_SMART_CONTRACT_UPDATE="GLOBAL_SMART_CONTRACT_UPDATE",p))(L||{}),R=(o=>(o.ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT="ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT",o.ACCOUNT_KYC_STATUS_CHANGED="ACCOUNT_KYC_STATUS_CHANGED",o.ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED="ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED",o))(R||{}),ve={...L,...R};function g(e){switch(e){case a.Buy:return"B";case a.Sell:return"S";default:throw new Error("Unknown order side type: "+e)}}var J=(e,t)=>{if(!e)throw new Error(`Assertion error: ${t}`)};var j=()=>1;var n=K(require("bignumber.js"));n.default.config({DECIMAL_PLACES:40,EXPONENTIAL_AT:45});var F=(i=>(i.MINUS="-",i.PLUS="+",i.MULTIPLY="*",i.DIVIDE="/",i.GREATER_THAN_OR_EQUAL=">=",i.GREATER_THAN=">",i.LESS_THAN_OR_EQUAL="<=",i.LESS_THAN="<",i.EQUAL="==",i.MOD="mod",i))(F||{});function Q(e){return new n.default(e).abs().toString()}function $(e){let r=new n.default(String(e)).integerValue(n.default.ROUND_CEIL).toString();return I(e,r)||console.log("Ceil value",{value:e,res:r}),r}function Z(e,t,r=!1){let o=new n.default(String(e)),p;if(r){let c=o.toFixed(),O=c.indexOf(".");if(O>=0){let k=c.slice(O+1),C=0;for(let i of k)if(i==="0")C++;else break;let S=C+1;p=o.toFixed(S,n.default.ROUND_UP)}else p=o.toFixed(0)}else p=o.toFixed(t);return console.log("Fixed value",{value:e,res:p}),p}function ee(e){let r=new n.default(String(e)).integerValue(n.default.ROUND_FLOOR).toString();return console.log("Floor value",{value:e,res:r}),r}function te(e){let r=new n.default(String(e)).integerValue(n.default.ROUND_HALF_UP).toString();return console.log("Round value",{value:e,res:r}),r}function h(e,t){return s(e,t,"+")}function u(e,t){return s(e,t,"-")}function l(e,t){return s(e,t,"*")}function re(e,t){return l(e,t||0)}function b(e,t){return s(e,t,"/")}function oe(e,t){return!!s(e,t,">=")}function E(e,t){return!!s(e,t,">")}function pe(e,t){return!!s(e,t,"<=")}function ne(e,t){return!!s(e,t,"<")}function I(e,t){return!!s(e,t,"==")}function w(e,t){return s(e,t,"mod")}function ie(e,t){return I(w(e,t),0)}function s(e,t,r){switch(e=new n.default(String(e)),t=new n.default(String(t)),r.toLowerCase()){case"-":return e.minus(t).toString();case"+":return e.plus(t).toString();case"*":case"x":return e.multipliedBy(t).toString();case"\xF7":case"/":return e.dividedBy(t).toString();case">=":return e.isGreaterThanOrEqualTo(t);case">":return e.isGreaterThan(t);case"<=":return e.isLessThanOrEqualTo(t);case"<":return e.isLessThan(t);case"==":return e.isEqualTo(t);case"mod":return e.modulo(t);default:break}}function f(e){if(e.toString().includes("e")){let t=e.toString().split("e");return[parseFloat(t[0]),parseFloat(t[1])]}return[e,0]}function P(e,t){return e+(t<0?`e${t}`:`e+${t}`)}function _({decimalPlaces:e=0},t){if(e>0){let[r,o]=f(t),[p,c]=f(Math.round(Number(P(r,o+e))));return Number(P(p,c-e))}return Math.round(t)}function se(e,t){let r=Number(e);return _({decimalPlaces:r},Math.pow(10,-r)*Number(t))}function ae(e,t){let r=Math.pow(10,Number(e))*Number(t);return _({decimalPlaces:0},r)}var ce=(e,t)=>E(t,0)&&E(e,0)?l(b(u(e,t),t),100):"0";var me=e=>{let t=new Date(e),r=t.toLocaleDateString("default",{year:"numeric",month:"numeric",day:"numeric"}),o=t.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"});return r+" "+o},N=(e,t)=>String(e).toLowerCase()===String(t).toLowerCase();function le(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function Ee(e){let t=[],r=e.split(".");for(let o=0;o<r.length-1;o++)t.push(r.slice(o).join("."));return t}function de(e){let t=e.headers&&d({Authorization:e.headers.Authorization?.substring(0,200),"CloudFront-Viewer-Country":e.headers["CloudFront-Viewer-Country"],Host:e.headers.Host,origin:e.headers.origin,Referer:e.headers.Referer,"User-Agent":e.headers["User-Agent"],"wl-domain":e.headers["wl-domain"],"X-API-Key":A(e.headers["X-API-Key"]),"X-Forwarded-For":e.headers["X-Forwarded-For"],"X-Forwarded-Port":e.headers["X-Forwarded-Port"],"X-Forwarded-Proto":e.headers["X-Forwarded-Proto"],"X-Trading-Key":e.headers["X-Trading-Key"],"X-Wallet-Address":e.headers["X-Wallet-Address"],"X-Wallet-Token":e.headers["X-Wallet-Token"],accessToken:A(e.headers.accessToken),companyId:e.headers.companyId,seasonId:e.headers.seasonId}),r=e.requestContext&&d({identity:e.requestContext.identity&&d({userAgent:e.requestContext.identity.userAgent,sourceIp:e.requestContext.identity.sourceIp}),domainName:e.requestContext.domainName});return d({manage:e.manage,path:e.path,httpMethod:e.httpMethod,headers:t,requestContext:r})}function A(e){if(!e?.length)return e;let t=Math.round(e.length/3),r=t,o=e.length-t;return e.substring(0,r)+"*".repeat(t)+e.substring(o)}function T(e,t){return Array.isArray(e)?e.map(r=>T(r,t)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).filter(([r])=>r!==t).map(([r,o])=>[r,T(o,t)])):e}function d(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function he(e,t,r){let o=e.buyOrder&&e.sellOrder?e.buyOrderId>e.sellOrderId?e.buyOrder:e.sellOrder:e.buyOrder||e.sellOrder;return{pairId:e.pairId,orderId:o?.id,orderSide:o&&g(o.side),...y(t,r),...U(e,o)}}function ue(e,t,r,o,p){return{id:e.id,pairId:e.pairId,pair:r||e.pair?.pairKey,...y(o,p),amount:e.amount,price:e.price,total:e.total,filledAmount:e.filledAmount,filledTotal:e.filledTotal,avgPrice:e.excutedPrice,status:e.status,side:e.side,type:e.type,userId:e.userId,createdAt:e.createdAt?.getTime(),completedAt:e.completedAt?.getTime()||null,updatedAt:e.updatedAt?.getTime(),trades:t&&t.map(c=>U(c,e))}}function y(e,t){return{baseTokenId:e?.id,baseTokenDecimal:e?.decimals,quoteTokenId:t?.id,quoteTokenDecimal:t?.decimals}}function U(e,t){return{tradeId:e.tradeId,status:e.txStatus,amount:e.amount,total:e.total,price:e.price,fee:t&&e.tradeFees.filter(r=>N(r.address,t.userId)).reduce((r,o)=>h(r,o.fee),"0"),createdAt:e.createdAt?.getTime(),updatedAt:e.updatedAt?.getTime(),isBuyer:t&&t.side===a.Buy,isMaker:t&&G(t.side,e.tradeSide)}}function G(e,t){return e===a.Buy&&t===a.Sell||e===a.Sell&&t===a.Buy}0&&(module.exports={Operations,absolute,assert,bn_operation,ceil,changes24H,convertFromBaseUnits,convertToBaseUnits,cutEvent,divide,equal,equalIgnoreCase,floor,getDomains,getGlobalPointSystemId,getRandomInt,greaterThan,greaterThanOrEqual,isMaker,lessThan,lessThanOrEqual,listDateFormat,mapToCodexAssetDto,mapToCodexBalanceDto,mapToOrderTradeDto,mapToUserTradeDto,maskingString,minus,mod,modZero,multiply,plus,removeField,round,roundNumber,toFixed,toUsd});
@@ -0,0 +1 @@
1
+ var r=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(o,e)=>{for(var s in e)r(o,s,{get:e[s],enumerable:!0})},D=(o,e,s,O)=>{if(e&&typeof e=="object"||typeof e=="function")for(let _ of c(e))!n.call(o,_)&&_!==s&&r(o,_,{get:()=>e[_],enumerable:!(O=P(e,_))||O.enumerable});return o};var E=o=>D(r({},"__esModule",{value:!0}),o);var A={};p(A,{ALGO_NETWORK:()=>t,CODEX_APP_ID:()=>N,MSG_PROC_ID:()=>x,NETWORK:()=>R,SUPER_APP_ID:()=>C,WH_CORE_ID:()=>I});module.exports=E(A);var t=process.env.ALGO_NETWORK,R=t&&t.toLowerCase(),I=Number(process.env.WH_CORE_ID),C=Number(process.env.SUPER_APP_ID),N=Number(process.env.CODEX_APP_ID),x=Number(process.env.MSG_PROCESSOR_ID);0&&(module.exports={ALGO_NETWORK,CODEX_APP_ID,MSG_PROC_ID,NETWORK,SUPER_APP_ID,WH_CORE_ID});