@dodoex/widgets 2.3.4 → 2.3.5-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/608a45433384d12e.png +0 -0
  2. package/dist/b08d68f421a81726.png +0 -0
  3. package/dist/cjs/608a45433384d12e.png +0 -0
  4. package/dist/cjs/b08d68f421a81726.png +0 -0
  5. package/dist/cjs/e63d558f5364d137.svg +10 -0
  6. package/dist/cjs/index.cjs +9 -8
  7. package/dist/cjs/locales/en-US.js +1 -1
  8. package/dist/cjs/src/components/Bridge/BridgeRouteShortCard.d.ts +6 -0
  9. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.d.ts +5 -0
  10. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/index.d.ts +17 -0
  11. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/CrossStep.d.ts +16 -0
  12. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/EtherscanLinkButton.d.ts +6 -0
  13. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/RouteSteps.d.ts +6 -0
  14. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/SwapStep.d.ts +14 -0
  15. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/BridgeLogo.d.ts +10 -0
  16. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/DirectionLine.d.ts +4 -0
  17. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +21 -0
  18. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteTagList.d.ts +12 -0
  19. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/TokenWithChain.d.ts +11 -0
  20. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/index.d.ts +9 -0
  21. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/productList.d.ts +5 -0
  22. package/dist/cjs/src/components/ErrorMessageDialog.d.ts +5 -0
  23. package/dist/cjs/src/components/Swap/components/SettingsDialog/index.d.ts +2 -1
  24. package/dist/cjs/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +2 -1
  25. package/dist/cjs/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +2 -1
  26. package/dist/cjs/src/components/Swap/components/TokenCard/index.d.ts +4 -1
  27. package/dist/cjs/src/components/SwitchChainDialog/index.d.ts +7 -0
  28. package/dist/cjs/src/components/TokenLogo.d.ts +2 -1
  29. package/dist/cjs/src/components/TokenPicker/SelectChainItem.d.ts +7 -0
  30. package/dist/cjs/src/components/TokenPicker/index.d.ts +2 -1
  31. package/dist/cjs/src/constants/api.d.ts +3 -0
  32. package/dist/cjs/src/constants/chainList.d.ts +10 -0
  33. package/dist/cjs/src/constants/chains.d.ts +5 -70
  34. package/dist/cjs/src/constants/localstorage.d.ts +2 -0
  35. package/dist/cjs/src/constants/swap.d.ts +1 -0
  36. package/dist/cjs/src/hooks/Bridge/createBridgeOrder.d.ts +24 -0
  37. package/dist/cjs/src/hooks/Bridge/index.d.ts +4 -0
  38. package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +6 -0
  39. package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +101 -0
  40. package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.test.d.ts +1 -0
  41. package/dist/cjs/src/hooks/Bridge/useSendRoute.d.ts +16 -0
  42. package/dist/cjs/src/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -0
  43. package/dist/cjs/src/hooks/ConnectWallet/useSwitchChain.d.ts +10 -0
  44. package/dist/cjs/src/hooks/Submission/types.d.ts +2 -1
  45. package/dist/cjs/src/hooks/Submission/useExecution.d.ts +1 -1
  46. package/dist/cjs/src/hooks/Token/type.d.ts +1 -3
  47. package/dist/cjs/src/hooks/Token/useFetchTokenAllowance.d.ts +13 -0
  48. package/dist/cjs/src/hooks/Token/useGetCGTokenList.d.ts +6 -4
  49. package/dist/cjs/src/hooks/Token/useInitTokenList.d.ts +1 -1
  50. package/dist/cjs/src/hooks/Token/useSelectChainList.d.ts +77 -0
  51. package/dist/cjs/src/hooks/Token/useSelectChainList.test.d.ts +1 -0
  52. package/dist/cjs/src/hooks/Token/useTokenList.d.ts +5 -1
  53. package/dist/cjs/src/hooks/Token/useTokenListFetchBalance.d.ts +9 -0
  54. package/dist/cjs/src/hooks/Widget/useInitPropsToRedux.d.ts +1 -1
  55. package/dist/cjs/src/hooks/contract/contractConfig.d.ts +1 -26
  56. package/dist/cjs/src/hooks/contract/index.d.ts +1 -0
  57. package/dist/cjs/src/hooks/contract/token.d.ts +10 -0
  58. package/dist/cjs/src/hooks/contract/useFetchETHBalance.d.ts +1 -1
  59. package/dist/cjs/src/hooks/contract/useFetchTokens.d.ts +3 -1
  60. package/dist/cjs/src/hooks/contract/useMultiContract.d.ts +1 -21
  61. package/dist/cjs/src/store/actions/globals.d.ts +1 -0
  62. package/dist/cjs/src/store/actions/token.d.ts +1 -1
  63. package/dist/cjs/src/store/reducers/globals.d.ts +2 -0
  64. package/dist/cjs/src/store/reducers/token.d.ts +3 -1
  65. package/dist/cjs/src/store/selectors/globals.d.ts +1 -0
  66. package/dist/cjs/src/store/selectors/token.d.ts +3 -1
  67. package/dist/cjs/src/utils/address.d.ts +7 -0
  68. package/dist/cjs/src/utils/formatter.d.ts +2 -0
  69. package/dist/cjs/src/utils/time.d.ts +9 -0
  70. package/dist/cjs/src/utils/time.test.d.ts +1 -0
  71. package/dist/e63d558f5364d137.svg +10 -0
  72. package/dist/index.js +9 -8
  73. package/dist/locales/en-US.js +1 -1
  74. package/dist/src/components/Bridge/BridgeRouteShortCard.d.ts +6 -0
  75. package/dist/src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.d.ts +5 -0
  76. package/dist/src/components/Bridge/BridgeSummaryDialog/index.d.ts +17 -0
  77. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/CrossStep.d.ts +16 -0
  78. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/EtherscanLinkButton.d.ts +6 -0
  79. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/RouteSteps.d.ts +6 -0
  80. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/SwapStep.d.ts +14 -0
  81. package/dist/src/components/Bridge/SelectBridgeDialog/BridgeLogo.d.ts +10 -0
  82. package/dist/src/components/Bridge/SelectBridgeDialog/DirectionLine.d.ts +4 -0
  83. package/dist/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +21 -0
  84. package/dist/src/components/Bridge/SelectBridgeDialog/RouteTagList.d.ts +12 -0
  85. package/dist/src/components/Bridge/SelectBridgeDialog/TokenWithChain.d.ts +11 -0
  86. package/dist/src/components/Bridge/SelectBridgeDialog/index.d.ts +9 -0
  87. package/dist/src/components/Bridge/SelectBridgeDialog/productList.d.ts +5 -0
  88. package/dist/src/components/ErrorMessageDialog.d.ts +5 -0
  89. package/dist/src/components/Swap/components/SettingsDialog/index.d.ts +2 -1
  90. package/dist/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +2 -1
  91. package/dist/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +2 -1
  92. package/dist/src/components/Swap/components/TokenCard/index.d.ts +4 -1
  93. package/dist/src/components/SwitchChainDialog/index.d.ts +7 -0
  94. package/dist/src/components/TokenLogo.d.ts +2 -1
  95. package/dist/src/components/TokenPicker/SelectChainItem.d.ts +7 -0
  96. package/dist/src/components/TokenPicker/index.d.ts +2 -1
  97. package/dist/src/constants/api.d.ts +3 -0
  98. package/dist/src/constants/chainList.d.ts +10 -0
  99. package/dist/src/constants/chains.d.ts +5 -70
  100. package/dist/src/constants/localstorage.d.ts +2 -0
  101. package/dist/src/constants/swap.d.ts +1 -0
  102. package/dist/src/hooks/Bridge/createBridgeOrder.d.ts +24 -0
  103. package/dist/src/hooks/Bridge/index.d.ts +4 -0
  104. package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +6 -0
  105. package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +101 -0
  106. package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.test.d.ts +1 -0
  107. package/dist/src/hooks/Bridge/useSendRoute.d.ts +16 -0
  108. package/dist/src/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -0
  109. package/dist/src/hooks/ConnectWallet/useSwitchChain.d.ts +10 -0
  110. package/dist/src/hooks/Submission/types.d.ts +2 -1
  111. package/dist/src/hooks/Submission/useExecution.d.ts +1 -1
  112. package/dist/src/hooks/Token/type.d.ts +1 -3
  113. package/dist/src/hooks/Token/useFetchTokenAllowance.d.ts +13 -0
  114. package/dist/src/hooks/Token/useGetCGTokenList.d.ts +6 -4
  115. package/dist/src/hooks/Token/useInitTokenList.d.ts +1 -1
  116. package/dist/src/hooks/Token/useSelectChainList.d.ts +77 -0
  117. package/dist/src/hooks/Token/useSelectChainList.test.d.ts +1 -0
  118. package/dist/src/hooks/Token/useTokenList.d.ts +5 -1
  119. package/dist/src/hooks/Token/useTokenListFetchBalance.d.ts +9 -0
  120. package/dist/src/hooks/Widget/useInitPropsToRedux.d.ts +1 -1
  121. package/dist/src/hooks/contract/contractConfig.d.ts +1 -26
  122. package/dist/src/hooks/contract/index.d.ts +1 -0
  123. package/dist/src/hooks/contract/token.d.ts +10 -0
  124. package/dist/src/hooks/contract/useFetchETHBalance.d.ts +1 -1
  125. package/dist/src/hooks/contract/useFetchTokens.d.ts +3 -1
  126. package/dist/src/hooks/contract/useMultiContract.d.ts +1 -21
  127. package/dist/src/store/actions/globals.d.ts +1 -0
  128. package/dist/src/store/actions/token.d.ts +1 -1
  129. package/dist/src/store/reducers/globals.d.ts +2 -0
  130. package/dist/src/store/reducers/token.d.ts +3 -1
  131. package/dist/src/store/selectors/globals.d.ts +1 -0
  132. package/dist/src/store/selectors/token.d.ts +3 -1
  133. package/dist/src/utils/address.d.ts +7 -0
  134. package/dist/src/utils/formatter.d.ts +2 -0
  135. package/dist/src/utils/time.d.ts +9 -0
  136. package/dist/src/utils/time.test.d.ts +1 -0
  137. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{Trans as e,I18nProvider as t}from"@lingui/react";import r,{BigNumber as n}from"bignumber.js";import{merge as o,chunk as i,isArray as s,unionBy as a,debounce as c}from"lodash";import*as l from"react";import u,{forwardRef as d,useRef as h,useState as f,useEffect as p,cloneElement as m,useCallback as g,useMemo as y,useContext as b,createContext as v}from"react";import{ThemeContext as w,Global as x}from"@emotion/react";import{Loading as E,QuestionBorder as A,Search as R,Error as _,CaretUp as k,ErrorWarn as S,DoneBorder as N,ArrowTopRightBorder as M,ArrowBack as T,DoubleRight as O,DetailBorder as I,Done as F,Warn as W,Switch as C,Setting as j,Dodo as U}from"@dodoex/icons";import D from"@emotion/styled";import*as B from"react-dom";import V from"react-dom";import{useDispatch as P,useSelector as Z,Provider as z}from"react-redux";import L from"identicon.js";import{useWeb3React as H,initializeConnector as Y,Web3ReactProvider as X}from"@web3-react/core";import{configureStore as J}from"@reduxjs/toolkit";import{combineReducers as G}from"redux";import{Contract as q}from"@ethersproject/contracts";import{EIP1193 as K}from"@web3-react/eip1193";import{WalletConnect as Q}from"@web3-react/walletconnect-v2";import{MetaMask as $}from"@web3-react/metamask";import{Connector as ee}from"@web3-react/types";import te from"axios";import{_base36To16 as re,BigNumber as ne,parseFixed as oe}from"@ethersproject/bignumber";import{i18n as ie}from"@lingui/core";import{VariableSizeList as se}from"react-window";var ae,ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},le={exports:{}},ue={exports:{}},de={};var he,fe,pe,me,ge,ye,be,ve,we,xe,Ee,Ae,Re,_e,ke={};
1
+ import{Trans as e,I18nProvider as t}from"@lingui/react";import r,{BigNumber as n}from"bignumber.js";import{merge as o,isArray as i,unionBy as s,chunk as a,debounce as l}from"lodash";import*as c from"react";import u,{forwardRef as d,memo as p,useState as h,useRef as f,useCallback as m,useId as g,useEffect as y,useLayoutEffect as b,useMemo as x,cloneElement as v,createContext as w,useContext as E}from"react";import{ThemeContext as A,Global as k}from"@emotion/react";import{Loading as C,QuestionBorder as R,Done as T,Search as S,Error as N,CaretUp as M,ErrorWarn as F,DoneBorder as O,ArrowTopRightBorder as I,ArrowBack as j,DoubleRight as D,DetailBorder as _,Warn as B,Switch as P,Lock as W,Time as U,GasFee as L,ArrowRight as V,Setting as Z,Dodo as H}from"@dodoex/icons";import z from"@emotion/styled";import*as Y from"react-dom";import G from"react-dom";import{useSelector as X,useDispatch as J,Provider as q}from"react-redux";import Q from"identicon.js";import{initializeConnector as K,useWeb3React as $,Web3ReactProvider as ee}from"@web3-react/core";import{EIP1193 as te}from"@web3-react/eip1193";import{WalletConnect as re}from"@web3-react/walletconnect-v2";import{MetaMask as ne}from"@web3-react/metamask";import{Connector as oe}from"@web3-react/types";import{configureStore as ie}from"@reduxjs/toolkit";import{combineReducers as se}from"redux";import{_base36To16 as ae,BigNumber as le,parseFixed as ce}from"@ethersproject/bignumber";import{Contract as ue}from"@ethersproject/contracts";import{i18n as de}from"@lingui/core";import{FixedSizeList as pe}from"react-window";import he from"axios";var fe,me="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ge={exports:{}},ye={exports:{}},be={};var xe,ve,we,Ee,Ae,ke,Ce,Re,Te,Se,Ne,Me,Fe,Oe,Ie={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,12 +6,12 @@ import{Trans as e,I18nProvider as t}from"@lingui/react";import r,{BigNumber as n
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Se(){return fe||(fe=1,e=ue,"production"===process.env.NODE_ENV?e.exports=function(){if(ae)return de;ae=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case c:case l:case n:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case u:case p:case f:case s:return e;default:return h}}case r:return h}}}function w(e){return v(e)===l}return de.AsyncMode=c,de.ConcurrentMode=l,de.ContextConsumer=a,de.ContextProvider=s,de.Element=t,de.ForwardRef=u,de.Fragment=n,de.Lazy=p,de.Memo=f,de.Portal=r,de.Profiler=i,de.StrictMode=o,de.Suspense=d,de.isAsyncMode=function(e){return w(e)||v(e)===c},de.isConcurrentMode=w,de.isContextConsumer=function(e){return v(e)===a},de.isContextProvider=function(e){return v(e)===s},de.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},de.isForwardRef=function(e){return v(e)===u},de.isFragment=function(e){return v(e)===n},de.isLazy=function(e){return v(e)===p},de.isMemo=function(e){return v(e)===f},de.isPortal=function(e){return v(e)===r},de.isProfiler=function(e){return v(e)===i},de.isStrictMode=function(e){return v(e)===o},de.isSuspense=function(e){return v(e)===d},de.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===l||e===i||e===o||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},de.typeOf=v,de}():e.exports=(he||(he=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case c:case l:case n:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case a:case u:case p:case f:case s:return g;default:return h}}case r:return h}}}var w=c,x=l,E=a,A=s,R=t,_=u,k=n,S=p,N=f,M=r,T=i,O=o,I=d,F=!1;function W(e){return v(e)===l}ke.AsyncMode=w,ke.ConcurrentMode=x,ke.ContextConsumer=E,ke.ContextProvider=A,ke.Element=R,ke.ForwardRef=_,ke.Fragment=k,ke.Lazy=S,ke.Memo=N,ke.Portal=M,ke.Profiler=T,ke.StrictMode=O,ke.Suspense=I,ke.isAsyncMode=function(e){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(e)||v(e)===c},ke.isConcurrentMode=W,ke.isContextConsumer=function(e){return v(e)===a},ke.isContextProvider=function(e){return v(e)===s},ke.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ke.isForwardRef=function(e){return v(e)===u},ke.isFragment=function(e){return v(e)===n},ke.isLazy=function(e){return v(e)===p},ke.isMemo=function(e){return v(e)===f},ke.isPortal=function(e){return v(e)===r},ke.isProfiler=function(e){return v(e)===i},ke.isStrictMode=function(e){return v(e)===o},ke.isSuspense=function(e){return v(e)===d},ke.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===l||e===i||e===o||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},ke.typeOf=v}()),ke)),ue.exports;var e}
9
+ */function je(){return ve||(ve=1,e=ye,"production"===process.env.NODE_ENV?e.exports=function(){if(fe)return be;fe=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case n:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case u:case f:case h:case s:return e;default:return p}}case r:return p}}}function v(e){return x(e)===c}return be.AsyncMode=l,be.ConcurrentMode=c,be.ContextConsumer=a,be.ContextProvider=s,be.Element=t,be.ForwardRef=u,be.Fragment=n,be.Lazy=f,be.Memo=h,be.Portal=r,be.Profiler=i,be.StrictMode=o,be.Suspense=d,be.isAsyncMode=function(e){return v(e)||x(e)===l},be.isConcurrentMode=v,be.isContextConsumer=function(e){return x(e)===a},be.isContextProvider=function(e){return x(e)===s},be.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},be.isForwardRef=function(e){return x(e)===u},be.isFragment=function(e){return x(e)===n},be.isLazy=function(e){return x(e)===f},be.isMemo=function(e){return x(e)===h},be.isPortal=function(e){return x(e)===r},be.isProfiler=function(e){return x(e)===i},be.isStrictMode=function(e){return x(e)===o},be.isSuspense=function(e){return x(e)===d},be.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},be.typeOf=x,be}():e.exports=(xe||(xe=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var m=e.type;switch(m){case l:case c:case n:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case a:case u:case f:case h:case s:return g;default:return p}}case r:return p}}}var v=l,w=c,E=a,A=s,k=t,C=u,R=n,T=f,S=h,N=r,M=i,F=o,O=d,I=!1;function j(e){return x(e)===c}Ie.AsyncMode=v,Ie.ConcurrentMode=w,Ie.ContextConsumer=E,Ie.ContextProvider=A,Ie.Element=k,Ie.ForwardRef=C,Ie.Fragment=R,Ie.Lazy=T,Ie.Memo=S,Ie.Portal=N,Ie.Profiler=M,Ie.StrictMode=F,Ie.Suspense=O,Ie.isAsyncMode=function(e){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(e)||x(e)===l},Ie.isConcurrentMode=j,Ie.isContextConsumer=function(e){return x(e)===a},Ie.isContextProvider=function(e){return x(e)===s},Ie.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ie.isForwardRef=function(e){return x(e)===u},Ie.isFragment=function(e){return x(e)===n},Ie.isLazy=function(e){return x(e)===f},Ie.isMemo=function(e){return x(e)===h},Ie.isPortal=function(e){return x(e)===r},Ie.isProfiler=function(e){return x(e)===i},Ie.isStrictMode=function(e){return x(e)===o},Ie.isSuspense=function(e){return x(e)===d},Ie.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},Ie.typeOf=x}()),Ie)),ye.exports;var e}
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */function Ne(){if(ye)return ge;ye=1;return ge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Me(){return ve?be:(ve=1,be=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Te=Se();le.exports=function(){if(Ae)return Ee;Ae=1;var e=Se(),t=function(){if(me)return pe;me=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}return pe=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(o,i){for(var s,a,c=n(o),l=1;l<arguments.length;l++){for(var u in s=Object(arguments[l]))t.call(s,u)&&(c[u]=s[u]);if(e){a=e(s);for(var d=0;d<a.length;d++)r.call(s,a[d])&&(c[a[d]]=s[a[d]])}}return c},pe}(),r=Ne(),n=Me(),o=function(){if(xe)return we;xe=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ne(),r={},n=Me();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,c){if("production"!==process.env.NODE_ENV)for(var l in o)if(n(o,l)){var u;try{if("function"!=typeof o[l]){var d=Error((a||"React class")+": "+s+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[l](i,l,a,s,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((a||"React class")+": type specification of "+s+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in r)){r[u.message]=!0;var h=c?c():"";e("Failed "+s+" type: "+u.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},we=o}(),i=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Ee=function(a,c){var l="function"==typeof Symbol&&Symbol.iterator,u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:p(s),arrayOf:function(e){return p((function(t,n,o,i,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new f("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<a.length;c++){var l=e(a,c,o,i,s+"["+c+"]",r);if(l instanceof Error)return l}return null}))},element:p((function(e,t,r,n,o){var i=e[t];return a(i)?null:new f("Invalid "+n+" `"+o+"` of type `"+b(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:p((function(t,r,n,o,i){var s=t[r];return e.isValidElementType(s)?null:new f("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,r,n,o,i){if(!(t[r]instanceof e)){var s=e.name||u;return new f("Invalid "+o+" `"+i+"` of type `"+((a=t[r]).constructor&&a.constructor.name?a.constructor.name:u)+"` supplied to `"+n+"`, expected instance of `"+s+"`.")}var a;return null}))},node:p((function(e,t,r,n,o){return y(e[t])?null:new f("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,o,i,s,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var c=t[o],l=b(c);if("object"!==l)return new f("Invalid "+s+" `"+a+"` of type `"+l+"` supplied to `"+i+"`, expected an object.");for(var u in c)if(n(c,u)){var d=e(c,u,i,s,a+"."+u,r);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),s;function t(t,r,n,o,i){for(var s=t[r],a=0;a<e.length;a++)if(h(s,e[a]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new f("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+n+"`, expected one of "+c+".")}return p(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),s}return p((function(t,o,i,s,a){for(var c=[],l=0;l<e.length;l++){var u=(0,e[l])(t,o,i,s,a,r);if(null==u)return null;u.data&&n(u.data,"expectedType")&&c.push(u.data.expectedType)}return new f("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,n,o,i,s){var a=t[n],c=b(a);if("object"!==c)return new f("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var l in e){var u=e[l];if("function"!=typeof u)return g(o,i,s,l,v(u));var d=u(a,l,o,i,s+"."+l,r);if(d)return d}return null}))},exact:function(e){return p((function(o,i,s,a,c){var l=o[i],u=b(l);if("object"!==u)return new f("Invalid "+a+" `"+c+"` of type `"+u+"` supplied to `"+s+"`, expected `object`.");var d=t({},o[i],e);for(var h in d){var p=e[h];if(n(e,h)&&"function"!=typeof p)return g(s,a,c,h,v(p));if(!p)return new f("Invalid "+a+" `"+c+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(l,h,s,a,c+"."+h,r);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},n=0;function o(o,s,a,l,d,h,p){if(l=l||u,h=h||a,p!==r){if(c){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=l+":"+a;!t[g]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,n++)}}return null==s[a]?o?null===s[a]?new f("The "+d+" `"+h+"` is marked as required in `"+l+"`, but its value is `null`."):new f("The "+d+" `"+h+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,a,l,d,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return p((function(t,r,n,o,i,s){var a=t[r];return b(a)!==e?new f("Invalid "+o+" `"+i+"` of type `"+v(a)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,r,n,o){return new f((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||a(e))return!0;var t=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var r,n=t.call(e);if(t!==e.entries){for(;!(r=n.next()).done;)if(!y(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Ee}()(Te.isElement,!0)}else le.exports=function(){if(_e)return Re;_e=1;var e=Ne();function t(){}function r(){}return r.resetWarningCache=t,Re=function(){function n(t,r,n,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}()();var Oe,Ie={exports:{}},Fe={};var We,Ce,je={};
14
+ */function De(){if(ke)return Ae;ke=1;return Ae="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function _e(){return Re?Ce:(Re=1,Ce=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Be=je();ge.exports=function(){if(Me)return Ne;Me=1;var e=je(),t=function(){if(Ee)return we;Ee=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}return we=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(o,i){for(var s,a,l=n(o),c=1;c<arguments.length;c++){for(var u in s=Object(arguments[c]))t.call(s,u)&&(l[u]=s[u]);if(e){a=e(s);for(var d=0;d<a.length;d++)r.call(s,a[d])&&(l[a[d]]=s[a[d]])}}return l},we}(),r=De(),n=_e(),o=function(){if(Se)return Te;Se=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=De(),r={},n=_e();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(n(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,c,a,s,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in r)){r[u.message]=!0;var p=l?l():"";e("Failed "+s+" type: "+u.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},Te=o}(),i=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Ne=function(a,l){var c="function"==typeof Symbol&&Symbol.iterator,u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(s),arrayOf:function(e){return f((function(t,n,o,i,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new h("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",r);if(c instanceof Error)return c}return null}))},element:f((function(e,t,r,n,o){var i=e[t];return a(i)?null:new h("Invalid "+n+" `"+o+"` of type `"+b(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:f((function(t,r,n,o,i){var s=t[r];return e.isValidElementType(s)?null:new h("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,r,n,o,i){if(!(t[r]instanceof e)){var s=e.name||u;return new h("Invalid "+o+" `"+i+"` of type `"+((a=t[r]).constructor&&a.constructor.name?a.constructor.name:u)+"` supplied to `"+n+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,r,n,o){return y(e[t])?null:new h("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new h("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(n(l,u)){var d=e(l,u,i,s,a+"."+u,r);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),s;function t(t,r,n,o,i){for(var s=t[r],a=0;a<e.length;a++)if(p(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===x(t)?String(t):t}));return new h("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+n+"`, expected one of "+l+".")}return f(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+v(o)+" at index "+t+"."),s}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,s,a,r);if(null==u)return null;u.data&&n(u.data,"expectedType")&&l.push(u.data.expectedType)}return new h("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,n,o,i,s){var a=t[n],l=b(a);if("object"!==l)return new h("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,s,c,x(u));var d=u(a,c,o,i,s+"."+c,r);if(d)return d}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],u=b(c);if("object"!==u)return new h("Invalid "+a+" `"+l+"` of type `"+u+"` supplied to `"+s+"`, expected `object`.");var d=t({},o[i],e);for(var p in d){var f=e[p];if(n(e,p)&&"function"!=typeof f)return g(s,a,l,p,x(f));if(!f)return new h("Invalid "+a+" `"+l+"` key `"+p+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,p,s,a,l+"."+p,r);if(m)return m}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},n=0;function o(o,s,a,c,d,p,f){if(c=c||u,p=p||a,f!==r){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,n++)}}return null==s[a]?o?null===s[a]?new h("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,d,p)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,r,n,o,i,s){var a=t[r];return b(a)!==e?new h("Invalid "+o+" `"+i+"` of type `"+x(a)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,r,n,o){return new h((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||a(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var r,n=t.call(e);if(t!==e.entries){for(;!(r=n.next()).done;)if(!y(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function x(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Ne}()(Be.isElement,!0)}else ge.exports=function(){if(Oe)return Fe;Oe=1;var e=De();function t(){}function r(){}return r.resetWarningCache=t,Fe=function(){function n(t,r,n,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}()();var Pe,We={exports:{}},Ue={};var Le,Ve,Ze={};
15
15
  /**
16
16
  * @license React
17
17
  * react-jsx-runtime.development.js
@@ -20,20 +20,21 @@ object-assign
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */function Ue(){return We||(We=1,"production"!==process.env.NODE_ENV&&function(){var e=u,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator;var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];b("error",e,r)}function b(e,t,r){var n=g.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]));var o=r.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var v;function w(e){return e.displayName||"Context"}function x(e){if(null==e)return null;if("number"==typeof e.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return w(e)+".Consumer";case s:return w(e._context)+".Provider";case c:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:x(e.type)||"Memo";case f:var u=e,p=u._payload,m=u._init;try{return x(m(p))}catch(e){return null}}return null}v=Symbol.for("react.module.reference");var E,A,R,_,k,S,N,M=Object.assign,T=0;function O(){}O.__reactDisabledLog=!0;var I,F=g.ReactCurrentDispatcher;function W(e,t,r){if(void 0===I)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);I=n&&n[1]||""}return"\n"+I+e}var C,j=!1,U="function"==typeof WeakMap?WeakMap:Map;function D(e,t){if(!e||j)return"";var r,n=C.get(e);if(void 0!==n)return n;j=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=F.current,F.current=null,function(){if(0===T){E=console.log,A=console.info,R=console.warn,_=console.error,k=console.group,S=console.groupCollapsed,N=console.groupEnd;var e={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}T++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){r=e}Reflect.construct(e,[],s)}else{try{s.call()}catch(e){r=e}e.call(s.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),c=r.stack.split("\n"),l=a.length-1,u=c.length-1;l>=1&&u>=0&&a[l]!==c[u];)u--;for(;l>=1&&u>=0;l--,u--)if(a[l]!==c[u]){if(1!==l||1!==u)do{if(l--,--u<0||a[l]!==c[u]){var d="\n"+a[l].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&C.set(e,d),d}}while(l>=1&&u>=0);break}}}finally{j=!1,F.current=o,function(){if(0==--T){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:E}),info:M({},e,{value:A}),warn:M({},e,{value:R}),error:M({},e,{value:_}),group:M({},e,{value:k}),groupCollapsed:M({},e,{value:S}),groupEnd:M({},e,{value:N})})}T<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var h=e?e.displayName||e.name:"",f=h?W(h):"";return"function"==typeof e&&C.set(e,f),f}function B(e,t,r){if(null==e)return"";if("function"==typeof e)return D(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return W(e);switch(e){case l:return W("Suspense");case d:return W("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return function(e,t,r){return D(e,!1)}(e.render);case h:return B(e.type,t,r);case f:var o=e,i=o._payload,s=o._init;try{return B(s(i),t,r)}catch(e){}}return""}C=new U;var V=Object.prototype.hasOwnProperty,P={},Z=g.ReactDebugCurrentFrame;function z(e){if(e){var t=e._owner,r=B(e.type,e._source,t?t.type:null);Z.setExtraStackFrame(r)}else Z.setExtraStackFrame(null)}var L=Array.isArray;function H(e){return L(e)}function Y(e){return""+e}function X(e){if(function(e){try{return Y(e),!1}catch(e){return!0}}(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Y(e)}var J,G,q,K=g.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};q={};function $(e,r,n,o,i){var s,a={},c=null,l=null;for(s in void 0!==n&&(X(n),c=""+n),function(e){if(V.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(X(r.key),c=""+r.key),function(e){if(V.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(r)&&(l=r.ref,function(e,t){if("string"==typeof e.ref&&K.current&&t&&K.current.stateNode!==t){var r=x(K.current.type);q[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',x(K.current.type),e.ref),q[r]=!0)}}(r,i)),r)V.call(r,s)&&!Q.hasOwnProperty(s)&&(a[s]=r[s]);if(e&&e.defaultProps){var u=e.defaultProps;for(s in u)void 0===a[s]&&(a[s]=u[s])}if(c||l){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,t){var r=function(){J||(J=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(a,d),l&&function(e,t){var r=function(){G||(G=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(a,d)}return function(e,r,n,o,i,s,a){var c={$$typeof:t,type:e,key:r,ref:n,props:a,_owner:s,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}(e,c,l,i,o,K.current,a)}var ee,te=g.ReactCurrentOwner,re=g.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,r=B(e.type,e._source,t?t.type:null);re.setExtraStackFrame(r)}else re.setExtraStackFrame(null)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ie(){if(te.current){var e=x(te.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ee=!1;var se={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=ie();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!se[r]){se[r]=!0;var n="";e&&e._owner&&e._owner!==te.current&&(n=" It was passed a child from "+x(e._owner.type)+"."),ne(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),ne(null)}}}function ce(e,t){if("object"==typeof e)if(H(e))for(var r=0;r<e.length;r++){var n=e[r];oe(n)&&ae(n,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)oe(i.value)&&ae(i.value,t)}}function le(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==h)return;t=r.propTypes}if(t){var n=x(r);!function(e,t,r,n,o){var i=Function.call.bind(V);for(var s in e)if(i(e,s)){var a=void 0;try{if("function"!=typeof e[s]){var c=Error((n||"React class")+": "+r+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[s](t,s,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(z(o),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,s,typeof a),z(null)),a instanceof Error&&!(a.message in P)&&(P[a.message]=!0,z(o),y("Failed %s type: %s",r,a.message),z(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!ee){ee=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",x(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ue(e,r,u,m,g,b){var w=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===o||e===l||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===s||e.$$typeof===a||e.$$typeof===c||e.$$typeof===v||void 0!==e.getModuleId)}(e);if(!w){var E="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var A,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(g);E+=R||ie(),null===e?A="null":H(e)?A="array":void 0!==e&&e.$$typeof===t?(A="<"+(x(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):A=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",A,E)}var _=$(e,r,u,g,b);if(null==_)return _;if(w){var k=r.children;if(void 0!==k)if(m)if(H(k)){for(var S=0;S<k.length;S++)ce(k[S],e);Object.freeze&&Object.freeze(k)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ce(k,e)}return e===n?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){ne(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ne(null);break}}null!==e.ref&&(ne(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(_):le(_),_}var de=function(e,t,r){return ue(e,t,r,!1)},he=function(e,t,r){return ue(e,t,r,!0)};je.Fragment=n,je.jsx=de,je.jsxs=he}()),je}Ce=Ie,"production"===process.env.NODE_ENV?Ce.exports=function(){if(Oe)return Fe;Oe=1;var e=u,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,s){var a,c={},l=null,u=null;for(a in void 0!==s&&(l=""+s),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)n.call(r,a)&&!i.hasOwnProperty(a)&&(c[a]=r[a]);if(e&&e.defaultProps)for(a in r=e.defaultProps)void 0===c[a]&&(c[a]=r[a]);return{$$typeof:t,type:e,key:l,ref:u,props:c,_owner:o.current}}return Fe.Fragment=r,Fe.jsx=s,Fe.jsxs=s,Fe}():Ce.exports=Ue();var De,Be={exports:{}},Ve={};var Pe,Ze={};
24
- /** @license React v17.0.2
23
+ */function He(){return Le||(Le=1,"production"!==process.env.NODE_ENV&&function(){var e=u,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator;var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];b("error",e,r)}function b(e,t,r){var n=g.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]));var o=r.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var x;function v(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return v(e)+".Consumer";case s:return v(e._context)+".Provider";case l:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case h:var u=e,f=u._payload,m=u._init;try{return w(m(f))}catch(e){return null}}return null}x=Symbol.for("react.module.reference");var E,A,k,C,R,T,S,N=Object.assign,M=0;function F(){}F.__reactDisabledLog=!0;var O,I=g.ReactCurrentDispatcher;function j(e,t,r){if(void 0===O)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);O=n&&n[1]||""}return"\n"+O+e}var D,_=!1,B="function"==typeof WeakMap?WeakMap:Map;function P(e,t){if(!e||_)return"";var r,n=D.get(e);if(void 0!==n)return n;_=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=I.current,I.current=null,function(){if(0===M){E=console.log,A=console.info,k=console.warn,C=console.error,R=console.group,T=console.groupCollapsed,S=console.groupEnd;var e={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){r=e}Reflect.construct(e,[],s)}else{try{s.call()}catch(e){r=e}e.call(s.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),l=r.stack.split("\n"),c=a.length-1,u=l.length-1;c>=1&&u>=0&&a[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==l[u]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{_=!1,I.current=o,function(){if(0==--M){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:E}),info:N({},e,{value:A}),warn:N({},e,{value:k}),error:N({},e,{value:C}),group:N({},e,{value:R}),groupCollapsed:N({},e,{value:T}),groupEnd:N({},e,{value:S})})}M<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",h=p?j(p):"";return"function"==typeof e&&D.set(e,h),h}function W(e,t,r){if(null==e)return"";if("function"==typeof e)return P(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return j(e);switch(e){case c:return j("Suspense");case d:return j("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return function(e,t,r){return P(e,!1)}(e.render);case p:return W(e.type,t,r);case h:var o=e,i=o._payload,s=o._init;try{return W(s(i),t,r)}catch(e){}}return""}D=new B;var U=Object.prototype.hasOwnProperty,L={},V=g.ReactDebugCurrentFrame;function Z(e){if(e){var t=e._owner,r=W(e.type,e._source,t?t.type:null);V.setExtraStackFrame(r)}else V.setExtraStackFrame(null)}var H=Array.isArray;function z(e){return H(e)}function Y(e){return""+e}function G(e){if(function(e){try{return Y(e),!1}catch(e){return!0}}(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Y(e)}var X,J,q,Q=g.ReactCurrentOwner,K={key:!0,ref:!0,__self:!0,__source:!0};q={};function $(e,r,n,o,i){var s,a={},l=null,c=null;for(s in void 0!==n&&(G(n),l=""+n),function(e){if(U.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(G(r.key),l=""+r.key),function(e){if(U.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(r)&&(c=r.ref,function(e,t){if("string"==typeof e.ref&&Q.current&&t&&Q.current.stateNode!==t){var r=w(Q.current.type);q[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(Q.current.type),e.ref),q[r]=!0)}}(r,i)),r)U.call(r,s)&&!K.hasOwnProperty(s)&&(a[s]=r[s]);if(e&&e.defaultProps){var u=e.defaultProps;for(s in u)void 0===a[s]&&(a[s]=u[s])}if(l||c){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var r=function(){X||(X=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(a,d),c&&function(e,t){var r=function(){J||(J=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(a,d)}return function(e,r,n,o,i,s,a){var l={$$typeof:t,type:e,key:r,ref:n,props:a,_owner:s,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,c,i,o,Q.current,a)}var ee,te=g.ReactCurrentOwner,re=g.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,r=W(e.type,e._source,t?t.type:null);re.setExtraStackFrame(r)}else re.setExtraStackFrame(null)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ie(){if(te.current){var e=w(te.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ee=!1;var se={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=ie();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!se[r]){se[r]=!0;var n="";e&&e._owner&&e._owner!==te.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),ne(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),ne(null)}}}function le(e,t){if("object"==typeof e)if(z(e))for(var r=0;r<e.length;r++){var n=e[r];oe(n)&&ae(n,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)oe(i.value)&&ae(i.value,t)}}function ce(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==l&&r.$$typeof!==p)return;t=r.propTypes}if(t){var n=w(r);!function(e,t,r,n,o){var i=Function.call.bind(U);for(var s in e)if(i(e,s)){var a=void 0;try{if("function"!=typeof e[s]){var l=Error((n||"React class")+": "+r+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[s](t,s,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(Z(o),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,s,typeof a),Z(null)),a instanceof Error&&!(a.message in L)&&(L[a.message]=!0,Z(o),y("Failed %s type: %s",r,a.message),Z(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!ee){ee=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ue(e,r,u,m,g,b){var v=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===o||e===c||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===x||void 0!==e.getModuleId)}(e);if(!v){var E="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var A,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(g);E+=k||ie(),null===e?A="null":z(e)?A="array":void 0!==e&&e.$$typeof===t?(A="<"+(w(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):A=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",A,E)}var C=$(e,r,u,g,b);if(null==C)return C;if(v){var R=r.children;if(void 0!==R)if(m)if(z(R)){for(var T=0;T<R.length;T++)le(R[T],e);Object.freeze&&Object.freeze(R)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else le(R,e)}return e===n?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){ne(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ne(null);break}}null!==e.ref&&(ne(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(C):ce(C),C}var de=function(e,t,r){return ue(e,t,r,!1)},pe=function(e,t,r){return ue(e,t,r,!0)};Ze.Fragment=n,Ze.jsx=de,Ze.jsxs=pe}()),Ze}Ve=We,"production"===process.env.NODE_ENV?Ve.exports=function(){if(Pe)return Ue;Pe=1;var e=u,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,s){var a,l={},c=null,u=null;for(a in void 0!==s&&(c=""+s),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)n.call(r,a)&&!i.hasOwnProperty(a)&&(l[a]=r[a]);if(e&&e.defaultProps)for(a in r=e.defaultProps)void 0===l[a]&&(l[a]=r[a]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return Ue.Fragment=r,Ue.jsx=s,Ue.jsxs=s,Ue}():Ve.exports=He();var ze,Ye={exports:{}},Ge={};var Xe,Je={};
24
+ /**
25
+ * @license React
25
26
  * react-is.development.js
26
27
  *
27
28
  * Copyright (c) Facebook, Inc. and its affiliates.
28
29
  *
29
30
  * This source code is licensed under the MIT license found in the
30
31
  * LICENSE file in the root directory of this source tree.
31
- */function ze(e){const{styles:t,defaultTheme:r={}}=e;return Ie.exports.jsx(x,{styles:"function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t})}
32
+ */function qe(e){const{styles:t,defaultTheme:r={}}=e;return We.exports.jsx(k,{styles:"function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t})}
32
33
  /** @license MUI v5.10.8
33
34
  *
34
35
  * This source code is licensed under the MIT license found in the
35
36
  * LICENSE file in the root directory of this source tree.
36
- */function Le(e,t){const r=D(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const n="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${n})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${n})(...args) API requires all its args to be defined.`),r(...t)}:r}!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(De)return Ve;De=1;var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,s=60110,a=60112,c=60113,l=60120,u=60115,d=60116,h=60121,f=60122,p=60117,m=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),r=y("react.fragment"),n=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),s=y("react.context"),a=y("react.forward_ref"),c=y("react.suspense"),l=y("react.suspense_list"),u=y("react.memo"),d=y("react.lazy"),h=y("react.block"),f=y("react.server.block"),p=y("react.fundamental"),m=y("react.debug_trace_mode"),g=y("react.legacy_hidden")}function b(h){if("object"==typeof h&&null!==h){var f=h.$$typeof;switch(f){case e:switch(h=h.type){case r:case o:case n:case c:case l:return h;default:switch(h=h&&h.$$typeof){case s:case a:case d:case u:case i:return h;default:return f}}case t:return f}}}var v=i,w=e,x=a,E=r,A=d,R=u,_=t,k=o,S=n,N=c;return Ve.ContextConsumer=s,Ve.ContextProvider=v,Ve.Element=w,Ve.ForwardRef=x,Ve.Fragment=E,Ve.Lazy=A,Ve.Memo=R,Ve.Portal=_,Ve.Profiler=k,Ve.StrictMode=S,Ve.Suspense=N,Ve.isAsyncMode=function(){return!1},Ve.isConcurrentMode=function(){return!1},Ve.isContextConsumer=function(e){return b(e)===s},Ve.isContextProvider=function(e){return b(e)===i},Ve.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Ve.isForwardRef=function(e){return b(e)===a},Ve.isFragment=function(e){return b(e)===r},Ve.isLazy=function(e){return b(e)===d},Ve.isMemo=function(e){return b(e)===u},Ve.isPortal=function(e){return b(e)===t},Ve.isProfiler=function(e){return b(e)===o},Ve.isStrictMode=function(e){return b(e)===n},Ve.isSuspense=function(e){return b(e)===c},Ve.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===o||e===m||e===n||e===c||e===l||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===i||e.$$typeof===s||e.$$typeof===a||e.$$typeof===p||e.$$typeof===h||e[0]===f)},Ve.typeOf=b,Ve}():e.exports=(Pe||(Pe=1,"production"!==process.env.NODE_ENV&&function(){var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,s=60110,a=60112,c=60113,l=60120,u=60115,d=60116,h=60121,f=60122,p=60117,m=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),r=y("react.fragment"),n=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),s=y("react.context"),a=y("react.forward_ref"),c=y("react.suspense"),l=y("react.suspense_list"),u=y("react.memo"),d=y("react.lazy"),h=y("react.block"),f=y("react.server.block"),p=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),m=y("react.debug_trace_mode"),y("react.offscreen"),g=y("react.legacy_hidden")}function b(h){if("object"==typeof h&&null!==h){var f=h.$$typeof;switch(f){case e:var p=h.type;switch(p){case r:case o:case n:case c:case l:return p;default:var m=p&&p.$$typeof;switch(m){case s:case a:case d:case u:case i:return m;default:return f}}case t:return f}}}var v=s,w=i,x=e,E=a,A=r,R=d,_=u,k=t,S=o,N=n,M=c,T=!1,O=!1;Ze.ContextConsumer=v,Ze.ContextProvider=w,Ze.Element=x,Ze.ForwardRef=E,Ze.Fragment=A,Ze.Lazy=R,Ze.Memo=_,Ze.Portal=k,Ze.Profiler=S,Ze.StrictMode=N,Ze.Suspense=M,Ze.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Ze.isConcurrentMode=function(e){return O||(O=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Ze.isContextConsumer=function(e){return b(e)===s},Ze.isContextProvider=function(e){return b(e)===i},Ze.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Ze.isForwardRef=function(e){return b(e)===a},Ze.isFragment=function(e){return b(e)===r},Ze.isLazy=function(e){return b(e)===d},Ze.isMemo=function(e){return b(e)===u},Ze.isPortal=function(e){return b(e)===t},Ze.isProfiler=function(e){return b(e)===o},Ze.isStrictMode=function(e){return b(e)===n},Ze.isSuspense=function(e){return b(e)===c},Ze.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===o||e===m||e===n||e===c||e===l||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===i||e.$$typeof===s||e.$$typeof===a||e.$$typeof===p||e.$$typeof===h||e[0]===f)},Ze.typeOf=b}()),Ze)}(Be),"production"!==process.env.NODE_ENV&&(ze.propTypes={defaultTheme:le.exports.object,styles:le.exports.oneOfType([le.exports.string,le.exports.object,le.exports.func])});var He="production"!==process.env.NODE_ENV?le.exports.oneOfType([le.exports.number,le.exports.string,le.exports.object,le.exports.array]):{};function Ye(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...r){return e(...r)||t(...r)}}function Xe(){return Xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xe.apply(this,arguments)}function Je(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Ge(e,t,r={clone:!0}){const n=r.clone?Xe({},e):e;return Je(e)&&Je(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(Je(t[o])&&o in e&&Je(e[o])?n[o]=Ge(e[o],t[o],r):n[o]=t[o])})),n}function qe(e,t,r,n,o){const i=e[t],s=o||t;if(null==i||"undefined"==typeof window)return null;let a;const c=i.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ke=Ye(le.exports.element,qe);Ke.isRequired=Ye(le.exports.element.isRequired,qe);var Qe=Ke;function $e(e){return"production"===process.env.NODE_ENV?e:Xe({},e,{"exact-prop: ​":t=>{const r=Object.keys(t).filter((t=>!e.hasOwnProperty(t)));return r.length>0?new Error(`The following props are not supported: ${r.map((e=>`\`${e}\``)).join(", ")}. Please remove them.`):null}})}function et(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const tt=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function rt(e,t=""){return e.displayName||e.name||function(e){const t=`${e}`.match(tt);return t&&t[1]||""}(e)||t}function nt(e,t,r){const n=rt(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function ot(e,t,r,n,o){if("production"===process.env.NODE_ENV)return null;const i=e[t],s=o||t;return null==i?null:i&&1!==i.nodeType?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an HTMLElement.`):null}var it=le.exports.oneOfType([le.exports.func,le.exports.object]);function st(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":et(7));return e.charAt(0).toUpperCase()+e.slice(1)}function at(e){return e&&e.ownerDocument||document}function ct(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var lt="undefined"!=typeof window?l.useLayoutEffect:l.useEffect;function ut(...e){return l.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{ct(e,t)}))}),e)}let dt,ht=!0,ft=!1;const pt={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function mt(e){e.metaKey||e.altKey||e.ctrlKey||(ht=!0)}function gt(){ht=!1}function yt(){"hidden"===this.visibilityState&&ft&&(ht=!0)}function bt(){const e=l.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",mt,!0),t.addEventListener("mousedown",gt,!0),t.addEventListener("pointerdown",gt,!0),t.addEventListener("touchstart",gt,!0),t.addEventListener("visibilitychange",yt,!0))}),[]),t=l.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return ht||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!pt[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(ft=!0,window.clearTimeout(dt),dt=window.setTimeout((()=>{ft=!1}),100),t.current=!1,!0)},ref:e}}const vt=e=>e;var wt=(()=>{let e=vt;return{configure(t){e=t},generate:t=>e(t),reset(){e=vt}}})();const xt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Et(e,t,r="Mui"){const n=xt[t];return n?`${r}-${n}`:`${wt.generate(e)}-${t}`}function At(e,t,r="Mui"){const n={};return t.forEach((t=>{n[t]=Et(e,t,r)})),n}function Rt(e,t){return t?Ge(e,t,{clone:!1}):e}const _t={xs:0,sm:600,md:900,lg:1200,xl:1536},kt={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${_t[e]}px)`};function St(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||kt;return t.reduce(((n,o,i)=>(n[e.up(e.keys[i])]=r(t[i]),n)),{})}if("object"==typeof t){const e=n.breakpoints||kt;return Object.keys(t).reduce(((n,o)=>{if(-1!==Object.keys(e.values||_t).indexOf(o))n[e.up(o)]=r(t[o],o);else{const e=o;n[e]=t[e]}return n}),{})}return r(t)}function Nt(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Mt(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:Nt(e,r)||n,t&&(o=t(o)),o}function Tt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],s=Nt(e.theme,n)||{};return St(e,i,(e=>{let n=Mt(s,o,e);return e===n&&"string"==typeof e&&(n=Mt(s,o,`${t}${"default"===e?"":st(e)}`,e)),!1===r?n:{[r]:n}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:He}:{},i.filterProps=[t],i}function Ot(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),r=e=>Object.keys(e).reduce(((r,n)=>t[n]?Rt(r,t[n](e)):r),{});return r.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},r.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),r}const It={m:"margin",p:"padding"},Ft={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wt={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ct=function(e){const t={};return e=>(void 0===t[e]&&(t[e]=(e=>{if(e.length>2){if(!Wt[e])return[e];e=Wt[e]}const[t,r]=e.split(""),n=It[t],o=Ft[r]||"";return Array.isArray(o)?o.map((e=>n+e)):[n+o]})(e)),t[e])}(),jt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ut=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Dt=[...jt,...Ut];function Bt(e,t,r,n){var o;const i=null!=(o=Nt(e,t,!1))?o:r;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Vt(e){return Bt(e,"spacing",8,"spacing")}function Pt(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function Zt(e){return function(e,t){const r=Vt(e.theme);return Object.keys(e).map((n=>function(e,t,r,n){if(-1===t.indexOf(r))return null;const o=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=Pt(t,r),e)),{})}(Ct(r),n);return St(e,e[r],o)}(e,t,n,r))).reduce(Rt,{})}(e,Dt)}function zt(e){return"number"!=typeof e?e:`${e}px solid`}"production"===process.env.NODE_ENV||jt.reduce(((e,t)=>(e[t]=He,e)),{}),"production"===process.env.NODE_ENV||Ut.reduce(((e,t)=>(e[t]=He,e)),{}),Zt.propTypes="production"!==process.env.NODE_ENV?Dt.reduce(((e,t)=>(e[t]=He,e)),{}):{},Zt.filterProps=Dt;const Lt=Tt({prop:"border",themeKey:"borders",transform:zt}),Ht=Tt({prop:"borderTop",themeKey:"borders",transform:zt}),Yt=Tt({prop:"borderRight",themeKey:"borders",transform:zt}),Xt=Tt({prop:"borderBottom",themeKey:"borders",transform:zt}),Jt=Tt({prop:"borderLeft",themeKey:"borders",transform:zt}),Gt=Tt({prop:"borderColor",themeKey:"palette"}),qt=Tt({prop:"borderTopColor",themeKey:"palette"}),Kt=Tt({prop:"borderRightColor",themeKey:"palette"}),Qt=Tt({prop:"borderBottomColor",themeKey:"palette"}),$t=Tt({prop:"borderLeftColor",themeKey:"palette"}),er=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Bt(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:Pt(t,e)});return St(e,e.borderRadius,r)}return null};er.propTypes="production"!==process.env.NODE_ENV?{borderRadius:He}:{},er.filterProps=["borderRadius"];var tr=Ot(Lt,Ht,Yt,Xt,Jt,Gt,qt,Kt,Qt,$t,er),rr=Ot(Tt({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),Tt({prop:"display"}),Tt({prop:"overflow"}),Tt({prop:"textOverflow"}),Tt({prop:"visibility"}),Tt({prop:"whiteSpace"})),nr=Ot(Tt({prop:"flexBasis"}),Tt({prop:"flexDirection"}),Tt({prop:"flexWrap"}),Tt({prop:"justifyContent"}),Tt({prop:"alignItems"}),Tt({prop:"alignContent"}),Tt({prop:"order"}),Tt({prop:"flex"}),Tt({prop:"flexGrow"}),Tt({prop:"flexShrink"}),Tt({prop:"alignSelf"}),Tt({prop:"justifyItems"}),Tt({prop:"justifySelf"}));const or=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Bt(e.theme,"spacing",8,"gap"),r=e=>({gap:Pt(t,e)});return St(e,e.gap,r)}return null};or.propTypes="production"!==process.env.NODE_ENV?{gap:He}:{},or.filterProps=["gap"];const ir=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Bt(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:Pt(t,e)});return St(e,e.columnGap,r)}return null};ir.propTypes="production"!==process.env.NODE_ENV?{columnGap:He}:{},ir.filterProps=["columnGap"];const sr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Bt(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:Pt(t,e)});return St(e,e.rowGap,r)}return null};sr.propTypes="production"!==process.env.NODE_ENV?{rowGap:He}:{},sr.filterProps=["rowGap"];var ar=Ot(or,ir,sr,Tt({prop:"gridColumn"}),Tt({prop:"gridRow"}),Tt({prop:"gridAutoFlow"}),Tt({prop:"gridAutoColumns"}),Tt({prop:"gridAutoRows"}),Tt({prop:"gridTemplateColumns"}),Tt({prop:"gridTemplateRows"}),Tt({prop:"gridTemplateAreas"}),Tt({prop:"gridArea"})),cr=Ot(Tt({prop:"color",themeKey:"palette"}),Tt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),Tt({prop:"backgroundColor",themeKey:"palette"})),lr=Ot(Tt({prop:"position"}),Tt({prop:"zIndex",themeKey:"zIndex"}),Tt({prop:"top"}),Tt({prop:"right"}),Tt({prop:"bottom"}),Tt({prop:"left"})),ur=Tt({prop:"boxShadow",themeKey:"shadows"});function dr(e){return e<=1&&0!==e?100*e+"%":e}const hr=Tt({prop:"width",transform:dr}),fr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n,o;return{maxWidth:(null==(r=e.theme)||null==(n=r.breakpoints)||null==(o=n.values)?void 0:o[t])||_t[t]||dr(t)}};return St(e,e.maxWidth,t)}return null};fr.filterProps=["maxWidth"];const pr=Tt({prop:"minWidth",transform:dr}),mr=Tt({prop:"height",transform:dr}),gr=Tt({prop:"maxHeight",transform:dr}),yr=Tt({prop:"minHeight",transform:dr});Tt({prop:"size",cssProperty:"width",transform:dr}),Tt({prop:"size",cssProperty:"height",transform:dr});var br=Ot(hr,fr,pr,mr,gr,yr,Tt({prop:"boxSizing"}));const vr=Tt({prop:"fontFamily",themeKey:"typography"}),wr=Tt({prop:"fontSize",themeKey:"typography"}),xr=Tt({prop:"fontStyle",themeKey:"typography"}),Er=Tt({prop:"fontWeight",themeKey:"typography"}),Ar=Tt({prop:"letterSpacing"}),Rr=Tt({prop:"textTransform"}),_r=Tt({prop:"lineHeight"}),kr=Tt({prop:"textAlign"});var Sr=Ot(Tt({prop:"typography",cssProperty:!1,themeKey:"typography"}),vr,wr,xr,Er,Ar,_r,kr,Rr);const Nr={borders:tr.filterProps,display:rr.filterProps,flexbox:nr.filterProps,grid:ar.filterProps,positions:lr.filterProps,palette:cr.filterProps,shadows:ur.filterProps,sizing:br.filterProps,spacing:Zt.filterProps,typography:Sr.filterProps},Mr={borders:tr,display:rr,flexbox:nr,grid:ar,positions:lr,palette:cr,shadows:ur,sizing:br,spacing:Zt,typography:Sr},Tr=Object.keys(Nr).reduce(((e,t)=>(Nr[t].forEach((r=>{e[r]=Mr[t]})),e)),{}),Or=function(e=Mr){const t=Object.keys(e).reduce(((t,r)=>(e[r].filterProps.forEach((n=>{t[n]=e[r]})),t)),{});function r(e,r,n){const o={[e]:r,theme:n},i=t[e];return i?i(o):{[e]:r}}return function e(n){const{sx:o,theme:i={}}=n||{};if(!o)return null;function s(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const s=function(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(s);let c=s;return Object.keys(o).forEach((n=>{const s="function"==typeof(a=o[n])?a(i):a;var a;if(null!=s)if("object"==typeof s)if(t[n])c=Rt(c,r(n,s,i));else{const t=St({theme:i},s,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),r=new Set(t);return e.every((e=>r.size===Object.keys(e).length))}(t,s)?c=Rt(c,t):c[n]=e({sx:s,theme:i})}else c=Rt(c,r(n,s,i))})),function(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}(a,c)}return Array.isArray(o)?o.map(s):s(o)}}();Or.filterProps=["sx"];var Ir=Or;function Fr(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const Wr=["sx"];function Cr(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Cr(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function jr(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Cr(e))&&(n&&(n+=" "),n+=t);return n}const Ur=["values","unit","step"];var Dr={borderRadius:4};const Br=["breakpoints","palette","spacing","shape"];function Vr(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=Fr(e,Br),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=Fr(e,Ur),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Xe({},e,{[t.key]:t.val})),{})})(t),s=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function c(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function l(e,o){const i=s.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==i&&"number"==typeof t[s[i]]?t[s[i]]:o)-n/100}${r})`}return Xe({keys:s,values:i,up:a,down:c,between:l,only:function(e){return s.indexOf(e)+1<s.length?l(e,s[s.indexOf(e)+1]):a(e)},not:function(e){const t=s.indexOf(e);return 0===t?a(s[1]):t===s.length-1?c(s[t]):l(e,s[s.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},o)}(r),c=function(e=8){if(e.mui)return e;const t=Vt({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(o);let l=Ge({breakpoints:a,direction:"ltr",components:{},palette:Xe({mode:"light"},n),spacing:c,shape:Xe({},Dr,i)},s);return l=t.reduce(((e,t)=>Ge(e,t)),l),l}const Pr=l.createContext(null);"production"!==process.env.NODE_ENV&&(Pr.displayName="ThemeContext");var Zr=Pr;function zr(){const e=l.useContext(Zr);return"production"!==process.env.NODE_ENV&&l.useDebugValue(e),e}var Lr="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Hr(e){const{children:t,theme:r}=e,n=zr();"production"!==process.env.NODE_ENV&&null===n&&"function"==typeof r&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join("\n"));const o=l.useMemo((()=>{const e=null===n?r:function(e,t){if("function"==typeof t){const r=t(e);return"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join("\n"))),r}return Xe({},e,t)}(n,r);return null!=e&&(e[Lr]=null!==n),e}),[r,n]);return Ie.exports.jsx(Zr.Provider,{value:o,children:t})}function Yr(e=null){const t=zr();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}"production"!==process.env.NODE_ENV&&(Hr.propTypes={children:le.exports.node,theme:le.exports.oneOfType([le.exports.object,le.exports.func]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(Hr.propTypes=$e(Hr.propTypes));const Xr=Vr();function Jr(e=Xr){return Yr(e)}const Gr=["className","component"],qr=function(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:n,styleFunctionSx:o=Ir}=e,i=Le("div")(o);return l.forwardRef((function(e,o){const s=Jr(t),a=function(e){const{sx:t}=e,r=Fr(e,Wr),{systemProps:n,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((r=>{Tr[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t})(r);let i;return i=Array.isArray(t)?[n,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return Je(r)?Xe({},n,r):n}:Xe({},n,t),Xe({},o,{sx:i})}(e),{className:c,component:l="div"}=a,u=Fr(a,Gr);return Ie.exports.jsx(i,Xe({as:l,ref:o,className:jr(c,n?n(r):r),theme:s},u))}))}();"production"!==process.env.NODE_ENV&&(qr.propTypes={children:le.exports.node,component:le.exports.elementType,sx:le.exports.oneOfType([le.exports.arrayOf(le.exports.oneOfType([le.exports.func,le.exports.object,le.exports.bool])),le.exports.func,le.exports.object])});var Kr=qr;const Qr=["variant"];function $r(e){return 0===e.length}function en(e){const{variant:t}=e,r=Fr(e,Qr);let n=t||"";return Object.keys(r).sort().forEach((t=>{n+="color"===t?$r(n)?e[t]:st(e[t]):`${$r(n)?t:st(t)}${st(e[t].toString())}`})),n}const tn=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],rn=["theme"],nn=["theme"];function on(e){return 0===Object.keys(e).length}function sn(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const an=Vr(),cn=function(e={}){const{defaultTheme:t=an,rootShouldForwardProp:r=sn,slotShouldForwardProp:n=sn,styleFunctionSx:o=Ir}=e;return(e,i={})=>{const{name:s,slot:a,skipVariantsResolver:c,skipSx:l,overridesResolver:u}=i,d=Fr(i,tn),h=void 0!==c?c:a&&"Root"!==a||!1,f=l||!1;let p;var m;"production"!==process.env.NODE_ENV&&s&&(p=`${s}-${m=a||"Root",m.charAt(0).toLowerCase()+m.slice(1)}`);let g=sn;"Root"===a?g=r:a&&(g=n);const y=Le(e,Xe({shouldForwardProp:g,label:p},d)),b=(r,...n)=>{const i=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?r=>{let{theme:n}=r,o=Fr(r,rn);return e(Xe({theme:on(n)?t:n},o))}:e)):[];let c=r;s&&u&&i.push((e=>{const r=on(e.theme)?t:e.theme,n=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(s,r);if(n){const t={};return Object.entries(n).forEach((([n,o])=>{t[n]="function"==typeof o?o(Xe({},e,{theme:r})):o})),u(e,t)}return null})),s&&!h&&i.push((e=>{const r=on(e.theme)?t:e.theme;return((e,t,r,n)=>{var o,i;const{ownerState:s={}}=e,a=[],c=null==r||null==(o=r.components)||null==(i=o[n])?void 0:i.variants;return c&&c.forEach((r=>{let n=!0;Object.keys(r.props).forEach((t=>{s[t]!==r.props[t]&&e[t]!==r.props[t]&&(n=!1)})),n&&a.push(t[en(r.props)])})),a})(e,((e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const n={};return r.forEach((e=>{const t=en(e.props);n[t]=e.style})),n})(s,r),r,s)})),f||i.push((e=>{const r=on(e.theme)?t:e.theme;return o(Xe({},e,{theme:r}))}));const l=i.length-n.length;if(Array.isArray(r)&&l>0){const e=new Array(l).fill("");c=[...r,...e],c.raw=[...r.raw,...e]}else"function"==typeof r&&r.__emotion_real!==r&&(c=e=>{let{theme:n}=e,o=Fr(e,nn);return r(Xe({theme:on(n)?t:n},o))});const d=y(c,...i);if("production"!==process.env.NODE_ENV){let t;s&&(t=`${s}${a||""}`),void 0===t&&(t=`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return rt(e,"Component");if("object"==typeof e)switch(e.$$typeof){case Be.exports.ForwardRef:return nt(e,e.render,"ForwardRef");case Be.exports.Memo:return nt(e,e.type,"memo");default:return}}}(e)})`),d.displayName=t}return d};return y.withConfig&&(b.withConfig=y.withConfig),b}}();var ln=cn;function un(e){const{theme:t,name:r,props:n}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?function(e,t){const r=Xe({},t);return Object.keys(e).forEach((t=>{void 0===r[t]&&(r[t]=e[t])})),r}(t.components[r].defaultProps,n):n}function dn(e){if(e.type)return e;if("#"===e.charAt(0))return dn(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:et(9,e));let n,o=e.substring(t+1,e.length-1);if("color"===r){if(o=o.split(" "),n=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${n}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:et(10,n))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:r,values:o,colorSpace:n}}function hn(e,t){return e=dn(e),t=function(e,t=0,r=1){return"production"!==process.env.NODE_ENV&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Math.min(Math.max(t,e),r)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}(e)}function fn(e){const t=Jr();return Ie.exports.jsx(w.Provider,{value:"object"==typeof t?t:{},children:e.children})}function pn(e){const{children:t,theme:r}=e;return Ie.exports.jsx(Hr,{theme:r,children:Ie.exports.jsx(fn,{children:t})})}"production"!==process.env.NODE_ENV&&(fn.propTypes={children:le.exports.node}),"production"!==process.env.NODE_ENV&&(pn.propTypes={children:le.exports.node,theme:le.exports.oneOfType([le.exports.func,le.exports.object]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(pn.propTypes=$e(pn.propTypes));var mn=function(){return mn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mn.apply(this,arguments)};function gn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function yn(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function bn(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var vn={mode:"dark",primary:{main:"#FFE804"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#FF6187",contrastText:"#FFFFFF"},warning:{main:"#EB8D27",contrastText:"#1A1A1B"},success:{main:"#55F9C7",contrastText:"#1A1A1B"},purple:{main:"#BC9CFF",contrastText:"#1A1A1B"},background:{default:"#252831",paper:"#33363F",paperContrast:"#41454F",backdrop:hn("#000",.9),input:"#252831",tag:hn("#FFF",.1)},text:{primary:"#FFF",secondary:hn("#FFF",.5),disabled:hn("#FFF",.3),placeholder:hn("#FFF",.3),link:"#FFE804"},border:{main:"#454851",light:hn("#FFF",.3),disabled:hn("#FFF",.1)},hover:{default:hn("#FFF",.04)}},wn={mode:"light",primary:{main:"#1A1A1B"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#EC5A7D",contrastText:"#FFFFFF"},warning:{main:"#B15600",contrastText:"#1A1A1B"},success:{main:"#2FBA90",contrastText:"#1A1A1B"},purple:{main:"#6851B4",contrastText:"#1A1A1B"},background:{default:"#F9F6E8",paper:"#FFFFFF",paperContrast:"#F6F6F6",backdrop:hn("#000",.9),input:"#F0F0F0",tag:hn("#1A1A1B",.1)},text:{primary:"#1A1A1B",secondary:hn("#1A1A1B",.5),disabled:hn("#1A1A1B",.3),placeholder:hn("#1A1A1B",.3),link:"#1A1A1B"},border:{main:hn("#454851",.1),light:hn("#1A1A1B",.3),disabled:hn("#1A1A1B",.1)},hover:{default:hn("#1A1A1B",.04)}},xn=function(e,t,r){var n,i,s,a="light"===e,c=r?function(e){return["zh-CN","ja-JP","ko-KR"].includes(e)?400:500}(r):400,l=a?wn:vn;(null===(n=null==t?void 0:t.palette)||void 0===n?void 0:n.mode)===e&&(l=t.palette);var u={spacing:1,shape:{borderRadius:1},breakpoints:{values:{mobile:0,tablet:768,laptop:1024,desktop:1200,largeDesktop:1536}},typography:{fontFamily:bn(bn(["Manrope"],yn("ja-JP"===r?["Meiryo"]:[]),!1),["Poppins","Inter","PingFangSC-Regular",'"Microsoft YaHei"',"sans-serif"],!1).join(","),fontSize:16,h1:{fontSize:36,lineHeight:"49px",fontWeight:600},h2:{fontSize:32,fontWeight:600,lineHeight:"44px"},h3:{fontSize:28,fontWeight:600,lineHeight:"38px"},caption:{fontSize:20,fontWeight:600,lineHeight:"28px"},h5:{fontSize:18,lineHeight:"24px",fontWeight:600},body1:{fontSize:16,lineHeight:"22px",fontWeight:c},body2:{fontSize:14,lineHeight:"19px",fontWeight:c},h6:{fontSize:12,lineHeight:"17px",fontWeight:c},button:{fontSize:16,lineHeight:1,fontWeight:600}},components:{MuiCssBaseline:{styleOverrides:{"::-webkit-scrollbar":{width:6,backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{backgroundColor:null===(i=l.border)||void 0===i?void 0:i.main,borderColor:null===(s=l.border)||void 0===s?void 0:s.main,borderRadius:100}}},MuiTypography:{defaultProps:{variantMapping:{h1:"h2",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"div",caption:"h5",subtitle1:"h5",subtitle2:"h5",body1:"div",body2:"div"}}}},zIndex:{tooltip:1500}};return mn(mn({},o(u,t)),{palette:l})};var En=function(e,t){var r;return mn({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:null===(r=e.palette)||void 0===r?void 0:r.mode})},An=function(e){var t,r,n;return mn({color:null===(t=e.palette)||void 0===t?void 0:t.text.primary,fontFamily:null===(r=e.typography)||void 0===r?void 0:r.fontFamily},(null===(n=e.typography)||void 0===n?void 0:n.body1)||{})},Rn=function(e){var t;return mn(mn({},An(e)),{backgroundColor:null===(t=e.palette)||void 0===t?void 0:t.background.default,"@media print":{backgroundColor:"#FFF"}})};function _n(e){var t=function({props:e,name:t,defaultTheme:r}){return un({theme:Jr(r),name:t,props:e})}({props:e,name:"DODOCssBaseline"}),r=t.children,n=t.enableColorScheme,o=void 0!==n&&n,i=t.container;return Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(ze,{styles:function(e){return function(e,t,r){var n,o,i,s,a,c;void 0===t&&(t=!1);var l={html:En(e,t),"*, *::before, *::after":{boxSizing:"border-box"},"strong, b":{fontWeight:(null===(i=e.typography)||void 0===i?void 0:i.fontWeightBold)||"bolder"},body:mn(mn({margin:0},Rn(e)),{"&::backdrop":{backgroundColor:null===(s=e.palette)||void 0===s?void 0:s.background.default}})};r&&(delete l.html,delete l.body,(n={})[r]=mn(mn({},l),An(e)),l=n);var u=null===(c=null===(a=e.components)||void 0===a?void 0:a.MuiCssBaseline)||void 0===c?void 0:c.styleOverrides;if(u){if(r){var d={};Object.keys(u).forEach((function(e){d["*"+e]=u[e]})),(o={})[r]=d,u=o}l=[l,u]}return l}(e,o,i)}}),r]})}function kn(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=kn(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Sn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=kn(e))&&(n&&(n+=" "),n+=t);return n}function Nn(e){return Et("ButtonUnstyled",e)}function Mn(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter((r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r))).forEach((t=>{r[t]=e[t]})),r}function Tn(e){return"string"==typeof e}function On(e,t={},r){return Tn(e)?t:Xe({},t,{ownerState:Xe({},t.ownerState,r)})}function In(e,t){return"function"==typeof e?e(t):e}At("ButtonUnstyled",["root","active","disabled","focusVisible"]);const Fn=["action","children","className","component","components","componentsProps","disabled","focusableWhenDisabled","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseLeave"],Wn=l.forwardRef((function(e,t){var r;const{action:n,children:o,className:i,component:s,components:a={},componentsProps:c={},focusableWhenDisabled:u=!1}=e,d=Fr(e,Fn),h=l.useRef(),f=ut(h,t),{active:p,focusVisible:m,setFocusVisible:g,getRootProps:y}=function(e){const{disabled:t=!1,focusableWhenDisabled:r,href:n,ref:o,tabIndex:i,to:s,type:a}=e,c=l.useRef(),[u,d]=l.useState(!1),{isFocusVisibleRef:h,onFocus:f,onBlur:p,ref:m}=bt(),[g,y]=l.useState(!1);t&&!r&&g&&y(!1),l.useEffect((()=>{h.current=g}),[g,h]);const[b,v]=l.useState(""),w=e=>t=>{var r;g&&t.preventDefault(),null==(r=e.onMouseLeave)||r.call(e,t)},x=e=>t=>{var r;p(t),!1===h.current&&y(!1),null==(r=e.onBlur)||r.call(e,t)},E=e=>t=>{var r,n;c.current||(c.current=t.currentTarget),f(t),!0===h.current&&(y(!0),null==(n=e.onFocusVisible)||n.call(e,t)),null==(r=e.onFocus)||r.call(e,t)},A=()=>{const e=c.current;return"BUTTON"===b||"INPUT"===b&&["button","submit","reset"].includes(null==e?void 0:e.type)||"A"===b&&(null==e?void 0:e.href)},R=e=>r=>{var n;t||null==(n=e.onClick)||n.call(e,r)},_=e=>r=>{var n;r.target!==r.currentTarget||t||d(!0),null==(n=e.onMouseDown)||n.call(e,r)},k=e=>t=>{var r;t.target===t.currentTarget&&d(!1),null==(r=e.onMouseUp)||r.call(e,t)},S=e=>r=>{var n,o;null==(n=e.onKeyDown)||n.call(e,r),r.defaultPrevented||(r.target!==r.currentTarget||A()||" "!==r.key||r.preventDefault(),r.target!==r.currentTarget||" "!==r.key||t||d(!0),r.target!==r.currentTarget||A()||"Enter"!==r.key||t||(null==(o=e.onClick)||o.call(e,r),r.preventDefault()))},N=e=>r=>{var n,o;r.target===r.currentTarget&&d(!1),null==(n=e.onKeyUp)||n.call(e,r),r.target!==r.currentTarget||A()||t||" "!==r.key||r.defaultPrevented||null==(o=e.onClick)||o.call(e,r)},M=ut(m,c),T=ut(o,M),O=e=>{var t;v(null!=(t=null==e?void 0:e.tagName)?t:""),ct(T,e)},I={};return"BUTTON"===b?(I.type=null!=a?a:"button",r?I["aria-disabled"]=t:I.disabled=t):""!==b&&(n||s||(I.role="button",I.tabIndex=null!=i?i:0),t&&(I["aria-disabled"]=t,I.tabIndex=r?null!=i?i:0:-1)),{getRootProps:(t={})=>{const r=Xe({},Mn(e),t);return delete r.onFocusVisible,Xe({type:a},r,I,{onBlur:x(r),onClick:R(r),onFocus:E(r),onKeyDown:S(r),onKeyUp:N(r),onMouseDown:_(r),onMouseLeave:w(r),onMouseUp:k(r),ref:O})},focusVisible:g,setFocusVisible:y,disabled:t,active:u}}(Xe({},e,{focusableWhenDisabled:u,ref:f}));l.useImperativeHandle(n,(()=>({focusVisible:()=>{g(!0),h.current.focus()}})),[g]);const b=Xe({},e,{active:p,focusableWhenDisabled:u,focusVisible:m}),v=(e=>{const{active:t,disabled:r,focusVisible:n}=e;return function(e,t,r){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>(n&&(e.push(t(n)),r&&r[n]&&e.push(r[n])),e)),[]).join(" ")})),n}({root:["root",r&&"disabled",n&&"focusVisible",t&&"active"]},Nn,{})})(b),w=null!=(r=null!=s?s:a.Root)?r:"button",x=In(c.root,b),E=On(w,Xe({},y(),d,x,{className:Sn(v.root,i,null==x?void 0:x.className)}),b);return Ie.exports.jsx(w,Xe({},E,{children:o}))}));"production"!==process.env.NODE_ENV&&(Wn.propTypes={action:le.exports.oneOfType([le.exports.func,le.exports.shape({current:le.exports.shape({focusVisible:le.exports.func.isRequired})})]),children:le.exports.node,className:le.exports.string,component:le.exports.elementType,components:le.exports.shape({Root:le.exports.elementType}),componentsProps:le.exports.shape({root:le.exports.oneOfType([le.exports.func,le.exports.object])}),disabled:le.exports.bool,focusableWhenDisabled:le.exports.bool,onFocusVisible:le.exports.func});var Cn,jn,Un=Wn;!function(e){e.contained="contained",e.outlined="outlined",e.dashed="dashed",e.second="second",e.tag="tag"}(Cn||(Cn={})),function(e){e.small="small",e.middle="middle",e.big="big"}(jn||(jn={}));var Dn=function(e,t){var r,n,i,s,a,c=e.fullWidth,l=e.variant,u=e.sx,d=e.danger,h={px:16,py:10,typography:"button",whiteSpace:"nowrap",fontFamily:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&[disabled]":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}};switch(e.size){case jn.small:h.height=36,h.borderRadius=8,h.typography="body2";break;case jn.big:h.height=60,h.borderRadius=16;break;default:h.height=48,h.borderRadius=8}c&&(h.display="flex",h.width="100%");var f="&:not([disabled]):hover";switch(l){case Cn.outlined:h=mn(mn({},h),((r={border:"solid 1px ".concat(d?t.palette.error.main:t.palette.primary.main),color:d?"error.main":"primary.main","&[disabled]":{color:"text.disabled",borderColor:"border.disabled"}})[f]={background:hn(d?t.palette.error.main:t.palette.primary.main,.1)},r));break;case Cn.dashed:h=mn(mn({},h),((n={height:h.height-1,border:"dashed 1px ".concat(d?t.palette.error.main:t.palette.border.light),color:d?"error.main":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[f]={background:hn(d?t.palette.error.main:t.palette.border.disabled,.1)},n));break;case Cn.second:h=mn(mn({},h),((i={backgroundColor:d?"error.main":t.palette.background.tag,border:"none",color:d?"error.contrastText":"text.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[f]={background:d?hn(t.palette.error.main,.1):hn(t.palette.border.disabled,.2)},i));break;case Cn.tag:h=mn(mn({},h),((s={px:10,py:3,height:"auto",borderRadius:4,typography:"body2",backgroundColor:d?"error.main":"background.tag",border:"none",color:d?"error.contrastText":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[f]={background:d?hn(t.palette.error.main,.1):hn(t.palette.border.disabled,.2)},s));break;default:h=mn(mn({},h),((a={backgroundColor:d?"error.main":"secondary.main"})[f]={background:"linear-gradient(0deg, rgba(26, 26, 27, 0.1), rgba(26, 26, 27, 0.1)), ".concat(d?t.palette.error.main:(null==u?void 0:u.backgroundColor)||t.palette.secondary.main)},a.color=d?"error.contrastText":"secondary.contrastText",a["&[disabled]"]={backgroundColor:"border.disabled",color:"text.disabled"},a))}return o(h,u)},Bn=function(e){var t=e.onClick,r=e.disabled,n=e.children,o=e.component,i=e.to,s=e.isLoading,a=e.fullWidth,c=e.variant,l=e.sx,u=e.danger,d=e.size;e.ref;var h=gn(e,["onClick","disabled","children","component","to","isLoading","fullWidth","variant","sx","danger","size","ref"]),f=Jr(),p={disabled:r,sx:Dn({fullWidth:a,variant:c,sx:l,danger:u,size:d},f),onClick:t,component:o,to:i};return Ie.exports.jsx(Kr,mn({},p,h,{component:Un,disabled:!!s||r,className:c||Cn.contained},{children:Ie.exports.jsxs(Ie.exports.Fragment,{children:[s&&Ie.exports.jsx(Kr,{component:E,sx:{mr:8,"& path":{fill:f.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}}),n]})}))};Bn.Variant=Cn,Bn.Size=jn;var Vn,Pn,Zn,zn=ln(Un)(Zn||(Vn=["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"],Pn=["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"],Object.defineProperty?Object.defineProperty(Vn,"raw",{value:Pn}):Vn.raw=Pn,Zn=Vn)),Ln=At("MuiInput",["root","formControl","focused","disabled","error","multiline","input","inputMultiline","inputTypeSearch","adornedStart","adornedEnd"]);const Hn=l.createContext(void 0);"production"!==process.env.NODE_ENV&&(Hn.displayName="FormControlUnstyledContext");var Yn=Hn;function Xn(e){const{defaultValue:t,disabled:r=!1,error:n=!1,onBlur:o,onChange:i,onFocus:s,required:a=!1,value:c}=e,u=l.useContext(Yn);let d,h,f,p,m;var g,y,b;if(u){if(d=void 0,h=null!=(g=u.disabled)&&g,f=null!=(y=u.error)&&y,p=null!=(b=u.required)&&b,m=u.value,"production"!==process.env.NODE_ENV){const t=["defaultValue","disabled","error","required","value"].filter((t=>void 0!==e[t]));t.length>0&&console.warn(["MUI: You have set props on an input that is inside a FormControlUnstyled.","Set these props on a FormControlUnstyled instead. Otherwise they will be ignored.",`Ignored props: ${t.join(", ")}`].join("\n"))}}else d=t,h=r,f=n,p=a,m=c;const{current:v}=l.useRef(null!=m),w=l.useCallback((e=>{"production"!==process.env.NODE_ENV&&e&&"INPUT"!==e.nodeName&&!e.focus&&console.error(["MUI: You have provided a `components.Input` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join("\n"))}),[]),x=l.useRef(null),E=ut(x,w),[A,R]=l.useState(!1);l.useEffect((()=>{!u&&h&&A&&(R(!1),null==o||o())}),[u,h,A,o]);const _=e=>t=>{var r,n;null!=u&&u.disabled?t.stopPropagation():(null==(r=e.onFocus)||r.call(e,t),u&&u.onFocus?null==u||null==(n=u.onFocus)||n.call(u):R(!0))},k=e=>(t,...r)=>{var n,o;if(!v&&null==(t.target||x.current))throw new Error("production"!==process.env.NODE_ENV?"MUI: Expected valid input target. Did you use a custom `components.Input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":et(17));null==u||null==(n=u.onChange)||n.call(u,t),null==(o=e.onChange)||o.call(e,t,...r)};return{disabled:h,error:f,focused:A,formControlContext:u,getInputProps:(e={})=>{const t=Xe({},{onBlur:o,onChange:i,onFocus:s},Mn(e)),r=Xe({},e,t,{onBlur:(n=t,e=>{var t;null==(t=n.onBlur)||t.call(n,e),u&&u.onBlur?u.onBlur():R(!1)}),onChange:k(t),onFocus:_(t)});var n;return Xe({},r,{"aria-invalid":f||void 0,defaultValue:d,ref:E,value:m,required:p,disabled:h})},getRootProps:(t={})=>{const r=Xe({},Mn(e,["onBlur","onChange","onFocus"]),Mn(t));return Xe({},t,r,{onClick:(n=r,e=>{var t;x.current&&e.currentTarget===e.target&&x.current.focus(),null==(t=n.onClick)||t.call(n,e)})});var n},required:p,value:m}}const Jn=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","component","components","componentsProps","defaultValue","disabled","endAdornment","error","id","maxRows","minRows","multiline","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","rows","type","startAdornment","value"],Gn=["ownerState"],qn=l.forwardRef((function(e,t){var r,n;const{"aria-describedby":o,"aria-label":i,"aria-labelledby":s,autoComplete:a,autoFocus:c,className:l,component:u,components:d={},componentsProps:h={},defaultValue:f,disabled:p,endAdornment:m,error:g,id:y,maxRows:b,minRows:v,multiline:w=!1,name:x,onClick:E,onChange:A,onKeyDown:R,onKeyUp:_,onFocus:k,onBlur:S,placeholder:N,readOnly:M,required:T,rows:O,type:I="text",startAdornment:F,value:W}=e,C=Fr(e,Jn),{getRootProps:j,getInputProps:U,focused:D,formControlContext:B,error:V,disabled:P}=Xn({disabled:p,defaultValue:f,error:g,onBlur:S,onClick:E,onChange:A,onFocus:k,required:T,value:W}),Z=Xe({},e,{disabled:P,error:V,focused:D,formControlContext:B,multiline:w,type:I}),z=Sn(P&&Ln.disabled,V&&Ln.error,D&&Ln.focused,Boolean(B)&&Ln.formControl,w&&Ln.multiline,Boolean(F)&&Ln.adornedStart,Boolean(m)&&Ln.adornedEnd),L=Sn(P&&Ln.disabled,w&&Ln.multiline),H={"aria-describedby":o,"aria-label":i,"aria-labelledby":s,autoComplete:a,autoFocus:c,id:y,onKeyDown:R,onKeyUp:_,name:x,placeholder:N,readOnly:M,type:I},Y=null!=(r=null!=u?u:d.Root)?r:"div",X=In(h.root,Z),J=On(Y,Xe({},j(Xe({},C,X)),{className:Sn(Ln.root,z,l,null==X?void 0:X.className)}),Z);J.ref=ut(J.ref,ut(null==X?void 0:X.ref,t));let G=null!=(n=d.Input)?n:"input";const q=In(h.input,Z);let K=On(G,Xe({},U(Xe({},q,H)),{className:Sn(Ln.input,L,null==q?void 0:q.className)}),Z);if(K.ref=ut(K.ref,null==q?void 0:q.ref),w){var Q,$;const e=Tn(null!=(Q=d.Textarea)?Q:"textarea"),t=Fr(K,Gn);O&&"production"!==process.env.NODE_ENV&&(v||b)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),K=Xe({},!e&&{minRows:O||v,maxRows:O||b},e?t:K,{type:void 0}),G=null!=($=d.Textarea)?$:"textarea"}return Ie.exports.jsxs(Y,Xe({},J,{children:[F,Ie.exports.jsx(G,Xe({},K)),m]}))}));"production"!==process.env.NODE_ENV&&(qn.propTypes={"aria-describedby":le.exports.string,"aria-label":le.exports.string,"aria-labelledby":le.exports.string,autoComplete:le.exports.string,autoFocus:le.exports.bool,children:le.exports.node,className:le.exports.string,component:le.exports.elementType,components:le.exports.shape({Input:le.exports.elementType,Root:le.exports.elementType,Textarea:le.exports.elementType}),componentsProps:le.exports.shape({input:le.exports.oneOfType([le.exports.func,le.exports.object]),root:le.exports.oneOfType([le.exports.func,le.exports.object])}),defaultValue:le.exports.any,disabled:le.exports.bool,endAdornment:le.exports.node,error:le.exports.bool,id:le.exports.string,maxRows:le.exports.number,minRows:le.exports.number,multiline:le.exports.bool,name:le.exports.string,onBlur:le.exports.func,onChange:le.exports.func,onClick:le.exports.func,onFocus:le.exports.func,onKeyDown:le.exports.func,onKeyUp:le.exports.func,placeholder:le.exports.string,readOnly:le.exports.bool,required:le.exports.bool,rows:le.exports.number,startAdornment:le.exports.node,type:le.exports.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),value:le.exports.any});var Kn=qn;function Qn(e){var t,r,n=e.fullWidth,i=e.height,s=e.suffixGap,a=e.error,c=e.sx,l=gn(e,["fullWidth","height","suffixGap","error","sx"]);return Ie.exports.jsx(Kr,mn({component:"div",sx:o(mn(mn(mn((t={position:"relative",display:n?"flex":"inline-flex",alignItems:"center",border:"1px solid",borderColor:a?"error.main":"border.main",borderRadius:8,backgroundColor:"background.input"},t["&.".concat(Ln.disabled)]={color:"text.disabled",cursor:"default"},t.height=i,t),n&&{width:"100%"}),{"& > *:not(input):not(.MuiSelect-select):first-of-type":{ml:s,whiteSpace:"nowrap"},"& > *:not(input):last-child":{mr:s,whiteSpace:"nowrap"}}),a?{}:(r={},r["&.".concat(Ln.focused)]={borderColor:"text.secondary"},r)),c)},l))}function $n(e){var t,r=e.sx,n=gn(e,["sx"]),i=Jr(),s={color:"text.placeholder",fontSize:"14px",fontWeight:500,opacity:1};return Ie.exports.jsx(Kr,mn({component:"input",sx:o((t={font:"inherit",fontSize:"16px",fontWeight:600,lineHeight:"19px",px:16,py:14,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none"},height:"100%",width:"100%",border:"none",color:"text.primary",backgroundColor:"transparent","&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"}},t["&.".concat(Ln.disabled)]={opacity:1,WebkitTextFillColor:i.palette.text.disabled},t),r)},n))}var eo=d((function(e,t){var r=e.fullWidth,n=e.error,o=e.errorMsg,i=e.sx,s=e.inputSx,a=e.suffix,c=e.prefix,l=e.height,u=e.suffixGap,d=void 0===u?16:u,h=e.dataTestId,f=gn(e,["fullWidth","error","errorMsg","sx","inputSx","suffix","prefix","height","suffixGap","dataTestId"]),p=g((function(e){return Ie.exports.jsx(Qn,mn({fullWidth:r,height:l,suffixGap:d,error:n,sx:i,"data-testid":h},e))}),[r,l,d,n,h,JSON.stringify(i)]),m=g((function(e){return Ie.exports.jsx($n,mn({sx:s},e))}),[JSON.stringify(s),n]);return Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(Kn,mn({components:{Root:p,Input:m},startAdornment:c,endAdornment:a},f,{ref:t})),o?Ie.exports.jsx(Kr,mn({sx:{typography:"body2",color:"error.main",mt:6}},{children:o})):""]})})),to="undefined"!=typeof window?l.useLayoutEffect:l.useEffect;function ro(e,t,r,n,o){var i="undefined"!=typeof window&&void 0!==window.matchMedia,s=yn(l.useState((function(){return o&&i?r(e).matches:n?n(e).matches:t})),2),a=s[0],c=s[1];return to((function(){var t=!0;if(i){var n=r(e),o=function(){t&&c(n.matches)};return o(),n.addListener(o),function(){t=!1,n.removeListener(o)}}}),[e,r,i]),a}var no=l.useSyncExternalStore;function oo(e,t,r,n){var o=l.useCallback((function(){return t}),[t]),i=l.useMemo((function(){if(null!==n){var t=n(e).matches;return function(){return t}}return o}),[o,e,n]),s=yn(l.useMemo((function(){if(null===r)return[o,function(){return function(){}}];var t=r(e);return[function(){return t.matches},function(e){return t.addListener(e),function(){t.removeListener(e)}}]}),[o,r,e]),2),a=s[0],c=s[1];return no(c,a,i)}function io(){return{isMobile:function(e,t){void 0===t&&(t={});var r=Yr(),n="undefined"!=typeof window&&void 0!==window.matchMedia,o=un({name:"MuiUseMediaQuery",props:t,theme:r||void 0}),i=o.defaultMatches,s=void 0!==i&&i,a=o.matchMedia,c=void 0===a?n?window.matchMedia:null:a,u=o.ssrMatchMedia,d=void 0===u?null:u,h=o.noSsr;"production"!==process.env.NODE_ENV&&null===r&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join("\n"));var f=e(r);f=f.replace(/^@media( ?)/m,"");var p=(void 0!==no?oo:ro)(f,s,c,d,h);return"production"!==process.env.NODE_ENV&&l.useDebugValue({query:f,match:p}),p}((function(e){return e.breakpoints.down("tablet")}))}}var so=d((function(e,t){var r=e.weak,n=e.color,i=e.sx,s=gn(e,["weak","color","sx"]),a=io().isMobile,c=r?"text.primary":"text.secondary",l=r?"text.secondary":"text.primary";return n&&(c=n,l=n),Ie.exports.jsx(Kr,mn({ref:t,sx:o(mn({color:c,opacity:n&&!r?.5:1},a?{}:{"&:hover":{color:l,opacity:n&&r?.5:1}}),i)},s))}));function ao(e){var t=e.clearValue,r=e.hideSearchIcon,n=e.height,i=void 0===n?48:n,s=e.inputSx,a=gn(e,["clearValue","hideSearchIcon","height","inputSx"]),c=Jr(),l=a.value;return Ie.exports.jsx(eo,mn({prefix:r?null:Ie.exports.jsx(R,{style:{width:24,minWidth:24,height:24,color:c.palette.text.placeholder}}),suffix:l&&t?Ie.exports.jsx(so,mn({sx:{width:24,minWidth:24,height:24,mr:12,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"background.tag",cursor:"pointer"},onClick:t},{children:Ie.exports.jsx(Kr,{component:_,sx:{width:14,height:14}})})):null},a,{inputSx:o({pl:4},s),height:i}))}var co=function(e){var t=e.sx,r=Jr();return Ie.exports.jsx(Kr,{sx:mn({width:20,color:r.palette.primary.main,animation:"spin 3s linear infinite","@keyframes spin":{"100%":{transform:"rotate(360deg)"}}},t),component:E})};function lo(e){return e.substring(2).toLowerCase()}function uo(e){const{children:t,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,s=l.useRef(!1),a=l.useRef(null),c=l.useRef(!1),u=l.useRef(!1);l.useEffect((()=>(setTimeout((()=>{c.current=!0}),0),()=>{c.current=!1})),[]);const d=ut(t.ref,a),h=function(e){const t=l.useRef(e);return lt((()=>{t.current=e})),l.useCallback(((...e)=>(0,t.current)(...e)),[])}((e=>{const t=u.current;u.current=!1;const n=at(a.current);if(!c.current||!a.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n))return;if(s.current)return void(s.current=!1);let i;i=e.composedPath?e.composedPath().indexOf(a.current)>-1:!n.documentElement.contains(e.target)||a.current.contains(e.target),i||!r&&t||o(e)})),f=e=>r=>{u.current=!0;const n=t.props[e];n&&n(r)},p={ref:d};return!1!==i&&(p[i]=f(i)),l.useEffect((()=>{if(!1!==i){const e=lo(i),t=at(a.current),r=()=>{s.current=!0};return t.addEventListener(e,h),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,h),t.removeEventListener("touchmove",r)}}}),[h,i]),!1!==n&&(p[n]=f(n)),l.useEffect((()=>{if(!1!==n){const e=lo(n),t=at(a.current);return t.addEventListener(e,h),()=>{t.removeEventListener(e,h)}}}),[h,n]),Ie.exports.jsx(l.Fragment,{children:l.cloneElement(t,p)})}"production"!==process.env.NODE_ENV&&(uo.propTypes={children:Qe.isRequired,disableReactTree:le.exports.bool,mouseEvent:le.exports.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:le.exports.func.isRequired,touchEvent:le.exports.oneOf(["onTouchEnd","onTouchStart",!1])}),"production"!==process.env.NODE_ENV&&(uo.propTypes=$e(uo.propTypes));var ho="top",fo="bottom",po="right",mo="left",go=[ho,fo,po,mo],yo=go.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),bo=[].concat(go,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),vo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function wo(e){return e?(e.nodeName||"").toLowerCase():null}function xo(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Eo(e){return e instanceof xo(e).Element||e instanceof Element}function Ao(e){return e instanceof xo(e).HTMLElement||e instanceof HTMLElement}function Ro(e){return"undefined"!=typeof ShadowRoot&&(e instanceof xo(e).ShadowRoot||e instanceof ShadowRoot)}var _o={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];Ao(o)&&wo(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});Ao(n)&&wo(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function ko(e){return e.split("-")[0]}var So=Math.max,No=Math.min,Mo=Math.round;function To(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Oo(){return!/^((?!chrome|android).)*safari/i.test(To())}function Io(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Ao(e)&&(o=e.offsetWidth>0&&Mo(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Mo(n.height)/e.offsetHeight||1);var s=(Eo(e)?xo(e):window).visualViewport,a=!Oo()&&r,c=(n.left+(a&&s?s.offsetLeft:0))/o,l=(n.top+(a&&s?s.offsetTop:0))/i,u=n.width/o,d=n.height/i;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function Fo(e){var t=Io(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Wo(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Ro(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Co(e){return xo(e).getComputedStyle(e)}function jo(e){return["table","td","th"].indexOf(wo(e))>=0}function Uo(e){return((Eo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Do(e){return"html"===wo(e)?e:e.assignedSlot||e.parentNode||(Ro(e)?e.host:null)||Uo(e)}function Bo(e){return Ao(e)&&"fixed"!==Co(e).position?e.offsetParent:null}function Vo(e){for(var t=xo(e),r=Bo(e);r&&jo(r)&&"static"===Co(r).position;)r=Bo(r);return r&&("html"===wo(r)||"body"===wo(r)&&"static"===Co(r).position)?t:r||function(e){var t=/firefox/i.test(To());if(/Trident/i.test(To())&&Ao(e)&&"fixed"===Co(e).position)return null;var r=Do(e);for(Ro(r)&&(r=r.host);Ao(r)&&["html","body"].indexOf(wo(r))<0;){var n=Co(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function Po(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Zo(e,t,r){return So(e,No(t,r))}function zo(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Lo(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}var Ho={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=ko(r.placement),c=Po(a),l=[mo,po].indexOf(a)>=0?"height":"width";if(i&&s){var u=function(e,t){return zo("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Lo(e,go))}(o.padding,r),d=Fo(i),h="y"===c?ho:mo,f="y"===c?fo:po,p=r.rects.reference[l]+r.rects.reference[c]-s[c]-r.rects.popper[l],m=s[c]-r.rects.reference[c],g=Vo(i),y=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=u[h],w=y-d[l]-u[f],x=y/2-d[l]/2+b,E=Zo(v,x,w),A=c;r.modifiersData[n]=((t={})[A]=E,t.centerOffset=E-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&("production"!==process.env.NODE_ENV&&(Ao(n)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),Wo(t.elements.popper,n)?t.elements.arrow=n:"production"!==process.env.NODE_ENV&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yo(e){return e.split("-")[1]}var Xo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jo(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,m=void 0===p?0:p,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),v=mo,w=ho,x=window;if(l){var E=Vo(r),A="clientHeight",R="clientWidth";E===xo(r)&&"static"!==Co(E=Uo(r)).position&&"absolute"===a&&(A="scrollHeight",R="scrollWidth"),(o===ho||(o===mo||o===po)&&"end"===i)&&(w=fo,m-=(d&&E===x&&x.visualViewport?x.visualViewport.height:E[A])-n.height,m*=c?1:-1),o!==mo&&(o!==ho&&o!==fo||"end"!==i)||(v=po,f-=(d&&E===x&&x.visualViewport?x.visualViewport.width:E[R])-n.width,f*=c?1:-1)}var _,k=Object.assign({position:a},l&&Xo),S=!0===u?function(e){var t=e.x,r=e.y,n=window.devicePixelRatio||1;return{x:Mo(t*n)/n||0,y:Mo(r*n)/n||0}}({x:f,y:m}):{x:f,y:m};return f=S.x,m=S.y,c?Object.assign({},k,((_={})[w]=b?"0":"",_[v]=y?"0":"",_.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",_)):Object.assign({},k,((t={})[w]=b?m+"px":"",t[v]=y?f+"px":"",t.transform="",t))}var Go={passive:!0},qo={left:"right",right:"left",bottom:"top",top:"bottom"};function Ko(e){return e.replace(/left|right|bottom|top/g,(function(e){return qo[e]}))}var Qo={start:"end",end:"start"};function $o(e){return e.replace(/start|end/g,(function(e){return Qo[e]}))}function ei(e){var t=xo(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ti(e){return Io(Uo(e)).left+ei(e).scrollLeft}function ri(e){var t=Co(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function ni(e){return["html","body","#document"].indexOf(wo(e))>=0?e.ownerDocument.body:Ao(e)&&ri(e)?e:ni(Do(e))}function oi(e,t){var r;void 0===t&&(t=[]);var n=ni(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=xo(n),s=o?[i].concat(i.visualViewport||[],ri(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(oi(Do(s)))}function ii(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function si(e,t,r){return"viewport"===t?ii(function(e,t){var r=xo(e),n=Uo(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;var l=Oo();(l||!l&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a+ti(e),y:c}}(e,r)):Eo(t)?function(e,t){var r=Io(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):ii(function(e){var t,r=Uo(e),n=ei(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=So(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=So(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+ti(e),c=-n.scrollTop;return"rtl"===Co(o||r).direction&&(a+=So(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:c}}(Uo(e)))}function ai(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?ko(o):null,s=o?Yo(o):null,a=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(i){case ho:t={x:a,y:r.y-n.height};break;case fo:t={x:a,y:r.y+r.height};break;case po:t={x:r.x+r.width,y:c};break;case mo:t={x:r.x-n.width,y:c};break;default:t={x:r.x,y:r.y}}var l=i?Po(i):null;if(null!=l){var u="y"===l?"height":"width";switch(s){case"start":t[l]=t[l]-(r[u]/2-n[u]/2);break;case"end":t[l]=t[l]+(r[u]/2-n[u]/2)}}return t}function ci(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,s=void 0===i?e.strategy:i,a=r.boundary,c=void 0===a?"clippingParents":a,l=r.rootBoundary,u=void 0===l?"viewport":l,d=r.elementContext,h=void 0===d?"popper":d,f=r.altBoundary,p=void 0!==f&&f,m=r.padding,g=void 0===m?0:m,y=zo("number"!=typeof g?g:Lo(g,go)),b="popper"===h?"reference":"popper",v=e.rects.popper,w=e.elements[p?b:h],x=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=oi(Do(e)),r=["absolute","fixed"].indexOf(Co(e).position)>=0&&Ao(e)?Vo(e):e;return Eo(r)?t.filter((function(e){return Eo(e)&&Wo(e,r)&&"body"!==wo(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce((function(t,r){var o=si(e,r,n);return t.top=So(o.top,t.top),t.right=No(o.right,t.right),t.bottom=No(o.bottom,t.bottom),t.left=So(o.left,t.left),t}),si(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Eo(w)?w:w.contextElement||Uo(e.elements.popper),c,u,s),E=Io(e.elements.reference),A=ai({reference:E,element:v,strategy:"absolute",placement:o}),R=ii(Object.assign({},v,A)),_="popper"===h?R:E,k={top:x.top-_.top+y.top,bottom:_.bottom-x.bottom+y.bottom,left:x.left-_.left+y.left,right:_.right-x.right+y.right},S=e.modifiersData.offset;if("popper"===h&&S){var N=S[o];Object.keys(k).forEach((function(e){var t=[po,fo].indexOf(e)>=0?1:-1,r=[ho,fo].indexOf(e)>=0?"y":"x";k[e]+=N[r]*t}))}return k}var li={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0===s||s,c=r.fallbackPlacements,l=r.padding,u=r.boundary,d=r.rootBoundary,h=r.altBoundary,f=r.flipVariations,p=void 0===f||f,m=r.allowedAutoPlacements,g=t.options.placement,y=ko(g),b=c||(y!==g&&p?function(e){if("auto"===ko(e))return[];var t=Ko(e);return[$o(e),t,$o(t)]}(g):[Ko(g)]),v=[g].concat(b).reduce((function(e,r){return e.concat("auto"===ko(r)?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,l=void 0===c?bo:c,u=Yo(n),d=u?a?yo:yo.filter((function(e){return Yo(e)===u})):go,h=d.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=d,"production"!==process.env.NODE_ENV&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var f=h.reduce((function(t,r){return t[r]=ci(e,{placement:r,boundary:o,rootBoundary:i,padding:s})[ko(r)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:r,boundary:u,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:m}):r)}),[]),w=t.rects.reference,x=t.rects.popper,E=new Map,A=!0,R=v[0],_=0;_<v.length;_++){var k=v[_],S=ko(k),N="start"===Yo(k),M=[ho,fo].indexOf(S)>=0,T=M?"width":"height",O=ci(t,{placement:k,boundary:u,rootBoundary:d,altBoundary:h,padding:l}),I=M?N?po:mo:N?fo:ho;w[T]>x[T]&&(I=Ko(I));var F=Ko(I),W=[];if(i&&W.push(O[S]<=0),a&&W.push(O[I]<=0,O[F]<=0),W.every((function(e){return e}))){R=k,A=!1;break}E.set(k,W)}if(A)for(var C=function(e){var t=v.find((function(t){var r=E.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return R=t,"break"},j=p?3:1;j>0&&"break"!==C(j);j--);t.placement!==R&&(t.modifiersData[n]._skip=!0,t.placement=R,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ui(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function di(e){return[ho,po,fo,mo].some((function(t){return e[t]>=0}))}var hi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,s=bo.reduce((function(e,r){return e[r]=function(e,t,r){var n=ko(e),o=[mo,ho].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[mo,po].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(r,t.rects,i),e}),{}),a=s[t.placement],c=a.x,l=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[n]=s}},fi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0!==s&&s,c=r.boundary,l=r.rootBoundary,u=r.altBoundary,d=r.padding,h=r.tether,f=void 0===h||h,p=r.tetherOffset,m=void 0===p?0:p,g=ci(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),y=ko(t.placement),b=Yo(t.placement),v=!b,w=Po(y),x="x"===w?"y":"x",E=t.modifiersData.popperOffsets,A=t.rects.reference,R=t.rects.popper,_="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(E){if(i){var M,T="y"===w?ho:mo,O="y"===w?fo:po,I="y"===w?"height":"width",F=E[w],W=F+g[T],C=F-g[O],j=f?-R[I]/2:0,U="start"===b?A[I]:R[I],D="start"===b?-R[I]:-A[I],B=t.elements.arrow,V=f&&B?Fo(B):{width:0,height:0},P=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=P[T],z=P[O],L=Zo(0,A[I],V[I]),H=v?A[I]/2-j-L-Z-k.mainAxis:U-L-Z-k.mainAxis,Y=v?-A[I]/2+j+L+z+k.mainAxis:D+L+z+k.mainAxis,X=t.elements.arrow&&Vo(t.elements.arrow),J=X?"y"===w?X.clientTop||0:X.clientLeft||0:0,G=null!=(M=null==S?void 0:S[w])?M:0,q=F+Y-G,K=Zo(f?No(W,F+H-G-J):W,F,f?So(C,q):C);E[w]=K,N[w]=K-F}if(a){var Q,$="x"===w?ho:mo,ee="x"===w?fo:po,te=E[x],re="y"===x?"height":"width",ne=te+g[$],oe=te-g[ee],ie=-1!==[ho,mo].indexOf(y),se=null!=(Q=null==S?void 0:S[x])?Q:0,ae=ie?ne:te-A[re]-R[re]-se+k.altAxis,ce=ie?te+A[re]+R[re]-se-k.altAxis:oe,le=f&&ie?function(e,t,r){var n=Zo(e,t,r);return n>r?r:n}(ae,te,ce):Zo(f?ae:ne,te,f?ce:oe);E[x]=le,N[x]=le-te}t.modifiersData[n]=N}},requiresIfExists:["offset"]};function pi(e,t,r){void 0===r&&(r=!1);var n,o,i=Ao(t),s=Ao(t)&&function(e){var t=e.getBoundingClientRect(),r=Mo(t.width)/e.offsetWidth||1,n=Mo(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),a=Uo(t),c=Io(e,s,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&(("body"!==wo(t)||ri(a))&&(l=(n=t)!==xo(n)&&Ao(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:ei(n)),Ao(t)?((u=Io(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=ti(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function mi(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}function gi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return[].concat(r).reduce((function(e,t){return e.replace(/%s/,t)}),e)}var yi='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',bi=["name","enabled","phase","fn","effect","requires","options"],vi="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",wi={placement:"bottom",modifiers:[],strategy:"absolute"};function xi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}var Ei=function(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,i=void 0===o?wi:o;return function(e,t,r){void 0===r&&(r=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},wi,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(r){var o="function"==typeof r?r(a.options):r;d(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:Eo(e)?oi(e):e.contextElement?oi(e.contextElement):[],popper:oi(t)};var s,l,h,f=function(e){var t=mi(e);return vo.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}(function(e){var t=e.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,a.options.modifiers)));if(a.orderedModifiers=f.filter((function(e){return e.enabled})),"production"!==process.env.NODE_ENV){(function(e){e.forEach((function(t){[].concat(Object.keys(t),bi).filter((function(e,t,r){return r.indexOf(e)===t})).forEach((function(r){switch(r){case"name":"string"!=typeof t.name&&console.error(gi(yi,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":"boolean"!=typeof t.enabled&&console.error(gi(yi,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":vo.indexOf(t.phase)<0&&console.error(gi(yi,t.name,'"phase"',"either "+vo.join(", "),'"'+String(t.phase)+'"'));break;case"fn":"function"!=typeof t.fn&&console.error(gi(yi,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":null!=t.effect&&"function"!=typeof t.effect&&console.error(gi(yi,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":null==t.requires||Array.isArray(t.requires)||console.error(gi(yi,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(gi(yi,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+bi.map((function(e){return'"'+e+'"'})).join(", ")+'; but "'+r+'" was provided.')}t.requires&&t.requires.forEach((function(r){null==e.find((function(e){return e.name===r}))&&console.error(gi('Popper: modifier "%s" requires "%s", but "%s" modifier is not available',String(t.name),r,r))}))}))}))})((s=[].concat(f,a.options.modifiers),l=function(e){return e.name},h=new Set,s.filter((function(e){var t=l(e);if(!h.has(t))return h.add(t),!0})))),"auto"===ko(a.options.placement)&&(a.orderedModifiers.find((function(e){return"flip"===e.name}))||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" ")));var p=Co(t);[p.marginTop,p.marginRight,p.marginBottom,p.marginLeft].some((function(e){return parseFloat(e)}))&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return a.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var i=o({state:a,name:t,instance:u,options:n});c.push(i||function(){})}})),u.update()},forceUpdate:function(){if(!l){var e=a.elements,t=e.reference,r=e.popper;if(xi(t,r)){a.rects={reference:pi(t,Vo(r),"fixed"===a.options.strategy),popper:Fo(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0,o=0;o<a.orderedModifiers.length;o++){if("production"!==process.env.NODE_ENV&&(n+=1)>100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==a.reset){var i=a.orderedModifiers[o],s=i.fn,c=i.options,d=void 0===c?{}:c,h=i.name;"function"==typeof s&&(a=s({state:a,options:d,name:h,instance:u})||a)}else a.reset=!1,o=-1}}else"production"!==process.env.NODE_ENV&&console.error(vi)}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(o())}))}))),s}),destroy:function(){d(),l=!0}};if(!xi(e,t))return"production"!==process.env.NODE_ENV&&console.error(vi),u;function d(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!l&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,s=n.resize,a=void 0===s||s,c=xo(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach((function(e){e.addEventListener("scroll",r.update,Go)})),a&&c.addEventListener("resize",r.update,Go),function(){i&&l.forEach((function(e){e.removeEventListener("scroll",r.update,Go)})),a&&c.removeEventListener("resize",r.update,Go)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=ai({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,s=void 0===i||i,a=r.roundOffsets,c=void 0===a||a;if("production"!==process.env.NODE_ENV){var l=Co(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some((function(e){return l.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:ko(t.placement),variation:Yo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Jo(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Jo(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},_o,hi,li,fi,Ho,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=ci(t,{elementContext:"reference"}),a=ci(t,{altBoundary:!0}),c=ui(s,n),l=ui(a,o,i),u=di(c),d=di(l);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const Ai=l.forwardRef((function(e,t){const{children:r,container:n,disablePortal:o=!1}=e,[i,s]=l.useState(null),a=ut(l.isValidElement(r)?r.ref:null,t);return lt((()=>{o||s(function(e){return"function"==typeof e?e():e}(n)||document.body)}),[n,o]),lt((()=>{if(i&&!o)return ct(t,i),()=>{ct(t,null)}}),[t,i,o]),o?l.isValidElement(r)?l.cloneElement(r,{ref:a}):r:i?B.createPortal(r,i):i}));"production"!==process.env.NODE_ENV&&(Ai.propTypes={children:le.exports.node,container:le.exports.oneOfType([ot,le.exports.func]),disablePortal:le.exports.bool}),"production"!==process.env.NODE_ENV&&(Ai.propTypes=$e(Ai.propTypes));var Ri=Ai;const _i=["anchorEl","children","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","TransitionProps"],ki=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function Si(e){return"function"==typeof e?e():e}const Ni={},Mi=l.forwardRef((function(e,t){const{anchorEl:r,children:n,direction:o,disablePortal:i,modifiers:s,open:a,placement:c,popperOptions:u,popperRef:d,TransitionProps:h}=e,f=Fr(e,_i),p=l.useRef(null),m=ut(p,t),g=l.useRef(null),y=ut(g,d),b=l.useRef(y);lt((()=>{b.current=y}),[y]),l.useImperativeHandle(d,(()=>g.current),[]);const v=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,o),[w,x]=l.useState(v);l.useEffect((()=>{g.current&&g.current.forceUpdate()})),lt((()=>{if(!r||!a)return;const e=Si(r);if("production"!==process.env.NODE_ENV&&e&&1===e.nodeType){const t=e.getBoundingClientRect();"test"!==process.env.NODE_ENV&&0===t.top&&0===t.left&&0===t.right&&0===t.bottom&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}let t=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{x(e.placement)}}];null!=s&&(t=t.concat(s)),u&&null!=u.modifiers&&(t=t.concat(u.modifiers));const n=Ei(Si(r),p.current,Xe({placement:v},u,{modifiers:t}));return b.current(n),()=>{n.destroy(),b.current(null)}}),[r,i,s,a,u,v]);const E={placement:w};return null!==h&&(E.TransitionProps=h),Ie.exports.jsx("div",Xe({ref:m,role:"tooltip"},f,{children:"function"==typeof n?n(E):n}))})),Ti=l.forwardRef((function(e,t){const{anchorEl:r,children:n,container:o,direction:i="ltr",disablePortal:s=!1,keepMounted:a=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:h=Ni,popperRef:f,style:p,transition:m=!1}=e,g=Fr(e,ki),[y,b]=l.useState(!0);if(!a&&!u&&(!m||y))return null;const v=o||(r?at(Si(r)).body:void 0);return Ie.exports.jsx(Ri,{disablePortal:s,container:v,children:Ie.exports.jsx(Mi,Xe({anchorEl:r,direction:i,disablePortal:s,modifiers:c,ref:t,open:m?!y:u,placement:d,popperOptions:h,popperRef:f},g,{style:Xe({position:"fixed",top:0,left:0,display:u||!a||m&&!y?null:"none"},p),TransitionProps:m?{in:u,onEnter:()=>{b(!1)},onExited:()=>{b(!0)}}:null,children:n}))})}));"production"!==process.env.NODE_ENV&&(Ti.propTypes={anchorEl:Ye(le.exports.oneOfType([ot,le.exports.object,le.exports.func]),(e=>{if(e.open){const t=Si(e.anchorEl);if(t&&1===t.nodeType){const e=t.getBoundingClientRect();if("test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}else if(!t||"function"!=typeof t.getBoundingClientRect||null!=t.contextElement&&1!==t.contextElement.nodeType)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join("\n"))}return null})),children:le.exports.oneOfType([le.exports.node,le.exports.func]),container:le.exports.oneOfType([ot,le.exports.func]),direction:le.exports.oneOf(["ltr","rtl"]),disablePortal:le.exports.bool,keepMounted:le.exports.bool,modifiers:le.exports.arrayOf(le.exports.shape({data:le.exports.object,effect:le.exports.func,enabled:le.exports.bool,fn:le.exports.func,name:le.exports.any,options:le.exports.object,phase:le.exports.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:le.exports.arrayOf(le.exports.string),requiresIfExists:le.exports.arrayOf(le.exports.string)})),open:le.exports.bool.isRequired,placement:le.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:le.exports.shape({modifiers:le.exports.array,onFirstUpdate:le.exports.func,placement:le.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:le.exports.oneOf(["absolute","fixed"])}),popperRef:it,style:le.exports.object,transition:le.exports.bool});var Oi=Ti,Ii="DODOTooltip-arrow",Fi=ln("div")((function(e){var t,r=e.theme;return"\n z-index: ".concat(null===(t=r.zIndex)||void 0===t?void 0:t.tooltip,';\n &[data-popper-placement*="bottom"] .').concat(Ii," {\n bottom: 0;\n margin-top: -").concat(8,'px;\n &::before {\n transform-origin: 0 100%;\n }\n }\n &[data-popper-placement*="top"] .').concat(Ii," {\n bottom: 0;\n margin-bottom: -").concat(8,'px;\n &::before {\n transform-origin: 100% 0;\n }\n }\n &[data-popper-placement*="right"] .').concat(Ii,' {\n &::before {\n transform-origin: 100% 100%;\n }\n }\n &[data-popper-placement*="left"] .').concat(Ii," {\n &::before {\n transform-origin: 0 0;\n }\n }\n ")}));function Wi(e){var t,r,n=e.title,i=e.sx,s=e.maxWidth,a=void 0===s?"auto":s,c=e.popperOptions,l=e.children,u=gn(e,["title","sx","maxWidth","popperOptions","children"]),d=Jr(),g=io().isMobile,y=h(!1),b=h(!1),v=h(),w=yn(f(),2),x=w[0],E=w[1],A=yn(f(),2),R=A[0],_=A[1],k=yn(f(!1),2),S=k[0],N=k[1],M={ref:E,style:(t={},t["pointer-events"]="all",t)};if(g)M.onClick=function(){N(!0)};else{var T=function(){b.current=!0,clearTimeout(v.current),N(!0)};M.onMouseOut=T,M.onMouseEnter=T,M.onMouseLeave=function(){b.current=!1,clearTimeout(v.current),v.current=setTimeout((function(){b.current||y.current||N(!1)}),200)}}return p((function(){return function(){N(!1),clearTimeout(v.current)}}),[]),Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsxs(Oi,mn({open:S,anchorEl:x,components:{Root:Fi},style:{zIndex:"".concat(null===(r=d.zIndex)||void 0===r?void 0:r.tooltip)},popperOptions:o({modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{padding:20}},{name:"arrow",options:{element:R,padding:4}}]},c)},u,{children:[Ie.exports.jsx(Kr,mn({sx:mn({typography:"h6",padding:12,maxWidth:a,fontWeight:500,backgroundColor:"background.paperContrast",borderRadius:8,color:"text.secondary",borderColor:"border.main",borderWidth:1,borderStyle:"solid"},i),onMouseEnter:function(){g||(y.current=!0,clearTimeout(v.current))},onMouseLeave:function(){g||(y.current=!1,clearTimeout(v.current),v.current=setTimeout((function(){b.current||y.current||N(!1)}),200))},onClick:function(e){return e.stopPropagation()}},{children:n})),Ie.exports.jsx(Kr,{ref:_,className:Ii,sx:{overflow:"hidden",position:"absolute",width:16,height:9,boxSizing:"border-box",color:"background.paperContrast",bottom:0,marginBottom:-8,"&::before":{transformOrigin:"100% 0",content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)",border:"solid 1px",borderColor:"border.main"}}})]})),Ie.exports.jsx(uo,mn({onClickAway:function(){g&&N(!1)}},{children:m(l,M)}))]})}function Ci(e){var t=e.title,r=e.ml,n=e.mr,o=e.size,i=void 0===o?15:o,s=e.sx,a=e.maxWidth,c=e.container;return t?Ie.exports.jsx(Wi,mn({title:t,placement:"top",container:c,maxWidth:a},{children:Ie.exports.jsx(so,{component:A,sx:mn({ml:r,mr:n,width:i,height:i},s)})})):null}function ji({input:e,showDecimals:t=4,showPrecisionDecimals:r=2,showIntegerOnly:o=!1,showDecimalsOnly:i=!1,noGroupSeparator:s=!1}){const a=new n(e);if(a.isNaN())return"-";let c=a.dp(t,n.ROUND_DOWN);return c.eq(0)&&(a.gt(0)||a.lt(0))&&(c=a.sd(null!=r?r:t,n.ROUND_DOWN)),o&&(c=c.integerValue(n.ROUND_DOWN)),i&&(c=c.minus(c.integerValue(n.ROUND_DOWN))),s?c.toFormat({decimalSeparator:".",groupSeparator:"",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0}):c.toFormat()}function Ui({input:e,decimals:t,showPrecisionDecimals:r=2,noGroupSeparator:o}){if(null==e)return"-";const i=new n(e);if(i.isNaN())return"-";return ji({input:i,showDecimals:void 0===t?0:t>6?6:t>4?4:t,showPrecisionDecimals:r,noGroupSeparator:o})}function Di(e){if("number"==typeof e)return Di(new n(e));if(e.isNaN())return"NaN";if(e.isNegative())return`-${Di(e.negated())}`;if(e.isZero())return"0";let t=e.integerValue(n.ROUND_FLOOR),r=e.minus(t),o="";for(;!t.isZero();){o=t.modulo(10).toString().toString()+o,t=t.idiv(10)}if(""===o&&(o="0"),r.isZero())return o;o+=".";let i=0;for(;!r.isZero()&&i<100;){const e=r.times(10),t=e.integerValue(n.ROUND_FLOOR);o+=t.toString(),r=e.minus(t),i+=1}return o}const Bi=(e,t)=>{if("string"==typeof e&&!e.match(/[-+]?\d+(.+d+)?/))return e;const r=new n(e);if(t){let e=r.toFixed(t,n.ROUND_DOWN);return new n(e).isZero()&&(e=Di(r.precision(t,n.ROUND_DOWN))),e}return Di(r)},Vi=(e,t)=>{let r=e;const n=r.match("[0-9。.]+");r=n&&n.length>0?n[0]:"",r=r.replace("。",".");let o=0;if(r){const e=r.split("."),t=0===e[0].length?["0"]:[e[0]];e.length>1?t[1]=e.slice(1,e.length).join(""):t[0].length>1&&"0"===t[0][0]&&(t[0]=t[0].slice(1,t[0].length)),t.length>1&&(o=t[1].length),r=t.join(".")}return t>=0&&o>t?Bi(r,t):r};let Pi=!1,Zi=!1;const zi={debug:1,default:2,info:2,warning:3,error:4,off:5};let Li=zi.default,Hi=null;const Yi=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var Xi,Ji;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(Xi||(Xi={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(Ji||(Ji={}));const Gi="0123456789abcdef";class qi{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==zi[r]&&this.throwArgumentError("invalid log level name","logLevel",e),Li>zi[r]||console.log.apply(console,t)}debug(...e){this._log(qi.levels.DEBUG,e)}info(...e){this._log(qi.levels.INFO,e)}warn(...e){this._log(qi.levels.WARNING,e)}makeError(e,t,r){if(Zi)return this.makeError("censored error",t,{});t||(t=qi.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=Gi[t[e]>>4],r+=Gi[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case Ji.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case Ji.CALL_EXCEPTION:case Ji.INSUFFICIENT_FUNDS:case Ji.MISSING_NEW:case Ji.NONCE_EXPIRED:case Ji.REPLACEMENT_UNDERPRICED:case Ji.TRANSACTION_REPLACED:case Ji.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,qi.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){Yi&&this.throwError("platform missing String.prototype.normalize",qi.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Yi})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,qi.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,qi.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,qi.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,qi.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",qi.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",qi.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",qi.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Hi||(Hi=new qi("logger/5.7.0")),Hi}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",qi.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Pi){if(!e)return;this.globalLogger().throwError("error censorship permanent",qi.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Zi=!!e,Pi=!!t}static setLogLevel(e){const t=zi[e.toLowerCase()];null!=t?Li=t:qi.globalLogger().warn("invalid log level - "+e)}static from(e){return new qi(e)}}qi.errors=Ji,qi.levels=Xi;const Ki=new qi("bytes/5.7.0");function Qi(e){return!!e.toHexString}function $i(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return $i(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function es(e){return ss(e)&&!(e.length%2)||rs(e)}function ts(e){return"number"==typeof e&&e==e&&e%1==0}function rs(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!ts(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!ts(r)||r<0||r>=256)return!1}return!0}function ns(e,t){if(t||(t={}),"number"==typeof e){Ki.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),$i(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Qi(e)&&(e=e.toHexString()),ss(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":Ki.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substring(e,e+2),16));return $i(new Uint8Array(n))}return rs(e)?$i(new Uint8Array(e)):Ki.throwArgumentError("invalid arrayify value","value",e)}function os(e){const t=e.map((e=>ns(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),$i(n)}function is(e){let t=ns(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function ss(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function as(e,t){if(t||(t={}),"number"==typeof e){Ki.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Qi(e))return e.toHexString();if(ss(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":Ki.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(rs(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+="0123456789abcdef"[(240&n)>>4]+"0123456789abcdef"[15&n]}return t}return Ki.throwArgumentError("invalid hexlify value","value",e)}function cs(e){if("string"!=typeof e)e=as(e);else if(!ss(e)||e.length%2)return null;return(e.length-2)/2}function ls(e,t,r){return"string"!=typeof e?e=as(e):(!ss(e)||e.length%2)&&Ki.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function us(e){let t="0x";return e.forEach((e=>{t+=as(e).substring(2)})),t}function ds(e){const t=function(e){"string"!=typeof e&&(e=as(e));ss(e)||Ki.throwArgumentError("invalid hex string","value",e);e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}(as(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function hs(e,t){for("string"!=typeof e?e=as(e):ss(e)||Ki.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&Ki.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function fs(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(es(e)){let r=ns(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=as(r.slice(0,32)),t.s=as(r.slice(32,64))):65===r.length?(t.r=as(r.slice(0,32)),t.s=as(r.slice(32,64)),t.v=r[64]):Ki.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:Ki.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=as(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=function(e,t){(e=ns(e)).length>t&&Ki.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),$i(r)}(ns(t._vs),32);t._vs=as(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&Ki.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=as(r);null==t.s?t.s=o:t.s!==o&&Ki.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?Ki.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&Ki.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&ss(t.r)?t.r=hs(t.r,32):Ki.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&ss(t.s)?t.s=hs(t.s,32):Ki.throwArgumentError("signature missing or invalid s","signature",e);const r=ns(t.s);r[0]>=128&&Ki.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=as(r);t._vs&&(ss(t._vs)||Ki.throwArgumentError("signature invalid _vs","signature",e),t._vs=hs(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&Ki.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}var ps={exports:{}};
37
+ */function Qe(e,t){const r=z(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const n="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${n})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${n})(...args) API requires all its args to be defined.`),r(...t)}:r}!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(ze)return Ge;ze=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case n:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case a:case c:case h:case p:case s:return e;default:return f}}case r:return f}}}return e=Symbol.for("react.module.reference"),Ge.ContextConsumer=a,Ge.ContextProvider=s,Ge.Element=t,Ge.ForwardRef=c,Ge.Fragment=n,Ge.Lazy=h,Ge.Memo=p,Ge.Portal=r,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=u,Ge.SuspenseList=d,Ge.isAsyncMode=function(){return!1},Ge.isConcurrentMode=function(){return!1},Ge.isContextConsumer=function(e){return m(e)===a},Ge.isContextProvider=function(e){return m(e)===s},Ge.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ge.isForwardRef=function(e){return m(e)===c},Ge.isFragment=function(e){return m(e)===n},Ge.isLazy=function(e){return m(e)===h},Ge.isMemo=function(e){return m(e)===p},Ge.isPortal=function(e){return m(e)===r},Ge.isProfiler=function(e){return m(e)===i},Ge.isStrictMode=function(e){return m(e)===o},Ge.isSuspense=function(e){return m(e)===u},Ge.isSuspenseList=function(e){return m(e)===d},Ge.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===d||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Ge.typeOf=m,Ge}():e.exports=(Xe||(Xe=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case n:case i:case o:case u:case d:return m;default:var g=m&&m.$$typeof;switch(g){case l:case a:case c:case h:case p:case s:return g;default:return f}}case r:return f}}}e=Symbol.for("react.module.reference");var g=a,y=s,b=t,x=c,v=n,w=h,E=p,A=r,k=i,C=o,R=u,T=d,S=!1,N=!1;Je.ContextConsumer=g,Je.ContextProvider=y,Je.Element=b,Je.ForwardRef=x,Je.Fragment=v,Je.Lazy=w,Je.Memo=E,Je.Portal=A,Je.Profiler=k,Je.StrictMode=C,Je.Suspense=R,Je.SuspenseList=T,Je.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Je.isConcurrentMode=function(e){return N||(N=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Je.isContextConsumer=function(e){return m(e)===a},Je.isContextProvider=function(e){return m(e)===s},Je.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Je.isForwardRef=function(e){return m(e)===c},Je.isFragment=function(e){return m(e)===n},Je.isLazy=function(e){return m(e)===h},Je.isMemo=function(e){return m(e)===p},Je.isPortal=function(e){return m(e)===r},Je.isProfiler=function(e){return m(e)===i},Je.isStrictMode=function(e){return m(e)===o},Je.isSuspense=function(e){return m(e)===u},Je.isSuspenseList=function(e){return m(e)===d},Je.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===d||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Je.typeOf=m}()),Je)}(Ye),"production"!==process.env.NODE_ENV&&(qe.propTypes={defaultTheme:ge.exports.object,styles:ge.exports.oneOfType([ge.exports.string,ge.exports.object,ge.exports.func])});var Ke="production"!==process.env.NODE_ENV?ge.exports.oneOfType([ge.exports.number,ge.exports.string,ge.exports.object,ge.exports.array]):{};function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$e.apply(this,arguments)}function et(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function tt(e,t,r={clone:!0}){const n=r.clone?$e({},e):e;return et(e)&&et(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(et(t[o])&&o in e&&et(e[o])?n[o]=tt(e[o],t[o],r):n[o]=t[o])})),n}function rt(e){return"production"===process.env.NODE_ENV?e:$e({},e,{"exact-prop: ​":t=>{const r=Object.keys(t).filter((t=>!e.hasOwnProperty(t)));return r.length>0?new Error(`The following props are not supported: ${r.map((e=>`\`${e}\``)).join(", ")}. Please remove them.`):null}})}function nt(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const ot=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function it(e,t=""){return e.displayName||e.name||function(e){const t=`${e}`.match(ot);return t&&t[1]||""}(e)||t}function st(e,t,r){const n=it(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function at(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lt.apply(this,arguments)}function ct(e,t){return t?tt(e,t,{clone:!1}):e}const ut={xs:0,sm:600,md:900,lg:1200,xl:1536},dt={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ut[e]}px)`};function pt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||dt;return t.reduce(((n,o,i)=>(n[e.up(e.keys[i])]=r(t[i]),n)),{})}if("object"==typeof t){const e=n.breakpoints||dt;return Object.keys(t).reduce(((n,o)=>{if(-1!==Object.keys(e.values||ut).indexOf(o))n[e.up(o)]=r(t[o],o);else{const e=o;n[e]=t[e]}return n}),{})}return r(t)}function ht(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function ft(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:ht(e,r)||n,t&&(o=t(o)),o}function mt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],s=ht(e.theme,n)||{};return pt(e,i,(e=>{let n=ft(s,o,e);return e===n&&"string"==typeof e&&(n=ft(s,o,`${t}${"default"===e?"":at(e)}`,e)),!1===r?n:{[r]:n}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:Ke}:{},i.filterProps=[t],i}function gt(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),r=e=>Object.keys(e).reduce(((r,n)=>t[n]?ct(r,t[n](e)):r),{});return r.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},r.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),r}const yt={m:"margin",p:"padding"},bt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},xt={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vt=function(e){const t={};return e=>(void 0===t[e]&&(t[e]=(e=>{if(e.length>2){if(!xt[e])return[e];e=xt[e]}const[t,r]=e.split(""),n=yt[t],o=bt[r]||"";return Array.isArray(o)?o.map((e=>n+e)):[n+o]})(e)),t[e])}(),wt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Et=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],At=[...wt,...Et];function kt(e,t,r,n){var o;const i=null!=(o=ht(e,t,!1))?o:r;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Ct(e){return kt(e,"spacing",8,"spacing")}function Rt(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function Tt(e){return function(e,t){const r=Ct(e.theme);return Object.keys(e).map((n=>function(e,t,r,n){if(-1===t.indexOf(r))return null;const o=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=Rt(t,r),e)),{})}(vt(r),n);return pt(e,e[r],o)}(e,t,n,r))).reduce(ct,{})}(e,At)}function St(e){return"number"!=typeof e?e:`${e}px solid`}"production"===process.env.NODE_ENV||wt.reduce(((e,t)=>(e[t]=Ke,e)),{}),"production"===process.env.NODE_ENV||Et.reduce(((e,t)=>(e[t]=Ke,e)),{}),Tt.propTypes="production"!==process.env.NODE_ENV?At.reduce(((e,t)=>(e[t]=Ke,e)),{}):{},Tt.filterProps=At;const Nt=mt({prop:"border",themeKey:"borders",transform:St}),Mt=mt({prop:"borderTop",themeKey:"borders",transform:St}),Ft=mt({prop:"borderRight",themeKey:"borders",transform:St}),Ot=mt({prop:"borderBottom",themeKey:"borders",transform:St}),It=mt({prop:"borderLeft",themeKey:"borders",transform:St}),jt=mt({prop:"borderColor",themeKey:"palette"}),Dt=mt({prop:"borderTopColor",themeKey:"palette"}),_t=mt({prop:"borderRightColor",themeKey:"palette"}),Bt=mt({prop:"borderBottomColor",themeKey:"palette"}),Pt=mt({prop:"borderLeftColor",themeKey:"palette"}),Wt=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=kt(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:Rt(t,e)});return pt(e,e.borderRadius,r)}return null};Wt.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Ke}:{},Wt.filterProps=["borderRadius"];var Ut=gt(Nt,Mt,Ft,Ot,It,jt,Dt,_t,Bt,Pt,Wt),Lt=gt(mt({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),mt({prop:"display"}),mt({prop:"overflow"}),mt({prop:"textOverflow"}),mt({prop:"visibility"}),mt({prop:"whiteSpace"})),Vt=gt(mt({prop:"flexBasis"}),mt({prop:"flexDirection"}),mt({prop:"flexWrap"}),mt({prop:"justifyContent"}),mt({prop:"alignItems"}),mt({prop:"alignContent"}),mt({prop:"order"}),mt({prop:"flex"}),mt({prop:"flexGrow"}),mt({prop:"flexShrink"}),mt({prop:"alignSelf"}),mt({prop:"justifyItems"}),mt({prop:"justifySelf"}));const Zt=e=>{if(void 0!==e.gap&&null!==e.gap){const t=kt(e.theme,"spacing",8,"gap"),r=e=>({gap:Rt(t,e)});return pt(e,e.gap,r)}return null};Zt.propTypes="production"!==process.env.NODE_ENV?{gap:Ke}:{},Zt.filterProps=["gap"];const Ht=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=kt(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:Rt(t,e)});return pt(e,e.columnGap,r)}return null};Ht.propTypes="production"!==process.env.NODE_ENV?{columnGap:Ke}:{},Ht.filterProps=["columnGap"];const zt=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=kt(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:Rt(t,e)});return pt(e,e.rowGap,r)}return null};zt.propTypes="production"!==process.env.NODE_ENV?{rowGap:Ke}:{},zt.filterProps=["rowGap"];var Yt=gt(Zt,Ht,zt,mt({prop:"gridColumn"}),mt({prop:"gridRow"}),mt({prop:"gridAutoFlow"}),mt({prop:"gridAutoColumns"}),mt({prop:"gridAutoRows"}),mt({prop:"gridTemplateColumns"}),mt({prop:"gridTemplateRows"}),mt({prop:"gridTemplateAreas"}),mt({prop:"gridArea"})),Gt=gt(mt({prop:"color",themeKey:"palette"}),mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),mt({prop:"backgroundColor",themeKey:"palette"})),Xt=gt(mt({prop:"position"}),mt({prop:"zIndex",themeKey:"zIndex"}),mt({prop:"top"}),mt({prop:"right"}),mt({prop:"bottom"}),mt({prop:"left"})),Jt=mt({prop:"boxShadow",themeKey:"shadows"});function qt(e){return e<=1&&0!==e?100*e+"%":e}const Qt=mt({prop:"width",transform:qt}),Kt=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n,o;return{maxWidth:(null==(r=e.theme)||null==(n=r.breakpoints)||null==(o=n.values)?void 0:o[t])||ut[t]||qt(t)}};return pt(e,e.maxWidth,t)}return null};Kt.filterProps=["maxWidth"];const $t=mt({prop:"minWidth",transform:qt}),er=mt({prop:"height",transform:qt}),tr=mt({prop:"maxHeight",transform:qt}),rr=mt({prop:"minHeight",transform:qt});mt({prop:"size",cssProperty:"width",transform:qt}),mt({prop:"size",cssProperty:"height",transform:qt});var nr=gt(Qt,Kt,$t,er,tr,rr,mt({prop:"boxSizing"}));const or=mt({prop:"fontFamily",themeKey:"typography"}),ir=mt({prop:"fontSize",themeKey:"typography"}),sr=mt({prop:"fontStyle",themeKey:"typography"}),ar=mt({prop:"fontWeight",themeKey:"typography"}),lr=mt({prop:"letterSpacing"}),cr=mt({prop:"textTransform"}),ur=mt({prop:"lineHeight"}),dr=mt({prop:"textAlign"});var pr=gt(mt({prop:"typography",cssProperty:!1,themeKey:"typography"}),or,ir,sr,ar,lr,ur,dr,cr);const hr={borders:Ut.filterProps,display:Lt.filterProps,flexbox:Vt.filterProps,grid:Yt.filterProps,positions:Xt.filterProps,palette:Gt.filterProps,shadows:Jt.filterProps,sizing:nr.filterProps,spacing:Tt.filterProps,typography:pr.filterProps},fr={borders:Ut,display:Lt,flexbox:Vt,grid:Yt,positions:Xt,palette:Gt,shadows:Jt,sizing:nr,spacing:Tt,typography:pr},mr=Object.keys(hr).reduce(((e,t)=>(hr[t].forEach((r=>{e[r]=fr[t]})),e)),{}),gr=function(e=fr){const t=Object.keys(e).reduce(((t,r)=>(e[r].filterProps.forEach((n=>{t[n]=e[r]})),t)),{});function r(e,r,n){const o={[e]:r,theme:n},i=t[e];return i?i(o):{[e]:r}}return function e(n){const{sx:o,theme:i={}}=n||{};if(!o)return null;function s(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const s=function(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(s);let l=s;return Object.keys(o).forEach((n=>{const s="function"==typeof(a=o[n])?a(i):a;var a;if(null!=s)if("object"==typeof s)if(t[n])l=ct(l,r(n,s,i));else{const t=pt({theme:i},s,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),r=new Set(t);return e.every((e=>r.size===Object.keys(e).length))}(t,s)?l=ct(l,t):l[n]=e({sx:s,theme:i})}else l=ct(l,r(n,s,i))})),function(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}(a,l)}return Array.isArray(o)?o.map(s):s(o)}}();gr.filterProps=["sx"];var yr=gr;function br(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const xr=["sx"];function vr(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=vr(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function wr(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=vr(e))&&(n&&(n+=" "),n+=t);return n}const Er=["values","unit","step"];var Ar={borderRadius:4};const kr=["breakpoints","palette","spacing","shape"];function Cr(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=br(e,kr),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=br(e,Er),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>lt({},e,{[t.key]:t.val})),{})})(t),s=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function c(e,o){const i=s.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==i&&"number"==typeof t[s[i]]?t[s[i]]:o)-n/100}${r})`}return lt({keys:s,values:i,up:a,down:l,between:c,only:function(e){return s.indexOf(e)+1<s.length?c(e,s[s.indexOf(e)+1]):a(e)},not:function(e){const t=s.indexOf(e);return 0===t?a(s[1]):t===s.length-1?l(s[t]):c(e,s[s.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},o)}(r),l=function(e=8){if(e.mui)return e;const t=Ct({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(o);let c=tt({breakpoints:a,direction:"ltr",components:{},palette:lt({mode:"light"},n),spacing:l,shape:lt({},Ar,i)},s);return c=t.reduce(((e,t)=>tt(e,t)),c),c}const Rr=c.createContext(null);"production"!==process.env.NODE_ENV&&(Rr.displayName="ThemeContext");var Tr=Rr;function Sr(){const e=c.useContext(Tr);return"production"!==process.env.NODE_ENV&&c.useDebugValue(e),e}var Nr="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Mr(e){const{children:t,theme:r}=e,n=Sr();"production"!==process.env.NODE_ENV&&null===n&&"function"==typeof r&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join("\n"));const o=c.useMemo((()=>{const e=null===n?r:function(e,t){if("function"==typeof t){const r=t(e);return"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join("\n"))),r}return lt({},e,t)}(n,r);return null!=e&&(e[Nr]=null!==n),e}),[r,n]);return We.exports.jsx(Tr.Provider,{value:o,children:t})}function Fr(e=null){const t=Sr();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}"production"!==process.env.NODE_ENV&&(Mr.propTypes={children:ge.exports.node,theme:ge.exports.oneOfType([ge.exports.object,ge.exports.func]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(Mr.propTypes=rt(Mr.propTypes));const Or=Cr();function Ir(e=Or){return Fr(e)}const jr=["className","component"],Dr=function(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:n,styleFunctionSx:o=yr}=e,i=Qe("div")(o);return c.forwardRef((function(e,o){const s=Ir(t),a=function(e){const{sx:t}=e,r=br(e,xr),{systemProps:n,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((r=>{mr[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t})(r);let i;return i=Array.isArray(t)?[n,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return et(r)?lt({},n,r):n}:lt({},n,t),lt({},o,{sx:i})}(e),{className:l,component:c="div"}=a,u=br(a,jr);return We.exports.jsx(i,lt({as:c,ref:o,className:wr(l,n?n(r):r),theme:s},u))}))}();"production"!==process.env.NODE_ENV&&(Dr.propTypes={children:ge.exports.node,component:ge.exports.elementType,sx:ge.exports.oneOfType([ge.exports.arrayOf(ge.exports.oneOfType([ge.exports.func,ge.exports.object,ge.exports.bool])),ge.exports.func,ge.exports.object])});var _r=Dr;const Br=["variant"];function Pr(e){return 0===e.length}function Wr(e){const{variant:t}=e,r=br(e,Br);let n=t||"";return Object.keys(r).sort().forEach((t=>{n+="color"===t?Pr(n)?e[t]:at(e[t]):`${Pr(n)?t:at(t)}${at(e[t].toString())}`})),n}const Ur=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],Lr=["theme"],Vr=["theme"];function Zr(e){return 0===Object.keys(e).length}function Hr(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const zr=Cr(),Yr=function(e={}){const{defaultTheme:t=zr,rootShouldForwardProp:r=Hr,slotShouldForwardProp:n=Hr,styleFunctionSx:o=yr}=e;return(e,i={})=>{const{name:s,slot:a,skipVariantsResolver:l,skipSx:c,overridesResolver:u}=i,d=br(i,Ur),p=void 0!==l?l:a&&"Root"!==a||!1,h=c||!1;let f;var m;"production"!==process.env.NODE_ENV&&s&&(f=`${s}-${m=a||"Root",m.charAt(0).toLowerCase()+m.slice(1)}`);let g=Hr;"Root"===a?g=r:a&&(g=n);const y=Qe(e,lt({shouldForwardProp:g,label:f},d)),b=(r,...n)=>{const i=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?r=>{let{theme:n}=r,o=br(r,Lr);return e(lt({theme:Zr(n)?t:n},o))}:e)):[];let l=r;s&&u&&i.push((e=>{const r=Zr(e.theme)?t:e.theme,n=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(s,r);if(n){const t={};return Object.entries(n).forEach((([n,o])=>{t[n]="function"==typeof o?o(lt({},e,{theme:r})):o})),u(e,t)}return null})),s&&!p&&i.push((e=>{const r=Zr(e.theme)?t:e.theme;return((e,t,r,n)=>{var o,i;const{ownerState:s={}}=e,a=[],l=null==r||null==(o=r.components)||null==(i=o[n])?void 0:i.variants;return l&&l.forEach((r=>{let n=!0;Object.keys(r.props).forEach((t=>{s[t]!==r.props[t]&&e[t]!==r.props[t]&&(n=!1)})),n&&a.push(t[Wr(r.props)])})),a})(e,((e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const n={};return r.forEach((e=>{const t=Wr(e.props);n[t]=e.style})),n})(s,r),r,s)})),h||i.push((e=>{const r=Zr(e.theme)?t:e.theme;return o(lt({},e,{theme:r}))}));const c=i.length-n.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");l=[...r,...e],l.raw=[...r.raw,...e]}else"function"==typeof r&&r.__emotion_real!==r&&(l=e=>{let{theme:n}=e,o=br(e,Vr);return r(lt({theme:Zr(n)?t:n},o))});const d=y(l,...i);if("production"!==process.env.NODE_ENV){let t;s&&(t=`${s}${a||""}`),void 0===t&&(t=`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return it(e,"Component");if("object"==typeof e)switch(e.$$typeof){case Ye.exports.ForwardRef:return st(e,e.render,"ForwardRef");case Ye.exports.Memo:return st(e,e.type,"memo");default:return}}}(e)})`),d.displayName=t}return d};return y.withConfig&&(b.withConfig=y.withConfig),b}}();var Gr=Yr;function Xr(e){const{theme:t,name:r,props:n}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?function(e,t){const r=$e({},t);return Object.keys(e).forEach((t=>{void 0===r[t]&&(r[t]=e[t])})),r}(t.components[r].defaultProps,n):n}function Jr(e){if(e.type)return e;if("#"===e.charAt(0))return Jr(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:nt(9,e));let n,o=e.substring(t+1,e.length-1);if("color"===r){if(o=o.split(" "),n=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${n}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:nt(10,n))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:r,values:o,colorSpace:n}}function qr(e,t){return e=Jr(e),t=function(e,t=0,r=1){return"production"!==process.env.NODE_ENV&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Math.min(Math.max(t,e),r)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}(e)}function Qr(e){const t=Ir();return We.exports.jsx(A.Provider,{value:"object"==typeof t?t:{},children:e.children})}function Kr(e){const{children:t,theme:r}=e;return We.exports.jsx(Mr,{theme:r,children:We.exports.jsx(Qr,{children:t})})}"production"!==process.env.NODE_ENV&&(Qr.propTypes={children:ge.exports.node}),"production"!==process.env.NODE_ENV&&(Kr.propTypes={children:ge.exports.node,theme:ge.exports.oneOfType([ge.exports.func,ge.exports.object]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(Kr.propTypes=rt(Kr.propTypes));var $r=function(){return $r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$r.apply(this,arguments)};function en(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function tn(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function rn(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function nn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var on={mode:"dark",primary:{main:"#FFE804"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#FF6187",contrastText:"#FFFFFF"},warning:{main:"#EB8D27",contrastText:"#1A1A1B"},success:{main:"#55F9C7",contrastText:"#1A1A1B"},purple:{main:"#BC9CFF",contrastText:"#1A1A1B"},background:{default:"#252831",paper:"#33363F",paperContrast:"#41454F",backdrop:qr("#000",.9),input:"#252831",tag:qr("#FFF",.04)},text:{primary:"#FFF",secondary:qr("#FFF",.5),disabled:qr("#FFF",.3),placeholder:qr("#FFF",.3),link:"#FFE804"},border:{main:qr("#FFF",.1),light:qr("#FFF",.3),disabled:qr("#FFF",.1)},hover:{default:qr("#FFF",.1)}},sn={mode:"light",primary:{main:"#1A1A1B"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#EC5A7D",contrastText:"#FFFFFF"},warning:{main:"#B15600",contrastText:"#1A1A1B"},success:{main:"#2FBA90",contrastText:"#1A1A1B"},purple:{main:"#6851B4",contrastText:"#1A1A1B"},background:{default:"#F9F6E8",paper:"#FFFFFF",paperContrast:"#F6F6F6",backdrop:qr("#000",.9),input:"#F0F0F0",tag:qr("#1A1A1B",.04)},text:{primary:"#1A1A1B",secondary:qr("#1A1A1B",.5),disabled:qr("#1A1A1B",.3),placeholder:qr("#1A1A1B",.3),link:"#1A1A1B"},border:{main:qr("#1A1A1B",.1),light:qr("#1A1A1B",.3),disabled:qr("#1A1A1B",.1)},hover:{default:qr("#1A1A1B",.1)}},an=function(e,t,r){var n,i,s,a="light"===e,l=r?function(e){return["zh-CN","ja-JP","ko-KR"].includes(e)?400:500}(r):400,c=a?sn:on;(null===(n=null==t?void 0:t.palette)||void 0===n?void 0:n.mode)===e&&(c=t.palette);var u={spacing:1,shape:{borderRadius:1},breakpoints:{values:{mobile:0,tablet:768,laptop:1024,desktop:1200,largeDesktop:1536}},typography:{fontFamily:rn(rn(["Manrope"],tn("ja-JP"===r?["Meiryo"]:[]),!1),["Poppins","Inter","PingFangSC-Regular",'"Microsoft YaHei"',"sans-serif"],!1).join(","),fontSize:16,h1:{fontSize:36,lineHeight:"49px",fontWeight:600},h2:{fontSize:32,fontWeight:600,lineHeight:"44px"},h3:{fontSize:28,fontWeight:600,lineHeight:"38px"},caption:{fontSize:20,fontWeight:600,lineHeight:"28px"},h5:{fontSize:18,lineHeight:"24px",fontWeight:600},body1:{fontSize:16,lineHeight:"22px",fontWeight:l},body2:{fontSize:14,lineHeight:"19px",fontWeight:l},h6:{fontSize:12,lineHeight:"17px",fontWeight:l},button:{fontSize:16,lineHeight:1,fontWeight:600}},components:{MuiCssBaseline:{styleOverrides:{"::-webkit-scrollbar":{width:6,backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{backgroundColor:null===(i=c.border)||void 0===i?void 0:i.main,borderColor:null===(s=c.border)||void 0===s?void 0:s.main,borderRadius:100}}},MuiTypography:{defaultProps:{variantMapping:{h1:"h2",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"div",caption:"h5",subtitle1:"h5",subtitle2:"h5",body1:"div",body2:"div"}}}},zIndex:{tooltip:1500}};return $r($r({},o(u,t)),{palette:c})};var ln=function(e,t){var r;return $r({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:null===(r=e.palette)||void 0===r?void 0:r.mode})},cn=function(e){var t,r,n;return $r({color:null===(t=e.palette)||void 0===t?void 0:t.text.primary,fontFamily:null===(r=e.typography)||void 0===r?void 0:r.fontFamily},(null===(n=e.typography)||void 0===n?void 0:n.body1)||{})},un=function(e){var t;return $r($r({},cn(e)),{backgroundColor:null===(t=e.palette)||void 0===t?void 0:t.background.default,"@media print":{backgroundColor:"#FFF"}})};function dn(e){var t=function({props:e,name:t,defaultTheme:r}){return Xr({theme:Ir(r),name:t,props:e})}({props:e,name:"DODOCssBaseline"}),r=t.children,n=t.enableColorScheme,o=void 0!==n&&n,i=t.container;return We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(qe,{styles:function(e){return function(e,t,r){var n,o,i,s,a,l;void 0===t&&(t=!1);var c={html:ln(e,t),"*, *::before, *::after":{boxSizing:"border-box"},"strong, b":{fontWeight:(null===(i=e.typography)||void 0===i?void 0:i.fontWeightBold)||"bolder"},body:$r($r({margin:0},un(e)),{"&::backdrop":{backgroundColor:null===(s=e.palette)||void 0===s?void 0:s.background.default}})};r&&(delete c.html,delete c.body,(n={})[r]=$r($r({},c),cn(e)),c=n);var u=null===(l=null===(a=e.components)||void 0===a?void 0:a.MuiCssBaseline)||void 0===l?void 0:l.styleOverrides;if(u){if(r){var d={};Object.keys(u).forEach((function(e){d["*"+e]=u[e]})),(o={})[r]=d,u=o}c=[c,u]}return c}(e,o,i)}}),r]})}function pn(){return pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pn.apply(this,arguments)}function hn(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function fn(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...r){return e(...r)||t(...r)}}function mn(e,t,r,n,o){const i=e[t],s=o||t;if(null==i||"undefined"==typeof window)return null;let a;const l=i.type;return"function"!=typeof l||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(l)||(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const gn=fn(ge.exports.element,mn);gn.isRequired=fn(ge.exports.element.isRequired,mn);var yn=gn;function bn(e){return"production"===process.env.NODE_ENV?e:pn({},e,{"exact-prop: ​":t=>{const r=Object.keys(t).filter((t=>!e.hasOwnProperty(t)));return r.length>0?new Error(`The following props are not supported: ${r.map((e=>`\`${e}\``)).join(", ")}. Please remove them.`):null}})}function xn(e,t,r,n,o){if("production"===process.env.NODE_ENV)return null;const i=e[t],s=o||t;return null==i?null:i&&1!==i.nodeType?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an HTMLElement.`):null}var vn=ge.exports.oneOfType([ge.exports.func,ge.exports.object]);function wn(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}function En(e){return e&&e.ownerDocument||document}function An(e){return En(e).defaultView||window}function kn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Cn="undefined"!=typeof window?c.useLayoutEffect:c.useEffect;function Rn(e){const t=c.useRef(e);return Cn((()=>{t.current=e})),c.useCallback(((...e)=>(0,t.current)(...e)),[])}function Tn(...e){return c.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{kn(e,t)}))}),e)}let Sn,Nn=!0,Mn=!1;const Fn={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function On(e){e.metaKey||e.altKey||e.ctrlKey||(Nn=!0)}function In(){Nn=!1}function jn(){"hidden"===this.visibilityState&&Mn&&(Nn=!0)}function Dn(){const e=c.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",On,!0),t.addEventListener("mousedown",In,!0),t.addEventListener("pointerdown",In,!0),t.addEventListener("touchstart",In,!0),t.addEventListener("visibilitychange",jn,!0))}),[]),t=c.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return Nn||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!Fn[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(Mn=!0,window.clearTimeout(Sn),Sn=window.setTimeout((()=>{Mn=!1}),100),t.current=!1,!0)},ref:e}}function _n(e,t,r){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}const Bn=e=>e;var Pn=(()=>{let e=Bn;return{configure(t){e=t},generate:t=>e(t),reset(){e=Bn}}})();const Wn={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Un(e,t,r="Mui"){const n=Wn[t];return n?`${r}-${n}`:`${Pn.generate(e)}-${t}`}function Ln(e,t,r="Mui"){const n={};return t.forEach((t=>{n[t]=Un(e,t,r)})),n}function Vn(e){return Un("MuiButton",e)}function Zn(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter((r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r))).forEach((t=>{r[t]=e[t]})),r}function Hn(e){return"string"==typeof e}Ln("MuiButton",["root","active","disabled","focusVisible"]);const zn={disableDefaultClasses:!1},Yn=c.createContext(zn);function Gn(e){const{disableDefaultClasses:t}=c.useContext(Yn);return r=>t?"":e(r)}function Xn(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((r=>{t[r]=e[r]})),t}const Jn=["elementType","externalSlotProps","ownerState"];function qn(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o}=e,i=hn(e,Jn),s=function(e,t){return"function"==typeof e?e(t):e}(n,o),{props:a,internalRef:l}=function(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const e=wr(null==o?void 0:o.className,null==n?void 0:n.className,i,null==r?void 0:r.className),t=pn({},null==r?void 0:r.style,null==o?void 0:o.style,null==n?void 0:n.style),s=pn({},r,o,n);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=Zn(pn({},o,n)),a=Xn(n),l=Xn(o),c=t(s),u=wr(null==c?void 0:c.className,null==r?void 0:r.className,i,null==o?void 0:o.className,null==n?void 0:n.className),d=pn({},null==c?void 0:c.style,null==r?void 0:r.style,null==o?void 0:o.style,null==n?void 0:n.style),p=pn({},c,r,l,a);return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}(pn({},i,{externalSlotProps:s})),c=function(e,t,r){return void 0===e||Hn(e)?t:pn({},t,{ownerState:pn({},t.ownerState,r)})}(r,pn({},a,{ref:Tn(l,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),o);return c}const Qn=["action","children","disabled","focusableWhenDisabled","onFocusVisible","slotProps","slots"],Kn=c.forwardRef((function(e,t){var r;const{action:n,children:o,focusableWhenDisabled:i=!1,slotProps:s={},slots:a={}}=e,l=hn(e,Qn),u=c.useRef(),{active:d,focusVisible:p,setFocusVisible:h,getRootProps:f}=function(e={}){const{disabled:t=!1,focusableWhenDisabled:r,href:n,rootRef:o,tabIndex:i,to:s,type:a}=e,l=c.useRef(),[u,d]=c.useState(!1),{isFocusVisibleRef:p,onFocus:h,onBlur:f,ref:m}=Dn(),[g,y]=c.useState(!1);t&&!r&&g&&y(!1),c.useEffect((()=>{p.current=g}),[g,p]);const[b,x]=c.useState(""),v=e=>t=>{var r;g&&t.preventDefault(),null==(r=e.onMouseLeave)||r.call(e,t)},w=e=>t=>{var r;f(t),!1===p.current&&y(!1),null==(r=e.onBlur)||r.call(e,t)},E=e=>t=>{var r,n;l.current||(l.current=t.currentTarget),h(t),!0===p.current&&(y(!0),null==(n=e.onFocusVisible)||n.call(e,t)),null==(r=e.onFocus)||r.call(e,t)},A=()=>{const e=l.current;return"BUTTON"===b||"INPUT"===b&&["button","submit","reset"].includes(null==e?void 0:e.type)||"A"===b&&(null==e?void 0:e.href)},k=e=>r=>{var n;t||null==(n=e.onClick)||n.call(e,r)},C=e=>r=>{var n;t||(d(!0),document.addEventListener("mouseup",(()=>{d(!1)}),{once:!0})),null==(n=e.onMouseDown)||n.call(e,r)},R=e=>r=>{var n,o;null==(n=e.onKeyDown)||n.call(e,r),r.defaultMuiPrevented||(r.target!==r.currentTarget||A()||" "!==r.key||r.preventDefault(),r.target!==r.currentTarget||" "!==r.key||t||d(!0),r.target!==r.currentTarget||A()||"Enter"!==r.key||t||(null==(o=e.onClick)||o.call(e,r),r.preventDefault()))},T=e=>r=>{var n,o;r.target===r.currentTarget&&d(!1),null==(n=e.onKeyUp)||n.call(e,r),r.target!==r.currentTarget||A()||t||" "!==r.key||r.defaultMuiPrevented||null==(o=e.onClick)||o.call(e,r)},S=Tn(c.useCallback((e=>{var t;x(null!=(t=null==e?void 0:e.tagName)?t:"")}),[]),o,m,l),N={};return"BUTTON"===b?(N.type=null!=a?a:"button",r?N["aria-disabled"]=t:N.disabled=t):""!==b&&(n||s||(N.role="button",N.tabIndex=null!=i?i:0),t&&(N["aria-disabled"]=t,N.tabIndex=r?null!=i?i:0:-1)),{getRootProps:(t={})=>{const r=pn({},Zn(e),t);return delete r.onFocusVisible,pn({type:a},r,N,{onBlur:w(r),onClick:k(r),onFocus:E(r),onKeyDown:R(r),onKeyUp:T(r),onMouseDown:C(r),onMouseLeave:v(r),ref:S})},focusVisible:g,setFocusVisible:y,active:u,rootRef:S}}(pn({},e,{focusableWhenDisabled:i}));c.useImperativeHandle(n,(()=>({focusVisible:()=>{h(!0),u.current.focus()}})),[h]);const m=pn({},e,{active:d,focusableWhenDisabled:i,focusVisible:p}),g=(e=>{const{active:t,disabled:r,focusVisible:n}=e;return _n({root:["root",r&&"disabled",n&&"focusVisible",t&&"active"]},Gn(Vn))})(m),y=l.href||l.to?"a":"button",b=null!=(r=a.root)?r:y,x=qn({elementType:b,getSlotProps:f,externalForwardedProps:l,externalSlotProps:s.root,additionalProps:{ref:t},ownerState:m,className:g.root});return We.exports.jsx(b,pn({},x,{children:o}))}));"production"!==process.env.NODE_ENV&&(Kn.propTypes={action:ge.exports.oneOfType([ge.exports.func,ge.exports.shape({current:ge.exports.shape({focusVisible:ge.exports.func.isRequired})})]),children:ge.exports.node,disabled:ge.exports.bool,focusableWhenDisabled:ge.exports.bool,href:ge.exports.string,onFocusVisible:ge.exports.func,slotProps:ge.exports.shape({root:ge.exports.oneOfType([ge.exports.func,ge.exports.object])}),slots:ge.exports.shape({root:ge.exports.elementType}),to:ge.exports.string});var $n,eo,to=Kn;!function(e){e.contained="contained",e.outlined="outlined",e.dashed="dashed",e.second="second",e.tag="tag"}($n||($n={})),function(e){e.small="small",e.middle="middle",e.big="big"}(eo||(eo={}));var ro=function(e,t){var r,n,i,s,a,l=e.fullWidth,c=e.variant,u=e.sx,d=e.danger,p={px:16,py:10,typography:"button",whiteSpace:"nowrap",fontFamily:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&[disabled]":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}};switch(e.size){case eo.small:p.height=36,p.borderRadius=8,p.typography="body2";break;case eo.big:p.height=60,p.borderRadius=16;break;default:p.height=48,p.borderRadius=8}l&&(p.display="flex",p.width="100%");var h="&:not([disabled]):hover";switch(c){case $n.outlined:p=$r($r({},p),((r={border:"solid 1px ".concat(d?t.palette.error.main:t.palette.primary.main),color:d?"error.main":"primary.main","&[disabled]":{color:"text.disabled",borderColor:"border.disabled"}})[h]={background:qr(d?t.palette.error.main:t.palette.primary.main,.1)},r));break;case $n.dashed:p=$r($r({},p),((n={height:p.height-1,border:"dashed 1px ".concat(d?t.palette.error.main:t.palette.border.light),color:d?"error.main":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:qr(d?t.palette.error.main:t.palette.border.disabled,.1)},n));break;case $n.second:p=$r($r({},p),((i={backgroundColor:d?"error.main":t.palette.background.tag,border:"none",color:d?"error.contrastText":"text.primary","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:d?qr(t.palette.error.main,.1):qr(t.palette.border.disabled,.2)},i));break;case $n.tag:p=$r($r({},p),((s={px:10,py:3,height:"auto",borderRadius:4,typography:"body2",backgroundColor:d?"error.main":"background.tag",border:"none",color:d?"error.contrastText":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:d?qr(t.palette.error.main,.1):qr(t.palette.border.disabled,.2)},s));break;default:p=$r($r({},p),((a={backgroundColor:d?"error.main":"secondary.main"})[h]={background:"linear-gradient(0deg, rgba(26, 26, 27, 0.1), rgba(26, 26, 27, 0.1)), ".concat(d?t.palette.error.main:(null==u?void 0:u.backgroundColor)||t.palette.secondary.main)},a.color=d?"error.contrastText":"secondary.contrastText",a["&[disabled]"]={backgroundColor:"border.disabled",color:"text.disabled"},a))}return o(p,u)},no=function(e){var t=e.onClick,r=e.disabled,n=e.children,o=e.component,i=e.to,s=e.isLoading,a=e.fullWidth,l=e.variant,c=e.sx,u=e.danger,d=e.size;e.ref;var p=en(e,["onClick","disabled","children","component","to","isLoading","fullWidth","variant","sx","danger","size","ref"]),h=Ir(),f={disabled:r,sx:ro({fullWidth:a,variant:l,sx:c,danger:u,size:d},h),onClick:t,component:o,to:i};return We.exports.jsx(_r,$r({},f,p,{component:to,disabled:!!s||r,className:l||$n.contained},{children:We.exports.jsxs(We.exports.Fragment,{children:[s&&We.exports.jsx(_r,{component:C,sx:{mr:8,"& path":{fill:h.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}}),n]})}))};no.Variant=$n,no.Size=eo;var oo,io=Gr(to)(oo||(oo=nn(["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"],["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"])));function so(e){return Un("MuiInput",e)}var ao=Ln("MuiInput",["root","formControl","focused","disabled","error","multiline","input","inputMultiline","inputTypeSearch","adornedStart","adornedEnd"]);const lo=c.createContext(void 0);"production"!==process.env.NODE_ENV&&(lo.displayName="FormControlContext");var co=lo;const uo=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","endAdornment","error","id","multiline","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","startAdornment","value","type","rows","slotProps","slots","minRows","maxRows"],po=c.forwardRef((function(e,t){var r,n,o;const{"aria-describedby":i,"aria-label":s,"aria-labelledby":a,autoComplete:l,autoFocus:u,className:d,defaultValue:p,disabled:h,endAdornment:f,error:m,id:g,multiline:y=!1,name:b,onClick:x,onChange:v,onKeyDown:w,onKeyUp:E,onFocus:A,onBlur:k,placeholder:C,readOnly:R,required:T,startAdornment:S,value:N,type:M,rows:F,slotProps:O={},slots:I={},minRows:j,maxRows:D}=e,_=hn(e,uo),{getRootProps:B,getInputProps:P,focused:W,formControlContext:U,error:L,disabled:V}=function(e){const{defaultValue:t,disabled:r=!1,error:n=!1,onBlur:o,onChange:i,onFocus:s,required:a=!1,value:l,inputRef:u}=e,d=c.useContext(co);let p,h,f,m,g;var y,b,x;if(d){if(p=void 0,h=null!=(y=d.disabled)&&y,f=null!=(b=d.error)&&b,m=null!=(x=d.required)&&x,g=d.value,"production"!==process.env.NODE_ENV){const t=["defaultValue","disabled","error","required","value"].filter((t=>void 0!==e[t]));t.length>0&&console.warn(["MUI: You have set props on an input that is inside a FormControl.","Set these props on a FormControl instead. Otherwise they will be ignored.",`Ignored props: ${t.join(", ")}`].join("\n"))}}else p=t,h=r,f=n,m=a,g=l;const{current:v}=c.useRef(null!=g),w=c.useCallback((e=>{"production"!==process.env.NODE_ENV&&e&&"INPUT"!==e.nodeName&&!e.focus&&console.error(["MUI: You have provided a `slots.input` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join("\n"))}),[]),E=c.useRef(null),A=Tn(E,u,w),[k,C]=c.useState(!1);c.useEffect((()=>{!d&&h&&k&&(C(!1),null==o||o())}),[d,h,k,o]);const R=e=>t=>{var r,n;null!=d&&d.disabled?t.stopPropagation():(null==(r=e.onFocus)||r.call(e,t),d&&d.onFocus?null==d||null==(n=d.onFocus)||n.call(d):C(!0))},T=e=>(t,...r)=>{var n,o;if(!v&&null==(t.target||E.current))throw new Error("production"!==process.env.NODE_ENV?"MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":function(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}(17));null==d||null==(n=d.onChange)||n.call(d,t),null==(o=e.onChange)||o.call(e,t,...r)};return{disabled:h,error:f,focused:k,formControlContext:d,getInputProps:(e={})=>{const t=pn({},{onBlur:o,onChange:i,onFocus:s},Zn(e)),r=pn({},e,t,{onBlur:(n=t,e=>{var t;null==(t=n.onBlur)||t.call(n,e),d&&d.onBlur?d.onBlur():C(!1)}),onChange:T(t),onFocus:R(t)});var n;return pn({},r,{"aria-invalid":f||void 0,defaultValue:p,ref:A,value:g,required:m,disabled:h})},getRootProps:(t={})=>{const r=pn({},Zn(e,["onBlur","onChange","onFocus"]),Zn(t));return pn({},t,r,{onClick:(n=r,e=>{var t;E.current&&e.currentTarget===e.target&&E.current.focus(),null==(t=n.onClick)||t.call(n,e)})});var n},inputRef:A,required:m,value:g}}({disabled:h,defaultValue:p,error:m,onBlur:k,onClick:x,onChange:v,onFocus:A,required:T,value:N}),Z=y?void 0:null!=M?M:"text",H=pn({},e,{disabled:V,error:L,focused:W,formControlContext:U,multiline:y,type:Z}),z=(e=>{const{disabled:t,error:r,focused:n,formControlContext:o,multiline:i,startAdornment:s,endAdornment:a}=e;return _n({root:["root",t&&"disabled",r&&"error",n&&"focused",Boolean(o)&&"formControl",i&&"multiline",Boolean(s)&&"adornedStart",Boolean(a)&&"adornedEnd"],input:["input",t&&"disabled",i&&"multiline"]},Gn(so))})(H),Y={"aria-describedby":i,"aria-label":s,"aria-labelledby":a,autoComplete:l,autoFocus:u,id:g,onKeyDown:w,onKeyUp:E,name:b,placeholder:C,readOnly:R,type:Z},G=null!=(r=I.root)?r:"div",X=qn({elementType:G,getSlotProps:B,externalSlotProps:O.root,externalForwardedProps:_,additionalProps:{ref:t},ownerState:H,className:[z.root,d]}),J=y?null!=(n=I.textarea)?n:"textarea":null!=(o=I.input)?o:"input",q=qn({elementType:J,getSlotProps:e=>P(pn({},Y,e)),externalSlotProps:O.input,additionalProps:pn({rows:y?F:void 0},y&&!Hn(J)&&{minRows:F||j,maxRows:F||D}),ownerState:H,className:z.input});return"production"!==process.env.NODE_ENV&&y&&F&&(j||D)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),We.exports.jsxs(G,pn({},X,{children:[S,We.exports.jsx(J,pn({},q)),f]}))}));"production"!==process.env.NODE_ENV&&(po.propTypes={"aria-describedby":ge.exports.string,"aria-label":ge.exports.string,"aria-labelledby":ge.exports.string,autoComplete:ge.exports.string,autoFocus:ge.exports.bool,className:ge.exports.string,defaultValue:ge.exports.any,disabled:ge.exports.bool,endAdornment:ge.exports.node,error:ge.exports.bool,id:ge.exports.string,inputRef:ge.exports.oneOfType([ge.exports.func,ge.exports.shape({current:ge.exports.object})]),maxRows:ge.exports.number,minRows:ge.exports.number,multiline:ge.exports.bool,name:ge.exports.string,onBlur:ge.exports.func,onChange:ge.exports.func,onClick:ge.exports.func,onFocus:ge.exports.func,onKeyDown:ge.exports.func,onKeyUp:ge.exports.func,placeholder:ge.exports.string,readOnly:ge.exports.bool,required:ge.exports.bool,rows:ge.exports.number,slotProps:ge.exports.shape({input:ge.exports.oneOfType([ge.exports.func,ge.exports.object]),root:ge.exports.oneOfType([ge.exports.func,ge.exports.object])}),slots:ge.exports.shape({input:ge.exports.elementType,root:ge.exports.elementType,textarea:ge.exports.elementType}),startAdornment:ge.exports.node,type:ge.exports.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),value:ge.exports.any});var ho=po;function fo(e){var t,r,n=e.fullWidth,i=e.height,s=e.suffixGap,a=e.error,l=e.sx,c=en(e,["fullWidth","height","suffixGap","error","sx"]);return We.exports.jsx(_r,$r({component:"div",sx:o($r($r($r((t={position:"relative",display:n?"flex":"inline-flex",alignItems:"center",border:"1px solid",borderColor:a?"error.main":"border.main",borderRadius:8,backgroundColor:"background.input"},t["&.".concat(ao.disabled)]={color:"text.disabled",cursor:"default"},t.height=i,t),n&&{width:"100%"}),{"& > *:not(input):not(.MuiSelect-select):first-of-type":{ml:s,whiteSpace:"nowrap"},"& > *:not(input):last-child":{mr:s,whiteSpace:"nowrap"}}),a?{}:(r={},r["&.".concat(ao.focused)]={borderColor:"text.secondary"},r)),l)},c))}var mo=Gr(_r)((function(e){var t=e.theme,r="{\n color: ".concat(t.palette.text.placeholder,";\n font-size: 14px;\n font-weight: 500;\n opacity: 1;\n }");return"\n font: inherit;\n font-size: 16px;\n font-weight: 600;\n line-height: 19px;\n padding: ".concat(t.spacing(14,16),";\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n }\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n height: 100%;\n width: 100%;\n border: none;\n color: ").concat(t.palette.text.primary,";\n background-color: transparent;\n &::-webkit-input-placeholder ").concat(r,";\n &::-moz-placeholder ").concat(r,";\n &:-ms-input-placeholder ").concat(r,";\n &::-ms-input-placeholder ").concat(r,";\n &:focus {\n outline: 0;\n }\n &:invalid {\n box-shadow: none;\n }\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n &.").concat(ao.disabled," {\n opacity: 1;\n -webkit-text-fill-color: ").concat(t.palette.text.disabled,";\n }\n ")})),go=d((function(e,t){var r=e.fullWidth,n=e.error,o=e.errorMsg,i=e.sx,s=e.suffix,a=e.prefix,l=e.height,c=e.suffixGap,u=void 0===c?16:c,d=e.dataTestId,p=e.inputSx,h=en(e,["fullWidth","error","errorMsg","sx","suffix","prefix","height","suffixGap","dataTestId","inputSx"]),f=m((function(e){return We.exports.jsx(fo,$r({fullWidth:r,height:l,suffixGap:u,error:n,sx:i,"data-testid":d},e))}),[r,l,u,n,d,JSON.stringify(i)]);return We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(ho,$r({slots:{root:f,input:mo},startAdornment:a,endAdornment:s,slotProps:{input:{component:"input",sx:p}}},h,{ref:t})),o?We.exports.jsx(_r,$r({sx:{typography:"body2",color:"error.main",mt:6}},{children:o})):""]})})),yo=d((function(e,t){var r=e.weak,n=e.color,i=e.sx,s=en(e,["weak","color","sx"]),a=r?"text.primary":"text.secondary",l=r?"text.secondary":"text.primary";return n&&(a=n,l=n),We.exports.jsx(_r,$r({ref:t,sx:o($r({color:a,opacity:n&&!r?.5:1},{"&:hover":{color:l,opacity:n&&r?.5:1}}),i)},s))}));function bo(e){var t=e.clearValue,r=e.hideSearchIcon,n=e.height,i=void 0===n?48:n,s=e.inputSx,a=en(e,["clearValue","hideSearchIcon","height","inputSx"]),l=Ir(),c=a.value;return We.exports.jsx(go,$r({prefix:r?null:We.exports.jsx(S,{style:{width:24,minWidth:24,height:24,color:l.palette.text.placeholder}}),suffix:c&&t?We.exports.jsx(yo,$r({sx:{width:24,minWidth:24,height:24,mr:12,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"background.tag",cursor:"pointer"},onClick:t},{children:We.exports.jsx(_r,{component:N,sx:{width:14,height:14}})})):null},a,{inputSx:o({pl:4},s),height:i}))}var xo=function(e){var t=e.sx,r=Ir();return We.exports.jsx(_r,{sx:$r({width:20,color:r.palette.primary.main,animation:"spin 3s linear infinite","@keyframes spin":{"100%":{transform:"rotate(360deg)"}}},t),component:C})};function vo(e){return e.substring(2).toLowerCase()}function wo(e){const{children:t,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,s=c.useRef(!1),a=c.useRef(null),l=c.useRef(!1),u=c.useRef(!1);c.useEffect((()=>(setTimeout((()=>{l.current=!0}),0),()=>{l.current=!1})),[]);const d=Tn(t.ref,a),p=Rn((e=>{const t=u.current;u.current=!1;const n=En(a.current);if(!l.current||!a.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n))return;if(s.current)return void(s.current=!1);let i;i=e.composedPath?e.composedPath().indexOf(a.current)>-1:!n.documentElement.contains(e.target)||a.current.contains(e.target),i||!r&&t||o(e)})),h=e=>r=>{u.current=!0;const n=t.props[e];n&&n(r)},f={ref:d};return!1!==i&&(f[i]=h(i)),c.useEffect((()=>{if(!1!==i){const e=vo(i),t=En(a.current),r=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",r)}}}),[p,i]),!1!==n&&(f[n]=h(n)),c.useEffect((()=>{if(!1!==n){const e=vo(n),t=En(a.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}}),[p,n]),We.exports.jsx(c.Fragment,{children:c.cloneElement(t,f)})}"production"!==process.env.NODE_ENV&&(wo.propTypes={children:yn.isRequired,disableReactTree:ge.exports.bool,mouseEvent:ge.exports.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:ge.exports.func.isRequired,touchEvent:ge.exports.oneOf(["onTouchEnd","onTouchStart",!1])}),"production"!==process.env.NODE_ENV&&(wo.propTypes=bn(wo.propTypes));var Eo="top",Ao="bottom",ko="right",Co="left",Ro=[Eo,Ao,ko,Co],To=Ro.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),So=[].concat(Ro,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),No=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Mo(e){return e?(e.nodeName||"").toLowerCase():null}function Fo(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Oo(e){return e instanceof Fo(e).Element||e instanceof Element}function Io(e){return e instanceof Fo(e).HTMLElement||e instanceof HTMLElement}function jo(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Fo(e).ShadowRoot||e instanceof ShadowRoot)}var Do={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];Io(o)&&Mo(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});Io(n)&&Mo(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function _o(e){return e.split("-")[0]}var Bo=Math.max,Po=Math.min,Wo=Math.round;function Uo(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Lo(){return!/^((?!chrome|android).)*safari/i.test(Uo())}function Vo(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Io(e)&&(o=e.offsetWidth>0&&Wo(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Wo(n.height)/e.offsetHeight||1);var s=(Oo(e)?Fo(e):window).visualViewport,a=!Lo()&&r,l=(n.left+(a&&s?s.offsetLeft:0))/o,c=(n.top+(a&&s?s.offsetTop:0))/i,u=n.width/o,d=n.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function Zo(e){var t=Vo(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Ho(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&jo(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function zo(e){return Fo(e).getComputedStyle(e)}function Yo(e){return["table","td","th"].indexOf(Mo(e))>=0}function Go(e){return((Oo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xo(e){return"html"===Mo(e)?e:e.assignedSlot||e.parentNode||(jo(e)?e.host:null)||Go(e)}function Jo(e){return Io(e)&&"fixed"!==zo(e).position?e.offsetParent:null}function qo(e){for(var t=Fo(e),r=Jo(e);r&&Yo(r)&&"static"===zo(r).position;)r=Jo(r);return r&&("html"===Mo(r)||"body"===Mo(r)&&"static"===zo(r).position)?t:r||function(e){var t=/firefox/i.test(Uo());if(/Trident/i.test(Uo())&&Io(e)&&"fixed"===zo(e).position)return null;var r=Xo(e);for(jo(r)&&(r=r.host);Io(r)&&["html","body"].indexOf(Mo(r))<0;){var n=zo(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function Qo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ko(e,t,r){return Bo(e,Po(t,r))}function $o(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ei(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}var ti={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=_o(r.placement),l=Qo(a),c=[Co,ko].indexOf(a)>=0?"height":"width";if(i&&s){var u=function(e,t){return $o("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ei(e,Ro))}(o.padding,r),d=Zo(i),p="y"===l?Eo:Co,h="y"===l?Ao:ko,f=r.rects.reference[c]+r.rects.reference[l]-s[l]-r.rects.popper[c],m=s[l]-r.rects.reference[l],g=qo(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=f/2-m/2,x=u[p],v=y-d[c]-u[h],w=y/2-d[c]/2+b,E=Ko(x,w,v),A=l;r.modifiersData[n]=((t={})[A]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Ho(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ri(e){return e.split("-")[1]}var ni={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oi(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=s.x,h=void 0===p?0:p,f=s.y,m=void 0===f?0:f,g="function"==typeof u?u({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Co,v=Eo,w=window;if(c){var E=qo(r),A="clientHeight",k="clientWidth";E===Fo(r)&&"static"!==zo(E=Go(r)).position&&"absolute"===a&&(A="scrollHeight",k="scrollWidth"),(o===Eo||(o===Co||o===ko)&&"end"===i)&&(v=Ao,m-=(d&&E===w&&w.visualViewport?w.visualViewport.height:E[A])-n.height,m*=l?1:-1),o!==Co&&(o!==Eo&&o!==Ao||"end"!==i)||(x=ko,h-=(d&&E===w&&w.visualViewport?w.visualViewport.width:E[k])-n.width,h*=l?1:-1)}var C,R=Object.assign({position:a},c&&ni),T=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:Wo(r*o)/o||0,y:Wo(n*o)/o||0}}({x:h,y:m},Fo(r)):{x:h,y:m};return h=T.x,m=T.y,l?Object.assign({},R,((C={})[v]=b?"0":"",C[x]=y?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",C)):Object.assign({},R,((t={})[v]=b?m+"px":"",t[x]=y?h+"px":"",t.transform="",t))}var ii={passive:!0},si={left:"right",right:"left",bottom:"top",top:"bottom"};function ai(e){return e.replace(/left|right|bottom|top/g,(function(e){return si[e]}))}var li={start:"end",end:"start"};function ci(e){return e.replace(/start|end/g,(function(e){return li[e]}))}function ui(e){var t=Fo(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function di(e){return Vo(Go(e)).left+ui(e).scrollLeft}function pi(e){var t=zo(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function hi(e){return["html","body","#document"].indexOf(Mo(e))>=0?e.ownerDocument.body:Io(e)&&pi(e)?e:hi(Xo(e))}function fi(e,t){var r;void 0===t&&(t=[]);var n=hi(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=Fo(n),s=o?[i].concat(i.visualViewport||[],pi(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(fi(Xo(s)))}function mi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function gi(e,t,r){return"viewport"===t?mi(function(e,t){var r=Fo(e),n=Go(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=Lo();(c||!c&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+di(e),y:l}}(e,r)):Oo(t)?function(e,t){var r=Vo(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):mi(function(e){var t,r=Go(e),n=ui(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Bo(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Bo(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+di(e),l=-n.scrollTop;return"rtl"===zo(o||r).direction&&(a+=Bo(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(Go(e)))}function yi(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?_o(o):null,s=o?ri(o):null,a=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case Eo:t={x:a,y:r.y-n.height};break;case Ao:t={x:a,y:r.y+r.height};break;case ko:t={x:r.x+r.width,y:l};break;case Co:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?Qo(i):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case"start":t[c]=t[c]-(r[u]/2-n[u]/2);break;case"end":t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}function bi(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,s=void 0===i?e.strategy:i,a=r.boundary,l=void 0===a?"clippingParents":a,c=r.rootBoundary,u=void 0===c?"viewport":c,d=r.elementContext,p=void 0===d?"popper":d,h=r.altBoundary,f=void 0!==h&&h,m=r.padding,g=void 0===m?0:m,y=$o("number"!=typeof g?g:ei(g,Ro)),b="popper"===p?"reference":"popper",x=e.rects.popper,v=e.elements[f?b:p],w=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=fi(Xo(e)),r=["absolute","fixed"].indexOf(zo(e).position)>=0&&Io(e)?qo(e):e;return Oo(r)?t.filter((function(e){return Oo(e)&&Ho(e,r)&&"body"!==Mo(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce((function(t,r){var o=gi(e,r,n);return t.top=Bo(o.top,t.top),t.right=Po(o.right,t.right),t.bottom=Po(o.bottom,t.bottom),t.left=Bo(o.left,t.left),t}),gi(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Oo(v)?v:v.contextElement||Go(e.elements.popper),l,u,s),E=Vo(e.elements.reference),A=yi({reference:E,element:x,strategy:"absolute",placement:o}),k=mi(Object.assign({},x,A)),C="popper"===p?k:E,R={top:w.top-C.top+y.top,bottom:C.bottom-w.bottom+y.bottom,left:w.left-C.left+y.left,right:C.right-w.right+y.right},T=e.modifiersData.offset;if("popper"===p&&T){var S=T[o];Object.keys(R).forEach((function(e){var t=[ko,Ao].indexOf(e)>=0?1:-1,r=[Eo,Ao].indexOf(e)>=0?"y":"x";R[e]+=S[r]*t}))}return R}var xi={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0===s||s,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,p=r.altBoundary,h=r.flipVariations,f=void 0===h||h,m=r.allowedAutoPlacements,g=t.options.placement,y=_o(g),b=l||(y!==g&&f?function(e){if("auto"===_o(e))return[];var t=ai(e);return[ci(e),t,ci(t)]}(g):[ai(g)]),x=[g].concat(b).reduce((function(e,r){return e.concat("auto"===_o(r)?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?So:l,u=ri(n),d=u?a?To:To.filter((function(e){return ri(e)===u})):Ro,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var h=p.reduce((function(t,r){return t[r]=bi(e,{placement:r,boundary:o,rootBoundary:i,padding:s})[_o(r)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):r)}),[]),v=t.rects.reference,w=t.rects.popper,E=new Map,A=!0,k=x[0],C=0;C<x.length;C++){var R=x[C],T=_o(R),S="start"===ri(R),N=[Eo,Ao].indexOf(T)>=0,M=N?"width":"height",F=bi(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),O=N?S?ko:Co:S?Ao:Eo;v[M]>w[M]&&(O=ai(O));var I=ai(O),j=[];if(i&&j.push(F[T]<=0),a&&j.push(F[O]<=0,F[I]<=0),j.every((function(e){return e}))){k=R,A=!1;break}E.set(R,j)}if(A)for(var D=function(e){var t=x.find((function(t){var r=E.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},_=f?3:1;_>0&&"break"!==D(_);_--);t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function vi(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function wi(e){return[Eo,ko,Ao,Co].some((function(t){return e[t]>=0}))}var Ei={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,s=So.reduce((function(e,r){return e[r]=function(e,t,r){var n=_o(e),o=[Co,Eo].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Co,ko].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(r,t.rects,i),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}},Ai={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0!==s&&s,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,p=r.tether,h=void 0===p||p,f=r.tetherOffset,m=void 0===f?0:f,g=bi(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=_o(t.placement),b=ri(t.placement),x=!b,v=Qo(y),w="x"===v?"y":"x",E=t.modifiersData.popperOffsets,A=t.rects.reference,k=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,R="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(E){if(i){var N,M="y"===v?Eo:Co,F="y"===v?Ao:ko,O="y"===v?"height":"width",I=E[v],j=I+g[M],D=I-g[F],_=h?-k[O]/2:0,B="start"===b?A[O]:k[O],P="start"===b?-k[O]:-A[O],W=t.elements.arrow,U=h&&W?Zo(W):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=L[M],Z=L[F],H=Ko(0,A[O],U[O]),z=x?A[O]/2-_-H-V-R.mainAxis:B-H-V-R.mainAxis,Y=x?-A[O]/2+_+H+Z+R.mainAxis:P+H+Z+R.mainAxis,G=t.elements.arrow&&qo(t.elements.arrow),X=G?"y"===v?G.clientTop||0:G.clientLeft||0:0,J=null!=(N=null==T?void 0:T[v])?N:0,q=I+Y-J,Q=Ko(h?Po(j,I+z-J-X):j,I,h?Bo(D,q):D);E[v]=Q,S[v]=Q-I}if(a){var K,$="x"===v?Eo:Co,ee="x"===v?Ao:ko,te=E[w],re="y"===w?"height":"width",ne=te+g[$],oe=te-g[ee],ie=-1!==[Eo,Co].indexOf(y),se=null!=(K=null==T?void 0:T[w])?K:0,ae=ie?ne:te-A[re]-k[re]-se+R.altAxis,le=ie?te+A[re]+k[re]-se-R.altAxis:oe,ce=h&&ie?function(e,t,r){var n=Ko(e,t,r);return n>r?r:n}(ae,te,le):Ko(h?ae:ne,te,h?le:oe);E[w]=ce,S[w]=ce-te}t.modifiersData[n]=S}},requiresIfExists:["offset"]};function ki(e,t,r){void 0===r&&(r=!1);var n,o,i=Io(t),s=Io(t)&&function(e){var t=e.getBoundingClientRect(),r=Wo(t.width)/e.offsetWidth||1,n=Wo(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),a=Go(t),l=Vo(e,s,r),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&(("body"!==Mo(t)||pi(a))&&(c=(n=t)!==Fo(n)&&Io(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:ui(n)),Io(t)?((u=Vo(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=di(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ci(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var Ri={placement:"bottom",modifiers:[],strategy:"absolute"};function Ti(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}var Si=function(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,i=void 0===o?Ri:o;return function(e,t,r){void 0===r&&(r=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ri,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(r){var o="function"==typeof r?r(a.options):r;d(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:Oo(e)?fi(e):e.contextElement?fi(e.contextElement):[],popper:fi(t)};var s,c,p=function(e){var t=Ci(e);return No.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((s=[].concat(n,a.options.modifiers),c=s.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return a.orderedModifiers=p.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var i=o({state:a,name:t,instance:u,options:n});l.push(i||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,r=e.popper;if(Ti(t,r)){a.rects={reference:ki(t,qo(r),"fixed"===a.options.strategy),popper:Zo(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var o=a.orderedModifiers[n],i=o.fn,s=o.options,l=void 0===s?{}:s,d=o.name;"function"==typeof i&&(a=i({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(o())}))}))),s}),destroy:function(){d(),c=!0}};if(!Ti(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(r).then((function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,s=n.resize,a=void 0===s||s,l=Fo(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",r.update,ii)})),a&&l.addEventListener("resize",r.update,ii),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",r.update,ii)})),a&&l.removeEventListener("resize",r.update,ii)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=yi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,s=void 0===i||i,a=r.roundOffsets,l=void 0===a||a,c={placement:_o(t.placement),variation:ri(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,oi(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,oi(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Do,Ei,xi,Ai,ti,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=bi(t,{elementContext:"reference"}),a=bi(t,{altBoundary:!0}),l=vi(s,n),c=vi(a,o,i),u=wi(l),d=wi(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const Ni=c.forwardRef((function(e,t){const{children:r,container:n,disablePortal:o=!1}=e,[i,s]=c.useState(null),a=Tn(c.isValidElement(r)?r.ref:null,t);if(Cn((()=>{o||s(function(e){return"function"==typeof e?e():e}(n)||document.body)}),[n,o]),Cn((()=>{if(i&&!o)return kn(t,i),()=>{kn(t,null)}}),[t,i,o]),o){if(c.isValidElement(r)){const e={ref:a};return c.cloneElement(r,e)}return We.exports.jsx(c.Fragment,{children:r})}return We.exports.jsx(c.Fragment,{children:i?Y.createPortal(r,i):i})}));"production"!==process.env.NODE_ENV&&(Ni.propTypes={children:ge.exports.node,container:ge.exports.oneOfType([xn,ge.exports.func]),disablePortal:ge.exports.bool}),"production"!==process.env.NODE_ENV&&(Ni.propTypes=bn(Ni.propTypes));var Mi=Ni;function Fi(e){return Un("MuiPopper",e)}Ln("MuiPopper",["root"]);const Oi=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Ii=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function ji(e){return"function"==typeof e?e():e}function Di(e){return void 0!==e.nodeType}const _i={},Bi=c.forwardRef((function(e,t){var r;const{anchorEl:n,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:d,popperRef:p,slotProps:h={},slots:f={},TransitionProps:m}=e,g=hn(e,Oi),y=c.useRef(null),b=Tn(y,t),x=c.useRef(null),v=Tn(x,p),w=c.useRef(v);Cn((()=>{w.current=v}),[v]),c.useImperativeHandle(p,(()=>x.current),[]);const E=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(u,i),[A,k]=c.useState(E),[C,R]=c.useState(ji(n));c.useEffect((()=>{x.current&&x.current.forceUpdate()})),c.useEffect((()=>{n&&R(ji(n))}),[n]),Cn((()=>{if(!C||!l)return;if("production"!==process.env.NODE_ENV&&C&&Di(C)&&1===C.nodeType){const e=C.getBoundingClientRect();"test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}let e=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=a&&(e=e.concat(a)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=Si(C,y.current,pn({placement:E},d,{modifiers:e}));return w.current(t),()=>{t.destroy(),w.current(null)}}),[C,s,a,l,d,E]);const T={placement:A};null!==m&&(T.TransitionProps=m);const S=_n({root:["root"]},Gn(Fi)),N=null!=(r=f.root)?r:"div",M=qn({elementType:N,externalSlotProps:h.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:S.root});return We.exports.jsx(N,pn({},M,{children:"function"==typeof o?o(T):o}))})),Pi=c.forwardRef((function(e,t){const{anchorEl:r,children:n,container:o,direction:i="ltr",disablePortal:s=!1,keepMounted:a=!1,modifiers:l,open:u,placement:d="bottom",popperOptions:p=_i,popperRef:h,style:f,transition:m=!1,slotProps:g={},slots:y={}}=e,b=hn(e,Ii),[x,v]=c.useState(!0);if(!a&&!u&&(!m||x))return null;let w;if(o)w=o;else if(r){const e=ji(r);w=e&&Di(e)?En(e).body:En(null).body}const E=m?{in:u,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return We.exports.jsx(Mi,{disablePortal:s,container:w,children:We.exports.jsx(Bi,pn({anchorEl:r,direction:i,disablePortal:s,modifiers:l,ref:t,open:m?!x:u,placement:d,popperOptions:p,popperRef:h,slotProps:g,slots:y},b,{style:pn({position:"fixed",top:0,left:0,display:u||!a||m&&!x?void 0:"none"},f),TransitionProps:E,children:n}))})}));"production"!==process.env.NODE_ENV&&(Pi.propTypes={anchorEl:fn(ge.exports.oneOfType([xn,ge.exports.object,ge.exports.func]),(e=>{if(e.open){const t=ji(e.anchorEl);if(t&&Di(t)&&1===t.nodeType){const e=t.getBoundingClientRect();if("test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}else if(!t||"function"!=typeof t.getBoundingClientRect||!Di(t)&&null!=t.contextElement&&1!==t.contextElement.nodeType)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join("\n"))}return null})),children:ge.exports.oneOfType([ge.exports.node,ge.exports.func]),container:ge.exports.oneOfType([xn,ge.exports.func]),direction:ge.exports.oneOf(["ltr","rtl"]),disablePortal:ge.exports.bool,keepMounted:ge.exports.bool,modifiers:ge.exports.arrayOf(ge.exports.shape({data:ge.exports.object,effect:ge.exports.func,enabled:ge.exports.bool,fn:ge.exports.func,name:ge.exports.any,options:ge.exports.object,phase:ge.exports.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:ge.exports.arrayOf(ge.exports.string),requiresIfExists:ge.exports.arrayOf(ge.exports.string)})),open:ge.exports.bool.isRequired,placement:ge.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:ge.exports.shape({modifiers:ge.exports.array,onFirstUpdate:ge.exports.func,placement:ge.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:ge.exports.oneOf(["absolute","fixed"])}),popperRef:vn,slotProps:ge.exports.shape({root:ge.exports.oneOfType([ge.exports.func,ge.exports.object])}),slots:ge.exports.shape({root:ge.exports.elementType}),transition:ge.exports.bool});var Wi=Pi,Ui="undefined"!=typeof window?c.useLayoutEffect:c.useEffect;function Li(e,t,r,n,o){var i="undefined"!=typeof window&&void 0!==window.matchMedia,s=tn(c.useState((function(){return o&&i?r(e).matches:n?n(e).matches:t})),2),a=s[0],l=s[1];return Ui((function(){var t=!0;if(i){var n=r(e),o=function(){t&&l(n.matches)};return o(),n.addListener(o),function(){t=!1,n.removeListener(o)}}}),[e,r,i]),a}var Vi=c.useSyncExternalStore;function Zi(e,t,r,n){var o=c.useCallback((function(){return t}),[t]),i=c.useMemo((function(){if(null!==n){var t=n(e).matches;return function(){return t}}return o}),[o,e,n]),s=tn(c.useMemo((function(){if(null===r)return[o,function(){return function(){}}];var t=r(e);return[function(){return t.matches},function(e){return t.addListener(e),function(){t.removeListener(e)}}]}),[o,r,e]),2),a=s[0],l=s[1];return Vi(l,a,i)}function Hi(){return{isMobile:function(e,t){void 0===t&&(t={});var r=Fr(),n="undefined"!=typeof window&&void 0!==window.matchMedia,o=Xr({name:"MuiUseMediaQuery",props:t,theme:r||void 0}),i=o.defaultMatches,s=void 0!==i&&i,a=o.matchMedia,l=void 0===a?n?window.matchMedia:null:a,u=o.ssrMatchMedia,d=void 0===u?null:u,p=o.noSsr;"production"!==process.env.NODE_ENV&&null===r&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join("\n"));var h=e(r);h=h.replace(/^@media( ?)/m,"");var f=(void 0!==Vi?Zi:Li)(h,s,l,d,p);return"production"!==process.env.NODE_ENV&&c.useDebugValue({query:h,match:f}),f}((function(e){return e.breakpoints.down("tablet")}))}}var zi="DODOTooltip-arrow",Yi=Gr("div")((function(e){var t,r=e.theme;return"\n z-index: ".concat(null===(t=r.zIndex)||void 0===t?void 0:t.tooltip,';\n &[data-popper-placement*="bottom"] .').concat(zi," {\n top: 0;\n margin-top: -").concat(8,'px;\n &::before {\n transform-origin: 0 100%;\n }\n }\n &[data-popper-placement*="top"] .').concat(zi," {\n bottom: 0;\n margin-bottom: -").concat(8,'px;\n &::before {\n transform-origin: 100% 0;\n }\n }\n &[data-popper-placement*="right"] .').concat(zi,' {\n &::before {\n transform-origin: 100% 100%;\n }\n }\n &[data-popper-placement*="left"] .').concat(zi," {\n &::before {\n transform-origin: 0 0;\n }\n }\n ")}));function Gi(e){var t=e.title,r=e.sx,n=e.maxWidth,i=void 0===n?"auto":n,s=e.popperOptions,a=e.children,l=e.onlyHover,c=e.enterDelay,u=void 0===c?100:c,d=e.leaveDelay,p=void 0===d?0:d,m=en(e,["title","sx","maxWidth","popperOptions","children","onlyHover","enterDelay","leaveDelay"]);Ir();var g=Hi().isMobile,b=f(!1),x=f(!1),w=f(),E=f(),A=tn(h(),2),k=A[0],C=A[1],R=tn(h(),2),T=R[0],S=R[1],N=tn(h(!1),2),M=N[0],F=N[1],O=g&&!l,I={ref:C};if(O)I.onClick=function(){F(!0)};else{var j=function(){x.current=!0,clearTimeout(E.current),clearTimeout(w.current),w.current=setTimeout((function(){F(!0)}),u)};I.onMouseOut=j,I.onMouseEnter=j,I.onMouseLeave=function(){x.current=!1,clearTimeout(E.current),clearTimeout(w.current),E.current=setTimeout((function(){x.current||b.current||F(!1)}),p)}}return y((function(){return function(){F(!1),clearTimeout(E.current),clearTimeout(w.current)}}),[]),We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsxs(Wi,$r({open:M,anchorEl:k,slots:{root:Yi},popperOptions:o({modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{padding:20}},{name:"arrow",options:{element:T,padding:4}}]},s)},m,{children:[We.exports.jsx(_r,$r({sx:$r({typography:"h6",padding:12,maxWidth:i,fontWeight:500,backgroundColor:"background.paperContrast",borderRadius:8,color:"text.secondary",borderColor:"border.main",borderWidth:1,borderStyle:"solid",whiteSpace:"pre-wrap"},r),onMouseEnter:function(){O||(b.current=!0,clearTimeout(E.current),clearTimeout(w.current))},onMouseLeave:function(){O||(b.current=!1,clearTimeout(E.current),clearTimeout(w.current),E.current=setTimeout((function(){x.current||b.current||F(!1)}),p))},onClick:function(e){return e.stopPropagation()}},{children:t})),We.exports.jsx(_r,{ref:S,className:zi,sx:{overflow:"hidden",position:"absolute",width:16,height:9,boxSizing:"border-box",color:"background.paperContrast",bottom:0,marginBottom:-8,"&::before":{transformOrigin:"100% 0",content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)",border:"solid 1px",borderColor:"border.main"}}})]})),We.exports.jsx(wo,$r({onClickAway:function(){O&&F(!1)}},{children:v(a,I)}))]})}function Xi(e){var t=e.title,r=e.ml,n=e.mr,o=e.size,i=void 0===o?15:o,s=e.sx,a=e.maxWidth,l=e.container;return e.onlyHover,t?We.exports.jsx(Gi,$r({title:t,placement:"top",container:l,maxWidth:a,onlyHover:!0},{children:We.exports.jsx(yo,{component:R,sx:$r({ml:r,mr:n,width:i,height:i},s)})})):null}function Ji(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function qi(e){return parseInt(An(e).getComputedStyle(e).paddingRight,10)||0}function Qi(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&Ji(e,o)}))}function Ki(e,t){let r=-1;return e.some(((e,n)=>!!t(e)&&(r=n,!0))),r}const $i=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function es(e){const t=[],r=[];return Array.from(e.querySelectorAll($i)).forEach(((e,n)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))})),r.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function ts(){return!0}function rs(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=es,isEnabled:s=ts,open:a}=e,l=c.useRef(!1),u=c.useRef(null),d=c.useRef(null),p=c.useRef(null),h=c.useRef(null),f=c.useRef(!1),m=c.useRef(null),g=Tn(t.ref,m),y=c.useRef(null);c.useEffect((()=>{a&&m.current&&(f.current=!r)}),[r,a]),c.useEffect((()=>{if(!a||!m.current)return;const e=En(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||("production"!==process.env.NODE_ENV&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join("\n")),m.current.setAttribute("tabIndex","-1")),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}}),[a]),c.useEffect((()=>{if(!a||!m.current)return;const e=En(m.current),t=t=>{const{current:r}=m;if(null!==r)if(e.hasFocus()&&!n&&s()&&!l.current){if(!r.contains(e.activeElement)){if(t&&h.current!==t.target||e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=i(m.current)),n.length>0){var o,a;const e=Boolean((null==(o=y.current)?void 0:o.shiftKey)&&"Tab"===(null==(a=y.current)?void 0:a.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else r.focus()}}else l.current=!1},r=t=>{y.current=t,!n&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(l.current=!0,d.current&&d.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",r,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&t(null)}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",t),e.removeEventListener("keydown",r,!0)}}),[r,n,o,s,a,i]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0};return We.exports.jsxs(c.Fragment,{children:[We.exports.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),c.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0,h.current=e.target;const r=t.props.onFocus;r&&r(e)}}),We.exports.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}function ns(e){return Un("MuiModal",e)}"production"!==process.env.NODE_ENV&&(rs.propTypes={children:yn,disableAutoFocus:ge.exports.bool,disableEnforceFocus:ge.exports.bool,disableRestoreFocus:ge.exports.bool,getTabbable:ge.exports.func,isEnabled:ge.exports.func,open:ge.exports.bool.isRequired}),"production"!==process.env.NODE_ENV&&(rs.propTypes=bn(rs.propTypes)),Ln("MuiModal",["root","hidden","backdrop"]);const os=["children","closeAfterTransition","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],is=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Ji(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Qi(t,e.mount,e.modalRef,n,!0);const o=Ki(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=Ki(this.containers,(t=>-1!==t.modals.indexOf(e))),n=this.containers[r];n.restore||(n.restore=function(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(function(e){const t=En(e);return t.body===e?An(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(En(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${qi(n)+e}px`;const t=En(n).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${qi(t)+e}px`}))}let e;if(n.parentNode instanceof DocumentFragment)e=En(n).body;else{const t=n.parentElement,r=An(n);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:n}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach((({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)}))}}(n,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=Ki(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&Ji(e.modalRef,t),Qi(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&Ji(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},ss=c.forwardRef((function(e,t){var r,n;const{children:o,closeAfterTransition:i=!1,container:s,disableAutoFocus:a=!1,disableEnforceFocus:l=!1,disableEscapeKeyDown:u=!1,disablePortal:d=!1,disableRestoreFocus:p=!1,disableScrollLock:h=!1,hideBackdrop:f=!1,keepMounted:m=!1,manager:g=is,onBackdropClick:y,onClose:b,onKeyDown:x,open:v,onTransitionEnter:w,onTransitionExited:E,slotProps:A={},slots:k={}}=e,C=hn(e,os),R=g,[T,S]=c.useState(!v),N=c.useRef({}),M=c.useRef(null),F=c.useRef(null),O=Tn(F,t),I=function(e){return!!e&&e.props.hasOwnProperty("in")}(o),j=null==(r=e["aria-hidden"])||r,D=()=>(N.current.modalRef=F.current,N.current.mountNode=M.current,N.current),_=()=>{R.mount(D(),{disableScrollLock:h}),F.current&&(F.current.scrollTop=0)},B=Rn((()=>{const e=function(e){return"function"==typeof e?e():e}(s)||En(M.current).body;R.add(D(),e),F.current&&_()})),P=c.useCallback((()=>R.isTopModal(D())),[R]),W=Rn((e=>{M.current=e,e&&F.current&&(v&&P()?_():Ji(F.current,j))})),U=c.useCallback((()=>{R.remove(D(),j)}),[R,j]);c.useEffect((()=>()=>{U()}),[U]),c.useEffect((()=>{v?B():I&&i||U()}),[v,U,I,i,B]);const L=pn({},e,{closeAfterTransition:i,disableAutoFocus:a,disableEnforceFocus:l,disableEscapeKeyDown:u,disablePortal:d,disableRestoreFocus:p,disableScrollLock:h,exited:T,hideBackdrop:f,keepMounted:m}),V=(e=>{const{open:t,exited:r}=e;return _n({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Gn(ns))})(L),Z={};void 0===o.props.tabIndex&&(Z.tabIndex="-1"),I&&(Z.onEnter=wn((()=>{S(!1),w&&w()}),o.props.onEnter),Z.onExited=wn((()=>{S(!0),E&&E(),i&&U()}),o.props.onExited));const H=null!=(n=k.root)?n:"div",z=qn({elementType:H,externalSlotProps:A.root,externalForwardedProps:C,additionalProps:{ref:O,role:"presentation",onKeyDown:e=>{x&&x(e),"Escape"===e.key&&P()&&(u||(e.stopPropagation(),b&&b(e,"escapeKeyDown")))}},className:V.root,ownerState:L}),Y=k.backdrop,G=qn({elementType:Y,externalSlotProps:A.backdrop,additionalProps:{"aria-hidden":!0,onClick:e=>{e.target===e.currentTarget&&(y&&y(e),b&&b(e,"backdropClick"))},open:v},className:V.backdrop,ownerState:L});return m||v||I&&!T?We.exports.jsx(Mi,{ref:W,container:s,disablePortal:d,children:We.exports.jsxs(H,pn({},z,{children:[!f&&Y?We.exports.jsx(Y,pn({},G)):null,We.exports.jsx(rs,{disableEnforceFocus:l,disableAutoFocus:a,disableRestoreFocus:p,isEnabled:P,open:v,children:c.cloneElement(o,Z)})]}))}):null}));"production"!==process.env.NODE_ENV&&(ss.propTypes={children:yn.isRequired,closeAfterTransition:ge.exports.bool,container:ge.exports.oneOfType([xn,ge.exports.func]),disableAutoFocus:ge.exports.bool,disableEnforceFocus:ge.exports.bool,disableEscapeKeyDown:ge.exports.bool,disablePortal:ge.exports.bool,disableRestoreFocus:ge.exports.bool,disableScrollLock:ge.exports.bool,hideBackdrop:ge.exports.bool,keepMounted:ge.exports.bool,onBackdropClick:ge.exports.func,onClose:ge.exports.func,onTransitionEnter:ge.exports.func,onTransitionExited:ge.exports.func,open:ge.exports.bool.isRequired,slotProps:ge.exports.shape({backdrop:ge.exports.oneOfType([ge.exports.func,ge.exports.object]),root:ge.exports.oneOfType([ge.exports.func,ge.exports.object])}),slots:ge.exports.shape({backdrop:ge.exports.elementType,root:ge.exports.elementType})});var as,ls,cs=ss,us=d((function(e,t){var r=e.open,n=e.className,o=en(e,["open","className"]);return We.exports.jsx("div",$r({className:wr({"MuiBackdrop-open":r},n),ref:t},o))})),ds=Gr(cs)(as||(as=nn(["\n position: absolute;\n z-index: 1300;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-end;\n"],["\n position: absolute;\n z-index: 1300;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-end;\n"]))),ps=Gr(us)(ls||(ls=nn(["\n z-index: -1;\n position: absolute;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n -webkit-tap-highlight-color: transparent;\n"],["\n z-index: -1;\n position: absolute;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n -webkit-tap-highlight-color: transparent;\n"])),(function(e){return e.theme.palette.background.backdrop}));function hs(e){return We.exports.jsx(ds,$r({slots:{backdrop:ps}},e))}var fs=d((function(e,t){var r=Ir(),n=e.size,o=void 0===n?18:n,i=e.sx,s=en(e,["size","sx"]);return We.exports.jsx(_r,$r({component:"span",sx:$r({position:"relative",cursor:"pointer",userSelect:"none",width:o,height:o,"&:hover > .checkbox-icon":{borderColor:r.palette.text.primary}},i)},{children:We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(_r,$r({component:"input",type:"checkbox",ref:t,sx:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,m:0,p:0,zIndex:1,"&:checked + .checkbox-icon":{border:"none",backgroundColor:"secondary.main",color:"secondary.contrastText","& svg":{display:"inline-block"}}}},s)),We.exports.jsx(_r,$r({component:"span",className:"checkbox-icon",sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:4,width:o,height:o,borderStyle:"solid",borderWidth:1,flex:1,borderColor:r.palette.text.secondary,".Mui-focusVisible &":{outline:"none",outlineOffset:2},"input:disabled ~ &":{borderColor:r.palette.text.disabled}}},{children:We.exports.jsx(_r,{component:T,sx:{display:"none",width:"75%",height:"75%"}})}))]})}))}));function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(this,arguments)}function gs(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const ys=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],bs=e=>e?6:5,xs=new Map,vs=new Map,ws=(e,t,r,n,o,i)=>{clearTimeout(o);const s=(e=>({_s:e,status:ys[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}))(t),a=new Map(n.current);a.set(e,s),r(a),n.current=a,i&&i({key:e,current:s})},Es=["transition","transitionTimeout"],As=(e,t)=>!0===e||!(!e||!e[t]),ks=w({}),Cs=(e,t,r)=>(n,o)=>{const i=t?`${e}__${t}`:e;let s=i;r&&Object.keys(r).forEach((e=>{const t=r[e];t&&(s+=` ${i}--${!0===t?e:`${e}-${t}`}`)}));let a="function"==typeof n?n(o):n;return"string"==typeof a&&(a=a.trim(),a&&(s+=` ${a}`)),s},Rs=(e,t)=>{if(!t)return e;const r=ms({},e);return Object.keys(t).forEach((n=>{const o=e[n],i=t[n];r[n]="function"==typeof i&&o?(...e)=>{o(...e),i(...e)}:i})),r},Ts=e=>We.exports.jsx(ks.Provider,ms({},e)),Ss=e=>{do{e=e.parentElement}while(e&&!e.hasAttribute("data-szh-adn"));return e},Ns=(e,t,r)=>e?t>0?t-1:r-1:(t+1)%r,Ms=(e,t)=>{const{activeElement:r}=document;if(!r||!r.hasAttribute("data-szh-adn-btn")||Ss(r)!==t.currentTarget)return;const n=t.currentTarget.querySelectorAll("[data-szh-adn-btn]"),{length:o}=n;for(let i=0;i<o;i++)if(n[i]===r){let r=Ns(e,i,o);for(;Ss(n[i])!==Ss(n[r]);)r=Ns(e,r,o);i!==r&&(t.preventDefault(),n[r].focus());break}},Fs=["providerValue","className"],Os=d(((e,t)=>{let{providerValue:r,className:n}=e,o=gs(e,Fs);const{accordionProps:i}={accordionProps:{"data-szh-adn":"",onKeyDown:e=>"ArrowUp"===e.key?Ms(!0,e):"ArrowDown"===e.key&&Ms(!1,e)}};return We.exports.jsx(Ts,{value:r,children:We.exports.jsx("div",ms({},Rs(i,o),{ref:t,className:Cs("szh-accordion")(n)}))})}));Os.displayName="ControlledAccordion";const Is=["allowMultiple","initialEntered","mountOnEnter","unmountOnExit","transition","transitionTimeout","onStateChange"],js=d(((e,t)=>{let{allowMultiple:r,initialEntered:n,mountOnEnter:o,unmountOnExit:i,transition:s,transitionTimeout:a,onStateChange:l}=e,c=gs(e,Is);const u=((e={})=>{let{transition:t,transitionTimeout:r}=e,n=gs(e,Es);const o=(({allowMultiple:e,enter:t=!0,exit:r=!0,preEnter:n,preExit:o,timeout:i,initialEntered:s,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[u,d]=h(xs),p=f(u),g=f(vs),[y,b]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(i),x=m(((e,t)=>{const{initialEntered:r=s}=t||{},n=r?2:bs(a);ws(e,n,d,p),g.current.set(e,{})}),[s,a]),v=m((e=>{const t=new Map(p.current);return!!t.delete(e)&&(d(t),p.current=t,g.current.delete(e),!0)}),[]),w=m((e=>{const t=p.current.get(e);if(!t)return void("production"!==process.env.NODE_ENV&&console.error(`[React-Transition-State] invalid key: ${e}`));const{timeoutId:r}=g.current.get(e),n=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return bs(t)}})(t._s,l);n&&ws(e,n,d,p,r,c)}),[c,l]),E=m(((i,s)=>{const a=p.current.get(i);if(!a)return void("production"!==process.env.NODE_ENV&&console.error(`[React-Transition-State] invalid key: ${i}`));const u=g.current.get(i),h=e=>{switch(ws(i,e,d,p,u.timeoutId,c),e){case 1:y>=0&&(u.timeoutId=setTimeout((()=>w(i)),y));break;case 4:b>=0&&(u.timeoutId=setTimeout((()=>w(i)),b));break;case 0:case 3:u.timeoutId=setTimeout((()=>h(e+1)),0)}},f=a.isEnter;"boolean"!=typeof s&&(s=!f),s?f||(h(t?n?0:1:2),!e&&p.current.forEach(((e,t)=>t!==i&&E(t,!1)))):f&&h(r?o?3:4:bs(l))}),[c,w,e,t,r,n,o,y,b,l]),A=m((t=>{if(e||!1===t)for(const e of p.current.keys())E(e,t)}),[e,E]);return{stateMap:u,toggle:E,toggleAll:A,endTransition:w,setItem:x,deleteItem:v}})(ms({timeout:r,enter:As(t,"enter"),exit:As(t,"exit"),preEnter:As(t,"preEnter"),preExit:As(t,"preExit")},n));return ms({mountOnEnter:!!n.mountOnEnter,initialEntered:!!n.initialEntered},o)})({allowMultiple:r,initialEntered:n,mountOnEnter:o,unmountOnExit:i,transition:s,transitionTimeout:a,onStateChange:l});return We.exports.jsx(Os,ms({},c,{ref:t,providerValue:u}))}));js.displayName="Accordion";let Ds=0;const _s=g||(()=>{const[e,t]=h();return y((()=>t(++Ds)),[]),e&&`szh-adn-${e}`}),Bs="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?b:y;function Ps(e,t){"function"==typeof e?e(t):e.current=t}function Ws(e,t){return x((()=>e?t?r=>{Ps(e,r),Ps(t,r)}:e:t),[e,t])}const Us=["itemKey","initialEntered"],Ls=["forwardedRef","itemRef","state","toggle","className","disabled","header","headingTag","headingProps","buttonProps","contentProps","panelProps","children"],Vs=(e,t)=>"function"==typeof e?e(t):e,Zs=p((e=>{let{forwardedRef:t,itemRef:r,state:n,toggle:o,className:i,disabled:s,header:a,headingTag:l="h3",headingProps:c,buttonProps:u,contentProps:d,panelProps:p,children:m}=e,g=gs(e,Ls);const y={state:n,toggle:o,disabled:s},{buttonProps:b,panelProps:x}=(({state:e,toggle:t,disabled:r})=>{const n=_s(),o=n&&n+"-",i={id:n,"aria-controls":o,"aria-expanded":e.isEnter,onClick:t};return r?i.disabled=!0:i["data-szh-adn-btn"]="",{buttonProps:i,panelProps:{id:o,"aria-labelledby":n,role:"region"}}})(y),[v,w]=(({status:e,isResolved:t})=>{const[r,n]=h(),o=f(null);return Bs((()=>{("preEnter"===e||"preExit"===e)&&n(o.current.getBoundingClientRect().height)}),[e]),[{height:"preEnter"===e||"exiting"===e?0:"entering"===e||"preExit"===e?r:void 0,overflow:t?void 0:"hidden"},o]})(n),E=Ws(p&&p.ref,w),{status:A,isMounted:k,isEnter:C}=n;return We.exports.jsxs("div",ms({},g,{ref:Ws(t,r),className:Cs("szh-accordion","item",{status:A,expanded:C})(i,n),children:[We.exports.jsx(l,ms({},c,{style:ms({margin:0},c&&c.style),className:Cs("szh-accordion","item-heading")(c&&c.className,n),children:We.exports.jsx("button",ms({},Rs(b,u),{type:"button",className:Cs("szh-accordion","item-btn")(u&&u.className,n),children:Vs(a,y)}))})),k&&We.exports.jsx("div",ms({},d,{style:ms({display:"exited"===A?"none":void 0},v,d&&d.style),className:Cs("szh-accordion","item-content")(d&&d.className,n),children:We.exports.jsx("div",ms({},Rs(x,p),{ref:E,className:Cs("szh-accordion","item-panel")(p&&p.className,n),children:Vs(m,y)}))}))]}))}));Zs.displayName="AccordionItem";const Hs=(e=>{const t=d(((t,r)=>{let{itemKey:n,initialEntered:o}=t,i=gs(t,Us);return We.exports.jsx(e,ms({forwardedRef:r},i,(({itemKey:e,initialEntered:t,disabled:r}={})=>{const n=f(null),o=(()=>{const e=E(ks);if("production"!==process.env.NODE_ENV&&!e.stateMap)throw new Error("[React-Accordion] Cannot find a <AccordionProvider/> above this AccordionItem.");return e})(),i=null!=e?e:n.current,s=((e,t,r)=>{const{stateMap:n,mountOnEnter:o,initialEntered:i}=e,s=null!=r?r:i;return n.get(t)||{status:s?"entered":o?"unmounted":"exited",isMounted:!o,isEnter:s,isResolved:!0}})(o,i,t),{setItem:a,deleteItem:l,toggle:c}=o;return y((()=>{if(r)return;const o=null!=e?e:n.current;return a(o,{initialEntered:t}),()=>{l(o)}}),[a,l,e,t,r]),{itemRef:n,state:s,toggle:m((e=>c(i,e)),[c,i])}})({itemKey:n,initialEntered:o,disabled:i.disabled})))}));return t.displayName="WithAccordionItem",t})(Zs);function zs(e){var t=e.sx,r=e.buttonProps,n=en(e,["sx","buttonProps"]);return We.exports.jsx(_r,$r({component:Hs,sx:o({"& button":{p:0,border:"none",width:"100%",backgroundColor:"transparent",cursor:"pointer"}},t),buttonProps:$r({className:function(e){var t=e.isEnter;return"".concat(t?"active":"")}},r)},n))}function Ys({input:e,showDecimals:t=4,showPrecisionDecimals:r=2,showIntegerOnly:o=!1,showDecimalsOnly:i=!1,noGroupSeparator:s=!1}){const a=new n(e);if(a.isNaN())return"-";let l=a.dp(t,n.ROUND_DOWN);return l.eq(0)&&(a.gt(0)||a.lt(0))&&(l=a.sd(null!=r?r:t,n.ROUND_DOWN)),o&&(l=l.integerValue(n.ROUND_DOWN)),i&&(l=l.minus(l.integerValue(n.ROUND_DOWN))),s?l.toFormat({decimalSeparator:".",groupSeparator:"",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0}):l.toFormat()}function Gs({input:e,decimals:t,showPrecisionDecimals:r=2,noGroupSeparator:o}){if(null==e)return"-";const i=new n(e);if(i.isNaN())return"-";return Ys({input:i,showDecimals:void 0===t?0:t>6?6:t>4?4:t,showPrecisionDecimals:r,noGroupSeparator:o})}function Xs(e){if("number"==typeof e)return Xs(new n(e));if(e.isNaN())return"NaN";if(e.isNegative())return`-${Xs(e.negated())}`;if(e.isZero())return"0";let t=e.integerValue(n.ROUND_FLOOR),r=e.minus(t),o="";for(;!t.isZero();){o=t.modulo(10).toString().toString()+o,t=t.idiv(10)}if(""===o&&(o="0"),r.isZero())return o;o+=".";let i=0;for(;!r.isZero()&&i<100;){const e=r.times(10),t=e.integerValue(n.ROUND_FLOOR);o+=t.toString(),r=e.minus(t),i+=1}return o}const Js=(e,t)=>{if("string"==typeof e&&!e.match(/[-+]?\d+(.+d+)?/))return e;const r=new n(e);if(t){let e=r.toFixed(t,n.ROUND_DOWN);return new n(e).isZero()&&(e=Xs(r.precision(t,n.ROUND_DOWN))),e}return Xs(r)},qs=(e,t)=>{let r=e;const n=r.match("[0-9。.]+");r=n&&n.length>0?n[0]:"",r=r.replace("。",".");let o=0;if(r){const e=r.split("."),t=0===e[0].length?["0"]:[e[0]];e.length>1?t[1]=e.slice(1,e.length).join(""):t[0].length>1&&"0"===t[0][0]&&(t[0]=t[0].slice(1,t[0].length)),t.length>1&&(o=t[1].length),r=t.join(".")}return t>=0&&o>t?Js(r,t):r},Qs=(e,t,r)=>{const o=new n(e).times(new n(10).pow(t));return r?o:o.dp(0)};function Ks(e){return Number(e.toString().split(".")[0])}let $s=!1,ea=!1;const ta={debug:1,default:2,info:2,warning:3,error:4,off:5};let ra=ta.default,na=null;const oa=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var ia,sa;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(ia||(ia={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(sa||(sa={}));const aa="0123456789abcdef";class la{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==ta[r]&&this.throwArgumentError("invalid log level name","logLevel",e),ra>ta[r]||console.log.apply(console,t)}debug(...e){this._log(la.levels.DEBUG,e)}info(...e){this._log(la.levels.INFO,e)}warn(...e){this._log(la.levels.WARNING,e)}makeError(e,t,r){if(ea)return this.makeError("censored error",t,{});t||(t=la.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=aa[t[e]>>4],r+=aa[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case sa.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case sa.CALL_EXCEPTION:case sa.INSUFFICIENT_FUNDS:case sa.MISSING_NEW:case sa.NONCE_EXPIRED:case sa.REPLACEMENT_UNDERPRICED:case sa.TRANSACTION_REPLACED:case sa.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,la.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){oa&&this.throwError("platform missing String.prototype.normalize",la.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:oa})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,la.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,la.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,la.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,la.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",la.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",la.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",la.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return na||(na=new la("logger/5.7.0")),na}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",la.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),$s){if(!e)return;this.globalLogger().throwError("error censorship permanent",la.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ea=!!e,$s=!!t}static setLogLevel(e){const t=ta[e.toLowerCase()];null!=t?ra=t:la.globalLogger().warn("invalid log level - "+e)}static from(e){return new la(e)}}la.errors=sa,la.levels=ia;const ca=new la("bytes/5.7.0");function ua(e){return!!e.toHexString}function da(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return da(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function pa(e){return ba(e)&&!(e.length%2)||fa(e)}function ha(e){return"number"==typeof e&&e==e&&e%1==0}function fa(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!ha(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!ha(r)||r<0||r>=256)return!1}return!0}function ma(e,t){if(t||(t={}),"number"==typeof e){ca.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),da(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),ua(e)&&(e=e.toHexString()),ba(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":ca.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substring(e,e+2),16));return da(new Uint8Array(n))}return fa(e)?da(new Uint8Array(e)):ca.throwArgumentError("invalid arrayify value","value",e)}function ga(e){const t=e.map((e=>ma(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),da(n)}function ya(e){let t=ma(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function ba(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function xa(e,t){if(t||(t={}),"number"==typeof e){ca.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),ua(e))return e.toHexString();if(ba(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":ca.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(fa(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+="0123456789abcdef"[(240&n)>>4]+"0123456789abcdef"[15&n]}return t}return ca.throwArgumentError("invalid hexlify value","value",e)}function va(e){if("string"!=typeof e)e=xa(e);else if(!ba(e)||e.length%2)return null;return(e.length-2)/2}function wa(e,t,r){return"string"!=typeof e?e=xa(e):(!ba(e)||e.length%2)&&ca.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function Ea(e){let t="0x";return e.forEach((e=>{t+=xa(e).substring(2)})),t}function Aa(e){const t=function(e){"string"!=typeof e&&(e=xa(e));ba(e)||ca.throwArgumentError("invalid hex string","value",e);e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}(xa(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function ka(e,t){for("string"!=typeof e?e=xa(e):ba(e)||ca.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&ca.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function Ca(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(pa(e)){let r=ma(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=xa(r.slice(0,32)),t.s=xa(r.slice(32,64))):65===r.length?(t.r=xa(r.slice(0,32)),t.s=xa(r.slice(32,64)),t.v=r[64]):ca.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:ca.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=xa(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=function(e,t){(e=ma(e)).length>t&&ca.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),da(r)}(ma(t._vs),32);t._vs=xa(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&ca.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=xa(r);null==t.s?t.s=o:t.s!==o&&ca.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?ca.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&ca.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&ba(t.r)?t.r=ka(t.r,32):ca.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&ba(t.s)?t.s=ka(t.s,32):ca.throwArgumentError("signature missing or invalid s","signature",e);const r=ma(t.s);r[0]>=128&&ca.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=xa(r);t._vs&&(ba(t._vs)||ca.throwArgumentError("signature invalid _vs","signature",e),t._vs=ka(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&ca.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}var Ra={exports:{}};
37
38
  /**
38
39
  * [js-sha3]{@link https://github.com/emn178/js-sha3}
39
40
  *
@@ -41,4 +42,4 @@ object-assign
41
42
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
42
43
  * @copyright Chen, Yi-Cyuan 2015-2018
43
44
  * @license MIT
44
- */!function(e){!function(){var t="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=ce:o&&(n=self);var i=!n.JS_SHA3_NO_COMMON_JS&&e.exports,s=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),c=[4,1024,262144,67108864],l=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],d=[224,256,384,512],h=[128,256],f=["hex","buffer","arrayBuffer","array","digest"],p={128:168,256:136};!n.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!s||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var m=function(e,t,r){return function(n){return new T(e,t,e).update(n)[r]()}},g=function(e,t,r){return function(n,o){return new T(e,t,o).update(n)[r]()}},y=function(e,t,r){return function(t,n,o,i){return E["cshake"+e].update(t,n,o,i)[r]()}},b=function(e,t,r){return function(t,n,o,i){return E["kmac"+e].update(t,n,o,i)[r]()}},v=function(e,t,r,n){for(var o=0;o<f.length;++o){var i=f[o];e[i]=t(r,n,i)}return e},w=function(e,t){var r=m(e,t,"hex");return r.create=function(){return new T(e,t,e)},r.update=function(e){return r.create().update(e)},v(r,m,e,t)},x=[{name:"keccak",padding:[1,256,65536,16777216],bits:d,createMethod:w},{name:"sha3",padding:[6,1536,393216,100663296],bits:d,createMethod:w},{name:"shake",padding:[31,7936,2031616,520093696],bits:h,createMethod:function(e,t){var r=g(e,t,"hex");return r.create=function(r){return new T(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},v(r,g,e,t)}},{name:"cshake",padding:c,bits:h,createMethod:function(e,t){var r=p[e],n=y(e,0,"hex");return n.create=function(n,o,i){return o||i?new T(e,t,n).bytepad([o,i],r):E["shake"+e].create(n)},n.update=function(e,t,r,o){return n.create(t,r,o).update(e)},v(n,y,e,t)}},{name:"kmac",padding:c,bits:h,createMethod:function(e,t){var r=p[e],n=b(e,0,"hex");return n.create=function(n,o,i){return new O(e,t,o).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(e,t,r,o){return n.create(e,r,o).update(t)},v(n,b,e,t)}}],E={},A=[],R=0;R<x.length;++R)for(var _=x[R],k=_.bits,S=0;S<k.length;++S){var N=_.name+"_"+k[S];if(A.push(N),E[N]=_.createMethod(k[S],_.padding),"sha3"!==_.name){var M=_.name+k[S];A.push(M),E[M]=E[N]}}function T(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function O(e,t,r){T.call(this,e,t,r)}T.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var o,i,a=this.blocks,c=this.byteCount,u=e.length,d=this.blockCount,h=0,f=this.s;h<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,o=1;o<d+1;++o)a[o]=0;if(r)for(o=this.start;h<u&&o<c;++h)a[o>>2]|=e[h]<<l[3&o++];else for(o=this.start;h<u&&o<c;++h)(i=e.charCodeAt(h))<128?a[o>>2]|=i<<l[3&o++]:i<2048?(a[o>>2]|=(192|i>>6)<<l[3&o++],a[o>>2]|=(128|63&i)<<l[3&o++]):i<55296||i>=57344?(a[o>>2]|=(224|i>>12)<<l[3&o++],a[o>>2]|=(128|i>>6&63)<<l[3&o++],a[o>>2]|=(128|63&i)<<l[3&o++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++h)),a[o>>2]|=(240|i>>18)<<l[3&o++],a[o>>2]|=(128|i>>12&63)<<l[3&o++],a[o>>2]|=(128|i>>6&63)<<l[3&o++],a[o>>2]|=(128|63&i)<<l[3&o++]);if(this.lastByteIndex=o,o>=c){for(this.start=o-c,this.block=a[d],o=0;o<d;++o)f[o]^=a[o];I(f),this.reset=!0}else this.start=o}return this},T.prototype.encode=function(e,t){var r=255&e,n=1,o=[r];for(r=255&(e>>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},T.prototype.encodeString=function(e){var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}var o=0,i=e.length;if(r)o=i;else for(var a=0;a<e.length;++a){var c=e.charCodeAt(a);c<128?o+=1:c<2048?o+=2:c<55296||c>=57344?o+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++a)),o+=4)}return o+=this.encode(8*o),this.update(e),o},T.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var o=t-r%t,i=[];return i.length=o,this.update(i),this},T.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];I(n)}},T.prototype.toString=T.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,c="";s<n;){for(i=0;i<t&&s<n;++i,++s)e=r[i],c+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(I(r),i=0)}return o&&(e=r[i],c+=a[e>>4&15]+a[15&e],o>1&&(c+=a[e>>12&15]+a[e>>8&15]),o>2&&(c+=a[e>>20&15]+a[e>>16&15])),c},T.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)c[s]=r[i];s%t==0&&I(r)}return o&&(c[i]=r[i],e=e.slice(0,a)),e},T.prototype.buffer=T.prototype.arrayBuffer,T.prototype.digest=T.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,c=[];a<o;){for(s=0;s<r&&a<o;++s,++a)e=a<<2,t=n[s],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r==0&&I(n)}return i&&(e=a<<2,t=n[s],c[e]=255&t,i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c},O.prototype=new T,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),T.prototype.finalize.call(this)};var I=function(e){var t,r,n,o,i,s,a,c,l,d,h,f,p,m,g,y,b,v,w,x,E,A,R,_,k,S,N,M,T,O,I,F,W,C,j,U,D,B,V,P,Z,z,L,H,Y,X,J,G,q,K,Q,$,ee,te,re,ne,oe,ie,se,ae,ce,le,ue;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|l>>>31),r=i^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|h>>>31),r=a^(h<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(f<<1|p>>>31),r=l^(p<<1|f>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(o<<1|i>>>31),r=h^(i<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],g=e[1],X=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,M=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,L=e[41]<<18|e[40]>>>14,C=e[2]<<1|e[3]>>>31,j=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,G=e[22]<<10|e[23]>>>22,q=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,K=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,F=e[45]<<29|e[44]>>>3,W=e[44]<<29|e[45]>>>3,_=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,B=e[26]<<25|e[27]>>>7,V=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,Y=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,N=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,P=e[38]<<8|e[39]>>>24,Z=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,R=e[49]<<14|e[48]>>>18,e[0]=m^~y&v,e[1]=g^~b&w,e[10]=_^~S&M,e[11]=k^~N&T,e[20]=C^~U&B,e[21]=j^~D&V,e[30]=H^~X&G,e[31]=Y^~J&q,e[40]=te^~ne&ie,e[41]=re^~oe&se,e[2]=y^~v&x,e[3]=b^~w&E,e[12]=S^~M&O,e[13]=N^~T&I,e[22]=U^~B&P,e[23]=D^~V&Z,e[32]=X^~G&K,e[33]=J^~q&Q,e[42]=ne^~ie&ae,e[43]=oe^~se&ce,e[4]=v^~x&A,e[5]=w^~E&R,e[14]=M^~O&F,e[15]=T^~I&W,e[24]=B^~P&z,e[25]=V^~Z&L,e[34]=G^~K&$,e[35]=q^~Q&ee,e[44]=ie^~ae&le,e[45]=se^~ce&ue,e[6]=x^~A&m,e[7]=E^~R&g,e[16]=O^~F&_,e[17]=I^~W&k,e[26]=P^~z&C,e[27]=Z^~L&j,e[36]=K^~$&H,e[37]=Q^~ee&Y,e[46]=ae^~le&te,e[47]=ce^~ue&re,e[8]=A^~m&y,e[9]=R^~g&b,e[18]=F^~_&S,e[19]=W^~k&N,e[28]=z^~C&U,e[29]=L^~j&D,e[38]=$^~H&X,e[39]=ee^~Y&J,e[48]=le^~te&ne,e[49]=ue^~re&oe,e[0]^=u[n],e[1]^=u[n+1]};if(i)e.exports=E;else for(R=0;R<A.length;++R)n[A[R]]=E[A[R]]}()}(ps);var ms=ps.exports;function gs(e){return"0x"+ms.keccak_256(ns(e))}const ys=new qi("rlp/5.7.0");function bs(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function vs(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function ws(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(ws(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=bs(t.length);return r.unshift(247+r.length),r.concat(t)}es(e)||ys.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call(ns(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=bs(t.length);return r.unshift(183+r.length),r.concat(t)}function xs(e){return as(ws(e))}function Es(e,t,r,n){const o=[];for(;r<t+1+n;){const i=As(e,r);o.push(i.result),(r+=i.consumed)>t+1+n&&ys.throwError("child data too short",qi.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function As(e,t){if(0===e.length&&ys.throwError("data too short",qi.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&ys.throwError("data short segment too short",qi.errors.BUFFER_OVERRUN,{});const n=vs(e,t+1,r);return t+1+r+n>e.length&&ys.throwError("data long segment too short",qi.errors.BUFFER_OVERRUN,{}),Es(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&ys.throwError("data array too short",qi.errors.BUFFER_OVERRUN,{}),Es(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&ys.throwError("data array too short",qi.errors.BUFFER_OVERRUN,{});const n=vs(e,t+1,r);t+1+r+n>e.length&&ys.throwError("data array too short",qi.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:as(e.slice(t+1+r,t+1+r+n))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&ys.throwError("data too short",qi.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:as(e.slice(t+1,t+1+r))}}return{consumed:1,result:as(e[t])}}function Rs(e){const t=ns(e),r=As(t,0);return r.consumed!==t.length&&ys.throwArgumentError("invalid rlp data","data",e),r.result}const _s=new qi("address/5.7.0");function ks(e){ss(e,20)||_s.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=ns(gs(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Ss={};for(let e=0;e<10;e++)Ss[String(e)]=String(e);for(let e=0;e<26;e++)Ss[String.fromCharCode(65+e)]=String(10+e);const Ns=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function Ms(e){let t=null;if("string"!=typeof e&&_s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=ks(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&_s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Ss[e])).join("");for(;t.length>=Ns;){let e=t.substring(0,Ns);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e)&&_s.throwArgumentError("bad icap checksum","address",e),t=re(e.substring(4));t.length<40;)t="0"+t;t=ks("0x"+t)}else _s.throwArgumentError("invalid address","address",e);return t}const Ts=(e,t)=>{if(0===e.length||0===t.length)return!1;if(t.length===e.length)return e.toLowerCase()===t.toLowerCase();const r=e.substring(2,e.length).toLowerCase(),n=t.substring(2,t.length).toLowerCase();return r.length>n.length?r.endsWith(n):n.endsWith(r)};const Os=e=>{const t={isMainnet:1===e,isRinkeby:4===e,isGor:5===e};return Object.assign(Object.assign({},t),{isETH:t.isMainnet||t.isRinkeby||t.isGor})};var Is;!function(e){e[e.MAINNET=1]="MAINNET",e[e.RINKEBY=4]="RINKEBY",e[e.GOERLI=5]="GOERLI",e[e.BSC=56]="BSC",e[e.HECO=128]="HECO",e[e.POLYGON=137]="POLYGON",e[e.ARBITRUM_ONE=42161]="ARBITRUM_ONE",e[e.ARBITRUM_RINKEBY=421611]="ARBITRUM_RINKEBY",e[e.AURORA=1313161554]="AURORA",e[e.MOONRIVER=1285]="MOONRIVER",e[e.OKCHAIN=66]="OKCHAIN",e[e.OPTIMISM=10]="OPTIMISM",e[e.BOBA=288]="BOBA",e[e.AVALANCHE=43114]="AVALANCHE",e[e.CRONOS=25]="CRONOS"}(Is||(Is={}));const Fs={[Is.MAINNET]:["https://rpc.ankr.com/eth","https://eth-mainnet.public.blastapi.io","https://eth-rpc.gateway.pokt.network","https://main-rpc.linkpool.io"],[Is.RINKEBY]:["https://rinkeby-light.eth.linkpool.io/"],[Is.GOERLI]:["https://goerli.optimism.io/"],[Is.BSC]:["https://bsc-dataseed1.binance.org","https://bsc-dataseed2.binance.org","https://bsc-dataseed3.binance.org","https://bsc-dataseed4.binance.org","https://bsc-dataseed1.defibit.io","https://bsc-dataseed2.defibit.io","https://bsc-dataseed3.defibit.io","https://bsc-dataseed4.defibit.io","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed2.ninicoin.io","https://bsc-dataseed3.ninicoin.io","https://bsc-dataseed4.ninicoin.io","https://bsc-dataseed.binance.org","https://rpc.ankr.com/bsc","https://bscrpc.com","https://bsc.mytokenpocket.vip","https://binance.nodereal.io","https://rpc-bsc.bnb48.club"],[Is.HECO]:["https://http-mainnet.hecochain.com","https://pub001.hg.network/rpc"],[Is.POLYGON]:["https://polygon-rpc.com","https://rpc-mainnet.matic.network","https://matic-mainnet.chainstacklabs.com","https://rpc-mainnet.maticvigil.com","https://rpc-mainnet.matic.quiknode.pro","https://matic-mainnet-full-rpc.bwarelabs.com","https://matic-mainnet-archive-rpc.bwarelabs.com","https://poly-rpc.gateway.pokt.network","https://rpc.ankr.com/polygon","https://polygon-mainnet.public.blastapi.io"],[Is.ARBITRUM_ONE]:["https://arb1.arbitrum.io/rpc","https://rpc.ankr.com/arbitrum"],[Is.ARBITRUM_RINKEBY]:["https://rinkeby.arbitrum.io/rpc"],[Is.AURORA]:["https://mainnet.aurora.dev/"],[Is.MOONRIVER]:["https://rpc.api.moonriver.moonbeam.network","https://moonriver.api.onfinality.io/rpc?apikey=673e1fae-c9c9-4c7f-a3d5-2121e8274366","https://moonriver.api.onfinality.io/public","https://moonriver.public.blastapi.io"],[Is.OKCHAIN]:["https://exchainrpc.okex.org","https://okc-mainnet.gateway.pokt.network/v1/lb/6275309bea1b320039c893ff"],[Is.OPTIMISM]:["https://mainnet.optimism.io","https://optimism-mainnet.public.blastapi.io"],[Is.BOBA]:["https://mainnet.boba.network","https://boba-mainnet.gateway.pokt.network/v1/lb/623ad21b20354900396fed7f","https://lightning-replica.boba.network"],[Is.AVALANCHE]:["https://api.avax.network/ext/bc/C/rpc","https://rpc.ankr.com/avalanche","https://ava-mainnet.public.blastapi.io/ext/bc/C/rpc"],[Is.CRONOS]:["https://evm.cronos.org","https://cronos-rpc.heavenswail.one","https://evm-cronos.crypto.org","https://cronosrpc-1.xstaking.sg","https://cronos-rpc.elk.finance"]},Ws={symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,showDecimals:4,wrappedTokenSymbol:"WETH"},Cs={[Is.MAINNET]:Object.assign(Object.assign({},Ws),{wrappedTokenAddress:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}),[Is.RINKEBY]:Object.assign(Object.assign({},Ws),{wrappedTokenAddress:"0xB26c0d8Be2960c70641A95A9195BE1f59Ac83aC0"}),[Is.GOERLI]:Object.assign(Object.assign({},Ws),{wrappedTokenAddress:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"}),[Is.OPTIMISM]:Object.assign(Object.assign({},Ws),{wrappedTokenAddress:"0x4200000000000000000000000000000000000006"}),[Is.CRONOS]:Object.assign(Object.assign({},Ws),{symbol:"CRO",name:"Cronos",wrappedTokenSymbol:"WCRO",wrappedTokenAddress:"0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23"}),[Is.BOBA]:Object.assign(Object.assign({},Ws),{wrappedTokenAddress:"0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000"}),[Is.BSC]:Object.assign(Object.assign({},Ws),{symbol:"BNB",name:"BNB",wrappedTokenSymbol:"WBNB",wrappedTokenAddress:"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}),[Is.OKCHAIN]:Object.assign(Object.assign({},Ws),{symbol:"OKT",name:"OKT",wrappedTokenSymbol:"WOKT",wrappedTokenAddress:"0x8F8526dbfd6E38E3D8307702cA8469Bae6C56C15"}),[Is.HECO]:Object.assign(Object.assign({},Ws),{symbol:"HT",name:"HT",showDecimals:6,wrappedTokenSymbol:"WHT",wrappedTokenAddress:"0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f"}),[Is.POLYGON]:Object.assign(Object.assign({},Ws),{symbol:"MATIC",name:"MATIC",showDecimals:6,wrappedTokenSymbol:"WMATIC",wrappedTokenAddress:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}),[Is.MOONRIVER]:Object.assign(Object.assign({},Ws),{symbol:"MOVR",name:"MOVR",showDecimals:6,wrappedTokenSymbol:"WMOVR",wrappedTokenAddress:"0x98878b06940ae243284ca214f92bb71a2b032b8a"}),[Is.ARBITRUM_ONE]:Object.assign(Object.assign({},Ws),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}),[Is.ARBITRUM_RINKEBY]:Object.assign(Object.assign({},Ws),{name:"Ether",showDecimals:6,wrappedTokenAddress:"0xEBbc3452Cc911591e4F18f3b36727Df45d6bd1f9"}),[Is.AURORA]:Object.assign(Object.assign({},Ws),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB"}),[Is.AVALANCHE]:Object.assign(Object.assign({},Ws),{symbol:"AVAX",name:"Avalanche",showDecimals:6,wrappedTokenSymbol:"WAVAX",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"})},js={[Is.MAINNET]:"ethereum",[Is.RINKEBY]:"rinkeby",[Is.GOERLI]:"goerli",[Is.OPTIMISM]:"optimism",[Is.CRONOS]:"cronos",[Is.BOBA]:"boba",[Is.BSC]:"bsc",[Is.OKCHAIN]:"okex-chain",[Is.HECO]:"heco",[Is.POLYGON]:"polygon",[Is.MOONRIVER]:"moonriver",[Is.ARBITRUM_ONE]:"arbitrum",[Is.ARBITRUM_RINKEBY]:"arb-rinkeby",[Is.AURORA]:"aurora",[Is.AVALANCHE]:"avalanche"},Us={[Is.MAINNET]:"etherscan.io",[Is.RINKEBY]:"rinkeby.etherscan.io",[Is.GOERLI]:"goerli.etherscan.io",[Is.OPTIMISM]:"optimistic.etherscan.io",[Is.CRONOS]:"cronoscan.com",[Is.BOBA]:"blockexplorer.boba.network",[Is.BSC]:"bscscan.com",[Is.OKCHAIN]:"www.oklink.com/okexchain",[Is.HECO]:"hecoinfo.com",[Is.POLYGON]:"polygonscan.com",[Is.MOONRIVER]:"moonriver.moonscan.io",[Is.ARBITRUM_ONE]:"arbiscan.io",[Is.ARBITRUM_RINKEBY]:"testnet.arbiscan.io",[Is.AURORA]:"aurorascan.dev",[Is.AVALANCHE]:"snowtrace.io"};function Ds(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Bs(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}const Vs={colorMode:"dark",slippage:3..toString(),ddl:20};var Ps=(e=Vs,t)=>{switch(t.type){case"SET_COLOR_MODE":return Object.assign(Object.assign({},e),{colorMode:t.payload});case"SET_SLIPPAGE":return Object.assign(Object.assign({},e),{slippage:t.payload});case"SET_TRANSACTION_DDL":return Object.assign(Object.assign({},e),{ddl:t.payload});default:return e}};const Zs={chainId:Is.MAINNET,latestBlockNumber:0};var zs=(e=Zs,t)=>{switch(t.type){case"SET_CHAIN_ID":return Object.assign(Object.assign({},e),{chainId:t.payload});case"SET_BLOCK_NUMBER":return Object.assign(Object.assign({},e),{latestBlockNumber:t.payload});default:return e}};const Ls={tokenList:[],popularTokenList:[],ethBalance:void 0,accountBalances:{},balanceLoadings:{},slippageWithTokens:[]};var Hs,Ys=(e=Ls,t)=>{switch(t.type){case"SET_TOKEN_LIST":return Object.assign(Object.assign({},e),{tokenList:t.payload});case"SET_POPULAR_TOKEN_LIST":return Object.assign(Object.assign({},e),{popularTokenList:t.payload});case"SET_SLIPPAGE_WITH_TOKENS":return Object.assign(Object.assign({},e),{slippageWithTokens:t.payload});case"SET_ETH_BALANCE":return Object.assign(Object.assign({},e),{ethBalance:t.payload});case"SET_DEFAULT_FROM_TOKEN":return Object.assign(Object.assign({},e),{defaultFromToken:t.payload});case"SET_DEFAULT_TO_TOKEN":return Object.assign(Object.assign({},e),{defaultToToken:t.payload});case"SET_ACCOUNT_BALANCES":return Object.assign(Object.assign({},e),{accountBalances:Object.assign(Object.assign({},e.accountBalances),t.payload)});case"SET_ACCOUNT_ALLOWANCES":const r=e.accountBalances;return Object.keys(r).map((e=>{r[e].tokenAllowances=t.payload})),Object.assign(Object.assign({},e),{accountBalances:r});case"SET_BALANCE_LOADINGS":return Object.assign(Object.assign({},e),{balanceLoadings:Object.assign(Object.assign({},e.balanceLoadings),t.payload)});default:return e}};!function(e){e.Initial="Initial",e.Pending="Pending",e.ApproveSuccess="ApproveSuccess",e.TxSuccess="TxSuccess",e.Failed="Failed"}(Hs||(Hs={}));const Xs={height:void 0,width:void 0,apikey:"",feeRate:0,rebateTo:"",isReverseRouting:!1,contractStatus:Hs.Initial};const Js={settings:Vs,wallet:Zs,globals:Xs,token:Ls},Gs=J({reducer:G({settings:Ps,wallet:zs,token:Ys,globals:(e=Xs,t)=>"SET_GLOBAL_PROPS"===t.type?Object.assign(Object.assign({},e),t.payload):e}),middleware:e=>e({serializableCheck:{ignoredActions:["SET_ACCOUNT_BALANCES","SET_ETH_BALANCE"],ignoredPaths:["token.accountBalances","token.ethBalance"]}}),preloadedState:Js}),qs=e=>(null!=e?e:Gs.getState()).wallet.chainId,Ks=e=>(null!=e?e:Gs.getState()).wallet.latestBlockNumber,Qs=e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_ACCOUNT_BALANCES",payload:e})})),$s=e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_BALANCE_LOADINGS",payload:e})})),ea="0x0000000000000000000000000000000000000000",ta=ne.from(-1),ra=ne.from(0),na=ne.from(1),oa=ne.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var ia=[{constant:!0,inputs:[],name:"getCurrentBlockTimestamp",outputs:[{name:"timestamp",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getLastBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockDifficulty",outputs:[{name:"difficulty",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockGasLimit",outputs:[{name:"gaslimit",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockCoinbase",outputs:[{name:"coinbase",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"}],sa={[Is.MAINNET]:{MULTI_CALL:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",DODO_APPROVE:"0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149",ERC20_HELPER:"0xD9ef2d1583e8Aa196123e773BE38B539a4d149df"},[Is.RINKEBY]:{MULTI_CALL:"0xb7E1C577f95959a3eD11f9281702850328b4e0e4",DODO_APPROVE:"0xcC8d87A7C747eeE4242045C47Ef25e0A81D56ae3",ERC20_HELPER:"0x6A42091d713A67E25a1D11aeE14E7AEB96E0331f"},[Is.GOERLI]:{MULTI_CALL:"0x696E25A5e2AEd1C55E6d6Cfa0532Bbda9020165d",DODO_APPROVE:"0xC9143e54021f4a6d33b9b89DBB9F458AaEdd56FB",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"},[Is.BSC]:{MULTI_CALL:"0x1Ee38d535d541c55C9dae27B12edf090C608E6Fb",DODO_APPROVE:"0xa128Ba44B2738A558A1fdC06d6303d52D3Cef8c1",ERC20_HELPER:"0x566651Ad34f6306872FaC5fB95bbF4C9beE8D8F2"},[Is.HECO]:{MULTI_CALL:"0x76a328B3440B9276a31523e731B34082df7a6f1A",DODO_APPROVE:"0x68b6c06Ac8Aa359868393724d25D871921E97293",ERC20_HELPER:"0x270C2abC692Dd476B860CCbDfD6D8146BF61f8D8"},[Is.POLYGON]:{MULTI_CALL:"0xc9eD9B18e447e600238fe50e944B9062B664DEa4",DODO_APPROVE:"0x292E6b2e054e1157df71C1C9510265CA8C0c7672",ERC20_HELPER:"0xfd24312Ec7871A6D1a31e454D5AbB16c6c25a9b3"},[Is.ARBITRUM_ONE]:{MULTI_CALL:"0xF718F2bd590E5621e53f7b89398e52f7Acced8ca",DODO_APPROVE:"0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8",ERC20_HELPER:"0x7C062B9C584fA6eC2504270790D38240A2c5fE72"},[Is.ARBITRUM_RINKEBY]:{MULTI_CALL:"0x696E25A5e2AEd1C55E6d6Cfa0532Bbda9020165d",DODO_APPROVE:"0x5BaF16d57620Cb361F622232F3cb4090e35F3da2",ERC20_HELPER:"0x5B2fd46E6E3Ff1E479d651ec0b210882Aa9871dF"},[Is.AURORA]:{MULTI_CALL:"0x989DcAA95801C527C5B73AA65d3962dF9aCe1b0C",DODO_APPROVE:"0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619",ERC20_HELPER:"0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25"},[Is.MOONRIVER]:{MULTI_CALL:"0x2ff2CeE6E9359F9eA1cF2f51d18bF9F2045447E4",DODO_APPROVE:"0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25",ERC20_HELPER:"0x6373ceB657C83C91088d328622573FB766064Ac4"},[Is.OKCHAIN]:{MULTI_CALL:"0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01",DODO_APPROVE:"0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",ERC20_HELPER:"0x4775b1858f1e417C9609D455C3Ad8751ec01daC4"},[Is.OPTIMISM]:{MULTI_CALL:"0xb98Ac2fEFc8b73aeAE33D02BB00c26E12afCa9Df",DODO_APPROVE:"0xa492d6eABcdc3E204676f15B950bBdD448080364",ERC20_HELPER:"0x42E456ea0dd7538ea103fBb1d0388D14C97bB5b2"},[Is.BOBA]:{MULTI_CALL:"0xD56281EF996B6B29874C77D2e1464216E8043127",DODO_APPROVE:"0x8F8Dd7DB1bDA5eD3da8C9daf3bfa471c12d58486",ERC20_HELPER:"0x9FCFD9ff955D36856F8EE480471B05488C0eB5cA"},[Is.AVALANCHE]:{MULTI_CALL:"0x97f0153E7F5749640aDF3Ff9CFC518b79D6Fe53b",DODO_APPROVE:"0xCFea63e3DE31De53D68780Dd65675F169439e470",ERC20_HELPER:"0xC3528D128CC227fd60793007b5e3FdF7c2945282"},[Is.CRONOS]:{MULTI_CALL:"0x4f4408D78F9E9e242c17C635FbD0f1952951c917",DODO_APPROVE:"0x9B736bB8f336f61E16454DCA4dE130703D151042",ERC20_HELPER:"0xbd2F5c60cf7d60daD2106ceD4D21b90722761f14"}};var aa=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const ca=new qi("properties/5.7.0");function la(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function ua(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function da(e){return aa(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function ha(e){const t={};for(const r in e)t[r]=e[r];return t}const fa={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function pa(e){if(null==e||fa[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;r<t.length;r++){let n=null;try{n=e[t[r]]}catch(e){continue}if(!pa(n))return!1}return!0}return ca.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function ma(e){if(pa(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>ga(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&la(t,r,ga(n))}return t}return ca.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function ga(e){return ma(e)}class ya{constructor(e){for(const t in e)this[t]=ga(e[t])}}const ba=new qi("abi/5.7.0"),va={};let wa={calldata:!0,memory:!0,storage:!0},xa={calldata:!0,memory:!0};function Ea(e,t){if("bytes"===e||"string"===e){if(wa[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&xa[t])return!0;return(wa[t]||"payable"===t)&&ba.throwArgumentError("invalid modifier","name",t),!1}function Aa(e,t){for(let r in t)la(e,r,t[r])}const Ra=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),_a=new RegExp(/^(.*)\[([0-9]*)\]$/);class ka{constructor(e,t){e!==va&&ba.throwError("use fromString",qi.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Aa(this,t);let r=this.type.match(_a);Aa(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:ka.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=Ra.sighash),Ra[e]||ba.throwArgumentError("invalid format type","format",e),e===Ra.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==Ra.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===Ra.full?", ":",")+")"):t+=this.type,e!==Ra.sighash&&(!0===this.indexed&&(t+=" indexed"),e===Ra.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?ka.fromString(e,t):ka.fromObject(e)}static fromObject(e){return ka.isParamType(e)?e:new ka(va,{name:e.name||null,type:Ua(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(ka.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){ba.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function o(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},s=i;for(let r=0;r<e.length;r++){let i=e[r];switch(i){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(r),s.state.allowType=!1,s.type=Ua(s.type),s.components=[o(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),Ea(s.type,s.name)&&(s.name=""),s.type=Ua(s.type);let e=s;s=s.parent,s||n(r),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),Ea(s.type,s.name)&&(s.name=""),s.type=Ua(s.type);let a=o(s.parent);s.parent.components.push(a),delete s.parent,s=a;break;case" ":s.state.allowType&&""!==s.type&&(s.type=Ua(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(r),s.indexed&&n(r),s.indexed=!0,s.name=""):Ea(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(r),s.type+=i,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(r),s.type+=i,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=i,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=i,delete s.state.allowArray):s.state.readArray?s.type+=i:n(r)}}return s.parent&&ba.throwArgumentError("unexpected eof","param",e),delete i.state,"indexed"===s.name?(t||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):Ea(s.type,s.name)&&(s.name=""),i.type=Ua(i.type),i}(e,!!t),ka.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function Sa(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let o=0;o<e.length;o++){let i=e[o];","===i&&0===n?(t.push(r),r=""):(r+=i,"("===i?n++:")"===i&&(n--,-1===n&&ba.throwArgumentError("unbalanced parenthesis","value",e)))}r&&t.push(r);return t}(e).map((e=>ka.fromString(e,t)))}class Na{constructor(e,t){e!==va&&ba.throwError("use a static from method",qi.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Aa(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Na.isFragment(e)?e:"string"==typeof e?Na.fromString(e):Na.fromObject(e)}static fromObject(e){if(Na.isFragment(e))return e;switch(e.type){case"function":return Wa.fromObject(e);case"event":return Ma.fromObject(e);case"constructor":return Fa.fromObject(e);case"error":return ja.fromObject(e);case"fallback":case"receive":return null}return ba.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Ma.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?Wa.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?Fa.fromString(e.trim()):"error"===e.split(" ")[0]?ja.fromString(e.substring(5).trim()):ba.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class Ma extends Na{format(e){if(e||(e=Ra.sighash),Ra[e]||ba.throwArgumentError("invalid format type","format",e),e===Ra.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Ra.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Ra.full?", ":",")+") ",e!==Ra.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?Ma.fromString(e):Ma.fromObject(e)}static fromObject(e){if(Ma.isEventFragment(e))return e;"event"!==e.type&&ba.throwArgumentError("invalid event object","value",e);const t={name:Ba(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ka.fromObject):[],type:"event"};return new Ma(va,t)}static fromString(e){let t=e.match(Va);t||ba.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:ba.warn("unknown modifier: "+e)}})),Ma.fromObject({name:t[1].trim(),anonymous:r,inputs:Sa(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function Ta(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&ba.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||ba.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=ne.from(r[1]),r[0]):e}function Oa(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Ia(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&ba.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&ba.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||ba.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&ba.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&ba.throwArgumentError("unable to determine stateMutability","value",e),t}class Fa extends Na{format(e){if(e||(e=Ra.sighash),Ra[e]||ba.throwArgumentError("invalid format type","format",e),e===Ra.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===Ra.sighash&&ba.throwError("cannot format a constructor for sighash",qi.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===Ra.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?Fa.fromString(e):Fa.fromObject(e)}static fromObject(e){if(Fa.isConstructorFragment(e))return e;"constructor"!==e.type&&ba.throwArgumentError("invalid constructor object","value",e);let t=Ia(e);t.constant&&ba.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ka.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?ne.from(e.gas):null};return new Fa(va,r)}static fromString(e){let t={type:"constructor"},r=(e=Ta(e,t)).match(Va);return r&&"constructor"===r[1].trim()||ba.throwArgumentError("invalid constructor string","value",e),t.inputs=Sa(r[2].trim(),!1),Oa(r[3].trim(),t),Fa.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class Wa extends Fa{format(e){if(e||(e=Ra.sighash),Ra[e]||ba.throwArgumentError("invalid format type","format",e),e===Ra.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Ra.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Ra.full?", ":",")+") ",e!==Ra.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?Wa.fromString(e):Wa.fromObject(e)}static fromObject(e){if(Wa.isFunctionFragment(e))return e;"function"!==e.type&&ba.throwArgumentError("invalid function object","value",e);let t=Ia(e);const r={type:e.type,name:Ba(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(ka.fromObject):[],outputs:e.outputs?e.outputs.map(ka.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?ne.from(e.gas):null};return new Wa(va,r)}static fromString(e){let t={type:"function"},r=(e=Ta(e,t)).split(" returns ");r.length>2&&ba.throwArgumentError("invalid function string","value",e);let n=r[0].match(Va);if(n||ba.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Ba(t.name),t.inputs=Sa(n[2],!1),Oa(n[3].trim(),t),r.length>1){let n=r[1].match(Va);""==n[1].trim()&&""==n[3].trim()||ba.throwArgumentError("unexpected tokens","value",e),t.outputs=Sa(n[2],!1)}else t.outputs=[];return Wa.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function Ca(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||ba.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class ja extends Na{format(e){if(e||(e=Ra.sighash),Ra[e]||ba.throwArgumentError("invalid format type","format",e),e===Ra.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Ra.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Ra.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?ja.fromString(e):ja.fromObject(e)}static fromObject(e){if(ja.isErrorFragment(e))return e;"error"!==e.type&&ba.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Ba(e.name),inputs:e.inputs?e.inputs.map(ka.fromObject):[]};return Ca(new ja(va,t))}static fromString(e){let t={type:"error"},r=e.match(Va);return r||ba.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Ba(t.name),t.inputs=Sa(r[2],!1),Ca(ja.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Ua(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const Da=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ba(e){return e&&e.match(Da)||ba.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const Va=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Pa=new qi("abi/5.7.0");class Za{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){Pa.throwArgumentError(e,this.localName,t)}}class za{constructor(e){la(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return us(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(os(e._data))}writeBytes(e){let t=ns(e);const r=t.length%this.wordSize;return r&&(t=os([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=ns(ne.from(e));return t.length>this.wordSize&&Pa.throwError("value out-of-bounds",qi.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=os([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class La{constructor(e,t,r,n){la(this,"_data",ns(e)),la(this,"wordSize",t||32),la(this,"_coerceFunc",r),la(this,"allowLoose",n),this._offset=0}get data(){return as(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):La.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:Pa.throwError("data out-of-bounds",qi.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new La(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return ne.from(this.readBytes(this.wordSize))}}class Ha extends Za{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Ms(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return Ms(hs(e.readValue().toHexString(),20))}}class Ya extends Za{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const Xa=new qi("abi/5.7.0");function Ja(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||Xa.throwError("cannot encode object for signature with missing names",qi.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&Xa.throwError("cannot encode object for signature with duplicate names",qi.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else Xa.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&Xa.throwArgumentError("types/value length mismatch","tuple",r);let o=new za(e.wordSize),i=new za(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=i.length;e.encode(i,r);let n=o.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(o,r)})),s.forEach((e=>{e(o.length)}));let a=e.appendWriter(o);return a+=e.appendWriter(i),a}function Ga(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readValue(),i=n.subReader(r.toNumber());try{o=t.decode(i)}catch(e){if(e.code===qi.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if(e.code===qi.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}null!=o&&r.push(o)}));const o=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw i}}):r[n]=i}));for(let e=0;e<r.length;e++){const t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class qa extends Za{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),Xa.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return Ja(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&Xa.throwError("insufficient data length",qi.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e<t;e++)r.push(new Ya(this.coder));return e.coerce(this.name,Ga(e,r))}}class Ka extends Za{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class Qa extends Za{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=ns(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class $a extends Qa{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,as(super.decode(e)))}}class ec extends Za{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=ns(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,as(e.readBytes(this.size)))}}class tc extends Za{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}class rc extends Za{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=ne.from(t),n=oa.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(na).mul(ta)))&&this._throwError("value out-of-bounds",t)}else(r.lt(ra)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}const nc=new qi("strings/5.7.0");var oc,ic;function sc(e,t,r,n,o){if(e===ic.BAD_PREFIX||e===ic.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===ic.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(oc||(oc={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(ic||(ic={}));const ac=Object.freeze({error:function(e,t,r,n,o){return nc.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:sc,replace:function(e,t,r,n,o){return e===ic.OVERLONG?(n.push(o),0):(n.push(65533),sc(e,t,r))}});function cc(e,t){null==t&&(t=ac.error),e=ns(e);const r=[];let n=0;for(;n<e.length;){const o=e[n++];if(o>>7==0){r.push(o);continue}let i=null,s=null;if(192==(224&o))i=1,s=127;else if(224==(240&o))i=2,s=2047;else{if(240!=(248&o)){n+=t(128==(192&o)?ic.UNEXPECTED_CONTINUE:ic.BAD_PREFIX,n-1,e,r);continue}i=3,s=65535}if(n-1+i>=e.length){n+=t(ic.OVERRUN,n-1,e,r);continue}let a=o&(1<<8-i-1)-1;for(let o=0;o<i;o++){let o=e[n];if(128!=(192&o)){n+=t(ic.MISSING_CONTINUE,n,e,r),a=null;break}a=a<<6|63&o,n++}null!==a&&(a>1114111?n+=t(ic.OUT_OF_RANGE,n-1-i,e,r,a):a>=55296&&a<=57343?n+=t(ic.UTF16_SURROGATE,n-1-i,e,r,a):a<=s?n+=t(ic.OVERLONG,n-1-i,e,r,a):r.push(a))}return r}function lc(e,t=oc.current){t!=oc.current&&(nc.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return ns(r)}function uc(e,t){return cc(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}class dc extends Qa{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,lc(t))}decode(e){return uc(super.decode(e))}}class hc extends Za{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){return Ja(e,this.coders,t)}decode(e){return e.coerce(this.name,Ga(e,this.coders))}}const fc=new qi("abi/5.7.0"),pc=new RegExp(/^bytes([0-9]*)$/),mc=new RegExp(/^(u?int)([0-9]*)$/);const gc=new class{constructor(e){la(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ha(e.name);case"bool":return new Ka(e.name);case"string":return new dc(e.name);case"bytes":return new $a(e.name);case"array":return new qa(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new hc((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new tc(e.name)}let t=e.type.match(mc);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&fc.throwArgumentError("invalid "+t[1]+" bit length","param",e),new rc(r/8,"int"===t[1],e.name)}if(t=e.type.match(pc),t){let r=parseInt(t[1]);return(0===r||r>32)&&fc.throwArgumentError("invalid bytes length","param",e),new ec(r,e.name)}return fc.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new La(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new za(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(ka.from(e))));return new hc(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&fc.throwError("types/values length mismatch",qi.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(ka.from(e)))),n=new hc(r,"_"),o=this._getWriter();return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this._getCoder(ka.from(e))));return new hc(n,"_").decode(this._getReader(ns(t),r))}};function yc(e){return gs(lc(e))}function bc(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return ns(t)}function vc(e){e=ns(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function wc(e,t){null==t&&(t=1);const r=[],n=r.forEach,o=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?o(e,t-1):r.push(e)}))};return o(e,t),r}function xc(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),o=1,i=[0,1];for(let e=1;e<n;e++)i.push(o+=r());let s=r(),a=t;t+=s;let c=0,l=0;function u(){return 0==c&&(l=l<<8|e[t++],c=8),l>>--c&1}const d=Math.pow(2,31),h=d>>>1,f=h>>1,p=d-1;let m=0;for(let e=0;e<31;e++)m=m<<1|u();let g=[],y=0,b=d;for(;;){let e=Math.floor(((m-y+1)*o-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<i[n]?r=n:t=n}if(0==t)break;g.push(t);let s=y+Math.floor(b*i[t]/o),a=y+Math.floor(b*i[t+1]/o)-1;for(;0==((s^a)&h);)m=m<<1&p|u(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&f;)m=m&h|m<<1&p>>>1|u(),s=s<<1^h,a=(a^h)<<1|h|1;y=s,b=1+a-s}let v=n-4;return g.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(e))}function Ec(e){return 1&e?~e>>1:e>>1}function Ac(e,t){let r=Array(e);for(let n=0,o=-1;n<e;n++)r[n]=o+=1+t();return r}function Rc(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=Ec(t());return r}function _c(e,t){let r=Ac(e(),e),n=e(),o=Ac(n,e),i=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<i[e];t++)r.push(o[e]+t);return t?r.map((e=>t[e])):r}function kc(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let o=0;o<t;o++)Rc(e,r).forEach(((e,t)=>n[t].push(e)));return n}function Sc(e,t){let r=1+t(),n=t(),o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return wc(kc(o.length,1+e,t).map(((e,t)=>{const i=e[0],s=e.slice(1);return Array(o[t]).fill(void 0).map(((e,t)=>{let o=t*n;return[i+t*r,s.map((e=>e+o))]}))})))}function Nc(e,t){return kc(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Mc=xc(bc("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Tc=new Set(_c(Mc)),Oc=new Set(_c(Mc)),Ic=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(Sc(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(Nc(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(wc(t))}(Mc),Fc=function(e){let t=_c(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let o=_c(e,t);if(0==o.length)break;n.push({set:new Set(o),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let o=e(),i=o%3;o=o/3|0;let s=!!(1&o);return o>>=1,{branches:n,valid:i,fe0f:s,save:1==o,check:2==o}}()}(Mc);function Wc(e){return function(e,t=oc.current){return cc(lc(e,t))}(e)}function Cc(e){return e.filter((e=>65039!=e))}function jc(e){for(let t of e.split(".")){let e=Wc(t);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&45===e[2]&&45===e[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function Uc(e){return jc(function(e,t){let r=Wc(e).reverse(),n=[];for(;r.length;){let e=Dc(r);if(e){n.push(...t(e));continue}let o=r.pop();if(Tc.has(o)){n.push(o);continue}if(Oc.has(o))continue;let i=Ic[o];if(!i)throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`);n.push(...i)}return jc(function(e){return e.normalize("NFC")}(String.fromCodePoint(...n)))}(e,Cc))}function Dc(e,t){var r;let n,o,i=Fc,s=[],a=e.length;for(t&&(t.length=0);a;){let c=e[--a];if(i=null===(r=i.branches.find((e=>e.set.has(c))))||void 0===r?void 0:r.node,!i)break;if(i.save)o=c;else if(i.check&&c===o)break;s.push(c),i.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),i.valid&&(n=s.slice(),2==i.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const Bc=new qi("hash/5.7.0"),Vc=new Uint8Array(32);function Pc(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function Zc(e){const t=lc(Uc(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++){46===t[e]&&(r.push(Pc(t.slice(n,e))),n=e+1)}if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(Pc(t.slice(n))),r}function zc(e){"string"!=typeof e&&Bc.throwArgumentError("invalid ENS name; not a string","name",e);let t=Vc;const r=Zc(e);for(;r.length;)t=gs(os([t,gs(r.pop())]));return as(t)}Vc.fill(0);var Lc=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Hc=new qi("hash/5.7.0"),Yc=new Uint8Array(32);Yc.fill(0);const Xc=ne.from(-1),Jc=ne.from(0),Gc=ne.from(1),qc=ne.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Kc=hs(Gc.toHexString(),32),Qc=hs(Jc.toHexString(),32),$c={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},el=["name","version","chainId","verifyingContract","salt"];function tl(e){return function(t){return"string"!=typeof t&&Hc.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const rl={name:tl("name"),version:tl("version"),chainId:function(e){try{return ne.from(e).toString()}catch(e){}return Hc.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return Ms(e).toLowerCase()}catch(e){}return Hc.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=ns(e);if(32!==t.length)throw new Error("bad length");return as(t)}catch(e){}return Hc.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function nl(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&Hc.throwArgumentError("invalid numeric width","type",e);const o=qc.mask(r?n-1:n),i=r?o.add(Gc).mul(Xc):Jc;return function(t){const r=ne.from(t);return(r.lt(i)||r.gt(o))&&Hc.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),hs(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&Hc.throwArgumentError("invalid bytes width","type",e),function(t){return ns(t).length!==r&&Hc.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=ns(e),r=t.length%32;return r?us([t,Yc.slice(r)]):as(t)}(t)}}}switch(e){case"address":return function(e){return hs(Ms(e),32)};case"bool":return function(e){return e?Kc:Qc};case"bytes":return function(e){return gs(e)};case"string":return function(e){return yc(e)}}return null}function ol(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class il{constructor(e){la(this,"types",Object.freeze(ga(e))),la(this,"_encoderCache",{}),la(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const o={};e[n].forEach((i=>{o[i.name]&&Hc.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",e),o[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&Hc.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e);nl(s)||(r[s]||Hc.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),r[s].push(n),t[n][s]=!0)}))}const o=Object.keys(r).filter((e=>0===r[e].length));0===o.length?Hc.throwArgumentError("missing primary type","types",e):o.length>1&&Hc.throwArgumentError(`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),la(this,"primaryType",o[0]),function o(i,s){s[i]&&Hc.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",e),s[i]=!0,Object.keys(t[i]).forEach((e=>{r[e]&&(o(e,s),Object.keys(s).forEach((t=>{n[t][e]=!0})))})),delete s[i]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=ol(t,e[t])+r.map((t=>ol(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=nl(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&Hc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let o=t.map(r);return this._types[e]&&(o=o.map(gs)),gs(us(o))}}const r=this.types[e];if(r){const t=yc(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?gs(n):n}));return n.unshift(t),us(n)}}return Hc.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||Hc.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return gs(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(nl(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],o=parseInt(n[3]);return o>=0&&t.length!==o&&Hc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const o=this.types[e];return o?o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{}):Hc.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new il(e)}static getPrimaryType(e){return il.from(e).primaryType}static hashStruct(e,t,r){return il.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=$c[r];n||Hc.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>el.indexOf(e.name)-el.indexOf(t.name))),il.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return us(["0x1901",il.hashDomain(e),il.from(t).hash(r)])}static hash(e,t,r){return gs(il.encode(e,t,r))}static resolveNames(e,t,r,n){return Lc(this,void 0,void 0,(function*(){e=ha(e);const o={};e.verifyingContract&&!ss(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const i=il.from(t);i.visit(r,((e,t)=>("address"!==e||ss(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=yield n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=i.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){il.hashDomain(e);const n={},o=[];el.forEach((t=>{const r=e[t];null!=r&&(n[t]=rl[t](r),o.push({name:t,type:$c[t]}))}));const i=il.from(t),s=ha(t);return s.EIP712Domain?Hc.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=o,i.encode(r),{types:s,domain:n,primaryType:i.primaryType,message:i.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return as(ns(t));if(e.match(/^u?int/))return ne.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&Hc.throwArgumentError("invalid string","value",t),t}return Hc.throwArgumentError("unsupported type","type",e)}))}}}const sl=new qi("abi/5.7.0");class al extends ya{}class cl extends ya{}class ll extends ya{}class ul extends ya{static isIndexed(e){return!(!e||!e._isIndexed)}}const dl={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function hl(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class fl{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,la(this,"fragments",t.map((e=>Na.from(e))).filter((e=>null!=e))),la(this,"_abiCoder",ua(new.target,"getAbiCoder")()),la(this,"functions",{}),la(this,"errors",{}),la(this,"events",{}),la(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void sl.warn("duplicate definition - constructor"):void la(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?sl.warn("duplicate definition - "+r):t[r]=e})),this.deploy||la(this,"deploy",Fa.from({payable:!1,type:"constructor"})),la(this,"_isInterface",!0)}format(e){e||(e=Ra.full),e===Ra.sighash&&sl.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===Ra.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return gc}static getAddress(e){return Ms(e)}static getSighash(e){return ls(yc(e.format()),0,4)}static getEventTopic(e){return yc(e.format())}getFunction(e){if(ss(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];sl.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?sl.throwArgumentError("no matching function","name",t):r.length>1&&sl.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[Wa.fromString(e).format()];return t||sl.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ss(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];sl.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?sl.throwArgumentError("no matching event","name",t):r.length>1&&sl.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[Ma.fromString(e).format()];return t||sl.throwArgumentError("no matching event","signature",e),t}getError(e){if(ss(e)){const t=ua(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}sl.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?sl.throwArgumentError("no matching error","name",t):r.length>1&&sl.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[Wa.fromString(e).format()];return t||sl.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return ua(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),ua(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=ns(t);return as(r.slice(0,4))!==this.getSighash(e)&&sl.throwArgumentError(`data signature does not match error ${e.name}.`,"data",as(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),as(os([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=ns(t);return as(r.slice(0,4))!==this.getSighash(e)&&sl.throwArgumentError(`data signature does not match function ${e.name}.`,"data",as(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),as(os([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=ns(t),n=null,o="",i=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=as(r.slice(0,4)),t=dl[e];if(t)i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.signature,t.reason&&(n=i[0]),"Error"===s?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(i[0])}`:"Panic"===s&&(o=`; VM Exception while processing transaction: reverted with panic code ${i[0]}`);else try{const t=this.getError(e);i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.format()}catch(e){}break}}return sl.throwError("call revert exception"+o,qi.errors.CALL_EXCEPTION,{method:e.format(),data:as(t),errorArgs:i,errorName:s,errorSignature:a,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),as(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&sl.throwError("too many arguments for "+e.format(),qi.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?yc(t):"bytes"===e.type?gs(as(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=ne.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),hs(as(t),32));for(t.forEach(((t,o)=>{let i=e.inputs[o];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?sl.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>n(i,e)))):r.push(n(i,t)):null!=t&&sl.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&sl.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,i)=>{const s=t[i];if(e.indexed)if("string"===e.type)r.push(yc(s));else if("bytes"===e.type)r.push(gs(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),o.push(s)})),{data:this._abiCoder.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);ss(r[0],32)&&r[0].toLowerCase()===t||sl.throwError("fragment/topic mismatch",qi.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],o=[],i=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(ka.fromObject({type:"bytes32",name:e.name})),i.push(!0)):(n.push(e),i.push(!1)):(o.push(e),i.push(!1))}));let s=null!=r?this._abiCoder.decode(n,os(r)):null,a=this._abiCoder.decode(o,t,!0),c=[],l=0,u=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)c[t]=new ul({_isIndexed:!0,hash:null});else if(i[t])c[t]=new ul({_isIndexed:!0,hash:s[u++]});else try{c[t]=s[u++]}catch(e){c[t]=e}else try{c[t]=a[l++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){const r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw hl(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}}));for(let e=0;e<c.length;e++){const t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:()=>{throw hl(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new cl({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:ne.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new al({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=as(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new ll({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}function pl(e,t,...r){return Bs(this,void 0,void 0,(function*(){const n=[];for(const e of r)for(const t of e)t.callData&&n.push(t.callData);const o=yield function(e,t,r){return Bs(this,void 0,void 0,(function*(){const n=yield ml(e,t,r),o=new Map;for(const{req:e,resp:t}of n)o.set(e,t);return e.map((e=>({req:e,resp:o.get(e)})))}))}(n,e,t),i=new Map;for(const{req:e,resp:t}of o)i.set(e,null==t?void 0:t.result);return r.map((e=>e.filter((e=>!e.callData||i.get(e.callData))).map(((e,t)=>e.processor(e.callData?i.get(e.callData):null,t)))))}))}function ml(e,t,r){return Bs(this,void 0,void 0,(function*(){let n=[e];e.length>800&&(n=i(e,800));let o=[];const s=n.map((e=>Bs(this,void 0,void 0,(function*(){const n=e.map((e=>[e.to,e.data])),i={data:t.interface.encodeFunctionData("aggregate",[n]),to:r};let s;try{s=yield t.provider.call(i)}catch(n){const i=e.length;if(i>20){const n=Math.floor(i/2),[s,a]=yield Promise.all([ml(e.slice(0,n),t,r),ml(e.slice(n,i),t,r)]);o=[...o,...s,...a]}else{const e="[sendCallReqs] error";console.error(e,n)}}if(void 0===s)throw new Error("Unexpected batch result");const[a,c]=gc.decode(["uint256","bytes[]"],s);if(e.length!==c.length)throw new Error("Unexpected length mismatch");return c.map(((t,r)=>({resp:{result:t},req:e[r]})))}))));return(yield Promise.allSettled(s)).filter((e=>"fulfilled"===e.status)).forEach((({value:e})=>{o=[...o,...e]})),o}))}function gl(e,t,r,n){if(!function(e){try{return Ms(e)}catch(e){return!1}}(e)||e===ea)throw Error(`Invalid 'address' parameter '${e}'.`);return new q(e,t,function(e,t){return t?function(e,t){return e.getSigner(t).connectUnchecked()}(e,t):e}(r,n))}function yl(){const{provider:e,account:t,chainId:r}=H(),[n,o]=f(!1),i=y((()=>sa[r]),[r]),s=g(((r,n)=>{if(e)return gl(r,n,e,t)}),[e,t]),a=g((e=>{if(!i)return;const{MULTI_CALL:t}=i,r=s(t,ia);return(()=>Bs(this,void 0,void 0,(function*(){if(r){o(!0);try{const[n]=yield pl(r,t,e);return n}catch(e){console.error("Contract: useMultiContract is error",e)}o(!1)}})))()}),[i,s]);return{getContract:s,contractConfig:i,call:a,loading:n}}var bl=[{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isERC20",outputs:[{internalType:"bool",name:"isOk",type:"bool"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"judgeERC20",outputs:[{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"}];function vl(){const{provider:e,account:t}=H(),n=P(),o=Z(Ks);p((()=>{(()=>{Bs(this,void 0,void 0,(function*(){if(!e||!t)return;const o=yield e.getBalance(t);n((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_ETH_BALANCE",payload:e})})))(new r(o.toString()).div(1e18)))}))})()}),[e,t,n,o])}function wl(){const{provider:e,chainId:t}=H(),r=P(),n=g((()=>Bs(this,void 0,void 0,(function*(){if(!e||!t)return;const n=yield e.getBlockNumber();r((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_BLOCK_NUMBER",payload:e})})))(n))}))),[e,t]);return{updateBlockNumber:n}}var xl,El;!function(e){e.All="all",e.Default="default",e.Coingecko="coingecko"}(xl||(xl={})),function(e){e.Loading="Loading",e.Insufficient="ApprovalInsufficient",e.Approving="Approving",e.Sufficient="Sufficient",e.Unchecked="Unchecked"}(El||(El={}));var Al=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Rl=new qi("abstract-provider/5.7.0");class _l extends ya{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class kl{constructor(){Rl.checkAbstract(new.target,kl),la(this,"_isProvider",!0)}getFeeData(){return Al(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield da({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,o=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,o=ne.from("1500000000"),n=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:o,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}const Sl=new qi("networks/5.7.1");function Nl(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const o=["ropsten"],i=new t.AnkrProvider(e,r.ankr);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let o=1;return null!=r.quorum?o=r.quorum:"homestead"===e&&(o=2),new t.FallbackProvider(n,o)}return n[0]};return t.renetwork=function(e){return Nl(e)},t}function Ml(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return Ml(e,t)},r}const Tl={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Nl("homestead")},Ol={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Nl("ropsten")},Il={chainId:63,name:"classicMordor",_defaultProvider:Ml("https://www.ethercluster.com/mordor","classicMordor")},Fl={unspecified:{chainId:0,name:"unspecified"},homestead:Tl,mainnet:Tl,morden:{chainId:2,name:"morden"},ropsten:Ol,testnet:Ol,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Nl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Nl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Nl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Nl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Ml("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Il,classicTestnet:Il,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ml("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Nl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Nl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};class Wl{constructor(e){la(this,"alphabet",e),la(this,"base",e.length),la(this,"_alphabetMap",{}),la(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=ns(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let o=n;for(let e=0;e<t.length;++e)o+=t[e]*this.base,t[e]=255&o,o>>=8;for(;o>0;)t.push(255&o),o>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return ns(new Uint8Array(t.reverse()))}}new Wl("abcdefghijklmnopqrstuvwxyz234567");const Cl=new Wl("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var jl={},Ul={},Dl=Bl;function Bl(e,t){if(!e)throw new Error(t||"Assertion failed")}Bl.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Vl,Pl={exports:{}},Zl={exports:{}};!function(e){try{var t=require("util");if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=(Vl||(Vl=1,"function"==typeof Object.create?Zl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Zl.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),Zl.exports)}}(Pl);var zl=Dl,Ll=Pl.exports;function Hl(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function Yl(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function Xl(e){return 1===e.length?"0"+e:e}function Jl(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Ul.inherits=Ll,Ul.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)r.push(parseInt(e[o]+e[o+1],16))}else for(var n=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=63&i|128):Hl(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(o=0;o<e.length;o++)r[o]=0|e[o];return r},Ul.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=Xl(e[r].toString(16));return t},Ul.htonl=Yl,Ul.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var o=e[n];"little"===t&&(o=Yl(o)),r+=Jl(o.toString(16))}return r},Ul.zero2=Xl,Ul.zero8=Jl,Ul.join32=function(e,t,r,n){var o=r-t;zl(o%4==0);for(var i=new Array(o/4),s=0,a=t;s<i.length;s++,a+=4){var c;c="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],i[s]=c>>>0}return i},Ul.split32=function(e,t){for(var r=new Array(4*e.length),n=0,o=0;n<e.length;n++,o+=4){var i=e[n];"big"===t?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=255&i):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=255&i)}return r},Ul.rotr32=function(e,t){return e>>>t|e<<32-t},Ul.rotl32=function(e,t){return e<<t|e>>>32-t},Ul.sum32=function(e,t){return e+t>>>0},Ul.sum32_3=function(e,t,r){return e+t+r>>>0},Ul.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},Ul.sum32_5=function(e,t,r,n,o){return e+t+r+n+o>>>0},Ul.sum64=function(e,t,r,n){var o=e[t],i=n+e[t+1]>>>0,s=(i<n?1:0)+r+o;e[t]=s>>>0,e[t+1]=i},Ul.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},Ul.sum64_lo=function(e,t,r,n){return t+n>>>0},Ul.sum64_4_hi=function(e,t,r,n,o,i,s,a){var c=0,l=t;return c+=(l=l+n>>>0)<t?1:0,c+=(l=l+i>>>0)<i?1:0,e+r+o+s+(c+=(l=l+a>>>0)<a?1:0)>>>0},Ul.sum64_4_lo=function(e,t,r,n,o,i,s,a){return t+n+i+a>>>0},Ul.sum64_5_hi=function(e,t,r,n,o,i,s,a,c,l){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+i>>>0)<i?1:0,u+=(d=d+a>>>0)<a?1:0,e+r+o+s+c+(u+=(d=d+l>>>0)<l?1:0)>>>0},Ul.sum64_5_lo=function(e,t,r,n,o,i,s,a,c,l){return t+n+i+a+l>>>0},Ul.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},Ul.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},Ul.shr64_hi=function(e,t,r){return e>>>r},Ul.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var Gl={},ql=Ul,Kl=Dl;function Ql(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Gl.BlockHash=Ql,Ql.prototype.update=function(e,t){if(e=ql.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=ql.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},Ql.prototype.digest=function(e){return this.update(this._pad()),Kl(null===this.pending),this._digest(e)},Ql.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var o=1;o<r;o++)n[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=e>>>24&255,n[o++]=e>>>16&255,n[o++]=e>>>8&255,n[o++]=255&e}else for(n[o++]=255&e,n[o++]=e>>>8&255,n[o++]=e>>>16&255,n[o++]=e>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,i=8;i<this.padLength;i++)n[o++]=0;return n};var $l={},eu={},tu=Ul.rotr32;function ru(e,t,r){return e&t^~e&r}function nu(e,t,r){return e&t^e&r^t&r}function ou(e,t,r){return e^t^r}eu.ft_1=function(e,t,r,n){return 0===e?ru(t,r,n):1===e||3===e?ou(t,r,n):2===e?nu(t,r,n):void 0},eu.ch32=ru,eu.maj32=nu,eu.p32=ou,eu.s0_256=function(e){return tu(e,2)^tu(e,13)^tu(e,22)},eu.s1_256=function(e){return tu(e,6)^tu(e,11)^tu(e,25)},eu.g0_256=function(e){return tu(e,7)^tu(e,18)^e>>>3},eu.g1_256=function(e){return tu(e,17)^tu(e,19)^e>>>10};var iu=Ul,su=Gl,au=eu,cu=iu.rotl32,lu=iu.sum32,uu=iu.sum32_5,du=au.ft_1,hu=su.BlockHash,fu=[1518500249,1859775393,2400959708,3395469782];function pu(){if(!(this instanceof pu))return new pu;hu.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}iu.inherits(pu,hu);var mu=pu;pu.blockSize=512,pu.outSize=160,pu.hmacStrength=80,pu.padLength=64,pu.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=cu(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4];for(n=0;n<r.length;n++){var l=~~(n/20),u=uu(cu(o,5),du(l,i,s,a),c,r[n],fu[l]);c=a,a=s,s=cu(i,30),i=o,o=u}this.h[0]=lu(this.h[0],o),this.h[1]=lu(this.h[1],i),this.h[2]=lu(this.h[2],s),this.h[3]=lu(this.h[3],a),this.h[4]=lu(this.h[4],c)},pu.prototype._digest=function(e){return"hex"===e?iu.toHex32(this.h,"big"):iu.split32(this.h,"big")};var gu=Ul,yu=Gl,bu=eu,vu=Dl,wu=gu.sum32,xu=gu.sum32_4,Eu=gu.sum32_5,Au=bu.ch32,Ru=bu.maj32,_u=bu.s0_256,ku=bu.s1_256,Su=bu.g0_256,Nu=bu.g1_256,Mu=yu.BlockHash,Tu=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Ou(){if(!(this instanceof Ou))return new Ou;Mu.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Tu,this.W=new Array(64)}gu.inherits(Ou,Mu);var Iu=Ou;Ou.blockSize=512,Ou.outSize=256,Ou.hmacStrength=192,Ou.padLength=64,Ou.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=xu(Nu(r[n-2]),r[n-7],Su(r[n-15]),r[n-16]);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],l=this.h[5],u=this.h[6],d=this.h[7];for(vu(this.k.length===r.length),n=0;n<r.length;n++){var h=Eu(d,ku(c),Au(c,l,u),this.k[n],r[n]),f=wu(_u(o),Ru(o,i,s));d=u,u=l,l=c,c=wu(a,h),a=s,s=i,i=o,o=wu(h,f)}this.h[0]=wu(this.h[0],o),this.h[1]=wu(this.h[1],i),this.h[2]=wu(this.h[2],s),this.h[3]=wu(this.h[3],a),this.h[4]=wu(this.h[4],c),this.h[5]=wu(this.h[5],l),this.h[6]=wu(this.h[6],u),this.h[7]=wu(this.h[7],d)},Ou.prototype._digest=function(e){return"hex"===e?gu.toHex32(this.h,"big"):gu.split32(this.h,"big")};var Fu=Ul,Wu=Iu;function Cu(){if(!(this instanceof Cu))return new Cu;Wu.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Fu.inherits(Cu,Wu);var ju=Cu;Cu.blockSize=512,Cu.outSize=224,Cu.hmacStrength=192,Cu.padLength=64,Cu.prototype._digest=function(e){return"hex"===e?Fu.toHex32(this.h.slice(0,7),"big"):Fu.split32(this.h.slice(0,7),"big")};var Uu=Ul,Du=Gl,Bu=Dl,Vu=Uu.rotr64_hi,Pu=Uu.rotr64_lo,Zu=Uu.shr64_hi,zu=Uu.shr64_lo,Lu=Uu.sum64,Hu=Uu.sum64_hi,Yu=Uu.sum64_lo,Xu=Uu.sum64_4_hi,Ju=Uu.sum64_4_lo,Gu=Uu.sum64_5_hi,qu=Uu.sum64_5_lo,Ku=Du.BlockHash,Qu=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function $u(){if(!(this instanceof $u))return new $u;Ku.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Qu,this.W=new Array(160)}Uu.inherits($u,Ku);var ed=$u;function td(e,t,r,n,o){var i=e&r^~e&o;return i<0&&(i+=4294967296),i}function rd(e,t,r,n,o,i){var s=t&n^~t&i;return s<0&&(s+=4294967296),s}function nd(e,t,r,n,o){var i=e&r^e&o^r&o;return i<0&&(i+=4294967296),i}function od(e,t,r,n,o,i){var s=t&n^t&i^n&i;return s<0&&(s+=4294967296),s}function id(e,t){var r=Vu(e,t,28)^Vu(t,e,2)^Vu(t,e,7);return r<0&&(r+=4294967296),r}function sd(e,t){var r=Pu(e,t,28)^Pu(t,e,2)^Pu(t,e,7);return r<0&&(r+=4294967296),r}function ad(e,t){var r=Vu(e,t,14)^Vu(e,t,18)^Vu(t,e,9);return r<0&&(r+=4294967296),r}function cd(e,t){var r=Pu(e,t,14)^Pu(e,t,18)^Pu(t,e,9);return r<0&&(r+=4294967296),r}function ld(e,t){var r=Vu(e,t,1)^Vu(e,t,8)^Zu(e,t,7);return r<0&&(r+=4294967296),r}function ud(e,t){var r=Pu(e,t,1)^Pu(e,t,8)^zu(e,t,7);return r<0&&(r+=4294967296),r}function dd(e,t){var r=Vu(e,t,19)^Vu(t,e,29)^Zu(e,t,6);return r<0&&(r+=4294967296),r}function hd(e,t){var r=Pu(e,t,19)^Pu(t,e,29)^zu(e,t,6);return r<0&&(r+=4294967296),r}$u.blockSize=1024,$u.outSize=512,$u.hmacStrength=192,$u.padLength=128,$u.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var o=dd(r[n-4],r[n-3]),i=hd(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],c=ld(r[n-30],r[n-29]),l=ud(r[n-30],r[n-29]),u=r[n-32],d=r[n-31];r[n]=Xu(o,i,s,a,c,l,u,d),r[n+1]=Ju(o,i,s,a,c,l,u,d)}},$u.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],o=this.h[1],i=this.h[2],s=this.h[3],a=this.h[4],c=this.h[5],l=this.h[6],u=this.h[7],d=this.h[8],h=this.h[9],f=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],y=this.h[14],b=this.h[15];Bu(this.k.length===r.length);for(var v=0;v<r.length;v+=2){var w=y,x=b,E=ad(d,h),A=cd(d,h),R=td(d,h,f,p,m),_=rd(d,h,f,p,m,g),k=this.k[v],S=this.k[v+1],N=r[v],M=r[v+1],T=Gu(w,x,E,A,R,_,k,S,N,M),O=qu(w,x,E,A,R,_,k,S,N,M);w=id(n,o),x=sd(n,o),E=nd(n,o,i,s,a),A=od(n,o,i,s,a,c);var I=Hu(w,x,E,A),F=Yu(w,x,E,A);y=m,b=g,m=f,g=p,f=d,p=h,d=Hu(l,u,T,O),h=Yu(u,u,T,O),l=a,u=c,a=i,c=s,i=n,s=o,n=Hu(T,O,I,F),o=Yu(T,O,I,F)}Lu(this.h,0,n,o),Lu(this.h,2,i,s),Lu(this.h,4,a,c),Lu(this.h,6,l,u),Lu(this.h,8,d,h),Lu(this.h,10,f,p),Lu(this.h,12,m,g),Lu(this.h,14,y,b)},$u.prototype._digest=function(e){return"hex"===e?Uu.toHex32(this.h,"big"):Uu.split32(this.h,"big")};var fd=Ul,pd=ed;function md(){if(!(this instanceof md))return new md;pd.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}fd.inherits(md,pd);var gd=md;md.blockSize=1024,md.outSize=384,md.hmacStrength=192,md.padLength=128,md.prototype._digest=function(e){return"hex"===e?fd.toHex32(this.h.slice(0,12),"big"):fd.split32(this.h.slice(0,12),"big")},$l.sha1=mu,$l.sha224=ju,$l.sha256=Iu,$l.sha384=gd,$l.sha512=ed;var yd={},bd=Ul,vd=Gl,wd=bd.rotl32,xd=bd.sum32,Ed=bd.sum32_3,Ad=bd.sum32_4,Rd=vd.BlockHash;function _d(){if(!(this instanceof _d))return new _d;Rd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function kd(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function Sd(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Nd(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}bd.inherits(_d,Rd),yd.ripemd160=_d,_d.blockSize=512,_d.outSize=160,_d.hmacStrength=192,_d.padLength=64,_d.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],o=this.h[2],i=this.h[3],s=this.h[4],a=r,c=n,l=o,u=i,d=s,h=0;h<80;h++){var f=xd(wd(Ad(r,kd(h,n,o,i),e[Md[h]+t],Sd(h)),Od[h]),s);r=s,s=i,i=wd(o,10),o=n,n=f,f=xd(wd(Ad(a,kd(79-h,c,l,u),e[Td[h]+t],Nd(h)),Id[h]),d),a=d,d=u,u=wd(l,10),l=c,c=f}f=Ed(this.h[1],o,u),this.h[1]=Ed(this.h[2],i,d),this.h[2]=Ed(this.h[3],s,a),this.h[3]=Ed(this.h[4],r,c),this.h[4]=Ed(this.h[0],n,l),this.h[0]=f},_d.prototype._digest=function(e){return"hex"===e?bd.toHex32(this.h,"little"):bd.split32(this.h,"little")};var Md=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Td=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Od=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Id=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Fd=Ul,Wd=Dl;function Cd(e,t,r){if(!(this instanceof Cd))return new Cd(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Fd.toArray(t,r))}var jd=Cd;Cd.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Wd(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},Cd.prototype.update=function(e,t){return this.inner.update(e,t),this},Cd.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=jl;t.utils=Ul,t.common=Gl,t.sha=$l,t.ripemd=yd,t.hmac=jd,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}();var Ud=jl;function Dd(e){return"0x"+Ud.sha256().update(ns(e)).digest("hex")}new qi("sha2/5.7.0");var Bd=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};function Vd(e,t){return Bd(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach(((e,t)=>{i[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{i[e.toLowerCase()]=n.headers.get(e)})),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ns(new Uint8Array(o))}}))}var Pd=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Zd=new qi("web/5.7.1");function zd(e){return new Promise((t=>{setTimeout(t,e)}))}function Ld(e,t){if(null==e)return null;if("string"==typeof e)return e;if(es(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return uc(e)}catch(e){}return as(e)}return e}function Hd(e,t,r){let n=null;if(null!=t){n=lc(t);const r="string"==typeof e?{url:e}:ha(e);if(r.headers){const e=0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length;e||(r.headers=ha(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return function(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;Zd.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const o="object"==typeof e?e.throttleCallback:null,i="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;Zd.assertArgument(i>0&&i%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const s="object"==typeof e&&!!e.errorPassThrough,a={};let c=null;const l={method:"GET"};let u=!1,d=12e4;if("string"==typeof e)c=e;else if("object"==typeof e){if(null!=e&&null!=e.url||Zd.throwArgumentError("missing URL","connection.url",e),c=e.url,"number"==typeof e.timeout&&e.timeout>0&&(d=e.timeout),e.headers)for(const t in e.headers)a[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(u=!0);if(l.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==c.substring(0,6)&&!0!==e.allowInsecureAuthentication&&Zd.throwError("basic authentication requires a secure https url",qi.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+vc(lc(t))}}null!=e.skipFetchSetup&&(l.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(l.fetchOptions=ha(e.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),f=c?c.match(h):null;if(f)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":f[1]||"text/plain"},body:f[2]?bc(f[3]):(p=f[3],lc(p.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){Zd.throwError("processing response error",qi.errors.SERVER_ERROR,{body:Ld(f[1],f[2]),error:e,requestBody:null,requestMethod:"GET",url:c})}var p;t&&(l.method="POST",l.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));const m={};Object.keys(a).forEach((e=>{const t=a[e];m[t.key]=t.value})),l.headers=m;const g=function(){let e=null;return{promise:new Promise((function(t,r){d&&(e=setTimeout((()=>{null!=e&&(e=null,r(Zd.makeError("timeout",qi.errors.TIMEOUT,{requestBody:Ld(l.body,m["content-type"]),requestMethod:l.method,timeout:d,url:c})))}),d))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),y=function(){return Pd(this,void 0,void 0,(function*(){for(let e=0;e<n;e++){let t=null;try{if(t=yield Vd(c,l),e<n)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===l.method&&e.match(/^https:/)){c=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(o&&(r=yield o(e,c)),r){let r=0;const n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):i*parseInt(String(Math.random()*Math.pow(2,e))),yield zd(r);continue}}}catch(e){t=e.response,null==t&&(g.cancel(),Zd.throwError("missing response",qi.errors.SERVER_ERROR,{requestBody:Ld(l.body,m["content-type"]),requestMethod:l.method,serverError:e,url:c}))}let a=t.body;if(u&&304===t.statusCode?a=null:!s&&(t.statusCode<200||t.statusCode>=300)&&(g.cancel(),Zd.throwError("bad response",qi.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:Ld(a,t.headers?t.headers["content-type"]:null),requestBody:Ld(l.body,m["content-type"]),requestMethod:l.method,url:c})),r)try{const e=yield r(a,t);return g.cancel(),e}catch(r){if(r.throttleRetry&&e<n){let t=!0;if(o&&(t=yield o(e,c)),t){const t=i*parseInt(String(Math.random()*Math.pow(2,e)));yield zd(t);continue}}g.cancel(),Zd.throwError("processing response error",qi.errors.SERVER_ERROR,{body:Ld(a,t.headers?t.headers["content-type"]:null),error:r,requestBody:Ld(l.body,m["content-type"]),requestMethod:l.method,url:c})}return g.cancel(),a}return Zd.throwError("failed response",qi.errors.SERVER_ERROR,{requestBody:Ld(l.body,m["content-type"]),requestMethod:l.method,url:c})}))}();return Promise.race([g.promise,y])}(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(uc(e))}catch(t){Zd.throwError("invalid JSON",qi.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function Yd(e,t){return t||(t={}),null==(t=ha(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let o=null,i=!1;const s=()=>!i&&(i=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout((()=>{s()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let c=0;!function o(){return e().then((function(e){if(void 0!==e)s()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!i){if(c++,c>a)return void(s()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(o,e)}return null}),(function(e){s()&&n(e)}))}()}))}for(var Xd="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Jd={},Gd=0;Gd<Xd.length;Gd++){var qd=Xd.charAt(Gd);if(void 0!==Jd[qd])throw new TypeError(qd+" is ambiguous");Jd[qd]=Gd}function Kd(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function Qd(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=Kd(t)^n>>5}for(t=Kd(t),r=0;r<e.length;++r){var o=e.charCodeAt(r);t=Kd(t)^31&o}return t}function $d(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)return"Data too short";var a=Qd(i);if("string"==typeof a)return a;for(var c=[],l=0;l<s.length;++l){var u=s.charAt(l),d=Jd[u];if(void 0===d)return"Unknown character "+u;a=Kd(a)^d,l+6>=s.length||c.push(d)}return 1!==a?"Invalid checksum for "+e:{prefix:i,words:c}}function eh(e,t,r,n){for(var o=0,i=0,s=(1<<r)-1,a=[],c=0;c<e.length;++c)for(o=o<<t|e[c],i+=t;i>=r;)i-=r,a.push(o>>i&s);if(n)i>0&&a.push(o<<r-i&s);else{if(i>=t)return"Excess padding";if(o<<r-i&s)return"Non-zero padding"}return a}var th={decodeUnsafe:function(){var e=$d.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=$d.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var n=Qd(e=e.toLowerCase());if("string"==typeof n)throw new Error(n);for(var o=e+"1",i=0;i<t.length;++i){var s=t[i];if(s>>5!=0)throw new Error("Non 5-bit word");n=Kd(n)^s,o+=Xd.charAt(s)}for(i=0;i<6;++i)n=Kd(n);for(n^=1,i=0;i<6;++i){o+=Xd.charAt(n>>5*(5-i)&31)}return o},toWordsUnsafe:function(e){var t=eh(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=eh(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=eh(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=eh(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}};const rh="providers/5.7.2";var nh={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,n,o){for(var i=0,s=0,a=Math.min(e.length,n),c=t;c<a;c++){var l=e.charCodeAt(c)-48;i*=o,s=l>=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&s<o,"Invalid character"),i+=s}return i}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,n):(this._parseBase(e,t,o),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=e.length-1,i=0;o>=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<e.length;o+=3)s=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,i=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=t)n++;n--,o=o/t|0;for(var i=e.length-r,s=i%n,a=Math.min(i,i-s)+r,l=0,u=r;u<a;u+=n)l=c(e,u,u+n,t),this.imuln(o),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var d=1;for(l=c(e,u,e.length,t),u=0;u<s;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){l(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){o.prototype.inspect=u}else o.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var o=0|e.words[0],i=0|t.words[0],s=o*i,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var u=c>>>26,d=67108863&c,h=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=h;f++){var p=l-f|0;u+=(s=(o=0|e.words[p])*(i=0|t.words[f])+d)/67108864|0,d=67108863&s}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<o|i)).toString(16);i=a>>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==i||s!==this.length-1?d[6-c.length]+c+n:c+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],u=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(u).toString(e);n=(p=p.idivn(u)).isZero()?m+n:d[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===i?(r<e.length&&(e[r++]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===i?(r>=0&&(e[r--]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var o=0,i=0;i<n.length;i++)t=(0|r.words[i])+(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<r.length;i++)t=(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)i=(t=(0|r.words[s])-(0|n.words[s])+i)>>26,this.words[s]=67108863&t;for(;0!==i&&s<r.length;s++)i=(t=(0|r.words[s])+i)>>26,this.words[s]=67108863&t;if(0===i&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,o,i,s=e.words,a=t.words,c=r.words,l=0,u=0|s[0],d=8191&u,h=u>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,x=v>>>13,E=0|s[4],A=8191&E,R=E>>>13,_=0|s[5],k=8191&_,S=_>>>13,N=0|s[6],M=8191&N,T=N>>>13,O=0|s[7],I=8191&O,F=O>>>13,W=0|s[8],C=8191&W,j=W>>>13,U=0|s[9],D=8191&U,B=U>>>13,V=0|a[0],P=8191&V,Z=V>>>13,z=0|a[1],L=8191&z,H=z>>>13,Y=0|a[2],X=8191&Y,J=Y>>>13,G=0|a[3],q=8191&G,K=G>>>13,Q=0|a[4],$=8191&Q,ee=Q>>>13,te=0|a[5],re=8191&te,ne=te>>>13,oe=0|a[6],ie=8191&oe,se=oe>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],de=8191&ue,he=ue>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,P))|0)+((8191&(o=(o=Math.imul(d,Z))+Math.imul(h,P)|0))<<13)|0;l=((i=Math.imul(h,Z))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,P),o=(o=Math.imul(p,Z))+Math.imul(m,P)|0,i=Math.imul(m,Z);var ye=(l+(n=n+Math.imul(d,L)|0)|0)+((8191&(o=(o=o+Math.imul(d,H)|0)+Math.imul(h,L)|0))<<13)|0;l=((i=i+Math.imul(h,H)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,P),o=(o=Math.imul(y,Z))+Math.imul(b,P)|0,i=Math.imul(b,Z),n=n+Math.imul(p,L)|0,o=(o=o+Math.imul(p,H)|0)+Math.imul(m,L)|0,i=i+Math.imul(m,H)|0;var be=(l+(n=n+Math.imul(d,X)|0)|0)+((8191&(o=(o=o+Math.imul(d,J)|0)+Math.imul(h,X)|0))<<13)|0;l=((i=i+Math.imul(h,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,P),o=(o=Math.imul(w,Z))+Math.imul(x,P)|0,i=Math.imul(x,Z),n=n+Math.imul(y,L)|0,o=(o=o+Math.imul(y,H)|0)+Math.imul(b,L)|0,i=i+Math.imul(b,H)|0,n=n+Math.imul(p,X)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,J)|0;var ve=(l+(n=n+Math.imul(d,q)|0)|0)+((8191&(o=(o=o+Math.imul(d,K)|0)+Math.imul(h,q)|0))<<13)|0;l=((i=i+Math.imul(h,K)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,P),o=(o=Math.imul(A,Z))+Math.imul(R,P)|0,i=Math.imul(R,Z),n=n+Math.imul(w,L)|0,o=(o=o+Math.imul(w,H)|0)+Math.imul(x,L)|0,i=i+Math.imul(x,H)|0,n=n+Math.imul(y,X)|0,o=(o=o+Math.imul(y,J)|0)+Math.imul(b,X)|0,i=i+Math.imul(b,J)|0,n=n+Math.imul(p,q)|0,o=(o=o+Math.imul(p,K)|0)+Math.imul(m,q)|0,i=i+Math.imul(m,K)|0;var we=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(h,$)|0))<<13)|0;l=((i=i+Math.imul(h,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,P),o=(o=Math.imul(k,Z))+Math.imul(S,P)|0,i=Math.imul(S,Z),n=n+Math.imul(A,L)|0,o=(o=o+Math.imul(A,H)|0)+Math.imul(R,L)|0,i=i+Math.imul(R,H)|0,n=n+Math.imul(w,X)|0,o=(o=o+Math.imul(w,J)|0)+Math.imul(x,X)|0,i=i+Math.imul(x,J)|0,n=n+Math.imul(y,q)|0,o=(o=o+Math.imul(y,K)|0)+Math.imul(b,q)|0,i=i+Math.imul(b,K)|0,n=n+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(h,re)|0))<<13)|0;l=((i=i+Math.imul(h,ne)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(M,P),o=(o=Math.imul(M,Z))+Math.imul(T,P)|0,i=Math.imul(T,Z),n=n+Math.imul(k,L)|0,o=(o=o+Math.imul(k,H)|0)+Math.imul(S,L)|0,i=i+Math.imul(S,H)|0,n=n+Math.imul(A,X)|0,o=(o=o+Math.imul(A,J)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,J)|0,n=n+Math.imul(w,q)|0,o=(o=o+Math.imul(w,K)|0)+Math.imul(x,q)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(y,$)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,o=(o=o+Math.imul(p,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var Ee=(l+(n=n+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,se)|0)+Math.imul(h,ie)|0))<<13)|0;l=((i=i+Math.imul(h,se)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(I,P),o=(o=Math.imul(I,Z))+Math.imul(F,P)|0,i=Math.imul(F,Z),n=n+Math.imul(M,L)|0,o=(o=o+Math.imul(M,H)|0)+Math.imul(T,L)|0,i=i+Math.imul(T,H)|0,n=n+Math.imul(k,X)|0,o=(o=o+Math.imul(k,J)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,J)|0,n=n+Math.imul(A,q)|0,o=(o=o+Math.imul(A,K)|0)+Math.imul(R,q)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(y,re)|0,o=(o=o+Math.imul(y,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0,n=n+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,se)|0;var Ae=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(o=(o=o+Math.imul(d,le)|0)+Math.imul(h,ce)|0))<<13)|0;l=((i=i+Math.imul(h,le)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(C,P),o=(o=Math.imul(C,Z))+Math.imul(j,P)|0,i=Math.imul(j,Z),n=n+Math.imul(I,L)|0,o=(o=o+Math.imul(I,H)|0)+Math.imul(F,L)|0,i=i+Math.imul(F,H)|0,n=n+Math.imul(M,X)|0,o=(o=o+Math.imul(M,J)|0)+Math.imul(T,X)|0,i=i+Math.imul(T,J)|0,n=n+Math.imul(k,q)|0,o=(o=o+Math.imul(k,K)|0)+Math.imul(S,q)|0,i=i+Math.imul(S,K)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ne)|0)+Math.imul(x,re)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0,n=n+Math.imul(p,ce)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(m,ce)|0,i=i+Math.imul(m,le)|0;var Re=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;l=((i=i+Math.imul(h,he)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(D,P),o=(o=Math.imul(D,Z))+Math.imul(B,P)|0,i=Math.imul(B,Z),n=n+Math.imul(C,L)|0,o=(o=o+Math.imul(C,H)|0)+Math.imul(j,L)|0,i=i+Math.imul(j,H)|0,n=n+Math.imul(I,X)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(F,X)|0,i=i+Math.imul(F,J)|0,n=n+Math.imul(M,q)|0,o=(o=o+Math.imul(M,K)|0)+Math.imul(T,q)|0,i=i+Math.imul(T,K)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,se)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,se)|0,n=n+Math.imul(y,ce)|0,o=(o=o+Math.imul(y,le)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,le)|0,n=n+Math.imul(p,de)|0,o=(o=o+Math.imul(p,he)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,he)|0;var _e=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(h,pe)|0))<<13)|0;l=((i=i+Math.imul(h,me)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,L),o=(o=Math.imul(D,H))+Math.imul(B,L)|0,i=Math.imul(B,H),n=n+Math.imul(C,X)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(j,X)|0,i=i+Math.imul(j,J)|0,n=n+Math.imul(I,q)|0,o=(o=o+Math.imul(I,K)|0)+Math.imul(F,q)|0,i=i+Math.imul(F,K)|0,n=n+Math.imul(M,$)|0,o=(o=o+Math.imul(M,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,se)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,se)|0,n=n+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,le)|0)+Math.imul(x,ce)|0,i=i+Math.imul(x,le)|0,n=n+Math.imul(y,de)|0,o=(o=o+Math.imul(y,he)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,he)|0;var ke=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,X),o=(o=Math.imul(D,J))+Math.imul(B,X)|0,i=Math.imul(B,J),n=n+Math.imul(C,q)|0,o=(o=o+Math.imul(C,K)|0)+Math.imul(j,q)|0,i=i+Math.imul(j,K)|0,n=n+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(F,$)|0,i=i+Math.imul(F,ee)|0,n=n+Math.imul(M,re)|0,o=(o=o+Math.imul(M,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(k,ie)|0,o=(o=o+Math.imul(k,se)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,se)|0,n=n+Math.imul(A,ce)|0,o=(o=o+Math.imul(A,le)|0)+Math.imul(R,ce)|0,i=i+Math.imul(R,le)|0,n=n+Math.imul(w,de)|0,o=(o=o+Math.imul(w,he)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,he)|0;var Se=(l+(n=n+Math.imul(y,pe)|0)|0)+((8191&(o=(o=o+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;l=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,q),o=(o=Math.imul(D,K))+Math.imul(B,q)|0,i=Math.imul(B,K),n=n+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(j,$)|0,i=i+Math.imul(j,ee)|0,n=n+Math.imul(I,re)|0,o=(o=o+Math.imul(I,ne)|0)+Math.imul(F,re)|0,i=i+Math.imul(F,ne)|0,n=n+Math.imul(M,ie)|0,o=(o=o+Math.imul(M,se)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,se)|0,n=n+Math.imul(k,ce)|0,o=(o=o+Math.imul(k,le)|0)+Math.imul(S,ce)|0,i=i+Math.imul(S,le)|0,n=n+Math.imul(A,de)|0,o=(o=o+Math.imul(A,he)|0)+Math.imul(R,de)|0,i=i+Math.imul(R,he)|0;var Ne=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((i=i+Math.imul(x,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,$),o=(o=Math.imul(D,ee))+Math.imul(B,$)|0,i=Math.imul(B,ee),n=n+Math.imul(C,re)|0,o=(o=o+Math.imul(C,ne)|0)+Math.imul(j,re)|0,i=i+Math.imul(j,ne)|0,n=n+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(F,ie)|0,i=i+Math.imul(F,se)|0,n=n+Math.imul(M,ce)|0,o=(o=o+Math.imul(M,le)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,le)|0,n=n+Math.imul(k,de)|0,o=(o=o+Math.imul(k,he)|0)+Math.imul(S,de)|0,i=i+Math.imul(S,he)|0;var Me=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((i=i+Math.imul(R,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,re),o=(o=Math.imul(D,ne))+Math.imul(B,re)|0,i=Math.imul(B,ne),n=n+Math.imul(C,ie)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(j,ie)|0,i=i+Math.imul(j,se)|0,n=n+Math.imul(I,ce)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(F,ce)|0,i=i+Math.imul(F,le)|0,n=n+Math.imul(M,de)|0,o=(o=o+Math.imul(M,he)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,he)|0;var Te=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(o=(o=o+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;l=((i=i+Math.imul(S,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,ie),o=(o=Math.imul(D,se))+Math.imul(B,ie)|0,i=Math.imul(B,se),n=n+Math.imul(C,ce)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(j,ce)|0,i=i+Math.imul(j,le)|0,n=n+Math.imul(I,de)|0,o=(o=o+Math.imul(I,he)|0)+Math.imul(F,de)|0,i=i+Math.imul(F,he)|0;var Oe=(l+(n=n+Math.imul(M,pe)|0)|0)+((8191&(o=(o=o+Math.imul(M,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((i=i+Math.imul(T,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,ce),o=(o=Math.imul(D,le))+Math.imul(B,ce)|0,i=Math.imul(B,le),n=n+Math.imul(C,de)|0,o=(o=o+Math.imul(C,he)|0)+Math.imul(j,de)|0,i=i+Math.imul(j,he)|0;var Ie=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,me)|0)+Math.imul(F,pe)|0))<<13)|0;l=((i=i+Math.imul(F,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,de),o=(o=Math.imul(D,he))+Math.imul(B,de)|0,i=Math.imul(B,he);var Fe=(l+(n=n+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,me)|0)+Math.imul(j,pe)|0))<<13)|0;l=((i=i+Math.imul(j,me)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863;var We=(l+(n=Math.imul(D,pe))|0)+((8191&(o=(o=Math.imul(D,me))+Math.imul(B,pe)|0))<<13)|0;return l=((i=Math.imul(B,me))+(o>>>13)|0)+(We>>>26)|0,We&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=Ee,c[7]=Ae,c[8]=Re,c[9]=_e,c[10]=ke,c[11]=Se,c[12]=Ne,c[13]=Me,c[14]=Te,c[15]=Oe,c[16]=Ie,c[17]=Fe,c[18]=We,0!==l&&(c[19]=l,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,i=0;i<r.length-1;i++){var s=o;o=0;for(var a=67108863&n,c=Math.min(i,t.length-1),l=Math.max(0,i-e.length+1);l<=c;l++){var u=i-l,d=(0|e.words[u])*(0|t.words[l]),h=67108863&d;a=67108863&(h=h+a|0),o+=(s=(s=s+(d/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[i]=a,n=s,s=o}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?g(this,e,t):y(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,s=(67108863&i)+(67108863&n);n>>=26,n+=i/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,o=r%26;t[r]=e.words[n]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&i,c=(0|this.words[t])-a<<n;this.words[t]=c|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,c=n;if(o-=s,o=Math.max(0,o),c){for(var l=0;l<s;l++)c.words[l]=this.words[l];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=o);l--){var d=0|this.words[l];this.words[l]=u<<26-i|d>>>i,u=d&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<<t;return!(this.length<=n||!(this.words[n]&o))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var o,i,s=e.length+n;this._expand(s);var a=0;for(o=0;o<e.length;o++){i=(0|this.words[o+n])+a;var c=(0|e.words[o])*t;a=((i-=67108863&c)>>26)-(c/67108864|0),this.words[o+n]=67108863&i}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this._strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=n.clone()._ishlnsubmul(i,1,c);0===u.negative&&(n=u,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var h=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,d);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=h)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;0==(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(c)):(n.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:n.iushln(l)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var d=0,h=1;0==(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var o=t.cmp(r);if(o<0){var i=t;t=r,r=i}else if(0===o||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a}return 0!==i&&(this.words[s]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],o=0|e.words[r];if(n!==o){n<o?t=-1:n>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new R(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(w,v),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),o=0;o<n;o++)t.words[o]=e.words[o];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&r,o=10;o<e.length;o++){var s=0|e.words[o];e.words[o-10]=(s&r)<<4|i>>>22,i=s}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(x,v),n(E,v),n(A,v),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,o=67108863&n;n>>>=26,e.words[r]=o,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},R.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},R.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},R.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},R.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},R.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},R.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},R.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},R.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},R.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},R.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},R.prototype.isqr=function(e){return this.imul(e,e.clone())},R.prototype.sqr=function(e){return this.mul(e,e)},R.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(d,new o(1).iushln(p-g-1));h=h.redMul(y),d=y.redSqr(),f=f.redMul(d),p=g}return h},R.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},R.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},n(_,R),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(nh,ce);var oh=nh.exports;function ih(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var sh=ah;function ah(e,t){if(!e)throw new Error(t||"Assertion failed")}ah.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var ch=ih((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var o=e.charCodeAt(n),i=o>>8,s=255&o;i?r.push(i,s):r.push(s)}return r},r.zero2=n,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}})),lh=ih((function(e,t){var r=t;r.assert=sh,r.toArray=ch.toArray,r.zero2=ch.zero2,r.toHex=ch.toHex,r.encode=ch.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<<t+1,i=e.clone(),s=0;s<n.length;s++){var a,c=i.andln(o-1);i.isOdd()?(a=c>(o>>1)-1?(o>>1)-c:c,i.isubn(a)):a=0,n[s]=a,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var s,a,c=e.andln(3)+o&3,l=t.andln(3)+i&3;3===c&&(c=-1),3===l&&(l=-1),s=0==(1&c)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==l?c:-c,r[0].push(s),a=0==(1&l)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==c?l:-l,r[1].push(a),2*o===s+1&&(o=1-o),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new oh(e,"hex","le")}})),uh=lh.getNAF,dh=lh.getJSF,hh=lh.assert;function fh(e,t){this.type=e,this.p=new oh(t.p,16),this.red=t.prime?oh.red(t.prime):oh.mont(this.p),this.zero=new oh(0).toRed(this.red),this.one=new oh(1).toRed(this.red),this.two=new oh(2).toRed(this.red),this.n=t.n&&new oh(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ph=fh;function mh(e,t){this.curve=e,this.type=t,this.precomputed=null}fh.prototype.point=function(){throw new Error("Not implemented")},fh.prototype.validate=function(){throw new Error("Not implemented")},fh.prototype._fixedNafMul=function(e,t){hh(e.precomputed);var r=e._getDoubles(),n=uh(t,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var i,s,a=[];for(i=0;i<n.length;i+=r.step){s=0;for(var c=i+r.step-1;c>=i;c--)s=(s<<1)+n[c];a.push(s)}for(var l=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=o;d>0;d--){for(i=0;i<a.length;i++)(s=a[i])===d?u=u.mixedAdd(r.points[i]):s===-d&&(u=u.mixedAdd(r.points[i].neg()));l=l.add(u)}return l.toP()},fh.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var o=n.points,i=uh(t,r,this._bitLength),s=this.jpoint(null,null,null),a=i.length-1;a>=0;a--){for(var c=0;a>=0&&0===i[a];a--)c++;if(a>=0&&c++,s=s.dblp(c),a<0)break;var l=i[a];hh(0!==l),s="affine"===e.type?l>0?s.mixedAdd(o[l-1>>1]):s.mixedAdd(o[-l-1>>1].neg()):l>0?s.add(o[l-1>>1]):s.add(o[-l-1>>1].neg())}return"affine"===e.type?s.toP():s},fh.prototype._wnafMulAdd=function(e,t,r,n,o){var i,s,a,c=this._wnafT1,l=this._wnafT2,u=this._wnafT3,d=0;for(i=0;i<n;i++){var h=(a=t[i])._getNAFPoints(e);c[i]=h.wnd,l[i]=h.points}for(i=n-1;i>=1;i-=2){var f=i-1,p=i;if(1===c[f]&&1===c[p]){var m=[t[f],null,null,t[p]];0===t[f].y.cmp(t[p].y)?(m[1]=t[f].add(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg())):0===t[f].y.cmp(t[p].y.redNeg())?(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].add(t[p].neg())):(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=dh(r[f],r[p]);for(d=Math.max(y[0].length,d),u[f]=new Array(d),u[p]=new Array(d),s=0;s<d;s++){var b=0|y[0][s],v=0|y[1][s];u[f][s]=g[3*(b+1)+(v+1)],u[p][s]=0,l[f]=m}}else u[f]=uh(r[f],c[f],this._bitLength),u[p]=uh(r[p],c[p],this._bitLength),d=Math.max(u[f].length,d),d=Math.max(u[p].length,d)}var w=this.jpoint(null,null,null),x=this._wnafT4;for(i=d;i>=0;i--){for(var E=0;i>=0;){var A=!0;for(s=0;s<n;s++)x[s]=0|u[s][i],0!==x[s]&&(A=!1);if(!A)break;E++,i--}if(i>=0&&E++,w=w.dblp(E),i<0)break;for(s=0;s<n;s++){var R=x[s];0!==R&&(R>0?a=l[s][R-1>>1]:R<0&&(a=l[s][-R-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(i=0;i<n;i++)l[i]=null;return o?w:w.toP()},fh.BasePoint=mh,mh.prototype.eq=function(){throw new Error("Not implemented")},mh.prototype.validate=function(){return this.curve.validate(this)},fh.prototype.decodePoint=function(e,t){e=lh.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?hh(e[e.length-1]%2==0):7===e[0]&&hh(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},mh.prototype.encodeCompressed=function(e){return this.encode(e,!0)},mh.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},mh.prototype.encode=function(e,t){return lh.encode(this._encode(t),e)},mh.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},mh.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},mh.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)n=n.dbl();r.push(n)}return{step:e,points:r}},mh.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(n);return{wnd:e,points:t}},mh.prototype._getBeta=function(){return null},mh.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var gh=ih((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),yh=lh.assert;function bh(e){ph.call(this,"short",e),this.a=new oh(e.a,16).toRed(this.red),this.b=new oh(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}gh(bh,ph);var vh=bh;function wh(e,t,r,n){ph.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new oh(t,16),this.y=new oh(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function xh(e,t,r,n){ph.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new oh(0)):(this.x=new oh(t,16),this.y=new oh(r,16),this.z=new oh(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}bh.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new oh(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new oh(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],yh(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new oh(e.a,16),b:new oh(e.b,16)}})):this._getEndoBasis(r)}}},bh.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:oh.mont(e),r=new oh(2).toRed(t).redInvm(),n=r.redNeg(),o=new oh(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},bh.prototype._getEndoBasis=function(e){for(var t,r,n,o,i,s,a,c,l,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),f=new oh(1),p=new oh(0),m=new oh(0),g=new oh(1),y=0;0!==d.cmpn(0);){var b=h.div(d);c=h.sub(b.mul(d)),l=m.sub(b.mul(f));var v=g.sub(b.mul(p));if(!n&&c.cmp(u)<0)t=a.neg(),r=f,n=c.neg(),o=l;else if(n&&2==++y)break;a=c,h=d,d=c,m=f,f=l,g=p,p=v}i=c.neg(),s=l;var w=n.sqr().add(o.sqr());return i.sqr().add(s.sqr()).cmp(w)>=0&&(i=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:n,b:o},{a:i,b:s}]},bh.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),s=o.mul(r.a),a=i.mul(n.a),c=o.mul(r.b),l=i.mul(n.b);return{k1:e.sub(s).sub(a),k2:c.add(l).neg()}},bh.prototype.pointFromX=function(e,t){(e=new oh(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},bh.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},bh.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var s=this._endoSplit(t[i]),a=e[i],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*i]=a,n[2*i+1]=c,o[2*i]=s.k1,o[2*i+1]=s.k2}for(var l=this._wnafMulAdd(1,n,o,2*i,r),u=0;u<2*i;u++)n[u]=null,o[u]=null;return l},gh(wh,ph.BasePoint),bh.prototype.point=function(e,t,r){return new wh(this,e,t,r)},bh.prototype.pointFromJSON=function(e,t){return wh.fromJSON(this,e,t)},wh.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},wh.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},wh.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function o(t){return e.point(t[0],t[1],r)}var i=t[2];return n.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[n].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[n].concat(i.naf.points.map(o))}},n},wh.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},wh.prototype.isInfinity=function(){return this.inf},wh.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},wh.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)},wh.prototype.getX=function(){return this.x.fromRed()},wh.prototype.getY=function(){return this.y.fromRed()},wh.prototype.mul=function(e){return e=new oh(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},wh.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},wh.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},wh.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},wh.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},wh.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},gh(xh,ph.BasePoint),bh.prototype.jpoint=function(e,t,r){return new xh(this,e,t,r)},xh.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},xh.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},xh.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),o=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(o),c=i.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),d=n.redMul(l),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),f=c.redMul(d.redISub(h)).redISub(i.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(h,f,p)},xh.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=o.redSub(i);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),u=r.redMul(c),d=a.redSqr().redIAdd(l).redISub(u).redISub(u),h=a.redMul(u.redISub(d)).redISub(o.redMul(l)),f=this.z.redMul(s);return this.curve.jpoint(d,h,f)},xh.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,o=this.curve.tinv,i=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),l=s.redAdd(s);for(t=0;t<e;t++){var u=i.redSqr(),d=l.redSqr(),h=d.redSqr(),f=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(c)),p=i.redMul(d),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(h);var b=l.redMul(a);t+1<e&&(c=c.redMul(h)),i=m,a=b,l=y}return this.curve.jpoint(i,l.redMul(o),a)},xh.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},xh.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),l=i.redIAdd(i);l=(l=l.redIAdd(l)).redIAdd(l),e=c,t=a.redMul(s.redISub(c)).redISub(l),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),h=d.redSqr(),f=this.x.redAdd(d).redSqr().redISub(u).redISub(h);f=f.redIAdd(f);var p=u.redAdd(u).redIAdd(u),m=p.redSqr(),g=h.redIAdd(h);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},xh.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var l=i.redIAdd(i);l=(l=l.redIAdd(l)).redIAdd(l),t=a.redMul(s.redISub(c)).redISub(l),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),h=this.x.redMul(d),f=this.x.redSub(u).redMul(this.x.redAdd(u));f=f.redAdd(f).redIAdd(f);var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},xh.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,o=n.redSqr().redSqr(),i=t.redSqr(),s=r.redSqr(),a=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(o)),c=t.redAdd(t),l=(c=c.redIAdd(c)).redMul(s),u=a.redSqr().redISub(l.redAdd(l)),d=l.redISub(u),h=s.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=a.redMul(d).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,f,p)},xh.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),o=e.redAdd(e).redIAdd(e),i=o.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(i)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var l=o.redIAdd(s).redSqr().redISub(i).redISub(a).redISub(c),u=t.redMul(l);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(a).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var h=this.y.redMul(l.redMul(c.redISub(l)).redISub(s.redMul(a)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(d,h,f)},xh.prototype.mul=function(e,t){return e=new oh(e,t),this.curve._wnafMul(this,e)},xh.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),o=r.redMul(e.z);return 0===this.y.redMul(o).redISub(e.y.redMul(n)).cmpn(0)},xh.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),o=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},xh.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},xh.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Eh=ih((function(e,t){var r=t;r.base=ph,r.short=vh,r.mont=null,r.edwards=null})),Ah=ih((function(e,t){var r,n=t,o=lh.assert;function i(e){"short"===e.type?this.curve=new Eh.short(e):"edwards"===e.type?this.curve=new Eh.edwards(e):this.curve=new Eh.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ud.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ud.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ud.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ud.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ud.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ud.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ud.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ud.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function Rh(e){if(!(this instanceof Rh))return new Rh(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ch.toArray(e.entropy,e.entropyEnc||"hex"),r=ch.toArray(e.nonce,e.nonceEnc||"hex"),n=ch.toArray(e.pers,e.persEnc||"hex");sh(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var _h=Rh;Rh.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Rh.prototype._hmac=function(){return new Ud.hmac(this.hash,this.K)},Rh.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},Rh.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=ch.toArray(e,t),r=ch.toArray(r,n),sh(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Rh.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=ch.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,e);return this._update(r),this._reseed++,ch.encode(i,t)};var kh=lh.assert;function Sh(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var Nh=Sh;Sh.fromPublic=function(e,t,r){return t instanceof Sh?t:new Sh(e,{pub:t,pubEnc:r})},Sh.fromPrivate=function(e,t,r){return t instanceof Sh?t:new Sh(e,{priv:t,privEnc:r})},Sh.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Sh.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},Sh.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Sh.prototype._importPrivate=function(e,t){this.priv=new oh(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},Sh.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?kh(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||kh(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},Sh.prototype.derive=function(e){return e.validate()||kh(e.validate(),"public point not validated"),e.mul(this.priv).getX()},Sh.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},Sh.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Sh.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Mh=lh.assert;function Th(e,t){if(e instanceof Th)return e;this._importDER(e,t)||(Mh(e.r&&e.s,"Signature without r or s"),this.r=new oh(e.r,16),this.s=new oh(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Oh=Th;function Ih(){this.place=0}function Fh(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,s=t.place;i<n;i++,s++)o<<=8,o|=e[s],o>>>=0;return!(o<=127)&&(t.place=s,o)}function Wh(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function Ch(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Th.prototype._importDER=function(e,t){e=lh.toArray(e,t);var r=new Ih;if(48!==e[r.place++])return!1;var n=Fh(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=Fh(e,r);if(!1===o)return!1;var i=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=Fh(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var a=e.slice(r.place,s+r.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new oh(i),this.s=new oh(a),this.recoveryParam=null,!0},Th.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Wh(t),r=Wh(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Ch(n,t.length),(n=n.concat(t)).push(2),Ch(n,r.length);var o=n.concat(r),i=[48];return Ch(i,o.length),i=i.concat(o),lh.encode(i,e)};var jh=function(){throw new Error("unsupported")},Uh=lh.assert;function Dh(e){if(!(this instanceof Dh))return new Dh(e);"string"==typeof e&&(Uh(Object.prototype.hasOwnProperty.call(Ah,e),"Unknown curve "+e),e=Ah[e]),e instanceof Ah.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Bh=Dh;Dh.prototype.keyPair=function(e){return new Nh(this,e)},Dh.prototype.keyFromPrivate=function(e,t){return Nh.fromPrivate(this,e,t)},Dh.prototype.keyFromPublic=function(e,t){return Nh.fromPublic(this,e,t)},Dh.prototype.genKeyPair=function(e){e||(e={});for(var t=new _h({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||jh(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new oh(2));;){var o=new oh(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},Dh.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Dh.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new oh(e,16));for(var o=this.n.byteLength(),i=t.getPrivate().toArray("be",o),s=e.toArray("be",o),a=new _h({hash:this.hash,entropy:i,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new oh(1)),l=0;;l++){var u=n.k?n.k(l):new oh(a.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),f=h.umod(this.n);if(0!==f.cmpn(0)){var p=u.invm(this.n).mul(f.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==h.cmp(f)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new Oh({r:f,s:p,recoveryParam:m})}}}}}},Dh.prototype.verify=function(e,t,r,n){e=this._truncateToN(new oh(e,16)),r=this.keyFromPublic(r,n);var o=(t=new Oh(t,"hex")).r,i=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var s,a=i.invm(this.n),c=a.mul(e).umod(this.n),l=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},Dh.prototype.recoverPubKey=function(e,t,r,n){Uh((3&r)===r,"The recovery param is more than two bits"),t=new Oh(t,n);var o=this.n,i=new oh(e),s=t.r,a=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var u=t.r.invm(o),d=o.sub(i).mul(u).umod(o),h=a.mul(u).umod(o);return this.g.mulAdd(d,s,h)},Dh.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Oh(t,n)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var Vh=ih((function(e,t){var r=t;r.version="6.5.4",r.utils=lh,r.rand=function(){throw new Error("unsupported")},r.curve=Eh,r.curves=Ah,r.ec=Bh,r.eddsa=null})).ec;const Ph=new qi("signing-key/5.7.0");let Zh=null;function zh(){return Zh||(Zh=new Vh("secp256k1")),Zh}class Lh{constructor(e){la(this,"curve","secp256k1"),la(this,"privateKey",as(e)),32!==cs(this.privateKey)&&Ph.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=zh().keyFromPrivate(ns(this.privateKey));la(this,"publicKey","0x"+t.getPublic(!1,"hex")),la(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),la(this,"_isSigningKey",!0)}_addPoint(e){const t=zh().keyFromPublic(ns(this.publicKey)),r=zh().keyFromPublic(ns(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=zh().keyFromPrivate(ns(this.privateKey)),r=ns(e);32!==r.length&&Ph.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return fs({recoveryParam:n.recoveryParam,r:hs("0x"+n.r.toString(16),32),s:hs("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=zh().keyFromPrivate(ns(this.privateKey)),r=zh().keyFromPublic(ns(Hh(e)));return hs("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Hh(e,t){const r=ns(e);if(32===r.length){const e=new Lh(r);return t?"0x"+zh().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?as(r):"0x"+zh().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+zh().keyFromPublic(r).getPublic(!0,"hex"):as(r):Ph.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Yh=new qi("transactions/5.7.0");var Xh;function Jh(e){return"0x"===e?null:Ms(e)}function Gh(e){return"0x"===e?ra:ne.from(e)}function qh(e,t){return function(e){return Ms(ls(gs(ls(Hh(e),1)),12))}(function(e,t){const r=fs(t),n={r:ns(r.r),s:ns(r.s)};return"0x"+zh().recoverPubKey(ns(e),n,r.recoveryParam).encode("hex",!1)}(ns(e),t))}function Kh(e,t){const r=is(ne.from(e).toHexString());return r.length>32&&Yh.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function Qh(e,t){return{address:Ms(e),storageKeys:(t||[]).map(((t,r)=>(32!==cs(t)&&Yh.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function $h(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&Yh.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),Qh(e[0],e[1])):Qh(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return Qh(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function ef(e){return $h(e).map((e=>[e.address,e.storageKeys]))}function tf(e,t){if(null!=e.gasPrice){const t=ne.from(e.gasPrice),r=ne.from(e.maxFeePerGas||0);t.eq(r)||Yh.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[Kh(e.chainId||0,"chainId"),Kh(e.nonce||0,"nonce"),Kh(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Kh(e.maxFeePerGas||0,"maxFeePerGas"),Kh(e.gasLimit||0,"gasLimit"),null!=e.to?Ms(e.to):"0x",Kh(e.value||0,"value"),e.data||"0x",ef(e.accessList||[])];if(t){const e=fs(t);r.push(Kh(e.recoveryParam,"recoveryParam")),r.push(is(e.r)),r.push(is(e.s))}return us(["0x02",xs(r)])}function rf(e,t){const r=[Kh(e.chainId||0,"chainId"),Kh(e.nonce||0,"nonce"),Kh(e.gasPrice||0,"gasPrice"),Kh(e.gasLimit||0,"gasLimit"),null!=e.to?Ms(e.to):"0x",Kh(e.value||0,"value"),e.data||"0x",ef(e.accessList||[])];if(t){const e=fs(t);r.push(Kh(e.recoveryParam,"recoveryParam")),r.push(is(e.r)),r.push(is(e.s))}return us(["0x01",xs(r)])}function nf(e,t,r){try{const r=Gh(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){Yh.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=hs(t[1],32),e.s=hs(t[2],32);try{const t=gs(r(e));e.from=qh(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function of(e){const t=ns(e);if(t[0]>127)return function(e){const t=Rs(e);9!==t.length&&6!==t.length&&Yh.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:Gh(t[0]).toNumber(),gasPrice:Gh(t[1]),gasLimit:Gh(t[2]),to:Jh(t[3]),value:Gh(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=ne.from(t[6]).toNumber()}catch(e){return r}if(r.r=hs(t[7],32),r.s=hs(t[8],32),ne.from(r.r).isZero()&&ne.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push(as(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const i=gs(xs(o));try{r.from=qh(i,{r:as(r.r),s:as(r.s),recoveryParam:n})}catch(e){}r.hash=gs(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=Rs(e.slice(1));8!==t.length&&11!==t.length&&Yh.throwArgumentError("invalid component count for transaction type: 1","payload",as(e));const r={type:1,chainId:Gh(t[0]).toNumber(),nonce:Gh(t[1]).toNumber(),gasPrice:Gh(t[2]),gasLimit:Gh(t[3]),to:Jh(t[4]),value:Gh(t[5]),data:t[6],accessList:$h(t[7])};return 8===t.length||(r.hash=gs(e),nf(r,t.slice(8),rf)),r}(t);case 2:return function(e){const t=Rs(e.slice(1));9!==t.length&&12!==t.length&&Yh.throwArgumentError("invalid component count for transaction type: 2","payload",as(e));const r=Gh(t[2]),n=Gh(t[3]),o={type:2,chainId:Gh(t[0]).toNumber(),nonce:Gh(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Gh(t[4]),to:Jh(t[5]),value:Gh(t[6]),data:t[7],accessList:$h(t[8])};return 9===t.length||(o.hash=gs(e),nf(o,t.slice(9),tf)),o}(t)}return Yh.throwError(`unsupported transaction type: ${t[0]}`,qi.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(Xh||(Xh={}));const sf=new qi(rh);class af{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),o=this.data.bind(this),i=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),c=this.type.bind(this);return e.transaction={hash:i,type:c,accessList:af.allowNull(this.accessList.bind(this),null),blockHash:af.allowNull(i,null),blockNumber:af.allowNull(a,null),transactionIndex:af.allowNull(a,null),confirmations:af.allowNull(a,null),from:t,gasPrice:af.allowNull(r),maxPriorityFeePerGas:af.allowNull(r),maxFeePerGas:af.allowNull(r),gasLimit:r,to:af.allowNull(t,null),value:r,nonce:a,data:o,r:af.allowNull(this.uint256),s:af.allowNull(this.uint256),v:af.allowNull(a),creates:af.allowNull(t,null),raw:af.allowNull(o)},e.transactionRequest={from:af.allowNull(t),nonce:af.allowNull(a),gasLimit:af.allowNull(r),gasPrice:af.allowNull(r),maxPriorityFeePerGas:af.allowNull(r),maxFeePerGas:af.allowNull(r),to:af.allowNull(t),value:af.allowNull(r),data:af.allowNull((e=>this.data(e,!0))),type:af.allowNull(a),accessList:af.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:i,address:t,topics:af.arrayOf(i),data:o,logIndex:a,blockHash:i},e.receipt={to:af.allowNull(this.address,null),from:af.allowNull(this.address,null),contractAddress:af.allowNull(t,null),transactionIndex:a,root:af.allowNull(s),gasUsed:r,logsBloom:af.allowNull(o),blockHash:i,transactionHash:i,logs:af.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:af.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:af.allowNull(r),status:af.allowNull(a),type:c},e.block={hash:af.allowNull(i),parentHash:i,number:a,timestamp:a,nonce:af.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:af.allowNull(t),extraData:o,transactions:af.allowNull(af.arrayOf(i)),baseFeePerGas:af.allowNull(r)},e.blockWithTransactions=ha(e.block),e.blockWithTransactions.transactions=af.allowNull(af.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:af.allowNull(n,void 0),toBlock:af.allowNull(n,void 0),blockHash:af.allowNull(i,void 0),address:af.allowNull(t,void 0),topics:af.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:af.allowNull(a),blockHash:af.allowNull(i),transactionIndex:a,removed:af.allowNull(this.boolean.bind(this)),address:t,data:af.allowFalsish(o,"0x"),topics:af.arrayOf(i),transactionHash:i,logIndex:a},e}accessList(e){return $h(e||[])}number(e){return"0x"===e?0:ne.from(e).toNumber()}type(e){return"0x"===e||null==e?0:ne.from(e).toNumber()}bigNumber(e){return ne.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),ss(e))?e.toLowerCase():sf.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return Ms(e)}callAddress(e){if(!ss(e,32))return null;const t=Ms(ls(e,12));return t===ea?null:t}contractAddress(e){return function(e){let t=null;try{t=Ms(e.from)}catch(t){_s.throwArgumentError("missing from address","transaction",e)}return Ms(ls(gs(xs([t,is(ns(ne.from(e.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||ss(e))return ds(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==cs(r)?sf.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=ne.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!ss(e))throw new Error("invalid uint256");return hs(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=af.check(t,e);return n._difficulty=null==r?null:ne.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return af.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&ne.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=af.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;ss(r)&&(r=ne.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),ss(r)&&(r=ne.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return of(e)}receiptLog(e){return af.check(this.formats.receiptLog,e)}receipt(e){const t=af.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=ne.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&sf.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):sf.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&sf.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return af.check(this.formats.filter,e)}filterLog(e){return af.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const o=e[n](t[n]);void 0!==o&&(r[n]=o)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}var cf=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const lf=new qi(rh);function uf(e){return null==e?"null":(32!==cs(e)&&lf.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function df(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[uf(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return uf(e)})).join("&")}function hf(e){if("string"==typeof e){if(32===cs(e=e.toLowerCase()))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+df(e);if(_l.isForkEvent(e))throw lf.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+df(e.topics||[])}throw new Error("invalid event - "+e)}function ff(){return(new Date).getTime()}function pf(e){return new Promise((t=>{setTimeout(t,e)}))}const mf=["block","network","pending","poll"];class gf{constructor(e,t,r){la(this,"tag",e),la(this,"listener",t),la(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const o={};return r.length>0&&(o.topics=r),t&&"*"!==t&&(o.address=t),o}pollable(){return this.tag.indexOf(":")>=0||mf.indexOf(this.tag)>=0}}const yf={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bf(e){return hs(ne.from(e).toHexString(),32)}function vf(e){return Cl.encode(os([e,ls(Dd(Dd(e)),0,4)]))}const wf=new RegExp("^(ipfs)://(.*)$","i"),xf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),wf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ef(e,t){try{return uc(Af(e,t))}catch(e){}return null}function Af(e,t){if("0x"===e)return null;const r=ne.from(ls(e,t,t+32)).toNumber(),n=ne.from(ls(e,r,r+32)).toNumber();return ls(e,r+32,r+32+n)}function Rf(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):lf.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function _f(e){const t=ns(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function kf(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Sf(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const o=ns(e[n]);t[n]=_f(r),t.push(_f(o.length)),t.push(kf(o)),r+=32+32*Math.ceil(o.length/32)}return us(t)}class Nf{constructor(e,t,r,n){la(this,"provider",e),la(this,"name",r),la(this,"address",e.formatter.address(t)),la(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>ne.from(e).eq(1))).catch((e=>{if(e.code===qi.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return cf(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:us([e,zc(this.name),t||"0x"])};let n=!1;var o;(yield this.supportsWildcard())&&(n=!0,r.data=us(["0x9061b923",Sf([(o=this.name,as(os(Zc(o).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"),r.data])]));try{let e=yield this.provider.call(r);return ns(e).length%32==4&&lf.throwError("resolver threw error",qi.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=Af(e,0)),e}catch(e){if(e.code===qi.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return cf(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?Af(r,0):null}))}_getAddress(e,t){const r=yf[String(e)];if(null==r&&lf.throwError(`unsupported coin type: ${e}`,qi.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=ns(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return vf(os([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return vf(os([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=th.toWords(n.slice(2));return e.unshift(t),th.encode(r.prefix,e)}}return null}getAddress(e){return cf(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||"0x0000000000000000000000000000000000000000000000000000000000000000"===e?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===qi.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",bf(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&lf.throwError("invalid or unsupported coin data",qi.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return cf(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<xf.length;r++){const n=t.match(xf[r]);if(null==n)continue;const o=n[1].toLowerCase();switch(o){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:Rf(t)};case"erc721":case"erc1155":{const r="erc721"===o?"0xc87b56dd":"0x0e89341c";e.push({type:o,content:t});const i=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),c=hs(ne.from(s[1]).toHexString(),32);if("erc721"===o){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:us(["0x6352211e",c])}));if(i!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===o){const t=ne.from(yield this.provider.call({to:a,data:us(["0x00fdd58e",hs(i,32),c])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const l={to:this.provider.formatter.address(s[0]),data:us([r,c])};let u=Ef(yield this.provider.call(l),0);if(null==u)return null;e.push({type:"metadata-url-base",content:u}),"erc1155"===o&&(u=u.replace("{id}",c.substring(2)),e.push({type:"metadata-url-expanded",content:u})),u.match(/^ipfs:/i)&&(u=Rf(u)),e.push({type:"metadata-url",content:u});const d=yield Hd(u);if(!d)return null;e.push({type:"metadata",content:JSON.stringify(d)});let h=d.image;if("string"!=typeof h)return null;if(h.match(/^(https:\/\/|data:)/i));else{if(null==h.match(wf))return null;e.push({type:"url-ipfs",content:h}),h=Rf(h)}return e.push({type:"url",content:h}),{linkage:e,url:h}}}}}catch(e){}return null}))}getContentHash(){return cf(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+Cl.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+Cl.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const o=e.match(/^0x90b2c605([0-9a-f]*)$/);if(o&&68===o[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+vc("0x"+o[1]).replace(/[=+\/]/g,(t=>e[t]))}return lf.throwError("invalid or unsupported content hash data",qi.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return cf(this,void 0,void 0,(function*(){let t=lc(e);t=os([bf(64),bf(t.length),t]),t.length%32!=0&&(t=os([t,hs("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",as(t));return null==r||"0x"===r?null:uc(r)}))}}let Mf=null,Tf=1;class Of extends kl{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),la(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=ua(new.target,"getNetwork")(e);t?(la(this,"_network",t),this.emit("network",t,null)):lf.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return cf(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||lf.throwError("no network detected",qi.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:la(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return Yd((()=>this._ready().then((e=>e),(e=>{if(e.code!==qi.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==Mf&&(Mf=new af),Mf}static getNetwork(e){return function(e){if(null==e)return null;if("number"==typeof e){for(const t in Fl){const r=Fl[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=Fl[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=Fl[e.name];if(!t)return"number"!=typeof e.chainId&&Sl.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&Sl.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}(null==e?"homestead":e)}ccipReadFetch(e,t,r){return cf(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),o=t.toLowerCase(),i=[];for(let e=0;e<r.length;e++){const t=r[e],s=t.replace("{sender}",n).replace("{data}",o),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:o,sender:n}),c=yield Hd({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(c.data)return c.data;const l=c.message||"unknown error";if(c.status>=400&&c.status<500)return lf.throwError(`response not found during CCIP fetch: ${l}`,qi.errors.SERVER_ERROR,{url:t,errorMessage:l});i.push(l)}return lf.throwError(`error encountered during CCIP fetch: ${i.map((e=>JSON.stringify(e))).join(", ")}`,qi.errors.SERVER_ERROR,{urls:r,errorMessages:i})}))}_getInternalBlockNumber(e){return cf(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(ff()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=ff(),r=da({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=ff();return(e=ne.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:o}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return cf(this,void 0,void 0,(function*(){const e=Tf++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)lf.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",lf.makeError("network block skew detected",qi.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const o=n.toBlock-this._maxFilterBlockRange;o>n.fromBlock&&(n.fromBlock=o),n.fromBlock<0&&(n.fromBlock=0);const i=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(i)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return cf(this,void 0,void 0,(function*(){return lf.throwError("provider does not support network detection",qi.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return cf(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield pf(0),this._network;const r=lf.makeError("underlying network changed",qi.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=ff();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=ff(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return cf(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return cf(this,void 0,void 0,(function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise(((o,i)=>{const s=[];let a=!1;const c=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},l=e=>{e.confirmations<t||c()||o(e)};if(this.on(e,l),s.push((()=>{this.removeListener(e,l)})),n){let r=n.startBlock,o=null;const l=s=>cf(this,void 0,void 0,(function*(){a||(yield pf(1e3),this.getTransactionCount(n.from).then((u=>cf(this,void 0,void 0,(function*(){if(!a){if(u<=n.nonce)r=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==o&&(o=r-3,o<n.startBlock&&(o=n.startBlock));o<=s;){if(a)return;const r=yield this.getBlockWithTransactions(o);for(let o=0;o<r.transactions.length;o++){const s=r.transactions[o];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,t);if(c())return;let o="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?o="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(o="cancelled"),void i(lf.makeError("transaction was replaced",qi.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===o||"cancelled"===o,reason:o,replacement:this._wrapTransaction(s),hash:e,receipt:r}))}}o++}}a||this.once("block",l)}}))),(e=>{a||this.once("block",l)})))}));if(a)return;this.once("block",l),s.push((()=>{this.removeListener("block",l)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{c()||i(lf.makeError("timeout exceeded",qi.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return cf(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return ne.from(e)}catch(t){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield da({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return ne.from(n)}catch(e){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield da({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return ne.from(n).toNumber()}catch(e){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield da({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return as(n)}catch(e){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield da({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>ds(e)))}),o=yield this.perform("getStorageAt",n);try{return as(o)}catch(e){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:o,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==cs(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&lf.throwError("Transaction hash mismatch from Provider.sendTransaction.",qi.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>cf(this,void 0,void 0,(function*(){let o;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const i=yield this._waitForTransaction(e.hash,t,n,o);return null==i&&0===t?null:(this._emitted["t:"+e.hash]=i.blockNumber,0===i.status&&lf.throwError("transaction failed",qi.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:i}),i)})),n}sendTransaction(e){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>as(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return cf(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?ne.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?as(e):null)))})),this.formatter.transactionRequest(yield da(r))}))}_getFilter(e){return cf(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield da(t))}))}_call(e,t,r){return cf(this,void 0,void 0,(function*(){r>=10&&lf.throwError("CCIP read exceeded maximum redirections",qi.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===o.substring(0,10)&&cs(o)%32==4)try{const i=ls(o,4),s=ls(i,0,32);ne.from(s).eq(n)||lf.throwError("CCIP Read sender did not match",qi.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const a=[],c=ne.from(ls(i,32,64)).toNumber(),l=ne.from(ls(i,c,c+32)).toNumber(),u=ls(i,c+32);for(let t=0;t<l;t++){const r=Ef(u,32*t);null==r&&lf.throwError("CCIP Read contained corrupt URL string",qi.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),a.push(r)}const d=Af(i,64);ne.from(ls(i,100,128)).isZero()||lf.throwError("CCIP Read callback selector included junk",qi.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const h=ls(i,96,100),f=Af(i,128),p=yield this.ccipReadFetch(e,d,a);null==p&&lf.throwError("CCIP Read disabled or provided no URLs",qi.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const m={to:n,data:us([h,Sf([p,f])])};return this._call(m,t,r+1)}catch(e){if(e.code===qi.errors.SERVER_ERROR)throw e}try{return as(o)}catch(r){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:o,error:r})}}))}call(e,t){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield da({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield da({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return ne.from(r)}catch(e){return lf.throwError("bad result from backend",qi.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}}))}_getAddress(e){return cf(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&lf.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&lf.throwError("ENS name not configured",qi.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return cf(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if(ss(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),ss(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){lf.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return Yd((()=>cf(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){const n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return cf(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Yd((()=>cf(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return cf(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Yd((()=>cf(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return cf(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield da({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),af.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return cf(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return cf(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&lf.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return cf(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new Nf(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return cf(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||lf.throwError("network does not support ENS",qi.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+zc(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return cf(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if(ss(e))throw t}"string"!=typeof e&&lf.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return cf(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Ef(yield this.call({to:r,data:"0x691f3431"+zc(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return cf(this,void 0,void 0,(function*(){let t=null;if(ss(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new Nf(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==qi.errors.CALL_EXCEPTION)throw e}try{const e=Ef(yield this.call({to:n,data:"0x691f3431"+zc(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==qi.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return lf.throwError(e+" not implemented",qi.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new gf(hf(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],o=hf(e);return this._events=this._events.filter((e=>e.tag!==o||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=hf(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=hf(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,o=hf(e);return this._events=this._events.filter((e=>e.tag!==o||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=hf(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var If=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Ff=new qi("abstract-signer/5.7.0"),Wf=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Cf=[qi.errors.INSUFFICIENT_FUNDS,qi.errors.NONCE_EXPIRED,qi.errors.REPLACEMENT_UNDERPRICED];class jf{constructor(){Ff.checkAbstract(new.target,jf),la(this,"_isSigner",!0)}getBalance(e){return If(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return If(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return If(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield da(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return If(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield da(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return If(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return If(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return If(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return If(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return If(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===Wf.indexOf(t)&&Ff.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=ha(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&Ff.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return If(this,void 0,void 0,(function*(){const t=yield da(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>If(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&Ff.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||Ff.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):Ff.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&Ff.throwError("network does not support EIP-1559",qi.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):Ff.throwError("failed to get consistent fee data",qi.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(Cf.indexOf(e.code)>=0)throw e;return Ff.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",qi.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&Ff.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield da(t)}))}_checkProvider(e){this.provider||Ff.throwError("missing provider",qi.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var Uf=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Df=new qi(rh),Bf=["call","estimateGas"];function Vf(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=ss(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=Vf(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return Vf(JSON.parse(e),t)}catch(e){}return null}function Pf(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=Vf(t,!0);if(e)return e.data;Df.throwError("missing revert data in call exception; Transaction reverted without a reason string",qi.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=Vf(t.body,!1);null==r&&(r=Vf(t,!1)),r&&Df.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",qi.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let o=t.message;throw t.code===qi.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?o=t.error.message:"string"==typeof t.body?o=t.body:"string"==typeof t.responseText&&(o=t.responseText),o=(o||"").toLowerCase(),o.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Df.throwError("insufficient funds for intrinsic transaction cost",qi.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),o.match(/nonce (is )?too low/i)&&Df.throwError("nonce has already been used",qi.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),o.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Df.throwError("replacement fee too low",qi.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),o.match(/only replay-protected/i)&&Df.throwError("legacy pre-eip-155 transactions not supported",qi.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Bf.indexOf(e)>=0&&o.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Df.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",qi.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function Zf(e){return new Promise((function(t){setTimeout(t,e)}))}function zf(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function Lf(e){return e?e.toLowerCase():e}const Hf={};class Yf extends jf{constructor(e,t,r){if(super(),e!==Hf)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");la(this,"provider",t),null==r&&(r=0),"string"==typeof r?(la(this,"_address",this.provider.formatter.address(r)),la(this,"_index",null)):"number"==typeof r?(la(this,"_index",r),la(this,"_address",null)):Df.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return Df.throwError("cannot alter JSON-RPC Signer connection",qi.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Xf(Hf,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&Df.throwError("unknown account #"+this._index,qi.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=ha(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=ha(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>Uf(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&Df.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),da({tx:da(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&Df.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&Df.throwError("user rejected transaction",qi.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),Pf("sendTransaction",e,n))))}))}signTransaction(e){return Df.throwError("signing transactions is unsupported",qi.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Uf(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Yd((()=>Uf(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return Uf(this,void 0,void 0,(function*(){const t="string"==typeof e?lc(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[as(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&Df.throwError("user rejected signing",qi.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return Uf(this,void 0,void 0,(function*(){const t="string"==typeof e?lc(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),as(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&Df.throwError("user rejected signing",qi.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return Uf(this,void 0,void 0,(function*(){const n=yield il.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(il.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&Df.throwError("user rejected signing",qi.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return Uf(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class Xf extends Yf{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const Jf={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Gf extends Of{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=ua(this.constructor,"defaultUrl")()),la(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(ha(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Uf(this,void 0,void 0,(function*(){yield Zf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=ua(this.constructor,"getNetwork");try{return t(ne.from(e).toNumber())}catch(t){return Df.throwError("could not detect network",qi.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return Df.throwError("could not detect network",qi.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new Yf(Hf,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ga(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const o=Hd(this.connection,JSON.stringify(r),zf).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=o,setTimeout((()=>{this._cache[e]=null}),0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Lf(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Lf(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Lf(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Lf(t.address),hs(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[ua(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[ua(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=Lf(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Uf(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&ne.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=ha(t)).transaction=ha(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&Df.throwError(e+" not implemented",qi.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return Pf(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return Zf(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=ha(Jf);if(t)for(const e in t)t[e]&&(r[e]=!0);var n,o;o=r,(n=e)&&"object"==typeof n||ca.throwArgumentError("invalid object","object",n),Object.keys(n).forEach((e=>{o[e]||ca.throwArgumentError("invalid object key - "+e,"transaction:"+e,n)}));const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=ds(ne.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=as(e[t]))})),e.accessList&&(i.accessList=$h(e.accessList)),i}}function qf(e){return Number.parseInt(e,16)}new qi(rh);class Kf extends ee{constructor(e,t){super(e),this.customProvider=t,t.on("connect",(({chainId:e})=>{this.actions.update({chainId:qf(e)})})).on("disconnect",(e=>{var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.actions.resetState()})).on("chainChanged",(e=>{this.actions.update({chainId:qf(e)})})).on("accountsChanged",(e=>{this.actions.update({accounts:e})}))}activate(){return Bs(this,void 0,void 0,(function*(){this.actions.startActivation();const e=this.customProvider;try{const[{chainId:t},r]=yield Promise.all([e.getNetwork(),e.listAccounts()]);this.actions.update({chainId:t,accounts:r})}catch(e){throw this.actions.resetState(),e}}))}}function Qf([e,t]){return[e,t]}var $f;function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ep.apply(this,arguments)}var tp,rp;function np(){return np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},np.apply(this,arguments)}var op;!function(e){e.INTEGRATOR="integrator",e.METAMASK="metamask",e.WALLET_CONNECT="walletConnect"}(op||(op={}));const ip={[op.METAMASK]:{name:"MetaMask",type:op.METAMASK,icon:function(e){return l.createElement("svg",ep({height:355,viewBox:"0 0 397 355",width:397,xmlns:"http://www.w3.org/2000/svg"},e),$f||($f=l.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(-1 -1)"},l.createElement("path",{d:"m114.622644 327.195472 52.004717 13.810198v-18.05949l4.245283-4.249292h29.716982v21.246459 14.872523h-31.839624l-39.268868-16.997169z",fill:"#cdbdb2"}),l.createElement("path",{d:"m199.528305 327.195472 50.943397 13.810198v-18.05949l4.245283-4.249292h29.716981v21.246459 14.872523h-31.839623l-39.268868-16.997169z",fill:"#cdbdb2",transform:"matrix(-1 0 0 1 483.96227 0)"}),l.createElement("path",{d:"m170.872644 287.889523-4.245283 35.056657 5.306604-4.249292h55.18868l6.367925 4.249292-4.245284-35.056657-8.490565-5.311615-42.452832 1.062323z",fill:"#393939"}),l.createElement("path",{d:"m142.216984 50.9915022 25.471698 59.4900858 11.674528 173.158643h41.391511l12.735849-173.158643 23.349056-59.4900858z",fill:"#f89c35"}),l.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),l.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),l.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),l.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),l.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 56.25-39.305949z",fill:"#eb8f35"}),l.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),l.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),l.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),l.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),l.createElement("path",{d:"m114.622644 327.195472 56.25-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3"}),l.createElement("path",{d:"m229.245286 327.195472 55.18868-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3",transform:"matrix(-1 0 0 1 513.679252 0)"}),l.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),l.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),l.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"}),l.createElement("g",{transform:"matrix(-1 0 0 1 399.056611 0)"},l.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),l.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),l.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),l.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),l.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 55.18868-38.243626z",fill:"#eb8f35"}),l.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),l.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),l.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),l.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),l.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),l.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),l.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"})))))},link:"https://metamask.io"},[op.WALLET_CONNECT]:{name:"WalletConnect",type:op.WALLET_CONNECT,icon:function(e){return l.createElement("svg",np({height:512,viewBox:"0 0 512 512",width:512,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),tp||(tp=l.createElement("radialGradient",{id:"a",cx:"0%",cy:"50%",r:"100%"},l.createElement("stop",{offset:0,stopColor:"#5d9df6"}),l.createElement("stop",{offset:1,stopColor:"#006fff"}))),rp||(rp=l.createElement("g",{fill:"none",fillRule:"evenodd"},l.createElement("path",{d:"m256 0c141.384896 0 256 114.615104 256 256s-114.615104 256-256 256-256-114.615104-256-256 114.615104-256 256-256z",fill:"url(#a)"}),l.createElement("path",{d:"m64.6917558 37.7088298c51.5328072-50.2784397 135.0839942-50.2784397 186.6167992 0l6.202057 6.0510906c2.57664 2.5139218 2.57664 6.5897948 0 9.1037177l-21.215998 20.6995759c-1.288321 1.2569619-3.3771 1.2569619-4.665421 0l-8.534766-8.3270205c-35.950573-35.0754962-94.237969-35.0754962-130.188544 0l-9.1400282 8.9175519c-1.2883217 1.2569609-3.3771016 1.2569609-4.6654208 0l-21.2159973-20.6995759c-2.5766403-2.5139229-2.5766403-6.5897958 0-9.1037177zm230.4934852 42.8089117 18.882279 18.4227262c2.576627 2.5139103 2.576642 6.5897593.000032 9.1036863l-85.141498 83.070358c-2.576623 2.513941-6.754182 2.513969-9.33084.000066-.00001-.00001-.000023-.000023-.000033-.000034l-60.428256-58.957451c-.64416-.628481-1.68855-.628481-2.33271 0-.000004.000004-.000008.000007-.000012.000011l-60.4269683 58.957408c-2.5766141 2.513947-6.7541746 2.51399-9.3308408.000092-.0000151-.000014-.0000309-.000029-.0000467-.000046l-85.14386774-83.071463c-2.57663928-2.513921-2.57663928-6.589795 0-9.1037163l18.88231264-18.4226955c2.5766393-2.5139222 6.7541993-2.5139222 9.3308397 0l60.4291347 58.9582758c.6441608.62848 1.6885495.62848 2.3327103 0 .0000095-.000009.0000182-.000018.0000277-.000025l60.4261065-58.9582508c2.576581-2.51398 6.754142-2.5140743 9.33084-.0002103.000037.0000354.000072.0000709.000107.0001063l60.429056 58.9583548c.644159.628479 1.688549.628479 2.332709 0l60.428079-58.9571925c2.57664-2.5139231 6.754199-2.5139231 9.330839 0z",fill:"#fff",fillRule:"nonzero",transform:"translate(98 160)"}))))}}},sp={};function ap({provider:e,jsonRpcUrlMap:t,defaultChainId:r}){const n=console.error,o=y((()=>function(e,t){if(t){if(Gf.isProvider(t))return Qf(Y((e=>new Kf(e,t))));if(Gf.isProvider(t.provider))throw new Error("Eip1193Bridge is experimental: pass your ethers Provider directly");return Qf(Y((r=>new K({actions:r,provider:t,onError:e}))))}}(n,e)),[n,e]),i=y((()=>function(e){return Qf(Y((t=>new $({actions:t,onError:e}))))}(n)),[n]),s=y((()=>t?Object.assign(Object.assign({},Fs),t):Fs),[t]),a=y((()=>function(e,t,r,n){return Qf(Y((o=>new Q({actions:o,options:{rpcMap:t,projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:r?[r]:[],showQrModal:e},onError:n,defaultChainId:r}))))}(!0,s,r,n)),[s,r,n]);return o&&(sp[op.INTEGRATOR]=o),sp[op.METAMASK]=i,sp[op.WALLET_CONNECT]=a,Object.values(sp)}function cp(){const{chainId:e}=H(),t=Z(qs);return y((()=>e||t||1),[e,t])}var lp={};function up(e){e&&(e.value=!0)}function dp(){}function hp(e){return void 0===e.size&&(e.size=e.__iterate(pp)),e.size}function fp(e,t){if("number"!=typeof t){var r=t>>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?hp(e)+t:t}function pp(){return!0}function mp(e,t,r){return(0===e&&!vp(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function gp(e,t){return bp(e,t,0)}function yp(e,t){return bp(e,t,t)}function bp(e,t,r){return void 0===e?r:vp(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function vp(e){return e<0||0===e&&1/e==-1/0}function wp(e){return Boolean(e&&e["@@__IMMUTABLE_ITERABLE__@@"])}function xp(e){return Boolean(e&&e["@@__IMMUTABLE_KEYED__@@"])}function Ep(e){return Boolean(e&&e["@@__IMMUTABLE_INDEXED__@@"])}function Ap(e){return xp(e)||Ep(e)}var Rp=function(e){return wp(e)?e:Lp(e)},_p=function(e){function t(e){return xp(e)?e:Hp(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Rp),kp=function(e){function t(e){return Ep(e)?e:Yp(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Rp),Sp=function(e){function t(e){return wp(e)&&!Ap(e)?e:Xp(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Rp);Rp.Keyed=_p,Rp.Indexed=kp,Rp.Set=Sp;function Np(e){return Boolean(e&&e["@@__IMMUTABLE_SEQ__@@"])}function Mp(e){return Boolean(e&&e["@@__IMMUTABLE_RECORD__@@"])}function Tp(e){return wp(e)||Mp(e)}var Op="@@__IMMUTABLE_ORDERED__@@";function Ip(e){return Boolean(e&&e[Op])}var Fp="function"==typeof Symbol&&Symbol.iterator,Wp=Fp||"@@iterator",Cp=function(e){this.next=e};function jp(e,t,r,n){var o=0===e?t:1===e?r:[t,r];return n?n.value=o:n={value:o,done:!1},n}function Up(){return{value:void 0,done:!0}}function Dp(e){return!!Array.isArray(e)||!!Pp(e)}function Bp(e){return e&&"function"==typeof e.next}function Vp(e){var t=Pp(e);return t&&t.call(e)}function Pp(e){var t=e&&(Fp&&e[Fp]||e["@@iterator"]);if("function"==typeof t)return t}Cp.prototype.toString=function(){return"[Iterator]"},Cp.KEYS=0,Cp.VALUES=1,Cp.ENTRIES=2,Cp.prototype.inspect=Cp.prototype.toSource=function(){return this.toString()},Cp.prototype[Wp]=function(){return this};var Zp=Object.prototype.hasOwnProperty;function zp(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var Lp=function(e){function t(e){return null==e?Qp():Tp(e)?e.toSeq():function(e){var t=tm(e);if(t)return(n=Pp(r=e))&&n===r.entries?t.fromEntrySeq():function(e){var t=Pp(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var r,n;if("object"==typeof e)return new Gp(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,o=0;o!==n;){var i=r[t?n-++o:o++];if(!1===e(i[1],i[0],this))break}return o}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,o=0;return new Cp((function(){if(o===n)return{value:void 0,done:!0};var i=r[t?n-++o:o++];return jp(e,i[0],i[1])}))}return this.__iteratorUncached(e,t)},t}(Rp),Hp=function(e){function t(e){return null==e?Qp().toKeyedSeq():wp(e)?xp(e)?e.toSeq():e.fromEntrySeq():Mp(e)?e.toSeq():$p(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(Lp),Yp=function(e){function t(e){return null==e?Qp():wp(e)?xp(e)?e.entrySeq():e.toIndexedSeq():Mp(e)?e.toSeq().entrySeq():em(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(Lp),Xp=function(e){function t(e){return(wp(e)&&!Ap(e)?e:Yp(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(Lp);Lp.isSeq=Np,Lp.Keyed=Hp,Lp.Set=Xp,Lp.Indexed=Yp,Lp.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var Jp=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[fp(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,o=0;o!==n;){var i=t?n-++o:o++;if(!1===e(r[i],i,this))break}return o},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,o=0;return new Cp((function(){if(o===n)return{value:void 0,done:!0};var i=t?n-++o:o++;return jp(e,i,r[i])}))},t}(Yp),Gp=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return Zp.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,o=n.length,i=0;i!==o;){var s=n[t?o-++i:i++];if(!1===e(r[s],s,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,o=n.length,i=0;return new Cp((function(){if(i===o)return{value:void 0,done:!0};var s=n[t?o-++i:i++];return jp(e,s,r[s])}))},t}(Hp);Gp.prototype[Op]=!0;var qp,Kp=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=Vp(this._collection),n=0;if(Bp(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=Vp(this._collection);if(!Bp(r))return new Cp(Up);var n=0;return new Cp((function(){var t=r.next();return t.done?t:jp(e,n++,t.value)}))},t}(Yp);function Qp(){return qp||(qp=new Jp([]))}function $p(e){var t=tm(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new Gp(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function em(e){var t=tm(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function tm(e){return zp(e)?new Jp(e):Dp(e)?new Kp(e):void 0}function rm(e){return Boolean(e&&e["@@__IMMUTABLE_MAP__@@"])}function nm(e){return rm(e)&&Ip(e)}function om(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function im(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(om(e)&&om(t)&&e.equals(t))}var sm="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function am(e){return e>>>1&1073741824|3221225471&e}var cm=Object.prototype.valueOf;function lm(e){if(null==e)return um(e);if("function"==typeof e.hashCode)return am(e.hashCode(e));var t,r=(t=e).valueOf!==cm&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==r)return um(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return am(t)}(r);case"string":return r.length>wm?function(e){var t=Am[e];void 0===t&&(t=dm(e),Em===xm&&(Em=0,Am={}),Em++,Am[e]=t);return t}(r):dm(r);case"object":case"function":return function(e){var t;if(gm&&void 0!==(t=mm.get(e)))return t;if(void 0!==(t=e[vm]))return t;if(!fm){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[vm]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=pm(),gm)mm.set(e,t);else{if(void 0!==hm&&!1===hm(e))throw new Error("Non-extensible objects are not allowed as keys.");if(fm)Object.defineProperty(e,vm,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[vm]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[vm]=t}}return t}(r);case"symbol":return function(e){var t=ym[e];if(void 0!==t)return t;return t=pm(),ym[e]=t,t}(r);default:if("function"==typeof r.toString)return dm(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function um(e){return null===e?1108378658:1108378659}function dm(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return am(t)}var hm=Object.isExtensible,fm=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function pm(){var e=++bm;return 1073741824&bm&&(bm=0),e}var mm,gm="function"==typeof WeakMap;gm&&(mm=new WeakMap);var ym=Object.create(null),bm=0,vm="__immutablehash__";"function"==typeof Symbol&&(vm=Symbol(vm));var wm=16,xm=255,Em=0,Am={},Rm=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Tm(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var r=this,n=Mm(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t,n){return e(t,n,r)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(Hp);Rm.prototype[Op]=!0;var _m=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this,n=0;return t&&hp(this),this._iter.__iterate((function(o){return e(o,t?r.size-++n:n++,r)}),t)},t.prototype.__iterator=function(e,t){var r=this,n=this._iter.__iterator(1,t),o=0;return t&&hp(this),new Cp((function(){var i=n.next();return i.done?i:jp(e,t?r.size-++o:o++,i.value,i)}))},t}(Yp),km=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){return e(t,t,r)}),t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new Cp((function(){var t=r.next();return t.done?t:jp(e,t.value,t.value,t)}))},t}(Xp),Sm=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){if(t){Pm(t);var n=wp(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r)}}),t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new Cp((function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){Pm(n);var o=wp(n);return jp(e,o?n.get(0):n[0],o?n.get(1):n[1],t)}}}))},t}(Hp);function Nm(e){var t=zm(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Lm,t.__iterateUncached=function(t,r){var n=this;return e.__iterate((function(e,r){return!1!==t(r,e,n)}),r)},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new Cp((function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,r)},t}function Mm(e,t,r){var n=zm(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,o){var i=e.get(n,lp);return i===lp?o:t.call(r,i,n,e)},n.__iterateUncached=function(n,o){var i=this;return e.__iterate((function(e,o,s){return!1!==n(t.call(r,e,o,s),o,i)}),o)},n.__iteratorUncached=function(n,o){var i=e.__iterator(2,o);return new Cp((function(){var o=i.next();if(o.done)return o;var s=o.value,a=s[0];return jp(n,a,t.call(r,s[1],a,e),o)}))},n}function Tm(e,t){var r=this,n=zm(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Nm(e);return t.reverse=function(){return e.flip()},t}),n.get=function(r,n){return e.get(t?r:-1-r,n)},n.has=function(r){return e.has(t?r:-1-r)},n.includes=function(t){return e.includes(t)},n.cacheResult=Lm,n.__iterate=function(r,n){var o=this,i=0;return n&&hp(e),e.__iterate((function(e,s){return r(e,t?s:n?o.size-++i:i++,o)}),!n)},n.__iterator=function(n,o){var i=0;o&&hp(e);var s=e.__iterator(2,!o);return new Cp((function(){var e=s.next();if(e.done)return e;var a=e.value;return jp(n,t?a[0]:o?r.size-++i:i++,a[1],e)}))},n}function Om(e,t,r,n){var o=zm(e);return n&&(o.has=function(n){var o=e.get(n,lp);return o!==lp&&!!t.call(r,o,n,e)},o.get=function(n,o){var i=e.get(n,lp);return i!==lp&&t.call(r,i,n,e)?i:o}),o.__iterateUncached=function(o,i){var s=this,a=0;return e.__iterate((function(e,i,c){if(t.call(r,e,i,c))return a++,o(e,n?i:a-1,s)}),i),a},o.__iteratorUncached=function(o,i){var s=e.__iterator(2,i),a=0;return new Cp((function(){for(;;){var i=s.next();if(i.done)return i;var c=i.value,l=c[0],u=c[1];if(t.call(r,u,l,e))return jp(o,n?l:a++,u,i)}}))},o}function Im(e,t,r,n){var o=e.size;if(mp(t,r,o))return e;var i=gp(t,o),s=yp(r,o);if(i!=i||s!=s)return Im(e.toSeq().cacheResult(),t,r,n);var a,c=s-i;c==c&&(a=c<0?0:c);var l=zm(e);return l.size=0===a?a:e.size&&a||void 0,!n&&Np(e)&&a>=0&&(l.get=function(t,r){return(t=fp(this,t))>=0&&t<a?e.get(t+i,r):r}),l.__iterateUncached=function(t,r){var o=this;if(0===a)return 0;if(r)return this.cacheResult().__iterate(t,r);var s=0,c=!0,l=0;return e.__iterate((function(e,r){if(!c||!(c=s++<i))return l++,!1!==t(e,n?r:l-1,o)&&l!==a})),l},l.__iteratorUncached=function(t,r){if(0!==a&&r)return this.cacheResult().__iterator(t,r);if(0===a)return new Cp(Up);var o=e.__iterator(t,r),s=0,c=0;return new Cp((function(){for(;s++<i;)o.next();if(++c>a)return{value:void 0,done:!0};var e=o.next();return n||1===t||e.done?e:jp(t,c-1,0===t?void 0:e.value[1],e)}))},l}function Fm(e,t,r,n){var o=zm(e);return o.__iterateUncached=function(o,i){var s=this;if(i)return this.cacheResult().__iterate(o,i);var a=!0,c=0;return e.__iterate((function(e,i,l){if(!a||!(a=t.call(r,e,i,l)))return c++,o(e,n?i:c-1,s)})),c},o.__iteratorUncached=function(o,i){var s=this;if(i)return this.cacheResult().__iterator(o,i);var a=e.__iterator(2,i),c=!0,l=0;return new Cp((function(){var e,i,u;do{if((e=a.next()).done)return n||1===o?e:jp(o,l++,0===o?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],c&&(c=t.call(r,u,i,s))}while(c);return 2===o?e:jp(o,i,u,e)}))},o}function Wm(e,t){var r=xp(e),n=[e].concat(t).map((function(e){return wp(e)?r&&(e=_p(e)):e=r?$p(e):em(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===n.length)return e;if(1===n.length){var o=n[0];if(o===e||r&&xp(o)||Ep(e)&&Ep(o))return o}var i=new Jp(n);return r?i=i.toKeyedSeq():Ep(e)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=n.reduce((function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}}),0),i}function Cm(e,t,r){var n=zm(e);return n.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var s=0,a=!1;return function e(c,l){c.__iterate((function(i,c){return(!t||l<t)&&wp(i)?e(i,l+1):(s++,!1===o(i,r?c:s-1,n)&&(a=!0)),!a}),i)}(e,0),s},n.__iteratorUncached=function(n,o){if(o)return this.cacheResult().__iterator(n,o);var i=e.__iterator(n,o),s=[],a=0;return new Cp((function(){for(;i;){var e=i.next();if(!1===e.done){var c=e.value;if(2===n&&(c=c[1]),t&&!(s.length<t)||!wp(c))return r?e:jp(n,a++,c,e);s.push(i),i=c.__iterator(n,o)}else i=s.pop()}return{value:void 0,done:!0}}))},n}function jm(e,t,r){t||(t=Hm);var n=xp(e),o=0,i=e.toSeq().map((function(t,n){return[n,t,o++,r?r(t,n,e):t]})).valueSeq().toArray();return i.sort((function(e,r){return t(e[3],r[3])||e[2]-r[2]})).forEach(n?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),n?Hp(i):Ep(e)?Yp(i):Xp(i)}function Um(e,t,r){if(t||(t=Hm),r){var n=e.toSeq().map((function(t,n){return[t,r(t,n,e)]})).reduce((function(e,r){return Dm(t,e[1],r[1])?r:e}));return n&&n[0]}return e.reduce((function(e,r){return Dm(t,e,r)?r:e}))}function Dm(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(null==r||r!=r)||n>0}function Bm(e,t,r,n){var o=zm(e),i=new Jp(r).map((function(e){return e.size}));return o.size=n?i.max():i.min(),o.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),o=0;!(r=n.next()).done&&!1!==e(r.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=Rp(e),Vp(o?e.reverse():e)})),s=0,a=!1;return new Cp((function(){var r;return a||(r=i.map((function(e){return e.next()})),a=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),a?{value:void 0,done:!0}:jp(e,s++,t.apply(null,r.map((function(e){return e.value}))))}))},o}function Vm(e,t){return e===t?e:Np(e)?t:e.constructor(t)}function Pm(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Zm(e){return xp(e)?_p:Ep(e)?kp:Sp}function zm(e){return Object.create((xp(e)?Hp:Ep(e)?Yp:Xp).prototype)}function Lm(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Lp.prototype.cacheResult.call(this)}function Hm(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function Ym(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),o=0;o<r;o++)n[o]=e[o+t];return n}function Xm(e,t){if(!e)throw new Error(t)}function Jm(e){Xm(e!==1/0,"Cannot perform this action with an infinite size.")}function Gm(e){if(zp(e)&&"string"!=typeof e)return e;if(Ip(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}_m.prototype.cacheResult=Rm.prototype.cacheResult=km.prototype.cacheResult=Sm.prototype.cacheResult=Lm;var qm=Object.prototype.toString;function Km(e){return"object"==typeof e&&(Tp(e)||Array.isArray(e)||function(e){if(!e||"object"!=typeof e||"[object Object]"!==qm.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t,n=Object.getPrototypeOf(t);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===t}(e))}function Qm(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function $m(e,t,r){return Tp(e)?e.get(t,r):function(e,t){return Tp(e)?e.has(t):Km(e)&&Zp.call(e,t)}(e,t)?"function"==typeof e.get?e.get(t):e[t]:r}function eg(e){if(Array.isArray(e))return Ym(e);var t={};for(var r in e)Zp.call(e,r)&&(t[r]=e[r]);return t}function tg(e,t,r,n){n||(n=r,r=void 0);var o=rg(Tp(e),e,Gm(t),0,r,n);return o===lp?r:o}function rg(e,t,r,n,o,i){var s=t===lp;if(n===r.length){var a=s?o:t,c=i(a);return c===a?t:c}if(!s&&!Km(t))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(Qm)+"]: "+t);var l=r[n],u=s?lp:$m(t,l,lp),d=rg(u===lp?e:Tp(u),u,r,n+1,o,i);return d===u?t:d===lp?function(e,t){if(!Km(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Tp(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!Zp.call(e,t))return e;var r=eg(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}(t,l):function(e,t,r){if(!Km(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Tp(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if(Zp.call(e,t)&&r===e[t])return e;var n=eg(e);return n[t]=r,n}(s?e?Fg():{}:t,l,d)}function ng(e,t){return function(e,t,r){return tg(e,t,lp,(function(){return r}))}(this,e,t)}function og(e){return function(e,t){return tg(e,t,(function(){return lp}))}(this,e)}function ig(e,t,r,n){return tg(e,[t],r,n)}function sg(e,t,r){return 1===arguments.length?e(this):ig(this,e,t,r)}function ag(e,t,r){return tg(this,e,t,r)}function cg(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ug(this,e)}function lg(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return ug(this,t,e)}function ug(e,t,r){for(var n=[],o=0;o<t.length;o++){var i=_p(t[o]);0!==i.size&&n.push(i)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var t=r?function(t,n){ig(e,n,lp,(function(e){return e===lp?t:r(e,t,n)}))}:function(t,r){e.set(r,t)},o=0;o<n.length;o++)n[o].forEach(t)})):e.constructor(n[0])}function dg(e,t,r){return hg(e,t,function(e){function t(r,n,o){return Km(r)&&Km(n)&&(i=n,s=Lp(r),a=Lp(i),Ep(s)===Ep(a)&&xp(s)===xp(a))?hg(r,[n],t):e?e(r,n,o):n;var i,s,a}return t}(r))}function hg(e,t,r){if(!Km(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Tp(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),o=e,i=n?kp:_p,s=n?function(t){o===e&&(o=eg(o)),o.push(t)}:function(t,n){var i=Zp.call(o,n),s=i&&r?r(o[n],t,n):t;i&&s===o[n]||(o===e&&(o=eg(o)),o[n]=s)},a=0;a<t.length;a++)i(t[a]).forEach(s);return o}function fg(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return dg(this,e)}function pg(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return dg(this,t,e)}function mg(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return tg(this,e,Fg(),(function(e){return hg(e,t)}))}function gg(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return tg(this,e,Fg(),(function(e){return dg(e,t)}))}function yg(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function bg(){return this.__ownerID?this:this.__ensureOwner(new dp)}function vg(){return this.__ensureOwner()}function wg(){return this.__altered}var xg=function(e){function t(t){return null==t?Fg():rm(t)&&!Ip(t)?t:Fg().withMutations((function(r){var n=e(t);Jm(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Fg().withMutations((function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Wg(this,e,t)},t.prototype.remove=function(e){return Wg(this,e,lp)},t.prototype.deleteAll=function(e){var t=Rp(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Fg()},t.prototype.sort=function(e){return oy(jm(this,e))},t.prototype.sortBy=function(e,t){return oy(jm(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(o,i){n.set(i,e.call(t,o,i,r))}))}))},t.prototype.__iterator=function(e,t){return new Mg(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ig(this.size,this._root,e,this.__hash):0===this.size?Fg():(this.__ownerID=e,this.__altered=!1,this)},t}(_p);xg.isMap=rm;var Eg=xg.prototype;Eg["@@__IMMUTABLE_MAP__@@"]=!0,Eg.delete=Eg.remove,Eg.removeAll=Eg.deleteAll,Eg.setIn=ng,Eg.removeIn=Eg.deleteIn=og,Eg.update=sg,Eg.updateIn=ag,Eg.merge=Eg.concat=cg,Eg.mergeWith=lg,Eg.mergeDeep=fg,Eg.mergeDeepWith=pg,Eg.mergeIn=mg,Eg.mergeDeepIn=gg,Eg.withMutations=yg,Eg.wasAltered=wg,Eg.asImmutable=vg,Eg["@@transducer/init"]=Eg.asMutable=bg,Eg["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Eg["@@transducer/result"]=function(e){return e.asImmutable()};var Ag=function(e,t){this.ownerID=e,this.entries=t};Ag.prototype.get=function(e,t,r,n){for(var o=this.entries,i=0,s=o.length;i<s;i++)if(im(r,o[i][0]))return o[i][1];return n},Ag.prototype.update=function(e,t,r,n,o,i,s){for(var a=o===lp,c=this.entries,l=0,u=c.length;l<u&&!im(n,c[l][0]);l++);var d=l<u;if(d?c[l][1]===o:a)return this;if(up(s),(a||!d)&&up(i),!a||1!==c.length){if(!d&&!a&&c.length>=Vg)return function(e,t,r,n){e||(e=new dp);for(var o=new Sg(e,lm(r),[r,n]),i=0;i<t.length;i++){var s=t[i];o=o.update(e,0,void 0,s[0],s[1])}return o}(e,c,n,o);var h=e&&e===this.ownerID,f=h?c:Ym(c);return d?a?l===u-1?f.pop():f[l]=f.pop():f[l]=[n,o]:f.push([n,o]),h?(this.entries=f,this):new Ag(e,f)}};var Rg=function(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r};Rg.prototype.get=function(e,t,r,n){void 0===t&&(t=lm(r));var o=1<<(31&(0===e?t:t>>>e)),i=this.bitmap;return 0==(i&o)?n:this.nodes[Dg(i&o-1)].get(e+5,t,r,n)},Rg.prototype.update=function(e,t,r,n,o,i,s){void 0===r&&(r=lm(n));var a=31&(0===t?r:r>>>t),c=1<<a,l=this.bitmap,u=0!=(l&c);if(!u&&o===lp)return this;var d=Dg(l&c-1),h=this.nodes,f=u?h[d]:void 0,p=Cg(f,e,t+5,r,n,o,i,s);if(p===f)return this;if(!u&&p&&h.length>=Pg)return function(e,t,r,n,o){for(var i=0,s=new Array(32),a=0;0!==r;a++,r>>>=1)s[a]=1&r?t[i++]:void 0;return s[n]=o,new _g(e,i+1,s)}(e,h,l,a,p);if(u&&!p&&2===h.length&&jg(h[1^d]))return h[1^d];if(u&&p&&1===h.length&&jg(p))return p;var m=e&&e===this.ownerID,g=u?p?l:l^c:l|c,y=u?p?Bg(h,d,p,m):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var o=new Array(n),i=0,s=0;s<n;s++)s===t&&(i=1),o[s]=e[s+i];return o}(h,d,m):function(e,t,r,n){var o=e.length+1;if(n&&t+1===o)return e[t]=r,e;for(var i=new Array(o),s=0,a=0;a<o;a++)a===t?(i[a]=r,s=-1):i[a]=e[a+s];return i}(h,d,p,m);return m?(this.bitmap=g,this.nodes=y,this):new Rg(e,g,y)};var _g=function(e,t,r){this.ownerID=e,this.count=t,this.nodes=r};_g.prototype.get=function(e,t,r,n){void 0===t&&(t=lm(r));var o=31&(0===e?t:t>>>e),i=this.nodes[o];return i?i.get(e+5,t,r,n):n},_g.prototype.update=function(e,t,r,n,o,i,s){void 0===r&&(r=lm(n));var a=31&(0===t?r:r>>>t),c=o===lp,l=this.nodes,u=l[a];if(c&&!u)return this;var d=Cg(u,e,t+5,r,n,o,i,s);if(d===u)return this;var h=this.count;if(u){if(!d&&--h<Zg)return function(e,t,r,n){for(var o=0,i=0,s=new Array(r),a=0,c=1,l=t.length;a<l;a++,c<<=1){var u=t[a];void 0!==u&&a!==n&&(o|=c,s[i++]=u)}return new Rg(e,o,s)}(e,l,h,a)}else h++;var f=e&&e===this.ownerID,p=Bg(l,a,d,f);return f?(this.count=h,this.nodes=p,this):new _g(e,h,p)};var kg=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r};kg.prototype.get=function(e,t,r,n){for(var o=this.entries,i=0,s=o.length;i<s;i++)if(im(r,o[i][0]))return o[i][1];return n},kg.prototype.update=function(e,t,r,n,o,i,s){void 0===r&&(r=lm(n));var a=o===lp;if(r!==this.keyHash)return a?this:(up(s),up(i),Ug(this,e,t,r,[n,o]));for(var c=this.entries,l=0,u=c.length;l<u&&!im(n,c[l][0]);l++);var d=l<u;if(d?c[l][1]===o:a)return this;if(up(s),(a||!d)&&up(i),a&&2===u)return new Sg(e,this.keyHash,c[1^l]);var h=e&&e===this.ownerID,f=h?c:Ym(c);return d?a?l===u-1?f.pop():f[l]=f.pop():f[l]=[n,o]:f.push([n,o]),h?(this.entries=f,this):new kg(e,this.keyHash,f)};var Sg=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r};Sg.prototype.get=function(e,t,r,n){return im(r,this.entry[0])?this.entry[1]:n},Sg.prototype.update=function(e,t,r,n,o,i,s){var a=o===lp,c=im(n,this.entry[0]);return(c?o===this.entry[1]:a)?this:(up(s),a?void up(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Sg(e,this.keyHash,[n,o]):(up(i),Ug(this,e,t,lm(n),[n,o])))},Ag.prototype.iterate=kg.prototype.iterate=function(e,t){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(!1===e(r[t?o-n:n]))return!1},Rg.prototype.iterate=_g.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[t?o-n:n];if(i&&!1===i.iterate(e,t))return!1}},Sg.prototype.iterate=function(e,t){return e(this.entry)};var Ng,Mg=function(e){function t(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&Og(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r=t.node,n=t.index++,o=void 0;if(r.entry){if(0===n)return Tg(e,r.entry)}else if(r.entries){if(n<=(o=r.entries.length-1))return Tg(e,r.entries[this._reverse?o-n:n])}else if(n<=(o=r.nodes.length-1)){var i=r.nodes[this._reverse?o-n:n];if(i){if(i.entry)return Tg(e,i.entry);t=this._stack=Og(i,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(Cp);function Tg(e,t){return jp(e,t[0],t[1])}function Og(e,t){return{node:e,index:0,__prev:t}}function Ig(e,t,r,n){var o=Object.create(Eg);return o.size=e,o._root=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Fg(){return Ng||(Ng=Ig(0))}function Wg(e,t,r){var n,o;if(e._root){var i={value:!1},s={value:!1};if(n=Cg(e._root,e.__ownerID,0,void 0,t,r,i,s),!s.value)return e;o=e.size+(i.value?r===lp?-1:1:0)}else{if(r===lp)return e;o=1,n=new Ag(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=o,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?Ig(o,n):Fg()}function Cg(e,t,r,n,o,i,s,a){return e?e.update(t,r,n,o,i,s,a):i===lp?e:(up(a),up(s),new Sg(t,n,[o,i]))}function jg(e){return e.constructor===Sg||e.constructor===kg}function Ug(e,t,r,n,o){if(e.keyHash===n)return new kg(t,n,[e.entry,o]);var i,s=31&(0===r?e.keyHash:e.keyHash>>>r),a=31&(0===r?n:n>>>r),c=s===a?[Ug(e,t,r+5,n,o)]:(i=new Sg(t,n,o),s<a?[e,i]:[i,e]);return new Rg(t,1<<s|1<<a,c)}function Dg(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Bg(e,t,r,n){var o=n?e:Ym(e);return o[t]=r,o}var Vg=8,Pg=16,Zg=8;function zg(e){return Boolean(e&&e["@@__IMMUTABLE_LIST__@@"])}var Lg=function(e){function t(t){var r=Kg();if(null==t)return r;if(zg(t))return t;var n=e(t),o=n.size;return 0===o?r:(Jm(o),o>0&&o<32?qg(0,o,5,null,new Yg(n.toArray())):r.withMutations((function(e){e.setSize(o),n.forEach((function(t,r){return e.set(r,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=fp(this,e))>=0&&e<this.size){var r=ey(this,e+=this._origin);return r&&r.array[31&e]}return t},t.prototype.set=function(e,t){return function(e,t,r){if((t=fp(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?ty(e,t).set(0,r):ty(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,o=e._root,i={value:!1};t>=ry(e._capacity)?n=Qg(n,e.__ownerID,0,t,r,i):o=Qg(o,e.__ownerID,e._level,t,r,i);if(!i.value)return e;if(e.__ownerID)return e._root=o,e._tail=n,e.__hash=void 0,e.__altered=!0,e;return qg(e._origin,e._capacity,e._level,o,n)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):Kg()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){ty(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n])}))},t.prototype.pop=function(){return ty(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){ty(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r])}))},t.prototype.shift=function(){return ty(this,1)},t.prototype.concat=function(){for(var t=arguments,r=[],n=0;n<arguments.length;n++){var o=t[n],i=e("string"!=typeof o&&Dp(o)?o:[o]);0!==i.size&&r.push(i)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(e){r.forEach((function(t){return t.forEach((function(t){return e.push(t)}))}))})):this.constructor(r[0])},t.prototype.setSize=function(e){return ty(this,0,e)},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){for(var o=0;o<r.size;o++)n.set(o,e.call(t,n.get(o),o,r))}))},t.prototype.slice=function(e,t){var r=this.size;return mp(e,t,r)?this:ty(this,gp(e,r),yp(t,r))},t.prototype.__iterator=function(e,t){var r=t?this.size:0,n=Gg(this,t);return new Cp((function(){var o=n();return o===Jg?{value:void 0,done:!0}:jp(e,t?--r:r++,o)}))},t.prototype.__iterate=function(e,t){for(var r,n=t?this.size:0,o=Gg(this,t);(r=o())!==Jg&&!1!==e(r,t?--n:n++,this););return n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qg(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?Kg():(this.__ownerID=e,this.__altered=!1,this)},t}(kp);Lg.isList=zg;var Hg=Lg.prototype;Hg["@@__IMMUTABLE_LIST__@@"]=!0,Hg.delete=Hg.remove,Hg.merge=Hg.concat,Hg.setIn=ng,Hg.deleteIn=Hg.removeIn=og,Hg.update=sg,Hg.updateIn=ag,Hg.mergeIn=mg,Hg.mergeDeepIn=gg,Hg.withMutations=yg,Hg.wasAltered=wg,Hg.asImmutable=vg,Hg["@@transducer/init"]=Hg.asMutable=bg,Hg["@@transducer/step"]=function(e,t){return e.push(t)},Hg["@@transducer/result"]=function(e){return e.asImmutable()};var Yg=function(e,t){this.array=e,this.ownerID=t};Yg.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&31;if(n>=this.array.length)return new Yg([],e);var o,i=0===n;if(t>0){var s=this.array[n];if((o=s&&s.removeBefore(e,t-5,r))===s&&i)return this}if(i&&!o)return this;var a=$g(this,e);if(!i)for(var c=0;c<n;c++)a.array[c]=void 0;return o&&(a.array[n]=o),a},Yg.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n,o=r-1>>>t&31;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((n=i&&i.removeAfter(e,t-5,r))===i&&o===this.array.length-1)return this}var s=$g(this,e);return s.array.splice(o+1),n&&(s.array[o]=n),s};var Xg,Jg={};function Gg(e,t){var r=e._origin,n=e._capacity,o=ry(n),i=e._tail;return s(e._root,e._level,0);function s(e,a,c){return 0===a?function(e,s){var a=s===o?i&&i.array:e&&e.array,c=s>r?0:r-s,l=n-s;l>32&&(l=32);return function(){if(c===l)return Jg;var e=t?--l:c++;return a&&a[e]}}(e,c):function(e,o,i){var a,c=e&&e.array,l=i>r?0:r-i>>o,u=1+(n-i>>o);u>32&&(u=32);return function(){for(;;){if(a){var e=a();if(e!==Jg)return e;a=null}if(l===u)return Jg;var r=t?--u:l++;a=s(c&&c[r],o-5,i+(r<<o))}}}(e,a,c)}}function qg(e,t,r,n,o,i,s){var a=Object.create(Hg);return a.size=t-e,a._origin=e,a._capacity=t,a._level=r,a._root=n,a._tail=o,a.__ownerID=i,a.__hash=s,a.__altered=!1,a}function Kg(){return Xg||(Xg=qg(0,0,5))}function Qg(e,t,r,n,o,i){var s,a=n>>>r&31,c=e&&a<e.array.length;if(!c&&void 0===o)return e;if(r>0){var l=e&&e.array[a],u=Qg(l,t,r-5,n,o,i);return u===l?e:((s=$g(e,t)).array[a]=u,s)}return c&&e.array[a]===o?e:(i&&up(i),s=$g(e,t),void 0===o&&a===s.array.length-1?s.array.pop():s.array[a]=o,s)}function $g(e,t){return t&&e&&t===e.ownerID?e:new Yg(e?e.array.slice():[],t)}function ey(e,t){if(t>=ry(e._capacity))return e._tail;if(t<1<<e._level+5){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&31],n-=5;return r}}function ty(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new dp,o=e._origin,i=e._capacity,s=o+t,a=void 0===r?i:r<0?i+r:o+r;if(s===o&&a===i)return e;if(s>=a)return e.clear();for(var c=e._level,l=e._root,u=0;s+u<0;)l=new Yg(l&&l.array.length?[void 0,l]:[],n),u+=1<<(c+=5);u&&(s+=u,o+=u,a+=u,i+=u);for(var d=ry(i),h=ry(a);h>=1<<c+5;)l=new Yg(l&&l.array.length?[l]:[],n),c+=5;var f=e._tail,p=h<d?ey(e,a-1):h>d?new Yg([],n):f;if(f&&h>d&&s<i&&f.array.length){for(var m=l=$g(l,n),g=c;g>5;g-=5){var y=d>>>g&31;m=m.array[y]=$g(m.array[y],n)}m.array[d>>>5&31]=f}if(a<i&&(p=p&&p.removeAfter(n,0,a)),s>=h)s-=h,a-=h,c=5,l=null,p=p&&p.removeBefore(n,0,s);else if(s>o||h<d){for(u=0;l;){var b=s>>>c&31;if(b!==h>>>c&31)break;b&&(u+=(1<<c)*b),c-=5,l=l.array[b]}l&&s>o&&(l=l.removeBefore(n,c,s-u)),l&&h<d&&(l=l.removeAfter(n,c,h-u)),u&&(s-=u,a-=u)}return e.__ownerID?(e.size=a-s,e._origin=s,e._capacity=a,e._level=c,e._root=l,e._tail=p,e.__hash=void 0,e.__altered=!0,e):qg(s,a,c,l,p)}function ry(e){return e<32?0:e-1>>>5<<5}var ny,oy=function(e){function t(e){return null==e?sy():nm(e)?e:sy().withMutations((function(t){var r=_p(e);Jm(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):sy()},t.prototype.set=function(e,t){return ay(this,e,t)},t.prototype.remove=function(e){return ay(this,e,lp)},t.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],r)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?iy(t,r,e,this.__hash):0===this.size?sy():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=r,this)},t}(xg);function iy(e,t,r,n){var o=Object.create(oy.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function sy(){return ny||(ny=iy(Fg(),Kg()))}function ay(e,t,r){var n,o,i=e._map,s=e._list,a=i.get(t),c=void 0!==a;if(r===lp){if(!c)return e;s.size>=32&&s.size>=2*i.size?(n=(o=s.filter((function(e,t){return void 0!==e&&a!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=o.__ownerID=e.__ownerID)):(n=i.remove(t),o=a===s.size-1?s.pop():s.set(a,void 0))}else if(c){if(r===s.get(a)[1])return e;n=i,o=s.set(a,[t,r])}else n=i.set(t,s.size),o=s.set(s.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=o,e.__hash=void 0,e.__altered=!0,e):iy(n,o)}oy.isOrderedMap=nm,oy.prototype[Op]=!0,oy.prototype.delete=oy.prototype.remove;function cy(e){return Boolean(e&&e["@@__IMMUTABLE_STACK__@@"])}var ly=function(e){function t(e){return null==e?fy():cy(e)?e:fy().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=fp(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):hy(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&cy(t))return t;Jm(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):hy(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):fy()},t.prototype.slice=function(t,r){if(mp(t,r,this.size))return this;var n=gp(t,this.size);if(yp(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):hy(o,i)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?hy(this.size,this._head,e,this.__hash):0===this.size?fy():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new Jp(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,o=this._head;o&&!1!==e(o.value,n++,this);)o=o.next;return n},t.prototype.__iterator=function(e,t){if(t)return new Jp(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new Cp((function(){if(n){var t=n.value;return n=n.next,jp(e,r++,t)}return{value:void 0,done:!0}}))},t}(kp);ly.isStack=cy;var uy,dy=ly.prototype;function hy(e,t,r,n){var o=Object.create(dy);return o.size=e,o._head=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function fy(){return uy||(uy=hy(0))}dy["@@__IMMUTABLE_STACK__@@"]=!0,dy.shift=dy.pop,dy.unshift=dy.push,dy.unshiftAll=dy.pushAll,dy.withMutations=yg,dy.wasAltered=wg,dy.asImmutable=vg,dy["@@transducer/init"]=dy.asMutable=bg,dy["@@transducer/step"]=function(e,t){return e.unshift(t)},dy["@@transducer/result"]=function(e){return e.asImmutable()};function py(e){return Boolean(e&&e["@@__IMMUTABLE_SET__@@"])}function my(e){return py(e)&&Ip(e)}function gy(e,t){if(e===t)return!0;if(!wp(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||xp(e)!==xp(t)||Ep(e)!==Ep(t)||Ip(e)!==Ip(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!Ap(e);if(Ip(e)){var n=e.entries();return t.every((function(e,t){var o=n.next().value;return o&&im(o[1],e)&&(r||im(o[0],t))}))&&n.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var s=!0,a=t.__iterate((function(t,n){if(r?!e.has(t):o?!im(t,e.get(n,lp)):!im(e.get(n,lp),t))return s=!1,!1}));return s&&e.size===a}function yy(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function by(e){if(!e||"object"!=typeof e)return e;if(!wp(e)){if(!Km(e))return e;e=Lp(e)}if(xp(e)){var t={};return e.__iterate((function(e,r){t[r]=by(e)})),t}var r=[];return e.__iterate((function(e){r.push(by(e))})),r}var vy=function(e){function t(t){return null==t?Ry():py(t)&&!Ip(t)?t:Ry().withMutations((function(r){var n=e(t);Jm(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(_p(e).keySeq())},t.intersect=function(e){return(e=Rp(e).toArray()).length?xy.intersect.apply(t(e.pop()),e):Ry()},t.union=function(e){return(e=Rp(e).toArray()).length?xy.union.apply(t(e.pop()),e):Ry()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Ey(this,this._map.set(e,e))},t.prototype.remove=function(e){return Ey(this,this._map.remove(e))},t.prototype.clear=function(){return Ey(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,o=Ey(this,this._map.mapEntries((function(o){var i=o[1],s=e.call(t,i,i,r);return s!==i&&(n=!0),[s,s]}),t));return n?o:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return t=t.filter((function(e){return 0!==e.size})),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n<t.length;n++)e(t[n]).forEach((function(e){return r.add(e)}))})):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var n=[];return this.forEach((function(e){t.every((function(t){return t.includes(e)}))||n.push(e)})),this.withMutations((function(e){n.forEach((function(t){e.remove(t)}))}))},t.prototype.subtract=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var n=[];return this.forEach((function(e){t.some((function(t){return t.includes(e)}))&&n.push(e)})),this.withMutations((function(e){n.forEach((function(t){e.remove(t)}))}))},t.prototype.sort=function(e){return Zy(jm(this,e))},t.prototype.sortBy=function(e,t){return Zy(jm(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate((function(t){return e(t,t,r)}),t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Sp);vy.isSet=py;var wy,xy=vy.prototype;function Ey(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ay(e,t){var r=Object.create(xy);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Ry(){return wy||(wy=Ay(Fg()))}xy["@@__IMMUTABLE_SET__@@"]=!0,xy.delete=xy.remove,xy.merge=xy.concat=xy.union,xy.withMutations=yg,xy.asImmutable=vg,xy["@@transducer/init"]=xy.asMutable=bg,xy["@@transducer/step"]=function(e,t){return e.add(t)},xy["@@transducer/result"]=function(e){return e.asImmutable()},xy.__empty=Ry,xy.__make=Ay;var _y,ky=function(e){function t(e,r,n){if(!(this instanceof t))return new t(e,r,n);if(Xm(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<e&&(n=-n),this._start=e,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-e)/n-1)+1),0===this.size){if(_y)return _y;_y=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+fp(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,r){return mp(e,r,this.size)?this:(e=gp(e,this.size),(r=yp(r,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(r,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var r=t/this._step;if(r>=0&&r<this.size)return r}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var r=this.size,n=this._step,o=t?this._start+(r-1)*n:this._start,i=0;i!==r&&!1!==e(o,t?r-++i:i++,this);)o+=t?-n:n;return i},t.prototype.__iterator=function(e,t){var r=this.size,n=this._step,o=t?this._start+(r-1)*n:this._start,i=0;return new Cp((function(){if(i===r)return{value:void 0,done:!0};var s=o;return o+=t?-n:n,jp(e,t?r-++i:i++,s)}))},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:gy(this,e)},t}(Yp);function Sy(e,t,r){for(var n=Gm(t),o=0;o!==n.length;)if((e=$m(e,n[o++],lp))===lp)return r;return e}function Ny(e,t){return Sy(this,e,t)}function My(){Jm(this.size);var e={};return this.__iterate((function(t,r){e[r]=t})),e}Rp.isIterable=wp,Rp.isKeyed=xp,Rp.isIndexed=Ep,Rp.isAssociative=Ap,Rp.isOrdered=Ip,Rp.Iterator=Cp,yy(Rp,{toArray:function(){Jm(this.size);var e=new Array(this.size||0),t=xp(this),r=0;return this.__iterate((function(n,o){e[r++]=t?[o,n]:n})),e},toIndexedSeq:function(){return new _m(this)},toJS:function(){return by(this)},toKeyedSeq:function(){return new Rm(this,!0)},toMap:function(){return xg(this.toKeyedSeq())},toObject:My,toOrderedMap:function(){return oy(this.toKeyedSeq())},toOrderedSet:function(){return Zy(xp(this)?this.valueSeq():this)},toSet:function(){return vy(xp(this)?this.valueSeq():this)},toSetSeq:function(){return new km(this)},toSeq:function(){return Ep(this)?this.toIndexedSeq():xp(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return ly(xp(this)?this.valueSeq():this)},toList:function(){return Lg(xp(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Vm(this,Wm(this,e))},includes:function(e){return this.some((function(t){return im(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Jm(this.size);var r=!0;return this.__iterate((function(n,o,i){if(!e.call(t,n,o,i))return r=!1,!1})),r},filter:function(e,t){return Vm(this,Om(this,e,t,!0))},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},forEach:function(e,t){return Jm(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Jm(this.size),e=void 0!==e?""+e:",";var t="",r=!0;return this.__iterate((function(n){r?r=!1:t+=e,t+=null!=n?n.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Vm(this,Mm(this,e,t))},reduce:function(e,t,r){return Wy(this,e,t,r,arguments.length<2,!1)},reduceRight:function(e,t,r){return Wy(this,e,t,r,arguments.length<2,!0)},reverse:function(){return Vm(this,Tm(this,!0))},slice:function(e,t){return Vm(this,Im(this,e,t,!0))},some:function(e,t){return!this.every(Uy(e),t)},sort:function(e){return Vm(this,jm(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return hp(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,r){var n=xg().asMutable();return e.__iterate((function(o,i){n.update(t.call(r,o,i,e),0,(function(e){return e+1}))})),n.asImmutable()}(this,e,t)},equals:function(e){return gy(this,e)},entrySeq:function(){var e=this;if(e._cache)return new Jp(e._cache);var t=e.toSeq().map(jy).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Uy(e),t)},findEntry:function(e,t,r){var n=r;return this.__iterate((function(r,o,i){if(e.call(t,r,o,i))return n=[o,r],!1})),n},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},findLastEntry:function(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(pp,null,e)},flatMap:function(e,t){return Vm(this,function(e,t,r){var n=Zm(e);return e.toSeq().map((function(o,i){return n(t.call(r,o,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Vm(this,Cm(this,e,!0))},fromEntrySeq:function(){return new Sm(this)},get:function(e,t){return this.find((function(t,r){return im(r,e)}),void 0,t)},getIn:Ny,groupBy:function(e,t){return function(e,t,r){var n=xp(e),o=(Ip(e)?oy():xg()).asMutable();e.__iterate((function(i,s){o.update(t.call(r,i,s,e),(function(e){return(e=e||[]).push(n?[s,i]:i),e}))}));var i=Zm(e);return o.map((function(t){return Vm(e,i(t))})).asImmutable()}(this,e,t)},has:function(e){return this.get(e,lp)!==lp},hasIn:function(e){return Sy(this,e,lp)!==lp},isSubset:function(e){return e="function"==typeof e.includes?e:Rp(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:Rp(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return im(t,e)}))},keySeq:function(){return this.toSeq().map(Cy).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Um(this,e)},maxBy:function(e,t){return Um(this,t,e)},min:function(e){return Um(this,e?Dy(e):Vy)},minBy:function(e,t){return Um(this,t?Dy(t):Vy,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return Vm(this,Fm(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Uy(e),t)},sortBy:function(e,t){return Vm(this,jm(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return Vm(this,function(e,t,r){var n=zm(e);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var s=0;return e.__iterate((function(e,o,a){return t.call(r,e,o,a)&&++s&&n(e,o,i)})),s},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var s=e.__iterator(2,o),a=!0;return new Cp((function(){if(!a)return{value:void 0,done:!0};var e=s.next();if(e.done)return e;var o=e.value,c=o[0],l=o[1];return t.call(r,l,c,i)?2===n?e:jp(n,c,l,e):(a=!1,{value:void 0,done:!0})}))},n}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Uy(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=Ip(e),r=xp(e),n=t?1:0,o=e.__iterate(r?t?function(e,t){n=31*n+Py(lm(e),lm(t))|0}:function(e,t){n=n+Py(lm(e),lm(t))|0}:t?function(e){n=31*n+lm(e)|0}:function(e){n=n+lm(e)|0});return function(e,t){return t=sm(t,3432918353),t=sm(t<<15|t>>>-15,461845907),t=sm(t<<13|t>>>-13,5),t=sm((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=am((t=sm(t^t>>>13,3266489909))^t>>>16)}(o,n)}(this))}});var Ty=Rp.prototype;Ty["@@__IMMUTABLE_ITERABLE__@@"]=!0,Ty[Wp]=Ty.values,Ty.toJSON=Ty.toArray,Ty.__toStringMapper=Qm,Ty.inspect=Ty.toSource=function(){return this.toString()},Ty.chain=Ty.flatMap,Ty.contains=Ty.includes,yy(_p,{flip:function(){return Vm(this,Nm(this))},mapEntries:function(e,t){var r=this,n=0;return Vm(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return Vm(this,this.toSeq().flip().map((function(n,o){return e.call(t,n,o,r)})).flip())}});var Oy=_p.prototype;Oy["@@__IMMUTABLE_KEYED__@@"]=!0,Oy[Wp]=Ty.entries,Oy.toJSON=My,Oy.__toStringMapper=function(e,t){return Qm(t)+": "+Qm(e)},yy(kp,{toKeyedSeq:function(){return new Rm(this,!1)},filter:function(e,t){return Vm(this,Om(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Vm(this,Tm(this,!1))},slice:function(e,t){return Vm(this,Im(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=gp(e,e<0?this.count():this.size);var n=this.slice(0,e);return Vm(this,1===r?n:n.concat(Ym(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return Vm(this,Cm(this,e,!1))},get:function(e,t){return(e=fp(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=fp(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Vm(this,function(e,t){var r=zm(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return e.__iterate((function(e){return(!i||!1!==r(t,i++,o))&&!1!==r(e,i++,o)}),n),i},r.__iteratorUncached=function(r,n){var o,i=e.__iterator(1,n),s=0;return new Cp((function(){return(!o||s%2)&&(o=i.next()).done?o:s%2?jp(r,s++,t):jp(r,s++,o.value,o)}))},r}(this,e))},interleave:function(){var e=[this].concat(Ym(arguments)),t=Bm(this.toSeq(),Yp.of,e),r=t.flatten(!0);return t.size&&(r.size=t.size*e.length),Vm(this,r)},keySeq:function(){return ky(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return Vm(this,Fm(this,e,t,!1))},zip:function(){var e=[this].concat(Ym(arguments));return Vm(this,Bm(this,By,e))},zipAll:function(){var e=[this].concat(Ym(arguments));return Vm(this,Bm(this,By,e,!0))},zipWith:function(e){var t=Ym(arguments);return t[0]=this,Vm(this,Bm(this,e,t))}});var Iy=kp.prototype;Iy["@@__IMMUTABLE_INDEXED__@@"]=!0,Iy[Op]=!0,yy(Sp,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var Fy=Sp.prototype;function Wy(e,t,r,n,o,i){return Jm(e.size),e.__iterate((function(e,i,s){o?(o=!1,r=e):r=t.call(n,r,e,i,s)}),i),r}function Cy(e,t){return t}function jy(e,t){return[t,e]}function Uy(e){return function(){return!e.apply(this,arguments)}}function Dy(e){return function(){return-e.apply(this,arguments)}}function By(){return Ym(arguments)}function Vy(e,t){return e<t?1:e>t?-1:0}function Py(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Fy.has=Ty.includes,Fy.contains=Fy.includes,Fy.keys=Fy.values,yy(Hp,Oy),yy(Yp,Iy),yy(Xp,Fy);var Zy=function(e){function t(e){return null==e?Yy():my(e)?e:Yy().withMutations((function(t){var r=Sp(e);Jm(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(_p(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(vy);Zy.isOrderedSet=my;var zy,Ly=Zy.prototype;function Hy(e,t){var r=Object.create(Ly);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Yy(){return zy||(zy=Hy(sy()))}Ly[Op]=!0,Ly.zip=Iy.zip,Ly.zipWith=Iy.zipWith,Ly.zipAll=Iy.zipAll,Ly.__empty=Yy,Ly.__make=Hy;var Xy=function(e,t){var r;!function(e){if(Mp(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Tp(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(i){var s=this;if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var a=Object.keys(e),c=o._indices={};o._name=t,o._keys=a,o._defaultValues=e;for(var l=0;l<a.length;l++){var u=a[l];c[u]=l,o[u]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+qy(this)+' with property "'+u+'" since that property name is part of the Record API.'):Qy(o,u)}}return this.__ownerID=void 0,this._values=Lg().withMutations((function(e){e.setSize(s._keys.length),_p(i).forEach((function(t,r){e.set(s._indices[r],t===s._defaultValues[r]?void 0:t)}))})),this},o=n.prototype=Object.create(Jy);return o.constructor=n,t&&(n.displayName=t),n};Xy.prototype.toString=function(){for(var e,t=qy(this)+" { ",r=this._keys,n=0,o=r.length;n!==o;n++)t+=(n?", ":"")+(e=r[n])+": "+Qm(this.get(e));return t+" }"},Xy.prototype.equals=function(e){return this===e||Mp(e)&&Ky(this).equals(Ky(e))},Xy.prototype.hashCode=function(){return Ky(this).hashCode()},Xy.prototype.has=function(e){return this._indices.hasOwnProperty(e)},Xy.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._indices[e],n=this._values.get(r);return void 0===n?this._defaultValues[e]:n},Xy.prototype.set=function(e,t){if(this.has(e)){var r=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(r!==this._values&&!this.__ownerID)return Gy(this,r)}return this},Xy.prototype.remove=function(e){return this.set(e)},Xy.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Gy(this,e)},Xy.prototype.wasAltered=function(){return this._values.wasAltered()},Xy.prototype.toSeq=function(){return Ky(this)},Xy.prototype.toJS=function(){return by(this)},Xy.prototype.entries=function(){return this.__iterator(2)},Xy.prototype.__iterator=function(e,t){return Ky(this).__iterator(e,t)},Xy.prototype.__iterate=function(e,t){return Ky(this).__iterate(e,t)},Xy.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?Gy(this,t,e):(this.__ownerID=e,this._values=t,this)},Xy.isRecord=Mp,Xy.getDescriptiveName=qy;var Jy=Xy.prototype;function Gy(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function qy(e){return e.constructor.displayName||e.constructor.name||"Record"}function Ky(e){return $p(e._keys.map((function(t){return[t,e.get(t)]})))}function Qy(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Xm(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}Jy["@@__IMMUTABLE_RECORD__@@"]=!0,Jy.delete=Jy.remove,Jy.deleteIn=Jy.removeIn=og,Jy.getIn=Ny,Jy.hasIn=Ty.hasIn,Jy.merge=cg,Jy.mergeWith=lg,Jy.mergeIn=mg,Jy.mergeDeep=fg,Jy.mergeDeepWith=pg,Jy.mergeDeepIn=gg,Jy.setIn=ng,Jy.update=sg,Jy.updateIn=ag,Jy.withMutations=yg,Jy.asMutable=bg,Jy.asImmutable=vg,Jy[Wp]=Jy.entries,Jy.toJSON=Jy.toObject=Ty.toObject,Jy.inspect=Jy.toSource=function(){return this.toString()};var $y;function eb(){const e=cp(),[t,r]=f($y.Initial),[n,o]=f(Lg([])),i=g((()=>Bs(this,void 0,void 0,(function*(){try{r($y.Loading);const t=(e=>({[Is.ARBITRUM_ONE]:"https://tokens.coingecko.com/arbitrum-one/all.json",[Is.AURORA]:"https://tokens.coingecko.com/aurora/all.json",[Is.BSC]:"https://tokens.coingecko.com/binance-smart-chain/all.json"}[e]||"https://tokens.coingecko.com/uniswap/all.json"))(e),n=yield te.get(t);n&&n.data&&n.data.tokens&&o(Lg(n.data.tokens)),r($y.Success)}catch(e){r($y.Failed),console.error(e)}}))),[e]);return p((()=>{e&&i()}),[e]),{cgTokenList:n,loading:t===$y.Loading,refetch:i}}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}($y||($y={}));var tb=[{chainId:1,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/prKmKP8yDTuPMHTCZ_DcxG8BqsuHNO8w5KDmJWmPodg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOUVaWU1ER2ZVN3g2N3ZBZThqWkUxZzA0RExUaFhaV0JIb09wZFhpeXhHRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTVRBeU4xOHhNekkyTjJGbE5EY3dMbkJ1WncucG5n.webp"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp"},{chainId:1,address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",name:"Binance USD",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/xZmadzpVOnpuq2jNG_5EGKeqMET0LU_gmfnp4VxkcxI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSHQwWXZKMGNnU0lGTFM0aHExTV9jOXVITV9fMHpXaHBKSGVOQU5neTBuby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkoxYzJSZk4ySTJOalJpWWpReVpDOWlkWE5rWHpkaU5qWTBZbUkwTW1RdWNHNW4ucG5n.webp"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/h2lbKBfBJ2LNSTNCuwjsBkshT4eXzDDmAV0lhWS0llA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUnVJNWt2eHBwalI4TTZsenFZZVAyTTB4eVFMUGJ0S1hONDdWVTN1dUszZy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpBNU5qUmpPVFUxT1M1d2JtYy5wbmc.webp"},{chainId:1,address:"0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/mI69kq-S-tNT1W57qYizPd5r2WNFzpAq5y6NhOcrTkY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVEZhSVNLVVZIWThLTVhyTkVmZDRXRUJmMGJoSHRweHY3Q1hDT0dKbGY2by9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT0dVeFpEaG1PVEEyWlM1d2JtYy5wbmc.webp"},{chainId:4,address:"0x99cf6999fc481663fb10be55827f3584e3c25f3c",name:"LINE",decimals:18,symbol:"LINE",logoURI:""},{chainId:4,address:"0xeaa70c2a40820dF9D38149C84dd943CFcB562587",name:"DODO",decimals:18,symbol:"DODO",logoURI:""},{chainId:4,address:"0xB26c0d8Be2960c70641A95A9195BE1f59Ac83aC0",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:""},{chainId:4,address:"0xab0733588776B8881F7712f6AbCa98F510e6B63D",name:"USDC",decimals:6,symbol:"USDC",logoURI:""},{chainId:4,address:"0x0aDCBAE18580120667f7Ff6c6451A426B13c67B7",name:"USDT Token",decimals:6,symbol:"USDT",logoURI:""},{chainId:4,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,symbol:"ETH",logoURI:""},{chainId:5,symbol:"USDC",address:"0xC4106029d03c33731Ca01Ba59b5A6368c660E596",name:"USDC",decimals:6,logoURI:""},{chainId:5,symbol:"USDT",address:"0xed8a325D87D3b6edED04FB992A1482231647EE5e",name:"USDT Token",decimals:6,logoURI:""},{chainId:5,symbol:"WETH",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",name:"Wrapped Ether",decimals:18,logoURI:""},{chainId:5,symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,logoURI:""},{chainId:56,address:"0xe9e7cea3dedca5984780bafc599bd69add087d56",name:"BUSD Token",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/BvxyffA5gsLB4bLmlOVkfu7AVami78-VcW_6_i8I6kc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vbC1Sa25meFB3ZXlCOGVYSWJ2b04wdHczLTlzckZOckxfRHdTTnRLSHVRRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZlluVnpaRjgyTXpsbFlqZzNZV0V4WDJKMWMyUmZOak01WldJNE4yRmhNVjlsT1dVMVlXRTBOemxtTG5OMlp3LnN2Zw.webp"},{chainId:56,address:"0x55d398326f99059ff775485246999027b3197955",name:"Tether USD",decimals:18,symbol:"USDT",logoURI:"https://cmp.dodoex.io/QOl7CvP_WSmTUOMthbxQsNKjDj0s5kSjup69dW_-UeA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTjdQU3RXV2ZGaGNTVzM1QlE2TEJIaF9keVROUEJqa1RLTXRwTll5cEhSWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZmRYTmtkRjh4TlRZME1XWmpaRFF3WDNWelpIUmZNVFUyTkRGbVkyUTBNRjlqWmpJMVpUYzVZVE5qTG5OMlp3LnN2Zw.webp"},{chainId:56,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://cmp.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:56,address:"0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c",name:"BTCB Token",decimals:18,symbol:"BTCB",logoURI:"https://cmp.dodoex.io/fZG0z_RZ1U73_LuuC3RGrrZvNR-bgrCUjkwvaro-PCY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZ1NXN0RuYWNkMnc2YWxSQnFmcENqTHNDZWJhc2VtQTc0dDJlTEdDZjhfNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpJNVlXRmpZamxoTVM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",name:"Dai Token",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/bhz9Vtma8hPb_-GnhwqQkhfTQ5PwKcR1Qbzn7aBKlfs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZW04OHB4YXNDdEg0Nl9BcjhVandzZWR2SFBFUUtjVWVkc0FmV2lvenB2Yy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWVRoaFptSmxaRFppWkM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:56,address:"0x2170ed0880ac9a755fd29b2688956bd959f933f8",name:"Ethereum Token",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:56,address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",name:"Binance-Peg USD Coin",decimals:18,symbol:"USDC",logoURI:"https://cmp.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp"},{chainId:56,address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",name:"Wrapped BNB",decimals:18,symbol:"WBNB",logoURI:"https://cmp.dodoex.io/-Pua5rc9k9iW4yuF5ajLVKzMkRhBq06D8HiEZ5gjezA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMDZOWTdBTmdOYWdFOHpXYUMtX2IzYXVPOUxsTEp6QlpLTUR3VlM5eW9DQS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT1dRellXTmtZMlEzTnk1d2JtYy5wbmc.webp"},{chainId:128,address:"0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f",name:"Wrapped HT",decimals:18,symbol:"WHT",logoURI:"https://cmp.dodoex.io/6EZiEnx7kuHSxfpDGIpuE4z8LW4wNE1ck8fZrc5zRaQ/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vR010ZUtqTkRTN1ZRT1Jpd0k3TU9OWE1zcFdEc0VYYmxjX1hheXc4cTVEay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTWpVd01sOHpaRGt5TjJWaE4yVTVMbkJ1WncucG5n.webp"},{chainId:128,address:"0x0298c2b32eae4da002a15f36fdf7615bea3da047",name:"Heco-Peg HUSD Token",decimals:8,symbol:"HUSD",logoURI:"https://cmp.dodoex.io/LiOyD0GGt0t4bk4xz3RWAxvqFPyYCqfM4z0AqneT3xM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVXRWWnNCVUxTREZNR002SUM0OGI0VV9UV05oYUU4MzFkdnh1Y1hkLTE2by9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTkRjM09WODFZbU0yWVdFek9EUTRMbkJ1WncucG5n.webp"},{chainId:128,address:"0x3d760a45d0887dfd89a2f5385a236b29cb46ed2a",name:"Heco-Peg DAIHECO Token",decimals:18,symbol:"DAI-HECO",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:128,address:"0x64ff637fb478863b7468bc97d30a5bf3a428a1fd",name:"Heco-Peg ETH Token",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/prKmKP8yDTuPMHTCZ_DcxG8BqsuHNO8w5KDmJWmPodg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOUVaWU1ER2ZVN3g2N3ZBZThqWkUxZzA0RExUaFhaV0JIb09wZFhpeXhHRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTVRBeU4xOHhNekkyTjJGbE5EY3dMbkJ1WncucG5n.webp"},{chainId:128,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"HT",decimals:18,symbol:"HT",logoURI:"https://cmp.dodoex.io/6EZiEnx7kuHSxfpDGIpuE4z8LW4wNE1ck8fZrc5zRaQ/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vR010ZUtqTkRTN1ZRT1Jpd0k3TU9OWE1zcFdEc0VYYmxjX1hheXc4cTVEay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTWpVd01sOHpaRGt5TjJWaE4yVTVMbkJ1WncucG5n.webp"},{chainId:128,address:"0x9362bbef4b8313a8aa9f0c9808b80577aa26b73b",name:"Heco-Peg USDCHECO Token",decimals:6,symbol:"USDC-HECO",logoURI:"https://cmp.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp"},{chainId:128,address:"0xa71edc38d189767582c38a3145b5873052c3e47a",name:"Heco-Peg USDTHECO Token",decimals:18,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:137,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"MATIC",decimals:18,symbol:"MATIC",logoURI:"https://cmp.dodoex.io/cQFrEB6yGIqMkh_6Pie8VR3kIStL58IS-y8FbroHVwA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2VNUUk2dkpoaXljeldrczJaWWdGdk8zSEoxSWFIa053LXZYeXFneER4US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekZmTWpkbE56TXlNRE13TWk4eFh6STNaVGN6TWpBek1ESXVjRzVuLnBuZw.webp"},{chainId:137,address:"0xe4bf2864ebec7b7fdf6eeca9bacae7cdfdaffe78",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/KEPetVp3nQkB6BZ_cb05trEfBbGxFEg92UnF8NZsEzM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE5wTlRseEJGbFRDalM1ZFh3SWJ3Mm1hZ3NPUFFkZ3Z1UEhuZDZrNWdyMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk4yUTBaamxtTldOaU15OUVUMFJQWHpka05HWTVaalZqWWpNdWNHNW4ucG5n.webp"},{chainId:137,address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/hdRkGay_hj0t1OzN5C3c30cmch26tJhHUSroffg7ciY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOHd3UndQOG9DTTdBcF9NOW11bGVOQWRqYjhBOXpvX2FYUE5pVTNBYUtzYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhnMlgwSXhOelUwTnpSZlJUZzVNRGswWDBNME5GOUVZVGs0WWprMU5GOUZaV1JsWDBGRFh6UTVOVEkzTVdRd1gwWmZiRzluYjE4MFpXSXdNVE0zTVRZeExuQnVady5wbmc.webp"},{chainId:137,address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:137,address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/er3iAGv39hCC7F8AydW_AteD3hnZj9HI2XcAaruHeqA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE9WUWtzN3JQWU5OZWdmNTRuNC1Za1NGTFYyLXVGZmlJRFVYem85aVMzOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlFUQmlPRFk1T1RGak5qSXhPR0l6Tm1NeFpERTVYMFEwWVRKbE9WOUZZakJqWDBVek5qQTJaVjlDTkRoZmJHOW5iMTlpTmpGbE5EVmtNbVF6TG5CdVp3LnBuZw.webp"},{chainId:137,address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/WeK6L9_RjWUfAsnMuOAdyXIZVE3JK_H3lZU5vk2m7Tg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTFJ0aEt6X2VrSXdmTEh6NnAycW5rSkRFeUk1RXZrODlXQ0J2VW43MUJLNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoa1gwRkRYekUzWDBZNU5UaGZSREpsWlRVeU0yRXlNakEyTWpBMk9UazBOVGszWDBNeE0xOUVPRE14WldNM1gyeHZaMjlmWXpCbU9XVTFaamxoTmk1d2JtYy5wbmc.webp"},{chainId:137,address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/_KjvB9pCVqbIIv_UnQvRWpjySBHiFnuHNSXUm_52UZM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDQ4OVYzTW1NMi1qaFJueEQ2Y3MyY1gydXdGS2tkRHpiRGZsbkZhTTJxOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhneU1qWXdYMFpCUTE4MVgwVTFOVFF5WVRjM00xOUJZVFEwWmw5Q1gwTm1aVjlFWmpkZlF6RTVNMkpqTWw5RE5UazVYMnh2WjI5Zk5HTmpORE0zTlRneFppNXdibWMucG5n.webp"},{chainId:137,address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",name:"Wrapped MATIC",decimals:18,symbol:"WMATIC",logoURI:"https://cmp.dodoex.io/HfZVSaAES3QRplSybW2uoKmYf6pVTRaxufn95_Qto_A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMERhZEZTUUVFX0d4YlBoMHY3Wk1Hb1FwaWtOQm1vaWFyZTFlaFdJbU44dy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjFoZEdsalgyVmlOekZtTkdFMU9XRXZiV0YwYVdOZlpXSTNNV1kwWVRVNVlTNTNaV0p3LndlYnA.webp"},{chainId:42161,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:42161,address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/6VmZGvbENd4TM1VK0rsYrfznRtG-GwxP-zCy2qyc9bM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWnJZUDB0ZHVTLUdDNE5FTThmRmV1RHhVWklPNUZpWnpqdkdBc0lfNlBQMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh5TW1GbU4yVTVOVFJpTDFkRlZFaGZhV052Ymw4eU1tRm1OMlU1TlRSaUxuQnVady5wbmc.webp"},{chainId:42161,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:42161,address:"0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/6U51l5aajoRrCaO6cpbrclQ2olWNDzuShggOCfoktCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8va3RkSlhwQ3dsQVZtZXNPb1dvQV95SG9IazBnV3UxUExienBKa1AxYnlJdy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5tTmtPVEV4WXprNE15OUVUMFJQWHpaalpEa3hNV001T0RNdWNHNW4ucG5n.webp"},{chainId:42161,address:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",name:"USD Coin (Arb1)",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp"},{chainId:42161,address:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:42161,address:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:1285,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"MOVR",decimals:18,symbol:"MOVR",logoURI:"https://cmp.dodoex.io/Clhd0YhBfsWh48Ej4taGHcJ7dfKiCbtdMgyhNU7QAJg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZlBFT3c5LVdpQWhDVDJteGRmQ2gtb2hnQU1aaXBvWnllUl9TcVNpa3R4NC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMemt5T0RWZk4yWTVNREF5T1dNMU1pODVNamcxWHpkbU9UQXdNamxqTlRJdWQyVmljQS53ZWJw.webp"},{chainId:1285,address:"0x98878b06940ae243284ca214f92bb71a2b032b8a",name:"Wrapped MOVR",decimals:18,symbol:"WMOVR",logoURI:"https://cmp.dodoex.io/oXW0_VSLU29rbyQK3LtaHymbMfdv6F_ri20EeyMVBEU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMDVYMDFLd21zZXFRNFB6SGxJdEdvN3dveHVaUkFVbmQ5bDhCNU5VQ2N6by9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMGhmVG1OdmRWOUlNSGhmTkRBd2VEUXdNRjlrTlRBNFpHSmxNVE0yTDBoZlRtTnZkVjlJTUhoZk5EQXdlRFF3TUY5a05UQTRaR0psTVRNMkxtcHdady5qcGc.webp"},{chainId:1285,address:"0x5D9ab5522c64E1F6ef5e3627ECCc093f56167818",name:"Binance USD",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/SKu1xTvsm3q0RZC9CdiGw0zkq9k1P2ygK4TMenBYNC8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vQVMtWEpUX3pncF9MSlFxdFJiaE1Fd3lTZlNBMWp0MUhHbUFGYV9QQUdTdy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5aWRYTmtYems0TjJNd1lUUmtNRGt1YW5Cbi5qcGc.webp"},{chainId:1285,address:"0x80A16016cC4A2E6a2CACA8a4a498b1699fF0f844",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:1285,address:"0xE9460BD2FFB12b668fA32919C785C239f974D37C",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/onw4bpUWC5-GPBwFMHLE3BcRaQ1S_hqlUxW-8H3l5g0/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTi1ITXhGVWtxUU9fR3cxRFl1empZblgwejFzQ1pIMG1nMWRlOG5Qdmk2NC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zll6SXdZVEl4WTJFNU5pOUVUMFJQWDJNeU1HRXlNV05oT1RZdWNHNW4ucG5n.webp"},{chainId:1285,address:"0xE3F5a90F9cb311505cd691a46596599aA1A0AD7D",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp"},{chainId:1285,address:"0xB44a9B6905aF7c801311e8F4E76932ee959c663C",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/LyxjB8w94UjDhRuXa9xNlg7YcMuOC6akWBPCtgbq_Qw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vLXNSOWJzZTlrLTFIY1VUeUE3WE9KZWplQkRRS2ZtSFpRV2I3RE1iemlHMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkhSZk1UVTJOREZtWTJRME1DOTFjMlIwWHpFMU5qUXhabU5rTkRBdWMzWm4uc3Zn.webp"},{chainId:1285,address:"0x2bF9b864cdc97b08B6D79ad4663e71B8aB65c45c",name:"WBNB Token",decimals:18,symbol:"WBNB",logoURI:"https://cmp.dodoex.io/HSdBZz6OV3HFUq1RqW8hdavA1cfhjWEfqP12BINZppw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUTAzVVlDM3hSN0J2SHo5UmgtcHZ0WWctRGdPNlF1b2xKUmE0QjBHaWlmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5aWJtSmZNalE0TmpZeFpHTXhaaTVxY0djLmpwZw.webp"},{chainId:1285,address:"0x6aB6d61428fde76768D7b45D8BFeec19c6eF91A8",name:"Wrapped Bitcoin",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/6qiR9e_WPVs0u8U4DgdGMcaKFzJzypJqME5wUNe7XsY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMUMxeHZaUVJ4b0NlTW1sNXg0eUMzTGcySmhNXzYwcHpMMlk3elBwSGJFQS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMnh2WjI5Zk4ySXpNMlU0TW1WbFlTOXNiMmR2WHpkaU16TmxPREpsWldFdWNHNW4ucG5n.webp"},{chainId:1285,address:"0x639A647fbe20b6c8ac19E48E2de44ea792c62c5C",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:66,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"OKT",decimals:18,symbol:"OKT",logoURI:"https://cmp.dodoex.io/pcltGNcIp7DP33nj3YxxBpuFEekNcOW3pwq9tjSrpY4/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTzJHSDJYTndRancwbXMzQXNidG5xNzRkVEROVld3QWFOU1dXU2ZnU01QTS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTVOalF5T1RCZk1qQXlNakExTWpBd056STNORFl3TWpJdWMzWm4uc3Zn.webp"},{chainId:66,address:"0x382bB369d343125BfB2117af9c149795C6C65C50",name:"USDT",decimals:18,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:66,address:"0x218c3c3D49d0E7B37aff0D8bB079de36Ae61A4c0",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://cmp.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:66,address:"0x54e4622DC504176b3BB432dCCAf504569699a7fF",name:"BTCK",decimals:18,symbol:"BTCK",logoURI:"https://cmp.dodoex.io/L3kcNUKg94qnX8OPFlEvHKqWybnJD8SA9HTne3PW-Rg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vNU1MQTB3Q3V6eEs4Q3ZMV0RqempuOVhzalBTWE1zbUpWZ0RRN1RPMG9FWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpVUTB0Zk1HWmlaRGRsTWpnNU5pOUNWRU5MWHpCbVltUTNaVEk0T1RZdWNHNW4ucG5n.webp"},{chainId:66,address:"0x332730a4F6E03D9C55829435f10360E13cfA41Ff",name:"BUSD",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:66,address:"0x21cDE7E32a6CAF4742d00d44B07279e7596d26B9",name:"DAIK",decimals:18,symbol:"DAIK",logoURI:"https://cmp.dodoex.io/LOb-sXupURNN9HA0zBSfLfpZlx52N9qRSDUyzk3cg0A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vck5pZzMtWU5TOUl4T3ZHX19taTFRSU9WYTZsczdZNXViRVhGcTJJVGplby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJCU1V0Zk5ESTVNV1l4WlRoa1pTOUVRVWxMWHpReU9URm1NV1U0WkdVdWNHNW4ucG5n.webp"},{chainId:66,address:"0xEF71CA2EE68F45B9Ad6F72fbdb33d707b872315C",name:"ETHK",decimals:18,symbol:"ETHK",logoURI:"https://cmp.dodoex.io/IwBclhMMQLOo79RdRo6-HnUiXxshO_hSi02YK3L6MFI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcFBSd192aEx2MHh3WkRHU2k3eGYyYVJiQjlocVhfU2tacUdGc3RJR0pYRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFZVU0V0Zk1UQTVNamMzTW1VMU9DOUZWRWhMWHpFd09USTNOekpsTlRndWNHNW4ucG5n.webp"},{chainId:66,address:"0xc946DAf81b08146B1C7A8Da2A851Ddf2B3EAaf85",name:"USDC",decimals:18,symbol:"USDC",logoURI:"https://cmp.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp"},{chainId:66,address:"0xdCAC52E001f5bd413aa6ea83956438F29098166b",name:"USDK",decimals:18,symbol:"USDK",logoURI:"https://cmp.dodoex.io/X-_D75ZOpI-yC70WjdgC8wiqcssfRIALEv0eUfD3HiE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vd290dHEzaWdkTDVzQlhSR2VFZkhQLTNpZHhDZzV0V3VGQmE3YjNrNUZITS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkV0Zk56aGpZekV6TW1OaVpDOVZVMFJMWHpjNFkyTXhNekpqWW1RdWNHNW4ucG5n.webp"},{chainId:66,address:"0x506f731F7656e2FB34b587B912808f2a7aB640BD",name:"WBTCK",decimals:18,symbol:"WBTCK",logoURI:"https://cmp.dodoex.io/7Gb1gYkvjWESf9ungWe4YKOrr5GY5UILmTwU_U95kCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOTQ4NWZpU2NmUzBNc2V1YVZXWXo2Z1RuNVVidXJvZkxmN1VGSWhMdndjTS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOTFgyVXlZamRpWVRJNU16TXZWMEpVUTB0ZlpUSmlOMkpoTWprek15NXdibWMucG5n.webp"},{chainId:288,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ethereum",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:288,address:"0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp"},{chainId:288,address:"0x818ec0A7Fe18Ff94269904fCED6AE3DaE6d6dC0b",name:"Binance",decimals:18,symbol:"BNB",logoURI:"https://cmp.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:288,address:"0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7",name:"Boba Token",decimals:18,symbol:"BOBA",logoURI:"https://cmp.dodoex.io/p7--p24wKrXpF7IGh6Q_RT6J0ZGS2_FURnXxeyMDvO4/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vQlVsWE9GWS1wUTIxbTJJOTdIRFN2VHlvMzR2MGJWQllYU1ByczFwaWNuYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpQUWtGZk16SmtZamczT1dJMk1TOUNUMEpCWHpNeVpHSTROemxpTmpFdWNHNW4ucG5n.webp"},{chainId:288,address:"0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:288,address:"0x572c5B5BF34f75FB62c39b9BFE9A75bb0bb47984",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/8CGANX_wy00isVg8PgA_A-IKbfIn55Yu9ZujzUukXlQ/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDJhLVNEOFJvWDlGaW9IUVNzSkh2WkZzNlBpbVlNTWxTZGhZalJmMXVVQS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk1tRm1NMll4WkRZd055OUVUMFJQWHpKaFpqTm1NV1EyTURjdWNHNW4ucG5n.webp"},{chainId:288,address:"0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:288,address:"0xdc0486f8bf31DF57a952bcd3c1d3e166e3d9eC8b",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:288,address:"0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000",name:"Wrapped Ethereum",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ethereum",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:1313161554,address:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",name:"Wrapped Ethereum",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79",name:"Aurora",decimals:18,symbol:"Aurora",logoURI:"https://cmp.dodoex.io/2C2jfpO2-VYuwlga3SdtP5I6eJNJXIYq3LvPU4aFuiU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcHFWVWlJOEQ4VU5iUEZYRElvUnA3cFhEZFc4dmx4dWEtTmxubmxlam1PMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkYxY205eVlWOHlOVEprWlRFeE56YzBMMkYxY205eVlWOHlOVEprWlRFeE56YzBMbmRsWW5BLndlYnA.webp"},{chainId:1313161554,address:"0xe3520349F477A5F6EB06107066048508498A291b",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:1313161554,address:"0xe301eD8C7630C9678c39E4E45193D1e7Dfb914f7",name:"DODO Bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/SEcMDWMmtHb3GFW5l7fTKYurpTqALHdZI3D6qzad1rs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vQXRNMzllUjhRQzhYTl8tem5HU0pSLS1lV0tPUW91V3p2ci0zQ014WlJTSS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekl3TUhneU1EQmZNVjh3WWpReFl6VTJZV1UxTHpJd01IZ3lNREJmTVY4d1lqUXhZelUyWVdVMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0x4988a896b1227218e4A686fdE5EabdcAbd91571f",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:1313161554,address:"0xF4eB217Ba2454613b15dBdea6e5f22276410e89e",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Avalanche",decimals:18,symbol:"AVAX",logoURI:"https://cmp.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",name:"Wrapped AVAX",decimals:18,symbol:"WAVAX",logoURI:"https://cmp.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0x19860CCB0A68fd4213aB9D8266F7bBf05A8dDe98",name:"Binance USD",decimals:18,symbol:"BUSD.e",logoURI:"https://cmp.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:43114,address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",name:"Dai Stablecoin",decimals:18,symbol:"DAI.e",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:43114,address:"0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664",name:"USD Coin",decimals:6,symbol:"USDC.e",logoURI:"https://cmp.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp"},{chainId:43114,address:"0xc7198437980c041c805A1EDcbA50c1Ce5db95118",name:"Tether USD",decimals:6,symbol:"USDT.e ",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:43114,address:"0x50b7545627a5162F82A992c33b87aDc75187B218",name:"Wrapped BTC",decimals:8,symbol:"WBTC.e",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",name:"Wrapped Ether",decimals:18,symbol:"WETH.e",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:25,address:"0x66e428c3f67a68878562e79A0234c1F83c208770",name:"USDT",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/p_nSk7MW-bCcwp-tgtWC8az4e4Q0YMirg6rv6yVjC-I/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vODVNVlpTTllrTFlySWdlX2VQemNVOUpydkNKeFpDM2JhaGV0NnN5S0d5WS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTJPREl3TWpoZk1qQXlNakExTVRjd016STVNakV6TURjdWQyVmljQS53ZWJw.webp"},{chainId:25,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"CRO",decimals:1,symbol:"CRO",logoURI:"https://cmp.dodoex.io/HYsQIOyyuC6P1Ik_Rs5a6ws2CKMzJbajJewE77C0rf8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZzc2UURUMEIwbHJjc3VTSTlodTZTTnlqMEp3WWNtUEFRWV9qWDV0VVBhMC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6YzRNRGc0TkRkZk1qQXlNakExTVRjd056UXdNekExTWpFdWNHNW4ucG5n.webp"},{chainId:10,address:"0x4200000000000000000000000000000000000006",name:"WETH",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/f9SbZq39ynUZS5ueKvAwzLmKUfcZvYpKDaysT3dkcvM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2NkVzJUWjladmRiX3BVSjZ3b2YzeHRvYk94YUw3bEV5RmhhemhJUFhlMC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RXdNamd3TkRaZk1qQXlNakEwTWpJd01UQXpORGc1TURVdWNHNW4ucG5n.webp"},{chainId:10,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"DAI",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/04gwZiu2K_9fdb2zLwzsX1nONCbBWrZOvTyOoEFhx3g/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaDJCcmdhUmZxUzBLZDBEOVpZbEUteEtNMVdzeFFtRzBEWVpKOGJCaWN4US9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6SXlNRFUwTVRsZk1qQXlNakEwTWpJd01UQTBNak00TlRVdWFuQm4uanBn.webp"},{chainId:10,address:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607",name:"USDC",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp"},{chainId:10,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/bcyoORJ04NyP1HhYUZ9RrTZ-MEOFeNnMcrr__JZ6Ruw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vV1lHaU9IVFVnVWs4Q3Z3WmNyN0hWX2w4SlNrQjRVQUh1UXpzaWd4U3Nmay9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6VTVPREk0T1Y4eU1ESXlNRFF5TWpBeU1qTTBNelk0TlM1d2JtYy5wbmc.webp"}];function rb({tokenList:e,popularTokenList:t}){const n=P(),[o,i]=f([]),{account:c}=H(),l=cp(),{cgTokenList:u}=eb(),d=Z(Ks),h=y((()=>(null==tb?void 0:tb.filter((e=>e.chainId===l)))||[]),[tb,l]),m=y((()=>(null==t?void 0:t.filter((e=>e.chainId===l)))||[]),[t,l]);!function({tokenList:e,addresses:t,blockNumber:n}){const{account:o}=H(),i=P(),s=y((()=>[...(null==e?void 0:e.map((e=>e.address)))||[],...t||[]].map((e=>e.toLocaleLowerCase()))),[e,JSON.stringify(t)]),{getContract:a,contractConfig:c,call:l}=yl(),[u,d]=f(),h=y((()=>{if(!o||!s.length||!c)return;const{DODO_APPROVE:e,ERC20_HELPER:t}=c,n=a(t,bl);if(!n)return;let l={};const u=s.map((i=>(l[i]=!0,{callData:{data:n.interface.encodeFunctionData("isERC20",[i,o,e]),to:t},processor:e=>{const t=new fl(bl).decodeFunctionResult("isERC20",e),{balance:n,isOk:o}=t,s=parseInt(t.decimals),a=new r(10).pow(s),c=new r(t.allownance.toString()).div(a);return o?{address:i,decimals:s,symbol:t.symbol,name:t.name,balance:new r(n.toString()).div(a),allowance:c}:{address:i,balance:new r(0),allowance:new r(0)}}})));return i($s(l)),u}),[o,a,JSON.stringify(s)]);p((()=>{(()=>{Bs(this,void 0,void 0,(function*(){if(!h)return;const e=yield l(h),t={};e&&(e.forEach((e=>{e.address.toLocaleLowerCase()!=="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLocaleLowerCase()&&(t[e.address.toLocaleLowerCase()]={tokenBalances:e.balance,tokenAllowances:e.allowance})})),i(Qs(t))),d(e);let r={};s.forEach((e=>{r[e]=!1})),i($s(r))}))})()}),[h,n])}({addresses:y((()=>{const e=o.map((({address:e})=>e));return null==t||t.forEach((({address:t})=>{e.includes(t)||e.push(t)})),e}),[o,t]),blockNumber:d}),p((()=>{(()=>{Bs(this,void 0,void 0,(function*(){let t=[];if(s(e))t=e;else if(e===xl.Coingecko||e===xl.All){const e=h.concat(u.toArray());t=a(m,e,(e=>e.address.toLowerCase()))}else t=a(m,h,(e=>e.address.toLowerCase()));const r=l,o=t.filter((e=>e.chainId===r));i(o),n((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_TOKEN_LIST",payload:e})})))(o))}))})()}),[e,n,l,u,m,h]),p((()=>{n(Qs({}))}),[c,l]),p((()=>{n((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_POPULAR_TOKEN_LIST",payload:e})})))(m))}),[m,n])}const nb=e=>(null!=e?e:Gs.getState()).token.tokenList,ob=e=>(null!=e?e:Gs.getState()).token.accountBalances,ib=e=>(null!=e?e:Gs.getState()).token.ethBalance||new r(NaN),sb=e=>(null!=e?e:Gs.getState()).token.defaultFromToken,ab=e=>(null!=e?e:Gs.getState()).token.defaultToToken,cb=e=>(null!=e?e:Gs.getState()).token.balanceLoadings;function lb(){const{account:e,chainId:t}=H(),r=Z(ob),n=Z(ib),o=y((()=>Cs[t||1]),[t]),i=g((t=>{var i;if(!e)return null;if(t.symbol===o.symbol&&Ts(t.address,o.address))return!n||(null==n?void 0:n.isNaN())?null:n;const s=null===(i=r[t.address.toLocaleLowerCase()])||void 0===i?void 0:i.tokenBalances;return!s||(null==s?void 0:s.isNaN())?null:s}),[r,n,e]);return i}var ub;function db(e,t,r,n=0){if(r&&(e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase()),e===t)return ub.fully+n;const o=e.indexOf(t);return 0===o?ub.prefix+n:o>0?ub.other+n:ub.none}!function(e){e[e.fully=1]="fully",e[e.prefix=2]="prefix",e[e.other=3]="other",e[e.none=0]="none"}(ub||(ub={}));function hb({value:e,onChange:t,occupiedAddrs:n,hiddenAddrs:o,showAddrs:i,side:s}){const[a,c]=f(""),l=Z(nb),u=cp(),d=lb(),h=Z((e=>((e,t)=>(null!=t?t:Gs.getState()).token.popularTokenList.filter((({chainId:t})=>e===t)))(u,e))),p=y((()=>(null==tb?void 0:tb.filter((e=>e.chainId===u)))||[]),[tb,u]),m=y((()=>new Set(o?o.map((e=>e.toLowerCase())):void 0)),[o]),b=y((()=>i?new Set(i.map((e=>e.toLowerCase()))):void 0),[i]),v=g((e=>e.filter((e=>{if(e.chainId!==u)return!1;let t=!0;return t=b?b.has(e.address.toLowerCase()):!m.has(e.address.toLowerCase()),t&&s&&(t=!e.side||e.side===s),t}))),[b,u,m]),w=y((()=>v(h)),[h,v]),x=g((t=>{if(null===t)return null;const o=[];a?t.forEach((e=>{const t=((e,t,{matchAddress:r}={})=>{if(!t)return 0;const n=t.toLocaleLowerCase();let o=0;r&&e.address.toLocaleLowerCase()===n&&(o=1),o||(o=db(e.symbol.toLocaleLowerCase(),n,!1,1));if(o)e.name.toLocaleLowerCase()===n&&(o=ub.fully+1);else{let t=db(e.name.toLocaleLowerCase(),n,!1,10);t=t===ub.fully+10?ub.fully+1:t,o=t}return o})(e,a,{matchAddress:!0});t&&o.push({sort:t,token:e})})):t.forEach((e=>{o.push({sort:0,token:e})}));const i=[];return o.sort(((t,o)=>{const i=t.token,s=o.token;if(e){if(i.address===e.address)return-1;if(s.address===e.address)return 1}if(null==n?void 0:n.includes(i.address))return-1;if(null==n?void 0:n.includes(s.address))return 1;const a=d&&d(i)||new r(0),c=d&&d(s)||new r(0);if(!a.eq(c))return a.gt(c)?-1:1;if(t.sort!==o.sort)return t.sort>o.sort?1:-1;const l=w.map((e=>e.address));if(null==l?void 0:l.includes(i.address))return-1;if(null==l?void 0:l.includes(s.address))return 1;const u=p.map((e=>e.address));return(null==u?void 0:u.includes(i.address))?-1:(null==u?void 0:u.includes(s.address))?1:i.symbol.localeCompare(s.symbol)})).some((e=>!!(a&&i.length>21)||(i.push(e.token),!1))),i}),[a,d,n,e,w,p]),E=g((e=>{const r=e.address.toLowerCase();t(e,!!(null==n?void 0:n.some((e=>e.toLowerCase()===r))))}),[t,n]),A=y((()=>{const e=v(l);return x(e)||[]}),[l,v,x]);return{filter:a,setFilter:c,showTokenList:A,onSelectToken:E,popularTokenList:w}}function fb({width:e=24,height:t=24,marginRight:r=8,url:n,zIndex:o,cross:i,address:s,token:a,sx:c}){const[l,u]=f(!1),[d,h]=f(""),[m,b]=f(""),[v,w]=f(!1),x=g((()=>u(!0)),[]);let E=function(e){const t=Z(nb),{chainId:r}=H();return y((()=>{if(!e)return;let n=t.find((({address:t,chainId:n})=>n===r&&t===e));return n||(n=t.find((({address:t})=>t===e))),n}),[e,t,r])}(s);a&&(E=a);const A=s||(null==E?void 0:E.address),R=null==E?void 0:E.symbol,_=null==R?void 0:R.charAt(0).toUpperCase(),k=y((()=>{const e=null==E?void 0:E.logoURI;return n||e||""}),[n,E]);return p((()=>{w(!1)}),[A,k]),p((()=>{i&&(k?function(e,t){const r=new XMLHttpRequest;let n;r.onload=function(){const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)},r.onerror=function(){t()};try{n=new URL(e)}catch(e){}finally{r.open("GET",n||e),r.responseType="blob",r.send()}}(k,(e=>{h(e)})):h(""))}),[k,i]),p((()=>{try{let t=A;if(t&&t.length<15&&(t=t.padEnd(15,"0")),t){const r=new L(t,{size:e,format:"svg",margin:.2,background:[255,234,4,255]}).toString();b(`data:image/svg+xml;base64,${r}`)}}catch(e){console.error("generate Identicon error: ",e)}}),[A,e]),Ie.exports.jsxs(Kr,{sx:Object.assign({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e,width:e,height:t,marginRight:r,zIndex:o},c||{}),style:{width:e,height:t},children:[!l&&Ie.exports.jsx(Kr,{sx:{typography:"ht",height:"100%",width:"100%",borderRadius:"50%",border:"transparent 2px solid",borderColor:"text.primary",color:"text.primary",display:"flex",alignItems:"center",justifyContent:"center"},children:_}),Ie.exports.jsx(Kr,{component:"img",src:!(i?d:k)||v?m:i?d:k,onLoad:x,onError:e=>{const t=e.target;A&&m&&w(!0),t.onerror=null},sx:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderRadius:"50%",overflow:"hidden",width:"100%",height:"100%"}})]})}function pb({token:t,onClick:r}){var n,o;const i=Jr();return Ie.exports.jsxs(Kr,{component:zn,sx:{display:"flex",alignItems:"center",color:i.palette.text.primary,typography:"h5",fontWeight:600},onClick:e=>{r&&r(e)},"data-testid":"swap-select-token-btn",children:[(null==t?void 0:t.address)?Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(fb,{url:null==t?void 0:t.logoURI,address:null!==(n=null==t?void 0:t.address)&&void 0!==n?n:"",marginRight:6}),Ie.exports.jsx(Kr,{children:null!==(o=null==t?void 0:t.symbol)&&void 0!==o?o:"-"})]}):Ie.exports.jsx(e,{id:"SELECT TOKEN"}),Ie.exports.jsx(Kr,{sx:{ml:7,width:12,transform:"rotateX(180deg)"},component:k})]})}function mb({onClick:t,balance:r,decimals:n,address:o,showMaxBtn:i}){const{palette:s}=Jr();return Ie.exports.jsxs(Kr,{sx:{display:"flex",typography:"body2",color:s.text.secondary},children:[Ie.exports.jsx(e,{id:"Balance:"})," ",o?Ui({input:r,decimals:Math.min(n||4,4)}):"-",i&&r&&r.gt(0)&&Ie.exports.jsx(Kr,{component:zn,sx:{ml:6,color:(null==r?void 0:r.gt(0))?s.primary.main:s.text.disabled,cursor:o&&t?"pointer":"unset"},onClick:()=>t&&t(r?r.toString():""),children:Ie.exports.jsx(e,{id:"Max"})})]})}function gb({readOnly:e,sx:t,value:r,decimals:n,onChange:o,suffix:i,withClear:s,onFocus:a,placeholder:c}){const l=Jr(),u=y((()=>i||(s&&r&&o?Ie.exports.jsx(Kr,{component:zn,sx:{ml:5,width:18,height:18,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>{o&&o("")},children:Ie.exports.jsx(Kr,{component:_,sx:{width:12,color:"text.primary"}})}):void 0)),[o,i,l.palette.text.primary,r,s]);return Ie.exports.jsxs(Kr,{sx:Object.assign({mt:12,display:"flex",justifyContent:"space-between",alignItems:"center"},t),"data-testid":"number-input-wrapper",children:[Ie.exports.jsx(eo,{fullWidth:!0,value:r,readOnly:e,placeholder:c||"0.00",onFocus:a,onChange:e=>{const t=e.target.value,r=0===t.length?"":Vi(t,n);o&&o(r)},sx:{width:"inherit",border:"none","& .MuiInput-input":{fontSize:24,border:"none",outline:"none",height:24,padding:0,color:"text.primary","&::placeholder":{fontSize:24,color:"text.disabled"}}}}),!e&&r&&u]})}function yb({open:e,onClose:t,afterClose:r,title:n,rightSlot:o,canBack:i=!0,children:s,height:a,testId:c}){return Ie.exports.jsxs(Kr,{sx:{position:"absolute",top:e?0:"100%",transition:"top 300ms",zIndex:1,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",borderRadius:16,height:a},"data-testid":c,"data-active":e?"1":"0",children:[n?Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:20},children:[Ie.exports.jsx(Kr,{sx:{display:"flex",alignItems:"center",typography:"caption"},children:n}),o,!o&&i&&Ie.exports.jsx(Kr,{component:_,sx:{color:"text.secondary",cursor:"pointer"},onClick:()=>{t&&t(),setTimeout((()=>r&&r()),300)}})]}):"",s]})}const bb=e=>(null!=e?e:Gs.getState()).globals;function vb({token:e,disabled:t,onClick:r}){return Ie.exports.jsxs(Kr,{sx:Object.assign({display:"inline-flex",alignItems:"center",p:8,border:"solid 1px",typography:"body2",borderRadius:8},t?{borderColor:"transparent",backgroundColor:"border.disabled",cursor:"auto"}:{borderColor:"border.main",cursor:"pointer","&:hover":{backgroundColor:"hover.default"}}),onClick:()=>{t||r()},children:[Ie.exports.jsx(fb,{token:e}),e.symbol]})}function wb({token:e,disabled:t,style:r,onClick:n}){const o=Jr(),i=lb(),{account:s}=H(),a=i(e),c=a?ji({input:a}):"";return Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2",px:6,py:5,borderRadius:8,cursor:t?"auto":"pointer",opacity:t?.5:1,"&:hover":{backgroundColor:"hover.default"}},style:r,onClick:()=>{t||n()},"data-testid":"token-picker-item",children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(fb,{token:e}),Ie.exports.jsxs(Kr,{children:[Ie.exports.jsx(Kr,{sx:{fontWeight:600,textAlign:"left"},children:e.symbol}),s&&Ie.exports.jsx(Kr,{sx:{mt:4,textAlign:"left"},children:(null==a?void 0:a.gte(0))?c:Ie.exports.jsx(Kr,{component:E,width:18,sx:{"& path":{fill:o.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}})})]})]}),Ie.exports.jsx(Kr,{sx:{color:"text.secondary",textAlign:"right"},children:e.name})]})}function xb({value:e,onChange:t,occupiedAddrs:r,hiddenAddrs:n,showAddrs:o,visible:i,side:s}){const{showTokenList:a,filter:c,setFilter:l,onSelectToken:u,popularTokenList:d}=hb({value:e,onChange:t,occupiedAddrs:r,hiddenAddrs:n,showAddrs:o,side:s}),m=h(null),[y,b]=f(0);p((()=>{i&&m.current&&b(m.current.offsetHeight-34)}),[m,i]);const v=g((({key:t,index:r,style:n})=>{const o=!!(null==d?void 0:d.length);if(0===r&&o)return Ie.exports.jsx(Kr,{sx:{position:"relative",display:"flex",gap:8,flexWrap:"wrap",pb:32,"&::after":{content:'""',position:"absolute",bottom:16,left:0,right:0,height:"1px",backgroundColor:"border.main"}},style:Object.assign(Object.assign({},n),{visibility:n.height?"visible":"hidden",height:n.height?n.height:"auto"}),children:d.map((t=>Ie.exports.jsx(vb,{token:t,disabled:(null==e?void 0:e.address)===t.address,onClick:()=>u(t)},t.address)))},t);const i=a[o?r-1:r];return Ie.exports.jsx(wb,{token:i,disabled:!!e&&e.address===i.address,style:n,onClick:()=>u(i)},t)}),[a,d,e]),w=g((e=>{if(0===e&&(null==d?void 0:d.length)){return 74+51*Math.floor(d.length/3)}return 52}),[d]);return Ie.exports.jsxs(Kr,{sx:{display:"flex",flexDirection:"column",px:20,flex:1},children:[Ie.exports.jsx(ao,{fullWidth:!0,height:48,value:c,onChange:e=>l(e.target.value),clearValue:()=>l(""),placeholder:ie._("Enter the token symbol or address")}),Ie.exports.jsx(Kr,{sx:{mt:16,pb:16,flex:1,minHeight:64},ref:m,children:Ie.exports.jsx(se,{height:y,itemCount:a.length+((null==d?void 0:d.length)?1:0),itemSize:w,width:"100%",className:"token-list",children:v},d.length)})]})}function Eb({open:t,value:r,onClose:n,occupiedAddrs:o,onTokenChange:i,side:s}){const{height:a}=Z(bb);return Ie.exports.jsx(yb,{height:a,open:t,onClose:n,title:Ie.exports.jsx(e,{id:"Select a token"}),testId:"token-picker-wrapper",children:Ie.exports.jsx(xb,{value:r,visible:t,onChange:i,occupiedAddrs:o,side:s})})}function Ab({sx:e,amt:t,token:r,readOnly:n,showMaxBtn:o,onMaxClick:i,fiatPriceTxt:s,occupiedAddrs:a,onInputFocus:c,onTokenClick:l,onInputChange:u,onTokenChange:d,side:h}){const p=Jr(),m=lb(),[g,y]=f(!1),b=r?m(r):null;return Ie.exports.jsxs(Kr,{sx:Object.assign({width:"100%",minHeight:133,padding:20,borderRadius:12,overflow:"hidden",display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:p.palette.background.input},e),children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[Ie.exports.jsx(pb,{token:r,onClick:()=>y(!0)}),Ie.exports.jsx(mb,{balance:b,onClick:i,showMaxBtn:o,address:null==r?void 0:r.address,decimals:null==r?void 0:r.decimals})]}),Ie.exports.jsx(gb,{value:t,onFocus:c,onChange:u,readOnly:n,withClear:!0}),Ie.exports.jsx(Kr,{sx:{mt:4,typography:"body2",color:p.palette.text.secondary},children:s}),Ie.exports.jsx(Eb,{value:r,open:g,side:h,occupiedAddrs:a,onClose:()=>{y(!1),l&&l()},onTokenChange:(e,t)=>{y(!1),setTimeout((()=>d(e,t)),300)}})]})}const Rb=(e,t)=>{const r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?1==i&&11!=s?"one":2==i&&12!=s?"two":3==i&&13!=s?"few":"other":1==e&&n?"one":"other"},_b={"en-US":Rb,"zh-CN":(e,t)=>"other",pseudo:Rb};function kb({locale:e,children:r}){return p((()=>{(()=>{Bs(this,void 0,void 0,(function*(){yield function(e="en-US"){return Bs(this,void 0,void 0,(function*(){ie.loadLocaleData(e,{plurals:()=>_b[e]});try{const t=yield import(`./locales/${e}.js`);ie.load(e,t.messages||t.default.messages)}catch(e){}ie.activate(e)}))}(e)}))})()}),[e]),Ie.exports.jsx(t,{i18n:ie,children:r})}var Sb,Nb,Mb;!function(e){e[e.Running=0]="Running",e[e.Success=1]="Success",e[e.Failed=2]="Failed",e[e.Warning=3]="Warning"}(Sb||(Sb={})),function(e){e.Canceled="canceled",e.Failed="failed",e.Success="success",e.Submitted="submitted"}(Nb||(Nb={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success"}(Mb||(Mb={}));var Tb,Ob=[{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];!function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success",e[e.Warning=2]="Warning"}(Tb||(Tb={}));const Ib=(e,t)=>Bs(void 0,void 0,void 0,(function*(){const{value:r,from:n,to:o,data:i}=e,s={from:n,to:o,value:r,data:i};r&&!/^0x0*$/.test(r)||delete s.value;try{return(yield t.estimateGas(s)).add(5e4)}catch(e){t.call(s).then((e=>{if("test"!==process.env.NODE_ENV)throw new Error("Unexpected issue with estimating the gas. Please try again.")})).catch((e=>{if("test"!==process.env.NODE_ENV)throw e}))}return null})),Fb=(e,t)=>Bs(void 0,void 0,void 0,(function*(){try{return yield t.getSigner().sendTransaction(e)}catch(e){throw 4001===(null==e?void 0:e.code)?new Error(ie._("Transaction rejected.")):e}}));var Wb,Cb;!function(e){e.Approval="APPROVAL",e.TX="TX",e.TypedSign="TypedSign"}(Wb||(Wb={})),function(e){e.Normal="Normal",e.Privacy="Privacy",e.LimitOrder="LimitOrder",e.RFQ="RFQ"}(Cb||(Cb={}));const jb=new r(2).pow(256).minus(1),Ub=e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_GLOBAL_PROPS",payload:e})}));function Db({onTxFail:e,onTxSubmit:t,onTxSuccess:n}={}){const{account:o,provider:i}=H(),s=cp(),[a,c]=f(!1),[l,u]=f(new Map),d=P(),[h,p]=f(null),[m,b]=f(""),[v,w]=f(null),[x,E]=f(!1),[A,R]=f(),{updateBlockNumber:_}=wl(),k=g(((a,l,h,f=!1,m,g,y,v)=>Bs(this,void 0,void 0,(function*(){if(b(""),p(""),!o||!i)throw new Error("Submission: Cannot execute step when the wallet is disconnected");let x,A,k;R((()=>y)),c(!1);try{if(c(!0),l.opcode===Wb.Approval)k=yield((e,t,n,o,i,s)=>Bs(void 0,void 0,void 0,(function*(){const a=gl(e,Ob,i,s).interface.encodeFunctionData("approve",[n,o.toFixed()]),c={from:t,to:e,data:a,value:`0x${new r("0").toString(16)}`,gasLimit:void 0},l=yield Ib(c,i);return l&&(c.gasLimit=l),yield Fb(c,i)})))(l.token.address,o,l.contract,l.amt||jb,i,o),x=k.hash,b(x);else{if(l.opcode!==Wb.TX)throw new Error(`Op ${l.opcode} not implemented!`);if(""===l.to)throw new Error("Submission: malformed to");if(0===l.data.length)throw new Error("Submission: malformed data");if(0===l.data.indexOf("0x")&&l.data.length<=2)throw new Error("Submission: malformed data");if(A={value:l.value,data:l.data,to:l.to,gasLimit:l.gasLimit,from:o,chainId:s},!A.gasLimit)try{const e=yield Ib(A,i);e&&(A.gasLimit=e)}catch(e){console.debug(e)}if(k=yield Fb(A,i),x=k.hash,b(x),!x)throw new Error(`Unexpected tx: ${x}`)}}catch(t){if(c(!1),w({spec:l,brief:a,subtitle:h}),console.error(t),t.message){d(Ub({contractStatus:Hs.Failed}));const r={error:t.message,brief:a};g&&Object.assign(r,g),e&&e(t,g),p(function(e,t){var r;const n=null===(r=Cs[e])||void 0===r?void 0:r.symbol,o=[{error:"insufficient",msg:ie._("Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet",{EtherTokenSymbol:n})},{error:["External Swap execution Failed","Return amount is not enough"],msg:ie._("Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.")},{error:"SafeERC20: low-level call failed",msg:ie._("SafeERC20: low-level call failed. Please contact the DODO team.")},{error:["User denied","cancel","User rejected","user rejected"],msg:ie._("User denied transaction signature.")},{error:["Cannot set properties of undefined (setting 'loadingDefauIts'){\"originalError\":{",'[ethjs-query]while formatting outputs from RPC\'["value":["code":-32000,"message":"header not found"))'],msg:ie._("RPC node data exception")},{error:['execution reverted:FORCESTOP ["originalError"'],msg:ie._("ForceStop exception")},{error:["replacement transaction underpriced","Gasprice too low","transaction underprice"],msg:ie._("Gas price is too low, please adjust in your wallet and try again")},{error:["MINT_INVALID"],msg:ie._("No ForceStop access")},{error:["NOT_PHASE_EXE"],msg:ie._("Unable to SETTLE during the cooling-off period")},{error:["params specify an EIP-1559transaction but the currentnetwork does not support"],msg:ie._("Wallet incompatibility")},{error:["ALREADY_SETTLED"],msg:ie._("This CP has been settled by other addrs")},{error:["create RFQ order failed]:LESS_THAN_FEE_LIMIT"],msg:ie._("Service update, please wait and try again")}];let i="";return o.some((e=>Array.isArray(e.error)?e.error.some((r=>t.indexOf(r)>-1&&(i=e.msg,!0))):t.indexOf(e.error)>-1&&(i=e.msg,!0))),i||t}(s,t.message))}return Nb.Failed}w({spec:l,brief:a,subtitle:h}),E(!1),c(!1);const S=Object.assign(Object.assign(Object.assign(Object.assign({brief:a},l),A),{tx:x,subtitle:h}),g);d(Ub({contractStatus:Hs.Pending})),t&&t(x,S),m&&m();const N={brief:a,spec:l,tx:x,subtitle:h};if(u((e=>e.set(x,[N,Sb.Running]))),f)return Nb.Submitted;if(m&&m(),null==k?void 0:k.wait){const e=yield k.wait(1);if(E(!0),e.status===Mb.Success)return"TX"===S.opcode&&d(Ub({contractStatus:Hs.TxSuccess})),"APPROVAL"===S.opcode&&d(Ub({contractStatus:Hs.ApproveSuccess})),v&&v(x),n&&n(x,S),yield _(),u((e=>e.set(x,[N,Sb.Success]))),Nb.Success}return yield _(),E(!0),u((e=>e.set(x,[N,Sb.Failed]))),Nb.Failed}))),[o,s,c,i,_]),S=y((()=>({execute:k,requests:l,setShowing:w,waitingSubmit:a})),[k,l,w]),N=g((()=>{w(null),A&&(A(),R(void 0))}),[A]);return{showing:v,showingDone:x,transactionTx:m,errorMessage:h,setErrorMessage:p,closeShowing:N,ctxVal:S,requests:l}}function Bb(){const{requests:e}=Pb(),t=[];return null==e||e.forEach((function([e,r]){r===Sb.Running&&t.push(e)})),{runningRequests:t,isInflight:t.length>0}}const Vb=v({execute:()=>Promise.resolve(Nb.Canceled),requests:void 0,waitingSubmit:!1});function Pb(){return b(Vb)}var Zb;function zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zb.apply(this,arguments)}var Lb=function(e){return l.createElement("svg",zb({width:"33px",height:"33px",viewBox:"0 0 33 33",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Zb||(Zb=l.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},l.createElement("g",{transform:"translate(-186.000000, -375.000000)",stroke:"currentColor",strokeWidth:4},l.createElement("g",{transform:"translate(18.000000, 291.000000)"},l.createElement("g",{transform:"translate(40.000000, 83.000000)"},l.createElement("path",{d:"M159,32 C159,15.9837423 146.016258,3 130,3"})))))))};function Hb({showingDone:e,errorMessage:t}){return t?Ie.exports.jsx(Kr,{component:S,sx:{width:64,height:64,color:"error.main"}}):e?Ie.exports.jsx(Kr,{component:N,sx:{width:64,height:64,color:"success.main"}}):Ie.exports.jsx(Kr,{sx:{mx:"auto",border:e=>{var t;return`6px solid ${null===(t=e.palette)||void 0===t?void 0:t.background.input}`},borderRadius:"50%",width:"64px",height:"64px",position:"relative",animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}},children:Ie.exports.jsx(Kr,{component:Lb,sx:{position:"absolute",top:"-6px",right:"-6px",color:"primary.main"}})})}function Yb({showingDone:e,showing:t}){return Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[Ie.exports.jsx(Kr,{sx:{mt:60},children:e?ie._("{0} confirmed",{0:null==t?void 0:t.brief}):ie._("{0} pending",{0:null==t?void 0:t.brief})}),(null==t?void 0:t.subtitle)?Ie.exports.jsx(Kr,{sx:{mt:20,typography:"body2"},children:null==t?void 0:t.subtitle}):""]})}function Xb({isStarted:t,isEnded:r,tx:n}){const[o,i]=f(0),{chainId:s}=H(),a=y((()=>`https://${Us[s||1]}/tx/${n}`),[n,s]),c=y((()=>{const e=Math.floor(o/60),t=o%60;return e?`${e}m ${t}s`:`${t}s`}),[o]),l=h();return p((()=>(t&&(i(0),clearInterval(l.current),l.current=setInterval((()=>{i((e=>e+1))}),1e3)),()=>{clearInterval(l.current)})),[t]),p((()=>{clearInterval(l.current)}),[r]),Ie.exports.jsxs(Kr,{sx:{mt:20,pt:20,display:"flex",justifyContent:"space-between",alignItems:"center",typography:"body2",color:"text.secondary",border:"solid 1px transparent",borderTopColor:"border.main"},children:[Ie.exports.jsxs(Kr,{children:[Ie.exports.jsx(e,{id:"Transaction Time:"}),c]}),Ie.exports.jsxs(so,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},component:"a",href:a,target:"_blank",rel:"noopener noreferrer",children:[Ie.exports.jsx(e,{id:"Tx"}),Ie.exports.jsx(Kr,{component:M,sx:{width:16,height:16,ml:6}})]})]})}function Jb(t){var{children:r}=t,n=Ds(t,["children"]);const{ctxVal:o,showing:i,closeShowing:s,showingDone:a,errorMessage:c,transactionTx:l}=Db(n),u=P();return Ie.exports.jsxs(Vb.Provider,{value:o,children:[r,Ie.exports.jsx(yb,{open:!!i,onClose:s,children:Ie.exports.jsxs(Kr,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",px:20,pb:20,flex:1,overflowY:"auto"},children:[Ie.exports.jsxs(Kr,{children:[Ie.exports.jsx(Kr,{sx:{textAlign:"center",pt:60},children:Ie.exports.jsx(Hb,{showingDone:a,errorMessage:c})}),c?Ie.exports.jsxs(Kr,{sx:{textAlign:"center",mt:60},children:[Ie.exports.jsx(Kr,{children:Ie.exports.jsx(e,{id:"Something went wrong."})}),Ie.exports.jsx(Kr,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:c})]}):Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(Yb,{showingDone:a,showing:i}),Ie.exports.jsx(Xb,{isStarted:!!i,isEnded:a,tx:l})]})]}),Ie.exports.jsx(Bn,{fullWidth:!0,size:Bn.Size.big,onClick:()=>{u(Ub({contractStatus:Hs.Initial})),s()},sx:{mt:20},children:c?Ie.exports.jsx(e,{id:"Dismiss"}):Ie.exports.jsx(e,{id:"Close"})})]})})]})}function Gb({token:e,fiatPrice:t}){return{marginAmount:y((()=>{var o;const i=null!==(o=null==e?void 0:e.decimals)&&void 0!==o?o:6,s=((e,t,r)=>{const o=new n(e).times(new n(10).pow(t));return r?o:o.dp(0)})(null!=t?new r(500).div(t):new r(0),i);return(s.lt(new r(1).times(new r(10).pow(i-3)))?new r(0):s).toString(10)}),[null==e?void 0:e.decimals,t])}}function qb({width:e,height:t,feeRate:r,rebateTo:n,colorMode:o,apikey:i,defaultChainId:s,defaultToToken:a,defaultFromToken:c}){const l=P();p((()=>{o&&l((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_COLOR_MODE",payload:e})})))(o))}),[o]),p((()=>{var e;s&&l((e=s,t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_CHAIN_ID",payload:e})}))))}),[s]),p((()=>{l(Ub({height:t}))}),[t]),p((()=>{l(Ub({width:e}))}),[e]),p((()=>{i&&l(Ub({apikey:i}))}),[i]),p((()=>{r&&l(Ub({feeRate:r}))}),[r]),p((()=>{n&&l(Ub({rebateTo:n}))}),[n]),p((()=>{c&&l((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_FROM_TOKEN",payload:e})})))(c))}),[c]),p((()=>{a&&l((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_TO_TOKEN",payload:e})})))(a))}),[a])}function Kb({refetch:e,interval:t}){let r;p((()=>(e(),clearTimeout(r),r=setInterval((()=>{e()}),null!=t?t:15e3),()=>clearTimeout(r))),[e])}function Qb({fromToken:e,toToken:t,chainId:r}){const[n,o]=f(!1),{apikey:i}=Z(bb),[s,a]=f(""),[c,l]=f(""),u=g((()=>{if(!r||!e||!t)return;o(!0);const n=[e,t];te.post("https://api.dodoex.io/frontend-price-api/current/batch",{networks:n.map((()=>(e=>js[e]||js[Is.MAINNET])(r))),addresses:n.map((e=>e.address)),symbols:n.map((e=>e.symbol)),isCache:!0},{headers:{apikey:i}}).then((r=>{var n;o(!1);const i=null===(n=r.data)||void 0===n?void 0:n.data;i&&(a(i.find((t=>t.address===e.address)).price),l(i.find((e=>e.address===t.address)).price))})).catch((e=>{o(!1),console.error(e)}))}),[r,e,t,i]);return Kb({refetch:u}),{loading:n,refetch:u,toFiatPrice:c,fromFiatPrice:s}}const $b=e=>(null!=e?e:Gs.getState()).settings.slippage,ev=e=>(null!=e?e:Gs.getState()).settings.ddl;var tv;function rv({toToken:e,fromToken:t,fromAmount:r,toAmount:n,marginAmount:o}){const{account:i,chainId:s,provider:a}=H(),c=Z(qs),l=y((()=>s||c),[s,c]),u=Z($b)||3,d=Z(ev)||20,{feeRate:h,rebateTo:p,apikey:m,isReverseRouting:b}=Z(bb),v=y((()=>Math.floor(Date.now()/1e3)+60*d),[d]),[w,x]=f(tv.Initial),[E,A]=f(null),[R,_]=f(""),[k,S]=f(null),[N,M]=f(null),[T,O]=f(null),[I,F]=f(ne.from(0)),[W,C]=f(null),[j,U]=f(null),[D,B]=f(""),[V,P]=f(""),[z,L]=f(""),[Y,X]=f(0),J=g((()=>Bs(this,void 0,void 0,(function*(){if(!l||!t||!e)return;if(!b&&!r)return;if(b&&!n)return;x(tv.Loading);const o={chainId:l,deadLine:v,apikey:m,slippage:u,source:"dodoV2AndMixWasm",toTokenAddress:e.address,toTokenDecimals:e.decimals,fromTokenAddress:t.address,fromTokenDecimals:t.decimals,userAddr:i||"0x0000000000000000000000000000000000000000"};b?o.toAmount=oe(String(n||1),e.decimals).toString():o.fromAmount=oe(String(r||1),t.decimals).toString(),p&&h&&(o.rebateTo=p,o.fee=h);try{const e=(yield te.get("https://api.dodoex.io/route-service/v2/widget/getdodoroute",{params:o})).data.data;if((null==e?void 0:e.resAmount)?(x(tv.Success),A(e.resAmount),O(e.priceImpact),C(e.resPricePerFromToken),U(e.resPricePerToToken),S(e.baseFeeAmount),M(e.additionalFeeAmount),B(e.to),P(e.data),_(e.value),L(e.useSource),X(e.duration)):x(tv.Failed),!i||!a)return;const t=yield Ib({from:i,to:e.to,value:e.value,data:e.data},a);t&&F(t)}catch(e){x(tv.Failed),console.error(e)}}))),[v,i,l,e,h,u,p,t,a,r,n,m,b]);Kb({refetch:J});const G=y((()=>{const e=b?n:r;return w!==tv.Loading&&e?E:null}),[w,b,n,r,E]),q=function(){const{chainId:e,account:t}=H(),r=Pb(),n=g((({to:e,data:n,useSource:o,duration:i,ddl:s,gasLimit:a,subtitle:c,value:l})=>{const u=60*s,d=l;o&&"weth"!==o.toLowerCase()&&a&&a.lt(3e4)&&console.debug("Warning: GasLimit less than the minimum!");const h={from:t,to:e,data:n,value:d,route:o,duration:i,ddlSecRel:u,gasLimit:a};r.execute(ie._("Swap"),Object.assign({opcode:Wb.TX},h),c)}),[t,e]);return n}(),K=g((e=>{t&&(b?E:r)&&q({to:D,data:V,useSource:z,duration:Y,ddl:d,value:R,subtitle:e})}),[D,d,V,Y,z,t,r,I,E,R,b]);return{status:w,refetch:J,priceImpact:T,executeSwap:K,baseFeeAmount:k,resAmount:G,additionalFeeAmount:N,resPricePerToToken:j,resPricePerFromToken:W}}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(tv||(tv={}));function nv(e){rb(e),vl(),wl();const{provider:t,connector:r}=H();p((()=>{const t=e.defaultChainId||1;(null==r?void 0:r.connectEagerly)?r.connectEagerly(t):r.activate(t)}),[r]),p((()=>{const e=null==t?void 0:t.provider;e&&e.once&&e.once("chainChanged",(()=>{setTimeout((()=>{window.location.reload()}),200||100)}))}),[t]);const n=e.width||375,o=e.height||494;return qb(Object.assign(Object.assign({},e),{width:n,height:o})),Ie.exports.jsx(Kr,{sx:{width:n,height:o,overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",minWidth:335,minHeight:494,borderRadius:16,backgroundColor:"background.paper"},className:"dodo-widget-container",children:Ie.exports.jsx(Jb,{...e,children:e.children})})}function ov(e){const t=function(e){for(var t=void 0===e?{}:e,r=t.mode,n=void 0===r?"light":r,i=t.lang,s=t.theme,a=[],c=1;c<arguments.length;c++)a[c-1]=arguments[c];var l=xn(n,s,i);return Vr(l=a.reduce((function(e,t){return o(e,t)}),l))}({mode:e.colorMode,theme:e.theme,lang:e.locale||"en-US"}),r=y((()=>e.defaultChainId||1),[e.defaultChainId]),n=ap({provider:e.provider,jsonRpcUrlMap:e.jsonRpcUrlMap,defaultChainId:r}),i=`${n.length}+${e.jsonRpcUrlMap?Object.entries(e.jsonRpcUrlMap):""}+${e.defaultChainId}+${r}`;return Ie.exports.jsx(z,{store:Gs,children:Ie.exports.jsx(kb,{locale:e.locale,children:Ie.exports.jsx(pn,{theme:t,children:Ie.exports.jsxs(X,{connectors:n,children:[Ie.exports.jsx(_n,{container:".dodo-widget-container"}),Ie.exports.jsx(nv,{...e})]},i)})})})}function iv(e){const{width:t}=Z(bb),r=y((()=>{let e="";return"number"==typeof t?e=`${t}px`:t&&(e=t),e?`calc(${e} - 40px)`:"auto"}),[t]);return Ie.exports.jsx(Ci,{container:document.querySelector(".dodo-widget-container"),maxWidth:r,...e})}function sv({onClick:e}){const t=Jr();return Ie.exports.jsx(so,{sx:{width:"100%",position:"relative"},onClick:e,children:Ie.exports.jsx(Kr,{component:zn,sx:{width:36,height:36,borderRadius:"50%",backgroundColor:t.palette.background.input,border:`4px solid ${t.palette.background.paper}`,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%) rotate(-90deg)"},children:Ie.exports.jsx(Kr,{component:T,sx:{width:18,color:"text.secondary"}})})})}function av({open:t,execute:n,onClose:o,toToken:i,fromToken:s,fromAmount:a,toAmount:c,priceImpact:l,clearFromAmt:u,clearToAmt:d,baseFeeAmount:h,curToFiatPrice:m,curFromFiatPrice:g,pricePerFromToken:b,additionalFeeAmount:v}){var w,x;const E=Jr(),A=Z($b),R=P(),{contractStatus:_}=Z(bb),S=y((()=>new r(l).gt(15)),[l]),[N,M]=f(!1),[T,W]=f(!1);return p((()=>{_!==Hs.Pending&&o(),_===Hs.TxSuccess&&(d(),u())}),[_]),p((()=>{M(!1)}),[m]),Ie.exports.jsx(yb,{open:t,onClose:()=>{R(Ub({contractStatus:Hs.Initial})),o()},title:Ie.exports.jsx(e,{id:"Swap summary"}),children:Ie.exports.jsxs(Kr,{sx:{margin:20,display:"flex",height:"100%",flexDirection:"column",borderTop:`1px solid ${E.palette.border.main}`},children:[Ie.exports.jsxs(Kr,{sx:{py:20,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexDirection:"column",borderBottom:`1px solid ${E.palette.border.main}`},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsxs(Kr,{children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[Ie.exports.jsx(fb,{width:16,height:16,url:null==s?void 0:s.logoURI,address:null!==(w=null==s?void 0:s.address)&&void 0!==w?w:"",marginRight:6}),Ie.exports.jsx(Kr,{children:`${Ui({input:a,decimals:null==s?void 0:s.decimals})} ${null==s?void 0:s.symbol}`})]}),Ie.exports.jsx(Kr,{sx:{mt:4,typography:"h6",color:E.palette.text.secondary},children:g?`$${ji({input:g,showDecimals:1})}`:"-"})]}),Ie.exports.jsx(Kr,{sx:{width:16,mx:16},component:O}),Ie.exports.jsxs(Kr,{children:[Ie.exports.jsxs(Kr,{sx:{display:"flex"},children:[Ie.exports.jsx(fb,{width:16,height:16,marginRight:6,url:null==i?void 0:i.logoURI,address:null!==(x=null==i?void 0:i.address)&&void 0!==x?x:""}),Ie.exports.jsx(Kr,{children:`${Ui({input:c,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),Ie.exports.jsx(Kr,{sx:{typography:"h6",mt:4,color:E.palette.text.secondary},children:m?`$${ji({input:m,showDecimals:1})}(${l}%)`:"-"})]})]}),Ie.exports.jsx(Kr,{sx:{mt:12,typography:"h6"},children:`1 ${null==s?void 0:s.symbol} = ${Ui({input:new r(c).dividedBy(new r(a)),decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),Ie.exports.jsxs(Kr,{sx:{py:15,typography:"body2",borderBottom:`1px solid ${E.palette.border.main}`},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",color:E.palette.text.secondary},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(Kr,{sx:{width:16,mr:7},component:I}),Ie.exports.jsx(e,{id:"Swap Detail"})]}),Ie.exports.jsx(Kr,{component:zn,children:Ie.exports.jsx(Kr,{onClick:()=>W(!T),sx:{width:10,color:"text.secondary",transform:T?"rotateX(0deg)":"rotateX(180deg)"},component:k})})]}),Ie.exports.jsxs(Kr,{sx:{mt:16,display:T?"initial":"none"},children:[Ie.exports.jsxs(Kr,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(e,{id:"Basic Fee"}),Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"Estimated service provider fees"}),ml:5})]}),Ie.exports.jsx(Kr,{children:`${Ui({input:h,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),Ie.exports.jsxs(Kr,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(e,{id:"Additional Fee"}),Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"Additional routing fees set by the Widget user"}),ml:5})]}),Ie.exports.jsx(Kr,{children:`${Ui({input:v,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),Ie.exports.jsxs(Kr,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(e,{id:"Price Impact"}),Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"Due to the market condition, market price and estimated price may have a slight difference"}),ml:5})]}),Ie.exports.jsx(Kr,{children:`${l}%`})]}),Ie.exports.jsxs(Kr,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(e,{id:"Slippage"}),Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:5})]}),Ie.exports.jsx(Kr,{children:A})]})]})]}),Ie.exports.jsx(Kr,{sx:{flex:1}}),S&&Ie.exports.jsxs(Kr,{sx:{mb:14,display:"flex",cursor:"pointer",justifyContent:"center",alignItems:"center",typography:"h6"},onClick:()=>M(!N),children:[Ie.exports.jsx(Kr,{sx:{mr:4,width:18,height:18,alignItems:"center"},children:N?Ie.exports.jsx(Kr,{sx:{width:"100%",height:"100%",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"secondary.main"},children:Ie.exports.jsx(Kr,{component:F,sx:{width:14,color:"#1a1a1b"}})}):Ie.exports.jsx(Kr,{sx:{width:"100%",height:"100%",borderRadius:4,border:`1px solid ${E.palette.text.secondary}`}})}),Ie.exports.jsx(Kr,{children:Ie.exports.jsx(e,{components:{0:Ie.exports.jsx(Kr,{component:"span",sx:{color:"error.main"}})},values:{priceImpact:l},id:"Price impact reaches <0>{priceImpact}</0>%, accept the quote"})})]}),Ie.exports.jsx(Bn,{isLoading:_==Hs.Pending,disabled:S&&!N,fullWidth:!0,onClick:()=>{n(),R(Ub({contractStatus:Hs.Pending}))},children:_==Hs.Pending?Ie.exports.jsx(e,{id:"Confirming"}):Ie.exports.jsx(e,{id:"Confirm swap"})})]})})}function cv(e){var{sx:t,maxVal:r,decimals:o=2,onInputChange:i}=e,s=Ds(e,["sx","maxVal","decimals","onInputChange"]);return Jr(),Ie.exports.jsx(eo,{...s,onChange:e=>{const t=0===e.target.value.length?null:Vi(e.target.value,o),s=r&&t&&new n(t).gt(r)?r.toString():t;console.log("finalVal:",s),i&&i(s)}})}function lv({open:t,onClose:r}){const n=Jr(),o=P(),i=Z($b),s=Z(ev),a=y((()=>Number(i)>=50),[i]);return Ie.exports.jsx(yb,{open:t,onClose:r,title:Ie.exports.jsx(e,{id:"Settings"}),children:Ie.exports.jsxs(Kr,{sx:{mx:20},children:[Ie.exports.jsxs(Kr,{sx:{py:20,borderTop:`1px solid ${n.palette.border.main}`},children:[Ie.exports.jsxs(Kr,{sx:{mb:16,display:"flex",alignItems:"center"},children:[Ie.exports.jsx(e,{id:"Slippage Tolerance"}),Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:7})]}),Ie.exports.jsxs(Kr,{sx:{display:"flex",flexDirection:"column"},children:[Ie.exports.jsx(cv,{fullWidth:!0,maxVal:100,value:i,placeholder:3..toString(),onInputChange:e=>{o((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_SLIPPAGE",payload:e})})))(e))},suffix:Ie.exports.jsx(Kr,{sx:{color:"text.disabled"},children:"%"}),height:36}),a&&Ie.exports.jsx(Kr,{sx:{typography:"h6",mt:6,color:"error.main"},children:Ie.exports.jsx(e,{id:"Maximum slippage do not exceed 50%"})})]})]}),Ie.exports.jsxs(Kr,{sx:{py:20,borderTop:`1px solid ${n.palette.border.main}`},children:[Ie.exports.jsxs(Kr,{sx:{mb:16,display:"flex",alignItems:"center"},children:[Ie.exports.jsx(e,{id:"Transaction Deadline"}),Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"If your transaction time exceeds the deadline, your transaction will be rescinded."}),ml:7})]}),Ie.exports.jsx(cv,{value:s,fullWidth:!0,height:36,placeholder:ie._("{DEFAULT_SWAP_DDL} minutes",{DEFAULT_SWAP_DDL:20}),onInputChange:e=>{o((e=>t=>Bs(void 0,void 0,void 0,(function*(){t({type:"SET_TRANSACTION_DDL",payload:e})})))(e?Math.max(Number(e),1):""))}})]})]})})}function uv({toToken:t,fromToken:r,priceStatus:n,pricePerToToken:o,pricePerFromToken:i}){const[s,a]=f("-"),[c,l]=f(null),[u,d]=f("-"),[h,m]=f(null);p((()=>{a(null==r?void 0:r.symbol),d(null==t?void 0:t.symbol),l(o),m(i)}),[r,t,o,i]);const y=g((()=>{a(u),d(s),l(h),m(c)}),[s,c,u,h]);return Ie.exports.jsx(Kr,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:{[tv.Initial]:"-",[tv.Loading]:Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(co,{sx:{mr:5}}),Ie.exports.jsx(e,{id:"Fetching best price..."})]}),[tv.Failed]:Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(Kr,{component:W,sx:{width:15,mr:5,color:"warning.main"}}),Ie.exports.jsx(e,{id:"Quote not available"})]}),[tv.Success]:Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(Kr,{sx:{typography:"body2"},children:`1 ${s} = ${ji({input:h,showDecimals:4})} ${u}`}),Ie.exports.jsx(Kr,{component:zn,sx:{width:18,height:18,ml:6,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center"},children:Ie.exports.jsx(Kr,{sx:{width:16,color:"text.secondary"},onClick:y,component:C})})]})}[n]})}function dv({open:t,onClose:r}){const n=Z(qs);return Ie.exports.jsx(yb,{title:Ie.exports.jsx(e,{id:"Connect to your wallet"}),open:t,onClose:r,children:Ie.exports.jsx(Kr,{sx:{mx:20,pb:20,border:"1px solid transparent",borderTopColor:"border.main"},children:Object.values(ip).map((t=>Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center",flexDirection:"column",mt:20,p:20,backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:()=>{!function(e,t,r){var n;const o=sp[e];if(!o)throw new Error(`Unknown wallet type: ${e}`);const[i]=o;null===(n=i.activate(t))||void 0===n||n.catch((e=>{4001!==e.code?r(e):i.connectEagerly?i.connectEagerly(t):i.activate(t)}))}(t.type,n,(e=>{console.error(e)}))},children:[Ie.exports.jsx(Kr,{component:t.icon,sx:{width:32,height:32}}),Ie.exports.jsx(Kr,{sx:{mt:8,typography:"caption"},children:t.name}),Ie.exports.jsx(Kr,{sx:{mt:4,typography:"body2",color:"text.secondary"},children:Ie.exports.jsx(e,{id:"Connect to your {0} Wallet",values:{0:t.name}})})]},t.type)))})})}function hv(){const{connector:t}=H(),[r,n]=f(!1);return Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(Bn,{size:Bn.Size.big,fullWidth:!0,onClick:()=>{t.deactivate?t.deactivate():t.resetState(),n(!0)},"data-testid":"connect-wallet-btn",children:Ie.exports.jsx(e,{id:"Connect to a wallet"})}),Ie.exports.jsx(dv,{open:r,onClose:()=>n(!1)})]})}const fv=({account:e,chainId:t,offset:n,contractAddress:o})=>{var i;const s=Z(qs),a=y((()=>{var e;return sa[null!==(e=t)&&void 0!==e?e:s]}),[t]),{isETH:c}=y((()=>Os(t)),[t]),{DODO_APPROVE:l}=a||{},u=null!==(i=null!=o?o:l)&&void 0!==i?i:null,d=function(e){const{account:t}=H(),n=Z(qs),o=Z(ob),i=y((()=>Cs[n]),[n]),s=g((n=>{var s;if(!t||!e)return null;if(n.symbol===i.symbol&&Ts(n.address,i.address))return new r(jb);const a=null===(s=null==o?void 0:o[n.address.toLowerCase()])||void 0===s?void 0:s.tokenAllowances;return null!=a?a:null}),[t,e,i.symbol,i.address,o]);return s}(u),h=lb(),{runningRequests:f}=Bb(),p=Z(cb),m=y((()=>{var e;return null===(e=Cs[null!=t?t:s])||void 0===e?void 0:e.address}),[t]),b=g(((t,o,i)=>{if(!t)return El.Loading;const s=!!(null==f?void 0:f.find((e=>e.spec.opcode===Wb.Approval&&e.spec.token.address===(null==t?void 0:t.address)))),a=null!=i?i:t?h(t):null,c=t?d(t):null,l=new r(null!=o?o:0);if(!e)return El.Unchecked;if(!a||l.minus(null!=n?n:0).gt(a))return El.Unchecked;if(l.isZero())return El.Unchecked;return t.address===m?El.Sufficient:s?El.Approving:c&&l.minus(null!=n?n:0).gt(c)?El.Insufficient:El.Sufficient}),[h,d,e,n,u,t,p,f,m]),v=g((e=>{const t=e?d(e):null;return("USDT"===(null==e?void 0:e.symbol)||(null==e?void 0:e.address.toLowerCase())==="0x6426e6017968377529487E0ef0aA4E7759724e05".toLowerCase())&&null!==t&&t.gt(0)}),[d]),w=Pb(),x=P(),E=g(((t,n)=>Bs(void 0,void 0,void 0,(function*(){if(!u||!e||!t)return;const o=(e=>{let t=e.symbol;return t.indexOf("DLP_")>-1&&(t=t.replace("DLP_","")),t.indexOf("DLP")>-1&&(t=t.replace("DLP","LP")),t})(t),i=n?new r(0):void 0,s=n?ie._("Reset"):ie._("Approve");var a;(yield w.execute(`${s} ${o}`,{opcode:Wb.Approval,token:t,contract:u,amt:i}))===Nb.Success&&x((a=null!=i?i:jb,e=>Bs(void 0,void 0,void 0,(function*(){e({type:"SET_ACCOUNT_ALLOWANCES",payload:a})}))))}))),[u,e,t,w,x]),A=g((e=>{const t=new r(0);if(!e)return t.toString();const n=h(e);if(!n)return t.toString();let o=n;const i=c?.1:.02;return m===(null==e?void 0:e.address)&&(o=n.gt(i)?n.minus(i):t),o.toString()}),[t,h,c]);return{getApprovalState:b,getPendingRest:v,getMaxBalance:A,submitApprove:E}};function pv(){var t,n;const o=Jr(),{isInflight:i}=Bb(),{chainId:s,account:a}=H(),l=P(),{isReverseRouting:u}=Z(bb),d=Z(qs),h=Z(ab),m=Z(sb),{isETH:b}=y((()=>Os(s)),[s]),v=y((()=>{var e;return null===(e=Cs[null!=s?s:d])||void 0===e?void 0:e.address}),[s]),[w,x]=f(""),[E,A]=f(""),[R,_]=f(""),[k,S]=f(""),N=y((()=>c((e=>_(e)),1e3)),[]),M=y((()=>c((e=>S(e)),1e3)),[]),[T,I]=f(null),[F,C]=f(null),[D,B]=f(!1),[V,z]=f(!1),{toFiatPrice:L,fromFiatPrice:Y}=Qb({chainId:s,toToken:F,fromToken:T}),X=lb(),J=y((()=>T?X(T):null),[T,X]);y((()=>F?X(F):null),[F,X]);const{getApprovalState:G,submitApprove:q,getPendingRest:K,getMaxBalance:Q}=fv({account:a,chainId:s}),$=y((()=>K(u?F:T)),[null==T?void 0:T.address,null==F?void 0:F.address,K,u]),{marginAmount:ee}=Gb({token:u?F:T,fiatPrice:u?L:Y}),{resAmount:te,priceImpact:re,executeSwap:ne,baseFeeAmount:oe,additionalFeeAmount:ie,resPricePerToToken:se,resPricePerFromToken:ae,status:ce}=rv({toToken:F,fromToken:T,marginAmount:ee,fromAmount:R,toAmount:k}),le=g((e=>{const t=e.toString();x(t),N(t)}),[x,N]),ue=g((e=>{const t=e.toString();A(t),M(t)}),[A,M]),de=Z(nb),he=()=>{let e=null;T||m&&m.chainId===s||de.some((t=>!(t.chainId!==s||t.side&&"from"!==t.side)&&(e=t,I(t),!0))),F||h&&h.chainId===s||de.some((t=>!(t.chainId!==s||e&&e.address===t.address||t.side&&"to"!==t.side)&&(C(t),!0)))};p((()=>{s&&(C(null),I(null),u?ue(""):le("")),m&&m.chainId===s&&(I(m),m.amount&&(l(Ub({isReverseRouting:!1})),le(m.amount))),h&&h.chainId===s&&(C(h),h.amount&&m&&!m.amount&&(l(Ub({isReverseRouting:!0})),ue(h.amount))),he()}),[h,m,s,le,ue]),p((()=>{he()}),[de]);const fe=g((()=>{le(""),ue(""),I(F),C(T)}),[I,F,C,T,le,ue]),pe=g((e=>u?ue(Q(F)):le(Q(T))),[le,ue,Q,T,F,u]),me=y((()=>(100*Number(re)).toFixed(2)),[re]),ge=y((()=>{const e=u?te:R;return e&&Y?new r(Y).multipliedBy(e):null}),[Y,R,u,te]),ye=y((()=>{const e=u?k:te;return e&&L?new r(L).multipliedBy(e):null}),[L,k,u,te]),be=y((()=>Ie.exports.jsxs(Kr,{sx:{display:"flex",fontWeight:600,typography:"body2",alignItems:"center",justifyContent:"center"},children:[Ie.exports.jsx(iv,{title:Ie.exports.jsx(e,{id:"Due to the market condition, market price and estimated price may have a slight difference"}),mr:8}),Ie.exports.jsxs(Kr,{sx:{display:"flex"},children:[Ie.exports.jsx(e,{id:"Current price impact"}),Ie.exports.jsxs(Kr,{sx:{color:o.palette.error.main,ml:4},children:[me,"%"]})]})]})),[me]),ve=y((()=>Ie.exports.jsx(uv,{toToken:F,fromToken:T,priceStatus:ce,pricePerToToken:se,pricePerFromToken:ae})),[F,T,ce,se,ae]),we=y((()=>!Is[s||1]),[s]),xe=y((()=>ce===tv.Loading?Ie.exports.jsx(Kr,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(co,{sx:{mr:5}}),Ie.exports.jsx(e,{id:"Fetching best price..."})]})}):we?Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsx(Kr,{component:W,sx:{mr:6,width:16,color:"warning.main"}}),Ie.exports.jsx(e,{id:"Unsupported network - switch to trade"})]}):w&&new r(me).gt(15)?be:ve),[ce,ve,w,be,me,we]),Ee=y((()=>u?new r(E).gt(0)?Ui({input:te,decimals:null==T?void 0:T.decimals}):"-":w),[w,E,te,T,u]),Ae=y((()=>u?E:new r(w).gt(0)?Ui({input:te,decimals:null==F?void 0:F.decimals}):"-"),[w,E,te,F,u]),Re=y((()=>{const t=G(T,u?te||0:R),n=t===El.Approving,o=t===El.Insufficient&&!$,s=b?.1:.02,c=v===(null==T?void 0:T.address),l=new r(J||0);return a?i?Ie.exports.jsx(Bn,{fullWidth:!0,isLoading:!0,disabled:!0,children:Ie.exports.jsx(e,{id:"Transaction Pending"})}):T&&F?o?Ie.exports.jsx(Bn,{fullWidth:!0,disabled:n,onClick:()=>q(T),children:n?Ie.exports.jsx(e,{id:"Approving"}):Ie.exports.jsx(e,{id:"Approve"})}):new r(u?k:R).gt(0)?ce===tv.Loading?Ie.exports.jsx(Bn,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-fetch-price-btn",children:Ie.exports.jsx(e,{id:"Fetching Price..."})}):te&&ce!==tv.Failed?l.lt(u?te:R)||c&&l.lte(s)?Ie.exports.jsx(Bn,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-insufficient-balance-btn",children:Ie.exports.jsx(e,{id:"Insufficient balance"})}):Ie.exports.jsx(Bn,{fullWidth:!0,onClick:()=>B(!0),"data-testid":"swap-review-btn",children:Ie.exports.jsx(e,{id:"Review Swap"})}):Ie.exports.jsx(Bn,{fullWidth:!0,disabled:!0,children:Ie.exports.jsx(e,{id:"Quote not available"})}):Ie.exports.jsx(Bn,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-enter-amount-btn",children:Ie.exports.jsx(e,{id:"Enter an amount"})}):Ie.exports.jsx(Bn,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-select-token-btn",children:Ie.exports.jsx(e,{id:"Select Tokens"})}):Ie.exports.jsx(hv,{})}),[b,a,k,R,F,te,T,i,ne,$,q,ce,J,G,v,u]),_e=y((()=>T&&F?Ie.exports.jsxs(Kr,{sx:{display:"flex",alignItems:"center"},children:[Ie.exports.jsx(fb,{token:T,sx:{width:16,height:16,mr:6}}),`${Ui({input:u?te:R,decimals:null==T?void 0:T.decimals})} ${null==T?void 0:T.symbol}`,Ie.exports.jsx(Kr,{component:O,sx:{width:12,height:12,mx:16}}),Ie.exports.jsx(fb,{token:F,sx:{width:16,height:16,mr:6}}),`${Ui({input:u?k:te,decimals:null==F?void 0:F.decimals})} ${null==F?void 0:F.symbol}`]}):Ie.exports.jsx(Kr,{})),[T,F,R,k,te,u]);return Ie.exports.jsxs(Ie.exports.Fragment,{children:[Ie.exports.jsxs(Kr,{sx:{display:"flex",justifyContent:"space-between",typography:"caption",margin:20},children:[Ie.exports.jsx(e,{id:"Swap"}),Ie.exports.jsx(Kr,{component:zn,children:Ie.exports.jsx(Kr,{component:j,onClick:()=>z(!0),sx:{width:19,height:19,color:"text.primary",cursor:"pointer"}})})]}),Ie.exports.jsxs(Kr,{sx:{flex:1,padding:"0 20px 20px",overflowY:"auto"},children:[Ie.exports.jsxs(Kr,{children:[Ie.exports.jsx(Ab,{sx:{mb:4},token:T,side:"from",amt:Ee,onMaxClick:pe,onInputChange:le,onInputFocus:()=>{u&&le(""),l(Ub({isReverseRouting:!1}))},showMaxBtn:!u&&!w,occupiedAddrs:[null!==(t=null==F?void 0:F.address)&&void 0!==t?t:""],fiatPriceTxt:ge?`$${ji({input:ge,showDecimals:1})}`:"-",onTokenChange:(e,t)=>{if(t)return fe();le(""),ue(""),I(e)},readOnly:u}),Ie.exports.jsx(sv,{onClick:fe}),Ie.exports.jsx(Ab,{token:F,side:"to",amt:Ae,onInputChange:ue,onInputFocus:()=>{u||ue(""),l(Ub({isReverseRouting:!0}))},occupiedAddrs:[null!==(n=null==T?void 0:T.address)&&void 0!==n?n:""],fiatPriceTxt:ye?`$${ji({input:ye,showDecimals:1})}(${me}%)`:"-",onTokenChange:(e,t)=>{if(t)return fe();le(""),ue(""),C(e)},readOnly:!u}),Ie.exports.jsx(Kr,{sx:{py:12,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexWrap:"wrap"},children:xe})]}),Re,Ie.exports.jsxs(Kr,{sx:{mt:13,display:"flex",typography:"h6",cursor:"pointer",justifyContent:"center",alignItems:"center",color:o.palette.text.disabled},onClick:()=>window.open("https://app.dodoex.io"),children:[Ie.exports.jsx(Kr,{sx:{width:24,typography:"body2",transform:"translate(1px, 2px)","& path":{fill:o.palette.text.disabled}},component:U}),Ie.exports.jsx(e,{id:"Powered by DODO protocol"})]})]}),Ie.exports.jsx(av,{toToken:F,fromToken:T,fromAmount:u?te:R,toAmount:u?k:te,open:D,baseFeeAmount:oe,priceImpact:me,additionalFeeAmount:ie,curToFiatPrice:ye,execute:()=>ne(_e),clearFromAmt:()=>le(""),clearToAmt:()=>ue(""),curFromFiatPrice:ge,pricePerFromToken:ae,onClose:()=>B(!1)}),Ie.exports.jsx(lv,{open:V,onClose:()=>z(!1)})]})}var mv,gv=V;if("production"===process.env.NODE_ENV)mv=gv.createRoot,gv.hydrateRoot;else{var yv=gv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;mv=function(e,t){yv.usingClientEntryPoint=!0;try{return gv.createRoot(e,t)}finally{yv.usingClientEntryPoint=!1}}}function bv(e){return Ie.exports.jsx(ov,{...e,children:Ie.exports.jsx(pv,{})})}function vv(e){const t=document.getElementById("dodo-swap-widget");mv(t).render(Ie.exports.jsx(ov,{...e,children:Ie.exports.jsx(pv,{})}))}export{vv as InitSwapWidget,bv as SwapWidget};
45
+ */!function(e){!function(){var t="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=me:o&&(n=self);var i=!n.JS_SHA3_NO_COMMON_JS&&e.exports,s=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),l=[4,1024,262144,67108864],c=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],d=[224,256,384,512],p=[128,256],h=["hex","buffer","arrayBuffer","array","digest"],f={128:168,256:136};!n.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!s||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var m=function(e,t,r){return function(n){return new M(e,t,e).update(n)[r]()}},g=function(e,t,r){return function(n,o){return new M(e,t,o).update(n)[r]()}},y=function(e,t,r){return function(t,n,o,i){return E["cshake"+e].update(t,n,o,i)[r]()}},b=function(e,t,r){return function(t,n,o,i){return E["kmac"+e].update(t,n,o,i)[r]()}},x=function(e,t,r,n){for(var o=0;o<h.length;++o){var i=h[o];e[i]=t(r,n,i)}return e},v=function(e,t){var r=m(e,t,"hex");return r.create=function(){return new M(e,t,e)},r.update=function(e){return r.create().update(e)},x(r,m,e,t)},w=[{name:"keccak",padding:[1,256,65536,16777216],bits:d,createMethod:v},{name:"sha3",padding:[6,1536,393216,100663296],bits:d,createMethod:v},{name:"shake",padding:[31,7936,2031616,520093696],bits:p,createMethod:function(e,t){var r=g(e,t,"hex");return r.create=function(r){return new M(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},x(r,g,e,t)}},{name:"cshake",padding:l,bits:p,createMethod:function(e,t){var r=f[e],n=y(e,0,"hex");return n.create=function(n,o,i){return o||i?new M(e,t,n).bytepad([o,i],r):E["shake"+e].create(n)},n.update=function(e,t,r,o){return n.create(t,r,o).update(e)},x(n,y,e,t)}},{name:"kmac",padding:l,bits:p,createMethod:function(e,t){var r=f[e],n=b(e,0,"hex");return n.create=function(n,o,i){return new F(e,t,o).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(e,t,r,o){return n.create(e,r,o).update(t)},x(n,b,e,t)}}],E={},A=[],k=0;k<w.length;++k)for(var C=w[k],R=C.bits,T=0;T<R.length;++T){var S=C.name+"_"+R[T];if(A.push(S),E[S]=C.createMethod(R[T],C.padding),"sha3"!==C.name){var N=C.name+R[T];A.push(N),E[N]=E[S]}}function M(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function F(e,t,r){M.call(this,e,t,r)}M.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var o,i,a=this.blocks,l=this.byteCount,u=e.length,d=this.blockCount,p=0,h=this.s;p<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,o=1;o<d+1;++o)a[o]=0;if(r)for(o=this.start;p<u&&o<l;++p)a[o>>2]|=e[p]<<c[3&o++];else for(o=this.start;p<u&&o<l;++p)(i=e.charCodeAt(p))<128?a[o>>2]|=i<<c[3&o++]:i<2048?(a[o>>2]|=(192|i>>6)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]):i<55296||i>=57344?(a[o>>2]|=(224|i>>12)<<c[3&o++],a[o>>2]|=(128|i>>6&63)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++p)),a[o>>2]|=(240|i>>18)<<c[3&o++],a[o>>2]|=(128|i>>12&63)<<c[3&o++],a[o>>2]|=(128|i>>6&63)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]);if(this.lastByteIndex=o,o>=l){for(this.start=o-l,this.block=a[d],o=0;o<d;++o)h[o]^=a[o];O(h),this.reset=!0}else this.start=o}return this},M.prototype.encode=function(e,t){var r=255&e,n=1,o=[r];for(r=255&(e>>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},M.prototype.encodeString=function(e){var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}var o=0,i=e.length;if(r)o=i;else for(var a=0;a<e.length;++a){var l=e.charCodeAt(a);l<128?o+=1:l<2048?o+=2:l<55296||l>=57344?o+=3:(l=65536+((1023&l)<<10|1023&e.charCodeAt(++a)),o+=4)}return o+=this.encode(8*o),this.update(e),o},M.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var o=t-r%t,i=[];return i.length=o,this.update(i),this},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];O(n)}},M.prototype.toString=M.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,l="";s<n;){for(i=0;i<t&&s<n;++i,++s)e=r[i],l+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(O(r),i=0)}return o&&(e=r[i],l+=a[e>>4&15]+a[15&e],o>1&&(l+=a[e>>12&15]+a[e>>8&15]),o>2&&(l+=a[e>>20&15]+a[e>>16&15])),l},M.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var l=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)l[s]=r[i];s%t==0&&O(r)}return o&&(l[i]=r[i],e=e.slice(0,a)),e},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.digest=M.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,l=[];a<o;){for(s=0;s<r&&a<o;++s,++a)e=a<<2,t=n[s],l[e]=255&t,l[e+1]=t>>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;a%r==0&&O(n)}return i&&(e=a<<2,t=n[s],l[e]=255&t,i>1&&(l[e+1]=t>>8&255),i>2&&(l[e+2]=t>>16&255)),l},F.prototype=new M,F.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var O=function(e){var t,r,n,o,i,s,a,l,c,d,p,h,f,m,g,y,b,x,v,w,E,A,k,C,R,T,S,N,M,F,O,I,j,D,_,B,P,W,U,L,V,Z,H,z,Y,G,X,J,q,Q,K,$,ee,te,re,ne,oe,ie,se,ae,le,ce,ue;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(l<<1|c>>>31),r=i^(c<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|p>>>31),r=a^(p<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(h<<1|f>>>31),r=c^(f<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(o<<1|i>>>31),r=p^(i<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,Z=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,_=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,q=e[23]<<10|e[22]>>>22,F=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,P=e[15]<<6|e[14]>>>26,x=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,K=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,j=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,R=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,W=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,Y=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,S=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,L=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=m^~y&x,e[1]=g^~b&v,e[10]=C^~T&N,e[11]=R^~S&M,e[20]=D^~B&W,e[21]=_^~P&U,e[30]=z^~G&J,e[31]=Y^~X&q,e[40]=te^~ne&ie,e[41]=re^~oe&se,e[2]=y^~x&w,e[3]=b^~v&E,e[12]=T^~N&F,e[13]=S^~M&O,e[22]=B^~W&L,e[23]=P^~U&V,e[32]=G^~J&Q,e[33]=X^~q&K,e[42]=ne^~ie&ae,e[43]=oe^~se&le,e[4]=x^~w&A,e[5]=v^~E&k,e[14]=N^~F&I,e[15]=M^~O&j,e[24]=W^~L&Z,e[25]=U^~V&H,e[34]=J^~Q&$,e[35]=q^~K&ee,e[44]=ie^~ae&ce,e[45]=se^~le&ue,e[6]=w^~A&m,e[7]=E^~k&g,e[16]=F^~I&C,e[17]=O^~j&R,e[26]=L^~Z&D,e[27]=V^~H&_,e[36]=Q^~$&z,e[37]=K^~ee&Y,e[46]=ae^~ce&te,e[47]=le^~ue&re,e[8]=A^~m&y,e[9]=k^~g&b,e[18]=I^~C&T,e[19]=j^~R&S,e[28]=Z^~D&B,e[29]=H^~_&P,e[38]=$^~z&G,e[39]=ee^~Y&X,e[48]=ce^~te&ne,e[49]=ue^~re&oe,e[0]^=u[n],e[1]^=u[n+1]};if(i)e.exports=E;else for(k=0;k<A.length;++k)n[A[k]]=E[A[k]]}()}(Ra);var Ta=Ra.exports;function Sa(e){return"0x"+Ta.keccak_256(ma(e))}const Na=new la("rlp/5.7.0");function Ma(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Fa(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function Oa(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Oa(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=Ma(t.length);return r.unshift(247+r.length),r.concat(t)}pa(e)||Na.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call(ma(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=Ma(t.length);return r.unshift(183+r.length),r.concat(t)}function Ia(e){return xa(Oa(e))}function ja(e,t,r,n){const o=[];for(;r<t+1+n;){const i=Da(e,r);o.push(i.result),(r+=i.consumed)>t+1+n&&Na.throwError("child data too short",la.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function Da(e,t){if(0===e.length&&Na.throwError("data too short",la.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&Na.throwError("data short segment too short",la.errors.BUFFER_OVERRUN,{});const n=Fa(e,t+1,r);return t+1+r+n>e.length&&Na.throwError("data long segment too short",la.errors.BUFFER_OVERRUN,{}),ja(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&Na.throwError("data array too short",la.errors.BUFFER_OVERRUN,{}),ja(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&Na.throwError("data array too short",la.errors.BUFFER_OVERRUN,{});const n=Fa(e,t+1,r);t+1+r+n>e.length&&Na.throwError("data array too short",la.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:xa(e.slice(t+1+r,t+1+r+n))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&Na.throwError("data too short",la.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:xa(e.slice(t+1,t+1+r))}}return{consumed:1,result:xa(e[t])}}function _a(e){const t=ma(e),r=Da(t,0);return r.consumed!==t.length&&Na.throwArgumentError("invalid rlp data","data",e),r.result}const Ba=new la("address/5.7.0");function Pa(e){ba(e,20)||Ba.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=ma(Sa(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Wa={};for(let e=0;e<10;e++)Wa[String(e)]=String(e);for(let e=0;e<26;e++)Wa[String.fromCharCode(65+e)]=String(10+e);const Ua=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function La(e){let t=null;if("string"!=typeof e&&Ba.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=Pa(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Ba.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Wa[e])).join("");for(;t.length>=Ua;){let e=t.substring(0,Ua);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e)&&Ba.throwArgumentError("bad icap checksum","address",e),t=ae(e.substring(4));t.length<40;)t="0"+t;t=Pa("0x"+t)}else Ba.throwArgumentError("invalid address","address",e);return t}var Va;!function(e){e[e.MAINNET=1]="MAINNET",e[e.GOERLI=5]="GOERLI",e[e.BSC=56]="BSC",e[e.POLYGON=137]="POLYGON",e[e.ARBITRUM_ONE=42161]="ARBITRUM_ONE",e[e.AURORA=1313161554]="AURORA",e[e.OKCHAIN=66]="OKCHAIN",e[e.OPTIMISM=10]="OPTIMISM",e[e.AVALANCHE=43114]="AVALANCHE",e[e.CONFLUX=1030]="CONFLUX"}(Va||(Va={}));const Za={[Va.MAINNET]:["https://rpc.ankr.com/eth","https://eth-mainnet.public.blastapi.io","https://eth-rpc.gateway.pokt.network","https://main-rpc.linkpool.io"],[Va.GOERLI]:["https://goerli.optimism.io/"],[Va.BSC]:["https://bsc-dataseed1.binance.org","https://bsc-dataseed2.binance.org","https://bsc-dataseed3.binance.org","https://bsc-dataseed4.binance.org","https://bsc-dataseed1.defibit.io","https://bsc-dataseed2.defibit.io","https://bsc-dataseed3.defibit.io","https://bsc-dataseed4.defibit.io","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed2.ninicoin.io","https://bsc-dataseed3.ninicoin.io","https://bsc-dataseed4.ninicoin.io","https://bsc-dataseed.binance.org","https://rpc.ankr.com/bsc","https://bscrpc.com","https://bsc.mytokenpocket.vip","https://binance.nodereal.io","https://rpc-bsc.bnb48.club"],[Va.POLYGON]:["https://polygon-rpc.com","https://rpc-mainnet.matic.network","https://matic-mainnet.chainstacklabs.com","https://rpc-mainnet.maticvigil.com","https://rpc-mainnet.matic.quiknode.pro","https://matic-mainnet-full-rpc.bwarelabs.com","https://matic-mainnet-archive-rpc.bwarelabs.com","https://poly-rpc.gateway.pokt.network","https://rpc.ankr.com/polygon","https://polygon-mainnet.public.blastapi.io"],[Va.ARBITRUM_ONE]:["https://arb1.arbitrum.io/rpc","https://rpc.ankr.com/arbitrum"],[Va.AURORA]:["https://mainnet.aurora.dev/"],[Va.OKCHAIN]:["https://exchainrpc.okex.org","https://okc-mainnet.gateway.pokt.network/v1/lb/6275309bea1b320039c893ff"],[Va.OPTIMISM]:["https://mainnet.optimism.io","https://optimism-mainnet.public.blastapi.io"],[Va.AVALANCHE]:["https://api.avax.network/ext/bc/C/rpc","https://rpc.ankr.com/avalanche","https://ava-mainnet.public.blastapi.io/ext/bc/C/rpc"],[Va.CONFLUX]:["https://evm.confluxrpc.com","https://conflux-espace-public.unifra.io"]},Ha={symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,showDecimals:4,wrappedTokenSymbol:"WETH"},za={[Va.MAINNET]:Object.assign(Object.assign({},Ha),{wrappedTokenAddress:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}),[Va.GOERLI]:Object.assign(Object.assign({},Ha),{wrappedTokenAddress:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"}),[Va.OPTIMISM]:Object.assign(Object.assign({},Ha),{wrappedTokenAddress:"0x4200000000000000000000000000000000000006"}),[Va.CONFLUX]:Object.assign(Object.assign({},Ha),{symbol:"CFX",name:"CFX",wrappedTokenSymbol:"WCFX",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b"}),[Va.BSC]:Object.assign(Object.assign({},Ha),{symbol:"BNB",name:"BNB",wrappedTokenSymbol:"WBNB",wrappedTokenAddress:"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}),[Va.OKCHAIN]:Object.assign(Object.assign({},Ha),{symbol:"OKT",name:"OKT",wrappedTokenSymbol:"WOKT",wrappedTokenAddress:"0x8F8526dbfd6E38E3D8307702cA8469Bae6C56C15"}),[Va.POLYGON]:Object.assign(Object.assign({},Ha),{symbol:"MATIC",name:"MATIC",showDecimals:6,wrappedTokenSymbol:"WMATIC",wrappedTokenAddress:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}),[Va.ARBITRUM_ONE]:Object.assign(Object.assign({},Ha),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}),[Va.AURORA]:Object.assign(Object.assign({},Ha),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB"}),[Va.AVALANCHE]:Object.assign(Object.assign({},Ha),{symbol:"AVAX",name:"Avalanche",showDecimals:6,wrappedTokenSymbol:"WAVAX",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"})},Ya={[Va.MAINNET]:"ethereum",[Va.GOERLI]:"goerli",[Va.OPTIMISM]:"optimism",[Va.CONFLUX]:"cfx",[Va.BSC]:"bsc",[Va.OKCHAIN]:"okex-chain",[Va.POLYGON]:"polygon",[Va.ARBITRUM_ONE]:"arbitrum",[Va.AURORA]:"aurora",[Va.AVALANCHE]:"avalanche"},Ga={[Va.MAINNET]:"etherscan.io",[Va.GOERLI]:"goerli.etherscan.io",[Va.OPTIMISM]:"optimistic.etherscan.io",[Va.CONFLUX]:"snowtrace.io",[Va.BSC]:"bscscan.com",[Va.OKCHAIN]:"www.oklink.com/okexchain",[Va.POLYGON]:"polygonscan.com",[Va.ARBITRUM_ONE]:"arbiscan.io",[Va.AURORA]:"aurorascan.dev",[Va.AVALANCHE]:"snowtrace.io"},Xa=(e,t)=>{if(0===e.length||0===t.length)return!1;if(t.length===e.length)return e.toLowerCase()===t.toLowerCase();const r=e.substring(2,e.length).toLowerCase(),n=t.substring(2,t.length).toLowerCase();return r.length>n.length?r.endsWith(n):n.endsWith(r)};function Ja(e,t){return`https://${Ga[t||1]}${e?`/${e}`:""}`}const qa=e=>{const t={isMainnet:1===e,isRinkeby:4===e,isGor:5===e};return Object.assign(Object.assign({},t),{isETH:t.isMainnet||t.isRinkeby||t.isGor})};function Qa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Ka(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}const $a=(e,t)=>r=>Ka(void 0,void 0,void 0,(function*(){r({type:"SET_ETH_BALANCE",payload:{[e]:t}})})),el=e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_ACCOUNT_BALANCES",payload:e})})),tl=e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_BALANCE_LOADINGS",payload:e})}));var rl=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const nl=new la("properties/5.7.0");function ol(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function il(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function sl(e){return rl(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function al(e){const t={};for(const r in e)t[r]=e[r];return t}const ll={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function cl(e){if(null==e||ll[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;r<t.length;r++){let n=null;try{n=e[t[r]]}catch(e){continue}if(!cl(n))return!1}return!0}return nl.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function ul(e){if(cl(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>dl(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&ol(t,r,dl(n))}return t}return nl.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function dl(e){return ul(e)}class pl{constructor(e){for(const t in e)this[t]=dl(e[t])}}var hl=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const fl=new la("abstract-provider/5.7.0");class ml extends pl{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class gl{constructor(){fl.checkAbstract(new.target,gl),ol(this,"_isProvider",!0)}getFeeData(){return hl(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield sl({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,o=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,o=le.from("1500000000"),n=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:o,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}const yl=new la("networks/5.7.1");function bl(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const o=["ropsten"],i=new t.AnkrProvider(e,r.ankr);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let o=1;return null!=r.quorum?o=r.quorum:"homestead"===e&&(o=2),new t.FallbackProvider(n,o)}return n[0]};return t.renetwork=function(e){return bl(e)},t}function xl(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return xl(e,t)},r}const vl={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:bl("homestead")},wl={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:bl("ropsten")},El={chainId:63,name:"classicMordor",_defaultProvider:xl("https://www.ethercluster.com/mordor","classicMordor")},Al={unspecified:{chainId:0,name:"unspecified"},homestead:vl,mainnet:vl,morden:{chainId:2,name:"morden"},ropsten:wl,testnet:wl,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:bl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:bl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:bl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:bl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:xl("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:El,classicTestnet:El,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:xl("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:bl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:bl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function kl(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return ma(t)}function Cl(e){e=ma(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}class Rl{constructor(e){ol(this,"alphabet",e),ol(this,"base",e.length),ol(this,"_alphabetMap",{}),ol(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=ma(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let o=n;for(let e=0;e<t.length;++e)o+=t[e]*this.base,t[e]=255&o,o>>=8;for(;o>0;)t.push(255&o),o>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return ma(new Uint8Array(t.reverse()))}}new Rl("abcdefghijklmnopqrstuvwxyz234567");const Tl=new Rl("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Sl="0x0000000000000000000000000000000000000000",Nl=le.from(-1),Ml=le.from(0),Fl=le.from(1),Ol=le.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Il=new la("strings/5.7.0");var jl,Dl;function _l(e,t,r,n,o){if(e===Dl.BAD_PREFIX||e===Dl.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===Dl.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(jl||(jl={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(Dl||(Dl={}));const Bl=Object.freeze({error:function(e,t,r,n,o){return Il.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:_l,replace:function(e,t,r,n,o){return e===Dl.OVERLONG?(n.push(o),0):(n.push(65533),_l(e,t,r))}});function Pl(e,t){null==t&&(t=Bl.error),e=ma(e);const r=[];let n=0;for(;n<e.length;){const o=e[n++];if(o>>7==0){r.push(o);continue}let i=null,s=null;if(192==(224&o))i=1,s=127;else if(224==(240&o))i=2,s=2047;else{if(240!=(248&o)){n+=t(128==(192&o)?Dl.UNEXPECTED_CONTINUE:Dl.BAD_PREFIX,n-1,e,r);continue}i=3,s=65535}if(n-1+i>=e.length){n+=t(Dl.OVERRUN,n-1,e,r);continue}let a=o&(1<<8-i-1)-1;for(let o=0;o<i;o++){let o=e[n];if(128!=(192&o)){n+=t(Dl.MISSING_CONTINUE,n,e,r),a=null;break}a=a<<6|63&o,n++}null!==a&&(a>1114111?n+=t(Dl.OUT_OF_RANGE,n-1-i,e,r,a):a>=55296&&a<=57343?n+=t(Dl.UTF16_SURROGATE,n-1-i,e,r,a):a<=s?n+=t(Dl.OVERLONG,n-1-i,e,r,a):r.push(a))}return r}function Wl(e,t=jl.current){t!=jl.current&&(Il.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return ma(r)}function Ul(e,t){return Pl(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function Ll(e){return Sa(Wl(e))}function Vl(e,t){null==t&&(t=1);const r=[],n=r.forEach,o=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?o(e,t-1):r.push(e)}))};return o(e,t),r}function Zl(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),o=1,i=[0,1];for(let e=1;e<n;e++)i.push(o+=r());let s=r(),a=t;t+=s;let l=0,c=0;function u(){return 0==l&&(c=c<<8|e[t++],l=8),c>>--l&1}const d=Math.pow(2,31),p=d>>>1,h=p>>1,f=d-1;let m=0;for(let e=0;e<31;e++)m=m<<1|u();let g=[],y=0,b=d;for(;;){let e=Math.floor(((m-y+1)*o-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<i[n]?r=n:t=n}if(0==t)break;g.push(t);let s=y+Math.floor(b*i[t]/o),a=y+Math.floor(b*i[t+1]/o)-1;for(;0==((s^a)&p);)m=m<<1&f|u(),s=s<<1&f,a=a<<1&f|1;for(;s&~a&h;)m=m&p|m<<1&f>>>1|u(),s=s<<1^p,a=(a^p)<<1|p|1;y=s,b=1+a-s}let x=n-4;return g.map((t=>{switch(t-x){case 3:return x+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return x+256+(e[a++]<<8|e[a++]);case 1:return x+e[a++];default:return t-1}}))}(e))}function Hl(e){return 1&e?~e>>1:e>>1}function zl(e,t){let r=Array(e);for(let n=0,o=-1;n<e;n++)r[n]=o+=1+t();return r}function Yl(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=Hl(t());return r}function Gl(e,t){let r=zl(e(),e),n=e(),o=zl(n,e),i=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<i[e];t++)r.push(o[e]+t);return t?r.map((e=>t[e])):r}function Xl(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let o=0;o<t;o++)Yl(e,r).forEach(((e,t)=>n[t].push(e)));return n}function Jl(e,t){let r=1+t(),n=t(),o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return Vl(Xl(o.length,1+e,t).map(((e,t)=>{const i=e[0],s=e.slice(1);return Array(o[t]).fill(void 0).map(((e,t)=>{let o=t*n;return[i+t*r,s.map((e=>e+o))]}))})))}function ql(e,t){return Xl(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Ql=Zl(kl("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Kl=new Set(Gl(Ql)),$l=new Set(Gl(Ql)),ec=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(Jl(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(ql(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(Vl(t))}(Ql),tc=function(e){let t=Gl(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let o=Gl(e,t);if(0==o.length)break;n.push({set:new Set(o),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let o=e(),i=o%3;o=o/3|0;let s=!!(1&o);return o>>=1,{branches:n,valid:i,fe0f:s,save:1==o,check:2==o}}()}(Ql);function rc(e){return function(e,t=jl.current){return Pl(Wl(e,t))}(e)}function nc(e){return e.filter((e=>65039!=e))}function oc(e){for(let t of e.split(".")){let e=rc(t);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&45===e[2]&&45===e[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function ic(e){return oc(function(e,t){let r=rc(e).reverse(),n=[];for(;r.length;){let e=sc(r);if(e){n.push(...t(e));continue}let o=r.pop();if(Kl.has(o)){n.push(o);continue}if($l.has(o))continue;let i=ec[o];if(!i)throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`);n.push(...i)}return oc(function(e){return e.normalize("NFC")}(String.fromCodePoint(...n)))}(e,nc))}function sc(e,t){var r;let n,o,i=tc,s=[],a=e.length;for(t&&(t.length=0);a;){let l=e[--a];if(i=null===(r=i.branches.find((e=>e.set.has(l))))||void 0===r?void 0:r.node,!i)break;if(i.save)o=l;else if(i.check&&l===o)break;s.push(l),i.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),i.valid&&(n=s.slice(),2==i.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const ac=new la("hash/5.7.0"),lc=new Uint8Array(32);function cc(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function uc(e){const t=Wl(ic(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++){46===t[e]&&(r.push(cc(t.slice(n,e))),n=e+1)}if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(cc(t.slice(n))),r}function dc(e){"string"!=typeof e&&ac.throwArgumentError("invalid ENS name; not a string","name",e);let t=lc;const r=uc(e);for(;r.length;)t=Sa(ga([t,Sa(r.pop())]));return xa(t)}lc.fill(0);var pc=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const hc=new la("hash/5.7.0"),fc=new Uint8Array(32);fc.fill(0);const mc=le.from(-1),gc=le.from(0),yc=le.from(1),bc=le.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const xc=ka(yc.toHexString(),32),vc=ka(gc.toHexString(),32),wc={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ec=["name","version","chainId","verifyingContract","salt"];function Ac(e){return function(t){return"string"!=typeof t&&hc.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const kc={name:Ac("name"),version:Ac("version"),chainId:function(e){try{return le.from(e).toString()}catch(e){}return hc.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return La(e).toLowerCase()}catch(e){}return hc.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=ma(e);if(32!==t.length)throw new Error("bad length");return xa(t)}catch(e){}return hc.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function Cc(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&hc.throwArgumentError("invalid numeric width","type",e);const o=bc.mask(r?n-1:n),i=r?o.add(yc).mul(mc):gc;return function(t){const r=le.from(t);return(r.lt(i)||r.gt(o))&&hc.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),ka(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&hc.throwArgumentError("invalid bytes width","type",e),function(t){return ma(t).length!==r&&hc.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=ma(e),r=t.length%32;return r?Ea([t,fc.slice(r)]):xa(t)}(t)}}}switch(e){case"address":return function(e){return ka(La(e),32)};case"bool":return function(e){return e?xc:vc};case"bytes":return function(e){return Sa(e)};case"string":return function(e){return Ll(e)}}return null}function Rc(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Tc{constructor(e){ol(this,"types",Object.freeze(dl(e))),ol(this,"_encoderCache",{}),ol(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const o={};e[n].forEach((i=>{o[i.name]&&hc.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",e),o[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&hc.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e);Cc(s)||(r[s]||hc.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),r[s].push(n),t[n][s]=!0)}))}const o=Object.keys(r).filter((e=>0===r[e].length));0===o.length?hc.throwArgumentError("missing primary type","types",e):o.length>1&&hc.throwArgumentError(`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),ol(this,"primaryType",o[0]),function o(i,s){s[i]&&hc.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",e),s[i]=!0,Object.keys(t[i]).forEach((e=>{r[e]&&(o(e,s),Object.keys(s).forEach((t=>{n[t][e]=!0})))})),delete s[i]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=Rc(t,e[t])+r.map((t=>Rc(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=Cc(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&hc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let o=t.map(r);return this._types[e]&&(o=o.map(Sa)),Sa(Ea(o))}}const r=this.types[e];if(r){const t=Ll(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?Sa(n):n}));return n.unshift(t),Ea(n)}}return hc.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||hc.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Sa(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Cc(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],o=parseInt(n[3]);return o>=0&&t.length!==o&&hc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const o=this.types[e];return o?o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{}):hc.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Tc(e)}static getPrimaryType(e){return Tc.from(e).primaryType}static hashStruct(e,t,r){return Tc.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=wc[r];n||hc.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>Ec.indexOf(e.name)-Ec.indexOf(t.name))),Tc.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return Ea(["0x1901",Tc.hashDomain(e),Tc.from(t).hash(r)])}static hash(e,t,r){return Sa(Tc.encode(e,t,r))}static resolveNames(e,t,r,n){return pc(this,void 0,void 0,(function*(){e=al(e);const o={};e.verifyingContract&&!ba(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const i=Tc.from(t);i.visit(r,((e,t)=>("address"!==e||ba(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=yield n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=i.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){Tc.hashDomain(e);const n={},o=[];Ec.forEach((t=>{const r=e[t];null!=r&&(n[t]=kc[t](r),o.push({name:t,type:wc[t]}))}));const i=Tc.from(t),s=al(t);return s.EIP712Domain?hc.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=o,i.encode(r),{types:s,domain:n,primaryType:i.primaryType,message:i.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return xa(ma(t));if(e.match(/^u?int/))return le.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&hc.throwArgumentError("invalid string","value",t),t}return hc.throwArgumentError("unsupported type","type",e)}))}}}var Sc={},Nc={},Mc=Fc;function Fc(e,t){if(!e)throw new Error(t||"Assertion failed")}Fc.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Oc,Ic={exports:{}},jc={exports:{}};!function(e){try{var t=require("util");if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=(Oc||(Oc=1,"function"==typeof Object.create?jc.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jc.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),jc.exports)}}(Ic);var Dc=Mc,_c=Ic.exports;function Bc(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function Pc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function Wc(e){return 1===e.length?"0"+e:e}function Uc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Nc.inherits=_c,Nc.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)r.push(parseInt(e[o]+e[o+1],16))}else for(var n=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=63&i|128):Bc(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(o=0;o<e.length;o++)r[o]=0|e[o];return r},Nc.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=Wc(e[r].toString(16));return t},Nc.htonl=Pc,Nc.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var o=e[n];"little"===t&&(o=Pc(o)),r+=Uc(o.toString(16))}return r},Nc.zero2=Wc,Nc.zero8=Uc,Nc.join32=function(e,t,r,n){var o=r-t;Dc(o%4==0);for(var i=new Array(o/4),s=0,a=t;s<i.length;s++,a+=4){var l;l="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],i[s]=l>>>0}return i},Nc.split32=function(e,t){for(var r=new Array(4*e.length),n=0,o=0;n<e.length;n++,o+=4){var i=e[n];"big"===t?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=255&i):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=255&i)}return r},Nc.rotr32=function(e,t){return e>>>t|e<<32-t},Nc.rotl32=function(e,t){return e<<t|e>>>32-t},Nc.sum32=function(e,t){return e+t>>>0},Nc.sum32_3=function(e,t,r){return e+t+r>>>0},Nc.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},Nc.sum32_5=function(e,t,r,n,o){return e+t+r+n+o>>>0},Nc.sum64=function(e,t,r,n){var o=e[t],i=n+e[t+1]>>>0,s=(i<n?1:0)+r+o;e[t]=s>>>0,e[t+1]=i},Nc.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},Nc.sum64_lo=function(e,t,r,n){return t+n>>>0},Nc.sum64_4_hi=function(e,t,r,n,o,i,s,a){var l=0,c=t;return l+=(c=c+n>>>0)<t?1:0,l+=(c=c+i>>>0)<i?1:0,e+r+o+s+(l+=(c=c+a>>>0)<a?1:0)>>>0},Nc.sum64_4_lo=function(e,t,r,n,o,i,s,a){return t+n+i+a>>>0},Nc.sum64_5_hi=function(e,t,r,n,o,i,s,a,l,c){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+i>>>0)<i?1:0,u+=(d=d+a>>>0)<a?1:0,e+r+o+s+l+(u+=(d=d+c>>>0)<c?1:0)>>>0},Nc.sum64_5_lo=function(e,t,r,n,o,i,s,a,l,c){return t+n+i+a+c>>>0},Nc.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},Nc.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},Nc.shr64_hi=function(e,t,r){return e>>>r},Nc.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var Lc={},Vc=Nc,Zc=Mc;function Hc(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Lc.BlockHash=Hc,Hc.prototype.update=function(e,t){if(e=Vc.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=Vc.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},Hc.prototype.digest=function(e){return this.update(this._pad()),Zc(null===this.pending),this._digest(e)},Hc.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var o=1;o<r;o++)n[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=e>>>24&255,n[o++]=e>>>16&255,n[o++]=e>>>8&255,n[o++]=255&e}else for(n[o++]=255&e,n[o++]=e>>>8&255,n[o++]=e>>>16&255,n[o++]=e>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,i=8;i<this.padLength;i++)n[o++]=0;return n};var zc={},Yc={},Gc=Nc.rotr32;function Xc(e,t,r){return e&t^~e&r}function Jc(e,t,r){return e&t^e&r^t&r}function qc(e,t,r){return e^t^r}Yc.ft_1=function(e,t,r,n){return 0===e?Xc(t,r,n):1===e||3===e?qc(t,r,n):2===e?Jc(t,r,n):void 0},Yc.ch32=Xc,Yc.maj32=Jc,Yc.p32=qc,Yc.s0_256=function(e){return Gc(e,2)^Gc(e,13)^Gc(e,22)},Yc.s1_256=function(e){return Gc(e,6)^Gc(e,11)^Gc(e,25)},Yc.g0_256=function(e){return Gc(e,7)^Gc(e,18)^e>>>3},Yc.g1_256=function(e){return Gc(e,17)^Gc(e,19)^e>>>10};var Qc=Nc,Kc=Lc,$c=Yc,eu=Qc.rotl32,tu=Qc.sum32,ru=Qc.sum32_5,nu=$c.ft_1,ou=Kc.BlockHash,iu=[1518500249,1859775393,2400959708,3395469782];function su(){if(!(this instanceof su))return new su;ou.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Qc.inherits(su,ou);var au=su;su.blockSize=512,su.outSize=160,su.hmacStrength=80,su.padLength=64,su.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=eu(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var c=~~(n/20),u=ru(eu(o,5),nu(c,i,s,a),l,r[n],iu[c]);l=a,a=s,s=eu(i,30),i=o,o=u}this.h[0]=tu(this.h[0],o),this.h[1]=tu(this.h[1],i),this.h[2]=tu(this.h[2],s),this.h[3]=tu(this.h[3],a),this.h[4]=tu(this.h[4],l)},su.prototype._digest=function(e){return"hex"===e?Qc.toHex32(this.h,"big"):Qc.split32(this.h,"big")};var lu=Nc,cu=Lc,uu=Yc,du=Mc,pu=lu.sum32,hu=lu.sum32_4,fu=lu.sum32_5,mu=uu.ch32,gu=uu.maj32,yu=uu.s0_256,bu=uu.s1_256,xu=uu.g0_256,vu=uu.g1_256,wu=cu.BlockHash,Eu=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Au(){if(!(this instanceof Au))return new Au;wu.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Eu,this.W=new Array(64)}lu.inherits(Au,wu);var ku=Au;Au.blockSize=512,Au.outSize=256,Au.hmacStrength=192,Au.padLength=64,Au.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=hu(vu(r[n-2]),r[n-7],xu(r[n-15]),r[n-16]);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4],c=this.h[5],u=this.h[6],d=this.h[7];for(du(this.k.length===r.length),n=0;n<r.length;n++){var p=fu(d,bu(l),mu(l,c,u),this.k[n],r[n]),h=pu(yu(o),gu(o,i,s));d=u,u=c,c=l,l=pu(a,p),a=s,s=i,i=o,o=pu(p,h)}this.h[0]=pu(this.h[0],o),this.h[1]=pu(this.h[1],i),this.h[2]=pu(this.h[2],s),this.h[3]=pu(this.h[3],a),this.h[4]=pu(this.h[4],l),this.h[5]=pu(this.h[5],c),this.h[6]=pu(this.h[6],u),this.h[7]=pu(this.h[7],d)},Au.prototype._digest=function(e){return"hex"===e?lu.toHex32(this.h,"big"):lu.split32(this.h,"big")};var Cu=Nc,Ru=ku;function Tu(){if(!(this instanceof Tu))return new Tu;Ru.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Cu.inherits(Tu,Ru);var Su=Tu;Tu.blockSize=512,Tu.outSize=224,Tu.hmacStrength=192,Tu.padLength=64,Tu.prototype._digest=function(e){return"hex"===e?Cu.toHex32(this.h.slice(0,7),"big"):Cu.split32(this.h.slice(0,7),"big")};var Nu=Nc,Mu=Lc,Fu=Mc,Ou=Nu.rotr64_hi,Iu=Nu.rotr64_lo,ju=Nu.shr64_hi,Du=Nu.shr64_lo,_u=Nu.sum64,Bu=Nu.sum64_hi,Pu=Nu.sum64_lo,Wu=Nu.sum64_4_hi,Uu=Nu.sum64_4_lo,Lu=Nu.sum64_5_hi,Vu=Nu.sum64_5_lo,Zu=Mu.BlockHash,Hu=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function zu(){if(!(this instanceof zu))return new zu;Zu.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Hu,this.W=new Array(160)}Nu.inherits(zu,Zu);var Yu=zu;function Gu(e,t,r,n,o){var i=e&r^~e&o;return i<0&&(i+=4294967296),i}function Xu(e,t,r,n,o,i){var s=t&n^~t&i;return s<0&&(s+=4294967296),s}function Ju(e,t,r,n,o){var i=e&r^e&o^r&o;return i<0&&(i+=4294967296),i}function qu(e,t,r,n,o,i){var s=t&n^t&i^n&i;return s<0&&(s+=4294967296),s}function Qu(e,t){var r=Ou(e,t,28)^Ou(t,e,2)^Ou(t,e,7);return r<0&&(r+=4294967296),r}function Ku(e,t){var r=Iu(e,t,28)^Iu(t,e,2)^Iu(t,e,7);return r<0&&(r+=4294967296),r}function $u(e,t){var r=Ou(e,t,14)^Ou(e,t,18)^Ou(t,e,9);return r<0&&(r+=4294967296),r}function ed(e,t){var r=Iu(e,t,14)^Iu(e,t,18)^Iu(t,e,9);return r<0&&(r+=4294967296),r}function td(e,t){var r=Ou(e,t,1)^Ou(e,t,8)^ju(e,t,7);return r<0&&(r+=4294967296),r}function rd(e,t){var r=Iu(e,t,1)^Iu(e,t,8)^Du(e,t,7);return r<0&&(r+=4294967296),r}function nd(e,t){var r=Ou(e,t,19)^Ou(t,e,29)^ju(e,t,6);return r<0&&(r+=4294967296),r}function od(e,t){var r=Iu(e,t,19)^Iu(t,e,29)^Du(e,t,6);return r<0&&(r+=4294967296),r}zu.blockSize=1024,zu.outSize=512,zu.hmacStrength=192,zu.padLength=128,zu.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var o=nd(r[n-4],r[n-3]),i=od(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],l=td(r[n-30],r[n-29]),c=rd(r[n-30],r[n-29]),u=r[n-32],d=r[n-31];r[n]=Wu(o,i,s,a,l,c,u,d),r[n+1]=Uu(o,i,s,a,l,c,u,d)}},zu.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],o=this.h[1],i=this.h[2],s=this.h[3],a=this.h[4],l=this.h[5],c=this.h[6],u=this.h[7],d=this.h[8],p=this.h[9],h=this.h[10],f=this.h[11],m=this.h[12],g=this.h[13],y=this.h[14],b=this.h[15];Fu(this.k.length===r.length);for(var x=0;x<r.length;x+=2){var v=y,w=b,E=$u(d,p),A=ed(d,p),k=Gu(d,p,h,f,m),C=Xu(d,p,h,f,m,g),R=this.k[x],T=this.k[x+1],S=r[x],N=r[x+1],M=Lu(v,w,E,A,k,C,R,T,S,N),F=Vu(v,w,E,A,k,C,R,T,S,N);v=Qu(n,o),w=Ku(n,o),E=Ju(n,o,i,s,a),A=qu(n,o,i,s,a,l);var O=Bu(v,w,E,A),I=Pu(v,w,E,A);y=m,b=g,m=h,g=f,h=d,f=p,d=Bu(c,u,M,F),p=Pu(u,u,M,F),c=a,u=l,a=i,l=s,i=n,s=o,n=Bu(M,F,O,I),o=Pu(M,F,O,I)}_u(this.h,0,n,o),_u(this.h,2,i,s),_u(this.h,4,a,l),_u(this.h,6,c,u),_u(this.h,8,d,p),_u(this.h,10,h,f),_u(this.h,12,m,g),_u(this.h,14,y,b)},zu.prototype._digest=function(e){return"hex"===e?Nu.toHex32(this.h,"big"):Nu.split32(this.h,"big")};var id=Nc,sd=Yu;function ad(){if(!(this instanceof ad))return new ad;sd.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}id.inherits(ad,sd);var ld=ad;ad.blockSize=1024,ad.outSize=384,ad.hmacStrength=192,ad.padLength=128,ad.prototype._digest=function(e){return"hex"===e?id.toHex32(this.h.slice(0,12),"big"):id.split32(this.h.slice(0,12),"big")},zc.sha1=au,zc.sha224=Su,zc.sha256=ku,zc.sha384=ld,zc.sha512=Yu;var cd={},ud=Nc,dd=Lc,pd=ud.rotl32,hd=ud.sum32,fd=ud.sum32_3,md=ud.sum32_4,gd=dd.BlockHash;function yd(){if(!(this instanceof yd))return new yd;gd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function bd(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function xd(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function vd(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}ud.inherits(yd,gd),cd.ripemd160=yd,yd.blockSize=512,yd.outSize=160,yd.hmacStrength=192,yd.padLength=64,yd.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],o=this.h[2],i=this.h[3],s=this.h[4],a=r,l=n,c=o,u=i,d=s,p=0;p<80;p++){var h=hd(pd(md(r,bd(p,n,o,i),e[wd[p]+t],xd(p)),Ad[p]),s);r=s,s=i,i=pd(o,10),o=n,n=h,h=hd(pd(md(a,bd(79-p,l,c,u),e[Ed[p]+t],vd(p)),kd[p]),d),a=d,d=u,u=pd(c,10),c=l,l=h}h=fd(this.h[1],o,u),this.h[1]=fd(this.h[2],i,d),this.h[2]=fd(this.h[3],s,a),this.h[3]=fd(this.h[4],r,l),this.h[4]=fd(this.h[0],n,c),this.h[0]=h},yd.prototype._digest=function(e){return"hex"===e?ud.toHex32(this.h,"little"):ud.split32(this.h,"little")};var wd=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ed=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Ad=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],kd=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Cd=Nc,Rd=Mc;function Td(e,t,r){if(!(this instanceof Td))return new Td(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Cd.toArray(t,r))}var Sd=Td;Td.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Rd(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},Td.prototype.update=function(e,t){return this.inner.update(e,t),this},Td.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=Sc;t.utils=Nc,t.common=Lc,t.sha=zc,t.ripemd=cd,t.hmac=Sd,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}();var Nd=Sc;function Md(e){return"0x"+Nd.sha256().update(ma(e)).digest("hex")}new la("sha2/5.7.0");var Fd=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function Od(e,t){return Fd(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach(((e,t)=>{i[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{i[e.toLowerCase()]=n.headers.get(e)})),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ma(new Uint8Array(o))}}))}var Id=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const jd=new la("web/5.7.1");function Dd(e){return new Promise((t=>{setTimeout(t,e)}))}function _d(e,t){if(null==e)return null;if("string"==typeof e)return e;if(pa(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Ul(e)}catch(e){}return xa(e)}return e}function Bd(e,t,r){let n=null;if(null!=t){n=Wl(t);const r="string"==typeof e?{url:e}:al(e);if(r.headers){0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=al(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return function(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;jd.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const o="object"==typeof e?e.throttleCallback:null,i="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;jd.assertArgument(i>0&&i%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const s="object"==typeof e&&!!e.errorPassThrough,a={};let l=null;const c={method:"GET"};let u=!1,d=12e4;if("string"==typeof e)l=e;else if("object"==typeof e){if(null!=e&&null!=e.url||jd.throwArgumentError("missing URL","connection.url",e),l=e.url,"number"==typeof e.timeout&&e.timeout>0&&(d=e.timeout),e.headers)for(const t in e.headers)a[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(u=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==l.substring(0,6)&&!0!==e.allowInsecureAuthentication&&jd.throwError("basic authentication requires a secure https url",la.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+Cl(Wl(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=al(e.fetchOptions))}const p=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(p):null;if(h)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?kl(h[3]):(f=h[3],Wl(f.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){jd.throwError("processing response error",la.errors.SERVER_ERROR,{body:_d(h[1],h[2]),error:e,requestBody:null,requestMethod:"GET",url:l})}var f;t&&(c.method="POST",c.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));const m={};Object.keys(a).forEach((e=>{const t=a[e];m[t.key]=t.value})),c.headers=m;const g=function(){let e=null;return{promise:new Promise((function(t,r){d&&(e=setTimeout((()=>{null!=e&&(e=null,r(jd.makeError("timeout",la.errors.TIMEOUT,{requestBody:_d(c.body,m["content-type"]),requestMethod:c.method,timeout:d,url:l})))}),d))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),y=function(){return Id(this,void 0,void 0,(function*(){for(let e=0;e<n;e++){let t=null;try{if(t=yield Od(l,c),e<n)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===c.method&&e.match(/^https:/)){l=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(o&&(r=yield o(e,l)),r){let r=0;const n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):i*parseInt(String(Math.random()*Math.pow(2,e))),yield Dd(r);continue}}}catch(e){t=e.response,null==t&&(g.cancel(),jd.throwError("missing response",la.errors.SERVER_ERROR,{requestBody:_d(c.body,m["content-type"]),requestMethod:c.method,serverError:e,url:l}))}let a=t.body;if(u&&304===t.statusCode?a=null:!s&&(t.statusCode<200||t.statusCode>=300)&&(g.cancel(),jd.throwError("bad response",la.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:_d(a,t.headers?t.headers["content-type"]:null),requestBody:_d(c.body,m["content-type"]),requestMethod:c.method,url:l})),r)try{const e=yield r(a,t);return g.cancel(),e}catch(r){if(r.throttleRetry&&e<n){let t=!0;if(o&&(t=yield o(e,l)),t){const t=i*parseInt(String(Math.random()*Math.pow(2,e)));yield Dd(t);continue}}g.cancel(),jd.throwError("processing response error",la.errors.SERVER_ERROR,{body:_d(a,t.headers?t.headers["content-type"]:null),error:r,requestBody:_d(c.body,m["content-type"]),requestMethod:c.method,url:l})}return g.cancel(),a}return jd.throwError("failed response",la.errors.SERVER_ERROR,{requestBody:_d(c.body,m["content-type"]),requestMethod:c.method,url:l})}))}();return Promise.race([g.promise,y])}(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(Ul(e))}catch(t){jd.throwError("invalid JSON",la.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function Pd(e,t){return t||(t={}),null==(t=al(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let o=null,i=!1;const s=()=>!i&&(i=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout((()=>{s()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let l=0;!function o(){return e().then((function(e){if(void 0!==e)s()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!i){if(l++,l>a)return void(s()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,l)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(o,e)}return null}),(function(e){s()&&n(e)}))}()}))}for(var Wd="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ud={},Ld=0;Ld<Wd.length;Ld++){var Vd=Wd.charAt(Ld);if(void 0!==Ud[Vd])throw new TypeError(Vd+" is ambiguous");Ud[Vd]=Ld}function Zd(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function Hd(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=Zd(t)^n>>5}for(t=Zd(t),r=0;r<e.length;++r){var o=e.charCodeAt(r);t=Zd(t)^31&o}return t}function zd(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)return"Data too short";var a=Hd(i);if("string"==typeof a)return a;for(var l=[],c=0;c<s.length;++c){var u=s.charAt(c),d=Ud[u];if(void 0===d)return"Unknown character "+u;a=Zd(a)^d,c+6>=s.length||l.push(d)}return 1!==a?"Invalid checksum for "+e:{prefix:i,words:l}}function Yd(e,t,r,n){for(var o=0,i=0,s=(1<<r)-1,a=[],l=0;l<e.length;++l)for(o=o<<t|e[l],i+=t;i>=r;)i-=r,a.push(o>>i&s);if(n)i>0&&a.push(o<<r-i&s);else{if(i>=t)return"Excess padding";if(o<<r-i&s)return"Non-zero padding"}return a}var Gd={decodeUnsafe:function(){var e=zd.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=zd.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var n=Hd(e=e.toLowerCase());if("string"==typeof n)throw new Error(n);for(var o=e+"1",i=0;i<t.length;++i){var s=t[i];if(s>>5!=0)throw new Error("Non 5-bit word");n=Zd(n)^s,o+=Wd.charAt(s)}for(i=0;i<6;++i)n=Zd(n);for(n^=1,i=0;i<6;++i){o+=Wd.charAt(n>>5*(5-i)&31)}return o},toWordsUnsafe:function(e){var t=Yd(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=Yd(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=Yd(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=Yd(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}};const Xd="providers/5.7.2";var Jd={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,n,o){for(var i=0,s=0,a=Math.min(e.length,n),l=t;l<a;l++){var c=e.charCodeAt(l)-48;i*=o,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<o,"Invalid character"),i+=s}return i}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,n):(this._parseBase(e,t,o),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=e.length-1,i=0;o>=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<e.length;o+=3)s=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,i=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=t)n++;n--,o=o/t|0;for(var i=e.length-r,s=i%n,a=Math.min(i,i-s)+r,c=0,u=r;u<a;u+=n)c=l(e,u,u+n,t),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var d=1;for(c=l(e,u,e.length,t),u=0;u<s;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){o.prototype.inspect=u}else o.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var o=0|e.words[0],i=0|t.words[0],s=o*i,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var u=l>>>26,d=67108863&l,p=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=p;h++){var f=c-h|0;u+=(s=(o=0|e.words[f])*(i=0|t.words[h])+d)/67108864|0,d=67108863&s}r.words[c]=0|d,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<o|i)).toString(16);i=a>>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==i||s!==this.length-1?d[6-l.length]+l+n:l+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],u=h[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(u).toString(e);n=(f=f.idivn(u)).isZero()?m+n:d[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===i?(r<e.length&&(e[r++]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===i?(r>=0&&(e[r--]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var o=0,i=0;i<n.length;i++)t=(0|r.words[i])+(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<r.length;i++)t=(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)i=(t=(0|r.words[s])-(0|n.words[s])+i)>>26,this.words[s]=67108863&t;for(;0!==i&&s<r.length;s++)i=(t=(0|r.words[s])+i)>>26,this.words[s]=67108863&t;if(0===i&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,o,i,s=e.words,a=t.words,l=r.words,c=0,u=0|s[0],d=8191&u,p=u>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,x=0|s[3],v=8191&x,w=x>>>13,E=0|s[4],A=8191&E,k=E>>>13,C=0|s[5],R=8191&C,T=C>>>13,S=0|s[6],N=8191&S,M=S>>>13,F=0|s[7],O=8191&F,I=F>>>13,j=0|s[8],D=8191&j,_=j>>>13,B=0|s[9],P=8191&B,W=B>>>13,U=0|a[0],L=8191&U,V=U>>>13,Z=0|a[1],H=8191&Z,z=Z>>>13,Y=0|a[2],G=8191&Y,X=Y>>>13,J=0|a[3],q=8191&J,Q=J>>>13,K=0|a[4],$=8191&K,ee=K>>>13,te=0|a[5],re=8191&te,ne=te>>>13,oe=0|a[6],ie=8191&oe,se=oe>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,ue=0|a[8],de=8191&ue,pe=ue>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(d,L))|0)+((8191&(o=(o=Math.imul(d,V))+Math.imul(p,L)|0))<<13)|0;c=((i=Math.imul(p,V))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(f,L),o=(o=Math.imul(f,V))+Math.imul(m,L)|0,i=Math.imul(m,V);var ye=(c+(n=n+Math.imul(d,H)|0)|0)+((8191&(o=(o=o+Math.imul(d,z)|0)+Math.imul(p,H)|0))<<13)|0;c=((i=i+Math.imul(p,z)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,L),o=(o=Math.imul(y,V))+Math.imul(b,L)|0,i=Math.imul(b,V),n=n+Math.imul(f,H)|0,o=(o=o+Math.imul(f,z)|0)+Math.imul(m,H)|0,i=i+Math.imul(m,z)|0;var be=(c+(n=n+Math.imul(d,G)|0)|0)+((8191&(o=(o=o+Math.imul(d,X)|0)+Math.imul(p,G)|0))<<13)|0;c=((i=i+Math.imul(p,X)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(v,L),o=(o=Math.imul(v,V))+Math.imul(w,L)|0,i=Math.imul(w,V),n=n+Math.imul(y,H)|0,o=(o=o+Math.imul(y,z)|0)+Math.imul(b,H)|0,i=i+Math.imul(b,z)|0,n=n+Math.imul(f,G)|0,o=(o=o+Math.imul(f,X)|0)+Math.imul(m,G)|0,i=i+Math.imul(m,X)|0;var xe=(c+(n=n+Math.imul(d,q)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(p,q)|0))<<13)|0;c=((i=i+Math.imul(p,Q)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,L),o=(o=Math.imul(A,V))+Math.imul(k,L)|0,i=Math.imul(k,V),n=n+Math.imul(v,H)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(w,H)|0,i=i+Math.imul(w,z)|0,n=n+Math.imul(y,G)|0,o=(o=o+Math.imul(y,X)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,X)|0,n=n+Math.imul(f,q)|0,o=(o=o+Math.imul(f,Q)|0)+Math.imul(m,q)|0,i=i+Math.imul(m,Q)|0;var ve=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(p,$)|0))<<13)|0;c=((i=i+Math.imul(p,ee)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(R,L),o=(o=Math.imul(R,V))+Math.imul(T,L)|0,i=Math.imul(T,V),n=n+Math.imul(A,H)|0,o=(o=o+Math.imul(A,z)|0)+Math.imul(k,H)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(v,G)|0,o=(o=o+Math.imul(v,X)|0)+Math.imul(w,G)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(y,q)|0,o=(o=o+Math.imul(y,Q)|0)+Math.imul(b,q)|0,i=i+Math.imul(b,Q)|0,n=n+Math.imul(f,$)|0,o=(o=o+Math.imul(f,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(p,re)|0))<<13)|0;c=((i=i+Math.imul(p,ne)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(N,L),o=(o=Math.imul(N,V))+Math.imul(M,L)|0,i=Math.imul(M,V),n=n+Math.imul(R,H)|0,o=(o=o+Math.imul(R,z)|0)+Math.imul(T,H)|0,i=i+Math.imul(T,z)|0,n=n+Math.imul(A,G)|0,o=(o=o+Math.imul(A,X)|0)+Math.imul(k,G)|0,i=i+Math.imul(k,X)|0,n=n+Math.imul(v,q)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(w,q)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0,n=n+Math.imul(f,re)|0,o=(o=o+Math.imul(f,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var Ee=(c+(n=n+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,se)|0)+Math.imul(p,ie)|0))<<13)|0;c=((i=i+Math.imul(p,se)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(O,L),o=(o=Math.imul(O,V))+Math.imul(I,L)|0,i=Math.imul(I,V),n=n+Math.imul(N,H)|0,o=(o=o+Math.imul(N,z)|0)+Math.imul(M,H)|0,i=i+Math.imul(M,z)|0,n=n+Math.imul(R,G)|0,o=(o=o+Math.imul(R,X)|0)+Math.imul(T,G)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(A,q)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(k,q)|0,i=i+Math.imul(k,Q)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,o=(o=o+Math.imul(y,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0,n=n+Math.imul(f,ie)|0,o=(o=o+Math.imul(f,se)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,se)|0;var Ae=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(p,le)|0))<<13)|0;c=((i=i+Math.imul(p,ce)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,L),o=(o=Math.imul(D,V))+Math.imul(_,L)|0,i=Math.imul(_,V),n=n+Math.imul(O,H)|0,o=(o=o+Math.imul(O,z)|0)+Math.imul(I,H)|0,i=i+Math.imul(I,z)|0,n=n+Math.imul(N,G)|0,o=(o=o+Math.imul(N,X)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,X)|0,n=n+Math.imul(R,q)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(T,q)|0,i=i+Math.imul(T,Q)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0,n=n+Math.imul(f,le)|0,o=(o=o+Math.imul(f,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var ke=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;c=((i=i+Math.imul(p,pe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,L),o=(o=Math.imul(P,V))+Math.imul(W,L)|0,i=Math.imul(W,V),n=n+Math.imul(D,H)|0,o=(o=o+Math.imul(D,z)|0)+Math.imul(_,H)|0,i=i+Math.imul(_,z)|0,n=n+Math.imul(O,G)|0,o=(o=o+Math.imul(O,X)|0)+Math.imul(I,G)|0,i=i+Math.imul(I,X)|0,n=n+Math.imul(N,q)|0,o=(o=o+Math.imul(N,Q)|0)+Math.imul(M,q)|0,i=i+Math.imul(M,Q)|0,n=n+Math.imul(R,$)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,se)|0,n=n+Math.imul(y,le)|0,o=(o=o+Math.imul(y,ce)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,ce)|0,n=n+Math.imul(f,de)|0,o=(o=o+Math.imul(f,pe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,pe)|0;var Ce=(c+(n=n+Math.imul(d,fe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(p,fe)|0))<<13)|0;c=((i=i+Math.imul(p,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(P,H),o=(o=Math.imul(P,z))+Math.imul(W,H)|0,i=Math.imul(W,z),n=n+Math.imul(D,G)|0,o=(o=o+Math.imul(D,X)|0)+Math.imul(_,G)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(O,q)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(I,q)|0,i=i+Math.imul(I,Q)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(R,re)|0,o=(o=o+Math.imul(R,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,se)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,se)|0,n=n+Math.imul(v,le)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(y,de)|0,o=(o=o+Math.imul(y,pe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,pe)|0;var Re=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(o=(o=o+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(P,G),o=(o=Math.imul(P,X))+Math.imul(W,G)|0,i=Math.imul(W,X),n=n+Math.imul(D,q)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(_,q)|0,i=i+Math.imul(_,Q)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(R,ie)|0,o=(o=o+Math.imul(R,se)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,se)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(k,le)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(v,de)|0,o=(o=o+Math.imul(v,pe)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,pe)|0;var Te=(c+(n=n+Math.imul(y,fe)|0)|0)+((8191&(o=(o=o+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;c=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(P,q),o=(o=Math.imul(P,Q))+Math.imul(W,q)|0,i=Math.imul(W,Q),n=n+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(N,ie)|0,o=(o=o+Math.imul(N,se)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,se)|0,n=n+Math.imul(R,le)|0,o=(o=o+Math.imul(R,ce)|0)+Math.imul(T,le)|0,i=i+Math.imul(T,ce)|0,n=n+Math.imul(A,de)|0,o=(o=o+Math.imul(A,pe)|0)+Math.imul(k,de)|0,i=i+Math.imul(k,pe)|0;var Se=(c+(n=n+Math.imul(v,fe)|0)|0)+((8191&(o=(o=o+Math.imul(v,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((i=i+Math.imul(w,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,$),o=(o=Math.imul(P,ee))+Math.imul(W,$)|0,i=Math.imul(W,ee),n=n+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(O,ie)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,se)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,ce)|0,n=n+Math.imul(R,de)|0,o=(o=o+Math.imul(R,pe)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,pe)|0;var Ne=(c+(n=n+Math.imul(A,fe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(k,fe)|0))<<13)|0;c=((i=i+Math.imul(k,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(P,re),o=(o=Math.imul(P,ne))+Math.imul(W,re)|0,i=Math.imul(W,ne),n=n+Math.imul(D,ie)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,se)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(N,de)|0,o=(o=o+Math.imul(N,pe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,pe)|0;var Me=(c+(n=n+Math.imul(R,fe)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(T,fe)|0))<<13)|0;c=((i=i+Math.imul(T,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(P,ie),o=(o=Math.imul(P,se))+Math.imul(W,ie)|0,i=Math.imul(W,se),n=n+Math.imul(D,le)|0,o=(o=o+Math.imul(D,ce)|0)+Math.imul(_,le)|0,i=i+Math.imul(_,ce)|0,n=n+Math.imul(O,de)|0,o=(o=o+Math.imul(O,pe)|0)+Math.imul(I,de)|0,i=i+Math.imul(I,pe)|0;var Fe=(c+(n=n+Math.imul(N,fe)|0)|0)+((8191&(o=(o=o+Math.imul(N,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((i=i+Math.imul(M,me)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(P,le),o=(o=Math.imul(P,ce))+Math.imul(W,le)|0,i=Math.imul(W,ce),n=n+Math.imul(D,de)|0,o=(o=o+Math.imul(D,pe)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,pe)|0;var Oe=(c+(n=n+Math.imul(O,fe)|0)|0)+((8191&(o=(o=o+Math.imul(O,me)|0)+Math.imul(I,fe)|0))<<13)|0;c=((i=i+Math.imul(I,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(P,de),o=(o=Math.imul(P,pe))+Math.imul(W,de)|0,i=Math.imul(W,pe);var Ie=(c+(n=n+Math.imul(D,fe)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(_,fe)|0))<<13)|0;c=((i=i+Math.imul(_,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var je=(c+(n=Math.imul(P,fe))|0)+((8191&(o=(o=Math.imul(P,me))+Math.imul(W,fe)|0))<<13)|0;return c=((i=Math.imul(W,me))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,l[0]=ge,l[1]=ye,l[2]=be,l[3]=xe,l[4]=ve,l[5]=we,l[6]=Ee,l[7]=Ae,l[8]=ke,l[9]=Ce,l[10]=Re,l[11]=Te,l[12]=Se,l[13]=Ne,l[14]=Me,l[15]=Fe,l[16]=Oe,l[17]=Ie,l[18]=je,0!==c&&(l[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,i=0;i<r.length-1;i++){var s=o;o=0;for(var a=67108863&n,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var u=i-c,d=(0|e.words[u])*(0|t.words[c]),p=67108863&d;a=67108863&(p=p+a|0),o+=(s=(s=s+(d/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[i]=a,n=s,s=o}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}Math.imul||(m=f),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?f(this,e,t):r<1024?g(this,e,t):y(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,s=(67108863&i)+(67108863&n);n>>=26,n+=i/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,o=r%26;t[r]=e.words[n]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&i,l=(0|this.words[t])-a<<n;this.words[t]=l|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,l=n;if(o-=s,o=Math.max(0,o),l){for(var c=0;c<s;c++)l.words[c]=this.words[c];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=o);c--){var d=0|this.words[c];this.words[c]=u<<26-i|d>>>i,u=d&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<<t;return!(this.length<=n||!(this.words[n]&o))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var o,i,s=e.length+n;this._expand(s);var a=0;for(o=0;o<e.length;o++){i=(0|this.words[o+n])+a;var l=(0|e.words[o])*t;a=((i-=67108863&l)>>26)-(l/67108864|0),this.words[o+n]=67108863&i}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this._strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,a&&(a.words[l]=1));for(var d=l-1;d>=0;d--){var p=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(p=Math.min(p/s|0,67108863),n._ishlnsubmul(i,p,d);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=p)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(d)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(l)):(n.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var d=0,p=1;0==(n.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(n.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var o=t.cmp(r);if(o<0){var i=t;t=r,r=i}else if(0===o||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a}return 0!==i&&(this.words[s]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],o=0|e.words[r];if(n!==o){n<o?t=-1:n>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},n(v,x),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),o=0;o<n;o++)t.words[o]=e.words[o];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&r,o=10;o<e.length;o++){var s=0|e.words[o];e.words[o-10]=(s&r)<<4|i>>>22,i=s}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,x),n(E,x),n(A,x),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,o=67108863&n;n>>>=26,e.words[r]=o,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),p=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var y=this.pow(d,new o(1).iushln(f-g-1));p=p.redMul(y),d=y.redSqr(),h=h.redMul(d),f=g}return p},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var d=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},n(C,k),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Jd,me);var qd=Jd.exports;function Qd(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var Kd=$d;function $d(e,t){if(!e)throw new Error(t||"Assertion failed")}$d.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var ep=Qd((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var o=e.charCodeAt(n),i=o>>8,s=255&o;i?r.push(i,s):r.push(s)}return r},r.zero2=n,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}})),tp=Qd((function(e,t){var r=t;r.assert=Kd,r.toArray=ep.toArray,r.zero2=ep.zero2,r.toHex=ep.toHex,r.encode=ep.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<<t+1,i=e.clone(),s=0;s<n.length;s++){var a,l=i.andln(o-1);i.isOdd()?(a=l>(o>>1)-1?(o>>1)-l:l,i.isubn(a)):a=0,n[s]=a,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var s,a,l=e.andln(3)+o&3,c=t.andln(3)+i&3;3===l&&(l=-1),3===c&&(c=-1),s=0==(1&l)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==c?l:-l,r[0].push(s),a=0==(1&c)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==l?c:-c,r[1].push(a),2*o===s+1&&(o=1-o),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new qd(e,"hex","le")}})),rp=tp.getNAF,np=tp.getJSF,op=tp.assert;function ip(e,t){this.type=e,this.p=new qd(t.p,16),this.red=t.prime?qd.red(t.prime):qd.mont(this.p),this.zero=new qd(0).toRed(this.red),this.one=new qd(1).toRed(this.red),this.two=new qd(2).toRed(this.red),this.n=t.n&&new qd(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var sp=ip;function ap(e,t){this.curve=e,this.type=t,this.precomputed=null}ip.prototype.point=function(){throw new Error("Not implemented")},ip.prototype.validate=function(){throw new Error("Not implemented")},ip.prototype._fixedNafMul=function(e,t){op(e.precomputed);var r=e._getDoubles(),n=rp(t,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var i,s,a=[];for(i=0;i<n.length;i+=r.step){s=0;for(var l=i+r.step-1;l>=i;l--)s=(s<<1)+n[l];a.push(s)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=o;d>0;d--){for(i=0;i<a.length;i++)(s=a[i])===d?u=u.mixedAdd(r.points[i]):s===-d&&(u=u.mixedAdd(r.points[i].neg()));c=c.add(u)}return c.toP()},ip.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var o=n.points,i=rp(t,r,this._bitLength),s=this.jpoint(null,null,null),a=i.length-1;a>=0;a--){for(var l=0;a>=0&&0===i[a];a--)l++;if(a>=0&&l++,s=s.dblp(l),a<0)break;var c=i[a];op(0!==c),s="affine"===e.type?c>0?s.mixedAdd(o[c-1>>1]):s.mixedAdd(o[-c-1>>1].neg()):c>0?s.add(o[c-1>>1]):s.add(o[-c-1>>1].neg())}return"affine"===e.type?s.toP():s},ip.prototype._wnafMulAdd=function(e,t,r,n,o){var i,s,a,l=this._wnafT1,c=this._wnafT2,u=this._wnafT3,d=0;for(i=0;i<n;i++){var p=(a=t[i])._getNAFPoints(e);l[i]=p.wnd,c[i]=p.points}for(i=n-1;i>=1;i-=2){var h=i-1,f=i;if(1===l[h]&&1===l[f]){var m=[t[h],null,null,t[f]];0===t[h].y.cmp(t[f].y)?(m[1]=t[h].add(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg())):0===t[h].y.cmp(t[f].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].add(t[f].neg())):(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=np(r[h],r[f]);for(d=Math.max(y[0].length,d),u[h]=new Array(d),u[f]=new Array(d),s=0;s<d;s++){var b=0|y[0][s],x=0|y[1][s];u[h][s]=g[3*(b+1)+(x+1)],u[f][s]=0,c[h]=m}}else u[h]=rp(r[h],l[h],this._bitLength),u[f]=rp(r[f],l[f],this._bitLength),d=Math.max(u[h].length,d),d=Math.max(u[f].length,d)}var v=this.jpoint(null,null,null),w=this._wnafT4;for(i=d;i>=0;i--){for(var E=0;i>=0;){var A=!0;for(s=0;s<n;s++)w[s]=0|u[s][i],0!==w[s]&&(A=!1);if(!A)break;E++,i--}if(i>=0&&E++,v=v.dblp(E),i<0)break;for(s=0;s<n;s++){var k=w[s];0!==k&&(k>0?a=c[s][k-1>>1]:k<0&&(a=c[s][-k-1>>1].neg()),v="affine"===a.type?v.mixedAdd(a):v.add(a))}}for(i=0;i<n;i++)c[i]=null;return o?v:v.toP()},ip.BasePoint=ap,ap.prototype.eq=function(){throw new Error("Not implemented")},ap.prototype.validate=function(){return this.curve.validate(this)},ip.prototype.decodePoint=function(e,t){e=tp.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?op(e[e.length-1]%2==0):7===e[0]&&op(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},ap.prototype.encodeCompressed=function(e){return this.encode(e,!0)},ap.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},ap.prototype.encode=function(e,t){return tp.encode(this._encode(t),e)},ap.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},ap.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},ap.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)n=n.dbl();r.push(n)}return{step:e,points:r}},ap.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(n);return{wnd:e,points:t}},ap.prototype._getBeta=function(){return null},ap.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var lp=Qd((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),cp=tp.assert;function up(e){sp.call(this,"short",e),this.a=new qd(e.a,16).toRed(this.red),this.b=new qd(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}lp(up,sp);var dp=up;function pp(e,t,r,n){sp.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new qd(t,16),this.y=new qd(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function hp(e,t,r,n){sp.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new qd(0)):(this.x=new qd(t,16),this.y=new qd(r,16),this.z=new qd(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}up.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new qd(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new qd(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],cp(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new qd(e.a,16),b:new qd(e.b,16)}})):this._getEndoBasis(r)}}},up.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:qd.mont(e),r=new qd(2).toRed(t).redInvm(),n=r.redNeg(),o=new qd(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},up.prototype._getEndoBasis=function(e){for(var t,r,n,o,i,s,a,l,c,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,p=this.n.clone(),h=new qd(1),f=new qd(0),m=new qd(0),g=new qd(1),y=0;0!==d.cmpn(0);){var b=p.div(d);l=p.sub(b.mul(d)),c=m.sub(b.mul(h));var x=g.sub(b.mul(f));if(!n&&l.cmp(u)<0)t=a.neg(),r=h,n=l.neg(),o=c;else if(n&&2==++y)break;a=l,p=d,d=l,m=h,h=c,g=f,f=x}i=l.neg(),s=c;var v=n.sqr().add(o.sqr());return i.sqr().add(s.sqr()).cmp(v)>=0&&(i=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:n,b:o},{a:i,b:s}]},up.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),s=o.mul(r.a),a=i.mul(n.a),l=o.mul(r.b),c=i.mul(n.b);return{k1:e.sub(s).sub(a),k2:l.add(c).neg()}},up.prototype.pointFromX=function(e,t){(e=new qd(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},up.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},up.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var s=this._endoSplit(t[i]),a=e[i],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),n[2*i]=a,n[2*i+1]=l,o[2*i]=s.k1,o[2*i+1]=s.k2}for(var c=this._wnafMulAdd(1,n,o,2*i,r),u=0;u<2*i;u++)n[u]=null,o[u]=null;return c},lp(pp,sp.BasePoint),up.prototype.point=function(e,t,r){return new pp(this,e,t,r)},up.prototype.pointFromJSON=function(e,t){return pp.fromJSON(this,e,t)},pp.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},pp.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},pp.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function o(t){return e.point(t[0],t[1],r)}var i=t[2];return n.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[n].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[n].concat(i.naf.points.map(o))}},n},pp.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},pp.prototype.isInfinity=function(){return this.inf},pp.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},pp.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)},pp.prototype.getX=function(){return this.x.fromRed()},pp.prototype.getY=function(){return this.y.fromRed()},pp.prototype.mul=function(e){return e=new qd(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},pp.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},pp.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},pp.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},pp.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},pp.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},lp(hp,sp.BasePoint),up.prototype.jpoint=function(e,t,r){return new hp(this,e,t,r)},hp.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},hp.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},hp.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),o=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(o),l=i.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),d=n.redMul(c),p=l.redSqr().redIAdd(u).redISub(d).redISub(d),h=l.redMul(d.redISub(p)).redISub(i.redMul(u)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(p,h,f)},hp.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=o.redSub(i);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),u=r.redMul(l),d=a.redSqr().redIAdd(c).redISub(u).redISub(u),p=a.redMul(u.redISub(d)).redISub(o.redMul(c)),h=this.z.redMul(s);return this.curve.jpoint(d,p,h)},hp.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,o=this.curve.tinv,i=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var u=i.redSqr(),d=c.redSqr(),p=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(l)),f=i.redMul(d),m=h.redSqr().redISub(f.redAdd(f)),g=f.redISub(m),y=h.redMul(g);y=y.redIAdd(y).redISub(p);var b=c.redMul(a);t+1<e&&(l=l.redMul(p)),i=m,a=b,c=y}return this.curve.jpoint(i,c.redMul(o),a)},hp.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},hp.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),l=a.redSqr().redISub(s).redISub(s),c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=a.redMul(s.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),p=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(p);h=h.redIAdd(h);var f=u.redAdd(u).redIAdd(u),m=f.redSqr(),g=p.redIAdd(p);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=f.redMul(h.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},hp.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),p=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var f=p.redIAdd(p),m=(f=f.redIAdd(f)).redAdd(f);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(f.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},hp.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,o=n.redSqr().redSqr(),i=t.redSqr(),s=r.redSqr(),a=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(o)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(s),u=a.redSqr().redISub(c.redAdd(c)),d=c.redISub(u),p=s.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=a.redMul(d).redISub(p),f=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,f)},hp.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),o=e.redAdd(e).redIAdd(e),i=o.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(i)).redSqr(),l=n.redIAdd(n);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=o.redIAdd(s).redSqr().redISub(i).redISub(a).redISub(l),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(a).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var p=this.y.redMul(c.redMul(l.redISub(c)).redISub(s.redMul(a)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(d,p,h)},hp.prototype.mul=function(e,t){return e=new qd(e,t),this.curve._wnafMul(this,e)},hp.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),o=r.redMul(e.z);return 0===this.y.redMul(o).redISub(e.y.redMul(n)).cmpn(0)},hp.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),o=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},hp.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},hp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var fp=Qd((function(e,t){var r=t;r.base=sp,r.short=dp,r.mont=null,r.edwards=null})),mp=Qd((function(e,t){var r,n=t,o=tp.assert;function i(e){"short"===e.type?this.curve=new fp.short(e):"edwards"===e.type?this.curve=new fp.edwards(e):this.curve=new fp.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Nd.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Nd.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Nd.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Nd.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Nd.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Nd.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Nd.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Nd.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function gp(e){if(!(this instanceof gp))return new gp(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ep.toArray(e.entropy,e.entropyEnc||"hex"),r=ep.toArray(e.nonce,e.nonceEnc||"hex"),n=ep.toArray(e.pers,e.persEnc||"hex");Kd(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var yp=gp;gp.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},gp.prototype._hmac=function(){return new Nd.hmac(this.hash,this.K)},gp.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},gp.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=ep.toArray(e,t),r=ep.toArray(r,n),Kd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},gp.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=ep.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,e);return this._update(r),this._reseed++,ep.encode(i,t)};var bp=tp.assert;function xp(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var vp=xp;xp.fromPublic=function(e,t,r){return t instanceof xp?t:new xp(e,{pub:t,pubEnc:r})},xp.fromPrivate=function(e,t,r){return t instanceof xp?t:new xp(e,{priv:t,privEnc:r})},xp.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},xp.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},xp.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},xp.prototype._importPrivate=function(e,t){this.priv=new qd(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},xp.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?bp(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||bp(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},xp.prototype.derive=function(e){return e.validate()||bp(e.validate(),"public point not validated"),e.mul(this.priv).getX()},xp.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},xp.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},xp.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var wp=tp.assert;function Ep(e,t){if(e instanceof Ep)return e;this._importDER(e,t)||(wp(e.r&&e.s,"Signature without r or s"),this.r=new qd(e.r,16),this.s=new qd(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Ap=Ep;function kp(){this.place=0}function Cp(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,s=t.place;i<n;i++,s++)o<<=8,o|=e[s],o>>>=0;return!(o<=127)&&(t.place=s,o)}function Rp(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function Tp(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Ep.prototype._importDER=function(e,t){e=tp.toArray(e,t);var r=new kp;if(48!==e[r.place++])return!1;var n=Cp(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=Cp(e,r);if(!1===o)return!1;var i=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=Cp(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var a=e.slice(r.place,s+r.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new qd(i),this.s=new qd(a),this.recoveryParam=null,!0},Ep.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Rp(t),r=Rp(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Tp(n,t.length),(n=n.concat(t)).push(2),Tp(n,r.length);var o=n.concat(r),i=[48];return Tp(i,o.length),i=i.concat(o),tp.encode(i,e)};var Sp=function(){throw new Error("unsupported")},Np=tp.assert;function Mp(e){if(!(this instanceof Mp))return new Mp(e);"string"==typeof e&&(Np(Object.prototype.hasOwnProperty.call(mp,e),"Unknown curve "+e),e=mp[e]),e instanceof mp.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Fp=Mp;Mp.prototype.keyPair=function(e){return new vp(this,e)},Mp.prototype.keyFromPrivate=function(e,t){return vp.fromPrivate(this,e,t)},Mp.prototype.keyFromPublic=function(e,t){return vp.fromPublic(this,e,t)},Mp.prototype.genKeyPair=function(e){e||(e={});for(var t=new yp({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Sp(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new qd(2));;){var o=new qd(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},Mp.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Mp.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new qd(e,16));for(var o=this.n.byteLength(),i=t.getPrivate().toArray("be",o),s=e.toArray("be",o),a=new yp({hash:this.hash,entropy:i,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new qd(1)),c=0;;c++){var u=n.k?n.k(c):new qd(a.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(l)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var p=d.getX(),h=p.umod(this.n);if(0!==h.cmpn(0)){var f=u.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(f=f.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==p.cmp(h)?2:0);return n.canonical&&f.cmp(this.nh)>0&&(f=this.n.sub(f),m^=1),new Ap({r:h,s:f,recoveryParam:m})}}}}}},Mp.prototype.verify=function(e,t,r,n){e=this._truncateToN(new qd(e,16)),r=this.keyFromPublic(r,n);var o=(t=new Ap(t,"hex")).r,i=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var s,a=i.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},Mp.prototype.recoverPubKey=function(e,t,r,n){Np((3&r)===r,"The recovery param is more than two bits"),t=new Ap(t,n);var o=this.n,i=new qd(e),s=t.r,a=t.s,l=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var u=t.r.invm(o),d=o.sub(i).mul(u).umod(o),p=a.mul(u).umod(o);return this.g.mulAdd(d,s,p)},Mp.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Ap(t,n)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var Op=Qd((function(e,t){var r=t;r.version="6.5.4",r.utils=tp,r.rand=function(){throw new Error("unsupported")},r.curve=fp,r.curves=mp,r.ec=Fp,r.eddsa=null})).ec;const Ip=new la("signing-key/5.7.0");let jp=null;function Dp(){return jp||(jp=new Op("secp256k1")),jp}class _p{constructor(e){ol(this,"curve","secp256k1"),ol(this,"privateKey",xa(e)),32!==va(this.privateKey)&&Ip.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Dp().keyFromPrivate(ma(this.privateKey));ol(this,"publicKey","0x"+t.getPublic(!1,"hex")),ol(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),ol(this,"_isSigningKey",!0)}_addPoint(e){const t=Dp().keyFromPublic(ma(this.publicKey)),r=Dp().keyFromPublic(ma(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=Dp().keyFromPrivate(ma(this.privateKey)),r=ma(e);32!==r.length&&Ip.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return Ca({recoveryParam:n.recoveryParam,r:ka("0x"+n.r.toString(16),32),s:ka("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=Dp().keyFromPrivate(ma(this.privateKey)),r=Dp().keyFromPublic(ma(Bp(e)));return ka("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Bp(e,t){const r=ma(e);if(32===r.length){const e=new _p(r);return t?"0x"+Dp().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?xa(r):"0x"+Dp().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Dp().keyFromPublic(r).getPublic(!0,"hex"):xa(r):Ip.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Pp=new la("transactions/5.7.0");var Wp;function Up(e){return"0x"===e?null:La(e)}function Lp(e){return"0x"===e?Ml:le.from(e)}function Vp(e,t){return function(e){return La(wa(Sa(wa(Bp(e),1)),12))}(function(e,t){const r=Ca(t),n={r:ma(r.r),s:ma(r.s)};return"0x"+Dp().recoverPubKey(ma(e),n,r.recoveryParam).encode("hex",!1)}(ma(e),t))}function Zp(e,t){const r=ya(le.from(e).toHexString());return r.length>32&&Pp.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function Hp(e,t){return{address:La(e),storageKeys:(t||[]).map(((t,r)=>(32!==va(t)&&Pp.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function zp(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&Pp.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),Hp(e[0],e[1])):Hp(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return Hp(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function Yp(e){return zp(e).map((e=>[e.address,e.storageKeys]))}function Gp(e,t){if(null!=e.gasPrice){const t=le.from(e.gasPrice),r=le.from(e.maxFeePerGas||0);t.eq(r)||Pp.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[Zp(e.chainId||0,"chainId"),Zp(e.nonce||0,"nonce"),Zp(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Zp(e.maxFeePerGas||0,"maxFeePerGas"),Zp(e.gasLimit||0,"gasLimit"),null!=e.to?La(e.to):"0x",Zp(e.value||0,"value"),e.data||"0x",Yp(e.accessList||[])];if(t){const e=Ca(t);r.push(Zp(e.recoveryParam,"recoveryParam")),r.push(ya(e.r)),r.push(ya(e.s))}return Ea(["0x02",Ia(r)])}function Xp(e,t){const r=[Zp(e.chainId||0,"chainId"),Zp(e.nonce||0,"nonce"),Zp(e.gasPrice||0,"gasPrice"),Zp(e.gasLimit||0,"gasLimit"),null!=e.to?La(e.to):"0x",Zp(e.value||0,"value"),e.data||"0x",Yp(e.accessList||[])];if(t){const e=Ca(t);r.push(Zp(e.recoveryParam,"recoveryParam")),r.push(ya(e.r)),r.push(ya(e.s))}return Ea(["0x01",Ia(r)])}function Jp(e,t,r){try{const r=Lp(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){Pp.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=ka(t[1],32),e.s=ka(t[2],32);try{const t=Sa(r(e));e.from=Vp(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function qp(e){const t=ma(e);if(t[0]>127)return function(e){const t=_a(e);9!==t.length&&6!==t.length&&Pp.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:Lp(t[0]).toNumber(),gasPrice:Lp(t[1]),gasLimit:Lp(t[2]),to:Up(t[3]),value:Lp(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=le.from(t[6]).toNumber()}catch(e){return r}if(r.r=ka(t[7],32),r.s=ka(t[8],32),le.from(r.r).isZero()&&le.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push(xa(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const i=Sa(Ia(o));try{r.from=Vp(i,{r:xa(r.r),s:xa(r.s),recoveryParam:n})}catch(e){}r.hash=Sa(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=_a(e.slice(1));8!==t.length&&11!==t.length&&Pp.throwArgumentError("invalid component count for transaction type: 1","payload",xa(e));const r={type:1,chainId:Lp(t[0]).toNumber(),nonce:Lp(t[1]).toNumber(),gasPrice:Lp(t[2]),gasLimit:Lp(t[3]),to:Up(t[4]),value:Lp(t[5]),data:t[6],accessList:zp(t[7])};return 8===t.length||(r.hash=Sa(e),Jp(r,t.slice(8),Xp)),r}(t);case 2:return function(e){const t=_a(e.slice(1));9!==t.length&&12!==t.length&&Pp.throwArgumentError("invalid component count for transaction type: 2","payload",xa(e));const r=Lp(t[2]),n=Lp(t[3]),o={type:2,chainId:Lp(t[0]).toNumber(),nonce:Lp(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Lp(t[4]),to:Up(t[5]),value:Lp(t[6]),data:t[7],accessList:zp(t[8])};return 9===t.length||(o.hash=Sa(e),Jp(o,t.slice(9),Gp)),o}(t)}return Pp.throwError(`unsupported transaction type: ${t[0]}`,la.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(Wp||(Wp={}));const Qp=new la(Xd);class Kp{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),o=this.data.bind(this),i=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),l=this.type.bind(this);return e.transaction={hash:i,type:l,accessList:Kp.allowNull(this.accessList.bind(this),null),blockHash:Kp.allowNull(i,null),blockNumber:Kp.allowNull(a,null),transactionIndex:Kp.allowNull(a,null),confirmations:Kp.allowNull(a,null),from:t,gasPrice:Kp.allowNull(r),maxPriorityFeePerGas:Kp.allowNull(r),maxFeePerGas:Kp.allowNull(r),gasLimit:r,to:Kp.allowNull(t,null),value:r,nonce:a,data:o,r:Kp.allowNull(this.uint256),s:Kp.allowNull(this.uint256),v:Kp.allowNull(a),creates:Kp.allowNull(t,null),raw:Kp.allowNull(o)},e.transactionRequest={from:Kp.allowNull(t),nonce:Kp.allowNull(a),gasLimit:Kp.allowNull(r),gasPrice:Kp.allowNull(r),maxPriorityFeePerGas:Kp.allowNull(r),maxFeePerGas:Kp.allowNull(r),to:Kp.allowNull(t),value:Kp.allowNull(r),data:Kp.allowNull((e=>this.data(e,!0))),type:Kp.allowNull(a),accessList:Kp.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:i,address:t,topics:Kp.arrayOf(i),data:o,logIndex:a,blockHash:i},e.receipt={to:Kp.allowNull(this.address,null),from:Kp.allowNull(this.address,null),contractAddress:Kp.allowNull(t,null),transactionIndex:a,root:Kp.allowNull(s),gasUsed:r,logsBloom:Kp.allowNull(o),blockHash:i,transactionHash:i,logs:Kp.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:Kp.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:Kp.allowNull(r),status:Kp.allowNull(a),type:l},e.block={hash:Kp.allowNull(i),parentHash:i,number:a,timestamp:a,nonce:Kp.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:Kp.allowNull(t),extraData:o,transactions:Kp.allowNull(Kp.arrayOf(i)),baseFeePerGas:Kp.allowNull(r)},e.blockWithTransactions=al(e.block),e.blockWithTransactions.transactions=Kp.allowNull(Kp.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Kp.allowNull(n,void 0),toBlock:Kp.allowNull(n,void 0),blockHash:Kp.allowNull(i,void 0),address:Kp.allowNull(t,void 0),topics:Kp.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Kp.allowNull(a),blockHash:Kp.allowNull(i),transactionIndex:a,removed:Kp.allowNull(this.boolean.bind(this)),address:t,data:Kp.allowFalsish(o,"0x"),topics:Kp.arrayOf(i),transactionHash:i,logIndex:a},e}accessList(e){return zp(e||[])}number(e){return"0x"===e?0:le.from(e).toNumber()}type(e){return"0x"===e||null==e?0:le.from(e).toNumber()}bigNumber(e){return le.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),ba(e))?e.toLowerCase():Qp.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return La(e)}callAddress(e){if(!ba(e,32))return null;const t=La(wa(e,12));return t===Sl?null:t}contractAddress(e){return function(e){let t=null;try{t=La(e.from)}catch(t){Ba.throwArgumentError("missing from address","transaction",e)}return La(wa(Sa(Ia([t,ya(ma(le.from(e.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||ba(e))return Aa(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==va(r)?Qp.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=le.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!ba(e))throw new Error("invalid uint256");return ka(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=Kp.check(t,e);return n._difficulty=null==r?null:le.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Kp.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&le.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=Kp.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;ba(r)&&(r=le.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),ba(r)&&(r=le.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return qp(e)}receiptLog(e){return Kp.check(this.formats.receiptLog,e)}receipt(e){const t=Kp.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=le.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&Qp.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):Qp.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&Qp.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return Kp.check(this.formats.filter,e)}filterLog(e){return Kp.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const o=e[n](t[n]);void 0!==o&&(r[n]=o)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}var $p=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const eh=new la(Xd);function th(e){return null==e?"null":(32!==va(e)&&eh.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function rh(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[th(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return th(e)})).join("&")}function nh(e){if("string"==typeof e){if(32===va(e=e.toLowerCase()))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+rh(e);if(ml.isForkEvent(e))throw eh.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+rh(e.topics||[])}throw new Error("invalid event - "+e)}function oh(){return(new Date).getTime()}function ih(e){return new Promise((t=>{setTimeout(t,e)}))}const sh=["block","network","pending","poll"];class ah{constructor(e,t,r){ol(this,"tag",e),ol(this,"listener",t),ol(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const o={};return r.length>0&&(o.topics=r),t&&"*"!==t&&(o.address=t),o}pollable(){return this.tag.indexOf(":")>=0||sh.indexOf(this.tag)>=0}}const lh={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ch(e){return ka(le.from(e).toHexString(),32)}function uh(e){return Tl.encode(ga([e,wa(Md(Md(e)),0,4)]))}const dh=new RegExp("^(ipfs)://(.*)$","i"),ph=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),dh,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function hh(e,t){try{return Ul(fh(e,t))}catch(e){}return null}function fh(e,t){if("0x"===e)return null;const r=le.from(wa(e,t,t+32)).toNumber(),n=le.from(wa(e,r,r+32)).toNumber();return wa(e,r+32,r+32+n)}function mh(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):eh.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function gh(e){const t=ma(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function yh(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function bh(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const o=ma(e[n]);t[n]=gh(r),t.push(gh(o.length)),t.push(yh(o)),r+=32+32*Math.ceil(o.length/32)}return Ea(t)}class xh{constructor(e,t,r,n){ol(this,"provider",e),ol(this,"name",r),ol(this,"address",e.formatter.address(t)),ol(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>le.from(e).eq(1))).catch((e=>{if(e.code===la.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return $p(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:Ea([e,dc(this.name),t||"0x"])};let n=!1;var o;(yield this.supportsWildcard())&&(n=!0,r.data=Ea(["0x9061b923",bh([(o=this.name,xa(ga(uc(o).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"),r.data])]));try{let e=yield this.provider.call(r);return ma(e).length%32==4&&eh.throwError("resolver threw error",la.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=fh(e,0)),e}catch(e){if(e.code===la.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return $p(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?fh(r,0):null}))}_getAddress(e,t){const r=lh[String(e)];if(null==r&&eh.throwError(`unsupported coin type: ${e}`,la.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=ma(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return uh(ga([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return uh(ga([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=Gd.toWords(n.slice(2));return e.unshift(t),Gd.encode(r.prefix,e)}}return null}getAddress(e){return $p(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||"0x0000000000000000000000000000000000000000000000000000000000000000"===e?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===la.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",ch(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&eh.throwError("invalid or unsupported coin data",la.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return $p(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<ph.length;r++){const n=t.match(ph[r]);if(null==n)continue;const o=n[1].toLowerCase();switch(o){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:mh(t)};case"erc721":case"erc1155":{const r="erc721"===o?"0xc87b56dd":"0x0e89341c";e.push({type:o,content:t});const i=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),l=ka(le.from(s[1]).toHexString(),32);if("erc721"===o){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:Ea(["0x6352211e",l])}));if(i!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===o){const t=le.from(yield this.provider.call({to:a,data:Ea(["0x00fdd58e",ka(i,32),l])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const c={to:this.provider.formatter.address(s[0]),data:Ea([r,l])};let u=hh(yield this.provider.call(c),0);if(null==u)return null;e.push({type:"metadata-url-base",content:u}),"erc1155"===o&&(u=u.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:u})),u.match(/^ipfs:/i)&&(u=mh(u)),e.push({type:"metadata-url",content:u});const d=yield Bd(u);if(!d)return null;e.push({type:"metadata",content:JSON.stringify(d)});let p=d.image;if("string"!=typeof p)return null;if(p.match(/^(https:\/\/|data:)/i));else{if(null==p.match(dh))return null;e.push({type:"url-ipfs",content:p}),p=mh(p)}return e.push({type:"url",content:p}),{linkage:e,url:p}}}}}catch(e){}return null}))}getContentHash(){return $p(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+Tl.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+Tl.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const o=e.match(/^0x90b2c605([0-9a-f]*)$/);if(o&&68===o[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+Cl("0x"+o[1]).replace(/[=+\/]/g,(t=>e[t]))}return eh.throwError("invalid or unsupported content hash data",la.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return $p(this,void 0,void 0,(function*(){let t=Wl(e);t=ga([ch(64),ch(t.length),t]),t.length%32!=0&&(t=ga([t,ka("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",xa(t));return null==r||"0x"===r?null:Ul(r)}))}}let vh=null,wh=1;class Eh extends gl{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ol(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=il(new.target,"getNetwork")(e);t?(ol(this,"_network",t),this.emit("network",t,null)):eh.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return $p(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||eh.throwError("no network detected",la.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:ol(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return Pd((()=>this._ready().then((e=>e),(e=>{if(e.code!==la.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==vh&&(vh=new Kp),vh}static getNetwork(e){return function(e){if(null==e)return null;if("number"==typeof e){for(const t in Al){const r=Al[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=Al[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=Al[e.name];if(!t)return"number"!=typeof e.chainId&&yl.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&yl.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}(null==e?"homestead":e)}ccipReadFetch(e,t,r){return $p(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),o=t.toLowerCase(),i=[];for(let e=0;e<r.length;e++){const t=r[e],s=t.replace("{sender}",n).replace("{data}",o),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:o,sender:n}),l=yield Bd({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(l.data)return l.data;const c=l.message||"unknown error";if(l.status>=400&&l.status<500)return eh.throwError(`response not found during CCIP fetch: ${c}`,la.errors.SERVER_ERROR,{url:t,errorMessage:c});i.push(c)}return eh.throwError(`error encountered during CCIP fetch: ${i.map((e=>JSON.stringify(e))).join(", ")}`,la.errors.SERVER_ERROR,{urls:r,errorMessages:i})}))}_getInternalBlockNumber(e){return $p(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(oh()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=oh(),r=sl({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=oh();return(e=le.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:o}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return $p(this,void 0,void 0,(function*(){const e=wh++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)eh.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",eh.makeError("network block skew detected",la.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const o=n.toBlock-this._maxFilterBlockRange;o>n.fromBlock&&(n.fromBlock=o),n.fromBlock<0&&(n.fromBlock=0);const i=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(i)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return $p(this,void 0,void 0,(function*(){return eh.throwError("provider does not support network detection",la.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return $p(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield ih(0),this._network;const r=eh.makeError("underlying network changed",la.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=oh();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=oh(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return $p(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return $p(this,void 0,void 0,(function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise(((o,i)=>{const s=[];let a=!1;const l=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},c=e=>{e.confirmations<t||l()||o(e)};if(this.on(e,c),s.push((()=>{this.removeListener(e,c)})),n){let r=n.startBlock,o=null;const c=s=>$p(this,void 0,void 0,(function*(){a||(yield ih(1e3),this.getTransactionCount(n.from).then((u=>$p(this,void 0,void 0,(function*(){if(!a){if(u<=n.nonce)r=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==o&&(o=r-3,o<n.startBlock&&(o=n.startBlock));o<=s;){if(a)return;const r=yield this.getBlockWithTransactions(o);for(let o=0;o<r.transactions.length;o++){const s=r.transactions[o];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,t);if(l())return;let o="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?o="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(o="cancelled"),void i(eh.makeError("transaction was replaced",la.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===o||"cancelled"===o,reason:o,replacement:this._wrapTransaction(s),hash:e,receipt:r}))}}o++}}a||this.once("block",c)}}))),(e=>{a||this.once("block",c)})))}));if(a)return;this.once("block",c),s.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{l()||i(eh.makeError("timeout exceeded",la.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return $p(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return le.from(e)}catch(t){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield sl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return le.from(n)}catch(e){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield sl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return le.from(n).toNumber()}catch(e){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield sl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return xa(n)}catch(e){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield sl({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>Aa(e)))}),o=yield this.perform("getStorageAt",n);try{return xa(o)}catch(e){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:o,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==va(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&eh.throwError("Transaction hash mismatch from Provider.sendTransaction.",la.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>$p(this,void 0,void 0,(function*(){let o;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const i=yield this._waitForTransaction(e.hash,t,n,o);return null==i&&0===t?null:(this._emitted["t:"+e.hash]=i.blockNumber,0===i.status&&eh.throwError("transaction failed",la.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:i}),i)})),n}sendTransaction(e){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>xa(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return $p(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?le.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?xa(e):null)))})),this.formatter.transactionRequest(yield sl(r))}))}_getFilter(e){return $p(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield sl(t))}))}_call(e,t,r){return $p(this,void 0,void 0,(function*(){r>=10&&eh.throwError("CCIP read exceeded maximum redirections",la.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===o.substring(0,10)&&va(o)%32==4)try{const i=wa(o,4),s=wa(i,0,32);le.from(s).eq(n)||eh.throwError("CCIP Read sender did not match",la.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const a=[],l=le.from(wa(i,32,64)).toNumber(),c=le.from(wa(i,l,l+32)).toNumber(),u=wa(i,l+32);for(let t=0;t<c;t++){const r=hh(u,32*t);null==r&&eh.throwError("CCIP Read contained corrupt URL string",la.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),a.push(r)}const d=fh(i,64);le.from(wa(i,100,128)).isZero()||eh.throwError("CCIP Read callback selector included junk",la.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const p=wa(i,96,100),h=fh(i,128),f=yield this.ccipReadFetch(e,d,a);null==f&&eh.throwError("CCIP Read disabled or provided no URLs",la.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const m={to:n,data:Ea([p,bh([f,h])])};return this._call(m,t,r+1)}catch(e){if(e.code===la.errors.SERVER_ERROR)throw e}try{return xa(o)}catch(r){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:o,error:r})}}))}call(e,t){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield sl({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield sl({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return le.from(r)}catch(e){return eh.throwError("bad result from backend",la.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}}))}_getAddress(e){return $p(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&eh.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&eh.throwError("ENS name not configured",la.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return $p(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if(ba(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),ba(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){eh.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return Pd((()=>$p(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){const n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return $p(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Pd((()=>$p(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return $p(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Pd((()=>$p(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return $p(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield sl({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),Kp.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return $p(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return $p(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&eh.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return $p(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new xh(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return $p(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||eh.throwError("network does not support ENS",la.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+dc(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return $p(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if(ba(e))throw t}"string"!=typeof e&&eh.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return $p(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=hh(yield this.call({to:r,data:"0x691f3431"+dc(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return $p(this,void 0,void 0,(function*(){let t=null;if(ba(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new xh(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==la.errors.CALL_EXCEPTION)throw e}try{const e=hh(yield this.call({to:n,data:"0x691f3431"+dc(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==la.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return eh.throwError(e+" not implemented",la.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new ah(nh(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],o=nh(e);return this._events=this._events.filter((e=>e.tag!==o||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=nh(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=nh(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,o=nh(e);return this._events=this._events.filter((e=>e.tag!==o||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=nh(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var Ah=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const kh=new la("abstract-signer/5.7.0"),Ch=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Rh=[la.errors.INSUFFICIENT_FUNDS,la.errors.NONCE_EXPIRED,la.errors.REPLACEMENT_UNDERPRICED];class Th{constructor(){kh.checkAbstract(new.target,Th),ol(this,"_isSigner",!0)}getBalance(e){return Ah(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return Ah(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return Ah(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield sl(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return Ah(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield sl(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return Ah(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return Ah(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return Ah(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return Ah(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return Ah(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===Ch.indexOf(t)&&kh.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=al(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&kh.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return Ah(this,void 0,void 0,(function*(){const t=yield sl(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>Ah(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&kh.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||kh.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):kh.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&kh.throwError("network does not support EIP-1559",la.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):kh.throwError("failed to get consistent fee data",la.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(Rh.indexOf(e.code)>=0)throw e;return kh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",la.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&kh.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield sl(t)}))}_checkProvider(e){this.provider||kh.throwError("missing provider",la.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var Sh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Nh=new la(Xd),Mh=["call","estimateGas"];function Fh(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=ba(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=Fh(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return Fh(JSON.parse(e),t)}catch(e){}return null}function Oh(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=Fh(t,!0);if(e)return e.data;Nh.throwError("missing revert data in call exception; Transaction reverted without a reason string",la.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=Fh(t.body,!1);null==r&&(r=Fh(t,!1)),r&&Nh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",la.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let o=t.message;throw t.code===la.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?o=t.error.message:"string"==typeof t.body?o=t.body:"string"==typeof t.responseText&&(o=t.responseText),o=(o||"").toLowerCase(),o.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Nh.throwError("insufficient funds for intrinsic transaction cost",la.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),o.match(/nonce (is )?too low/i)&&Nh.throwError("nonce has already been used",la.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),o.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Nh.throwError("replacement fee too low",la.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),o.match(/only replay-protected/i)&&Nh.throwError("legacy pre-eip-155 transactions not supported",la.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Mh.indexOf(e)>=0&&o.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Nh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",la.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function Ih(e){return new Promise((function(t){setTimeout(t,e)}))}function jh(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function Dh(e){return e?e.toLowerCase():e}const _h={};class Bh extends Th{constructor(e,t,r){if(super(),e!==_h)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ol(this,"provider",t),null==r&&(r=0),"string"==typeof r?(ol(this,"_address",this.provider.formatter.address(r)),ol(this,"_index",null)):"number"==typeof r?(ol(this,"_index",r),ol(this,"_address",null)):Nh.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return Nh.throwError("cannot alter JSON-RPC Signer connection",la.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ph(_h,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&Nh.throwError("unknown account #"+this._index,la.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=al(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=al(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>Sh(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&Nh.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),sl({tx:sl(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&Nh.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&Nh.throwError("user rejected transaction",la.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),Oh("sendTransaction",e,n))))}))}signTransaction(e){return Nh.throwError("signing transactions is unsupported",la.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Sh(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Pd((()=>Sh(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return Sh(this,void 0,void 0,(function*(){const t="string"==typeof e?Wl(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[xa(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&Nh.throwError("user rejected signing",la.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return Sh(this,void 0,void 0,(function*(){const t="string"==typeof e?Wl(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),xa(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&Nh.throwError("user rejected signing",la.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return Sh(this,void 0,void 0,(function*(){const n=yield Tc.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Tc.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&Nh.throwError("user rejected signing",la.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return Sh(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class Ph extends Bh{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const Wh={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Uh extends Eh{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=il(this.constructor,"defaultUrl")()),ol(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(al(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Sh(this,void 0,void 0,(function*(){yield Ih(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=il(this.constructor,"getNetwork");try{return t(le.from(e).toNumber())}catch(t){return Nh.throwError("could not detect network",la.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return Nh.throwError("could not detect network",la.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new Bh(_h,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:dl(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const o=Bd(this.connection,JSON.stringify(r),jh).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=o,setTimeout((()=>{this._cache[e]=null}),0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Dh(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Dh(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Dh(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Dh(t.address),ka(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[il(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[il(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=Dh(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Sh(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&le.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=al(t)).transaction=al(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&Nh.throwError(e+" not implemented",la.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return Oh(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return Ih(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=al(Wh);if(t)for(const e in t)t[e]&&(r[e]=!0);var n,o;o=r,(n=e)&&"object"==typeof n||nl.throwArgumentError("invalid object","object",n),Object.keys(n).forEach((e=>{o[e]||nl.throwArgumentError("invalid object key - "+e,"transaction:"+e,n)}));const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=Aa(le.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=xa(e[t]))})),e.accessList&&(i.accessList=zp(e.accessList)),i}}function Lh(e){return Number.parseInt(e,16)}new la(Xd);class Vh extends oe{constructor(e,t){super(e),this.customProvider=t,t.on("connect",(({chainId:e})=>{this.actions.update({chainId:Lh(e)})})).on("disconnect",(e=>{var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.actions.resetState()})).on("chainChanged",(e=>{this.actions.update({chainId:Lh(e)})})).on("accountsChanged",(e=>{this.actions.update({accounts:e})}))}activate(){return Ka(this,void 0,void 0,(function*(){this.actions.startActivation();const e=this.customProvider;try{const[{chainId:t},r]=yield Promise.all([e.getNetwork(),e.listAccounts()]);this.actions.update({chainId:t,accounts:r})}catch(e){throw this.actions.resetState(),e}}))}}function Zh([e,t]){return[e,t]}var Hh;function zh(){return zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zh.apply(this,arguments)}var Yh,Gh;function Xh(){return Xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xh.apply(this,arguments)}var Jh;!function(e){e.INTEGRATOR="integrator",e.METAMASK="metamask",e.WALLET_CONNECT="walletConnect"}(Jh||(Jh={}));const qh={[Jh.METAMASK]:{name:"MetaMask",type:Jh.METAMASK,icon:function(e){return c.createElement("svg",zh({height:355,viewBox:"0 0 397 355",width:397,xmlns:"http://www.w3.org/2000/svg"},e),Hh||(Hh=c.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(-1 -1)"},c.createElement("path",{d:"m114.622644 327.195472 52.004717 13.810198v-18.05949l4.245283-4.249292h29.716982v21.246459 14.872523h-31.839624l-39.268868-16.997169z",fill:"#cdbdb2"}),c.createElement("path",{d:"m199.528305 327.195472 50.943397 13.810198v-18.05949l4.245283-4.249292h29.716981v21.246459 14.872523h-31.839623l-39.268868-16.997169z",fill:"#cdbdb2",transform:"matrix(-1 0 0 1 483.96227 0)"}),c.createElement("path",{d:"m170.872644 287.889523-4.245283 35.056657 5.306604-4.249292h55.18868l6.367925 4.249292-4.245284-35.056657-8.490565-5.311615-42.452832 1.062323z",fill:"#393939"}),c.createElement("path",{d:"m142.216984 50.9915022 25.471698 59.4900858 11.674528 173.158643h41.391511l12.735849-173.158643 23.349056-59.4900858z",fill:"#f89c35"}),c.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),c.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),c.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),c.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),c.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 56.25-39.305949z",fill:"#eb8f35"}),c.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),c.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),c.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),c.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),c.createElement("path",{d:"m114.622644 327.195472 56.25-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3"}),c.createElement("path",{d:"m229.245286 327.195472 55.18868-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3",transform:"matrix(-1 0 0 1 513.679252 0)"}),c.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),c.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),c.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"}),c.createElement("g",{transform:"matrix(-1 0 0 1 399.056611 0)"},c.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),c.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),c.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),c.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),c.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 55.18868-38.243626z",fill:"#eb8f35"}),c.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),c.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),c.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),c.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),c.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),c.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),c.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"})))))},link:"https://metamask.io"},[Jh.WALLET_CONNECT]:{name:"WalletConnect",type:Jh.WALLET_CONNECT,icon:function(e){return c.createElement("svg",Xh({height:512,viewBox:"0 0 512 512",width:512,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Yh||(Yh=c.createElement("radialGradient",{id:"a",cx:"0%",cy:"50%",r:"100%"},c.createElement("stop",{offset:0,stopColor:"#5d9df6"}),c.createElement("stop",{offset:1,stopColor:"#006fff"}))),Gh||(Gh=c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("path",{d:"m256 0c141.384896 0 256 114.615104 256 256s-114.615104 256-256 256-256-114.615104-256-256 114.615104-256 256-256z",fill:"url(#a)"}),c.createElement("path",{d:"m64.6917558 37.7088298c51.5328072-50.2784397 135.0839942-50.2784397 186.6167992 0l6.202057 6.0510906c2.57664 2.5139218 2.57664 6.5897948 0 9.1037177l-21.215998 20.6995759c-1.288321 1.2569619-3.3771 1.2569619-4.665421 0l-8.534766-8.3270205c-35.950573-35.0754962-94.237969-35.0754962-130.188544 0l-9.1400282 8.9175519c-1.2883217 1.2569609-3.3771016 1.2569609-4.6654208 0l-21.2159973-20.6995759c-2.5766403-2.5139229-2.5766403-6.5897958 0-9.1037177zm230.4934852 42.8089117 18.882279 18.4227262c2.576627 2.5139103 2.576642 6.5897593.000032 9.1036863l-85.141498 83.070358c-2.576623 2.513941-6.754182 2.513969-9.33084.000066-.00001-.00001-.000023-.000023-.000033-.000034l-60.428256-58.957451c-.64416-.628481-1.68855-.628481-2.33271 0-.000004.000004-.000008.000007-.000012.000011l-60.4269683 58.957408c-2.5766141 2.513947-6.7541746 2.51399-9.3308408.000092-.0000151-.000014-.0000309-.000029-.0000467-.000046l-85.14386774-83.071463c-2.57663928-2.513921-2.57663928-6.589795 0-9.1037163l18.88231264-18.4226955c2.5766393-2.5139222 6.7541993-2.5139222 9.3308397 0l60.4291347 58.9582758c.6441608.62848 1.6885495.62848 2.3327103 0 .0000095-.000009.0000182-.000018.0000277-.000025l60.4261065-58.9582508c2.576581-2.51398 6.754142-2.5140743 9.33084-.0002103.000037.0000354.000072.0000709.000107.0001063l60.429056 58.9583548c.644159.628479 1.688549.628479 2.332709 0l60.428079-58.9571925c2.57664-2.5139231 6.754199-2.5139231 9.330839 0z",fill:"#fff",fillRule:"nonzero",transform:"translate(98 160)"}))))}}},Qh={};function Kh({provider:e,jsonRpcUrlMap:t,defaultChainId:r}){const n=console.error,o=x((()=>function(e,t){if(t){if(Uh.isProvider(t))return Zh(K((e=>new Vh(e,t))));if(Uh.isProvider(t.provider))throw new Error("Eip1193Bridge is experimental: pass your ethers Provider directly");return Zh(K((r=>new te({actions:r,provider:t,onError:e}))))}}(n,e)),[n,e]),i=x((()=>function(e){return Zh(K((t=>new ne({actions:t,onError:e}))))}(n)),[n]),s=x((()=>t?Object.assign(Object.assign({},Za),t):Za),[t]),a=x((()=>function(e,t,r,n){return Zh(K((o=>new re({actions:o,options:{rpcMap:t,projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:r?[r]:[],showQrModal:e},onError:n,defaultChainId:r}))))}(!0,s,r,n)),[s,r,n]);return o&&(Qh[Jh.INTEGRATOR]=o),Qh[Jh.METAMASK]=i,Qh[Jh.WALLET_CONNECT]=a,Object.values(Qh)}const $h={colorMode:"dark",slippage:3..toString(),ddl:20};var ef=(e=$h,t)=>{switch(t.type){case"SET_COLOR_MODE":return Object.assign(Object.assign({},e),{colorMode:t.payload});case"SET_SLIPPAGE":return Object.assign(Object.assign({},e),{slippage:t.payload});case"SET_TRANSACTION_DDL":return Object.assign(Object.assign({},e),{ddl:t.payload});default:return e}};const tf={chainId:Va.MAINNET,latestBlockNumber:0};var rf=(e=tf,t)=>{switch(t.type){case"SET_CHAIN_ID":return Object.assign(Object.assign({},e),{chainId:t.payload});case"SET_BLOCK_NUMBER":return Object.assign(Object.assign({},e),{latestBlockNumber:t.payload});default:return e}};const nf={tokenList:[],popularTokenList:[],ethBalance:{},accountBalances:{},balanceLoadings:{},slippageWithTokens:[]};var of,sf=(e=nf,t)=>{switch(t.type){case"SET_TOKEN_LIST":return Object.assign(Object.assign({},e),{tokenList:t.payload});case"SET_POPULAR_TOKEN_LIST":return Object.assign(Object.assign({},e),{popularTokenList:t.payload});case"SET_SLIPPAGE_WITH_TOKENS":return Object.assign(Object.assign({},e),{slippageWithTokens:t.payload});case"SET_ETH_BALANCE":return Object.assign(Object.assign({},e),{ethBalance:Object.assign(Object.assign({},e.ethBalance),t.payload)});case"SET_DEFAULT_FROM_TOKEN":return Object.assign(Object.assign({},e),{defaultFromToken:t.payload});case"SET_DEFAULT_TO_TOKEN":return Object.assign(Object.assign({},e),{defaultToToken:t.payload});case"SET_ACCOUNT_BALANCES":return Object.assign(Object.assign({},e),{accountBalances:Object.assign(Object.assign({},e.accountBalances),t.payload)});case"SET_ACCOUNT_ALLOWANCES":const r=Object.assign({},e.accountBalances);return Object.keys(r).map((e=>{r[e].tokenAllowances=t.payload})),Object.assign(Object.assign({},e),{accountBalances:r});case"SET_BALANCE_LOADINGS":return Object.assign(Object.assign({},e),{balanceLoadings:Object.assign(Object.assign({},e.balanceLoadings),t.payload)});default:return e}};!function(e){e.Initial="Initial",e.Pending="Pending",e.ApproveSuccess="ApproveSuccess",e.TxSuccess="TxSuccess",e.Failed="Failed"}(of||(of={}));const af={height:void 0,width:void 0,apikey:"",feeRate:0,rebateTo:"",isReverseRouting:!1,contractStatus:of.Initial,autoConnectLoading:void 0};const lf={settings:$h,wallet:tf,globals:af,token:nf},cf=ie({reducer:se({settings:ef,wallet:rf,token:sf,globals:(e=af,t)=>{switch(t.type){case"SET_GLOBAL_PROPS":return Object.assign(Object.assign({},e),t.payload);case"SET_AUTO_CONNECT_LOADING":return Object.assign(Object.assign({},e),{autoConnectLoading:t.payload});default:return e}}}),middleware:e=>e({serializableCheck:{ignoredActions:["SET_ACCOUNT_BALANCES","SET_ETH_BALANCE"],ignoredPaths:["token.accountBalances","token.ethBalance"]}}),preloadedState:lf}),uf=e=>(null!=e?e:cf.getState()).wallet.chainId,df=e=>(null!=e?e:cf.getState()).wallet.latestBlockNumber;function pf(){const{chainId:e}=$(),t=X(uf);return x((()=>e||t||1),[e,t])}var hf=[{chainId:1,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/prKmKP8yDTuPMHTCZ_DcxG8BqsuHNO8w5KDmJWmPodg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOUVaWU1ER2ZVN3g2N3ZBZThqWkUxZzA0RExUaFhaV0JIb09wZFhpeXhHRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTVRBeU4xOHhNekkyTjJGbE5EY3dMbkJ1WncucG5n.webp"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp"},{chainId:1,address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",name:"Binance USD",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/xZmadzpVOnpuq2jNG_5EGKeqMET0LU_gmfnp4VxkcxI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSHQwWXZKMGNnU0lGTFM0aHExTV9jOXVITV9fMHpXaHBKSGVOQU5neTBuby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkoxYzJSZk4ySTJOalJpWWpReVpDOWlkWE5rWHpkaU5qWTBZbUkwTW1RdWNHNW4ucG5n.webp"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/h2lbKBfBJ2LNSTNCuwjsBkshT4eXzDDmAV0lhWS0llA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUnVJNWt2eHBwalI4TTZsenFZZVAyTTB4eVFMUGJ0S1hONDdWVTN1dUszZy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpBNU5qUmpPVFUxT1M1d2JtYy5wbmc.webp"},{chainId:1,address:"0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/mI69kq-S-tNT1W57qYizPd5r2WNFzpAq5y6NhOcrTkY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVEZhSVNLVVZIWThLTVhyTkVmZDRXRUJmMGJoSHRweHY3Q1hDT0dKbGY2by9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT0dVeFpEaG1PVEEyWlM1d2JtYy5wbmc.webp"},{chainId:5,symbol:"USDC",address:"0xC4106029d03c33731Ca01Ba59b5A6368c660E596",name:"USDC",decimals:6,logoURI:""},{chainId:5,symbol:"USDT",address:"0xed8a325D87D3b6edED04FB992A1482231647EE5e",name:"USDT Token",decimals:6,logoURI:""},{chainId:5,symbol:"WETH",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",name:"Wrapped Ether",decimals:18,logoURI:""},{chainId:5,symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,logoURI:""},{chainId:56,address:"0xe9e7cea3dedca5984780bafc599bd69add087d56",name:"BUSD Token",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/BvxyffA5gsLB4bLmlOVkfu7AVami78-VcW_6_i8I6kc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vbC1Sa25meFB3ZXlCOGVYSWJ2b04wdHczLTlzckZOckxfRHdTTnRLSHVRRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZlluVnpaRjgyTXpsbFlqZzNZV0V4WDJKMWMyUmZOak01WldJNE4yRmhNVjlsT1dVMVlXRTBOemxtTG5OMlp3LnN2Zw.webp"},{chainId:56,address:"0x55d398326f99059ff775485246999027b3197955",name:"Tether USD",decimals:18,symbol:"USDT",logoURI:"https://cmp.dodoex.io/QOl7CvP_WSmTUOMthbxQsNKjDj0s5kSjup69dW_-UeA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTjdQU3RXV2ZGaGNTVzM1QlE2TEJIaF9keVROUEJqa1RLTXRwTll5cEhSWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZmRYTmtkRjh4TlRZME1XWmpaRFF3WDNWelpIUmZNVFUyTkRGbVkyUTBNRjlqWmpJMVpUYzVZVE5qTG5OMlp3LnN2Zw.webp"},{chainId:56,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://cmp.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:56,address:"0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c",name:"BTCB Token",decimals:18,symbol:"BTCB",logoURI:"https://cmp.dodoex.io/fZG0z_RZ1U73_LuuC3RGrrZvNR-bgrCUjkwvaro-PCY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZ1NXN0RuYWNkMnc2YWxSQnFmcENqTHNDZWJhc2VtQTc0dDJlTEdDZjhfNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpJNVlXRmpZamxoTVM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",name:"Dai Token",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/bhz9Vtma8hPb_-GnhwqQkhfTQ5PwKcR1Qbzn7aBKlfs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZW04OHB4YXNDdEg0Nl9BcjhVandzZWR2SFBFUUtjVWVkc0FmV2lvenB2Yy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWVRoaFptSmxaRFppWkM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:56,address:"0x2170ed0880ac9a755fd29b2688956bd959f933f8",name:"Ethereum Token",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:56,address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",name:"Binance-Peg USD Coin",decimals:18,symbol:"USDC",logoURI:"https://cmp.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp"},{chainId:56,address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",name:"Wrapped BNB",decimals:18,symbol:"WBNB",logoURI:"https://cmp.dodoex.io/-Pua5rc9k9iW4yuF5ajLVKzMkRhBq06D8HiEZ5gjezA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMDZOWTdBTmdOYWdFOHpXYUMtX2IzYXVPOUxsTEp6QlpLTUR3VlM5eW9DQS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT1dRellXTmtZMlEzTnk1d2JtYy5wbmc.webp"},{chainId:137,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"MATIC",decimals:18,symbol:"MATIC",logoURI:"https://cmp.dodoex.io/cQFrEB6yGIqMkh_6Pie8VR3kIStL58IS-y8FbroHVwA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2VNUUk2dkpoaXljeldrczJaWWdGdk8zSEoxSWFIa053LXZYeXFneER4US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekZmTWpkbE56TXlNRE13TWk4eFh6STNaVGN6TWpBek1ESXVjRzVuLnBuZw.webp"},{chainId:137,address:"0xe4bf2864ebec7b7fdf6eeca9bacae7cdfdaffe78",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/KEPetVp3nQkB6BZ_cb05trEfBbGxFEg92UnF8NZsEzM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE5wTlRseEJGbFRDalM1ZFh3SWJ3Mm1hZ3NPUFFkZ3Z1UEhuZDZrNWdyMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk4yUTBaamxtTldOaU15OUVUMFJQWHpka05HWTVaalZqWWpNdWNHNW4ucG5n.webp"},{chainId:137,address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/hdRkGay_hj0t1OzN5C3c30cmch26tJhHUSroffg7ciY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOHd3UndQOG9DTTdBcF9NOW11bGVOQWRqYjhBOXpvX2FYUE5pVTNBYUtzYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhnMlgwSXhOelUwTnpSZlJUZzVNRGswWDBNME5GOUVZVGs0WWprMU5GOUZaV1JsWDBGRFh6UTVOVEkzTVdRd1gwWmZiRzluYjE4MFpXSXdNVE0zTVRZeExuQnVady5wbmc.webp"},{chainId:137,address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:137,address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/er3iAGv39hCC7F8AydW_AteD3hnZj9HI2XcAaruHeqA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE9WUWtzN3JQWU5OZWdmNTRuNC1Za1NGTFYyLXVGZmlJRFVYem85aVMzOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlFUQmlPRFk1T1RGak5qSXhPR0l6Tm1NeFpERTVYMFEwWVRKbE9WOUZZakJqWDBVek5qQTJaVjlDTkRoZmJHOW5iMTlpTmpGbE5EVmtNbVF6TG5CdVp3LnBuZw.webp"},{chainId:137,address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/WeK6L9_RjWUfAsnMuOAdyXIZVE3JK_H3lZU5vk2m7Tg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTFJ0aEt6X2VrSXdmTEh6NnAycW5rSkRFeUk1RXZrODlXQ0J2VW43MUJLNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoa1gwRkRYekUzWDBZNU5UaGZSREpsWlRVeU0yRXlNakEyTWpBMk9UazBOVGszWDBNeE0xOUVPRE14WldNM1gyeHZaMjlmWXpCbU9XVTFaamxoTmk1d2JtYy5wbmc.webp"},{chainId:137,address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/_KjvB9pCVqbIIv_UnQvRWpjySBHiFnuHNSXUm_52UZM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDQ4OVYzTW1NMi1qaFJueEQ2Y3MyY1gydXdGS2tkRHpiRGZsbkZhTTJxOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhneU1qWXdYMFpCUTE4MVgwVTFOVFF5WVRjM00xOUJZVFEwWmw5Q1gwTm1aVjlFWmpkZlF6RTVNMkpqTWw5RE5UazVYMnh2WjI5Zk5HTmpORE0zTlRneFppNXdibWMucG5n.webp"},{chainId:137,address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",name:"Wrapped MATIC",decimals:18,symbol:"WMATIC",logoURI:"https://cmp.dodoex.io/HfZVSaAES3QRplSybW2uoKmYf6pVTRaxufn95_Qto_A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMERhZEZTUUVFX0d4YlBoMHY3Wk1Hb1FwaWtOQm1vaWFyZTFlaFdJbU44dy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjFoZEdsalgyVmlOekZtTkdFMU9XRXZiV0YwYVdOZlpXSTNNV1kwWVRVNVlTNTNaV0p3LndlYnA.webp"},{chainId:42161,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:42161,address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/6VmZGvbENd4TM1VK0rsYrfznRtG-GwxP-zCy2qyc9bM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWnJZUDB0ZHVTLUdDNE5FTThmRmV1RHhVWklPNUZpWnpqdkdBc0lfNlBQMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh5TW1GbU4yVTVOVFJpTDFkRlZFaGZhV052Ymw4eU1tRm1OMlU1TlRSaUxuQnVady5wbmc.webp"},{chainId:42161,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:42161,address:"0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/6U51l5aajoRrCaO6cpbrclQ2olWNDzuShggOCfoktCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8va3RkSlhwQ3dsQVZtZXNPb1dvQV95SG9IazBnV3UxUExienBKa1AxYnlJdy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5tTmtPVEV4WXprNE15OUVUMFJQWHpaalpEa3hNV001T0RNdWNHNW4ucG5n.webp"},{chainId:42161,address:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",name:"USD Coin (Arb1)",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp"},{chainId:42161,address:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:42161,address:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:66,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"OKT",decimals:18,symbol:"OKT",logoURI:"https://cmp.dodoex.io/pcltGNcIp7DP33nj3YxxBpuFEekNcOW3pwq9tjSrpY4/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTzJHSDJYTndRancwbXMzQXNidG5xNzRkVEROVld3QWFOU1dXU2ZnU01QTS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTVOalF5T1RCZk1qQXlNakExTWpBd056STNORFl3TWpJdWMzWm4uc3Zn.webp"},{chainId:66,address:"0x382bB369d343125BfB2117af9c149795C6C65C50",name:"USDT",decimals:18,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:66,address:"0x218c3c3D49d0E7B37aff0D8bB079de36Ae61A4c0",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://cmp.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:66,address:"0x54e4622DC504176b3BB432dCCAf504569699a7fF",name:"BTCK",decimals:18,symbol:"BTCK",logoURI:"https://cmp.dodoex.io/L3kcNUKg94qnX8OPFlEvHKqWybnJD8SA9HTne3PW-Rg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vNU1MQTB3Q3V6eEs4Q3ZMV0RqempuOVhzalBTWE1zbUpWZ0RRN1RPMG9FWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpVUTB0Zk1HWmlaRGRsTWpnNU5pOUNWRU5MWHpCbVltUTNaVEk0T1RZdWNHNW4ucG5n.webp"},{chainId:66,address:"0x332730a4F6E03D9C55829435f10360E13cfA41Ff",name:"BUSD",decimals:18,symbol:"BUSD",logoURI:"https://cmp.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:66,address:"0x21cDE7E32a6CAF4742d00d44B07279e7596d26B9",name:"DAIK",decimals:18,symbol:"DAIK",logoURI:"https://cmp.dodoex.io/LOb-sXupURNN9HA0zBSfLfpZlx52N9qRSDUyzk3cg0A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vck5pZzMtWU5TOUl4T3ZHX19taTFRSU9WYTZsczdZNXViRVhGcTJJVGplby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJCU1V0Zk5ESTVNV1l4WlRoa1pTOUVRVWxMWHpReU9URm1NV1U0WkdVdWNHNW4ucG5n.webp"},{chainId:66,address:"0xEF71CA2EE68F45B9Ad6F72fbdb33d707b872315C",name:"ETHK",decimals:18,symbol:"ETHK",logoURI:"https://cmp.dodoex.io/IwBclhMMQLOo79RdRo6-HnUiXxshO_hSi02YK3L6MFI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcFBSd192aEx2MHh3WkRHU2k3eGYyYVJiQjlocVhfU2tacUdGc3RJR0pYRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFZVU0V0Zk1UQTVNamMzTW1VMU9DOUZWRWhMWHpFd09USTNOekpsTlRndWNHNW4ucG5n.webp"},{chainId:66,address:"0xc946DAf81b08146B1C7A8Da2A851Ddf2B3EAaf85",name:"USDC",decimals:18,symbol:"USDC",logoURI:"https://cmp.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp"},{chainId:66,address:"0xdCAC52E001f5bd413aa6ea83956438F29098166b",name:"USDK",decimals:18,symbol:"USDK",logoURI:"https://cmp.dodoex.io/X-_D75ZOpI-yC70WjdgC8wiqcssfRIALEv0eUfD3HiE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vd290dHEzaWdkTDVzQlhSR2VFZkhQLTNpZHhDZzV0V3VGQmE3YjNrNUZITS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkV0Zk56aGpZekV6TW1OaVpDOVZVMFJMWHpjNFkyTXhNekpqWW1RdWNHNW4ucG5n.webp"},{chainId:66,address:"0x506f731F7656e2FB34b587B912808f2a7aB640BD",name:"WBTCK",decimals:18,symbol:"WBTCK",logoURI:"https://cmp.dodoex.io/7Gb1gYkvjWESf9ungWe4YKOrr5GY5UILmTwU_U95kCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOTQ4NWZpU2NmUzBNc2V1YVZXWXo2Z1RuNVVidXJvZkxmN1VGSWhMdndjTS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOTFgyVXlZamRpWVRJNU16TXZWMEpVUTB0ZlpUSmlOMkpoTWprek15NXdibWMucG5n.webp"},{chainId:1313161554,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ethereum",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:1313161554,address:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",name:"Wrapped Ethereum",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79",name:"Aurora",decimals:18,symbol:"Aurora",logoURI:"https://cmp.dodoex.io/2C2jfpO2-VYuwlga3SdtP5I6eJNJXIYq3LvPU4aFuiU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcHFWVWlJOEQ4VU5iUEZYRElvUnA3cFhEZFc4dmx4dWEtTmxubmxlam1PMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkYxY205eVlWOHlOVEprWlRFeE56YzBMMkYxY205eVlWOHlOVEprWlRFeE56YzBMbmRsWW5BLndlYnA.webp"},{chainId:1313161554,address:"0xe3520349F477A5F6EB06107066048508498A291b",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:1313161554,address:"0xe301eD8C7630C9678c39E4E45193D1e7Dfb914f7",name:"DODO Bird",decimals:18,symbol:"DODO",logoURI:"https://cmp.dodoex.io/SEcMDWMmtHb3GFW5l7fTKYurpTqALHdZI3D6qzad1rs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vQXRNMzllUjhRQzhYTl8tem5HU0pSLS1lV0tPUW91V3p2ci0zQ014WlJTSS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekl3TUhneU1EQmZNVjh3WWpReFl6VTJZV1UxTHpJd01IZ3lNREJmTVY4d1lqUXhZelUyWVdVMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0x4988a896b1227218e4A686fdE5EabdcAbd91571f",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:1313161554,address:"0xF4eB217Ba2454613b15dBdea6e5f22276410e89e",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Avalanche",decimals:18,symbol:"AVAX",logoURI:"https://cmp.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",name:"Wrapped AVAX",decimals:18,symbol:"WAVAX",logoURI:"https://cmp.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0x19860CCB0A68fd4213aB9D8266F7bBf05A8dDe98",name:"Binance USD",decimals:18,symbol:"BUSD.e",logoURI:"https://cmp.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:43114,address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",name:"Dai Stablecoin",decimals:18,symbol:"DAI.e",logoURI:"https://cmp.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:43114,address:"0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664",name:"USD Coin",decimals:6,symbol:"USDC.e",logoURI:"https://cmp.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp"},{chainId:43114,address:"0xc7198437980c041c805A1EDcbA50c1Ce5db95118",name:"Tether USD",decimals:6,symbol:"USDT.e ",logoURI:"https://cmp.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:43114,address:"0x50b7545627a5162F82A992c33b87aDc75187B218",name:"Wrapped BTC",decimals:8,symbol:"WBTC.e",logoURI:"https://cmp.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",name:"Wrapped Ether",decimals:18,symbol:"WETH.e",logoURI:"https://cmp.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:10,address:"0x4200000000000000000000000000000000000006",name:"WETH",decimals:18,symbol:"WETH",logoURI:"https://cmp.dodoex.io/f9SbZq39ynUZS5ueKvAwzLmKUfcZvYpKDaysT3dkcvM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2NkVzJUWjladmRiX3BVSjZ3b2YzeHRvYk94YUw3bEV5RmhhemhJUFhlMC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RXdNamd3TkRaZk1qQXlNakEwTWpJd01UQXpORGc1TURVdWNHNW4ucG5n.webp"},{chainId:10,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"DAI",decimals:18,symbol:"DAI",logoURI:"https://cmp.dodoex.io/04gwZiu2K_9fdb2zLwzsX1nONCbBWrZOvTyOoEFhx3g/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaDJCcmdhUmZxUzBLZDBEOVpZbEUteEtNMVdzeFFtRzBEWVpKOGJCaWN4US9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6SXlNRFUwTVRsZk1qQXlNakEwTWpJd01UQTBNak00TlRVdWFuQm4uanBn.webp"},{chainId:10,address:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607",name:"USDC",decimals:6,symbol:"USDC",logoURI:"https://cmp.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp"},{chainId:10,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://cmp.dodoex.io/bcyoORJ04NyP1HhYUZ9RrTZ-MEOFeNnMcrr__JZ6Ruw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vV1lHaU9IVFVnVWs4Q3Z3WmNyN0hWX2w4SlNrQjRVQUh1UXpzaWd4U3Nmay9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6VTVPREk0T1Y4eU1ESXlNRFF5TWpBeU1qTTBNelk0TlM1d2JtYy5wbmc.webp"}];function ff({tokenList:e,popularTokenList:t}){const r=J(),{account:n}=$(),o=pf();y((()=>{(()=>{Ka(this,void 0,void 0,(function*(){let n=[];n=i(e)?e:s(t,hf,(e=>e.address.toLowerCase())),r((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_TOKEN_LIST",payload:e})})))(n))}))})()}),[e,r,t]),y((()=>{r(el({}))}),[n,o]),y((()=>{r((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_POPULAR_TOKEN_LIST",payload:e})})))(null!=t?t:[]))}),[t,r])}const mf=e=>(null!=e?e:cf.getState()).token.tokenList,gf=e=>(null!=e?e:cf.getState()).token.accountBalances,yf=e=>(null!=e?e:cf.getState()).token.ethBalance,bf=e=>(null!=e?e:cf.getState()).token.defaultFromToken,xf=e=>(null!=e?e:cf.getState()).token.defaultToToken,vf=e=>(null!=e?e:cf.getState()).token.balanceLoadings;function wf(){const{account:e,chainId:t}=$(),r=X(gf),n=X(yf),o=x((()=>za[t||1]),[t]),i=m((i=>{var s;if(!e||!i)return null;if(o&&i.symbol===o.symbol&&Xa(i.address,o.address)){const e=n[null!=t?t:1];return!e||(null==e?void 0:e.isNaN())?null:e}if(o&&i.chainId&&i.chainId!==t&&Xa(i.address,o.address)){const e=n[i.chainId];return!e||(null==e?void 0:e.isNaN())?null:e}const a=null===(s=r[i.address.toLocaleLowerCase()])||void 0===s?void 0:s.tokenBalances;return!a||(null==a?void 0:a.isNaN())?null:a}),[r,n,e]);return i}const Ef=e=>(null!=e?e:cf.getState()).globals,Af=e=>(null!=e?e:cf.getState()).globals.autoConnectLoading;var kf=[{constant:!0,inputs:[],name:"getCurrentBlockTimestamp",outputs:[{name:"timestamp",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getLastBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockDifficulty",outputs:[{name:"difficulty",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockGasLimit",outputs:[{name:"gaslimit",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockCoinbase",outputs:[{name:"coinbase",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"}],Cf={[Va.MAINNET]:{MULTI_CALL:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",DODO_APPROVE:"0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149",ERC20_HELPER:"0xD9ef2d1583e8Aa196123e773BE38B539a4d149df"},[Va.GOERLI]:{MULTI_CALL:"0x696E25A5e2AEd1C55E6d6Cfa0532Bbda9020165d",DODO_APPROVE:"0xC9143e54021f4a6d33b9b89DBB9F458AaEdd56FB",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"},[Va.BSC]:{MULTI_CALL:"0x1Ee38d535d541c55C9dae27B12edf090C608E6Fb",DODO_APPROVE:"0xa128Ba44B2738A558A1fdC06d6303d52D3Cef8c1",ERC20_HELPER:"0x566651Ad34f6306872FaC5fB95bbF4C9beE8D8F2"},[Va.POLYGON]:{MULTI_CALL:"0xc9eD9B18e447e600238fe50e944B9062B664DEa4",DODO_APPROVE:"0x292E6b2e054e1157df71C1C9510265CA8C0c7672",ERC20_HELPER:"0xfd24312Ec7871A6D1a31e454D5AbB16c6c25a9b3"},[Va.ARBITRUM_ONE]:{MULTI_CALL:"0xF718F2bd590E5621e53f7b89398e52f7Acced8ca",DODO_APPROVE:"0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8",ERC20_HELPER:"0x7C062B9C584fA6eC2504270790D38240A2c5fE72"},[Va.AURORA]:{MULTI_CALL:"0x989DcAA95801C527C5B73AA65d3962dF9aCe1b0C",DODO_APPROVE:"0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619",ERC20_HELPER:"0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25"},[Va.OKCHAIN]:{MULTI_CALL:"0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01",DODO_APPROVE:"0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",ERC20_HELPER:"0x4775b1858f1e417C9609D455C3Ad8751ec01daC4"},[Va.OPTIMISM]:{MULTI_CALL:"0xb98Ac2fEFc8b73aeAE33D02BB00c26E12afCa9Df",DODO_APPROVE:"0xa492d6eABcdc3E204676f15B950bBdD448080364",ERC20_HELPER:"0x42E456ea0dd7538ea103fBb1d0388D14C97bB5b2"},[Va.AVALANCHE]:{MULTI_CALL:"0x97f0153E7F5749640aDF3Ff9CFC518b79D6Fe53b",DODO_APPROVE:"0xCFea63e3DE31De53D68780Dd65675F169439e470",ERC20_HELPER:"0xC3528D128CC227fd60793007b5e3FdF7c2945282"},[Va.CONFLUX]:{MULTI_CALL:"0x696e25a5e2aed1c55e6d6cfa0532bbda9020165d",DODO_APPROVE:"0x5BaF16d57620Cb361F622232F3cb4090e35F3da2",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"}};const Rf=new la("abi/5.7.0"),Tf={};let Sf={calldata:!0,memory:!0,storage:!0},Nf={calldata:!0,memory:!0};function Mf(e,t){if("bytes"===e||"string"===e){if(Sf[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&Nf[t])return!0;return(Sf[t]||"payable"===t)&&Rf.throwArgumentError("invalid modifier","name",t),!1}function Ff(e,t){for(let r in t)ol(e,r,t[r])}const Of=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),If=new RegExp(/^(.*)\[([0-9]*)\]$/);class jf{constructor(e,t){e!==Tf&&Rf.throwError("use fromString",la.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Ff(this,t);let r=this.type.match(If);Ff(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:jf.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=Of.sighash),Of[e]||Rf.throwArgumentError("invalid format type","format",e),e===Of.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==Of.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===Of.full?", ":",")+")"):t+=this.type,e!==Of.sighash&&(!0===this.indexed&&(t+=" indexed"),e===Of.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?jf.fromString(e,t):jf.fromObject(e)}static fromObject(e){return jf.isParamType(e)?e:new jf(Tf,{name:e.name||null,type:zf(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(jf.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){Rf.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function o(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},s=i;for(let r=0;r<e.length;r++){let i=e[r];switch(i){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(r),s.state.allowType=!1,s.type=zf(s.type),s.components=[o(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),Mf(s.type,s.name)&&(s.name=""),s.type=zf(s.type);let e=s;s=s.parent,s||n(r),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),Mf(s.type,s.name)&&(s.name=""),s.type=zf(s.type);let a=o(s.parent);s.parent.components.push(a),delete s.parent,s=a;break;case" ":s.state.allowType&&""!==s.type&&(s.type=zf(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(r),s.indexed&&n(r),s.indexed=!0,s.name=""):Mf(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(r),s.type+=i,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(r),s.type+=i,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=i,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=i,delete s.state.allowArray):s.state.readArray?s.type+=i:n(r)}}return s.parent&&Rf.throwArgumentError("unexpected eof","param",e),delete i.state,"indexed"===s.name?(t||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):Mf(s.type,s.name)&&(s.name=""),i.type=zf(i.type),i}(e,!!t),jf.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function Df(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let o=0;o<e.length;o++){let i=e[o];","===i&&0===n?(t.push(r),r=""):(r+=i,"("===i?n++:")"===i&&(n--,-1===n&&Rf.throwArgumentError("unbalanced parenthesis","value",e)))}r&&t.push(r);return t}(e).map((e=>jf.fromString(e,t)))}class _f{constructor(e,t){e!==Tf&&Rf.throwError("use a static from method",la.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ff(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return _f.isFragment(e)?e:"string"==typeof e?_f.fromString(e):_f.fromObject(e)}static fromObject(e){if(_f.isFragment(e))return e;switch(e.type){case"function":return Vf.fromObject(e);case"event":return Bf.fromObject(e);case"constructor":return Lf.fromObject(e);case"error":return Hf.fromObject(e);case"fallback":case"receive":return null}return Rf.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Bf.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?Vf.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?Lf.fromString(e.trim()):"error"===e.split(" ")[0]?Hf.fromString(e.substring(5).trim()):Rf.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class Bf extends _f{format(e){if(e||(e=Of.sighash),Of[e]||Rf.throwArgumentError("invalid format type","format",e),e===Of.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Of.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Of.full?", ":",")+") ",e!==Of.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?Bf.fromString(e):Bf.fromObject(e)}static fromObject(e){if(Bf.isEventFragment(e))return e;"event"!==e.type&&Rf.throwArgumentError("invalid event object","value",e);const t={name:Gf(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(jf.fromObject):[],type:"event"};return new Bf(Tf,t)}static fromString(e){let t=e.match(Xf);t||Rf.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:Rf.warn("unknown modifier: "+e)}})),Bf.fromObject({name:t[1].trim(),anonymous:r,inputs:Df(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function Pf(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&Rf.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||Rf.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=le.from(r[1]),r[0]):e}function Wf(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Uf(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&Rf.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&Rf.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||Rf.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&Rf.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&Rf.throwArgumentError("unable to determine stateMutability","value",e),t}class Lf extends _f{format(e){if(e||(e=Of.sighash),Of[e]||Rf.throwArgumentError("invalid format type","format",e),e===Of.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===Of.sighash&&Rf.throwError("cannot format a constructor for sighash",la.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===Of.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?Lf.fromString(e):Lf.fromObject(e)}static fromObject(e){if(Lf.isConstructorFragment(e))return e;"constructor"!==e.type&&Rf.throwArgumentError("invalid constructor object","value",e);let t=Uf(e);t.constant&&Rf.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(jf.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?le.from(e.gas):null};return new Lf(Tf,r)}static fromString(e){let t={type:"constructor"},r=(e=Pf(e,t)).match(Xf);return r&&"constructor"===r[1].trim()||Rf.throwArgumentError("invalid constructor string","value",e),t.inputs=Df(r[2].trim(),!1),Wf(r[3].trim(),t),Lf.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class Vf extends Lf{format(e){if(e||(e=Of.sighash),Of[e]||Rf.throwArgumentError("invalid format type","format",e),e===Of.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Of.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Of.full?", ":",")+") ",e!==Of.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?Vf.fromString(e):Vf.fromObject(e)}static fromObject(e){if(Vf.isFunctionFragment(e))return e;"function"!==e.type&&Rf.throwArgumentError("invalid function object","value",e);let t=Uf(e);const r={type:e.type,name:Gf(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(jf.fromObject):[],outputs:e.outputs?e.outputs.map(jf.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?le.from(e.gas):null};return new Vf(Tf,r)}static fromString(e){let t={type:"function"},r=(e=Pf(e,t)).split(" returns ");r.length>2&&Rf.throwArgumentError("invalid function string","value",e);let n=r[0].match(Xf);if(n||Rf.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Gf(t.name),t.inputs=Df(n[2],!1),Wf(n[3].trim(),t),r.length>1){let n=r[1].match(Xf);""==n[1].trim()&&""==n[3].trim()||Rf.throwArgumentError("unexpected tokens","value",e),t.outputs=Df(n[2],!1)}else t.outputs=[];return Vf.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function Zf(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||Rf.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class Hf extends _f{format(e){if(e||(e=Of.sighash),Of[e]||Rf.throwArgumentError("invalid format type","format",e),e===Of.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Of.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Of.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?Hf.fromString(e):Hf.fromObject(e)}static fromObject(e){if(Hf.isErrorFragment(e))return e;"error"!==e.type&&Rf.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Gf(e.name),inputs:e.inputs?e.inputs.map(jf.fromObject):[]};return Zf(new Hf(Tf,t))}static fromString(e){let t={type:"error"},r=e.match(Xf);return r||Rf.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Gf(t.name),t.inputs=Df(r[2],!1),Zf(Hf.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function zf(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const Yf=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Gf(e){return e&&e.match(Yf)||Rf.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const Xf=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Jf=new la("abi/5.7.0");class qf{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){Jf.throwArgumentError(e,this.localName,t)}}class Qf{constructor(e){ol(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return Ea(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(ga(e._data))}writeBytes(e){let t=ma(e);const r=t.length%this.wordSize;return r&&(t=ga([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=ma(le.from(e));return t.length>this.wordSize&&Jf.throwError("value out-of-bounds",la.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ga([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class Kf{constructor(e,t,r,n){ol(this,"_data",ma(e)),ol(this,"wordSize",t||32),ol(this,"_coerceFunc",r),ol(this,"allowLoose",n),this._offset=0}get data(){return xa(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):Kf.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:Jf.throwError("data out-of-bounds",la.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new Kf(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return le.from(this.readBytes(this.wordSize))}}class $f extends qf{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=La(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return La(ka(e.readValue().toHexString(),20))}}class em extends qf{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const tm=new la("abi/5.7.0");function rm(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||tm.throwError("cannot encode object for signature with missing names",la.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&tm.throwError("cannot encode object for signature with duplicate names",la.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else tm.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&tm.throwArgumentError("types/value length mismatch","tuple",r);let o=new Qf(e.wordSize),i=new Qf(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=i.length;e.encode(i,r);let n=o.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(o,r)})),s.forEach((e=>{e(o.length)}));let a=e.appendWriter(o);return a+=e.appendWriter(i),a}function nm(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readValue(),i=n.subReader(r.toNumber());try{o=t.decode(i)}catch(e){if(e.code===la.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if(e.code===la.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}null!=o&&r.push(o)}));const o=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw i}}):r[n]=i}));for(let e=0;e<r.length;e++){const t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class om extends qf{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),tm.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return rm(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&tm.throwError("insufficient data length",la.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e<t;e++)r.push(new em(this.coder));return e.coerce(this.name,nm(e,r))}}class im extends qf{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class sm extends qf{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=ma(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class am extends sm{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,xa(super.decode(e)))}}class lm extends qf{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=ma(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,xa(e.readBytes(this.size)))}}class cm extends qf{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}class um extends qf{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=le.from(t),n=Ol.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(Fl).mul(Nl)))&&this._throwError("value out-of-bounds",t)}else(r.lt(Ml)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}class dm extends sm{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Wl(t))}decode(e){return Ul(super.decode(e))}}class pm extends qf{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){return rm(e,this.coders,t)}decode(e){return e.coerce(this.name,nm(e,this.coders))}}const hm=new la("abi/5.7.0"),fm=new RegExp(/^bytes([0-9]*)$/),mm=new RegExp(/^(u?int)([0-9]*)$/);const gm=new class{constructor(e){ol(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new $f(e.name);case"bool":return new im(e.name);case"string":return new dm(e.name);case"bytes":return new am(e.name);case"array":return new om(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new pm((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new cm(e.name)}let t=e.type.match(mm);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&hm.throwArgumentError("invalid "+t[1]+" bit length","param",e),new um(r/8,"int"===t[1],e.name)}if(t=e.type.match(fm),t){let r=parseInt(t[1]);return(0===r||r>32)&&hm.throwArgumentError("invalid bytes length","param",e),new lm(r,e.name)}return hm.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new Kf(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new Qf(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(jf.from(e))));return new pm(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&hm.throwError("types/values length mismatch",la.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(jf.from(e)))),n=new pm(r,"_"),o=this._getWriter();return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this._getCoder(jf.from(e))));return new pm(n,"_").decode(this._getReader(ma(t),r))}},ym=new la("abi/5.7.0");class bm extends pl{}class xm extends pl{}class vm extends pl{}class wm extends pl{static isIndexed(e){return!(!e||!e._isIndexed)}}const Em={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Am(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class km{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,ol(this,"fragments",t.map((e=>_f.from(e))).filter((e=>null!=e))),ol(this,"_abiCoder",il(new.target,"getAbiCoder")()),ol(this,"functions",{}),ol(this,"errors",{}),ol(this,"events",{}),ol(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void ym.warn("duplicate definition - constructor"):void ol(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?ym.warn("duplicate definition - "+r):t[r]=e})),this.deploy||ol(this,"deploy",Lf.from({payable:!1,type:"constructor"})),ol(this,"_isInterface",!0)}format(e){e||(e=Of.full),e===Of.sighash&&ym.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===Of.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return gm}static getAddress(e){return La(e)}static getSighash(e){return wa(Ll(e.format()),0,4)}static getEventTopic(e){return Ll(e.format())}getFunction(e){if(ba(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];ym.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?ym.throwArgumentError("no matching function","name",t):r.length>1&&ym.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[Vf.fromString(e).format()];return t||ym.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ba(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];ym.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?ym.throwArgumentError("no matching event","name",t):r.length>1&&ym.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[Bf.fromString(e).format()];return t||ym.throwArgumentError("no matching event","signature",e),t}getError(e){if(ba(e)){const t=il(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}ym.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?ym.throwArgumentError("no matching error","name",t):r.length>1&&ym.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[Vf.fromString(e).format()];return t||ym.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return il(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),il(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=ma(t);return xa(r.slice(0,4))!==this.getSighash(e)&&ym.throwArgumentError(`data signature does not match error ${e.name}.`,"data",xa(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),xa(ga([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=ma(t);return xa(r.slice(0,4))!==this.getSighash(e)&&ym.throwArgumentError(`data signature does not match function ${e.name}.`,"data",xa(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),xa(ga([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=ma(t),n=null,o="",i=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=xa(r.slice(0,4)),t=Em[e];if(t)i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.signature,t.reason&&(n=i[0]),"Error"===s?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(i[0])}`:"Panic"===s&&(o=`; VM Exception while processing transaction: reverted with panic code ${i[0]}`);else try{const t=this.getError(e);i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.format()}catch(e){}break}}return ym.throwError("call revert exception"+o,la.errors.CALL_EXCEPTION,{method:e.format(),data:xa(t),errorArgs:i,errorName:s,errorSignature:a,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),xa(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&ym.throwError("too many arguments for "+e.format(),la.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?Ll(t):"bytes"===e.type?Sa(xa(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=le.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),ka(xa(t),32));for(t.forEach(((t,o)=>{let i=e.inputs[o];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?ym.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>n(i,e)))):r.push(n(i,t)):null!=t&&ym.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&ym.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,i)=>{const s=t[i];if(e.indexed)if("string"===e.type)r.push(Ll(s));else if("bytes"===e.type)r.push(Sa(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),o.push(s)})),{data:this._abiCoder.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);ba(r[0],32)&&r[0].toLowerCase()===t||ym.throwError("fragment/topic mismatch",la.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],o=[],i=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(jf.fromObject({type:"bytes32",name:e.name})),i.push(!0)):(n.push(e),i.push(!1)):(o.push(e),i.push(!1))}));let s=null!=r?this._abiCoder.decode(n,ga(r)):null,a=this._abiCoder.decode(o,t,!0),l=[],c=0,u=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new wm({_isIndexed:!0,hash:null});else if(i[t])l[t]=new wm({_isIndexed:!0,hash:s[u++]});else try{l[t]=s[u++]}catch(e){l[t]=e}else try{l[t]=a[c++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw Am(`property ${JSON.stringify(e.name)}`,r)}}):l[e.name]=r}}));for(let e=0;e<l.length;e++){const t=l[e];t instanceof Error&&Object.defineProperty(l,e,{enumerable:!0,get:()=>{throw Am(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new xm({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:le.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new bm({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=xa(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new vm({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}function Cm(e,t,...r){return Ka(this,void 0,void 0,(function*(){const n=[];for(const e of r)for(const t of e)t.callData&&n.push(t.callData);const o=yield function(e,t,r){return Ka(this,void 0,void 0,(function*(){const n=yield Rm(e,t,r),o=new Map;for(const{req:e,resp:t}of n)o.set(e,t);return e.map((e=>({req:e,resp:o.get(e)})))}))}(n,e,t),i=new Map;for(const{req:e,resp:t}of o)i.set(e,null==t?void 0:t.result);return r.map((e=>e.filter((e=>!e.callData||i.get(e.callData))).map(((e,t)=>e.processor(e.callData?i.get(e.callData):null,t)))))}))}function Rm(e,t,r){return Ka(this,void 0,void 0,(function*(){let n=[e];e.length>800&&(n=a(e,800));let o=[];const i=n.map((e=>Ka(this,void 0,void 0,(function*(){const n=e.map((e=>[e.to,e.data])),i={data:t.interface.encodeFunctionData("aggregate",[n]),to:r};let s;try{s=yield t.provider.call(i)}catch(n){const i=e.length;if(i>20){const n=Math.floor(i/2),[s,a]=yield Promise.all([Rm(e.slice(0,n),t,r),Rm(e.slice(n,i),t,r)]);o=[...o,...s,...a]}else{const e="[sendCallReqs] error";console.error(e,n)}}if(void 0===s)throw new Error("Unexpected batch result");const[a,l]=gm.decode(["uint256","bytes[]"],s);if(e.length!==l.length)throw new Error("Unexpected length mismatch");return l.map(((t,r)=>({resp:{result:t},req:e[r]})))}))));return(yield Promise.allSettled(i)).filter((e=>"fulfilled"===e.status)).forEach((({value:e})=>{o=[...o,...e]})),o}))}function Tm(e,t,r,n){if(!function(e){try{return La(e)}catch(e){return!1}}(e)||e===Sl)throw Error(`Invalid 'address' parameter '${e}'.`);return new ue(e,t,function(e,t){return t?function(e,t){return e.getSigner(t).connectUnchecked()}(e,t):e}(r,n))}function Sm(e){const{provider:t,account:r,chainId:n}=$(),[o,i]=h(!1),s=x((()=>Cf[null!=e?e:n]),[n,e]),a=X(Ef).jsonRpcUrlMap,l=m(((o,i)=>{if(e&&e!==n){const t=Object.assign(Object.assign({},Za),a)[e],r=new Uh(null==t?void 0:t[0]);return new ue(o,i,r)}if(t)return Tm(o,i,t,r)}),[t,r,e,a]),c=m((e=>{if(!s)return;const{MULTI_CALL:t}=s,r=l(t,kf);return(()=>Ka(this,void 0,void 0,(function*(){if(r){i(!0);try{const[n]=yield Cm(r,t,e);return n}catch(e){console.error("Contract: useMultiContract is error",e)}i(!1)}})))()}),[s,l]);return{getContract:l,contractConfig:s,call:c,loading:o}}var Nm=[{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isERC20",outputs:[{internalType:"bool",name:"isOk",type:"bool"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"judgeERC20",outputs:[{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"}];function Mm({tokenList:e,addresses:t,blockNumber:n,chainId:o,skip:i}){const{account:s}=$(),a=J(),l=x((()=>[...(null==e?void 0:e.map((e=>e.address)))||[],...t||[]].map((e=>e.toLocaleLowerCase()))),[e,JSON.stringify(t)]),{getContract:c,contractConfig:u,call:d}=Sm(o),[p,f]=h(),m=x((()=>{if(!s||!l.length||!u)return;const{DODO_APPROVE:e,ERC20_HELPER:t}=u,n=c(t,Nm);if(!n)return;return l.map((o=>({callData:{data:n.interface.encodeFunctionData("isERC20",[o,s,e]),to:t},processor:e=>{const t=new km(Nm).decodeFunctionResult("isERC20",e),{balance:n,isOk:i}=t,s=parseInt(t.decimals),a=new r(10).pow(s),l=new r(t.allownance.toString()).div(a);return i?{address:o,decimals:s,symbol:t.symbol,name:t.name,balance:new r(n.toString()).div(a),allowance:l}:{address:o,balance:new r(0),allowance:new r(0)}}})))}),[s,c,JSON.stringify(l)]);return y((()=>{(()=>{Ka(this,void 0,void 0,(function*(){if(!m||i)return;let e={};l.forEach((t=>{e[t]=!0})),a(tl(e));const t=yield d(m),r={};t&&(t.forEach((e=>{e.address.toLocaleLowerCase()!=="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLocaleLowerCase()&&(r[e.address.toLocaleLowerCase()]={tokenBalances:e.balance,tokenAllowances:e.allowance})})),a(el(r))),f(t),l.forEach((t=>{e[t]=!1})),a(tl(e))}))})()}),[m,n,i]),{data:p}}function Fm(e){const{provider:t,account:n,chainId:o}=$(),i=J(),s=X(df),a=X(Ef).jsonRpcUrlMap;y((()=>{(()=>{Ka(this,void 0,void 0,(function*(){if(t&&n)if(e&&e!==o){const t=Object.assign(Object.assign({},Za),a)[e],o=new Uh(null==t?void 0:t[0]),s=yield o.getBalance(n);s&&i($a(e,new r(s.toString()).div(1e18)))}else{const e=yield t.getBalance(n);i($a(null!=o?o:1,new r(e.toString()).div(1e18)))}}))})()}),[t,n,i,s,e])}function Om(){const{provider:e,chainId:t}=$(),r=J(),n=m((()=>Ka(this,void 0,void 0,(function*(){if(!e||!t)return;const n=yield e.getBlockNumber();r((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_BLOCK_NUMBER",payload:e})})))(n))}))),[e,t]);return{updateBlockNumber:n}}var Im,jm=[{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];function Dm(e,t,r,n=0){if(r&&(e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase()),e===t)return Im.fully+n;const o=e.indexOf(t);return 0===o?Im.prefix+n:o>0?Im.other+n:Im.none}!function(e){e[e.fully=1]="fully",e[e.prefix=2]="prefix",e[e.other=3]="other",e[e.none=0]="none"}(Im||(Im={}));function _m({value:e,onChange:t,occupiedAddrs:n,hiddenAddrs:o,showAddrs:i,side:s,chainId:a,visible:l,defaultLoadBalance:c}){const[u,d]=h(""),p=X(mf),f=pf(),g=x((()=>null!=a?a:f),[a,f]),y=wf(),b=x((()=>{const e=p.filter((e=>e.chainId===g));return e}),[p,g]),v=X((e=>((e,t)=>(null!=t?t:cf.getState()).token.popularTokenList.filter((({chainId:t})=>e===t)))(g,e))),w=x((()=>(null==hf?void 0:hf.filter((e=>e.chainId===g)))||[]),[hf,g]),E=x((()=>new Set(o?o.map((e=>e.toLowerCase())):void 0)),[o]),A=x((()=>i?new Set(i.map((e=>e.toLowerCase()))):void 0),[i]),k=m((e=>e.filter((e=>{if(e.chainId!==g)return!1;let t=!0;return t=A?A.has(e.address.toLowerCase()):!E.has(e.address.toLowerCase()),t&&s&&(t=!e.side||e.side===s),t}))),[A,g,E]),C=x((()=>k(v)),[v,k]),R=m((t=>{if(null===t)return null;const o=[];u?t.forEach((e=>{const t=((e,t,{matchAddress:r}={})=>{if(!t)return 0;const n=t.toLocaleLowerCase();let o=0;r&&e.address.toLocaleLowerCase()===n&&(o=1),o||(o=Dm(e.symbol.toLocaleLowerCase(),n,!1,1));if(o)e.name.toLocaleLowerCase()===n&&(o=Im.fully+1);else{let t=Dm(e.name.toLocaleLowerCase(),n,!1,10);t=t===Im.fully+10?Im.fully+1:t,o=t}return o})(e,u,{matchAddress:!0});t&&o.push({sort:t,token:e})})):t.forEach((e=>{o.push({sort:0,token:e})}));const i=[];return o.sort(((t,o)=>{const i=t.token,s=o.token;if(e){if(i.address===e.address)return-1;if(s.address===e.address)return 1}if(null==n?void 0:n.includes(i.address))return-1;if(null==n?void 0:n.includes(s.address))return 1;const a=y&&y(i)||new r(0),l=y&&y(s)||new r(0),c=C.map((e=>e.address));if(null==c?void 0:c.includes(i.address))return-1;if(null==c?void 0:c.includes(s.address))return 1;if(!a.eq(l))return a.gt(l)?-1:1;if(t.sort!==o.sort)return t.sort>o.sort?1:-1;const u=w.map((e=>e.address));return(null==u?void 0:u.includes(i.address))?-1:(null==u?void 0:u.includes(s.address))?1:i.symbol.localeCompare(s.symbol)})).some((e=>!!(u&&i.length>21)||(i.push(e.token),!1))),i}),[u,y,n,e,C,w]),T=m((e=>{const r=e.address.toLowerCase();t(e,!!(null==n?void 0:n.some((e=>e.toLowerCase()===r))))}),[t,n]),S=x((()=>{const e=k(b),t=new Set;return e.forEach((e=>{t.add(e.address)})),C.forEach((r=>{t.has(r.address)||e.push(r)})),R(e)||[]}),[b,k,R,C]);return function({chainId:e,value:t,tokenList:r,popularTokenList:n,visible:o,defaultLoadBalance:i}){const s=X(Af),a=X(df),l=x((()=>{if(void 0===s||s)return[];const t=new Set;return r.forEach((r=>{r.chainId===e&&t.add(r.address)})),null==n||n.forEach((r=>{r.chainId===e&&t.add(r.address)})),Array.from(t)}),[r,n,e,s]),c=x((()=>t?[t.address]:[]),[t]),u=x((()=>{var r;return null!==(r=null==t?void 0:t.chainId)&&void 0!==r?r:e}),[null==t?void 0:t.chainId,e]);Mm({addresses:l,chainId:e,skip:!1===o&&!i}),Fm(e),Mm({addresses:c,chainId:u,blockNumber:a})}({chainId:g,tokenList:S,popularTokenList:C,value:e,visible:l,defaultLoadBalance:c}),{filter:u,setFilter:d,showTokenList:S,onSelectToken:T,popularTokenList:C}}var Bm,Pm;function Wm(){return Wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wm.apply(this,arguments)}var Um,Lm,Vm,Zm,Hm,zm=function(e){return c.createElement("svg",Wm({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Bm||(Bm=c.createElement("g",{clipPath:"url(#clip0_5431_179637)"},c.createElement("path",{d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",fill:"#F2F4F7"}),c.createElement("path",{d:"M12.3735 3V9.6525L17.9963 12.165L12.3735 3Z",fill:"#343434"}),c.createElement("path",{d:"M12.3735 3L6.75 12.165L12.3735 9.6525V3Z",fill:"#8C8C8C"}),c.createElement("path",{d:"M12.3735 16.4759V20.9962L18 13.2119L12.3735 16.4759Z",fill:"#3C3C3B"}),c.createElement("path",{d:"M12.3735 20.9962V16.4752L6.75 13.2119L12.3735 20.9962Z",fill:"#8C8C8C"}),c.createElement("path",{d:"M12.3735 15.4298L17.9963 12.1651L12.3735 9.65405V15.4298Z",fill:"#141414"}),c.createElement("path",{d:"M6.75 12.1651L12.3735 15.4298V9.65405L6.75 12.1651Z",fill:"#393939"}))),Pm||(Pm=c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_5431_179637"},c.createElement("rect",{width:24,height:24,fill:"white"})))))};function Ym(){return Ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ym.apply(this,arguments)}var Gm,Xm;function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jm.apply(this,arguments)}var qm,Qm,Km;function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$m.apply(this,arguments)}var eg,tg;function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rg.apply(this,arguments)}var ng,og;function ig(){return ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ig.apply(this,arguments)}var sg;function ag(){return ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ag.apply(this,arguments)}var lg,cg;function ug(){return ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ug.apply(this,arguments)}var dg;function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pg.apply(this,arguments)}const hg={[Va.MAINNET]:{chainId:Va.MAINNET,logo:zm,name:"Ethereum"},[Va.GOERLI]:{chainId:Va.GOERLI,logo:zm,name:"Goerli",mainnet:Va.MAINNET},[Va.ARBITRUM_ONE]:{chainId:Va.ARBITRUM_ONE,logo:function(e){return c.createElement("svg",Ym({height:"692pt",viewBox:"0 0 619 692",width:"619pt",xmlns:"http://www.w3.org/2000/svg"},e),Um||(Um=c.createElement("path",{d:"m280.46 17.3c18.85-10.03 43.1-9.37 61.23 1.99 78.77 45.29 157.52 90.59 236.28 135.88 17.98 10.27 30.16 30.12 30.76 50.87v275.89c.49 19.03-8.56 38.11-23.76 49.6-83.95 48.66-167.91 97.29-251.9 145.88-14.93 5.88-32.32 5.81-47.05-.66-10.1-5.39-19.93-11.25-29.88-16.91-25.72-14.85-51.49-29.62-77.2-44.49 7.13-11.82 13.88-23.88 21.17-35.61 34.11 19.55 68.15 39.21 102.24 58.77 5.43 2.44 12.28 2.51 17.36-.81 28.11-16.31 56.23-32.61 84.36-48.89 28.58-16.52 57.15-33.07 85.69-49.67 7.92-4.6 15.84-9.2 23.78-13.77 14.97-8.59 29.86-17.33 44.83-25.93 5.77-3.22 8.74-10.05 8.75-16.47-.04-14.36.09-28.73-.07-43.09.18-76.95.01-153.9.09-230.85.24-7.26-3.78-14.44-10.07-18.06-79.37-45.64-158.72-91.3-238.08-136.94-6.26-3.47-14.38-3.15-20.42.66-78.73 45.56-157.48 91.1-236.15 136.78-6.59 3.53-10.68 11.06-10.31 18.5.21 73.45.1 146.9.48 220.34-12.68 20.02-25.84 39.75-38.67 59.68-.95 1.49-1.95 2.96-3.1 4.31-.23-95.74-.02-191.5-.1-287.25.31-22.52 14.44-43.97 34.72-53.61 78.35-45.36 156.61-90.87 235.02-136.14z",fill:"#8cbfdf"})),Lm||(Lm=c.createElement("path",{d:"m298.57 54.69c6.04-3.81 14.16-4.13 20.42-.66 79.36 45.64 158.71 91.3 238.08 136.94 6.29 3.62 10.31 10.8 10.07 18.06-.08 76.95.09 153.9-.09 230.85-6.25-8.84-11.77-18.21-17.74-27.25-38.11-59.38-76.26-118.73-114.34-178.12l-.71.13c-16.14 27.89-32.81 55.48-48.94 83.38 42.77 69.1 85.49 138.23 128.22 207.35-7.94 4.57-15.86 9.17-23.78 13.77-40.35-63.61-80.71-127.22-121.07-190.83l-.73-.41c-19.01 31.61-37.43 63.61-56.36 95.28 4.29 7.87 9.61 15.25 14.3 22.94 26.05 40.9 52.13 81.79 78.17 122.69-28.13 16.28-56.25 32.58-84.36 48.89-5.08 3.32-11.93 3.25-17.36.81-34.09-19.56-68.13-39.22-102.24-58.77 73.38-124.27 146.6-248.63 219.92-372.94l-.41-.3c-25.22.18-50.45.2-75.67.29-7.21.39-14.55-.37-21.69.39-73.43 121.29-146.88 242.57-220.46 363.77-8.47-4.83-16.92-9.69-25.34-14.61 19.61-32.21 39.88-64.05 59.74-96.12 51.98-83.37 103.96-166.73 155.94-250.1.66-1.19 1.78-2.22 1.79-3.66-13.31-.19-26.61-.72-39.92-.97-20.59.3-41.98 3.68-59.65 14.9-6.98 4.5-13.13 10.36-17.61 17.37-41.35 64.21-82.86 128.31-124.16 192.55-.38-73.44-.27-146.89-.48-220.34-.37-7.44 3.72-14.97 10.31-18.5 78.67-45.68 157.42-91.22 236.15-136.78z",fill:"#2b374d"})),Vm||(Vm=c.createElement("path",{d:"m194.36 220.39c17.67-11.22 39.06-14.6 59.65-14.9 13.31.25 26.61.78 39.92.97-.01 1.44-1.13 2.47-1.79 3.66-51.98 83.37-103.96 166.73-155.94 250.1-19.86 32.07-40.13 63.91-59.74 96.12-13.05-7.52-26.09-15.05-39.14-22.57-9.44-4.83-16.23-13.58-21.12-22.76-2.5-5.29-4.79-10.85-5.38-16.71 1.15-1.35 2.15-2.82 3.1-4.31 12.83-19.93 25.99-39.66 38.67-59.68 41.3-64.24 82.81-128.34 124.16-192.55 4.48-7.01 10.63-12.87 17.61-17.37z",fill:"#fff"})),Zm||(Zm=c.createElement("path",{d:"m343.95 206.79c25.22-.09 50.45-.11 75.67-.29l.41.3c-73.32 124.31-146.54 248.67-219.92 372.94-7.29 11.73-14.04 23.79-21.17 35.61-25.73-14.78-51.42-29.61-77.14-44.4 73.58-121.2 147.03-242.48 220.46-363.77 7.14-.76 14.48 0 21.69-.39z",fill:"#fff"})),Hm||(Hm=c.createElement("g",{fill:"#00a2f7"},c.createElement("path",{d:"m434.26 234.64.71-.13c38.08 59.39 76.23 118.74 114.34 178.12 5.97 9.04 11.49 18.41 17.74 27.25.16 14.36.03 28.73.07 43.09-.01 6.42-2.98 13.25-8.75 16.47-14.97 8.6-29.86 17.34-44.83 25.93-42.73-69.12-85.45-138.25-128.22-207.35 16.13-27.9 32.8-55.49 48.94-83.38z"}),c.createElement("path",{d:"m311.6 443.18c18.93-31.67 37.35-63.67 56.36-95.28l.73.41c40.36 63.61 80.72 127.22 121.07 190.83-28.54 16.6-57.11 33.15-85.69 49.67-26.04-40.9-52.12-81.79-78.17-122.69-4.69-7.69-10.01-15.07-14.3-22.94z"}))))},name:"Arbitrum"},[Va.POLYGON]:{chainId:Va.POLYGON,logo:function(e){return c.createElement("svg",Jm({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Gm||(Gm=c.createElement("defs",null,c.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Xm||(Xm=c.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(-223.000000, -266.000000)"},c.createElement("g",{transform:"translate(18.000000, 132.000000)"},c.createElement("g",{transform:"translate(20.000000, 41.000000)"},c.createElement("g",{transform:"translate(156.000000, 82.000000)"},c.createElement("g",{transform:"translate(29.000000, 11.000000)"},c.createElement("mask",{id:"mask-2",fill:"white"},c.createElement("use",{xlinkHref:"#path-1"})),c.createElement("g",null),c.createElement("g",{mask:"url(#mask-2)"},c.createElement("circle",{fill:"#8247E5",fillRule:"nonzero",cx:12,cy:12,r:12}),c.createElement("path",{d:"M8.01148,5.30068 C8.25312,5.16644 8.54688,5.16644 8.78852,5.30068 L12.38852,7.30068 C12.64248,7.44176 12.8,7.70948 12.8,8 L12.8,9.30068 L11.2,10.2 L11.2,8.47072 L8.4,6.91516 L5.6,8.47072 L5.6,11.52928 L8.4,13.08484 L15.21148,9.30068 C15.45312,9.16644 15.74688,9.16644 15.98852,9.30068 L19.58852,11.30068 C19.84248,11.44176 20,11.70948 20,12 L20,16 C20,16.29052 19.84248,16.55824 19.58852,16.69932 L15.98852,18.69932 C15.74688,18.83356 15.45312,18.83356 15.21148,18.69932 L11.61148,16.69932 C11.35752,16.55824 11.2,16.29052 11.2,16 L11.2,14.69932 L12.8,13.8 L12.8,15.52928 L15.6,17.08484 L18.4,15.52928 L18.4,12.47072 L15.6,10.91516 L8.78852,14.69932 C8.54688,14.83356 8.25312,14.83356 8.01148,14.69932 L4.41148,12.69932 C4.15752,12.55824 4,12.29052 4,12 L4,8 C4,7.70948 4.15752,7.44176 4.41148,7.30068 L8.01148,5.30068 Z",fill:"#FFFFFF"}))))))))))},name:"Polygon"},[Va.BSC]:{chainId:Va.BSC,logo:function(e){return c.createElement("svg",$m({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"7.5in",height:"7.5in",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd"},viewBox:"0 0 7500 7500"},e),qm||(qm=c.createElement("defs",null,c.createElement("style",{type:"text/css"},".fil0 {fill:none}\n .fil1 {fill:#f0b90b}\n .fil2 {fill:#fff}"))),Qm||(Qm=c.createElement("g",{id:"Layer_x0020_1"},c.createElement("metadata",{id:"CorelCorpID_0Corel-Layer"}),c.createElement("rect",{className:"fil0",width:7500,height:7500}),c.createElement("g",{id:"_2419820813232"},c.createElement("circle",{className:"fil1",cx:3750,cy:3750,r:3500}),c.createElement("g",null,c.createElement("path",{className:"fil2",d:"M2779 3351l971 -971 971 972 565 -565 -1536 -1537 -1536 1536 565 565 0 0zm-1529 399l565 -565 565 565 -565 565 -565 -565zm1529 399l971 971 971 -972 566 565 0 0 -1537 1537 -1536 -1536 -1 -1 566 -564 0 0zm2341 -399l565 -565 565 565 -565 565 -565 -565z"})),c.createElement("g",null,c.createElement("path",{className:"fil2",d:"M4380 3750l0 0 -630 -632 -466 467 0 0 -54 54 -111 111 -1 1 1 1 630 630 631 -631 0 0 0 0 0 -1zm0 0l0 0 0 0z"}))))),Km||(Km=c.createElement("style",{xmlns:""},"#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}#yddTop{display:block;height:22px}#yddTopBorderlr{display:block;position:static;height:17px;padding:2px 28px;line-height:17px;font-size:12px;color:#5079bb;font-weight:bold;border-style:none solid;border-width:1px}#yddTopBorderlr .ydd-sp{position:absolute;top:2px;height:0;overflow:hidden}.ydd-icon{left:5px;width:17px;padding:0px 0px 0px 0px;padding-top:17px;background-position:-16px -44px}.ydd-close{right:5px;width:16px;padding-top:16px;background-position:left -44px}#yddKeyTitle{float:left;text-decoration:none}#yddMiddle{display:block;margin-bottom:10px}.ydd-tabs{display:block;margin:5px 0;padding:0 5px;height:18px;border-bottom:1px solid}.ydd-tab{display:block;float:left;height:18px;margin:0 5px -1px 0;padding:0 4px;line-height:18px;border:1px solid;border-bottom:none}.ydd-trans-container{display:block;line-height:160%}.ydd-trans-container a{text-decoration:none;}#yddBottom{position:absolute;bottom:0;left:0;width:100%;height:22px;line-height:22px;overflow:hidden;background-position:left -22px}.ydd-padding010{padding:0 10px}#yddWrapper{color:#252525;z-index:10001;background:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);}#yddContainer{background:#fff;border-color:#4b7598}#yddTopBorderlr{border-color:#f0f8fc}#yddWrapper .ydd-sp{background-image:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)}#yddWrapper a,#yddWrapper a:hover,#yddWrapper a:visited{color:#50799b}#yddWrapper .ydd-tabs{color:#959595}.ydd-tabs,.ydd-tab{background:#fff;border-color:#d5e7f3}#yddBottom{color:#363636}#yddWrapper{min-width:250px;max-width:400px;}")))},name:"BNBChain"},[Va.OPTIMISM]:{chainId:Va.OPTIMISM,logo:function(e){return c.createElement("svg",rg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),eg||(eg=c.createElement("defs",null,c.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),tg||(tg=c.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(-223.000000, -266.000000)"},c.createElement("g",{transform:"translate(18.000000, 132.000000)"},c.createElement("g",{transform:"translate(20.000000, 41.000000)"},c.createElement("g",{transform:"translate(156.000000, 82.000000)"},c.createElement("g",{transform:"translate(29.000000, 11.000000)"},c.createElement("mask",{id:"mask-2",fill:"white"},c.createElement("use",{xlinkHref:"#path-1"})),c.createElement("g",null),c.createElement("g",{id:"optimism.caeb9392",mask:"url(#mask-2)",fillRule:"nonzero"},c.createElement("circle",{fill:"#FF0420",cx:12,cy:12,r:12}),c.createElement("path",{d:"M7.85495544,16 C7.01608475,16 6.32880363,15.7925669 5.7930557,15.37776 C5.2643519,14.9555511 5,14.3555763 5,13.5777763 C5,13.4148143 5.01763849,13.2147832 5.05285911,12.9777422 C5.14454543,12.4444444 5.27494626,11.8036699 5.44411795,11.0555371 C5.92345653,9.01851235 7.16063019,8 9.15558257,8 C9.69837462,8 10.1847573,8.09628495 10.614787,8.28885484 C11.0448167,8.47402275 11.3831601,8.75553483 11.6298735,9.13333185 C11.8765869,9.50366768 12,9.94814173 12,10.4666356 C12,10.6221956 11.9823615,10.8184961 11.9470845,11.0555371 C11.8413663,11.7147869 11.7144594,12.3555615 11.5664201,12.9777422 C11.3197066,13.9925832 10.8932272,14.7518486 10.2869817,15.2555385 C9.68073613,15.7518264 8.8700983,16 7.85495544,16 Z M8.00299476,14.3999882 C8.39780384,14.3999882 8.73259699,14.2777667 9.00754325,14.0333237 C9.28953364,13.7888807 9.49043207,13.4148143 9.61023853,12.9111244 C9.7723661,12.2148054 9.89577916,11.6073694 9.98036501,11.0888756 C10.0085415,10.9333156 10.0226298,10.7740842 10.0226298,10.611063 C10.0226298,9.93700916 9.68778026,9.59995263 9.01813761,9.59995263 C8.62332853,9.59995263 8.28498515,9.72217411 8.00299476,9.96661707 C7.72810485,10.2111193 7.53070031,10.5851857 7.41089384,11.0888756 C7.28398689,11.5851635 7.15707995,12.1925995 7.03022936,12.9111244 C7.00199651,13.0592232 6.98790826,13.2147832 6.98790826,13.3777452 C6.98790826,14.0592602 7.32630799,14.3999882 8.00299476,14.3999882 Z",fill:"#FFFFFF"}),c.createElement("path",{d:"M12.2418282,16 C12.1556269,16 12.0889713,15.9733226 12.0419867,15.9199677 C12.0027701,15.8589994 11.9910553,15.7904787 12.0067168,15.7142835 L13.6288783,8.28571646 C13.6445399,8.20190792 13.6876405,8.13332623 13.7581802,8.07997137 C13.8287198,8.02667743 13.9031435,8 13.981514,8 L17.1083126,8 C17.9781556,8 18.675596,8.1752305 19.2006341,8.52569149 C19.7335656,8.87621339 20,9.38284087 20,10.0456958 C20,10.2361531 19.9765077,10.4342848 19.9294603,10.6399689 C19.7335656,11.5161823 19.3378293,12.1638104 18.7422516,12.5828531 C18.1545047,13.0018957 17.347308,13.2114171 16.3207242,13.2114171 L14.7338326,13.2114171 L14.1931329,15.7142835 C14.1774087,15.7980921 14.1343081,15.8666129 14.0638311,15.9199677 C13.9932915,15.9733226 13.9188051,16 13.8404973,16 L12.2418282,16 Z M16.4030414,11.6342817 C16.732122,11.6342817 17.0181647,11.546636 17.2611068,11.3714055 C17.5118797,11.196175 17.6764513,10.9447494 17.7548217,10.6171287 C17.7783141,10.4875787 17.7900916,10.3733165 17.7900916,10.2742811 C17.7900916,10.0533092 17.7234986,9.8856921 17.5902501,9.77142988 C17.4570016,9.64949333 17.2297837,9.58858596 16.9084712,9.58858596 L15.497866,9.58858596 L15.0511984,11.6342817 L16.4030414,11.6342817 Z",fill:"#FFFFFF"}))))))))))},name:"Optimism"},[Va.AVALANCHE]:{chainId:Va.AVALANCHE,logo:function(e){return c.createElement("svg",ig({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),ng||(ng=c.createElement("defs",null,c.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),og||(og=c.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},c.createElement("g",null,c.createElement("mask",{fill:"white"},c.createElement("use",{xlinkHref:"#path-1"})),c.createElement("use",{fill:"#E84142",xlinkHref:"#path-1"}),c.createElement("g",{mask:"url(#mask-2)",fill:"#FFFFFF",fillRule:"nonzero"},c.createElement("g",{transform:"translate(5.000000, 5.000000)"},c.createElement("path",{d:"M3.51363108,13 L1.15960067,13 C0.664946832,13 0.420612287,13 0.271614013,12.9001615 C0.110719232,12.7911601 0.0123723422,12.6101909 0.000457589205,12.410743 C-0.00848303711,12.226815 0.113693358,12.0023407 0.358027903,11.5534302 L6.1704203,0.83471072 C6.41774722,0.379558003 6.54289774,0.1519721 6.70083664,0.0678061674 C6.87067205,-0.0226020558 7.07329583,-0.0226020558 7.24314949,0.0678061674 C7.40108839,0.1519721 7.52623891,0.379558003 7.77354758,0.83471072 L8.96845316,3.01699266 C9.23960959,3.51267254 9.37667486,3.76207783 9.43628512,4.0239486 C9.50182538,4.30763877 9.50182538,4.60692511 9.43628512,4.89061527 C9.37667486,5.15248605 9.24258371,5.40189134 8.97142729,5.89757122 L5.91831288,11.5440764 C5.64418233,12.0459985 5.50711706,12.2985154 5.31640802,12.4885903 C5.11079187,12.6943759 4.86348319,12.8440382 4.59230852,12.9282232 C4.34499985,13 4.06787693,13 3.51363108,13 Z"}),c.createElement("path",{d:"M12.8314423,13 L9.45829001,13 C8.96066205,13 8.710361,13 8.5643551,12.9003524 C8.40344207,12.7911601 8.30511343,12.6071366 8.29319868,12.4077078 C8.28425805,12.2237606 8.40940857,11.9993054 8.65970962,11.5472643 L10.3432113,8.52326579 C10.5906295,8.07746696 10.7157982,7.85612335 10.8707083,7.77193833 C11.0405802,7.6815301 11.2401933,7.6815301 11.4100652,7.77193833 C11.5680771,7.85612335 11.690144,8.07746696 11.9404816,8.52015419 L13.6300775,11.5441527 C13.8802326,11.9961938 14.0085032,12.220649 13.9995625,12.4045771 C13.9906219,12.6040822 13.8891732,12.7881057 13.7284244,12.8971072 C13.5793531,13 13.3290156,13 12.8314423,13 Z"})))))))},name:"Avalanche"},[Va.AURORA]:{chainId:Va.AURORA,logo:function(e){return c.createElement("svg",ag({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),sg||(sg=c.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"aurora-avatar-grn",fillRule:"nonzero"},c.createElement("path",{d:"M12,0 L12,0 C18.625,0 24,5.375 24,12 L24,12 C24,18.625 18.625,24 12,24 L12,24 C5.375,24 0,18.625 0,12 L0,12 C0,5.375 5.375,0 12,0 Z",id:"\\u8DEF\\u5F84",fill:"#70D44B"}),c.createElement("path",{d:"M12,4.9 C12.6333333,4.9 13.2083333,5.25833333 13.4916667,5.825 L18.175,15.2 C18.5833333,16.025 18.25,17.025 17.425,17.4333333 C17.1916667,17.55 16.9416667,17.6083333 16.6833333,17.6083333 L7.31666667,17.6083333 C6.4,17.6083333 5.65,16.8583333 5.65,15.9416667 C5.65,15.6833333 5.70833333,15.425 5.825,15.2 L10.5083333,5.825 C10.7916667,5.25 11.3666667,4.89166667 12,4.9 M12,3.75 C10.9333333,3.75 9.95833333,4.35 9.48333333,5.30833333 L4.8,14.6833333 C4.10833333,16.075 4.66666667,17.7583333 6.05833333,18.4583333 C6.45,18.65 6.88333333,18.7583333 7.31666667,18.7583333 L16.6916667,18.7583333 C18.2416667,18.7583333 19.5083333,17.5 19.5083333,15.95 C19.5083333,15.5166667 19.4083333,15.0833333 19.2083333,14.6916667 L14.5166667,5.30833333 C14.0416667,4.35 13.0666667,3.75 12,3.75 Z",id:"\\u5F62\\u72B6",fill:"#FFFFFF"})))))},name:"Aurora"},[Va.OKCHAIN]:{chainId:Va.OKCHAIN,logo:function(e){return c.createElement("svg",ug({width:72,height:72,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),lg||(lg=c.createElement("circle",{cx:36,cy:36,r:36,fill:"black"})),cg||(cg=c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.2 18H18.8C18.3582 18 18 18.3582 18 18.8V29.2C18 29.6418 18.3582 30 18.8 30H29.2C29.6418 30 30 29.6418 30 29.2V18.8C30 18.3582 29.6418 18 29.2 18ZM41.2052 30H30.8052C30.3633 30 30.0051 30.3582 30.0051 30.8V41.2C30.0051 41.6418 30.3633 41.9999 30.8052 41.9999H41.2052C41.647 41.9999 42.0051 41.6418 42.0051 41.2V30.8C42.0051 30.3582 41.647 30 41.2052 30ZM42.8 18H53.2C53.6418 18 54 18.3582 54 18.8V29.2C54 29.6418 53.6418 30 53.2 30H42.8C42.3582 30 42 29.6418 42 29.2V18.8C42 18.3582 42.3582 18 42.8 18ZM29.2 42H18.8C18.3582 42 18 42.3582 18 42.8V53.2C18 53.6418 18.3582 54 18.8 54H29.2C29.6418 54 30 53.6418 30 53.2V42.8C30 42.3582 29.6418 42 29.2 42ZM42.8 42H53.2C53.6418 42 54 42.3582 54 42.8V53.2C54 53.6418 53.6418 54 53.2 54H42.8C42.3582 54 42 53.6418 42 53.2V42.8C42 42.3582 42.3582 42 42.8 42Z",fill:"white"})))},name:"OKTC"},[Va.CONFLUX]:{chainId:Va.CONFLUX,logo:function(e){return c.createElement("svg",pg({width:"199px",height:"245px",viewBox:"0 0 199 245",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),dg||(dg=c.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"Conflux_Logo_Mark_Color",transform:"translate(0.000000, -0.000000)",fillRule:"nonzero"},c.createElement("polygon",{id:"Path",fill:"#1A1A1A",points:"151.057838 145.949662 98.7961863 198.210803 69.7103803 169.125338 121.972032 116.863685 98.7291726 93.6209957 22.9712333 169.376384 98.5203077 244.923077 174.276376 169.167689"}),c.createElement("polygon",{id:"Path",fill:"#38A1DB",points:"197.693744 98.7101231 98.9858316 9.56888949e-05 0 98.9860017 0.31563441 145.252991 98.5658906 47.0051607 197.528761 145.971262"})))))},name:"Conflux eSpace"}};function fg({width:e=24,height:t=24,marginRight:r=8,url:n,zIndex:o,cross:i,address:s,token:a,sx:l,chainId:c}){const[u,d]=h(!1),[p,f]=h(""),[g,b]=h(""),[v,w]=h(!1),E=m((()=>d(!0)),[]);let A=function(e){const t=X(mf),{chainId:r}=$();return x((()=>{if(!e)return;let n=t.find((({address:t,chainId:n})=>n===r&&t===e));return n||(n=t.find((({address:t})=>t===e))),n}),[e,t,r])}(s);a&&(A=a);const k=s||(null==A?void 0:A.address),C=null==A?void 0:A.symbol,R=null==C?void 0:C.charAt(0).toUpperCase(),T=x((()=>{const e=null==A?void 0:A.logoURI;return n||e||""}),[n,A]);return y((()=>{w(!1)}),[k,T]),y((()=>{i&&(T?function(e,t){const r=new XMLHttpRequest;let n;r.onload=function(){const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)},r.onerror=function(){t()};try{n=new URL(e)}catch(e){}finally{r.open("GET",n||e),r.responseType="blob",r.send()}}(T,(e=>{f(e)})):f(""))}),[T,i]),y((()=>{try{let t=k;if(t&&t.length<15&&(t=t.padEnd(15,"0")),t){const r=new Q(t,{size:e,format:"svg",margin:.2,background:[255,234,4,255]}).toString();b(`data:image/svg+xml;base64,${r}`)}}catch(e){console.error("generate Identicon error: ",e)}}),[k,e]),We.exports.jsxs(_r,{sx:Object.assign({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e,width:e,height:t,marginRight:r,zIndex:o,border:"solid 1px",borderColor:"border.main",borderRadius:"50%"},l||{}),style:{width:e,height:t},children:[!u&&We.exports.jsx(_r,{sx:{typography:"ht",height:"100%",width:"100%",borderRadius:"50%",border:"transparent 2px solid",borderColor:"text.primary",color:"text.primary",display:"flex",alignItems:"center",justifyContent:"center"},children:R}),We.exports.jsx(_r,{component:"img",src:!(i?p:T)||v?g:i?p:T,onLoad:E,onError:e=>{const t=e.target;k&&g&&w(!0),t.onerror=null},sx:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderRadius:"50%",overflow:"hidden",width:"100%",height:"100%"}}),c&&hg[c]?We.exports.jsx(_r,{sx:{position:"absolute",right:0,bottom:-1,width:12,height:12,transform:"translateX(50%)",border:"solid 1px",borderColor:"border.main",borderRadius:"50%"},children:We.exports.jsx(_r,{component:hg[c].logo,sx:{display:"block",width:"100%",height:"100%"}})}):""]})}function mg({token:t,onClick:r,showChainLogo:n}){var o,i;const s=Ir();return We.exports.jsxs(_r,{component:io,sx:{display:"flex",alignItems:"center",color:s.palette.text.primary,typography:"h5",fontWeight:600},onClick:e=>{r&&r(e)},"data-testid":"swap-select-token-btn",children:[(null==t?void 0:t.address)?We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(fg,{url:null==t?void 0:t.logoURI,address:null!==(o=null==t?void 0:t.address)&&void 0!==o?o:"",marginRight:6,chainId:n?null==t?void 0:t.chainId:void 0}),We.exports.jsx(_r,{children:null!==(i=null==t?void 0:t.symbol)&&void 0!==i?i:"-"})]}):We.exports.jsx(e,{id:"SELECT TOKEN"}),We.exports.jsx(_r,{sx:{ml:7,width:12,transform:"rotateX(180deg)"},component:M})]})}function gg({onClick:t,balance:r,decimals:n,address:o,showMaxBtn:i}){const{palette:s}=Ir();return We.exports.jsxs(_r,{sx:{display:"flex",typography:"body2",color:s.text.secondary},children:[We.exports.jsx(e,{id:"Balance:"})," ",o?Gs({input:r,decimals:Math.min(n||4,4)}):"-",i&&r&&r.gt(0)&&We.exports.jsx(_r,{component:io,sx:{ml:6,color:(null==r?void 0:r.gt(0))?s.primary.main:s.text.disabled,cursor:o&&t?"pointer":"unset"},onClick:()=>t&&t(r?r.toString():""),children:We.exports.jsx(e,{id:"Max"})})]})}function yg({readOnly:e,sx:t,value:r,decimals:n,onChange:o,suffix:i,withClear:s,onFocus:a,placeholder:l}){const c=Ir(),u=x((()=>i||(s&&r&&o?We.exports.jsx(_r,{component:io,sx:{ml:5,width:18,height:18,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},onClick:()=>{o&&o("")},children:We.exports.jsx(_r,{component:N,sx:{width:12,color:"text.secondary"}})}):void 0)),[o,i,c.palette.text.primary,r,s]);return We.exports.jsxs(_r,{sx:Object.assign({mt:12,display:"flex",justifyContent:"space-between",alignItems:"center"},t),"data-testid":"number-input-wrapper",children:[We.exports.jsx(go,{fullWidth:!0,value:r,readOnly:e,placeholder:l||"0.00",onFocus:a,onChange:e=>{const t=e.target.value,r=0===t.length?"":qs(t,n);o&&o(r)},sx:{width:"inherit",border:"none","& .MuiInput-input":{fontSize:24,border:"none",outline:"none",height:24,padding:0,color:"text.primary","&::placeholder":{fontSize:24,color:"text.disabled"}}}}),!e&&r&&u]})}function bg({open:e,onClose:t,afterClose:r,title:n,rightSlot:o,canBack:i=!0,children:s,height:a,testId:l}){return We.exports.jsxs(_r,{sx:{position:"absolute",top:e?0:"100%",transition:"top 300ms",zIndex:1,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",borderRadius:16,height:a},"data-testid":l,"data-active":e?"1":"0",children:[n?We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:20},children:[We.exports.jsx(_r,{sx:{display:"flex",alignItems:"center",typography:"caption"},children:n}),o,!o&&i&&We.exports.jsx(_r,{component:N,sx:{color:"text.secondary",cursor:"pointer"},onClick:()=>{t&&t(),setTimeout((()=>r&&r()),300)}})]}):"",s]})}function xg({token:e,disabled:t,style:r,onClick:n}){const o=Ir(),i=wf(),{account:s}=$(),a=i(e),l=a?Ys({input:a}):"";return We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2",px:6,py:5,borderRadius:8,cursor:t?"auto":"pointer",opacity:t?.5:1,"&:hover":{backgroundColor:"hover.default"}},style:r,onClick:()=>{t||n()},"data-testid":"token-picker-item",children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(fg,{token:e}),We.exports.jsxs(_r,{children:[We.exports.jsx(_r,{sx:{fontWeight:600,textAlign:"left"},children:e.symbol}),s&&We.exports.jsx(_r,{sx:{mt:4,textAlign:"left"},children:(null==a?void 0:a.gte(0))?l:We.exports.jsx(_r,{component:C,width:18,sx:{"& path":{fill:o.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}})})]})]}),We.exports.jsx(_r,{sx:{color:"text.secondary",textAlign:"right"},children:e.name})]})}function vg({chain:t,active:r,onClick:n}){return We.exports.jsx(Gi,{title:t.name,placement:"top",onlyHover:!0,children:We.exports.jsxs(_r,{sx:Object.assign({display:"flex",alignItems:"center",p:8,borderRadius:8,cursor:"pointer"},r?{backgroundColor:"secondary.main",color:"secondary.contrastText"}:{border:"1px solid",borderColor:"border.main","&:hover":{backgroundColor:"hover.default"}}),onClick:n,children:[We.exports.jsx(_r,{component:t.logo,sx:{width:24,height:24}}),r?We.exports.jsxs(_r,{sx:{ml:8},children:[We.exports.jsx(e,{id:"on"}),` ${t.name}`]}):""]})},t.chainId)}function wg({value:e,onChange:t,occupiedAddrs:r,hiddenAddrs:n,showAddrs:o,visible:i,side:s,defaultLoadBalance:a}){const{chainList:l,selectChainId:c,setSelectChainId:u}=function(){const{chainId:e}=$(),[t,r]=h(e),n=x((()=>{const t={};let r;return Object.entries(hg).forEach((([n,o])=>{if(o.mainnet){if(e!==o.chainId)return;r=o.mainnet}t[n]=Object.assign({},o)})),void 0!==r&&delete t[r],Object.values(t)}),[e]);return y((()=>{void 0===t&&r(e)}),[e]),{chainList:n,selectChainId:x((()=>null!=t?t:1),[t]),setSelectChainId:r}}(),{showTokenList:d,filter:p,setFilter:g,onSelectToken:b,popularTokenList:v}=_m({value:e,onChange:t,occupiedAddrs:r,hiddenAddrs:n,showAddrs:o,side:s,chainId:c,visible:i,defaultLoadBalance:a}),w=f(null),[E,A]=h(0),k=f(i);y((()=>{!k.current&&i&&(null==e?void 0:e.chainId)!==c&&u(null==e?void 0:e.chainId),k.current=i}),[e,i]),y((()=>{i&&w.current&&A(w.current.offsetHeight-16)}),[w,i]);const C=m((({index:t,style:r})=>{const n=d[t];return n?We.exports.jsx(xg,{token:n,disabled:!!e&&e.address===n.address,style:r,onClick:()=>b(n)},n.address+n.chainId):null}),[d,v,e]);return We.exports.jsxs(_r,{sx:{display:"flex",flexDirection:"column",px:20,flex:1},children:[We.exports.jsx(bo,{fullWidth:!0,height:48,value:p,onChange:e=>g(e.target.value),clearValue:()=>g(""),placeholder:de._("Enter the token symbol or address")}),We.exports.jsx(_r,{sx:{position:"relative",display:"flex",gap:8,flexWrap:"wrap",pt:16,pb:32,"&::after":{content:'""',position:"absolute",bottom:16,left:0,right:0,height:"1px",backgroundColor:"border.main"}},children:l.map((e=>We.exports.jsx(vg,{chain:e,active:e.chainId===c,onClick:()=>{u(e.chainId)}},e.chainId)))}),We.exports.jsx(_r,{sx:{pb:16,flex:1,minHeight:64},ref:w,children:We.exports.jsx(pe,{height:E,itemCount:d.length,itemSize:52,width:"100%",className:"token-list",children:C},v.length)})]})}function Eg({open:t,value:r,onClose:n,occupiedAddrs:o,onTokenChange:i,side:s,defaultLoadBalance:a}){const{height:l}=X(Ef);return We.exports.jsx(bg,{height:l,open:t,onClose:n,title:We.exports.jsx(e,{id:"Select a token"}),testId:"token-picker-wrapper",children:We.exports.jsx(wg,{value:r,visible:t,onChange:i,occupiedAddrs:o,side:s,defaultLoadBalance:a})})}function Ag(e){const{provider:t}=$(),r=x((()=>{var r;if(e&&(null===(r=null==t?void 0:t.provider)||void 0===r?void 0:r.isMetaMask))return()=>function({chainId:e,provider:t}){var r,n,o;return Ka(this,void 0,void 0,(function*(){if(!t)return!1;const i=`0x${e.toString(16)}`;try{return yield t.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]}),!0}catch(s){const{code:a}=s,l=za[e];if(!l)throw new Error(`Chain ${e} does not exist`);const c={chainId:i,chainName:null===(r=hg[e])||void 0===r?void 0:r.name,rpcUrls:[...Za[e],...null!==(o=null===(n=cf.getState().globals.jsonRpcUrlMap)||void 0===n?void 0:n[e])&&void 0!==o?o:[]],nativeCurrency:{name:l.name,symbol:l.symbol,decimals:l.decimals},blockExplorerUrls:[`https://${Ga[e]}/`]};if(4902===a||-32603===a)try{return yield t.request({method:"wallet_addEthereumChain",params:[c]}),!0}catch(t){console.error(`[failed to add ${e}]: `,c,t)}console.error(`[failed to switch ${e}]: `,c,s)}return!1}))}({chainId:e,provider:null==t?void 0:t.provider})}),[e]);return r}const kg=(e,t)=>{const r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?1==i&&11!=s?"one":2==i&&12!=s?"two":3==i&&13!=s?"few":"other":1==e&&n?"one":"other"},Cg={"en-US":kg,"zh-CN":(e,t)=>"other",pseudo:kg};function Rg({locale:e,children:r}){return y((()=>{(()=>{Ka(this,void 0,void 0,(function*(){yield function(e="en-US"){return Ka(this,void 0,void 0,(function*(){de.loadLocaleData(e,{plurals:()=>Cg[e]});try{const t=yield import(`./locales/${e}.js`);de.load(e,t.messages||t.default.messages)}catch(e){}de.activate(e)}))}(e)}))})()}),[e]),We.exports.jsx(t,{i18n:de,children:r})}var Tg,Sg,Ng,Mg;!function(e){e[e.Running=0]="Running",e[e.Success=1]="Success",e[e.Failed=2]="Failed",e[e.Warning=3]="Warning"}(Tg||(Tg={})),function(e){e.Canceled="canceled",e.Failed="failed",e.Success="success",e.Submitted="submitted"}(Sg||(Sg={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success"}(Ng||(Ng={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success",e[e.Warning=2]="Warning"}(Mg||(Mg={}));const Fg=(e,t)=>Ka(void 0,void 0,void 0,(function*(){const{value:r,from:n,to:o,data:i}=e,s={from:n,to:o,value:r,data:i};r&&!/^0x0*$/.test(r)||delete s.value;try{return(yield t.estimateGas(s)).add(5e4)}catch(e){t.call(s).then((e=>{if("test"!==process.env.NODE_ENV)throw new Error("Unexpected issue with estimating the gas. Please try again.")})).catch((e=>{if("test"!==process.env.NODE_ENV)throw e}))}return null})),Og=(e,t)=>Ka(void 0,void 0,void 0,(function*(){try{return yield t.getSigner().sendTransaction(e)}catch(e){throw 4001===(null==e?void 0:e.code)?new Error(de._("Transaction rejected.")):e}}));var Ig,jg;!function(e){e.Approval="APPROVAL",e.TX="TX",e.TypedSign="TypedSign"}(Ig||(Ig={})),function(e){e.Normal="Normal",e.Privacy="Privacy",e.LimitOrder="LimitOrder",e.RFQ="RFQ"}(jg||(jg={}));const Dg=new r(2).pow(256).minus(1),_g=e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_GLOBAL_PROPS",payload:e})})),Bg=e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_AUTO_CONNECT_LOADING",payload:e})}));function Pg({onTxFail:e,onTxSubmit:t,onTxSuccess:n}={}){const{account:o,provider:i}=$(),s=pf(),[a,l]=h(!1),[c,u]=h(new Map),d=J(),[p,f]=h(null),[g,y]=h(""),[b,v]=h(null),[w,E]=h(!1),[A,k]=h(),{updateBlockNumber:C}=Om(),R=m(((a,c,p,h=!1,m,g,b,x)=>Ka(this,void 0,void 0,(function*(){if(y(""),f(""),!o||!i)throw new Error("Submission: Cannot execute step when the wallet is disconnected");let w,A,R;k((()=>b)),l(!1);try{if(l(!0),c.opcode===Ig.Approval)R=yield((e,t,n,o,i,s)=>Ka(void 0,void 0,void 0,(function*(){const a=Tm(e,jm,i,s).interface.encodeFunctionData("approve",[n,o.toFixed()]),l={from:t,to:e,data:a,value:`0x${new r("0").toString(16)}`,gasLimit:void 0},c=yield Fg(l,i);return c&&(l.gasLimit=c),yield Og(l,i)})))(c.token.address,o,c.contract,c.amt||Dg,i,o),w=R.hash,y(w);else{if(c.opcode!==Ig.TX)throw new Error(`Op ${c.opcode} not implemented!`);if(""===c.to)throw new Error("Submission: malformed to");if(0===c.data.length)throw new Error("Submission: malformed data");if(0===c.data.indexOf("0x")&&c.data.length<=2)throw new Error("Submission: malformed data");if(A={value:c.value,data:c.data,to:c.to,gasLimit:c.gasLimit,from:o,chainId:s},!A.gasLimit)try{const e=yield Fg(A,i);e&&(A.gasLimit=e)}catch(e){console.debug(e)}if(R=yield Og(A,i),w=R.hash,y(w),!w)throw new Error(`Unexpected tx: ${w}`)}}catch(t){if(l(!1),v({spec:c,brief:a,subtitle:p}),console.error(t),t.message){d(_g({contractStatus:of.Failed}));const r={error:t.message,brief:a};g&&Object.assign(r,g),e&&e(t,g),f(function(e,t){var r;const n=null===(r=za[e])||void 0===r?void 0:r.symbol,o=[{error:"insufficient",msg:de._("Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet",{EtherTokenSymbol:n})},{error:["External Swap execution Failed","Return amount is not enough"],msg:de._("Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.")},{error:"SafeERC20: low-level call failed",msg:de._("SafeERC20: low-level call failed. Please contact the DODO team.")},{error:["User denied","cancel","User rejected","user rejected"],msg:de._("User denied transaction signature.")},{error:["Cannot set properties of undefined (setting 'loadingDefauIts'){\"originalError\":{",'[ethjs-query]while formatting outputs from RPC\'["value":["code":-32000,"message":"header not found"))'],msg:de._("RPC node data exception")},{error:['execution reverted:FORCESTOP ["originalError"'],msg:de._("ForceStop exception")},{error:["replacement transaction underpriced","Gasprice too low","transaction underprice"],msg:de._("Gas price is too low, please adjust in your wallet and try again")},{error:["MINT_INVALID"],msg:de._("No ForceStop access")},{error:["NOT_PHASE_EXE"],msg:de._("Unable to SETTLE during the cooling-off period")},{error:["params specify an EIP-1559transaction but the currentnetwork does not support"],msg:de._("Wallet incompatibility")},{error:["ALREADY_SETTLED"],msg:de._("This CP has been settled by other addrs")},{error:["create RFQ order failed]:LESS_THAN_FEE_LIMIT"],msg:de._("Service update, please wait and try again")}];let i="";return o.some((e=>Array.isArray(e.error)?e.error.some((r=>t.indexOf(r)>-1&&(i=e.msg,!0))):t.indexOf(e.error)>-1&&(i=e.msg,!0))),i||t}(s,t.message))}return Sg.Failed}v({spec:c,brief:a,subtitle:p}),E(!1),l(!1);const T=Object.assign(Object.assign(Object.assign(Object.assign({brief:a},c),A),{tx:w,subtitle:p}),g);d(_g({contractStatus:of.Pending})),t&&t(w,T),m&&m();const S={brief:a,spec:c,tx:w,subtitle:p};if(u((e=>e.set(w,[S,Tg.Running]))),h)return Sg.Submitted;if(m&&m(),null==R?void 0:R.wait){const e=yield R.wait(1);if(E(!0),e.status===Ng.Success)return"TX"===T.opcode&&d(_g({contractStatus:of.TxSuccess})),"APPROVAL"===T.opcode&&d(_g({contractStatus:of.ApproveSuccess})),x&&x(w,n),n&&n(w,T),yield C(),u((e=>e.set(w,[S,Tg.Success]))),Sg.Success}return yield C(),E(!0),u((e=>e.set(w,[S,Tg.Failed]))),Sg.Failed}))),[o,s,l,i,C]),T=x((()=>({execute:R,requests:c,setShowing:v,waitingSubmit:a})),[R,c,v]),S=m((()=>{v(null),A&&(A(),k(void 0))}),[A]);return{showing:b,showingDone:w,transactionTx:g,errorMessage:p,setErrorMessage:f,closeShowing:S,ctxVal:T,requests:c}}function Wg(){const{requests:e}=Lg(),t=[];return null==e||e.forEach((function([e,r]){r===Tg.Running&&t.push(e)})),{runningRequests:t,isInflight:t.length>0}}const Ug=w({execute:()=>Promise.resolve(Sg.Canceled),requests:void 0,waitingSubmit:!1});function Lg(){return E(Ug)}var Vg;function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zg.apply(this,arguments)}var Hg=function(e){return c.createElement("svg",Zg({width:"33px",height:"33px",viewBox:"0 0 33 33",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Vg||(Vg=c.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("g",{transform:"translate(-186.000000, -375.000000)",stroke:"currentColor",strokeWidth:4},c.createElement("g",{transform:"translate(18.000000, 291.000000)"},c.createElement("g",{transform:"translate(40.000000, 83.000000)"},c.createElement("path",{d:"M159,32 C159,15.9837423 146.016258,3 130,3"})))))))};function zg({showingDone:e,errorMessage:t}){return t?We.exports.jsx(_r,{component:F,sx:{width:64,height:64,color:"error.main"}}):e?We.exports.jsx(_r,{component:O,sx:{width:64,height:64,color:"success.main"}}):We.exports.jsx(_r,{sx:{mx:"auto",border:e=>{var t;return`6px solid ${null===(t=e.palette)||void 0===t?void 0:t.background.input}`},borderRadius:"50%",width:"64px",height:"64px",position:"relative",animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}},children:We.exports.jsx(_r,{component:Hg,sx:{position:"absolute",top:"-6px",right:"-6px",color:"primary.main"}})})}function Yg({showingDone:e,showing:t}){return We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[We.exports.jsx(_r,{sx:{mt:60},children:e?de._("{0} confirmed",{0:null==t?void 0:t.brief}):de._("{0} pending",{0:null==t?void 0:t.brief})}),(null==t?void 0:t.subtitle)?We.exports.jsx(_r,{sx:{mt:20,typography:"body2"},children:null==t?void 0:t.subtitle}):""]})}function Gg({isStarted:t,isEnded:r,tx:n}){const[o,i]=h(0),{chainId:s}=$(),a=x((()=>`https://${Ga[s||1]}/tx/${n}`),[n,s]),l=x((()=>{const e=Math.floor(o/60),t=o%60;return e?`${e}m ${t}s`:`${t}s`}),[o]),c=f();return y((()=>(t&&(i(0),clearInterval(c.current),c.current=setInterval((()=>{i((e=>e+1))}),1e3)),()=>{clearInterval(c.current)})),[t]),y((()=>{clearInterval(c.current)}),[r]),We.exports.jsxs(_r,{sx:{mt:20,pt:20,display:"flex",justifyContent:"space-between",alignItems:"center",typography:"body2",color:"text.secondary",border:"solid 1px transparent",borderTopColor:"border.main"},children:[We.exports.jsxs(_r,{children:[We.exports.jsx(e,{id:"Transaction Time:"}),l]}),We.exports.jsxs(yo,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},component:"a",href:a,target:"_blank",rel:"noopener noreferrer",children:[We.exports.jsx(e,{id:"Tx"}),We.exports.jsx(_r,{component:I,sx:{width:16,height:16,ml:6}})]})]})}function Xg(t){var{children:r}=t,n=Qa(t,["children"]);const{ctxVal:o,showing:i,closeShowing:s,showingDone:a,errorMessage:l,transactionTx:c}=Pg(n),u=J();return We.exports.jsxs(Ug.Provider,{value:o,children:[r,We.exports.jsx(bg,{open:!!i,onClose:s,children:We.exports.jsxs(_r,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",px:20,pb:20,flex:1,overflowY:"auto"},children:[We.exports.jsxs(_r,{children:[We.exports.jsx(_r,{sx:{textAlign:"center",pt:60},children:We.exports.jsx(zg,{showingDone:a,errorMessage:l})}),l?We.exports.jsxs(_r,{sx:{textAlign:"center",mt:60},children:[We.exports.jsx(_r,{children:We.exports.jsx(e,{id:"Something went wrong."})}),We.exports.jsx(_r,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:l})]}):We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(Yg,{showingDone:a,showing:i}),We.exports.jsx(Gg,{isStarted:!!i,isEnded:a,tx:c})]})]}),We.exports.jsx(no,{fullWidth:!0,size:no.Size.big,onClick:()=>{u(_g({contractStatus:of.Initial})),s()},sx:{mt:20},children:l?We.exports.jsx(e,{id:"Dismiss"}):We.exports.jsx(e,{id:"Close"})})]})})]})}const Jg=e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_SLIPPAGE",payload:e})}));function qg({width:e,height:t,feeRate:r,rebateTo:n,colorMode:o,apikey:i,defaultChainId:s,defaultToToken:a,defaultFromToken:l,jsonRpcUrlMap:c}){const u=J();y((()=>{o&&u((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_COLOR_MODE",payload:e})})))(o))}),[o]),y((()=>{var e;s&&u((e=s,t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_CHAIN_ID",payload:e})}))))}),[s]),y((()=>{u(_g({height:t}))}),[t]),y((()=>{u(_g({width:e}))}),[e]),y((()=>{i&&u(_g({apikey:i}))}),[i]),y((()=>{r&&u(_g({feeRate:r}))}),[r]),y((()=>{n&&u(_g({rebateTo:n}))}),[n]),y((()=>{l&&u((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_FROM_TOKEN",payload:e})})))(l))}),[l]),y((()=>{a&&u((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_TO_TOKEN",payload:e})})))(a))}),[a]),y((()=>{c&&u(_g({jsonRpcUrlMap:c}))}),[c])}const Qg="https://api.dodoex.io/cross-chain/widget",Kg=`${Qg}/routes`,$g=`${Qg}/transaction/encode`,ey=`${Qg}/order/create`;function ty({refetch:e,interval:t}){let r;y((()=>(e(),clearTimeout(r),r=setInterval((()=>{e()}),null!=t?t:15e3),()=>clearTimeout(r))),[e])}function ry({fromToken:e,toToken:t,chainId:r}){const[n,o]=h(!1),{apikey:i}=X(Ef),[s,a]=h(""),[l,c]=h(""),u=m((()=>{if(!r||!e||!t)return;o(!0);const n=[e,t];he.post("https://api.dodoex.io/frontend-price-api/current/batch",{networks:n.map((()=>(e=>Ya[e]||Ya[Va.MAINNET])(r))),addresses:n.map((e=>e.address)),symbols:n.map((e=>e.symbol)),isCache:!0},{headers:{apikey:i}}).then((r=>{var n;o(!1);const i=null===(n=r.data)||void 0===n?void 0:n.data;i&&(a(i.find((t=>t.address===e.address)).price),c(i.find((e=>e.address===t.address)).price))})).catch((e=>{o(!1),console.error(e)}))}),[r,e,t,i]);return ty({refetch:u}),{loading:n,refetch:u,toFiatPrice:l,fromFiatPrice:s}}const ny=e=>(null!=e?e:cf.getState()).settings.slippage,oy=e=>(null!=e?e:cf.getState()).settings.ddl,iy="0x0000000000000000000000000000000000000000";var sy;function ay({toToken:e,fromToken:t,fromAmount:r,toAmount:n,marginAmount:o}){const{account:i,chainId:s,provider:a}=$(),l=X(uf),c=x((()=>s||l),[s,l]),u=X(ny)||3,d=X(oy)||20,{feeRate:p,rebateTo:f,apikey:g,isReverseRouting:y}=X(Ef),b=x((()=>Math.floor(Date.now()/1e3)+60*d),[d]),[v,w]=h(sy.Initial),[E,A]=h(null),[k,C]=h(""),[R,T]=h(null),[S,N]=h(null),[M,F]=h(null),[O,I]=h(le.from(0)),[j,D]=h(null),[_,B]=h(null),[P,W]=h(""),[U,L]=h(""),[V,Z]=h(""),[H,z]=h(0),Y=m((()=>Ka(this,void 0,void 0,(function*(){if(!c||!t||!e||t.chainId!==e.chainId)return void w(sy.Initial);if(!y&&!r)return;if(y&&!n)return;w(sy.Loading);const o={chainId:c,deadLine:b,apikey:g,slippage:u,source:"dodoV2AndMixWasm",toTokenAddress:e.address,toTokenDecimals:e.decimals,fromTokenAddress:t.address,fromTokenDecimals:t.decimals,userAddr:i||iy};y?o.toAmount=ce(String(n||1),e.decimals).toString():o.fromAmount=ce(String(r||1),t.decimals).toString(),f&&p&&(o.rebateTo=f,o.fee=p);try{const e=(yield he.get("https://api.dodoex.io/route-service/v2/widget/getdodoroute",{params:o})).data.data;if((null==e?void 0:e.resAmount)?(w(sy.Success),A(e.resAmount),F(e.priceImpact),D(e.resPricePerFromToken),B(e.resPricePerToToken),T(e.baseFeeAmount),N(e.additionalFeeAmount),W(e.to),L(e.data),C(e.value),Z(e.useSource),z(e.duration)):w(sy.Failed),!i||!a)return;const t=yield Fg({from:i,to:e.to,value:e.value,data:e.data},a);t&&I(t)}catch(e){w(sy.Failed),console.error(e)}}))),[b,i,c,e,p,u,f,t,a,r,n,g,y]);ty({refetch:Y});const G=x((()=>{const e=y?n:r;return v!==sy.Loading&&e?E:null}),[v,y,n,r,E]),J=function(){const{chainId:e,account:t}=$(),r=Lg(),n=m((({to:e,data:n,useSource:o,duration:i,ddl:s,gasLimit:a,subtitle:l,value:c})=>{const u=60*s,d=c;o&&"weth"!==o.toLowerCase()&&a&&a.lt(3e4)&&console.debug("Warning: GasLimit less than the minimum!");const p={from:t,to:e,data:n,value:d,route:o,duration:i,ddlSecRel:u,gasLimit:a};r.execute(de._("Swap"),Object.assign({opcode:Ig.TX},p),l)}),[t,e]);return n}(),q=m((e=>{t&&(y?E:r)&&J({to:P,data:U,useSource:V,duration:H,ddl:d,value:k,subtitle:e})}),[P,d,U,H,V,t,r,O,E,k,y]);return{status:v,refetch:Y,priceImpact:M,executeSwap:q,baseFeeAmount:R,resAmount:G,additionalFeeAmount:S,resPricePerToToken:_,resPricePerFromToken:j}}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(sy||(sy={}));function ly(e){ff(e),Fm(),Om();const{provider:t,connector:r}=$(),n=J();y((()=>{n(Bg(!0));(()=>{Ka(this,void 0,void 0,(function*(){const t=e.defaultChainId;try{(null==r?void 0:r.connectEagerly)?yield r.connectEagerly(t):yield r.activate(t)}finally{n(Bg(!1))}}))})()}),[r]),y((()=>{const e=null==t?void 0:t.provider;e&&e.once&&e.on("chainChanged",(()=>Ka(this,void 0,void 0,(function*(){n(Bg(!0));try{(null==r?void 0:r.connectEagerly)?yield r.connectEagerly():yield r.activate()}finally{n(Bg(!1))}}))))}),[t]);const o=e.width||375,i=e.height||494;return qg(Object.assign(Object.assign({},e),{width:o,height:i})),We.exports.jsx(_r,{sx:{width:o,height:i,overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",minWidth:335,minHeight:494,borderRadius:16,backgroundColor:"background.paper"},className:"dodo-widget-container",children:We.exports.jsx(Xg,{...e,children:e.children})})}function cy(e){const t=function(e){for(var t=void 0===e?{}:e,r=t.mode,n=void 0===r?"light":r,i=t.lang,s=t.theme,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var c=an(n,s,i);return Cr(c=a.reduce((function(e,t){return o(e,t)}),c))}({mode:e.colorMode,theme:e.theme,lang:e.locale||"en-US"}),r=x((()=>e.defaultChainId||1),[e.defaultChainId]),n=Kh({provider:e.provider,jsonRpcUrlMap:e.jsonRpcUrlMap,defaultChainId:r}),i=`${n.length}+${e.jsonRpcUrlMap?Object.entries(e.jsonRpcUrlMap):""}+${e.defaultChainId}+${r}`;return We.exports.jsx(q,{store:cf,children:We.exports.jsx(Rg,{locale:e.locale,children:We.exports.jsx(Kr,{theme:t,children:We.exports.jsxs(ee,{connectors:n,lookupENS:!1,children:[We.exports.jsx(dn,{container:".dodo-widget-container"}),We.exports.jsx(ly,{...e})]},i)})})})}function uy({chainId:t,open:r,onClose:n}){var o,i;const s=Ir(),[a,l]=h(!1),{chainId:c}=$(),[u,d]=h("1"===localStorage.getItem("DODO_WIDGET_AUTO_SWITCH_NETWORK")),p=Ag(t);y((()=>{(()=>{Ka(this,void 0,void 0,(function*(){if(r)if(c&&t&&t!==c&&p){if(u)return yield p(),void n();l(!0)}else n();else a&&l(!1)}))})()}),[r]);const f=t&&null!==(i=null===(o=hg[t])||void 0===o?void 0:o.name)&&void 0!==i?i:"";return We.exports.jsx(hs,{open:a,onClose:n,container:document.querySelector(".dodo-widget-container"),children:We.exports.jsxs(_r,{sx:{backgroundColor:"background.paper",display:"flex",width:"100%",flexDirection:"column",justifyContent:"center",alignItems:"center",p:s.spacing(20,16),gap:20,borderRadius:s.spacing(16,16,0,0),outline:0},children:[We.exports.jsxs(_r,{sx:{typography:"caption",textAlign:"center"},children:[We.exports.jsx(e,{id:"This token is on"})," ",f,We.exports.jsx(e,{id:"."}),We.exports.jsx("br",{}),We.exports.jsx(e,{id:"Are you sure swapping to another chain?"})]}),We.exports.jsxs(_r,{component:"label",sx:{display:"flex",alignItems:"center",gap:8,typography:"h6",cursor:"pointer"},children:[We.exports.jsx(fs,{sx:{top:-1},checked:u,onChange:e=>{const{checked:t}=e.target;var r;r=t,localStorage.setItem("DODO_WIDGET_AUTO_SWITCH_NETWORK",r?"1":"0"),d(t)}}),We.exports.jsx(e,{id:"Auto switch network"})]}),We.exports.jsxs(_r,{sx:{display:"grid",width:"100%",gridTemplateColumns:"repeat(2, 1fr)",gap:8},children:[We.exports.jsx(no,{variant:no.Variant.second,onClick:n,children:We.exports.jsx(e,{id:"Cancel"})}),We.exports.jsx(no,{variant:no.Variant.outlined,onClick:()=>Ka(this,void 0,void 0,(function*(){p&&(yield p()),n()})),children:We.exports.jsx(e,{id:"Confirm"})})]})]})})}function dy({sx:e,amt:t,token:r,readOnly:n,showMaxBtn:o,onMaxClick:i,fiatPriceTxt:s,occupiedAddrs:a,onInputFocus:l,onTokenClick:c,onInputChange:u,onTokenChange:d,side:p,showChainLogo:f,onlyCurrentChain:m,defaultLoadBalance:g}){const[b,x]=h(!1),v=Ir(),w=wf(),[E,A]=h(!1),k=r?w(r):null;return y((()=>{r&&m&&x(!0)}),[r,m]),We.exports.jsxs(_r,{sx:Object.assign({width:"100%",minHeight:133,padding:20,borderRadius:12,overflow:"hidden",display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:v.palette.background.input},e),children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[We.exports.jsx(mg,{token:r,showChainLogo:f,onClick:()=>A(!0)}),We.exports.jsx(gg,{balance:k,onClick:i,showMaxBtn:o,address:null==r?void 0:r.address,decimals:null==r?void 0:r.decimals})]}),We.exports.jsx(yg,{value:t,onFocus:l,onChange:u,readOnly:n,withClear:!0}),We.exports.jsx(_r,{sx:{mt:4,typography:"body2",color:v.palette.text.secondary},children:s}),We.exports.jsx(Eg,{value:r,open:E,side:p,occupiedAddrs:a,defaultLoadBalance:g,onClose:()=>{A(!1),c&&c()},onTokenChange:(e,t)=>{A(!1),setTimeout((()=>{d(e,t)}),300)}}),We.exports.jsx(uy,{chainId:null==r?void 0:r.chainId,open:b,onClose:()=>x(!1)})]})}function py(e){const{width:t}=X(Ef),r=x((()=>{let e="";return"number"==typeof t?e=`${t}px`:t&&(e=t),e?`calc(${e} - 40px)`:"auto"}),[t]);return We.exports.jsx(Xi,{container:document.querySelector(".dodo-widget-container"),maxWidth:r,...e})}function hy({onClick:e}){const t=Ir();return We.exports.jsx(yo,{sx:{width:"100%",position:"relative"},onClick:e,children:We.exports.jsx(_r,{component:io,sx:{width:36,height:36,borderRadius:"50%",backgroundColor:t.palette.background.input,border:`4px solid ${t.palette.background.paper}`,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%) rotate(-90deg)"},children:We.exports.jsx(_r,{component:j,sx:{width:18,color:"text.secondary"}})})})}function fy({open:t,execute:n,onClose:o,toToken:i,fromToken:s,fromAmount:a,toAmount:l,priceImpact:c,clearFromAmt:u,clearToAmt:d,baseFeeAmount:p,curToFiatPrice:f,curFromFiatPrice:m,pricePerFromToken:g,additionalFeeAmount:b}){var v,w;const E=Ir(),A=X(ny),k=J(),{contractStatus:C}=X(Ef),R=x((()=>new r(c).gt(15)),[c]),[S,N]=h(!1),[F,O]=h(!1);return y((()=>{C!==of.Pending&&o(),C===of.TxSuccess&&(d(),u())}),[C]),y((()=>{N(!1)}),[f]),We.exports.jsx(bg,{open:t,onClose:()=>{k(_g({contractStatus:of.Initial})),o()},title:We.exports.jsx(e,{id:"Swap summary"}),children:We.exports.jsxs(_r,{sx:{margin:20,display:"flex",height:"100%",flexDirection:"column",borderTop:`1px solid ${E.palette.border.main}`},children:[We.exports.jsxs(_r,{sx:{py:20,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexDirection:"column",borderBottom:`1px solid ${E.palette.border.main}`},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsxs(_r,{children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[We.exports.jsx(fg,{width:16,height:16,url:null==s?void 0:s.logoURI,address:null!==(v=null==s?void 0:s.address)&&void 0!==v?v:"",marginRight:6}),We.exports.jsx(_r,{children:`${Gs({input:a,decimals:null==s?void 0:s.decimals})} ${null==s?void 0:s.symbol}`})]}),We.exports.jsx(_r,{sx:{mt:4,typography:"h6",color:E.palette.text.secondary},children:m?`$${Ys({input:m,showDecimals:1})}`:"-"})]}),We.exports.jsx(_r,{sx:{width:16,mx:16},component:D}),We.exports.jsxs(_r,{children:[We.exports.jsxs(_r,{sx:{display:"flex"},children:[We.exports.jsx(fg,{width:16,height:16,marginRight:6,url:null==i?void 0:i.logoURI,address:null!==(w=null==i?void 0:i.address)&&void 0!==w?w:""}),We.exports.jsx(_r,{children:`${Gs({input:l,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),We.exports.jsx(_r,{sx:{typography:"h6",mt:4,color:E.palette.text.secondary},children:f?`$${Ys({input:f,showDecimals:1})}(${c}%)`:"-"})]})]}),We.exports.jsx(_r,{sx:{mt:12,typography:"h6"},children:`1 ${null==s?void 0:s.symbol} = ${Gs({input:new r(l).dividedBy(new r(a)),decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),We.exports.jsxs(_r,{sx:{py:15,typography:"body2",borderBottom:`1px solid ${E.palette.border.main}`},children:[We.exports.jsxs(_r,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",color:E.palette.text.secondary},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(_r,{sx:{width:16,mr:7},component:_}),We.exports.jsx(e,{id:"Swap Detail"})]}),We.exports.jsx(_r,{component:io,children:We.exports.jsx(_r,{onClick:()=>O(!F),sx:{width:10,color:"text.secondary",transform:F?"rotateX(0deg)":"rotateX(180deg)"},component:M})})]}),We.exports.jsxs(_r,{sx:{mt:16,display:F?"initial":"none"},children:[We.exports.jsxs(_r,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(e,{id:"Basic Fee"}),We.exports.jsx(py,{title:We.exports.jsx(e,{id:"Estimated service provider fees"}),ml:5})]}),We.exports.jsx(_r,{children:`${Gs({input:p,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),We.exports.jsxs(_r,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(e,{id:"Additional Fee"}),We.exports.jsx(py,{title:We.exports.jsx(e,{id:"Additional routing fees set by the Widget user"}),ml:5})]}),We.exports.jsx(_r,{children:`${Gs({input:b,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),We.exports.jsxs(_r,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(e,{id:"Price Impact"}),We.exports.jsx(py,{title:We.exports.jsx(e,{id:"Due to the market condition, market price and estimated price may have a slight difference"}),ml:5})]}),We.exports.jsx(_r,{children:`${c}%`})]}),We.exports.jsxs(_r,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(e,{id:"Slippage"}),We.exports.jsx(py,{title:We.exports.jsx(e,{id:"High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:5})]}),We.exports.jsx(_r,{children:A})]})]})]}),We.exports.jsx(_r,{sx:{flex:1}}),R&&We.exports.jsxs(_r,{sx:{mb:14,display:"flex",cursor:"pointer",justifyContent:"center",alignItems:"center",typography:"h6"},onClick:()=>N(!S),children:[We.exports.jsx(_r,{sx:{mr:4,width:18,height:18,alignItems:"center"},children:S?We.exports.jsx(_r,{sx:{width:"100%",height:"100%",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"secondary.main"},children:We.exports.jsx(_r,{component:T,sx:{width:14,color:"#1a1a1b"}})}):We.exports.jsx(_r,{sx:{width:"100%",height:"100%",borderRadius:4,border:`1px solid ${E.palette.text.secondary}`}})}),We.exports.jsx(_r,{children:We.exports.jsx(e,{components:{0:We.exports.jsx(_r,{component:"span",sx:{color:"error.main"}})},values:{priceImpact:c},id:"Price impact reaches <0>{priceImpact}</0>%, accept the quote"})})]}),We.exports.jsx(no,{isLoading:C==of.Pending,disabled:R&&!S,fullWidth:!0,onClick:()=>{n(),k(_g({contractStatus:of.Pending}))},children:C==of.Pending?We.exports.jsx(e,{id:"Confirming"}):We.exports.jsx(e,{id:"Confirm swap"})})]})})}function my(e){var{sx:t,maxVal:r,decimals:o=2,onInputChange:i}=e,s=Qa(e,["sx","maxVal","decimals","onInputChange"]);return Ir(),We.exports.jsx(go,{...s,onChange:e=>{const t=0===e.target.value.length?null:qs(e.target.value,o),s=r&&t&&new n(t).gt(r)?r.toString():t;console.log("finalVal:",s),i&&i(s)}})}function gy({open:t,onClose:r,isBridge:n}){const o=Ir(),i=J(),s=X(ny),a=X(oy),l=x((()=>Number(s)>=50),[s]),c=n?.5:3;return We.exports.jsx(bg,{open:t,onClose:r,title:We.exports.jsx(e,{id:"Settings"}),children:We.exports.jsxs(_r,{sx:{mx:20},children:[We.exports.jsxs(_r,{sx:{py:20,borderTop:`1px solid ${o.palette.border.main}`},children:[We.exports.jsxs(_r,{sx:{mb:16,display:"flex",alignItems:"center"},children:[We.exports.jsx(e,{id:"Slippage Tolerance"}),We.exports.jsx(py,{title:We.exports.jsx(e,{id:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:7})]}),We.exports.jsxs(_r,{sx:{display:"flex",flexDirection:"column"},children:[We.exports.jsx(my,{fullWidth:!0,maxVal:100,value:s,placeholder:c.toString(),onInputChange:e=>{i(Jg(e))},suffix:We.exports.jsx(_r,{sx:{color:"text.disabled"},children:"%"}),height:36}),l&&We.exports.jsx(_r,{sx:{typography:"h6",mt:6,color:"error.main"},children:We.exports.jsx(e,{id:"Maximum slippage do not exceed 50%"})})]})]}),n?"":We.exports.jsxs(_r,{sx:{py:20,borderTop:`1px solid ${o.palette.border.main}`},children:[We.exports.jsxs(_r,{sx:{mb:16,display:"flex",alignItems:"center"},children:[We.exports.jsx(e,{id:"Transaction Deadline"}),We.exports.jsx(py,{title:We.exports.jsx(e,{id:"If your transaction time exceeds the deadline, your transaction will be rescinded."}),ml:7})]}),We.exports.jsx(my,{value:a,fullWidth:!0,height:36,placeholder:de._("{DEFAULT_SWAP_DDL} minutes",{DEFAULT_SWAP_DDL:20}),onInputChange:e=>{i((e=>t=>Ka(void 0,void 0,void 0,(function*(){t({type:"SET_TRANSACTION_DDL",payload:e})})))(e?Math.max(Number(e),1):""))}})]})]})})}function yy({toToken:t,fromToken:r,priceStatus:n,pricePerToToken:o,pricePerFromToken:i}){const[s,a]=h("-"),[l,c]=h(null),[u,d]=h("-"),[p,f]=h(null);y((()=>{a(null==r?void 0:r.symbol),d(null==t?void 0:t.symbol),c(o),f(i)}),[r,t,o,i]);const g=m((()=>{a(u),d(s),c(p),f(l)}),[s,l,u,p]);return We.exports.jsx(_r,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:{[sy.Initial]:"-",[sy.Loading]:We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(xo,{sx:{mr:5}}),We.exports.jsx(e,{id:"Fetching best price..."})]}),[sy.Failed]:We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(_r,{component:B,sx:{width:15,mr:5,color:"warning.main"}}),We.exports.jsx(e,{id:"Quote not available"})]}),[sy.Success]:We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(_r,{sx:{typography:"body2"},children:`1 ${s} = ${Ys({input:p,showDecimals:4})} ${u}`}),We.exports.jsx(_r,{component:io,sx:{width:18,height:18,ml:6,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center"},children:We.exports.jsx(_r,{sx:{width:16,color:"text.secondary"},onClick:g,component:P})})]})}[n]})}function by({open:t,onClose:r}){const n=X(Ef).defaultChainId;return We.exports.jsx(bg,{title:We.exports.jsx(e,{id:"Connect to your wallet"}),open:t,onClose:r,children:We.exports.jsx(_r,{sx:{mx:20,pb:20,border:"1px solid transparent",borderTopColor:"border.main"},children:Object.values(qh).map((t=>We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",flexDirection:"column",mt:20,p:20,backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:()=>{!function(e,t,r){var n;const o=Qh[e];if(!o)throw new Error(`Unknown wallet type: ${e}`);const[i]=o;null===(n=i.activate(t))||void 0===n||n.catch((e=>{4001!==e.code?r(e):i.connectEagerly?i.connectEagerly(t):i.activate(t)}))}(t.type,n,(e=>{console.error(e)}))},children:[We.exports.jsx(_r,{component:t.icon,sx:{width:32,height:32}}),We.exports.jsx(_r,{sx:{mt:8,typography:"caption"},children:t.name}),We.exports.jsx(_r,{sx:{mt:4,typography:"body2",color:"text.secondary"},children:We.exports.jsx(e,{id:"Connect to your {0} Wallet",values:{0:t.name}})})]},t.type)))})})}function xy(){const{connector:t}=$(),[r,n]=h(!1);return We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(no,{size:no.Size.middle,fullWidth:!0,onClick:()=>{t.deactivate?t.deactivate():t.resetState(),n(!0)},"data-testid":"connect-wallet-btn",children:We.exports.jsx(e,{id:"Connect to a wallet"})}),We.exports.jsx(by,{open:r,onClose:()=>n(!1)})]})}var vy,wy;function Ey({chainId:e,account:t,token:n,proxyContractAddress:o}){const[i,s]=h(!1),[a,l]=h(!1),[c,u]=h(null),d=X(Ef).jsonRpcUrlMap,p=X(df),f=m((()=>Ka(this,void 0,void 0,(function*(){if(!t||!e||!n)return;s(!0);const i=Object.assign(Object.assign({},Za),d)[e],a=new Uh(null==i?void 0:i[0]);try{const i=yield function({account:e,tokenAddress:t,tokenDecimals:n,chainId:o,approveAddress:i,provider:s}){return Ka(this,void 0,void 0,(function*(){if(!e||!t)return;const a=Cf[o],{DODO_APPROVE:l}=a,c=null!=i?i:l,u=new ue(t,jm,s),d=yield u.allowance(e,c),p=new r(10).pow(n);return new r(d.toString()).div(p)}))}({account:t,chainId:e,tokenAddress:n.address,tokenDecimals:n.decimals,approveAddress:o,provider:a});l(!1),u(null!=i?i:null)}catch(e){console.error(e),l(!0)}finally{s(!1)}}))),[e,n,d,o,t]);return y((()=>{f()}),[f,p]),{allowance:c,loading:i,error:a,refetch:f}}!function(e){e.All="all"}(vy||(vy={})),function(e){e.Loading="Loading",e.Insufficient="ApprovalInsufficient",e.Approving="Approving",e.Sufficient="Sufficient",e.Unchecked="Unchecked"}(wy||(wy={}));const Ay=({account:e,chainId:t,offset:n,contractAddress:o})=>{var i;const s=X(uf),a=x((()=>{var e;return Cf[null!==(e=t)&&void 0!==e?e:s]}),[t]),{isETH:l}=x((()=>qa(t)),[t]),{DODO_APPROVE:c}=a||{},u=null!==(i=null!=o?o:c)&&void 0!==i?i:null,d=function(e){const{account:t}=$(),n=X(uf),o=X(gf),i=x((()=>za[n]),[n]),s=x((()=>Cf[n]),[n]),a=m((n=>{var a;if(!t||!e)return null;if(n.symbol===i.symbol&&Xa(n.address,i.address))return new r(Dg);const{DODO_APPROVE:l}=s||{};if(e!==l)return null;const c=null===(a=null==o?void 0:o[n.address.toLowerCase()])||void 0===a?void 0:a.tokenAllowances;return null!=c?c:null}),[t,e,i.symbol,i.address,o,s]);return a}(u),[p,f]=h(),{allowance:g}=Ey({chainId:t,account:e,token:p,proxyContractAddress:u}),y=wf(),{runningRequests:b}=Wg(),v=X(vf),w=x((()=>{var e;return null===(e=za[null!=t?t:s])||void 0===e?void 0:e.address}),[t]),E=m(((t,o,i)=>{if(!t)return wy.Loading;const s=!!(null==b?void 0:b.find((e=>e.spec.opcode===Ig.Approval&&e.spec.token.address===(null==t?void 0:t.address)))),a=null!=i?i:t?y(t):null;let l=t?d(t):null;const h=new r(null!=o?o:0);if(!e)return wy.Unchecked;if(!a||h.minus(null!=n?n:0).gt(a))return wy.Unchecked;if(h.isZero())return wy.Unchecked;return t.address===w?wy.Sufficient:s?wy.Approving:((null==p?void 0:p.address)===t.address&&g&&(l=g),l?l&&h.minus(null!=n?n:0).gt(l)?wy.Insufficient:wy.Sufficient:(u===c||p&&p.address===t.address||f(t),wy.Loading))}),[y,d,e,n,u,t,v,b,w,p,null==g?void 0:g.toString()]),A=m((e=>{const t=e?d(e):null;return("USDT"===(null==e?void 0:e.symbol)||(null==e?void 0:e.address.toLowerCase())==="0x6426e6017968377529487E0ef0aA4E7759724e05".toLowerCase())&&null!==t&&t.gt(0)}),[d]),k=Lg(),C=J(),R=m(((t,n)=>Ka(void 0,void 0,void 0,(function*(){if(!u||!e||!t)return;const o=(e=>{let t=e.symbol;return t.indexOf("DLP_")>-1&&(t=t.replace("DLP_","")),t.indexOf("DLP")>-1&&(t=t.replace("DLP","LP")),t})(t),i=n?new r(0):void 0,s=n?de._("Reset"):de._("Approve");var a;(yield k.execute(`${s} ${o}`,{opcode:Ig.Approval,token:t,contract:u,amt:i}))===Sg.Success&&C((a=null!=i?i:Dg,e=>Ka(void 0,void 0,void 0,(function*(){e({type:"SET_ACCOUNT_ALLOWANCES",payload:a})}))))}))),[u,e,t,k,C]),T=m((e=>{const t=new r(0);if(!e)return t.toString();const n=y(e);if(!n)return t.toString();let o=n;const i=l?.1:.02;return w===(null==e?void 0:e.address)&&(o=n.gt(i)?n.minus(i):t),o.toString()}),[t,y,l]);return{getApprovalState:E,getPendingRest:A,getMaxBalance:T,submitApprove:R}};var ky;!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(ky||(ky={}));const Cy=[{id:"cBridge",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2234%22%20height%3D%2234%22%20viewBox%3D%220%200%2034%2034%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221%22%20y%3D%221%22%20width%3D%2232%22%20height%3D%2232%22%20rx%3D%228%22%20fill%3D%22white%22%20stroke%3D%22%2333363F%22%2F%3E%3Cg%20clip-path%3D%22url%28%23clip0_37_1169%29%22%3E%3Cpath%20d%3D%22M10.9221%2022C13.0882%2022%2014.8442%2021.2006%2014.8442%2020.2144C14.8442%2019.2283%2013.0882%2018.4288%2010.9221%2018.4288C8.75599%2018.4288%207%2019.2283%207%2020.2144C7%2021.2006%208.75599%2022%2010.9221%2022Z%22%20fill%3D%22%23444444%22%2F%3E%3Cpath%20d%3D%22M23.5587%2022C25.7248%2022%2027.4808%2021.2006%2027.4808%2020.2144C27.4808%2019.2283%2025.7248%2018.4288%2023.5587%2018.4288C21.3926%2018.4288%2019.6366%2019.2283%2019.6366%2020.2144C19.6366%2021.2006%2021.3926%2022%2023.5587%2022Z%22%20fill%3D%22%23DDDDDD%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.88456%2020.2144C9.84901%2020.2146%209.81379%2020.2076%209.78098%2020.1939C9.74818%2020.1802%209.71844%2020.1601%209.69353%2020.1347C9.66862%2020.1094%209.64903%2020.0793%209.63593%2020.0462C9.62283%2020.0132%209.61648%2019.9779%209.61725%2019.9423C9.7509%2015.5317%2013.1124%2012%2017.2394%2012C21.3663%2012%2024.7278%2015.5317%2024.8615%2019.9423C24.8622%2019.9779%2024.8559%2020.0132%2024.8428%2020.0462C24.8297%2020.0793%2024.8101%2020.1094%2024.7852%2020.1347C24.7603%2020.1601%2024.7306%2020.1802%2024.6977%2020.1939C24.6649%2020.2076%2024.6297%2020.2146%2024.5942%2020.2144H22.0874C22.0152%2020.2135%2021.946%2020.1848%2021.8943%2020.1344C21.8426%2020.0839%2021.8123%2020.0155%2021.8096%2019.9433C21.6894%2017.1106%2019.6894%2014.8567%2017.2403%2014.8567C14.7913%2014.8567%2012.7913%2017.1106%2012.6711%2019.9433C12.6684%2020.0155%2012.638%2020.0839%2012.5863%2020.1344C12.5346%2020.1848%2012.4655%2020.2135%2012.3932%2020.2144H9.88456Z%22%20fill%3D%22%23FF957E%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_37_1169%22%3E%3Crect%20width%3D%2220.4808%22%20height%3D%2210%22%20fill%3D%22white%22%20transform%3D%22translate%287%2012%29%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",name:"cBridge"},{id:"stargate",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M0.5%208C0.5%203.85786%203.85786%200.5%208%200.5H24C28.1421%200.5%2031.5%203.85786%2031.5%208V24C31.5%2028.1421%2028.1421%2031.5%2024%2031.5H8C3.85786%2031.5%200.5%2028.1421%200.5%2024V8Z%22%20fill%3D%22black%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M17.5867%208.63649L18.0125%209.63382C18.8482%2011.592%2020.4079%2013.1518%2022.3662%2013.9875L23.3635%2014.4133C23.6245%2014.5246%2023.8365%2014.6842%2024%2014.8743C23.5033%2011.3132%2020.6868%208.49629%2017.1257%208C17.3154%208.16317%2017.4754%208.37546%2017.5867%208.63649Z%22%20fill%3D%22%23999999%22%2F%3E%3Cpath%20d%3D%22M8.63649%2014.4133L9.63382%2013.9875C11.592%2013.1518%2013.1518%2011.592%2013.9879%209.63382L14.4133%208.63649C14.525%208.37546%2014.6846%208.16317%2014.8743%208C11.3132%208.49629%208.49667%2011.3132%208%2014.8743C8.16357%2014.6842%208.37548%2014.5246%208.63649%2014.4133Z%22%20fill%3D%22%23999999%22%2F%3E%3Cpath%20d%3D%22M23.3635%2017.5863L22.3662%2018.0121C20.4079%2018.8479%2018.8482%2020.408%2018.0125%2022.3662L17.5867%2023.3632C17.4754%2023.6242%2017.3154%2023.8365%2017.1257%2024C20.6868%2023.5034%2023.5033%2020.6865%2024%2017.1253C23.8365%2017.3154%2023.6245%2017.475%2023.3635%2017.5863Z%22%20fill%3D%22%23999999%22%2F%3E%3Cpath%20d%3D%22M14.4133%2023.3632L13.9879%2022.3662C13.1518%2020.408%2011.592%2018.8479%209.63382%2018.0121L8.63649%2017.5863C8.37548%2017.475%208.16357%2017.3154%208%2017.1253C8.49667%2020.6865%2011.3132%2023.5034%2014.8743%2024C14.6846%2023.8365%2014.525%2023.6242%2014.4133%2023.3632Z%22%20fill%3D%22%23999999%22%2F%3E%3Cpath%20d%3D%22M12.3715%2015.2177L12.863%2015.0078C13.8278%2014.5959%2014.5966%2013.8275%2015.0086%2012.8626L15.2181%2012.3711C15.512%2011.6827%2016.4879%2011.6827%2016.7818%2012.3711L16.9913%2012.8626C17.4032%2013.8275%2018.172%2014.5959%2019.1369%2015.0078L19.6284%2015.2177C20.3168%2015.5116%2020.3168%2016.4872%2019.6284%2016.7811L19.1369%2016.991C18.172%2017.4029%2017.4032%2018.1713%2016.9913%2019.1366L16.7818%2019.6276C16.4879%2020.3161%2015.512%2020.3161%2015.2181%2019.6276L15.0086%2019.1366C14.5966%2018.1713%2013.8278%2017.4029%2012.863%2016.991L12.3715%2016.7811C11.6831%2016.4872%2011.6831%2015.5116%2012.3715%2015.2177Z%22%20fill%3D%22%23F2F2F2%22%2F%3E%3C%2Fsvg%3E",name:"Stargate"},{id:"connext",logoURI:"e63d558f5364d137.svg",name:"Connext"},{id:"synapse",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22mask0_419_48383%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2232%22%20height%3D%2232%22%3E%3Cpath%20d%3D%22M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z%22%20fill%3D%22black%22%2F%3E%3C%2Fmask%3E%3Cg%20mask%3D%22url%28%23mask0_419_48383%29%22%3E%3Cpath%20d%3D%22M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z%22%20fill%3D%22%23121826%22%2F%3E%3Cpath%20d%3D%22M15.9794%207C15.5251%207%2015.1568%207.36058%2015.1568%207.80538C15.1568%208.25017%2015.5251%208.61075%2015.9794%208.61075C16.4337%208.61075%2016.802%208.25017%2016.802%207.80538C16.802%207.36058%2016.4337%207%2015.9794%207Z%22%20fill%3D%22url%28%23paint0_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M15.9794%207.44297C16.1839%207.44297%2016.3496%207.60522%2016.3496%207.80537C16.3496%208.00551%2016.1839%208.16776%2015.9794%208.16776C15.775%208.16776%2015.6093%208.00551%2015.6093%207.80537C15.6093%207.60522%2015.775%207.44293%2015.9794%207.44293V7.44297ZM12.4422%209.13423C11.9879%209.13423%2011.6196%209.49481%2011.6196%209.93961C11.6196%2010.3844%2011.9878%2010.7449%2012.4422%2010.7449C12.8965%2010.7449%2013.2648%2010.3844%2013.2648%209.93961C13.2648%209.49481%2012.8965%209.13423%2012.4422%209.13423ZM19.599%209.17448C19.1446%209.17448%2018.7764%209.53506%2018.7764%209.97986C18.7764%2010.4247%2019.1446%2010.7852%2019.599%2010.7852C20.0533%2010.7852%2020.4216%2010.4247%2020.4216%209.97986C20.4216%209.53506%2020.0533%209.17448%2019.599%209.17448V9.17448Z%22%20fill%3D%22url%28%23paint1_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M12.4422%209.57715C12.6466%209.57715%2012.8124%209.7394%2012.8124%209.93958C12.8124%2010.1397%2012.6466%2010.302%2012.4422%2010.302C12.2377%2010.302%2012.072%2010.1397%2012.072%209.93958C12.072%209.7394%2012.2377%209.57715%2012.4422%209.57715ZM19.599%209.6174C19.8034%209.6174%2019.9691%209.77965%2019.9691%209.97984C19.9691%2010.18%2019.8034%2010.3422%2019.599%2010.3422C19.3945%2010.3422%2019.2288%2010.18%2019.2288%209.97984C19.2288%209.77969%2019.3945%209.6174%2019.599%209.6174V9.6174ZM15.9794%2010.9866C15.457%2010.9866%2015.0334%2011.4012%2015.0334%2011.9127C15.0334%2012.4242%2015.457%2012.8389%2015.9794%2012.8389C16.5019%2012.8389%2016.9255%2012.4242%2016.9255%2011.9127C16.9255%2011.4012%2016.5019%2010.9866%2015.9794%2010.9866ZM8.8226%2011.1074C8.3683%2011.1074%208%2011.4679%208%2011.9127C8%2012.3575%208.3683%2012.7181%208.8226%2012.7181C9.27695%2012.7181%209.64525%2012.3575%209.64525%2011.9127C9.64525%2011.4679%209.27695%2011.1074%208.8226%2011.1074ZM23.1774%2011.1074C22.723%2011.1074%2022.3548%2011.4679%2022.3548%2011.9127C22.3548%2012.3575%2022.723%2012.7181%2023.1774%2012.7181C23.6317%2012.7181%2024%2012.3575%2024%2011.9127C24%2011.4679%2023.6317%2011.1074%2023.1774%2011.1074V11.1074Z%22%20fill%3D%22url%28%23paint2_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M15.9794%2011.4295C16.252%2011.4295%2016.473%2011.6458%2016.473%2011.9127C16.473%2012.1796%2016.252%2012.3959%2015.9794%2012.3959C15.7068%2012.3959%2015.4859%2012.1796%2015.4859%2011.9127C15.4859%2011.6458%2015.7068%2011.4295%2015.9794%2011.4295V11.4295ZM8.82261%2011.5503C9.02706%2011.5503%209.19281%2011.7126%209.19281%2011.9127C9.19281%2012.1129%209.02706%2012.2751%208.82261%2012.2751C8.61817%2012.2751%208.45245%2012.1129%208.45245%2011.9127C8.45245%2011.7126%208.61817%2011.5503%208.82261%2011.5503V11.5503ZM23.1774%2011.5503C23.3818%2011.5503%2023.5476%2011.7126%2023.5476%2011.9127C23.5476%2012.1129%2023.3818%2012.2751%2023.1774%2012.2751C22.973%2012.2751%2022.8072%2012.1129%2022.8072%2011.9127C22.8072%2011.7126%2022.973%2011.5503%2023.1774%2011.5503ZM12.3188%2013C11.7963%2013%2011.3727%2013.4146%2011.3727%2013.9261C11.3727%2014.4377%2011.7963%2014.8523%2012.3188%2014.8523C12.8412%2014.8523%2013.2648%2014.4377%2013.2648%2013.9261C13.2648%2013.4146%2012.8412%2013%2012.3188%2013ZM19.599%2013C19.0765%2013%2018.653%2013.4146%2018.653%2013.9261C18.653%2014.4377%2019.0765%2014.8523%2019.599%2014.8523C20.1214%2014.8523%2020.545%2014.4377%2020.545%2013.9261C20.545%2013.4146%2020.1214%2013%2019.599%2013Z%22%20fill%3D%22url%28%23paint3_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M12.3187%2013.443C12.5913%2013.443%2012.8123%2013.6593%2012.8123%2013.9262C12.8123%2014.1931%2012.5913%2014.4094%2012.3187%2014.4094C12.0461%2014.4094%2011.8252%2014.1931%2011.8252%2013.9262C11.8252%2013.6593%2012.0461%2013.443%2012.3187%2013.443ZM19.599%2013.443C19.8715%2013.443%2020.0925%2013.6593%2020.0925%2013.9262C20.0925%2014.1931%2019.8715%2014.4094%2019.599%2014.4094C19.3264%2014.4094%2019.1054%2014.1931%2019.1054%2013.9262C19.1054%2013.6593%2019.3264%2013.443%2019.599%2013.443Z%22%20fill%3D%22url%28%23paint4_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M8.8226%2015.1745C8.3683%2015.1745%208%2015.5351%208%2015.9799C8%2016.4247%208.3683%2016.7853%208.8226%2016.7853C9.27695%2016.7853%209.64525%2016.4247%209.64525%2015.9799C9.64525%2015.5351%209.27695%2015.1745%208.8226%2015.1745ZM23.1774%2015.1745C22.723%2015.1745%2022.3548%2015.5351%2022.3548%2015.9799C22.3548%2016.4247%2022.723%2016.7853%2023.1774%2016.7853C23.6317%2016.7853%2024%2016.4247%2024%2015.9799C24%2015.5351%2023.6317%2015.1745%2023.1774%2015.1745ZM16.0206%2015.2953C16.4067%2015.2953%2016.7198%2015.6018%2016.7198%2015.9799C16.7198%2016.358%2016.4067%2016.6645%2016.0206%2016.6645C15.6344%2016.6645%2015.3214%2016.358%2015.3214%2015.9799C15.3214%2015.6018%2015.6344%2015.2953%2016.0206%2015.2953Z%22%20fill%3D%22url%28%23paint5_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M8.82261%2015.6174C9.02706%2015.6174%209.19281%2015.7797%209.19281%2015.9798C9.19281%2016.18%209.02706%2016.3423%208.82261%2016.3423C8.61817%2016.3423%208.45245%2016.18%208.45245%2015.9798C8.45245%2015.7797%208.61817%2015.6174%208.82261%2015.6174V15.6174ZM23.1774%2015.6174C23.3818%2015.6174%2023.5476%2015.7797%2023.5476%2015.9798C23.5476%2016.18%2023.3818%2016.3423%2023.1774%2016.3423C22.973%2016.3423%2022.8072%2016.18%2022.8072%2015.9798C22.8072%2015.7797%2022.973%2015.6174%2023.1774%2015.6174ZM12.4422%2017.0671C11.9197%2017.0671%2011.4961%2017.4818%2011.4961%2017.9933C11.4961%2018.5048%2011.9197%2018.9194%2012.4422%2018.9194C12.9646%2018.9194%2013.3882%2018.5048%2013.3882%2017.9933C13.3882%2017.4818%2012.9646%2017.0671%2012.4422%2017.0671V17.0671ZM19.599%2017.0671C19.0765%2017.0671%2018.653%2017.4818%2018.653%2017.9933C18.653%2018.5048%2019.0765%2018.9194%2019.599%2018.9194C20.1214%2018.9194%2020.545%2018.5048%2020.545%2017.9933C20.545%2017.4818%2020.1214%2017.0671%2019.599%2017.0671V17.0671Z%22%20fill%3D%22url%28%23paint6_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M12.4422%2017.5101C12.7148%2017.5101%2012.9357%2017.7264%2012.9357%2017.9933C12.9357%2018.2602%2012.7148%2018.4765%2012.4422%2018.4765C12.1696%2018.4765%2011.9486%2018.2602%2011.9486%2017.9933C11.9486%2017.7264%2012.1696%2017.5101%2012.4422%2017.5101V17.5101ZM19.599%2017.5101C19.8716%2017.5101%2020.0925%2017.7264%2020.0925%2017.9933C20.0925%2018.2602%2019.8716%2018.4765%2019.599%2018.4765C19.3264%2018.4765%2019.1054%2018.2602%2019.1054%2017.9933C19.1054%2017.7264%2019.3264%2017.5101%2019.599%2017.5101V17.5101ZM15.9794%2019.0805C15.457%2019.0805%2015.0334%2019.4952%2015.0334%2020.0067C15.0334%2020.5182%2015.457%2020.9329%2015.9794%2020.9329C16.5019%2020.9329%2016.9255%2020.5182%2016.9255%2020.0067C16.9255%2019.4952%2016.5019%2019.0805%2015.9794%2019.0805ZM8.8226%2019.2416C8.3683%2019.2416%208%2019.6022%208%2020.047C8%2020.4918%208.3683%2020.8524%208.8226%2020.8524C9.27695%2020.8524%209.64525%2020.4918%209.64525%2020.047C9.64525%2019.6022%209.27695%2019.2416%208.8226%2019.2416ZM23.1774%2019.2416C22.723%2019.2416%2022.3548%2019.6022%2022.3548%2020.047C22.3548%2020.4918%2022.723%2020.8524%2023.1774%2020.8524C23.6317%2020.8524%2024%2020.4918%2024%2020.047C24%2019.6022%2023.6317%2019.2416%2023.1774%2019.2416Z%22%20fill%3D%22url%28%23paint7_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M15.9794%2019.5235C16.252%2019.5235%2016.473%2019.7398%2016.473%2020.0067C16.473%2020.2736%2016.252%2020.4899%2015.9794%2020.4899C15.7068%2020.4899%2015.4859%2020.2736%2015.4859%2020.0067C15.4859%2019.7398%2015.7068%2019.5235%2015.9794%2019.5235ZM8.82261%2019.6845C9.02706%2019.6845%209.19281%2019.8468%209.19281%2020.047C9.19281%2020.2471%209.02706%2020.4094%208.82261%2020.4094C8.61817%2020.4094%208.45245%2020.2471%208.45245%2020.047C8.45245%2019.8468%208.61817%2019.6845%208.82261%2019.6845V19.6845ZM23.1774%2019.6845C23.3818%2019.6845%2023.5476%2019.8468%2023.5476%2020.047C23.5476%2020.2471%2023.3818%2020.4094%2023.1774%2020.4094C22.973%2020.4094%2022.8072%2020.2471%2022.8072%2020.047C22.8072%2019.8468%2022.973%2019.6845%2023.1774%2019.6845ZM12.4422%2021.255C11.9879%2021.255%2011.6196%2021.6156%2011.6196%2022.0604C11.6196%2022.5052%2011.9878%2022.8658%2012.4422%2022.8658C12.8965%2022.8658%2013.2648%2022.5052%2013.2648%2022.0604C13.2648%2021.6156%2012.8965%2021.255%2012.4422%2021.255ZM19.599%2021.2953C19.1446%2021.2953%2018.7763%2021.6559%2018.7763%2022.1007C18.7763%2022.5455%2019.1446%2022.9061%2019.599%2022.9061C20.0533%2022.9061%2020.4216%2022.5455%2020.4216%2022.1007C20.4216%2021.6559%2020.0533%2021.2953%2019.599%2021.2953Z%22%20fill%3D%22url%28%23paint8_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M12.4422%2021.698C12.6466%2021.698%2012.8124%2021.8602%2012.8124%2022.0604C12.8124%2022.2606%2012.6466%2022.4228%2012.4422%2022.4228C12.2377%2022.4228%2012.072%2022.2606%2012.072%2022.0604C12.072%2021.8602%2012.2377%2021.698%2012.4422%2021.698ZM19.599%2021.7383C19.8035%2021.7383%2019.9692%2021.9005%2019.9692%2022.1007C19.9692%2022.3008%2019.8035%2022.4631%2019.599%2022.4631C19.3946%2022.4631%2019.2288%2022.3008%2019.2288%2022.1007C19.2288%2021.9005%2019.3946%2021.7383%2019.599%2021.7383ZM15.9795%2023.3893C15.5251%2023.3893%2015.1568%2023.7498%2015.1568%2024.1946C15.1568%2024.6394%2015.5251%2025%2015.9795%2025C16.4338%2025%2016.8021%2024.6394%2016.8021%2024.1946C16.8021%2023.7498%2016.4338%2023.3893%2015.9795%2023.3893V23.3893Z%22%20fill%3D%22url%28%23paint9_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M15.9794%2023.8322C16.1838%2023.8322%2016.3496%2023.9945%2016.3496%2024.1946C16.3496%2024.3948%2016.1838%2024.5571%2015.9794%2024.5571C15.775%2024.5571%2015.6092%2024.3948%2015.6092%2024.1946C15.6092%2023.9945%2015.775%2023.8322%2015.9794%2023.8322ZM19.2699%2013.7972L16.3496%2015.5288L16.5848%2015.9075L19.5051%2014.176L19.2699%2013.7972V13.7972ZM12.6761%2013.7576L12.4331%2014.1313L15.3945%2015.9837L15.6375%2015.6099L12.6761%2013.7576V13.7576ZM11.8843%2013.9551L9.16962%2015.6061L9.40873%2015.9824L12.1234%2014.3314L11.8843%2013.9551ZM22.9113%2015.8855L19.9909%2017.617L20.2262%2017.9958L23.1465%2016.2643L22.9113%2015.8855ZM15.5077%2016.0466L12.5874%2017.7781L12.8226%2018.1569L15.7429%2016.4254L15.5077%2016.0466V16.0466ZM16.5437%2015.9944L16.3007%2016.3681L19.2622%2018.2205L19.5051%2017.8467L16.5437%2015.9944V15.9944Z%22%20fill%3D%22url%28%23paint10_radial_419_48383%29%22%2F%3E%3Cpath%20d%3D%22M20.0758%2013.8205L19.8328%2014.1942L22.7943%2016.0466L23.0373%2015.6728L20.0758%2013.8205ZM9.16191%2015.9308L8.91895%2016.3045L11.8804%2018.1569L12.1234%2017.7832L9.16191%2015.9308V15.9308Z%22%20fill%3D%22url%28%23paint11_radial_419_48383%29%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CradialGradient%20id%3D%22paint0_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2815.9999%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint1_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint2_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint3_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint4_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2815.9999%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint5_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint6_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint7_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint8_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint9_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2816%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint10_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2815.9999%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22paint11_radial_419_48383%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate%2815.9999%2016.0001%29%20scale%287.99998%207.83228%29%22%3E%3Cstop%20stop-color%3D%22%23FF00FF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23734CE2%22%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",name:"Synapse"},{id:"swft",logoURI:"608a45433384d12e.png",name:"Swft"},{id:"hyphen",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2225%22%20viewBox%3D%220%200%2024%2025%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.2675%2016.7858V15.0715C10.2675%2014.5915%2010.6618%2014.2143%2011.1247%2014.2143H12.839C13.319%2014.2143%2013.6961%2014.5915%2013.6961%2015.0715V20.2143C13.6961%2020.6943%2013.319%2021.0715%2012.839%2021.0715H4.26755C3.78755%2021.0715%203.4104%2020.6943%203.4104%2020.2143V8.21433C3.4104%207.73433%203.03326%207.35719%202.55326%207.35719H2.05612C1.30183%207.35719%200.907546%206.43148%201.45612%205.90005L4.52469%202.81433C4.60378%202.73295%204.69838%202.66825%204.80291%202.62407C4.90745%202.57989%205.01978%202.55713%205.13326%202.55713C5.24674%202.55713%205.35908%202.57989%205.46361%202.62407C5.56814%202.66825%205.66275%202.73295%205.74183%202.81433L8.79326%205.90005C9.34183%206.43148%208.96469%207.35719%208.19326%207.35719H7.69612C7.21612%207.35719%206.83897%207.73433%206.83897%208.21433V16.7858C6.83897%2017.2658%207.21612%2017.6429%207.69612%2017.6429H9.4104C9.8904%2017.6429%2010.2675%2017.2658%2010.2675%2016.7858Z%22%20fill%3D%22%23615CCD%22%2F%3E%3Cpath%20d%3D%22M20.5533%2016.7858C20.5533%2017.2658%2020.9304%2017.6429%2021.4104%2017.6429H21.9247C22.679%2017.6429%2023.0561%2018.5686%2022.5247%2019.1001L19.4561%2022.1686C19.1133%2022.5115%2018.5818%2022.5115%2018.239%2022.1686L15.1704%2019.1001C14.6218%2018.5686%2014.999%2017.6429%2015.7704%2017.6429H16.2676C16.7476%2017.6429%2017.1247%2017.2658%2017.1247%2016.7858V8.21436C17.1247%207.73436%2016.7476%207.35721%2016.2676%207.35721H14.5533C14.0733%207.35721%2013.6961%207.73436%2013.6961%208.21436V9.92864C13.6961%2010.4086%2013.319%2010.7858%2012.839%2010.7858H11.1247C10.6447%2010.7858%2010.2676%2010.4086%2010.2676%209.92864V4.78578C10.2676%204.30578%2010.6447%203.92864%2011.1247%203.92864H19.6961C20.1761%203.92864%2020.5533%204.30578%2020.5533%204.78578V16.7858Z%22%20fill%3D%22%23615CCD%22%2F%3E%3C%2Fsvg%3E",name:"Hyphen"},{id:"lifi",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2225%22%20viewBox%3D%220%200%2024%2025%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Crect%20y%3D%220.5%22%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%227.5%22%20y%3D%226.5%22%20width%3D%228.72727%22%20height%3D%2212%22%20fill%3D%22url%28%23pattern0%29%22%2F%3E%3Cdefs%3E%3Cpattern%20id%3D%22pattern0%22%20patternContentUnits%3D%22objectBoundingBox%22%20width%3D%221%22%20height%3D%221%22%3E%3Cuse%20xlink%3Ahref%3D%22%23image0_1105_25179%22%20transform%3D%22translate%28-0.958333%20-0.393939%29%20scale%280.0208333%200.0151515%29%22%2F%3E%3C%2Fpattern%3E%3Cimage%20id%3D%22image0_1105_25179%22%20width%3D%22252%22%20height%3D%22124%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAPwAAAB8CAYAAABNG92%2FAAAMbGlDQ1BJQ0MgUHJvZmlsZQAASImVlwdcU0kTwPeVJCQkBAhEQEroTRDpRUoILYKAVMFGSAIJJcaEIGJHj1Pw7CKKFT0V8dDTE5BDRezlUOz9sKCinId6KIrKtymg533l901%2B%2B94%2Fs7Mzs%2FP2lQWA3seTSvNQXQDyJQWyhMhQ1vi0dBbpCSACBP7owIPHl0vZ8fExAMrg%2Be%2Fy9jq0hHLFRenrn%2F3%2FVfQFQjkfAGQi5EyBnJ8PuQUAfANfKisAgKjUW08vkCp5HmQDGUwQ8molZ6t5l5Iz1dyssklK4EC%2BBIAWlceTZQOgcxfqWYX8bOhH5yNkN4lALAGAPgJyEF%2FEE0BW5j4iP3%2BqkishO0B7KWSYD%2FDN%2FMpn9t%2F8Zw755%2FGyh1g9L5VohYnl0jzejP%2BzNP9b8vMUgzHsYKOKZFEJyvnDGt7MnRqtZCrkbklmbJyy1pD7xAJ13QFAKSJFVLLaHjXlyzmwfoAJ2U3AC4uGbAo5QpIXG6PRZ2aJI7iQ4WpBi8QF3CTIRpAXCeXhiRqbLbKpCZpYaH2WjMPW6M%2FwZKq4ylj3FbnJbI3%2F1yIhV%2BMf0ykWJaVCpkC2KRSnxELWgewqz02M1tiMLhZxYgdtZIoEZf42kBOEkshQtX%2BsMEsWkaCxL8uXD84X2yISc2M1vL9AlBSlrg92gs9T5Q%2Fngl0SStjJg36E8vExg3MRCMPC1XPHngklyYkaP33SgtAE9VicIs2L19jjVsK8SKXeCrKnvDBRMxZPKYCLU%2B0fz5IWxCep88SLc3hj4tX54MtBDOCAMMACCtgywVSQA8Rt3Q3d8J%2B6JwLwgAxkAyFw0WgGR6SqeiTwmAiKwR%2BQhEA%2BNC5U1SsEhVD%2FaUirPrqALFVvoWpELngCOR9Egzz4X6EaJRmKlgIeQ434H9F5sPFhvnmwKfv%2FvX5Q%2B0XDhpoYjUYxGJFFH7QkhhPDiFHECKIjboIH4QF4DDyGwOaO%2B%2BJ%2Bg%2FP4Yk94QmgnPCRcI3QQbk0Rl8i%2ByXIs6ID%2BIzS1yPy6Frgd9OmFh%2BKB0Dv0jDNxE%2BCCe8I4bDwYRvaCWo4mb2VVWN%2F4%2FtsMvroaGjuyGxklDyOHkB2%2BHanjpOM15EVZ66%2Fro841c6jenKGeb%2BNzvqq%2BAJ6jv7XEFmEHsNPYMews1ow1ABZ2FGvELmCHlTy0uh6rVtdgtARVPrnQj%2Fgf8QavrLKScrdaty63j%2Bq%2BAmFRgfLG40yVzpCJs0UFLDZ8OwhZXAnfdQTL3c3dHQDlu0b9%2BHrDVL1DEOa5L7oSOgCj3w8MDDR%2F0cXYAvBLKbz9n3zROVTDx8R8AM6U8xWyQrUOVx4I8ClBh3eaMTAH1sABzscdeIMAEALCwRgQB5JAGpgMsxfBdS4D08EsMB%2BUgnKwHKwB68FmsA3sAj%2BB%2FaABNINj4BQ4Dy6Ba%2BAOXD2d4AXoAW9BP4IgJISGMBBjxAKxRZwRd8QXCULCkRgkAUlDMpBsRIIokFnIAqQcWYmsR7YiNcjPyCHkGHIWaUduIQ%2BQLuQ18gHFUCpqgJqhduhI1Bdlo9FoEjoJzUanocXoQnQpWolWo3vQevQYeh69hnagL9BeDGDaGBOzxFwwX4yDxWHpWBYmw%2BZgZVgFVo3VYU3wOl%2FBOrBu7D1OxBk4C3eBKzgKT8b5%2BDR8Dr4EX4%2FvwuvxE%2FgV%2FAHeg38m0AimBGeCP4FLGE%2FIJkwnlBIqCDsIBwkn4b3USXhLJBKZRHuiD7wX04g5xJnEJcSNxL3EFmI78RGxl0QiGZOcSYGkOBKPVEAqJa0j7SEdJV0mdZL6tLS1LLTctSK00rUkWiVaFVq7tY5oXdZ6qtVP1iXbkv3JcWQBeQZ5GXk7uYl8kdxJ7qfoUewpgZQkSg5lPqWSUkc5SblLeaOtrW2l7ac9TlusPU%2B7Unuf9hntB9rvqfpUJyqHOpGqoC6l7qS2UG9R39BoNDtaCC2dVkBbSquhHafdp%2FXpMHRcdbg6Ap25OlU69TqXdV7SyXRbOps%2BmV5Mr6AfoF%2Bkd%2BuSde10Obo83Tm6VbqHdG%2Fo9uox9Ebpxenl6y3R2613Vu%2BZPknfTj9cX6C%2FUH%2Bb%2FnH9RwyMYc3gMPiMBYztjJOMTgOigb0B1yDHoNzgJ4M2gx5DfUNPwxTDIsMqw8OGHUyMacfkMvOYy5j7mdeZH4aZDWMPEw5bPKxu2OVh74yGG4UYCY3KjPYaXTP6YMwyDjfONV5h3GB8zwQ3cTIZZzLdZJPJSZPu4QbDA4bzh5cN3z%2F8tilq6mSaYDrTdJvpBdNeM3OzSDOp2Tqz42bd5kzzEPMc89XmR8y7LBgWQRZii9UWRy2eswxZbFYeq5J1gtVjaWoZZamw3GrZZtlvZW%2BVbFVitdfqnjXF2tc6y3q1dat1j42FzVibWTa1Nrdtyba%2BtiLbtbanbd%2FZ2dul2n1v12D3zN7InmtfbF9rf9eB5hDsMM2h2uGqI9HR1zHXcaPjJSfUyctJ5FTldNEZdfZ2FjtvdG4fQRjhN0IyonrEDReqC9ul0KXW5YEr0zXGtcS1wfXlSJuR6SNXjDw98rObl1ue23a3O6P0R40ZVTKqadRrdyd3vnuV%2B1UPmkeEx1yPRo9Xns6eQs9Nnje9GF5jvb73avX65O3jLfOu8%2B7ysfHJ8Nngc8PXwDfed4nvGT%2BCX6jfXL9mv%2Ff%2B3v4F%2Fvv9%2FwxwCcgN2B3wbLT9aOHo7aMfBVoF8gK3BnYEsYIygrYEdQRbBvOCq4MfhliHCEJ2hDxlO7Jz2HvYL0PdQmWhB0Pfcfw5szktYVhYZFhZWFu4fnhy%2BPrw%2BxFWEdkRtRE9kV6RMyNboghR0VErom5wzbh8bg23Z4zPmNljTkRToxOj10c%2FjHGKkcU0jUXHjhm7auzdWNtYSWxDHIjjxq2KuxdvHz8t%2FtdxxHHx46rGPUkYlTAr4XQiI3FK4u7Et0mhScuS7iQ7JCuSW1PoKRNTalLepYalrkztGD9y%2FOzx59NM0sRpjemk9JT0Hem9E8InrJnQOdFrYunE65PsJxVNOjvZZHLe5MNT6FN4Uw5kEDJSM3ZnfOTF8ap5vZnczA2ZPXwOfy3%2FhSBEsFrQJQwUrhQ%2BzQrMWpn1LDswe1V2lyhYVCHqFnPE68WvcqJyNue8y43L3Zk7kJeatzdfKz8j%2F5BEX5IrOTHVfGrR1Haps7RU2jHNf9qaaT2yaNkOOSKfJG8sMIAf9RcUDorvFA8KgwqrCvump0w%2FUKRXJCm6MMNpxuIZT4sjin%2Bcic%2Fkz2ydZTlr%2FqwHs9mzt85B5mTOaZ1rPXfh3M55kfN2zafMz53%2FW4lbycqSvxakLmhaaLZw3sJH30V%2BV1uqUyorvfF9wPebF%2BGLxIvaFnssXrf4c5mg7Fy5W3lF%2Bccl%2FCXnfhj1Q%2BUPA0uzlrYt8162aTlxuWT59RXBK3at1FtZvPLRqrGr6lezVpet%2FmvNlDVnKzwrNq%2BlrFWs7aiMqWxcZ7Nu%2BbqP60Xrr1WFVu3dYLph8YZ3GwUbL28K2VS32Wxz%2BeYPW8Rbbm6N3FpfbVddsY24rXDbk%2B0p20%2F%2F6PtjzQ6THeU7Pu2U7OzYlbDrRI1PTc1u093LatFaRW3Xnol7Lv0U9lNjnUvd1r3MveX7wD7Fvuc%2FZ%2Fx8fX%2F0%2FtYDvgfqfrH9ZcNBxsGyeqR%2BRn1Pg6ihozGtsf3QmEOtTQFNB391%2FXVns2Vz1WHDw8uOUI4sPDJwtPhob4u0pftY9rFHrVNa7xwff%2FzqiXEn2k5GnzxzKuLU8dPs00fPBJ5pPut%2F9tA533MN573P11%2FwunDwN6%2FfDrZ5t9Vf9LnYeMnvUlP76PYjl4MvH7sSduXUVe7V89dir7VfT75%2B88bEGx03BTef3cq79ep24e3%2BO%2FPuEu6W3dO9V3Hf9H71746%2F7%2B3w7jj8IOzBhYeJD%2B884j968Vj%2B%2BGPnwie0JxVPLZ7WPHN%2F1twV0XXp%2BYTnnS%2BkL%2Fq7S%2F%2FQ%2B2PDS4eXv%2FwZ8ueFnvE9na9krwZeL3lj%2FGbnX55%2FtfbG995%2Fm%2F%2B2%2F11Zn3Hfrve%2B709%2FSP3wtH%2F6R9LHyk%2BOn5o%2BR3%2B%2BO5A%2FMCDlyXiqTwEMNjQrC4DXOwGgpQHAgPs2ygT1XlAliHr%2FqiLwn1i9X1SJNwB18KT8jOe0ALAPNnvItHkAKD%2Fhk0IA6uEx1DQiz%2FJwV%2Fuiwp0QoW9g4I0ZAKQmAD7JBgb6Nw4MfNoOk70FQMs09R5UKUS4Z9jiqaTLzKJ54BtR70%2B%2FmuO3Z6DMQDX8b%2Bd%2FAU%2F6jzXPsPu0AAAAbGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA%2BARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAAqACAAQAAAABAAAA%2FKADAAQAAAABAAAAfAAAAABezPYPAAAACXBIWXMAABYlAAAWJQFJUiTwAAAH8UlEQVR4Ae2d0U3cQBRFTYT4hQ7gi19IBUkqIFQQ6AAaIKQCoAPSQVJBkg6ggkAH8IOEhJRwEZOMVsZrrz3GM%2FeMZO2ud3bsd967%2B7zjmdmlP4%2BlokAAAhYE3lhYiZEQgMATAQRPIEDAiACCN3I2pkIAwRMDEDAigOCNnI2pEEDwxAAEjAggeCNnYyoEEDwxAAEjAgjeyNmYCgEETwxAwIgAgjdyNqZCAMETAxAwIoDgjZyNqRBA8MQABIwIIHgjZ2MqBBA8MQABIwII3sjZmAoBBE8MQMCIAII3cjamQgDBEwMQMCKA4I2cjakQQPDEAASMCCB4I2djKgQQPDEAASMCCN7I2ZgKAQSfMAaurq6qr1%2B%2FVvv7%2B9Xbt2%2BrpaWl6vz8POERaRoCzQSW%2BKupZkBd3r24uKguLy%2Brnz9%2FPm0S%2FGzZ2Niofv%2F%2BPbub1xAYhQCC74FZAv%2F169c%2Fgd%2Fc3LRqjb%2Fza4WJSgkILCdos9gmY3FL7G0FXiwQDMuOAIJvcFkscF2mUyCQOwEE%2F%2BxBZetY4MrgFAiURsBW8OpQk8AlbGVvBF5aaGNPHQEbwQeBS9za6nrQ6wCxDwIlESha8LoH%2Fu3btyeB08FWUthiy6IEihW8BrhowAsFAhD4T6DYkXZra2v%2FreQZBCDwRKDogTca1XZ9fT05VzPwZnIusTmhYjO8PHh8fGzjSAyFQBsCRWd4AZhilifDtwlN6qQgUHSGF7C9vb0U3BZuc3V1deHP8kEI9CVQvOAPDg6qKYlsal9AfQOIz%2BdFoHjBq7deon%2FN8u7du%2Brz58%2FVjx8%2FqtPT06Snojn3L20acDR02dzcfPF4R0dHgxxOfTEv2TTE%2Frq%2BHo3haGp7EMNeoZFi78PHLCV4Ce329jbeneS5ribev39fbW9vPz3qOQUCUyFgIfiQ5b98%2BTI49yBwCVubhE6BwFQJWAhe8IfK8uvr60%2FCDgLXXQAKBHIhYCP4RbP81tbWv8wtkSPwXEKb86wjYCN4Gf%2Fx48dq3mV9EHjI4EMM0Q1z7TUF99OnT3xp1EUi%2B0YhYCX4OqLqQQ%2Fi1uMQJZ6KK5HHc%2B01qYdFLIeg%2FL8N3QHpU4bye59zGOuzNoKX6OLZc8q06rkfIoOr7Xgxjaa59k3vjeX00o5Td1utNBuHsqdYwQcR6t6ztng%2BvMTeZ334WNyzbQ%2FlGNqBQAoCRQheYo7Xg5cIm0rXjBCvdTev7abj8h4EXptA1oKX0HWZrlVtupSmnvbQwSZha4t%2Ff3c5BnUhMEUCWQte99a7ir3OCRK2hlJK3Ai8jhD7SiGQteAl0r5FXxi7u7t9m%2BHzEMiCQNaCH4Jw6sksQ5wjbTQT%2BPDhQ3OFhndPTk6shkPbC15j39UpR8mXgH6SLVriuzeLtpHT597kdLIpzvW1p86msIk2IfASAXvBq8de9%2BUpEHAgYC94ObnrfXmHwMDGMgkg%2BEe%2FKsvv7OyU6WGsgkBEwL7TLrDQb%2Fnv37%2BHl8kep7S%2BXjIjR264z%2BSZpkFYI5sxyuEQ%2FDNmzZjSzLnUPfaaoksZlgA%2FydrztLukb8qwqQMnzNBr7x5qQmBYAnYZvmnu89BZPsViGsO6n9bcCFgJXuvRzRtZpyy%2F6MiteDENDegZYq69W0Bib1oCWQteGVTTYptKLMKm7B7aUB1d9s9b0lp14qWo27QdjuH%2BeHd39yKC5eXlamVl5cX3eaMfgawFr0UsJLQgTmXwWIR6vkjRHxDMFglcxwrbom3Ptjvm68PDw15XHUONOxfLh4eHWtPv7%2B9r97NzGAJZC16i01hojaXW7RVtfYu%2BROLx1bo%2Fr8v8HAU%2By6Lv1N%2BYy2zbvM6DQNaCD4iVdfuUsGSVpsrqyyMU%2FWQYYr59aI9HCLw2gSIE3wWislTb5bC4Z96FLHVzIFC84MOS0bqcVfbuclkbZ%2FscnMk5QmAegeIEL0GHRSf1vM%2By0GpHnx%2Bib2CeI3gfAmMQyF7wQdzKxikysjrs%2BixpPYYTOQYE2hJY%2BvNY2laeWj1NeDk7O0t%2BWvqnGLJ8cswcYAQCWQu%2B7n55CmZ9%2F7gixTnRJgQWIYDgW1Ijy7cERbVJE3gz6bOb0MnptzwFArkTIMN38CBZvgMsqk6SABm%2Bg1vmzbTr0BRVIfAqBMjwHbBruquyPNNeO0Cj6qQIkOE7uEPDcsnyHYBRdXIEEHxHl6QY3NPxFKgOgYUJIPgO6DR7jgzfARhVJ0cg%2B6G1KYnGq%2BVoPjy%2F3VPSpu0xCCD4Z8olrGgzRsBwjLwJ2Apel%2BfK2mHJKsbK5x3InH07AjaCD5fnQeRcnrcLEGqVRSBrwesyPCxgGbslvjwPAo%2Ff5zkEXAlkPfBGPeZaiZXLc9fwxe6uBLIWfFdjqQ8BdwLch3ePAOy3IoDgrdyNse4EELx7BGC%2FFQEEb%2BVujHUngODdIwD7rQggeCt3Y6w7AQTvHgHYb0UAwVu5G2PdCSB49wjAfisCCN7K3RjrTgDBu0cA9lsRQPBW7sZYdwII3j0CsN%2BKAIK3cjfGuhNA8O4RgP1WBBC8lbsx1p0AgnePAOy3IoDgrdyNse4EELx7BGC%2FFQEEb%2BVujHUngODdIwD7rQggeCt3Y6w7AQTvHgHYb0UAwVu5G2PdCSB49wjAfisCCN7K3RjrTgDBu0cA9lsRQPBW7sZYdwII3j0CsN%2BKAIK3cjfGuhNA8O4RgP1WBBC8lbsx1p0AgnePAOy3IvAXd0VRjJTy4H0AAAAASUVORK5CYII%3D%22%2F%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",name:"LIFI"},{id:"nabox",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2225%22%20viewBox%3D%220%200%2024%2025%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M1.5%207.23999V18.418L4.73651%2020.2838V12.2876L7.96146%2014.1503V22.1412L11.199%2024.007V12.8279L1.5%207.23999Z%22%20fill%3D%22%232AC98B%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.85179%206.21724L12.0946%204.31675L16.1237%206.67449L12.883%208.56657L8.85179%206.21724ZM12.0988%200.5L2.32306%206.21934L12.8651%2012.4001V24.5L16.0627%2022.6374V10.3966L19.294%208.50455V20.7348L22.5389%2018.8248V6.60827L12.0988%200.5Z%22%20fill%3D%22%232AC98B%22%2F%3E%3C%2Fsvg%3E",name:"Nabox"},{id:"bungee",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2225%22%20viewBox%3D%220%200%2024%2025%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0_1106_26400%29%22%3E%3Cpath%20d%3D%22M24%204.5C24%202.29086%2022.2091%200.5%2020%200.5H4C1.79086%200.5%200%202.29086%200%204.5V20.5C0%2022.7091%201.79086%2024.5%204%2024.5H20C22.2091%2024.5%2024%2022.7091%2024%2020.5V4.5Z%22%20fill%3D%22%23FEA700%22%2F%3E%3Cpath%20d%3D%22M3.26157%2014.6479C4.44801%2014.6479%205.40958%2013.6862%205.40958%2012.4999C5.40958%2011.3137%204.44779%2010.3519%203.26157%2010.3519C2.07824%2010.3519%201.1189%2011.3088%201.11401%2012.491V12.509C1.1189%2013.691%202.07824%2014.6479%203.26157%2014.6479Z%22%20fill%3D%22%23ED1E7F%22%2F%3E%3Cpath%20d%3D%22M20.7367%2014.6477C21.923%2014.6477%2022.8847%2013.686%2022.8847%2012.4997C22.8847%2011.3134%2021.923%2010.3517%2020.7367%2010.3517C19.5504%2010.3517%2018.5887%2011.3134%2018.5887%2012.4997C18.5887%2013.686%2019.5504%2014.6477%2020.7367%2014.6477Z%22%20fill%3D%22%234CB85D%22%2F%3E%3Cpath%20d%3D%22M9.59911%2015.9941C10.2391%2015.9941%2010.8329%2015.7967%2011.3251%2015.4612V15.9438H12.672V12.9378C12.672%2012.9314%2012.6726%2012.9252%2012.6726%2012.9187V12.0794C12.6726%2011.1272%2013.4471%2010.3527%2014.3993%2010.3527C15.3535%2010.3527%2016.126%2011.1272%2016.126%2012.0794V15.9438H17.4747V12.0794C17.4747%2010.3825%2016.0982%209.00586%2014.3993%209.00586C13.7591%209.00586%2013.1646%209.20338%2012.6722%209.53919V9.05539H11.3253V12.9307C11.3189%2013.8792%2010.5475%2014.6454%209.5993%2014.6454C8.6453%2014.6454%207.87264%2013.873%207.87264%2012.9187V9.05607H6.52399V12.9187C6.52375%2014.6176%207.90019%2015.9941%209.59911%2015.9941Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_1106_26400%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%20transform%3D%22translate%280%200.5%29%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",name:"Bungee"},{id:"squid",logoURI:"b08d68f421a81726.png",name:"Squid"},{id:"across",logoURI:"data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%3Crect%20width%3D%2232%22%20height%3D%2232%22%20rx%3D%2216%22%20fill%3D%22%236CF9D8%22%3E%3C%2Frect%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20%20%20%20d%3D%22M6.95021%208.41988L8.50949%206.8606L14.7408%2013.0919C14.3626%2013.253%2014.0083%2013.4879%2013.6998%2013.7964C13.4609%2014.0353%2013.2662%2014.3017%2013.1157%2014.5853L6.95021%208.41988ZM12.9982%2017.4399L6.85803%2023.5801L8.41732%2025.1394L14.495%2019.0617C14.209%2018.9107%2013.9405%2018.7149%2013.6998%2018.4742C13.3932%2018.1675%2013.1593%2017.8156%2012.9982%2017.4399ZM17.5887%2019.0584L23.5826%2025.0522L25.1418%2023.493L19.0822%2017.4333C18.921%2017.8114%2018.6862%2018.1657%2018.3777%2018.4742C18.1388%2018.7131%2017.8724%2018.9079%2017.5887%2019.0584ZM18.9652%2014.5916L25.0497%208.50706L23.4904%206.94778L17.3434%2013.0947C17.7191%2013.2558%2018.071%2013.4897%2018.3777%2013.7964C18.6184%2014.037%2018.8142%2014.3055%2018.9652%2014.5916Z%22%20%20%20%20fill%3D%22%232D2E33%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",name:"Across"}];function Ry({routeTagList:t}){const r=Ir(),n={typography:"h6",borderRadius:4,px:8,py:4,ml:8};return We.exports.jsx(We.exports.Fragment,{children:t.map((t=>"no-approve"===t.type?We.exports.jsxs(_r,{sx:Object.assign(Object.assign({},n),{color:r.palette.text.primary,backgroundColor:r.palette.background.paperContrast,display:"flex",alignItems:"center"}),children:[We.exports.jsx(W,{style:{color:r.palette.text.primary,width:14,height:14}}),We.exports.jsx("span",{style:{marginLeft:4},children:We.exports.jsx(e,{id:"Unapproved"})})]},t.type):"best-price"===t.type?We.exports.jsx(_r,{sx:Object.assign(Object.assign({},n),{color:r.palette.success.main,backgroundColor:qr(r.palette.success.main,.1)}),children:We.exports.jsx(e,{id:"Best offer"})},t.type):null))})}function Ty(e,t){let r=de._("s");return t||(r=e>=2?de._("Seconds"):de._("Second")),r}function Sy(e,t){let r="";return r=e>=2?t?de._("Mins"):de._("Minutes"):t?de._("Min"):de._("Minute"),r}function Ny(e){return e>=2?de._("Hours"):de._("Hour")}function My({start:e,end:t,showSecondUnit:r}){if(!e||!t)return null;const n=t-e,o=1e3,i=6e4,s=36e5,a=24*s;let l="",c="";if(n<i){const e=n/o;l=`${Ks(e)} ${Ty(e,r)}`}else if(n<s){const e=n/i;l=`${Ks(e)} ${Sy(e,r)}`;const t=n%i/o;c=`${Ks(t)} ${Ty(t,r)}`}else if(n<a){const e=n/s;l=`${Ks(e)} ${Ny(e)}`;const t=n%s/i;c=`${Ks(t)} ${Sy(t)}`}else{const e=n/a;l=`${Ks(e)} ${function(e){return e>=2?de._("Days"):de._("Day")}(e)}`;const t=n%a/s;c=`${Ks(t)} ${Ny(t)}`}return r?`${l}${c}`.replaceAll(" ","").toLowerCase():l}function Fy({chainId:t,token:r,amount:n}){var o;const i=Ir(),s=x((()=>hg[t]),[t]);return We.exports.jsxs(_r,{sx:{display:"flex",flexDirection:"column"},children:[We.exports.jsxs(_r,{sx:{mb:8,display:"flex",alignItems:"flex-end",alignSelf:"center"},children:[We.exports.jsx(fg,{address:null!==(o=null==r?void 0:r.address)&&void 0!==o?o:"",marginRight:0,width:28,height:28,url:null==r?void 0:r.logoURI}),s?We.exports.jsx(_r,{component:s.logo,sx:{width:12,height:12,position:"relative",left:-6}}):""]}),We.exports.jsxs(_r,{sx:{color:i.palette.text.primary,typography:"body1",fontWeight:600,width:"100%",wordBreak:"break-word",textAlign:"center"},children:[Gs({input:n,decimals:null==r?void 0:r.decimals})," ",null==r?void 0:r.symbol]}),We.exports.jsxs(_r,{sx:{color:i.palette.text.secondary,typography:"h6",alignSelf:"center"},children:[We.exports.jsx(e,{id:"on"})," ",s.name]})]})}function Oy({children:e}){const t=Ir();return We.exports.jsxs(_r,{sx:{position:"relative",width:"calc(100% - 16px)",mx:"auto"},children:[We.exports.jsx(_r,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",borderTopColor:t.palette.text.primary,borderTopWidth:1,borderTopStyle:"dashed","&:before":{content:'""',position:"absolute",left:0,top:-.5,backgroundColor:t.palette.text.primary,width:6,height:6,borderRadius:"50%",transform:"translate(-50%, -50%)"},"&:after":{display:{tablet:"block"},content:'""',position:"absolute",right:-1,top:-.5,width:0,height:0,transform:"translate(0, -50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderLeft:`6px solid ${t.palette.text.primary}`}}}),We.exports.jsx(_r,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:e})]})}function Iy({size:e="medium",toolDetails:t,nameMarginLeft:r=4,logoMarginLeft:n=0,nameSx:o}){const i=Ir();if(!t||!t.logoURI||!t.name)return null;const{logoURI:s,name:a}=t;return We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(_r,{component:"img",src:s,alt:a,sx:{marginLeft:n,width:"large"===e?24:16,height:"large"===e?24:16}}),We.exports.jsx(_r,{sx:Object.assign({color:i.palette.text.primary,fontWeight:600,marginLeft:r,typography:{mobile:"small"===e?"h6":"medium"===e?"body2":"caption",tablet:"small"===e||"medium"===e?"body2":"caption"}},o),children:a})]})}function jy({fromToken:t,toToken:r,fromChainId:n,toChainId:o,fromAmount:i,fromTokenBalance:s,toTokenAmount:a,toolDetails:l,product:c,executionDuration:u,feeUSD:d,selected:p,setSelected:h,spenderContractAddress:f,isBestPrice:m}){const g=Ir(),{account:y}=$(),b=Cy.find((e=>e.id===c)),{getApprovalState:v}=Ay({account:y,chainId:n,contractAddress:f}),w=x((()=>t&&i&&s?v(t,i,s):wy.Loading),[t,i,s,v]),E=x((()=>{const e=[];return m&&e.push({type:"best-price"}),w===wy.Approving||w===wy.Insufficient?[...e,{type:"no-approve"}]:e}),[w,m]);return We.exports.jsxs(_r,{sx:Object.assign({borderRadius:16,py:16,px:12,backgroundColor:g.palette.background.tag,cursor:"pointer","&:hover":{backgroundColor:"hover.default"},outline:0},p?{borderWidth:1,borderStyle:"solid",borderColor:g.palette.primary.main}:{}),onClick:h,children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[We.exports.jsx(_r,{component:"img",src:null==b?void 0:b.logoURI,alt:null==b?void 0:b.name,sx:{width:16,height:16}}),We.exports.jsx(_r,{sx:{marginLeft:4},children:null==b?void 0:b.name}),We.exports.jsx(Ry,{routeTagList:E})]}),We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",mt:8,pb:8,borderStyle:"dashed",borderWidth:g.spacing(0,0,1,0),borderColor:g.palette.border.main},children:[We.exports.jsx(Gi,{onlyHover:!0,placement:"top",title:We.exports.jsx(e,{id:"Estimated transaction time"}),children:We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${g.palette.border.main}`,borderRadius:4,typography:"h6"},children:[We.exports.jsx(U,{style:{color:g.palette.text.secondary,width:14,height:14}}),We.exports.jsx(_r,{sx:{ml:4,lineHeight:1},children:null!==u?My({start:Date.now(),end:Date.now()+1e3*u}):"-"})]})}),We.exports.jsx(Gi,{onlyHover:!0,placement:"top",title:We.exports.jsx(e,{id:"Fee includes: Bridge fees + Swap fees. Gas fee not included."}),children:We.exports.jsxs(_r,{sx:{ml:8,display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${g.palette.border.main}`,borderRadius:4,typography:"h6"},children:[We.exports.jsx(L,{style:{color:g.palette.text.secondary,width:14,height:14}}),We.exports.jsx(_r,{sx:{ml:4,lineHeight:1},children:null!==d?`$${Gs({input:d,decimals:6})}`:"-"})]})})]}),We.exports.jsxs(_r,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",mt:8},children:[We.exports.jsx(Fy,{token:t,chainId:n,amount:i}),We.exports.jsx(Oy,{children:We.exports.jsx(_r,{sx:{display:"flex",px:3,py:3,backgroundColor:g.palette.background.paperContrast,border:`1px solid ${g.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:We.exports.jsx(Iy,{size:"medium",toolDetails:l,nameMarginLeft:8})})}),We.exports.jsx(Fy,{token:r,chainId:o,amount:a})]})]})}function Dy({open:t,onClose:r,selectedRouteId:n,setSelectRouteId:o,bridgeRouteList:i}){const s=Ir(),a=wf(),l=x((()=>{if(!(null==i?void 0:i.length))return null;const{fromToken:e}=i[0];return a(e)}),[i,a]);return We.exports.jsx(bg,{open:t,onClose:r,title:We.exports.jsx(e,{id:"Select Bridge"}),children:We.exports.jsx(_r,{sx:{position:"relative",display:"flex",flexDirection:"column",gap:12,py:20,px:16,flex:1,overflowY:"auto",overflowX:"hidden","&::before":{content:'""',position:"absolute",top:0,width:1,height:"1px",backgroundColor:s.palette.border.main}},children:null==i?void 0:i.map(((e,t)=>We.exports.jsx(jy,{fromChainId:e.fromChainId,toChainId:e.toChainId,fromToken:e.fromToken,toToken:e.toToken,fromAmount:e.fromAmount,fromTokenBalance:l,toTokenAmount:e.toTokenAmount,toolDetails:e.step.toolDetails,spenderContractAddress:e.spenderContractAddress,selected:n===e.id,setSelected:()=>{o(e.id),r()},isBestPrice:0===t,product:e.product,executionDuration:e.executionDuration,feeUSD:e.feeUSD},e.key)))})})}function _y({route:t,onClick:r}){var n,o;const i=Ir();if(!t)return null;const{product:s,executionDuration:a,feeUSD:l,fromAmount:c,fromToken:u,fromChainId:d,toTokenAmount:p,toToken:h,toChainId:f}=t,m=Cy.find((e=>e.id===s)),g=hg[d],y=hg[f];return We.exports.jsxs(_r,{sx:{px:16,py:8,width:"100%",backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:r,children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[We.exports.jsx(_r,{component:"img",src:null==m?void 0:m.logoURI,alt:null==m?void 0:m.name,sx:{width:16,height:16}}),We.exports.jsx(_r,{sx:{marginLeft:4,typography:"body2",fontWeight:600},children:null==m?void 0:m.name}),We.exports.jsx(_r,{sx:{display:"block",mx:8,width:"1px",height:12,backgroundColor:i.palette.border.main}}),We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",typography:"body2",fontWeight:600},children:[Gs({input:c,decimals:null==u?void 0:u.decimals}),We.exports.jsxs(_r,{sx:{ml:4,display:"flex",alignItems:"flex-end",alignSelf:"center",width:18,height:18},children:[We.exports.jsx(fg,{address:null!==(n=null==u?void 0:u.address)&&void 0!==n?n:"",marginRight:0,width:18,height:18,url:null==u?void 0:u.logoURI}),g?We.exports.jsx(_r,{component:g.logo,sx:{position:"relative",left:-6,width:10,height:10,flexShrink:0}}):""]})]})," = ",We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",typography:"body2",fontWeight:600},children:[Gs({input:p,decimals:null==h?void 0:h.decimals}),We.exports.jsxs(_r,{sx:{ml:4,display:"flex",alignItems:"flex-end",alignSelf:"center",width:18,height:18},children:[We.exports.jsx(fg,{address:null!==(o=null==h?void 0:h.address)&&void 0!==o?o:"",marginRight:0,width:18,height:18,url:null==h?void 0:h.logoURI}),y?We.exports.jsx(_r,{component:y.logo,sx:{width:10,height:10,position:"relative",left:-6,flexShrink:0}}):""]})]})]}),We.exports.jsx(_r,{component:V,sx:{width:18,height:18}})]}),We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",mt:8},children:[We.exports.jsx(Gi,{onlyHover:!0,placement:"top",title:We.exports.jsx(e,{id:"Estimated transaction time"}),children:We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${i.palette.border.main}`,borderRadius:4,typography:"h6"},children:[We.exports.jsx(U,{style:{color:i.palette.text.secondary,width:14,height:14}}),We.exports.jsx(_r,{sx:{ml:4,lineHeight:1},children:null!==a?My({start:Date.now(),end:Date.now()+1e3*a}):"-"})]})}),We.exports.jsx(Gi,{onlyHover:!0,placement:"top",title:We.exports.jsx(e,{id:"Fee includes: Bridge fees + Swap fees. Gas fee not included."}),children:We.exports.jsxs(_r,{sx:{ml:8,display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${i.palette.border.main}`,borderRadius:4,typography:"h6"},children:[We.exports.jsx(L,{style:{color:i.palette.text.secondary,width:14,height:14}}),We.exports.jsx(_r,{sx:{ml:4,lineHeight:1},children:null!==l?`$${Gs({input:l,decimals:6})}`:"-"})]})})]})]})}function By(){const{provider:e}=$(),[t,r]=h(),[o,i]=h(!1),[s,a]=h(""),{apikey:l}=X(Ef),c=m((({selectedRoute:t,fromEtherTokenBalance:o,goNext:s})=>Ka(this,void 0,void 0,(function*(){var c,u;if(!t||!e||!o)return;const{encodeParams:d}=t;if(d){a(""),i(!0);try{const{fromToken:h,fromAmount:f,product:m}=t,g={product:m,encodeParams:d},y=(yield he.post(`${$g}?apikey=${l}`,{data:g})).data.data,{data:b,to:x,value:v,from:w,chainId:E}=y;if(!(b&&x&&v&&w&&E))throw new Error("cross_chain_swap_transactionEncode is null");const A=za[E],k=(p=18,new n(v).div(new n(10).pow(p))),C=A&&h.address.toLowerCase()===A.address.toLowerCase(),R=k.minus(C?f:0);if(!k.isNaN()&&k.gt(0)&&o.lt(k))return a(de._("Insufficient cross-chain fees, need at least {0} {1}",{0:Gs({input:R,decimals:null!==(c=null==A?void 0:A.decimals)&&void 0!==c?c:18}),1:null!==(u=null==A?void 0:A.symbol)&&void 0!==u?u:"-"})),void i(!1);if(!(yield Fg({from:w,to:x,value:v,data:b},e)))throw new Error("failed to estimate gas");r({data:b,to:x,value:v,from:w,chainId:E}),s()}catch(e){console.error("[failed to construct transaction request]: ",e);const{message:t}=e;a(t)}var p;i(!1)}}))),[r,i,e]);return{apikey:l,sendRouteLoading:o,sendRouteError:s,setSendRouteError:a,bridgeOrderTxRequest:t,handleClickSend:c}}function Py({route:e,bridgeOrderTxRequest:t}){const{chainId:r,account:n}=$(),o=Lg(),{apikey:i}=X(Ef);return m((()=>{if(t&&e)try{const{fromToken:r,toToken:n,fromAmount:s,toTokenAmount:a,fromChainId:l,toChainId:c,toAddress:u,slippage:d,roundedRouteCostTime:p}=e,h=Gs({input:s,decimals:r.decimals}),f=Gs({input:a,decimals:n.decimals}),m=We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(fg,{token:r,sx:{width:16,height:16,mr:6},chainId:r.chainId}),`${h} ${null==r?void 0:r.symbol}`,We.exports.jsx(_r,{component:D,sx:{width:12,height:12,mx:16}}),We.exports.jsx(fg,{token:n,sx:{width:16,height:16,mr:6}}),`${f} ${null==n?void 0:n.symbol}`]}),g=(t,r)=>Ka(this,void 0,void 0,(function*(){const n=yield function({apikey:e,tx:t,route:r}){return Ka(this,void 0,void 0,(function*(){const{fromChainId:n,toChainId:o,fromAmount:i,fromToken:s,toToken:a,fromAddress:l,toAddress:c,slippage:u,product:d,step:p,sourceRoute:h,productParams:f}=r,{toAmount:m}=h,g={fromChainId:n,fromAmount:Qs(i,s.decimals).toString(),fromTokenAddress:s.address,toChainId:o,toAmount:m,toTokenAddress:a.address,fromAddress:l,toAddress:c,slippage:u,hash:t,product:d,extend:{lifiBridge:p.tool,route:h,productParams:f}},y=(yield he.post(`${ey}?apikey=${e}`,{data:g})).data.data;return null==y?void 0:y.id}))}({apikey:i,tx:t,route:e});r&&r(t,{orderId:n})})),y={fromChainId:l,toChainId:c,fromTokenAddress:r.address,toTokenAddress:n.address,fromTokenSymbol:r.symbol,toTokenSymbol:n.symbol,fromTokenAmount:s,toTokenAmount:a.toString(),slippage:d,sendAccount:u,roundedRouteCostTime:p};return o.execute(de._("Bridge"),Object.assign({opcode:Ig.TX},t),m,!1,void 0,Object.assign(Object.assign(Object.assign({},t),{fromToken:r,toToken:n,pay:h,receive:f}),y),void 0,g)}catch(e){console.error(e)}}),[n,r,e,t,i])}function Wy({chainId:e,address:t,children:r}){const n=Ir();return We.exports.jsxs(_r,{component:"a",href:Ja(`tx/${t}`,e),target:"_blank",rel:"noopener noreferrer",sx:{color:n.palette.text.secondary,"&:hover":{color:n.palette.text.primary},display:"flex",alignItems:"center",typography:"body2"},children:[r,We.exports.jsx(_r,{component:"svg",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",sx:{marginLeft:6,width:16,height:17},children:We.exports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33333 3.83333V13.1667H12.6667V8.5H14V13.1667C14 13.9 13.4 14.5 12.6667 14.5H3.33333C2.59333 14.5 2 13.9 2 13.1667V3.83333C2 3.1 2.59333 2.5 3.33333 2.5H8V3.83333H3.33333ZM9.33333 3.83333V2.5H14V7.16667H12.6667V4.77333L6.11333 11.3267L5.17333 10.3867L11.7267 3.83333H9.33333Z",fill:"currentColor"})})]})}function Uy({fromChainId:t,toChainId:r,fromTokenAmount:n,toTokenAmount:o,fromTokenDecimals:i,fromTokenSymbol:s,toTokenDecimals:a,toTokenSymbol:l,fromHash:c,toHash:u,toolDetails:d}){const p=Ir(),[h,f]=x((()=>[hg[t],hg[r]]),[t,r]);return We.exports.jsxs(_r,{sx:{borderLeft:`1px dashed ${p.palette.text.primary}`,opacity:u?1:.5,pb:24},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"flex-start",flexWrap:{mobile:"wrap",tablet:"nowrap"}},children:[We.exports.jsx(_r,{component:"img",src:d.logoURI,alt:d.name,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:{mobile:p.palette.background.paper,tablet:p.palette.background.paper},alignSelf:"flex-start"}}),We.exports.jsx(_r,{sx:{ml:8,typography:"body1"},children:d.name}),We.exports.jsxs(_r,{sx:{typography:"body2",marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"flex-end",width:{mobile:"100%",tablet:"auto"},mt:{mobile:8,tablet:0}},children:[Gs({input:n,decimals:i})," ",s,We.exports.jsx("span",{style:{marginLeft:4,color:p.palette.text.secondary},children:We.exports.jsx(e,{id:"On"})}),We.exports.jsx(_r,{component:null==h?void 0:h.logo,sx:{marginLeft:4,width:18,height:18}}),We.exports.jsx("span",{style:{marginLeft:4,marginRight:4,color:p.palette.text.secondary},children:We.exports.jsx(e,{id:"To"})}),Gs({input:o,decimals:a})," ",l,We.exports.jsx("span",{style:{marginLeft:4,color:p.palette.text.secondary},children:We.exports.jsx(e,{id:"On"})}),We.exports.jsx(_r,{component:null==f?void 0:f.logo,sx:{marginLeft:4,width:18,height:18}})]})]}),We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",mt:{mobile:8,tablet:5}},children:[We.exports.jsx(Wy,{chainId:t,address:c,children:We.exports.jsx(e,{id:"Source"})}),We.exports.jsx(_r,{sx:{width:16}}),We.exports.jsx(Wy,{chainId:r,address:u,children:We.exports.jsx(e,{id:"Destination"})})]})]})}function Ly({chainId:t,fromTokenAmount:r,toTokenAmount:n,fromTokenDecimals:o,fromTokenSymbol:i,toTokenDecimals:s,toTokenSymbol:a,hash:l,toolDetails:c}){const u=Ir(),d=x((()=>hg[t]),[t]);return We.exports.jsxs(_r,{sx:{borderLeft:`1px dashed ${u.palette.text.primary}`,opacity:l?1:.5,pb:24},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"flex-start",flexWrap:{mobile:"wrap",tablet:"nowrap"}},children:[We.exports.jsx(_r,{component:"img",src:c.logoURI,alt:c.name,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:u.palette.background.paper,alignSelf:"flex-start"}}),We.exports.jsx(_r,{sx:{ml:8,typography:"body1"},children:c.name}),We.exports.jsxs(_r,{sx:{typography:"body2",marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"flex-end",width:{mobile:"100%",tablet:"auto"},mt:{mobile:8,tablet:0}},children:[Gs({input:r,decimals:o})," ",i,We.exports.jsx("span",{style:{marginLeft:4,marginRight:4,color:u.palette.text.secondary},children:We.exports.jsx(e,{id:"For"})}),Gs({input:n,decimals:s})," ",a,We.exports.jsxs(_r,{sx:{alignItems:"center",display:{mobile:"none",tablet:"flex"}},children:[We.exports.jsx("span",{style:{marginLeft:4,color:u.palette.text.secondary},children:We.exports.jsx(e,{id:"on"})}),We.exports.jsx(_r,{component:null==d?void 0:d.logo,sx:{marginLeft:4,width:18,height:18}}),We.exports.jsx(_r,{component:"span",sx:{ml:4},children:d.name})]})]})]}),We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",typography:"body2",mt:{mobile:8,tablet:5}},children:[We.exports.jsxs(_r,{sx:{alignItems:"center",display:{mobile:"flex",tablet:"none"}},children:[We.exports.jsx("span",{style:{color:u.palette.text.secondary},children:We.exports.jsx(e,{id:"on"})}),We.exports.jsx(_r,{component:null==d?void 0:d.logo,sx:{marginLeft:4,width:18,height:18}}),We.exports.jsx(_r,{component:"span",sx:{ml:4,mr:8},children:d.name})]}),We.exports.jsx(Wy,{chainId:t,address:l,children:We.exports.jsx(e,{id:"Tx"})})]})]})}function Vy({marginTop:e=20,route:t}){const r=Ir(),{fromChainId:n,toChainId:o}=t,{step:{includedSteps:i}}=t,[s,a]=x((()=>[hg[n],hg[o]]),[n,o]);return We.exports.jsxs(_r,{sx:{mt:e,pl:10},children:[We.exports.jsx(_r,{sx:{borderLeft:`1px dashed ${r.palette.text.primary}`,opacity:1,pb:24},children:We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"flex-start"},children:[We.exports.jsx(_r,{component:null==s?void 0:s.logo,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:r.palette.background.paper}}),We.exports.jsx(_r,{sx:{ml:8,typography:"body1"},children:s.name})]})}),i.map(((e,t)=>{const{toolDetails:r,type:n,estimate:o}=e;return"swap"===n?We.exports.jsx(Ly,{chainId:o.fromToken.chainId,fromTokenAmount:o.fromTokenAmount,toTokenAmount:o.toTokenAmount,fromTokenDecimals:o.fromToken.decimals,fromTokenSymbol:o.fromToken.symbol,toTokenDecimals:o.toToken.decimals,toTokenSymbol:o.toToken.symbol,hash:null,toolDetails:r},t):"cross"===n?We.exports.jsx(Uy,{fromChainId:o.fromToken.chainId,toChainId:o.toToken.chainId,fromTokenAmount:o.fromTokenAmount,toTokenAmount:o.toTokenAmount,fromTokenDecimals:o.fromToken.decimals,fromTokenSymbol:o.fromToken.symbol,toTokenDecimals:o.toToken.decimals,toTokenSymbol:o.toToken.symbol,fromHash:null,toHash:null,toolDetails:r},t):null})),We.exports.jsx(_r,{sx:{opacity:.5,pb:0},children:We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"flex-start"},children:[We.exports.jsx(_r,{component:null==a?void 0:a.logo,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:r.palette.background.paper}}),We.exports.jsx(_r,{sx:{ml:8,typography:"body1"},children:a.name})]})})]})}function Zy({route:t}){const r=Ir(),n=hg[t.fromChainId],o=x((()=>Ja(`address/${t.fromAddress}`,t.fromChainId)),[t.fromAddress,t.fromChainId]);return We.exports.jsxs(_r,{children:[We.exports.jsx(_r,{sx:{py:12,borderStyle:"solid",borderWidth:r.spacing(1,0,0),borderColor:r.palette.border.main},children:We.exports.jsx(js,{children:We.exports.jsx(zs,{initialEntered:!0,sx:{"& button.active svg":{transform:"rotate(0)"}},header:We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(_r,{component:_,sx:{mr:6,width:18,height:18}}),We.exports.jsx(e,{id:"Detail"})]}),We.exports.jsx(_r,{component:M,sx:{width:12,height:12,color:"text.secondary",transform:"rotate(180deg)",transition:"transform 0.2s linear"}})]}),children:We.exports.jsxs(_r,{sx:{mt:16},children:[We.exports.jsxs(_r,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsx(_r,{sx:{typography:"body2",color:"text.secondary",flexShrink:0},children:We.exports.jsx(e,{id:"Send to:"})}),We.exports.jsxs(_r,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:[n?We.exports.jsx(_r,{component:n.logo,sx:{width:18,height:18}}):"",We.exports.jsx(_r,{sx:{display:"inline-block",mx:6,width:"1px",height:12,backgroundColor:"border.main"}}),We.exports.jsx(_r,{sx:{typography:"body2",fontWeight:600},children:(i=t.fromAddress,i.length<=10?i:`${i.slice(0,6)}...${i.slice(i.length-4,i.length)}`)}),We.exports.jsx(yo,{component:"a",href:o,target:"_blank",rel:"noopener noreferrer",sx:{ml:6,width:18,height:18,color:"text.secondary"},children:We.exports.jsx(_r,{component:I,sx:{width:18,height:18}})})]})]}),t.feeUSD?We.exports.jsxs(_r,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsx(_r,{sx:{display:"flex",alignItems:"center",typography:"body2",color:"text.secondary",flexShrink:0},children:We.exports.jsx(e,{id:"Fee"})}),We.exports.jsxs(_r,{sx:{typography:"body2"},children:["$",Ys({input:t.feeUSD})]})]}):"",We.exports.jsxs(_r,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",typography:"body2",color:"text.secondary",flexShrink:0},children:[We.exports.jsx(e,{id:"Slippage"}),We.exports.jsx(py,{onlyHover:!0,title:We.exports.jsx(e,{id:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:6})]}),We.exports.jsxs(_r,{sx:{typography:"body2"},children:[100*t.slippage,"%"]})]})]})})})}),We.exports.jsx(_r,{sx:{py:12,borderStyle:"solid",borderWidth:r.spacing(1,0,0),borderColor:r.palette.border.main},children:We.exports.jsx(js,{children:We.exports.jsx(zs,{initialEntered:!0,sx:{"& button.active svg":{transform:"rotate(0)"}},header:We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2"},children:[We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(_r,{component:_,sx:{mr:6,width:18,height:18}}),We.exports.jsx(e,{id:"Estimated Time"})]}),We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[t.executionDuration?My({start:Date.now(),end:Date.now()+1e3*t.executionDuration}):"-",We.exports.jsx(_r,{component:M,sx:{ml:6,width:12,height:12,color:"text.secondary",transform:"rotate(180deg)",transition:"transform 0.2s linear"}})]})]}),children:We.exports.jsx(Vy,{route:t})})})})]});var i}function Hy({open:t,onClose:r,route:n,bridgeOrderTxRequest:o,clearToAmt:i,clearFromAmt:s}){const a=Ir(),{contractStatus:l}=X(Ef),c=J(),u=Py({route:n,bridgeOrderTxRequest:o});return y((()=>{l!==of.Pending&&r(),l===of.TxSuccess&&(i(),s())}),[l]),We.exports.jsx(bg,{title:We.exports.jsx(e,{id:"Bridge Summary"}),open:t,onClose:()=>{c(_g({contractStatus:of.Initial})),r()},children:We.exports.jsxs(We.exports.Fragment,{children:[n?We.exports.jsxs(_r,{sx:{px:16,pb:20,flex:1,overflowY:"auto"},children:[We.exports.jsxs(_r,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",py:20,borderStyle:"solid",borderWidth:a.spacing(1,0,0),borderColor:a.palette.border.main},children:[We.exports.jsx(Fy,{token:n.fromToken,chainId:n.fromChainId,amount:n.fromAmount}),We.exports.jsx(Oy,{children:We.exports.jsx(_r,{sx:{display:"flex",px:3,py:3,backgroundColor:a.palette.background.paperContrast,border:`1px solid ${a.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:We.exports.jsx(Iy,{size:"medium",toolDetails:n.step.toolDetails,nameMarginLeft:8})})}),We.exports.jsx(Fy,{token:n.toToken,chainId:n.toChainId,amount:n.toTokenAmount})]}),We.exports.jsx(Zy,{route:n})]}):"",We.exports.jsx(_r,{sx:{px:16,py:20},children:We.exports.jsx(no,{fullWidth:!0,isLoading:l==of.Pending,disabled:!n,onClick:()=>{u(),c(_g({contractStatus:of.Pending}))},children:l==of.Pending?We.exports.jsx(e,{id:"Confirming"}):We.exports.jsx(e,{id:"Confirm Bridge"})})})]})})}function zy({message:t,onClose:r}){return We.exports.jsx(bg,{open:!!t,onClose:r,children:We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsxs(_r,{sx:{flex:1,textAlign:"center"},children:[We.exports.jsx(_r,{component:F,sx:{mt:60,width:64,height:64,color:"error.main"}}),t?We.exports.jsxs(_r,{sx:{textAlign:"center",mt:60},children:[We.exports.jsx(_r,{children:We.exports.jsx(e,{id:"Something went wrong."})}),We.exports.jsx(_r,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:t})]}):""]}),We.exports.jsx(_r,{sx:{px:16,py:20},children:We.exports.jsx(no,{onClick:r,fullWidth:!0,children:We.exports.jsx(e,{id:"Dismiss"})})})]})})}function Yy(){var t,n,o;const i=Ir(),{isInflight:s}=Wg(),{chainId:a,account:c}=$(),u=J(),{isReverseRouting:d}=X(Ef),p=X(uf),g=X(xf),b=X(bf),{isETH:v}=x((()=>qa(a)),[a]),w=x((()=>{var e;return null===(e=za[null!=a?a:p])||void 0===e?void 0:e.address}),[a]),[E,A]=h(""),[k,C]=h(""),[R,T]=h(""),[S,N]=h(""),M=x((()=>l((e=>T(e)),1e3)),[]),F=x((()=>l((e=>N(e)),1e3)),[]),[O,I]=h(null),[j,_]=h(null),[P,W]=h(!1),[U,L]=h(!1),V=x((()=>!(!(null==O?void 0:O.chainId)||!(null==j?void 0:j.chainId)||O.chainId===j.chainId)),[O,j]),{toFiatPrice:z,fromFiatPrice:Y}=ry({chainId:a,toToken:j,fromToken:O}),G=wf(),q=x((()=>O?G(O):null),[O,G]),Q=x((()=>{const e=null==O?void 0:O.chainId;if(!V||!e)return null;const t=za[e];return t?G(Object.assign(Object.assign({},t),{chainId:e})):null}),[V,null==O?void 0:O.chainId,G]),{marginAmount:K}=function({token:e,fiatPrice:t}){return{marginAmount:x((()=>{var n;const o=null!==(n=null==e?void 0:e.decimals)&&void 0!==n?n:6,i=null!=t?new r(500).div(t):new r(0),s=Qs(i,o);return(s.lt(new r(1).times(new r(10).pow(o-3)))?new r(0):s).toString(10)}),[null==e?void 0:e.decimals,t])}}({token:d?j:O,fiatPrice:d?z:Y}),{resAmount:ee,priceImpact:te,executeSwap:re,baseFeeAmount:ne,additionalFeeAmount:oe,resPricePerToToken:ie,resPricePerFromToken:se,status:ae}=ay({toToken:j,fromToken:O,marginAmount:K,fromAmount:R,toAmount:S}),{bridgeRouteList:le,status:ue}=function({toToken:e,fromToken:t,fromAmount:n}){const{account:o,provider:i}=$(),s=X(ny)||.5,{apikey:a}=X(Ef),[l,c]=h(ky.Initial),[u,d]=h([]),p=m((()=>Ka(this,void 0,void 0,(function*(){var l;const u=null==t?void 0:t.chainId,p=null==e?void 0:e.chainId;if(!(u&&p&&u!==p&&t&&e&&n))return void c(ky.Initial);c(ky.Loading);const h=t.address,f=e.address,m=o||iy,g=o||iy,y=Number(s),b={fromAddress:m,fromAmount:ce(String(n||1),t.decimals).toString(),fromChainId:u,fromTokenAddress:h,toAddress:g,toChainId:p,toTokenAddress:f,options:{slippage:y},products:["lifi","hyphen","nabox","bungee","swft","stargate","connext","squid","across"]};try{const s=Date.now(),h=(yield he.post(`${Kg}?apikey=${a}`,{data:b})).data.data,f=[];if((null===(l=null==h?void 0:h.routes)||void 0===l?void 0:l.length)&&h.routes.forEach(((o,i)=>{if(o){const{toAmount:a,feeUSD:l,executionDuration:c,product:d,step:h,encodeParams:b,productParams:x}=o;if(h&&null!==a){const o=new r(a);if(!o.isNaN()&&o.gt(0)){const{tool:v,toolDetails:w,type:E,includedSteps:A,approvalAddress:k}=h;if(A&&A.length>0&&v&&w&&w.name&&w.logoURI&&E&&k){const h=[];if(A.forEach((e=>{e&&e.id&&e.type&&e.tool&&e.toolDetails&&e.toolDetails.name&&e.toolDetails.logoURI&&e.estimate&&e.estimate.fromAmount&&e.estimate.fromToken&&e.estimate.fromToken.decimals&&e.estimate.toAmount&&e.estimate.toToken&&e.estimate.toToken.decimals&&h.push({id:e.id,tool:e.tool,toolDetails:{name:e.toolDetails.name,logoURI:e.toolDetails.logoURI},type:e.type,estimate:{fromToken:e.estimate.fromToken,toToken:e.estimate.toToken,fromTokenAmount:new r(e.estimate.fromAmount).div(`1e${e.estimate.fromToken.decimals}`),toTokenAmount:new r(e.estimate.toAmount).div(`1e${e.estimate.toToken.decimals}`)}})})),h.length>0){const r={key:`${d}-${a}-${l}-${i}`,id:d,fromChainId:u,toChainId:p,fromToken:t,toToken:e,fromAmount:n,toTokenAmount:o.div(`1e${e.decimals}`),fromAddress:m,toAddress:g,product:d,slippage:y,roundedRouteCostTime:(Date.now()-s)/1e3,spenderContractAddress:null!=k?k:"0x",feeUSD:l,executionDuration:c,step:{tool:v,toolDetails:{name:w.name,logoURI:w.logoURI},type:E,includedSteps:h},encodeParams:b,productParams:x,sourceRoute:{toAmount:a,feeUSD:l,executionDuration:c,step:{tool:v,toolDetails:w,type:E,approvalAddress:k,includedSteps:A}}};f.push(r)}}}}}})),d(f),f.length?c(ky.Success):c(ky.Failed),!o||!i)return}catch(e){c(ky.Failed),console.error(e)}}))),[o,e,s,t,i,n,a]);return ty({refetch:p}),{status:l,refetch:p,bridgeRouteList:x((()=>n?u:[]),[l,n,u])}}({toToken:j,fromToken:O,fromAmount:R}),[de,pe]=h(!1),[fe,me]=h(""),ge=x((()=>!fe&&le.length?le[0].id:fe),[fe,le]),ye=x((()=>le.find((e=>e.id===ge))),[le,ge]);y((()=>{!ye&&fe&&me("")}),[ye]);const{sendRouteLoading:be,sendRouteError:xe,setSendRouteError:ve,bridgeOrderTxRequest:we,handleClickSend:Ee}=By(),[Ae,ke]=h(!1),Ce=function(e){const t=f(!1),[r,n]=h(!1),o=J();return y((()=>{if(!t.current)return void(t.current=!0);o(Jg((e?.5:3).toString())),n(!0);const r=setTimeout((()=>{n(!1)}),3e3);return()=>{clearTimeout(r)}}),[e]),r}(V),{getApprovalState:Re,submitApprove:Te,getPendingRest:Se,getMaxBalance:Ne}=Ay({account:c,chainId:null!==(t=null==O?void 0:O.chainId)&&void 0!==t?t:a,contractAddress:null==ye?void 0:ye.spenderContractAddress}),Me=x((()=>Se(d?j:O)),[null==O?void 0:O.address,null==j?void 0:j.address,Se,d]),Fe=m((e=>{const t=e.toString();A(t),M(t)}),[A,M]),Oe=m((e=>{const t=e.toString();C(t),F(t)}),[C,F]),Ie=X(mf),je=()=>{let e=null;O||b&&b.chainId===a||Ie.some((t=>!(t.chainId!==a||t.side&&"from"!==t.side)&&(e=t,I(t),!0))),j||g&&g.chainId===a||Ie.some((t=>!(t.chainId!==a||e&&e.address===t.address||t.side&&"to"!==t.side)&&(_(t),!0)))},De=f(a);y((()=>{void 0===De.current&&a&&(De.current=a,a&&(_(null),I(null),d?Oe(""):Fe("")),b&&b.chainId===a&&(I(b),b.amount&&(u(_g({isReverseRouting:!1})),Fe(b.amount))),g&&g.chainId===a&&(_(g),g.amount&&b&&!b.amount&&(u(_g({isReverseRouting:!0})),Oe(g.amount))),je())}),[g,b,a,Fe,Oe]),y((()=>{je()}),[Ie]);const _e=m((()=>{Fe(""),Oe(""),I(j),_(O),me("")}),[I,j,_,O,Fe,Oe,me]),Be=m((e=>d?Oe(Ne(j)):Fe(Ne(O))),[Fe,Oe,Ne,O,j,d]),Pe=x((()=>(100*Number(te)).toFixed(2)),[te]),Ue=x((()=>{const e=d?ee:R;return e&&Y?new r(Y).multipliedBy(e):null}),[Y,R,d,ee]),Le=x((()=>{var e;if(!z)return null;if(V)return(null===(e=null==ye?void 0:ye.toTokenAmount)||void 0===e?void 0:e.gt(0))?ye.toTokenAmount.multipliedBy(z):null;const t=d?S:ee;return t?new r(z).multipliedBy(t):null}),[z,S,d,ee,ye,V]),Ve=x((()=>We.exports.jsxs(_r,{sx:{display:"flex",fontWeight:600,typography:"body2",alignItems:"center",justifyContent:"center"},children:[We.exports.jsx(py,{title:We.exports.jsx(e,{id:"Due to the market condition, market price and estimated price may have a slight difference"}),mr:8}),We.exports.jsxs(_r,{sx:{display:"flex"},children:[We.exports.jsx(e,{id:"Current price impact"}),We.exports.jsxs(_r,{sx:{color:i.palette.error.main,ml:4},children:[Pe,"%"]})]})]})),[Pe]),Ze=x((()=>We.exports.jsx(yy,{toToken:j,fromToken:O,priceStatus:ae,pricePerToToken:ie,pricePerFromToken:se})),[j,O,ae,ie,se]),He=x((()=>!Va[a||1]),[a]),ze=x((()=>a&&!!(null==O?void 0:O.chainId)&&(null==O?void 0:O.chainId)!==a),[a,null==O?void 0:O.chainId]),Ye=x((()=>ze?We.exports.jsxs(_r,{sx:{textAlign:"center"},children:[We.exports.jsx(_r,{component:B,sx:{position:"relative",top:2,mr:6,width:16,height:16,color:"warning.main"}}),We.exports.jsx(e,{id:"The current network is inconsistent with the wallet - please switch in wallet"})]}):ae===sy.Loading||V&&ue===sy.Loading?We.exports.jsx(_r,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(xo,{sx:{mr:5}}),We.exports.jsx(e,{id:"Fetching best price..."})]})}):He?We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsx(_r,{component:B,sx:{mr:6,width:16,color:"warning.main"}}),We.exports.jsx(e,{id:"Unsupported network - switch to trade"})]}):!V&&E&&new r(Pe).gt(15)?Ve:V&&le.length?We.exports.jsx(_y,{route:ye,onClick:()=>pe(!0)}):Ze),[ae,Ze,E,Ve,Pe,He,V,ue,le,ye,ze]),Ge=x((()=>d?new r(k).gt(0)?Gs({input:ee,decimals:null==O?void 0:O.decimals}):"-":E),[E,k,ee,O,d]),Xe=x((()=>{var e;return d?k:V?(null===(e=null==ye?void 0:ye.toTokenAmount)||void 0===e?void 0:e.gt(0))&&ue!==sy.Loading?Gs({input:ye.toTokenAmount,decimals:null==j?void 0:j.decimals}):"-":new r(E).gt(0)?Gs({input:ee,decimals:null==j?void 0:j.decimals}):"-"}),[E,k,ee,j,d,ye,V,ue]),Je=x((()=>{const t=Re(O,d?ee||0:R),n=t===wy.Approving,o=t===wy.Insufficient&&!Me,i=v?.1:.02,a=w===(null==O?void 0:O.address),l=new r(q||0);if(!c)return We.exports.jsx(xy,{});if(s)return We.exports.jsx(no,{fullWidth:!0,isLoading:!0,disabled:!0,children:We.exports.jsx(e,{id:"Transaction Pending"})});if(!O||!j)return We.exports.jsx(no,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-select-token-btn",children:We.exports.jsx(e,{id:"Select Tokens"})});if(o)return We.exports.jsx(no,{fullWidth:!0,disabled:n,onClick:()=>Te(O),children:n?We.exports.jsx(e,{id:"Approving"}):We.exports.jsx(e,{id:"Approve"})});if(!new r(d?S:R).gt(0))return We.exports.jsx(no,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-enter-amount-btn",children:We.exports.jsx(e,{id:"Enter an amount"})});if((V?ue===sy.Loading:ae===sy.Loading)||t===wy.Loading)return We.exports.jsx(no,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-fetch-price-btn",children:We.exports.jsx(e,{id:"Fetching Price..."})});let u=!1;return u=V?!le.length||ue===sy.Failed:!ee||ae===sy.Failed,u?We.exports.jsx(no,{fullWidth:!0,disabled:!0,children:We.exports.jsx(e,{id:"Quote not available"})}):l.lt(d?null!=ee?ee:0:R)||a&&l.lte(i)?We.exports.jsx(no,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-insufficient-balance-btn",children:We.exports.jsx(e,{id:"Insufficient balance"})}):V?We.exports.jsx(no,{fullWidth:!0,onClick:()=>Ee({selectedRoute:ye,fromEtherTokenBalance:Q,goNext:()=>ke(!0)}),"data-testid":"swap-review-btn",isLoading:be,children:We.exports.jsx(e,{id:"Review Bridge"})}):We.exports.jsx(no,{fullWidth:!0,onClick:()=>W(!0),"data-testid":"swap-review-btn",children:We.exports.jsx(e,{id:"Review Swap"})})}),[v,c,S,R,j,ee,O,s,re,Me,Te,ae,q,Re,w,d,V,ue,le,be,Q]),qe=x((()=>O&&j?We.exports.jsxs(_r,{sx:{display:"flex",alignItems:"center"},children:[We.exports.jsx(fg,{token:O,sx:{width:16,height:16,mr:6},chainId:O.chainId}),`${Gs({input:d?ee:R,decimals:null==O?void 0:O.decimals})} ${null==O?void 0:O.symbol}`,We.exports.jsx(_r,{component:D,sx:{width:12,height:12,mx:16}}),We.exports.jsx(fg,{token:j,sx:{width:16,height:16,mr:6},chainId:j.chainId}),`${Gs({input:d?S:ee,decimals:null==j?void 0:j.decimals})} ${null==j?void 0:j.symbol}`]}):We.exports.jsx(_r,{})),[O,j,R,S,ee,d]);return We.exports.jsxs(We.exports.Fragment,{children:[We.exports.jsxs(_r,{sx:{display:"flex",justifyContent:"space-between",typography:"caption",margin:20},children:[We.exports.jsx(e,{id:"Swap"}),We.exports.jsx(Gi,{open:Ce,title:V?We.exports.jsx(e,{id:"The setting has been switched to bridge mode"}):We.exports.jsx(e,{id:"The setting has been switched to swap mode"}),placement:"bottom-end",children:We.exports.jsx(_r,{component:io,children:We.exports.jsx(_r,{component:Z,onClick:()=>L(!0),sx:{width:19,height:19,color:"text.primary",cursor:"pointer"}})})})]}),We.exports.jsxs(_r,{sx:{flex:1,padding:"0 20px 20px",overflowY:"auto"},children:[We.exports.jsxs(_r,{children:[We.exports.jsx(dy,{sx:{mb:4},token:O,side:"from",amt:Ge,defaultLoadBalance:!0,onlyCurrentChain:!0,onMaxClick:Be,onInputChange:Fe,onInputFocus:()=>{d&&Fe(""),u(_g({isReverseRouting:!1}))},showMaxBtn:!d&&!E,occupiedAddrs:[null!==(n=null==j?void 0:j.address)&&void 0!==n?n:""],fiatPriceTxt:Ue?`$${Ys({input:Ue,showDecimals:1})}`:"-",onTokenChange:(e,t)=>{if(t)return _e();Fe(""),Oe(""),I(e),me("")},readOnly:d,showChainLogo:!0}),We.exports.jsx(hy,{onClick:_e}),We.exports.jsx(dy,{token:j,side:"to",amt:Xe,onInputChange:Oe,onInputFocus:()=>{d||Oe(""),u(_g({isReverseRouting:!0}))},occupiedAddrs:[null!==(o=null==O?void 0:O.address)&&void 0!==o?o:""],fiatPriceTxt:Le?`$${Ys({input:Le,showDecimals:1})}(${Pe}%)`:"-",onTokenChange:(e,t)=>{if(t)return _e();Fe(""),Oe(""),_(e),me("")},readOnly:V||!d,showChainLogo:!0}),We.exports.jsx(_r,{sx:{py:12,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexWrap:"wrap"},children:Ye})]}),Je,We.exports.jsxs(_r,{sx:{mt:13,display:"flex",typography:"h6",cursor:"pointer",justifyContent:"center",alignItems:"center",color:i.palette.text.disabled},onClick:()=>window.open("https://app.dodoex.io"),children:[We.exports.jsx(_r,{sx:{width:24,typography:"body2",transform:"translate(1px, 2px)","& path":{fill:i.palette.text.disabled}},component:H}),We.exports.jsx(e,{id:"Powered by DODO protocol"})]})]}),We.exports.jsx(fy,{toToken:j,fromToken:O,fromAmount:d?ee:R,toAmount:d?S:ee,open:P,baseFeeAmount:ne,priceImpact:Pe,additionalFeeAmount:oe,curToFiatPrice:Le,execute:()=>re(qe),clearFromAmt:()=>Fe(""),clearToAmt:()=>Oe(""),curFromFiatPrice:Ue,pricePerFromToken:se,onClose:()=>W(!1)}),We.exports.jsx(gy,{open:U,onClose:()=>L(!1),isBridge:V}),We.exports.jsx(Dy,{open:de,onClose:()=>pe(!1),selectedRouteId:ge,setSelectRouteId:me,bridgeRouteList:le}),We.exports.jsx(Hy,{open:Ae,onClose:()=>ke(!1),route:ye,bridgeOrderTxRequest:we,clearFromAmt:()=>Fe(""),clearToAmt:()=>Oe("")}),We.exports.jsx(zy,{message:xe,onClose:()=>ve("")})]})}var Gy,Xy=G;if("production"===process.env.NODE_ENV)Gy=Xy.createRoot,Xy.hydrateRoot;else{var Jy=Xy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Gy=function(e,t){Jy.usingClientEntryPoint=!0;try{return Xy.createRoot(e,t)}finally{Jy.usingClientEntryPoint=!1}}}function qy(e){return We.exports.jsx(cy,{...e,children:We.exports.jsx(Yy,{})})}function Qy(e){const t=document.getElementById("dodo-swap-widget");Gy(t).render(We.exports.jsx(cy,{...e,children:We.exports.jsx(Yy,{})}))}export{Qy as InitSwapWidget,qy as SwapWidget};