@dcl/vesting-dashboard 3.5.2-14671134199.commit-a8bba8d → 3.6.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 (92) hide show
  1. package/assets/add-88487baf.js +15 -0
  2. package/assets/all-wallets-08b7990a.js +6 -0
  3. package/assets/app-store-3e1fa7e2.js +17 -0
  4. package/assets/apple-53795bdf.js +18 -0
  5. package/assets/arrow-bottom-7bb18b6e.js +8 -0
  6. package/assets/arrow-bottom-circle-91e1b83a.js +11 -0
  7. package/assets/arrow-left-34856cb6.js +8 -0
  8. package/assets/arrow-right-2f839bf5.js +8 -0
  9. package/assets/arrow-top-6eb1af03.js +8 -0
  10. package/assets/bank-a72514f9.js +14 -0
  11. package/assets/basic-2b462812.js +2128 -0
  12. package/assets/browser-36e4d8e0.js +14 -0
  13. package/assets/card-ae0c3d86.js +14 -0
  14. package/assets/checkmark-260688d2.js +11 -0
  15. package/assets/checkmark-bold-98c16a0e.js +8 -0
  16. package/assets/chevron-bottom-c356b3b6.js +8 -0
  17. package/assets/chevron-left-8cc6f138.js +8 -0
  18. package/assets/chevron-right-3d237749.js +8 -0
  19. package/assets/chevron-top-e7bd38cd.js +8 -0
  20. package/assets/chrome-store-91b44962.js +61 -0
  21. package/assets/clock-4ef29f75.js +8 -0
  22. package/assets/close-5eae79ec.js +8 -0
  23. package/assets/coinPlaceholder-0ff9f4ac.js +8 -0
  24. package/assets/compass-e6212ea8.js +8 -0
  25. package/assets/copy-5567fde3.js +15 -0
  26. package/assets/core-22337b12.js +910 -0
  27. package/assets/cursor-9367d57e.js +3 -0
  28. package/assets/cursor-transparent-a263c84d.js +12 -0
  29. package/assets/desktop-1ad14786.js +9 -0
  30. package/assets/disconnect-17eb72da.js +8 -0
  31. package/assets/discord-fd5b2cc8.js +17 -0
  32. package/assets/etherscan-723b0747.js +6 -0
  33. package/assets/exclamation-triangle-dd914d1e.js +4 -0
  34. package/assets/extension-27033058.js +8 -0
  35. package/assets/external-link-a79c2579.js +8 -0
  36. package/assets/facebook-8bb728e5.js +26 -0
  37. package/assets/farcaster-1fc087b8.js +12 -0
  38. package/assets/filters-8da8f13b.js +8 -0
  39. package/assets/{fortmatic-ace6f38a.js → fortmatic-1f08eb72.js} +1 -1
  40. package/assets/github-d13b602e.js +18 -0
  41. package/assets/google-19773a0b.js +18 -0
  42. package/assets/help-circle-5cf40796.js +12 -0
  43. package/assets/id-3ecde540.js +12 -0
  44. package/assets/image-032ffded.js +4 -0
  45. package/assets/{index-133cb7bf.js → index-095dd156.js} +1 -1
  46. package/assets/index-1c46ee85.js +394 -0
  47. package/assets/{index-aea9b88e.js → index-5b6da6fa.js} +1 -1
  48. package/assets/{index-ba83088b.css → index-5cda5db0.css} +7 -7
  49. package/assets/{index-0e9d1da0.js → index-64c7df79.js} +137 -137
  50. package/assets/{index-fb5ebb1f.js → index-a1c902b9.js} +1 -1
  51. package/assets/{index-9ed30a77.js → index-b7ec26b4.js} +1 -1
  52. package/assets/index.es-b772857d.js +26 -0
  53. package/assets/info-circle-4d9b4ae1.js +12 -0
  54. package/assets/info-fcc588e6.js +3 -0
  55. package/assets/lightbulb-d8f933f2.js +3 -0
  56. package/assets/mail-a81715bb.js +8 -0
  57. package/assets/mobile-dc149ffe.js +9 -0
  58. package/assets/more-d5ee7f6b.js +11 -0
  59. package/assets/network-placeholder-feac434d.js +14 -0
  60. package/assets/nftPlaceholder-044d55dc.js +8 -0
  61. package/assets/off-846e08e9.js +8 -0
  62. package/assets/play-store-7ed2ff02.js +32 -0
  63. package/assets/plus-ffeb5fae.js +13 -0
  64. package/assets/qr-code-c68eba82.js +6 -0
  65. package/assets/recycle-horizontal-a810739d.js +9 -0
  66. package/assets/refresh-5500f1b1.js +8 -0
  67. package/assets/reown-logo-8561c0cb.js +12 -0
  68. package/assets/search-30f20334.js +8 -0
  69. package/assets/secp256k1-4d114413.js +1 -0
  70. package/assets/secp256k1-726c671c.js +1 -0
  71. package/assets/send-3f36a15e.js +15 -0
  72. package/assets/swapHorizontal-d2f10b1b.js +8 -0
  73. package/assets/swapHorizontalBold-9400b7b7.js +8 -0
  74. package/assets/swapHorizontalMedium-f16ab582.js +16 -0
  75. package/assets/swapHorizontalRoundedBold-e2b32898.js +8 -0
  76. package/assets/swapVertical-9b617cf6.js +8 -0
  77. package/assets/telegram-e89b4f9e.js +16 -0
  78. package/assets/three-dots-31ebb7fb.js +5 -0
  79. package/assets/twitch-a760d77b.js +18 -0
  80. package/assets/twitterIcon-41d0cc80.js +6 -0
  81. package/assets/verify-abb0184b.js +8 -0
  82. package/assets/verify-filled-9e15e3d5.js +8 -0
  83. package/assets/w3m-modal-94dd92e8.js +642 -0
  84. package/assets/wallet-4969b511.js +8 -0
  85. package/assets/wallet-placeholder-e0c98987.js +14 -0
  86. package/assets/walletconnect-e274eb33.js +30 -0
  87. package/assets/warning-circle-5f26dde6.js +12 -0
  88. package/assets/x-aa0b95d6.js +12 -0
  89. package/index.html +4 -4
  90. package/package.json +3 -3
  91. package/assets/index.es-a7ed056e.js +0 -4850
  92. package/assets/secp256k1-1698c990.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as N,d as nn,B as $,s as Wu,g as sn,r as ur,f as gc,e as mc,p as _i,b as zu}from"./index-0e9d1da0.js";function qu(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ti={},or={},on={};Object.defineProperty(on,"__esModule",{value:!0});on.walletLogo=void 0;const Ju=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};on.walletLogo=Ju;var an={};Object.defineProperty(an,"__esModule",{value:!0});an.LINK_API_URL=void 0;an.LINK_API_URL="https://www.walletlink.org";var S={},dr={},qe={};Object.defineProperty(qe,"__esModule",{value:!0});qe.errorValues=qe.standardErrorCodes=void 0;qe.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};qe.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var cn={},ln={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=qe,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(h,f=r){if(h&&Number.isInteger(h)){const p=h.toString();if(d(t.errorValues,p))return t.errorValues[p].message;if(l(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return f}e.getMessageFromCode=n;function s(h){if(!Number.isInteger(h))return!1;const f=h.toString();return!!(t.errorValues[f]||l(h))}e.isValidCode=s;function i(h){var f;if(typeof h=="number")return h;if(o(h))return(f=h.code)!==null&&f!==void 0?f:h.errorCode}e.getErrorCode=i;function o(h){return typeof h=="object"&&h!==null&&(typeof h.code=="number"||typeof h.errorCode=="number")}function a(h,{shouldIncludeStack:f=!1}={}){const p={};if(h&&typeof h=="object"&&!Array.isArray(h)&&d(h,"code")&&s(h.code)){const y=h;p.code=y.code,y.message&&typeof y.message=="string"?(p.message=y.message,d(y,"data")&&(p.data=y.data)):(p.message=n(p.code),p.data={originalError:c(h)})}else p.code=t.standardErrorCodes.rpc.internal,p.message=u(h,"message")?h.message:r,p.data={originalError:c(h)};return f&&(p.stack=u(h,"stack")?h.stack:void 0),p}e.serialize=a;function l(h){return h>=-32099&&h<=-32e3}function c(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function d(h,f){return Object.prototype.hasOwnProperty.call(h,f)}function u(h,f){return typeof h=="object"&&h!==null&&f in h&&typeof h[f]=="string"}})(ln);Object.defineProperty(cn,"__esModule",{value:!0});cn.standardErrors=void 0;const ce=qe,_c=ln;cn.standardErrors={rpc:{parse:e=>ve(ce.standardErrorCodes.rpc.parse,e),invalidRequest:e=>ve(ce.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>ve(ce.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>ve(ce.standardErrorCodes.rpc.methodNotFound,e),internal:e=>ve(ce.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return ve(t,e)},invalidInput:e=>ve(ce.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>ve(ce.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>ve(ce.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>ve(ce.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>ve(ce.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>ve(ce.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>wt(ce.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>wt(ce.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>wt(ce.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>wt(ce.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>wt(ce.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>wt(ce.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new wc(t,r,n)}}};function ve(e,t){const[r,n]=bc(t);return new yc(e,r||(0,_c.getMessageFromCode)(e),n)}function wt(e,t){const[r,n]=bc(t);return new wc(e,r||(0,_c.getMessageFromCode)(e),n)}function bc(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let yc=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}},wc=class extends yc{constructor(t,r,n){if(!Gu(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function Gu(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var un={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.isErrorResponse=void 0;function Zu(e){return e.errorMessage!==void 0}Vt.isErrorResponse=Zu;var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LIB_VERSION=void 0;Wt.LIB_VERSION="3.9.3";Object.defineProperty(un,"__esModule",{value:!0});un.serializeError=void 0;const Qu=Vt,Ku=Wt,Xu=qe,Yu=ln;function ed(e,t){const r=(0,Yu.serialize)(td(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Ku.LIB_VERSION),n.searchParams.set("code",r.code.toString());const s=rd(r.data,t);return s&&n.searchParams.set("method",s),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}un.serializeError=ed;function td(e){return typeof e=="string"?{message:e,code:Xu.standardErrorCodes.rpc.internal}:(0,Qu.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function rd(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=qe;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=cn;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=un;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const s=ln;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return s.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}})})(dr);var se={};Object.defineProperty(se,"__esModule",{value:!0});se.ProviderType=se.RegExpString=se.IntNumber=se.BigIntString=se.AddressString=se.HexString=se.OpaqueType=void 0;function hr(){return e=>e}se.OpaqueType=hr;se.HexString=hr();se.AddressString=hr();se.BigIntString=hr();function nd(e){return Math.floor(e)}se.IntNumber=nd;se.RegExpString=hr();var Vo;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})(Vo||(se.ProviderType=Vo={}));var sd=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(S,"__esModule",{value:!0});S.isMobileWeb=S.getLocation=S.isInIFrame=S.createQrUrl=S.getFavicon=S.range=S.isBigNumber=S.ensureParsedJSONObject=S.ensureBN=S.ensureRegExpString=S.ensureIntNumber=S.ensureBuffer=S.ensureAddressString=S.ensureEvenLengthHexString=S.ensureHexString=S.isHexString=S.prepend0x=S.strip0x=S.has0xPrefix=S.hexStringFromIntNumber=S.intNumberFromHexString=S.bigIntStringFromBN=S.hexStringFromBuffer=S.hexStringToUint8Array=S.uint8ArrayToHex=S.randomBytesHex=void 0;const Ke=sd(nn),mt=dr,ke=se,vc=/^[0-9]*$/,Ec=/^[a-f0-9]*$/;function id(e){return Sc(crypto.getRandomValues(new Uint8Array(e)))}S.randomBytesHex=id;function Sc(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}S.uint8ArrayToHex=Sc;function od(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}S.hexStringToUint8Array=od;function ad(e,t=!1){const r=e.toString("hex");return(0,ke.HexString)(t?`0x${r}`:r)}S.hexStringFromBuffer=ad;function cd(e){return(0,ke.BigIntString)(e.toString(10))}S.bigIntStringFromBN=cd;function ld(e){return(0,ke.IntNumber)(new Ke.default(pr(e,!1),16).toNumber())}S.intNumberFromHexString=ld;function ud(e){return(0,ke.HexString)(`0x${new Ke.default(e).toString(16)}`)}S.hexStringFromIntNumber=ud;function Mi(e){return e.startsWith("0x")||e.startsWith("0X")}S.has0xPrefix=Mi;function dn(e){return Mi(e)?e.slice(2):e}S.strip0x=dn;function Cc(e){return Mi(e)?`0x${e.slice(2)}`:`0x${e}`}S.prepend0x=Cc;function fr(e){if(typeof e!="string")return!1;const t=dn(e).toLowerCase();return Ec.test(t)}S.isHexString=fr;function kc(e,t=!1){if(typeof e=="string"){const r=dn(e).toLowerCase();if(Ec.test(r))return(0,ke.HexString)(t?`0x${r}`:r)}throw mt.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}S.ensureHexString=kc;function pr(e,t=!1){let r=kc(e,!1);return r.length%2===1&&(r=(0,ke.HexString)(`0${r}`)),t?(0,ke.HexString)(`0x${r}`):r}S.ensureEvenLengthHexString=pr;function dd(e){if(typeof e=="string"){const t=dn(e).toLowerCase();if(fr(t)&&t.length===40)return(0,ke.AddressString)(Cc(t))}throw mt.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}S.ensureAddressString=dd;function hd(e){if($.isBuffer(e))return e;if(typeof e=="string"){if(fr(e)){const t=pr(e,!1);return $.from(t,"hex")}return $.from(e,"utf8")}throw mt.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}S.ensureBuffer=hd;function Rc(e){if(typeof e=="number"&&Number.isInteger(e))return(0,ke.IntNumber)(e);if(typeof e=="string"){if(vc.test(e))return(0,ke.IntNumber)(Number(e));if(fr(e))return(0,ke.IntNumber)(new Ke.default(pr(e,!1),16).toNumber())}throw mt.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}S.ensureIntNumber=Rc;function fd(e){if(e instanceof RegExp)return(0,ke.RegExpString)(e.toString());throw mt.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}S.ensureRegExpString=fd;function pd(e){if(e!==null&&(Ke.default.isBN(e)||Ic(e)))return new Ke.default(e.toString(10),10);if(typeof e=="number")return new Ke.default(Rc(e));if(typeof e=="string"){if(vc.test(e))return new Ke.default(e,10);if(fr(e))return new Ke.default(pr(e,!1),16)}throw mt.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}S.ensureBN=pd;function gd(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw mt.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}S.ensureParsedJSONObject=gd;function Ic(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}S.isBigNumber=Ic;function md(e,t){return Array.from({length:t-e},(r,n)=>e+n)}S.range=md;function _d(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}S.getFavicon=_d;function bd(e,t,r,n,s,i){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:e,secret:t,server:r,v:s,chainId:i.toString()}).toString();return`${r}/#/link?${a}`}S.createQrUrl=bd;function Ac(){try{return window.frameElement!==null}catch{return!1}}S.isInIFrame=Ac;function yd(){try{return Ac()&&window.top?window.top.location:window.location}catch{return window.location}}S.getLocation=yd;function wd(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window==null?void 0:window.navigator)===null||e===void 0?void 0:e.userAgent)}S.isMobileWeb=wd;var hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.ScopedLocalStorage=void 0;class vd{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const s=localStorage.key(n);typeof s=="string"&&s.startsWith(t)&&r.push(s)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}hn.ScopedLocalStorage=vd;var Ot={},Nc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function i(l,c,d,u,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new s(d,u||l,h),p=r?r+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,u;if(this._eventsCount===0)return c;for(u in d=this._events)t.call(d,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=r?r+c:c,u=this._events[d];if(!u)return[];if(u.fn)return[u.fn];for(var h=0,f=u.length,p=new Array(f);h<f;h++)p[h]=u[h].fn;return p},a.prototype.listenerCount=function(c){var d=r?r+c:c,u=this._events[d];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,d,u,h,f,p){var y=r?r+c:c;if(!this._events[y])return!1;var g=this._events[y],b=arguments.length,m,_;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,d),!0;case 3:return g.fn.call(g.context,d,u),!0;case 4:return g.fn.call(g.context,d,u,h),!0;case 5:return g.fn.call(g.context,d,u,h,f),!0;case 6:return g.fn.call(g.context,d,u,h,f,p),!0}for(_=1,m=new Array(b-1);_<b;_++)m[_-1]=arguments[_];g.fn.apply(g.context,m)}else{var L=g.length,v;for(_=0;_<L;_++)switch(g[_].once&&this.removeListener(c,g[_].fn,void 0,!0),b){case 1:g[_].fn.call(g[_].context);break;case 2:g[_].fn.call(g[_].context,d);break;case 3:g[_].fn.call(g[_].context,d,u);break;case 4:g[_].fn.call(g[_].context,d,u,h);break;default:if(!m)for(v=1,m=new Array(b-1);v<b;v++)m[v-1]=arguments[v];g[_].fn.apply(g[_].context,m)}}return!0},a.prototype.on=function(c,d,u){return i(this,c,d,u,!1)},a.prototype.once=function(c,d,u){return i(this,c,d,u,!0)},a.prototype.removeListener=function(c,d,u,h){var f=r?r+c:c;if(!this._events[f])return this;if(!d)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===d&&(!h||p.once)&&(!u||p.context===u)&&o(this,f);else{for(var y=0,g=[],b=p.length;y<b;y++)(p[y].fn!==d||h&&!p[y].once||u&&p[y].context!==u)&&g.push(p[y]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var d;return c?(d=r?r+c:c,this._events[d]&&o(this,d)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(Nc);var Ed=Nc.exports,gr={},mr={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.EVENTS=void 0;zt.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.RelayAbstract=Ce.APP_VERSION_KEY=Ce.LOCAL_STORAGE_ADDRESSES_KEY=Ce.WALLET_USER_NAME_KEY=void 0;const Wo=dr;Ce.WALLET_USER_NAME_KEY="walletUsername";Ce.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ce.APP_VERSION_KEY="AppVersion";class Sd{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw Wo.standardErrors.rpc.parse({});const s=n,{error:i}=s;if(i)throw(0,Wo.serializeError)(i,t.method);return s})}}Ce.RelayAbstract=Sd;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});qt.Session=void 0;const zo=Wu,qo=S,Jo="session:id",Go="session:secret",Zo="session:linked";class Pi{constructor(t,r,n,s){this._storage=t,this._id=r||(0,qo.randomBytesHex)(16),this._secret=n||(0,qo.randomBytesHex)(32),this._key=new zo.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(t){const r=t.getItem(Jo),n=t.getItem(Zo),s=t.getItem(Go);return r&&s?new Pi(t,r,s,n==="1"):null}static hash(t){return new zo.sha256().update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(Jo,this._id),this._storage.setItem(Go,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Zo,this._linked?"1":"0")}}qt.Session=Pi;var fn={},pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.Cipher=void 0;const Or=S;class Cd{constructor(t){this.secret=t}async encrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",(0,Or.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},s,i.encode(t)),a=16,l=o.slice(o.byteLength-a),c=o.slice(0,o.byteLength-a),d=new Uint8Array(l),u=new Uint8Array(c),h=new Uint8Array([...n,...d,...u]);return(0,Or.uint8ArrayToHex)(h)}async decrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,s)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,Or.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,Or.hexStringToUint8Array)(t),a=o.slice(0,12),l=o.slice(12,28),c=o.slice(28),d=new Uint8Array([...c,...l]),u={name:"AES-GCM",iv:new Uint8Array(a)};try{const h=await window.crypto.subtle.decrypt(u,i,d),f=new TextDecoder;n(f.decode(h))}catch(h){s(h)}})()})}}pn.Cipher=Cd;var gn={};Object.defineProperty(gn,"__esModule",{value:!0});gn.WalletLinkHTTP=void 0;class kd{constructor(t,r,n){this.linkAPIUrl=t,this.sessionId=r;const s=`${r}:${n}`;this.auth=`Basic ${btoa(s)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:s}=await r.json();if(s)throw new Error(`Check unseen events failed: ${s}`);const i=(t=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${r.status}`)}}gn.WalletLinkHTTP=kd;var $t={};Object.defineProperty($t,"__esModule",{value:!0});$t.WalletLinkWebSocket=$t.ConnectionState=void 0;var At;(function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"})(At||($t.ConnectionState=At={}));class Rd{setConnectionStateListener(t){this.connectionStateListener=t}setIncomingDataListener(t){this.incomingDataListener=t}constructor(t,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=t.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((t,r)=>{var n;let s;try{this.webSocket=s=new this.WebSocketClass(this.url)}catch(i){r(i);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,At.CONNECTING),s.onclose=i=>{var o;this.clearWebSocket(),r(new Error(`websocket error ${i.code}: ${i.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,At.DISCONNECTED)},s.onopen=i=>{var o;t(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,At.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},s.onmessage=i=>{var o,a;if(i.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(i.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,l)}catch{}}})}disconnect(){var t;const{webSocket:r}=this;if(r){this.clearWebSocket(),(t=this.connectionStateListener)===null||t===void 0||t.call(this,At.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(t){const{webSocket:r}=this;if(!r){this.pendingData.push(t),this.connect();return}r.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}$t.WalletLinkWebSocket=Rd;Object.defineProperty(fn,"__esModule",{value:!0});fn.WalletLinkConnection=void 0;const vt=se,Id=pn,Me=zt,Qo=Ce,Et=qt,Ad=gn,$r=$t,Ko=1e4,Nd=6e4;class Ld{constructor({session:t,linkAPIUrl:r,listener:n,diagnostic:s,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,vt.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",c=>a.JsonRpcUrl&&this.handleChainUpdated(c,a.JsonRpcUrl)]]).forEach((c,d)=>{const u=a[d];u!==void 0&&c(u)})},this.handleDestroyed=a=>{var l,c;a==="1"&&((l=this.listener)===null||l===void 0||l.resetAndReload(),(c=this.diagnostic)===null||c===void 0||c.log(Me.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:Et.Session.hash(this.session.id)}))},this.handleAccountUpdated=async a=>{var l,c;try{const d=await this.cipher.decrypt(a);(l=this.listener)===null||l===void 0||l.accountUpdated(d)}catch{(c=this.diagnostic)===null||c===void 0||c.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(a,l)=>{var c,d;try{const u=await this.cipher.decrypt(l);(c=this.listener)===null||c===void 0||c.metadataUpdated(a,u)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:a})}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated(Qo.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated(Qo.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,l)=>{var c,d;try{const u=await this.cipher.decrypt(a),h=await this.cipher.decrypt(l);(c=this.listener)===null||c===void 0||c.chainUpdated(u,h)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=t,this.cipher=new Id.Cipher(t.secret),this.diagnostic=s,this.listener=n;const o=new $r.WalletLinkWebSocket(`${r}/rpc`,i);o.setConnectionStateListener(async a=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(Me.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Et.Session.hash(t.id)});let c=!1;switch(a){case $r.ConnectionState.DISCONNECTED:if(!this.destroyed){const d=async()=>{await new Promise(u=>setTimeout(u,5e3)),this.destroyed||o.connect().catch(()=>{d()})};d()}break;case $r.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),c=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Ko),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case $r.ConnectionState.CONNECTING:break}this.connected!==c&&(this.connected=c)}),o.setIncomingDataListener(a=>{var l,c,d;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const u=a.type==="IsLinkedOK"?a.linked:void 0;(l=this.diagnostic)===null||l===void 0||l.log(Me.EVENTS.LINKED,{sessionIdHash:Et.Session.hash(t.id),linked:u,type:a.type,onlineGuests:a.onlineGuests}),this.linked=u||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(c=this.diagnostic)===null||c===void 0||c.log(Me.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Et.Session.hash(t.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((d=this.requestResolutions.get(a.id))===null||d===void 0||d(a))}),this.ws=o,this.http=new Ad.WalletLinkHTTP(r,t.id,t.key)}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");(t=this.diagnostic)===null||t===void 0||t.log(Me.EVENTS.STARTED_CONNECTING,{sessionIdHash:Et.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var t;this.destroyed=!0,this.ws.disconnect(),(t=this.diagnostic)===null||t===void 0||t.log(Me.EVENTS.DISCONNECTED,{sessionIdHash:Et.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(t){var r,n;this._connected=t,t&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(t)}setOnceConnected(t){return new Promise(r=>{this.connected?t().then(r):this.onceConnected=()=>{t().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(t){var r,n;this._linked=t,t&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(t)}setOnceLinked(t){return new Promise(r=>{this.linked?t().then(r):this.onceLinked=()=>{t().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(t){var r,n;if(!(t.type!=="Event"||t.event!=="Web3Response"))try{const s=await this.cipher.decrypt(t.data),i=JSON.parse(s);if(i.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(i)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(t=>setTimeout(t,250));try{await this.fetchUnseenEventsAPI()}catch(t){console.error("Unable to check for unseen events",t)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(t,r){const n={type:"SetSessionConfig",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[t]:r}};return this.setOnceConnected(async()=>{const s=await this.makeRequest(n);if(s.type==="Fail")throw new Error(s.error||"failed to set session metadata")})}async publishEvent(t,r,n=!1){const s=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:t,data:s,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(i);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Ko*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(t,r=Nd){const n=t.id;this.sendData(t);let s;return Promise.race([new Promise((i,o)=>{s=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},r)}),new Promise(i=>{this.requestResolutions.set(n,o=>{clearTimeout(s),i(o),this.requestResolutions.delete(n)})})])}async authenticate(){const t={type:"HostSession",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(t);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){const t={type:"IsLinked",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}sendGetSessionConfig(){const t={type:"GetSessionConfig",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}}fn.WalletLinkConnection=Ld;var _r={},br={},Oi={};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.default=(()=>'@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}')();var Td=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(br,"__esModule",{value:!0});br.injectCssReset=void 0;const Md=Td(Oi);function Pd(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(Md.default)),document.documentElement.appendChild(e)}br.injectCssReset=Pd;var mn={},yr,J,Lc,Tc,it,Xo,Mc,Pc,Oc,$i,bi,yi,$c,ar={},xc=[],Od=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,wr=Array.isArray;function je(e,t){for(var r in t)e[r]=t[r];return e}function xi(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function wi(e,t,r){var n,s,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?yr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]==null&&(o[i]=e.defaultProps[i]);return rr(e,o,n,s,null)}function rr(e,t,r,n,s){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Lc,__i:-1,__u:0};return s==null&&J.vnode!=null&&J.vnode(i),i}function $d(){return{current:null}}function vr(e){return e.children}function nr(e,t){this.props=e,this.context=t}function xt(e,t){if(t==null)return e.__?xt(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?xt(e):null}function Fc(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Fc(e)}}function vi(e){(!e.__d&&(e.__d=!0)&&it.push(e)&&!Qr.__r++||Xo!=J.debounceRendering)&&((Xo=J.debounceRendering)||Mc)(Qr)}function Qr(){for(var e,t,r,n,s,i,o,a=1;it.length;)it.length>a&&it.sort(Pc),e=it.shift(),a=it.length,e.__d&&(r=void 0,s=(n=(t=e).__v).__e,i=[],o=[],t.__P&&((r=je({},n)).__v=n.__v+1,J.vnode&&J.vnode(r),Fi(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[s]:null,i,s??xt(n),!!(32&n.__u),o),r.__v=n.__v,r.__.__k[r.__i]=r,Hc(i,r,o),r.__e!=s&&Fc(r)));Qr.__r=0}function jc(e,t,r,n,s,i,o,a,l,c,d){var u,h,f,p,y,g,b=n&&n.__k||xc,m=t.length;for(l=xd(r,t,b,l,m),u=0;u<m;u++)(f=r.__k[u])!=null&&(h=f.__i==-1?ar:b[f.__i]||ar,f.__i=u,g=Fi(e,f,h,s,i,o,a,l,c,d),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&ji(h.ref,null,f),d.push(f.ref,f.__c||p,f)),y==null&&p!=null&&(y=p),4&f.__u||h.__k===f.__k?l=Bc(f,l,e):typeof f.type=="function"&&g!==void 0?l=g:p&&(l=p.nextSibling),f.__u&=-7);return r.__e=y,l}function xd(e,t,r,n,s){var i,o,a,l,c,d=r.length,u=d,h=0;for(e.__k=new Array(s),i=0;i<s;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=i+h,(o=e.__k[i]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?rr(null,o,null,null,null):wr(o)?rr(vr,{children:o},null,null,null):o.constructor==null&&o.__b>0?rr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=Fd(o,r,l,u))!=-1&&(u--,(a=r[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(s>d?h--:s<d&&h++),typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,o.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)(a=r[i])!=null&&!(2&a.__u)&&(a.__e==n&&(n=xt(a)),Vc(a,a));return n}function Bc(e,t,r){var n,s;if(typeof e.type=="function"){for(n=e.__k,s=0;n&&s<n.length;s++)n[s]&&(n[s].__=e,t=Bc(n[s],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=xt(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Dc(e,t){return t=t||[],e==null||typeof e=="boolean"||(wr(e)?e.some(function(r){Dc(r,t)}):t.push(e)),t}function Fd(e,t,r,n){var s,i,o=e.key,a=e.type,l=t[r];if(l===null&&e.key==null||l&&o==l.key&&a==l.type&&!(2&l.__u))return r;if(n>(l!=null&&!(2&l.__u)?1:0))for(s=r-1,i=r+1;s>=0||i<t.length;){if(s>=0){if((l=t[s])&&!(2&l.__u)&&o==l.key&&a==l.type)return s;s--}if(i<t.length){if((l=t[i])&&!(2&l.__u)&&o==l.key&&a==l.type)return i;i++}}return-1}function Yo(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Od.test(t)?r:r+"px"}function xr(e,t,r,n,s){var i;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Yo(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Yo(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Oc,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=$i,e.addEventListener(t,i?yi:bi,i)):e.removeEventListener(t,i?yi:bi,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function ea(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=$i++;else if(t.t<r.u)return;return r(J.event?J.event(t):t)}}}function Fi(e,t,r,n,s,i,o,a,l,c){var d,u,h,f,p,y,g,b,m,_,L,v,R,U,Z,te,G,z=t.type;if(t.constructor!=null)return null;128&r.__u&&(l=!!(32&r.__u),i=[a=t.__e=r.__e]),(d=J.__b)&&d(t);e:if(typeof z=="function")try{if(b=t.props,m="prototype"in z&&z.prototype.render,_=(d=z.contextType)&&n[d.__c],L=d?_?_.props.value:d.__:n,r.__c?g=(u=t.__c=r.__c).__=u.__E:(m?t.__c=u=new z(b,L):(t.__c=u=new nr(b,L),u.constructor=z,u.render=Bd),_&&_.sub(u),u.props=b,u.state||(u.state={}),u.context=L,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),m&&u.__s==null&&(u.__s=u.state),m&&z.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=je({},u.__s)),je(u.__s,z.getDerivedStateFromProps(b,u.__s))),f=u.props,p=u.state,u.__v=t,h)m&&z.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),m&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(m&&z.getDerivedStateFromProps==null&&b!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(b,L),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(b,u.__s,L)===!1||t.__v==r.__v){for(t.__v!=r.__v&&(u.props=b,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(V){V&&(V.__=t)}),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(b,u.__s,L),m&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,y)})}if(u.context=L,u.props=b,u.__P=e,u.__e=!1,R=J.__r,U=0,m){for(u.state=u.__s,u.__d=!1,R&&R(t),d=u.render(u.props,u.state,u.context),Z=0;Z<u._sb.length;Z++)u.__h.push(u._sb[Z]);u._sb=[]}else do u.__d=!1,R&&R(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++U<25);u.state=u.__s,u.getChildContext!=null&&(n=je(je({},n),u.getChildContext())),m&&!h&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(f,p)),te=d,d!=null&&d.type===vr&&d.key==null&&(te=Uc(d.props.children)),a=jc(e,wr(te)?te:[te],t,r,n,s,i,o,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),g&&(u.__E=u.__=null)}catch(V){if(t.__v=null,l||i!=null)if(V.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(G=i.length;G--;)xi(i[G]);else t.__e=r.__e,t.__k=r.__k;J.__e(V,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=jd(r.__e,t,r,n,s,i,o,l,c);return(d=J.diffed)&&d(t),128&t.__u?void 0:a}function Hc(e,t,r){for(var n=0;n<r.length;n++)ji(r[n],r[++n],r[++n]);J.__c&&J.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){J.__e(i,s.__v)}})}function Uc(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:wr(e)?e.map(Uc):je({},e)}function jd(e,t,r,n,s,i,o,a,l){var c,d,u,h,f,p,y,g=r.props,b=t.props,m=t.type;if(m=="svg"?s="http://www.w3.org/2000/svg":m=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((f=i[c])&&"setAttribute"in f==!!m&&(m?f.localName==m:f.nodeType==3)){e=f,i[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(b);e=document.createElementNS(s,m,b.is&&b),a&&(J.__m&&J.__m(t,i),a=!1),i=null}if(m==null)g===b||a&&e.data==b||(e.data=b);else{if(i=i&&yr.call(e.childNodes),g=r.props||ar,!a&&i!=null)for(g={},c=0;c<e.attributes.length;c++)g[(f=e.attributes[c]).name]=f.value;for(c in g)if(f=g[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=f;else if(!(c in b)){if(c=="value"&&"defaultValue"in b||c=="checked"&&"defaultChecked"in b)continue;xr(e,c,null,f,s)}}for(c in b)f=b[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?d=f:c=="value"?p=f:c=="checked"?y=f:a&&typeof f!="function"||g[c]===f||xr(e,c,f,g[c],s);if(d)a||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),jc(t.type=="template"?e.content:e,wr(h)?h:[h],t,r,n,m=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:r.__k&&xt(r,0),a,l),i!=null)for(c=i.length;c--;)xi(i[c]);a||(c="value",m=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[c]||m=="progress"&&!p||m=="option"&&p!=g[c])&&xr(e,c,p,g[c],s),c="checked",y!=null&&y!=e[c]&&xr(e,c,y,g[c],s))}return e}function ji(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(s){J.__e(s,r)}}function Vc(e,t,r){var n,s;if(J.unmount&&J.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||ji(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){J.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(s=0;s<n.length;s++)n[s]&&Vc(n[s],t,r||typeof e.type!="function");r||xi(e.__e),e.__c=e.__=e.__e=void 0}function Bd(e,t,r){return this.constructor(e,r)}function Wc(e,t,r){var n,s,i,o;t==document&&(t=document.documentElement),J.__&&J.__(e,t),s=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Fi(t,e=(!n&&r||t).__k=wi(vr,null,[e]),s||ar,ar,t.namespaceURI,!n&&r?[r]:s?null:t.firstChild?yr.call(t.childNodes):null,i,!n&&r?r:s?s.__e:t.firstChild,n,o),Hc(i,e,o)}function zc(e,t){Wc(e,t,zc)}function Dd(e,t,r){var n,s,i,o,a=je({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?s=t[i]:a[i]=t[i]==null&&o!=null?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?yr.call(arguments,2):r),rr(e.type,a,n||e.key,s||e.ref,null)}function Hd(e){function t(r){var n,s;return this.getChildContext||(n=new Set,(s={})[t.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(o){o.__e=!0,vi(o)})},this.sub=function(i){n.add(i);var o=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),o&&o.call(i)}}),r.children}return t.__c="__cC"+$c++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}yr=xc.slice,J={__e:function(e,t,r,n){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Lc=0,Tc=function(e){return e!=null&&e.constructor==null},nr.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},r),this.props)),e&&je(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),vi(this))},nr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),vi(this))},nr.prototype.render=vr,it=[],Mc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pc=function(e,t){return e.__v.__b-t.__v.__b},Qr.__r=0,Oc=/(PointerCapture)$|Capture$/i,$i=0,bi=ea(!1),yi=ea(!0),$c=0;const Ud=Object.freeze(Object.defineProperty({__proto__:null,Component:nr,Fragment:vr,cloneElement:Dd,createContext:Hd,createElement:wi,createRef:$d,h:wi,hydrate:zc,get isValidElement(){return Tc},get options(){return J},render:Wc,toChildArray:Dc},Symbol.toStringTag,{value:"Module"})),me=sn(Ud);var _n={},Je,W,Gs,ta,Ft=0,qc=[],Y=J,ra=Y.__b,na=Y.__r,sa=Y.diffed,ia=Y.__c,oa=Y.unmount,aa=Y.__;function _t(e,t){Y.__h&&Y.__h(W,e,Ft||t),Ft=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Jc(e){return Ft=1,Gc(Qc,e)}function Gc(e,t,r){var n=_t(Je++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Qc(void 0,t),function(a){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,a);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=W,!W.__f)){var s=function(a,l,c){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!i||i.call(this,a,l,c);var u=n.__c.props!==a;return d.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),i&&i.call(this,a,l,c)||u};W.__f=!0;var i=W.shouldComponentUpdate,o=W.componentWillUpdate;W.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,s(a,l,c),i=d}o&&o.call(this,a,l,c)},W.shouldComponentUpdate=s}return n.__N||n.__}function Vd(e,t){var r=_t(Je++,3);!Y.__s&&Di(r.__H,t)&&(r.__=e,r.u=t,W.__H.__h.push(r))}function Zc(e,t){var r=_t(Je++,4);!Y.__s&&Di(r.__H,t)&&(r.__=e,r.u=t,W.__h.push(r))}function Wd(e){return Ft=5,Bi(function(){return{current:e}},[])}function zd(e,t,r){Ft=6,Zc(function(){if(typeof e=="function"){var n=e(t());return function(){e(null),n&&typeof n=="function"&&n()}}if(e)return e.current=t(),function(){return e.current=null}},r==null?r:r.concat(e))}function Bi(e,t){var r=_t(Je++,7);return Di(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function qd(e,t){return Ft=8,Bi(function(){return e},t)}function Jd(e){var t=W.context[e.__c],r=_t(Je++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(W)),t.props.value):e.__}function Gd(e,t){Y.useDebugValue&&Y.useDebugValue(t?t(e):e)}function Zd(e){var t=_t(Je++,10),r=Jc();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(n,s){t.__&&t.__(n,s),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Qd(){var e=_t(Je++,11);if(!e.__){for(var t=W.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Kd(){for(var e;e=qc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gr),e.__H.__h.forEach(Ei),e.__H.__h=[]}catch(t){e.__H.__h=[],Y.__e(t,e.__v)}}Y.__b=function(e){W=null,ra&&ra(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),aa&&aa(e,t)},Y.__r=function(e){na&&na(e),Je=0;var t=(W=e.__c).__H;t&&(Gs===W?(t.__h=[],W.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Gr),t.__h.forEach(Ei),t.__h=[],Je=0)),Gs=W},Y.diffed=function(e){sa&&sa(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(qc.push(t)!==1&&ta===Y.requestAnimationFrame||((ta=Y.requestAnimationFrame)||Xd)(Kd)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Gs=W=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Gr),r.__h=r.__h.filter(function(n){return!n.__||Ei(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Y.__e(n,r.__v)}}),ia&&ia(e,t)},Y.unmount=function(e){oa&&oa(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Gr(n)}catch(s){t=s}}),r.__H=void 0,t&&Y.__e(t,r.__v))};var ca=typeof requestAnimationFrame=="function";function Xd(e){var t,r=function(){clearTimeout(n),ca&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ca&&(t=requestAnimationFrame(r))}function Gr(e){var t=W,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),W=t}function Ei(e){var t=W;e.__c=e.__(),W=t}function Di(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Qc(e,t){return typeof t=="function"?t(e):t}const Yd=Object.freeze(Object.defineProperty({__proto__:null,useCallback:qd,useContext:Jd,useDebugValue:Gd,useEffect:Vd,useErrorBoundary:Zd,useId:Qd,useImperativeHandle:zd,useLayoutEffect:Zc,useMemo:Bi,useReducer:Gc,useRef:Wd,useState:Jc},Symbol.toStringTag,{value:"Module"})),bn=sn(Yd);var jt={},yn={};Object.defineProperty(yn,"__esModule",{value:!0});yn.CloseIcon=void 0;const la=me;function eh(e){return(0,la.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,la.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}yn.CloseIcon=eh;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});wn.CoinbaseWalletRound=void 0;const Fr=me;function th(e){return(0,Fr.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,Fr.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,Fr.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,Fr.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}wn.CoinbaseWalletRound=th;var vn={};Object.defineProperty(vn,"__esModule",{value:!0});vn.QRCodeIcon=void 0;const Kt=me;function rh(e){return(0,Kt.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),(0,Kt.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,Kt.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,Kt.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,Kt.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}vn.QRCodeIcon=rh;var En={};function Kc(e){this.mode=ye.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t<r;t++){var n=[],s=this.data.charCodeAt(t);s>65536?(n[0]=240|(s&1835008)>>>18,n[1]=128|(s&258048)>>>12,n[2]=128|(s&4032)>>>6,n[3]=128|s&63):s>2048?(n[0]=224|(s&61440)>>>12,n[1]=128|(s&4032)>>>6,n[2]=128|s&63):s>128?(n[0]=192|(s&1984)>>>6,n[1]=128|s&63):n[0]=s,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Kc.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t<r;t++)e.put(this.parsedData[t],8)}};function Be(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}Be.prototype={addData:function(e){var t=new Kc(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=Be.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=X.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r),s=1;this.make();for(var i=0;i<this.modules.length;i++)for(var o=i*s,a=0;a<this.modules[i].length;a++){var l=a*s,c=this.modules[i][a];c&&(n.beginFill(0,100),n.moveTo(l,o),n.lineTo(l+s,o),n.lineTo(l+s,o+s),n.lineTo(l,o+s),n.endFill())}return n},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=X.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],s=e[r];if(this.modules[n][s]==null)for(var i=-2;i<=2;i++)for(var o=-2;o<=2;o++)i==-2||i==2||o==-2||o==2||i==0&&o==0?this.modules[n+i][s+o]=!0:this.modules[n+i][s+o]=!1}},setupTypeNumber:function(e){for(var t=X.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=X.getBCHTypeInfo(r),s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<6?this.modules[s][8]=i:s<8?this.modules[s+1][8]=i:this.modules[this.moduleCount-15+s][8]=i}for(var s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<8?this.modules[8][this.moduleCount-s-1]=i:s<9?this.modules[8][15-s-1+1]=i:this.modules[8][15-s-1]=i}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,s=7,i=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var l=!1;i<e.length&&(l=(e[i]>>>s&1)==1);var c=X.getMask(t,n,o-a);c&&(l=!l),this.modules[n][o-a]=l,s--,s==-1&&(i++,s=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};Be.PAD0=236;Be.PAD1=17;Be.createData=function(e,t,r){for(var n=Fe.getRSBlocks(e,t),s=new Xc,i=0;i<r.length;i++){var o=r[i];s.put(o.mode,4),s.put(o.getLength(),X.getLengthInBits(o.mode,e)),o.write(s)}for(var a=0,i=0;i<n.length;i++)a+=n[i].dataCount;if(s.getLengthInBits()>a*8)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+a*8+")");for(s.getLengthInBits()+4<=a*8&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=a*8||(s.put(Be.PAD0,8),s.getLengthInBits()>=a*8));)s.put(Be.PAD1,8);return Be.createBytes(s,n)};Be.createBytes=function(e,t){for(var r=0,n=0,s=0,i=new Array(t.length),o=new Array(t.length),a=0;a<t.length;a++){var l=t[a].dataCount,c=t[a].totalCount-l;n=Math.max(n,l),s=Math.max(s,c),i[a]=new Array(l);for(var d=0;d<i[a].length;d++)i[a][d]=255&e.buffer[d+r];r+=l;var u=X.getErrorCorrectPolynomial(c),h=new Nt(i[a],u.getLength()-1),f=h.mod(u);o[a]=new Array(u.getLength()-1);for(var d=0;d<o[a].length;d++){var p=d+f.getLength()-o[a].length;o[a][d]=p>=0?f.get(p):0}}for(var y=0,d=0;d<t.length;d++)y+=t[d].totalCount;for(var g=new Array(y),b=0,d=0;d<n;d++)for(var a=0;a<t.length;a++)d<i[a].length&&(g[b++]=i[a][d]);for(var d=0;d<s;d++)for(var a=0;a<t.length;a++)d<o[a].length&&(g[b++]=o[a][d]);return g};var ye={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Xe={L:1,M:0,Q:3,H:2},Ze={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},X={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;X.getBCHDigit(t)-X.getBCHDigit(X.G15)>=0;)t^=X.G15<<X.getBCHDigit(t)-X.getBCHDigit(X.G15);return(e<<10|t)^X.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;X.getBCHDigit(t)-X.getBCHDigit(X.G18)>=0;)t^=X.G18<<X.getBCHDigit(t)-X.getBCHDigit(X.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return X.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case Ze.PATTERN000:return(t+r)%2==0;case Ze.PATTERN001:return t%2==0;case Ze.PATTERN010:return r%3==0;case Ze.PATTERN011:return(t+r)%3==0;case Ze.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case Ze.PATTERN101:return t*r%2+t*r%3==0;case Ze.PATTERN110:return(t*r%2+t*r%3)%2==0;case Ze.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new Nt([1],0),r=0;r<e;r++)t=t.multiply(new Nt([1,ae.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case ye.MODE_NUMBER:return 10;case ye.MODE_ALPHA_NUM:return 9;case ye.MODE_8BIT_BYTE:return 8;case ye.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case ye.MODE_NUMBER:return 12;case ye.MODE_ALPHA_NUM:return 11;case ye.MODE_8BIT_BYTE:return 16;case ye.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case ye.MODE_NUMBER:return 14;case ye.MODE_ALPHA_NUM:return 13;case ye.MODE_8BIT_BYTE:return 16;case ye.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var s=0;s<t;s++){for(var i=0,o=e.isDark(n,s),a=-1;a<=1;a++)if(!(n+a<0||t<=n+a))for(var l=-1;l<=1;l++)s+l<0||t<=s+l||a==0&&l==0||o==e.isDark(n+a,s+l)&&i++;i>5&&(r+=3+i-5)}for(var n=0;n<t-1;n++)for(var s=0;s<t-1;s++){var c=0;e.isDark(n,s)&&c++,e.isDark(n+1,s)&&c++,e.isDark(n,s+1)&&c++,e.isDark(n+1,s+1)&&c++,(c==0||c==4)&&(r+=3)}for(var n=0;n<t;n++)for(var s=0;s<t-6;s++)e.isDark(n,s)&&!e.isDark(n,s+1)&&e.isDark(n,s+2)&&e.isDark(n,s+3)&&e.isDark(n,s+4)&&!e.isDark(n,s+5)&&e.isDark(n,s+6)&&(r+=40);for(var s=0;s<t;s++)for(var n=0;n<t-6;n++)e.isDark(n,s)&&!e.isDark(n+1,s)&&e.isDark(n+2,s)&&e.isDark(n+3,s)&&e.isDark(n+4,s)&&!e.isDark(n+5,s)&&e.isDark(n+6,s)&&(r+=40);for(var d=0,s=0;s<t;s++)for(var n=0;n<t;n++)e.isDark(n,s)&&d++;var u=Math.abs(100*d/t/t-50)/5;return r+=u*10,r}},ae={glog:function(e){if(e<1)throw new Error("glog("+e+")");return ae.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return ae.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var le=0;le<8;le++)ae.EXP_TABLE[le]=1<<le;for(var le=8;le<256;le++)ae.EXP_TABLE[le]=ae.EXP_TABLE[le-4]^ae.EXP_TABLE[le-5]^ae.EXP_TABLE[le-6]^ae.EXP_TABLE[le-8];for(var le=0;le<255;le++)ae.LOG_TABLE[ae.EXP_TABLE[le]]=le;function Nt(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&e[r]==0;)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}Nt.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=ae.gexp(ae.glog(this.get(r))+ae.glog(e.get(n)));return new Nt(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=ae.glog(this.get(0))-ae.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<e.getLength();n++)r[n]^=ae.gexp(ae.glog(e.get(n))+t);return new Nt(r,0).mod(e)}};function Fe(e,t){this.totalCount=e,this.dataCount=t}Fe.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];Fe.getRSBlocks=function(e,t){var r=Fe.getRsBlockTable(e,t);if(r==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,s=[],i=0;i<n;i++)for(var o=r[i*3+0],a=r[i*3+1],l=r[i*3+2],c=0;c<o;c++)s.push(new Fe(a,l));return s};Fe.getRsBlockTable=function(e,t){switch(t){case Xe.L:return Fe.RS_BLOCK_TABLE[(e-1)*4+0];case Xe.M:return Fe.RS_BLOCK_TABLE[(e-1)*4+1];case Xe.Q:return Fe.RS_BLOCK_TABLE[(e-1)*4+2];case Xe.H:return Fe.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};function Xc(){this.buffer=[],this.length=0}Xc.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Zs=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Yc(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof e=="string"&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(l){switch(l){case"L":return Xe.L;case"M":return Xe.M;case"Q":return Xe.Q;case"H":return Xe.H;default:throw new Error("Unknwon error correction level: "+l)}}function n(l,c){for(var d=s(l),u=1,h=0,f=0,p=Zs.length;f<=p;f++){var y=Zs[f];if(!y)throw new Error("Content too long: expected "+h+" but got "+d);switch(c){case"L":h=y[0];break;case"M":h=y[1];break;case"Q":h=y[2];break;case"H":h=y[3];break;default:throw new Error("Unknwon error correction level: "+c)}if(d<=h)break;u++}if(u>Zs.length)throw new Error("Content too long");return u}function s(l){var c=encodeURI(l).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return c.length+(c.length!=l?3:0)}var i=this.options.content,o=n(i,this.options.ecl),a=r(this.options.ecl);this.qrcode=new Be(o,a),this.qrcode.addData(i),this.qrcode.make()}Yc.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;typeof e>"u"&&(e={container:t.container||"svg"});for(var n=typeof t.pretty<"u"?!!t.pretty:!0,s=n?" ":"",i=n?`\r
1
+ import{c as N,d as nn,B as $,s as Wu,g as sn,r as ur,f as gc,e as mc,p as _i,b as zu}from"./index-64c7df79.js";function qu(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ti={},or={},on={};Object.defineProperty(on,"__esModule",{value:!0});on.walletLogo=void 0;const Ju=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};on.walletLogo=Ju;var an={};Object.defineProperty(an,"__esModule",{value:!0});an.LINK_API_URL=void 0;an.LINK_API_URL="https://www.walletlink.org";var S={},dr={},qe={};Object.defineProperty(qe,"__esModule",{value:!0});qe.errorValues=qe.standardErrorCodes=void 0;qe.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};qe.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var cn={},ln={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=qe,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(h,f=r){if(h&&Number.isInteger(h)){const p=h.toString();if(d(t.errorValues,p))return t.errorValues[p].message;if(l(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return f}e.getMessageFromCode=n;function s(h){if(!Number.isInteger(h))return!1;const f=h.toString();return!!(t.errorValues[f]||l(h))}e.isValidCode=s;function i(h){var f;if(typeof h=="number")return h;if(o(h))return(f=h.code)!==null&&f!==void 0?f:h.errorCode}e.getErrorCode=i;function o(h){return typeof h=="object"&&h!==null&&(typeof h.code=="number"||typeof h.errorCode=="number")}function a(h,{shouldIncludeStack:f=!1}={}){const p={};if(h&&typeof h=="object"&&!Array.isArray(h)&&d(h,"code")&&s(h.code)){const y=h;p.code=y.code,y.message&&typeof y.message=="string"?(p.message=y.message,d(y,"data")&&(p.data=y.data)):(p.message=n(p.code),p.data={originalError:c(h)})}else p.code=t.standardErrorCodes.rpc.internal,p.message=u(h,"message")?h.message:r,p.data={originalError:c(h)};return f&&(p.stack=u(h,"stack")?h.stack:void 0),p}e.serialize=a;function l(h){return h>=-32099&&h<=-32e3}function c(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function d(h,f){return Object.prototype.hasOwnProperty.call(h,f)}function u(h,f){return typeof h=="object"&&h!==null&&f in h&&typeof h[f]=="string"}})(ln);Object.defineProperty(cn,"__esModule",{value:!0});cn.standardErrors=void 0;const ce=qe,_c=ln;cn.standardErrors={rpc:{parse:e=>ve(ce.standardErrorCodes.rpc.parse,e),invalidRequest:e=>ve(ce.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>ve(ce.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>ve(ce.standardErrorCodes.rpc.methodNotFound,e),internal:e=>ve(ce.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return ve(t,e)},invalidInput:e=>ve(ce.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>ve(ce.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>ve(ce.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>ve(ce.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>ve(ce.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>ve(ce.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>wt(ce.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>wt(ce.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>wt(ce.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>wt(ce.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>wt(ce.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>wt(ce.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new wc(t,r,n)}}};function ve(e,t){const[r,n]=bc(t);return new yc(e,r||(0,_c.getMessageFromCode)(e),n)}function wt(e,t){const[r,n]=bc(t);return new wc(e,r||(0,_c.getMessageFromCode)(e),n)}function bc(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let yc=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}},wc=class extends yc{constructor(t,r,n){if(!Gu(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function Gu(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var un={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.isErrorResponse=void 0;function Zu(e){return e.errorMessage!==void 0}Vt.isErrorResponse=Zu;var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LIB_VERSION=void 0;Wt.LIB_VERSION="3.9.3";Object.defineProperty(un,"__esModule",{value:!0});un.serializeError=void 0;const Qu=Vt,Ku=Wt,Xu=qe,Yu=ln;function ed(e,t){const r=(0,Yu.serialize)(td(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Ku.LIB_VERSION),n.searchParams.set("code",r.code.toString());const s=rd(r.data,t);return s&&n.searchParams.set("method",s),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}un.serializeError=ed;function td(e){return typeof e=="string"?{message:e,code:Xu.standardErrorCodes.rpc.internal}:(0,Qu.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function rd(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=qe;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=cn;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=un;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const s=ln;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return s.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}})})(dr);var se={};Object.defineProperty(se,"__esModule",{value:!0});se.ProviderType=se.RegExpString=se.IntNumber=se.BigIntString=se.AddressString=se.HexString=se.OpaqueType=void 0;function hr(){return e=>e}se.OpaqueType=hr;se.HexString=hr();se.AddressString=hr();se.BigIntString=hr();function nd(e){return Math.floor(e)}se.IntNumber=nd;se.RegExpString=hr();var Vo;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})(Vo||(se.ProviderType=Vo={}));var sd=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(S,"__esModule",{value:!0});S.isMobileWeb=S.getLocation=S.isInIFrame=S.createQrUrl=S.getFavicon=S.range=S.isBigNumber=S.ensureParsedJSONObject=S.ensureBN=S.ensureRegExpString=S.ensureIntNumber=S.ensureBuffer=S.ensureAddressString=S.ensureEvenLengthHexString=S.ensureHexString=S.isHexString=S.prepend0x=S.strip0x=S.has0xPrefix=S.hexStringFromIntNumber=S.intNumberFromHexString=S.bigIntStringFromBN=S.hexStringFromBuffer=S.hexStringToUint8Array=S.uint8ArrayToHex=S.randomBytesHex=void 0;const Ke=sd(nn),mt=dr,ke=se,vc=/^[0-9]*$/,Ec=/^[a-f0-9]*$/;function id(e){return Sc(crypto.getRandomValues(new Uint8Array(e)))}S.randomBytesHex=id;function Sc(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}S.uint8ArrayToHex=Sc;function od(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}S.hexStringToUint8Array=od;function ad(e,t=!1){const r=e.toString("hex");return(0,ke.HexString)(t?`0x${r}`:r)}S.hexStringFromBuffer=ad;function cd(e){return(0,ke.BigIntString)(e.toString(10))}S.bigIntStringFromBN=cd;function ld(e){return(0,ke.IntNumber)(new Ke.default(pr(e,!1),16).toNumber())}S.intNumberFromHexString=ld;function ud(e){return(0,ke.HexString)(`0x${new Ke.default(e).toString(16)}`)}S.hexStringFromIntNumber=ud;function Mi(e){return e.startsWith("0x")||e.startsWith("0X")}S.has0xPrefix=Mi;function dn(e){return Mi(e)?e.slice(2):e}S.strip0x=dn;function Cc(e){return Mi(e)?`0x${e.slice(2)}`:`0x${e}`}S.prepend0x=Cc;function fr(e){if(typeof e!="string")return!1;const t=dn(e).toLowerCase();return Ec.test(t)}S.isHexString=fr;function kc(e,t=!1){if(typeof e=="string"){const r=dn(e).toLowerCase();if(Ec.test(r))return(0,ke.HexString)(t?`0x${r}`:r)}throw mt.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}S.ensureHexString=kc;function pr(e,t=!1){let r=kc(e,!1);return r.length%2===1&&(r=(0,ke.HexString)(`0${r}`)),t?(0,ke.HexString)(`0x${r}`):r}S.ensureEvenLengthHexString=pr;function dd(e){if(typeof e=="string"){const t=dn(e).toLowerCase();if(fr(t)&&t.length===40)return(0,ke.AddressString)(Cc(t))}throw mt.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}S.ensureAddressString=dd;function hd(e){if($.isBuffer(e))return e;if(typeof e=="string"){if(fr(e)){const t=pr(e,!1);return $.from(t,"hex")}return $.from(e,"utf8")}throw mt.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}S.ensureBuffer=hd;function Rc(e){if(typeof e=="number"&&Number.isInteger(e))return(0,ke.IntNumber)(e);if(typeof e=="string"){if(vc.test(e))return(0,ke.IntNumber)(Number(e));if(fr(e))return(0,ke.IntNumber)(new Ke.default(pr(e,!1),16).toNumber())}throw mt.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}S.ensureIntNumber=Rc;function fd(e){if(e instanceof RegExp)return(0,ke.RegExpString)(e.toString());throw mt.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}S.ensureRegExpString=fd;function pd(e){if(e!==null&&(Ke.default.isBN(e)||Ic(e)))return new Ke.default(e.toString(10),10);if(typeof e=="number")return new Ke.default(Rc(e));if(typeof e=="string"){if(vc.test(e))return new Ke.default(e,10);if(fr(e))return new Ke.default(pr(e,!1),16)}throw mt.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}S.ensureBN=pd;function gd(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw mt.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}S.ensureParsedJSONObject=gd;function Ic(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}S.isBigNumber=Ic;function md(e,t){return Array.from({length:t-e},(r,n)=>e+n)}S.range=md;function _d(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}S.getFavicon=_d;function bd(e,t,r,n,s,i){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:e,secret:t,server:r,v:s,chainId:i.toString()}).toString();return`${r}/#/link?${a}`}S.createQrUrl=bd;function Ac(){try{return window.frameElement!==null}catch{return!1}}S.isInIFrame=Ac;function yd(){try{return Ac()&&window.top?window.top.location:window.location}catch{return window.location}}S.getLocation=yd;function wd(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window==null?void 0:window.navigator)===null||e===void 0?void 0:e.userAgent)}S.isMobileWeb=wd;var hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.ScopedLocalStorage=void 0;class vd{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const s=localStorage.key(n);typeof s=="string"&&s.startsWith(t)&&r.push(s)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}hn.ScopedLocalStorage=vd;var Ot={},Nc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function i(l,c,d,u,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new s(d,u||l,h),p=r?r+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,u;if(this._eventsCount===0)return c;for(u in d=this._events)t.call(d,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=r?r+c:c,u=this._events[d];if(!u)return[];if(u.fn)return[u.fn];for(var h=0,f=u.length,p=new Array(f);h<f;h++)p[h]=u[h].fn;return p},a.prototype.listenerCount=function(c){var d=r?r+c:c,u=this._events[d];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,d,u,h,f,p){var y=r?r+c:c;if(!this._events[y])return!1;var g=this._events[y],b=arguments.length,m,_;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,d),!0;case 3:return g.fn.call(g.context,d,u),!0;case 4:return g.fn.call(g.context,d,u,h),!0;case 5:return g.fn.call(g.context,d,u,h,f),!0;case 6:return g.fn.call(g.context,d,u,h,f,p),!0}for(_=1,m=new Array(b-1);_<b;_++)m[_-1]=arguments[_];g.fn.apply(g.context,m)}else{var L=g.length,v;for(_=0;_<L;_++)switch(g[_].once&&this.removeListener(c,g[_].fn,void 0,!0),b){case 1:g[_].fn.call(g[_].context);break;case 2:g[_].fn.call(g[_].context,d);break;case 3:g[_].fn.call(g[_].context,d,u);break;case 4:g[_].fn.call(g[_].context,d,u,h);break;default:if(!m)for(v=1,m=new Array(b-1);v<b;v++)m[v-1]=arguments[v];g[_].fn.apply(g[_].context,m)}}return!0},a.prototype.on=function(c,d,u){return i(this,c,d,u,!1)},a.prototype.once=function(c,d,u){return i(this,c,d,u,!0)},a.prototype.removeListener=function(c,d,u,h){var f=r?r+c:c;if(!this._events[f])return this;if(!d)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===d&&(!h||p.once)&&(!u||p.context===u)&&o(this,f);else{for(var y=0,g=[],b=p.length;y<b;y++)(p[y].fn!==d||h&&!p[y].once||u&&p[y].context!==u)&&g.push(p[y]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var d;return c?(d=r?r+c:c,this._events[d]&&o(this,d)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(Nc);var Ed=Nc.exports,gr={},mr={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.EVENTS=void 0;zt.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.RelayAbstract=Ce.APP_VERSION_KEY=Ce.LOCAL_STORAGE_ADDRESSES_KEY=Ce.WALLET_USER_NAME_KEY=void 0;const Wo=dr;Ce.WALLET_USER_NAME_KEY="walletUsername";Ce.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ce.APP_VERSION_KEY="AppVersion";class Sd{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw Wo.standardErrors.rpc.parse({});const s=n,{error:i}=s;if(i)throw(0,Wo.serializeError)(i,t.method);return s})}}Ce.RelayAbstract=Sd;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});qt.Session=void 0;const zo=Wu,qo=S,Jo="session:id",Go="session:secret",Zo="session:linked";class Pi{constructor(t,r,n,s){this._storage=t,this._id=r||(0,qo.randomBytesHex)(16),this._secret=n||(0,qo.randomBytesHex)(32),this._key=new zo.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(t){const r=t.getItem(Jo),n=t.getItem(Zo),s=t.getItem(Go);return r&&s?new Pi(t,r,s,n==="1"):null}static hash(t){return new zo.sha256().update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(Jo,this._id),this._storage.setItem(Go,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Zo,this._linked?"1":"0")}}qt.Session=Pi;var fn={},pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.Cipher=void 0;const Or=S;class Cd{constructor(t){this.secret=t}async encrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",(0,Or.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},s,i.encode(t)),a=16,l=o.slice(o.byteLength-a),c=o.slice(0,o.byteLength-a),d=new Uint8Array(l),u=new Uint8Array(c),h=new Uint8Array([...n,...d,...u]);return(0,Or.uint8ArrayToHex)(h)}async decrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,s)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,Or.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,Or.hexStringToUint8Array)(t),a=o.slice(0,12),l=o.slice(12,28),c=o.slice(28),d=new Uint8Array([...c,...l]),u={name:"AES-GCM",iv:new Uint8Array(a)};try{const h=await window.crypto.subtle.decrypt(u,i,d),f=new TextDecoder;n(f.decode(h))}catch(h){s(h)}})()})}}pn.Cipher=Cd;var gn={};Object.defineProperty(gn,"__esModule",{value:!0});gn.WalletLinkHTTP=void 0;class kd{constructor(t,r,n){this.linkAPIUrl=t,this.sessionId=r;const s=`${r}:${n}`;this.auth=`Basic ${btoa(s)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:s}=await r.json();if(s)throw new Error(`Check unseen events failed: ${s}`);const i=(t=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${r.status}`)}}gn.WalletLinkHTTP=kd;var $t={};Object.defineProperty($t,"__esModule",{value:!0});$t.WalletLinkWebSocket=$t.ConnectionState=void 0;var At;(function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"})(At||($t.ConnectionState=At={}));class Rd{setConnectionStateListener(t){this.connectionStateListener=t}setIncomingDataListener(t){this.incomingDataListener=t}constructor(t,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=t.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((t,r)=>{var n;let s;try{this.webSocket=s=new this.WebSocketClass(this.url)}catch(i){r(i);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,At.CONNECTING),s.onclose=i=>{var o;this.clearWebSocket(),r(new Error(`websocket error ${i.code}: ${i.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,At.DISCONNECTED)},s.onopen=i=>{var o;t(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,At.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},s.onmessage=i=>{var o,a;if(i.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(i.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,l)}catch{}}})}disconnect(){var t;const{webSocket:r}=this;if(r){this.clearWebSocket(),(t=this.connectionStateListener)===null||t===void 0||t.call(this,At.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(t){const{webSocket:r}=this;if(!r){this.pendingData.push(t),this.connect();return}r.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}$t.WalletLinkWebSocket=Rd;Object.defineProperty(fn,"__esModule",{value:!0});fn.WalletLinkConnection=void 0;const vt=se,Id=pn,Me=zt,Qo=Ce,Et=qt,Ad=gn,$r=$t,Ko=1e4,Nd=6e4;class Ld{constructor({session:t,linkAPIUrl:r,listener:n,diagnostic:s,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,vt.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",c=>a.JsonRpcUrl&&this.handleChainUpdated(c,a.JsonRpcUrl)]]).forEach((c,d)=>{const u=a[d];u!==void 0&&c(u)})},this.handleDestroyed=a=>{var l,c;a==="1"&&((l=this.listener)===null||l===void 0||l.resetAndReload(),(c=this.diagnostic)===null||c===void 0||c.log(Me.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:Et.Session.hash(this.session.id)}))},this.handleAccountUpdated=async a=>{var l,c;try{const d=await this.cipher.decrypt(a);(l=this.listener)===null||l===void 0||l.accountUpdated(d)}catch{(c=this.diagnostic)===null||c===void 0||c.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(a,l)=>{var c,d;try{const u=await this.cipher.decrypt(l);(c=this.listener)===null||c===void 0||c.metadataUpdated(a,u)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:a})}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated(Qo.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated(Qo.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,l)=>{var c,d;try{const u=await this.cipher.decrypt(a),h=await this.cipher.decrypt(l);(c=this.listener)===null||c===void 0||c.chainUpdated(u,h)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=t,this.cipher=new Id.Cipher(t.secret),this.diagnostic=s,this.listener=n;const o=new $r.WalletLinkWebSocket(`${r}/rpc`,i);o.setConnectionStateListener(async a=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(Me.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Et.Session.hash(t.id)});let c=!1;switch(a){case $r.ConnectionState.DISCONNECTED:if(!this.destroyed){const d=async()=>{await new Promise(u=>setTimeout(u,5e3)),this.destroyed||o.connect().catch(()=>{d()})};d()}break;case $r.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),c=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Ko),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case $r.ConnectionState.CONNECTING:break}this.connected!==c&&(this.connected=c)}),o.setIncomingDataListener(a=>{var l,c,d;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const u=a.type==="IsLinkedOK"?a.linked:void 0;(l=this.diagnostic)===null||l===void 0||l.log(Me.EVENTS.LINKED,{sessionIdHash:Et.Session.hash(t.id),linked:u,type:a.type,onlineGuests:a.onlineGuests}),this.linked=u||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(c=this.diagnostic)===null||c===void 0||c.log(Me.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Et.Session.hash(t.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((d=this.requestResolutions.get(a.id))===null||d===void 0||d(a))}),this.ws=o,this.http=new Ad.WalletLinkHTTP(r,t.id,t.key)}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");(t=this.diagnostic)===null||t===void 0||t.log(Me.EVENTS.STARTED_CONNECTING,{sessionIdHash:Et.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var t;this.destroyed=!0,this.ws.disconnect(),(t=this.diagnostic)===null||t===void 0||t.log(Me.EVENTS.DISCONNECTED,{sessionIdHash:Et.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(t){var r,n;this._connected=t,t&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(t)}setOnceConnected(t){return new Promise(r=>{this.connected?t().then(r):this.onceConnected=()=>{t().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(t){var r,n;this._linked=t,t&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(t)}setOnceLinked(t){return new Promise(r=>{this.linked?t().then(r):this.onceLinked=()=>{t().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(t){var r,n;if(!(t.type!=="Event"||t.event!=="Web3Response"))try{const s=await this.cipher.decrypt(t.data),i=JSON.parse(s);if(i.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(i)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Me.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(t=>setTimeout(t,250));try{await this.fetchUnseenEventsAPI()}catch(t){console.error("Unable to check for unseen events",t)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(t,r){const n={type:"SetSessionConfig",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[t]:r}};return this.setOnceConnected(async()=>{const s=await this.makeRequest(n);if(s.type==="Fail")throw new Error(s.error||"failed to set session metadata")})}async publishEvent(t,r,n=!1){const s=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:t,data:s,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(i);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Ko*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(t,r=Nd){const n=t.id;this.sendData(t);let s;return Promise.race([new Promise((i,o)=>{s=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},r)}),new Promise(i=>{this.requestResolutions.set(n,o=>{clearTimeout(s),i(o),this.requestResolutions.delete(n)})})])}async authenticate(){const t={type:"HostSession",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(t);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){const t={type:"IsLinked",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}sendGetSessionConfig(){const t={type:"GetSessionConfig",id:(0,vt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}}fn.WalletLinkConnection=Ld;var _r={},br={},Oi={};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.default=(()=>'@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}')();var Td=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(br,"__esModule",{value:!0});br.injectCssReset=void 0;const Md=Td(Oi);function Pd(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(Md.default)),document.documentElement.appendChild(e)}br.injectCssReset=Pd;var mn={},yr,J,Lc,Tc,it,Xo,Mc,Pc,Oc,$i,bi,yi,$c,ar={},xc=[],Od=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,wr=Array.isArray;function je(e,t){for(var r in t)e[r]=t[r];return e}function xi(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function wi(e,t,r){var n,s,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?yr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return rr(e,o,n,s,null)}function rr(e,t,r,n,s){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Lc,__i:-1,__u:0};return s==null&&J.vnode!=null&&J.vnode(i),i}function $d(){return{current:null}}function vr(e){return e.children}function nr(e,t){this.props=e,this.context=t}function xt(e,t){if(t==null)return e.__?xt(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?xt(e):null}function Fc(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Fc(e)}}function vi(e){(!e.__d&&(e.__d=!0)&&it.push(e)&&!Qr.__r++||Xo!=J.debounceRendering)&&((Xo=J.debounceRendering)||Mc)(Qr)}function Qr(){for(var e,t,r,n,s,i,o,a=1;it.length;)it.length>a&&it.sort(Pc),e=it.shift(),a=it.length,e.__d&&(r=void 0,s=(n=(t=e).__v).__e,i=[],o=[],t.__P&&((r=je({},n)).__v=n.__v+1,J.vnode&&J.vnode(r),Fi(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[s]:null,i,s??xt(n),!!(32&n.__u),o),r.__v=n.__v,r.__.__k[r.__i]=r,Hc(i,r,o),r.__e!=s&&Fc(r)));Qr.__r=0}function jc(e,t,r,n,s,i,o,a,l,c,d){var u,h,f,p,y,g,b=n&&n.__k||xc,m=t.length;for(l=xd(r,t,b,l,m),u=0;u<m;u++)(f=r.__k[u])!=null&&(h=f.__i==-1?ar:b[f.__i]||ar,f.__i=u,g=Fi(e,f,h,s,i,o,a,l,c,d),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&ji(h.ref,null,f),d.push(f.ref,f.__c||p,f)),y==null&&p!=null&&(y=p),4&f.__u||h.__k===f.__k?l=Bc(f,l,e):typeof f.type=="function"&&g!==void 0?l=g:p&&(l=p.nextSibling),f.__u&=-7);return r.__e=y,l}function xd(e,t,r,n,s){var i,o,a,l,c,d=r.length,u=d,h=0;for(e.__k=new Array(s),i=0;i<s;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=i+h,(o=e.__k[i]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?rr(null,o,null,null,null):wr(o)?rr(vr,{children:o},null,null,null):o.constructor==null&&o.__b>0?rr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=Fd(o,r,l,u))!=-1&&(u--,(a=r[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(s>d?h--:s<d&&h++),typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,o.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)(a=r[i])!=null&&!(2&a.__u)&&(a.__e==n&&(n=xt(a)),Vc(a,a));return n}function Bc(e,t,r){var n,s;if(typeof e.type=="function"){for(n=e.__k,s=0;n&&s<n.length;s++)n[s]&&(n[s].__=e,t=Bc(n[s],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=xt(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Dc(e,t){return t=t||[],e==null||typeof e=="boolean"||(wr(e)?e.some(function(r){Dc(r,t)}):t.push(e)),t}function Fd(e,t,r,n){var s,i,o=e.key,a=e.type,l=t[r];if(l===null&&e.key==null||l&&o==l.key&&a==l.type&&!(2&l.__u))return r;if(n>(l!=null&&!(2&l.__u)?1:0))for(s=r-1,i=r+1;s>=0||i<t.length;){if(s>=0){if((l=t[s])&&!(2&l.__u)&&o==l.key&&a==l.type)return s;s--}if(i<t.length){if((l=t[i])&&!(2&l.__u)&&o==l.key&&a==l.type)return i;i++}}return-1}function Yo(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Od.test(t)?r:r+"px"}function xr(e,t,r,n,s){var i,o;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Yo(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Yo(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Oc,"$1")),o=t.toLowerCase(),t=o in e||t=="onFocusOut"||t=="onFocusIn"?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=$i,e.addEventListener(t,i?yi:bi,i)):e.removeEventListener(t,i?yi:bi,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function ea(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=$i++;else if(t.t<r.u)return;return r(J.event?J.event(t):t)}}}function Fi(e,t,r,n,s,i,o,a,l,c){var d,u,h,f,p,y,g,b,m,_,L,v,R,U,Z,te,G,z=t.type;if(t.constructor!=null)return null;128&r.__u&&(l=!!(32&r.__u),i=[a=t.__e=r.__e]),(d=J.__b)&&d(t);e:if(typeof z=="function")try{if(b=t.props,m="prototype"in z&&z.prototype.render,_=(d=z.contextType)&&n[d.__c],L=d?_?_.props.value:d.__:n,r.__c?g=(u=t.__c=r.__c).__=u.__E:(m?t.__c=u=new z(b,L):(t.__c=u=new nr(b,L),u.constructor=z,u.render=Bd),_&&_.sub(u),u.props=b,u.state||(u.state={}),u.context=L,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),m&&u.__s==null&&(u.__s=u.state),m&&z.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=je({},u.__s)),je(u.__s,z.getDerivedStateFromProps(b,u.__s))),f=u.props,p=u.state,u.__v=t,h)m&&z.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),m&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(m&&z.getDerivedStateFromProps==null&&b!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(b,L),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(b,u.__s,L)===!1||t.__v==r.__v){for(t.__v!=r.__v&&(u.props=b,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(V){V&&(V.__=t)}),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(b,u.__s,L),m&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,y)})}if(u.context=L,u.props=b,u.__P=e,u.__e=!1,R=J.__r,U=0,m){for(u.state=u.__s,u.__d=!1,R&&R(t),d=u.render(u.props,u.state,u.context),Z=0;Z<u._sb.length;Z++)u.__h.push(u._sb[Z]);u._sb=[]}else do u.__d=!1,R&&R(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++U<25);u.state=u.__s,u.getChildContext!=null&&(n=je(je({},n),u.getChildContext())),m&&!h&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(f,p)),te=d,d!=null&&d.type===vr&&d.key==null&&(te=Uc(d.props.children)),a=jc(e,wr(te)?te:[te],t,r,n,s,i,o,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),g&&(u.__E=u.__=null)}catch(V){if(t.__v=null,l||i!=null)if(V.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(G=i.length;G--;)xi(i[G]);else t.__e=r.__e,t.__k=r.__k;J.__e(V,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=jd(r.__e,t,r,n,s,i,o,l,c);return(d=J.diffed)&&d(t),128&t.__u?void 0:a}function Hc(e,t,r){for(var n=0;n<r.length;n++)ji(r[n],r[++n],r[++n]);J.__c&&J.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){J.__e(i,s.__v)}})}function Uc(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:wr(e)?e.map(Uc):je({},e)}function jd(e,t,r,n,s,i,o,a,l){var c,d,u,h,f,p,y,g=r.props,b=t.props,m=t.type;if(m=="svg"?s="http://www.w3.org/2000/svg":m=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((f=i[c])&&"setAttribute"in f==!!m&&(m?f.localName==m:f.nodeType==3)){e=f,i[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(b);e=document.createElementNS(s,m,b.is&&b),a&&(J.__m&&J.__m(t,i),a=!1),i=null}if(m==null)g===b||a&&e.data==b||(e.data=b);else{if(i=i&&yr.call(e.childNodes),g=r.props||ar,!a&&i!=null)for(g={},c=0;c<e.attributes.length;c++)g[(f=e.attributes[c]).name]=f.value;for(c in g)if(f=g[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=f;else if(!(c in b)){if(c=="value"&&"defaultValue"in b||c=="checked"&&"defaultChecked"in b)continue;xr(e,c,null,f,s)}}for(c in b)f=b[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?d=f:c=="value"?p=f:c=="checked"?y=f:a&&typeof f!="function"||g[c]===f||xr(e,c,f,g[c],s);if(d)a||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),jc(t.type=="template"?e.content:e,wr(h)?h:[h],t,r,n,m=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:r.__k&&xt(r,0),a,l),i!=null)for(c=i.length;c--;)xi(i[c]);a||(c="value",m=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[c]||m=="progress"&&!p||m=="option"&&p!=g[c])&&xr(e,c,p,g[c],s),c="checked",y!=null&&y!=e[c]&&xr(e,c,y,g[c],s))}return e}function ji(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(s){J.__e(s,r)}}function Vc(e,t,r){var n,s;if(J.unmount&&J.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||ji(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){J.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(s=0;s<n.length;s++)n[s]&&Vc(n[s],t,r||typeof e.type!="function");r||xi(e.__e),e.__c=e.__=e.__e=void 0}function Bd(e,t,r){return this.constructor(e,r)}function Wc(e,t,r){var n,s,i,o;t==document&&(t=document.documentElement),J.__&&J.__(e,t),s=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Fi(t,e=(!n&&r||t).__k=wi(vr,null,[e]),s||ar,ar,t.namespaceURI,!n&&r?[r]:s?null:t.firstChild?yr.call(t.childNodes):null,i,!n&&r?r:s?s.__e:t.firstChild,n,o),Hc(i,e,o)}function zc(e,t){Wc(e,t,zc)}function Dd(e,t,r){var n,s,i,o,a=je({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?s=t[i]:a[i]=t[i]===void 0&&o!=null?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?yr.call(arguments,2):r),rr(e.type,a,n||e.key,s||e.ref,null)}function Hd(e){function t(r){var n,s;return this.getChildContext||(n=new Set,(s={})[t.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(o){o.__e=!0,vi(o)})},this.sub=function(i){n.add(i);var o=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),o&&o.call(i)}}),r.children}return t.__c="__cC"+$c++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}yr=xc.slice,J={__e:function(e,t,r,n){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Lc=0,Tc=function(e){return e!=null&&e.constructor==null},nr.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},r),this.props)),e&&je(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),vi(this))},nr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),vi(this))},nr.prototype.render=vr,it=[],Mc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pc=function(e,t){return e.__v.__b-t.__v.__b},Qr.__r=0,Oc=/(PointerCapture)$|Capture$/i,$i=0,bi=ea(!1),yi=ea(!0),$c=0;const Ud=Object.freeze(Object.defineProperty({__proto__:null,Component:nr,Fragment:vr,cloneElement:Dd,createContext:Hd,createElement:wi,createRef:$d,h:wi,hydrate:zc,get isValidElement(){return Tc},get options(){return J},render:Wc,toChildArray:Dc},Symbol.toStringTag,{value:"Module"})),me=sn(Ud);var _n={},Je,W,Gs,ta,Ft=0,qc=[],Y=J,ra=Y.__b,na=Y.__r,sa=Y.diffed,ia=Y.__c,oa=Y.unmount,aa=Y.__;function _t(e,t){Y.__h&&Y.__h(W,e,Ft||t),Ft=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Jc(e){return Ft=1,Gc(Qc,e)}function Gc(e,t,r){var n=_t(Je++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Qc(void 0,t),function(a){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,a);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=W,!W.__f)){var s=function(a,l,c){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!i||i.call(this,a,l,c);var u=n.__c.props!==a;return d.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),i&&i.call(this,a,l,c)||u};W.__f=!0;var i=W.shouldComponentUpdate,o=W.componentWillUpdate;W.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,s(a,l,c),i=d}o&&o.call(this,a,l,c)},W.shouldComponentUpdate=s}return n.__N||n.__}function Vd(e,t){var r=_t(Je++,3);!Y.__s&&Di(r.__H,t)&&(r.__=e,r.u=t,W.__H.__h.push(r))}function Zc(e,t){var r=_t(Je++,4);!Y.__s&&Di(r.__H,t)&&(r.__=e,r.u=t,W.__h.push(r))}function Wd(e){return Ft=5,Bi(function(){return{current:e}},[])}function zd(e,t,r){Ft=6,Zc(function(){if(typeof e=="function"){var n=e(t());return function(){e(null),n&&typeof n=="function"&&n()}}if(e)return e.current=t(),function(){return e.current=null}},r==null?r:r.concat(e))}function Bi(e,t){var r=_t(Je++,7);return Di(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function qd(e,t){return Ft=8,Bi(function(){return e},t)}function Jd(e){var t=W.context[e.__c],r=_t(Je++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(W)),t.props.value):e.__}function Gd(e,t){Y.useDebugValue&&Y.useDebugValue(t?t(e):e)}function Zd(e){var t=_t(Je++,10),r=Jc();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(n,s){t.__&&t.__(n,s),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Qd(){var e=_t(Je++,11);if(!e.__){for(var t=W.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Kd(){for(var e;e=qc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gr),e.__H.__h.forEach(Ei),e.__H.__h=[]}catch(t){e.__H.__h=[],Y.__e(t,e.__v)}}Y.__b=function(e){W=null,ra&&ra(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),aa&&aa(e,t)},Y.__r=function(e){na&&na(e),Je=0;var t=(W=e.__c).__H;t&&(Gs===W?(t.__h=[],W.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Gr),t.__h.forEach(Ei),t.__h=[],Je=0)),Gs=W},Y.diffed=function(e){sa&&sa(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(qc.push(t)!==1&&ta===Y.requestAnimationFrame||((ta=Y.requestAnimationFrame)||Xd)(Kd)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Gs=W=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Gr),r.__h=r.__h.filter(function(n){return!n.__||Ei(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Y.__e(n,r.__v)}}),ia&&ia(e,t)},Y.unmount=function(e){oa&&oa(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Gr(n)}catch(s){t=s}}),r.__H=void 0,t&&Y.__e(t,r.__v))};var ca=typeof requestAnimationFrame=="function";function Xd(e){var t,r=function(){clearTimeout(n),ca&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);ca&&(t=requestAnimationFrame(r))}function Gr(e){var t=W,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),W=t}function Ei(e){var t=W;e.__c=e.__(),W=t}function Di(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Qc(e,t){return typeof t=="function"?t(e):t}const Yd=Object.freeze(Object.defineProperty({__proto__:null,useCallback:qd,useContext:Jd,useDebugValue:Gd,useEffect:Vd,useErrorBoundary:Zd,useId:Qd,useImperativeHandle:zd,useLayoutEffect:Zc,useMemo:Bi,useReducer:Gc,useRef:Wd,useState:Jc},Symbol.toStringTag,{value:"Module"})),bn=sn(Yd);var jt={},yn={};Object.defineProperty(yn,"__esModule",{value:!0});yn.CloseIcon=void 0;const la=me;function eh(e){return(0,la.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,la.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}yn.CloseIcon=eh;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});wn.CoinbaseWalletRound=void 0;const Fr=me;function th(e){return(0,Fr.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,Fr.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,Fr.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,Fr.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}wn.CoinbaseWalletRound=th;var vn={};Object.defineProperty(vn,"__esModule",{value:!0});vn.QRCodeIcon=void 0;const Kt=me;function rh(e){return(0,Kt.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),(0,Kt.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,Kt.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,Kt.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,Kt.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}vn.QRCodeIcon=rh;var En={};function Kc(e){this.mode=ye.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t<r;t++){var n=[],s=this.data.charCodeAt(t);s>65536?(n[0]=240|(s&1835008)>>>18,n[1]=128|(s&258048)>>>12,n[2]=128|(s&4032)>>>6,n[3]=128|s&63):s>2048?(n[0]=224|(s&61440)>>>12,n[1]=128|(s&4032)>>>6,n[2]=128|s&63):s>128?(n[0]=192|(s&1984)>>>6,n[1]=128|s&63):n[0]=s,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Kc.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t<r;t++)e.put(this.parsedData[t],8)}};function Be(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}Be.prototype={addData:function(e){var t=new Kc(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=Be.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=X.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r),s=1;this.make();for(var i=0;i<this.modules.length;i++)for(var o=i*s,a=0;a<this.modules[i].length;a++){var l=a*s,c=this.modules[i][a];c&&(n.beginFill(0,100),n.moveTo(l,o),n.lineTo(l+s,o),n.lineTo(l+s,o+s),n.lineTo(l,o+s),n.endFill())}return n},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=X.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],s=e[r];if(this.modules[n][s]==null)for(var i=-2;i<=2;i++)for(var o=-2;o<=2;o++)i==-2||i==2||o==-2||o==2||i==0&&o==0?this.modules[n+i][s+o]=!0:this.modules[n+i][s+o]=!1}},setupTypeNumber:function(e){for(var t=X.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=X.getBCHTypeInfo(r),s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<6?this.modules[s][8]=i:s<8?this.modules[s+1][8]=i:this.modules[this.moduleCount-15+s][8]=i}for(var s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<8?this.modules[8][this.moduleCount-s-1]=i:s<9?this.modules[8][15-s-1+1]=i:this.modules[8][15-s-1]=i}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,s=7,i=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var l=!1;i<e.length&&(l=(e[i]>>>s&1)==1);var c=X.getMask(t,n,o-a);c&&(l=!l),this.modules[n][o-a]=l,s--,s==-1&&(i++,s=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};Be.PAD0=236;Be.PAD1=17;Be.createData=function(e,t,r){for(var n=Fe.getRSBlocks(e,t),s=new Xc,i=0;i<r.length;i++){var o=r[i];s.put(o.mode,4),s.put(o.getLength(),X.getLengthInBits(o.mode,e)),o.write(s)}for(var a=0,i=0;i<n.length;i++)a+=n[i].dataCount;if(s.getLengthInBits()>a*8)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+a*8+")");for(s.getLengthInBits()+4<=a*8&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=a*8||(s.put(Be.PAD0,8),s.getLengthInBits()>=a*8));)s.put(Be.PAD1,8);return Be.createBytes(s,n)};Be.createBytes=function(e,t){for(var r=0,n=0,s=0,i=new Array(t.length),o=new Array(t.length),a=0;a<t.length;a++){var l=t[a].dataCount,c=t[a].totalCount-l;n=Math.max(n,l),s=Math.max(s,c),i[a]=new Array(l);for(var d=0;d<i[a].length;d++)i[a][d]=255&e.buffer[d+r];r+=l;var u=X.getErrorCorrectPolynomial(c),h=new Nt(i[a],u.getLength()-1),f=h.mod(u);o[a]=new Array(u.getLength()-1);for(var d=0;d<o[a].length;d++){var p=d+f.getLength()-o[a].length;o[a][d]=p>=0?f.get(p):0}}for(var y=0,d=0;d<t.length;d++)y+=t[d].totalCount;for(var g=new Array(y),b=0,d=0;d<n;d++)for(var a=0;a<t.length;a++)d<i[a].length&&(g[b++]=i[a][d]);for(var d=0;d<s;d++)for(var a=0;a<t.length;a++)d<o[a].length&&(g[b++]=o[a][d]);return g};var ye={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Xe={L:1,M:0,Q:3,H:2},Ze={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},X={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;X.getBCHDigit(t)-X.getBCHDigit(X.G15)>=0;)t^=X.G15<<X.getBCHDigit(t)-X.getBCHDigit(X.G15);return(e<<10|t)^X.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;X.getBCHDigit(t)-X.getBCHDigit(X.G18)>=0;)t^=X.G18<<X.getBCHDigit(t)-X.getBCHDigit(X.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return X.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case Ze.PATTERN000:return(t+r)%2==0;case Ze.PATTERN001:return t%2==0;case Ze.PATTERN010:return r%3==0;case Ze.PATTERN011:return(t+r)%3==0;case Ze.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case Ze.PATTERN101:return t*r%2+t*r%3==0;case Ze.PATTERN110:return(t*r%2+t*r%3)%2==0;case Ze.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new Nt([1],0),r=0;r<e;r++)t=t.multiply(new Nt([1,ae.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case ye.MODE_NUMBER:return 10;case ye.MODE_ALPHA_NUM:return 9;case ye.MODE_8BIT_BYTE:return 8;case ye.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case ye.MODE_NUMBER:return 12;case ye.MODE_ALPHA_NUM:return 11;case ye.MODE_8BIT_BYTE:return 16;case ye.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case ye.MODE_NUMBER:return 14;case ye.MODE_ALPHA_NUM:return 13;case ye.MODE_8BIT_BYTE:return 16;case ye.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var s=0;s<t;s++){for(var i=0,o=e.isDark(n,s),a=-1;a<=1;a++)if(!(n+a<0||t<=n+a))for(var l=-1;l<=1;l++)s+l<0||t<=s+l||a==0&&l==0||o==e.isDark(n+a,s+l)&&i++;i>5&&(r+=3+i-5)}for(var n=0;n<t-1;n++)for(var s=0;s<t-1;s++){var c=0;e.isDark(n,s)&&c++,e.isDark(n+1,s)&&c++,e.isDark(n,s+1)&&c++,e.isDark(n+1,s+1)&&c++,(c==0||c==4)&&(r+=3)}for(var n=0;n<t;n++)for(var s=0;s<t-6;s++)e.isDark(n,s)&&!e.isDark(n,s+1)&&e.isDark(n,s+2)&&e.isDark(n,s+3)&&e.isDark(n,s+4)&&!e.isDark(n,s+5)&&e.isDark(n,s+6)&&(r+=40);for(var s=0;s<t;s++)for(var n=0;n<t-6;n++)e.isDark(n,s)&&!e.isDark(n+1,s)&&e.isDark(n+2,s)&&e.isDark(n+3,s)&&e.isDark(n+4,s)&&!e.isDark(n+5,s)&&e.isDark(n+6,s)&&(r+=40);for(var d=0,s=0;s<t;s++)for(var n=0;n<t;n++)e.isDark(n,s)&&d++;var u=Math.abs(100*d/t/t-50)/5;return r+=u*10,r}},ae={glog:function(e){if(e<1)throw new Error("glog("+e+")");return ae.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return ae.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var le=0;le<8;le++)ae.EXP_TABLE[le]=1<<le;for(var le=8;le<256;le++)ae.EXP_TABLE[le]=ae.EXP_TABLE[le-4]^ae.EXP_TABLE[le-5]^ae.EXP_TABLE[le-6]^ae.EXP_TABLE[le-8];for(var le=0;le<255;le++)ae.LOG_TABLE[ae.EXP_TABLE[le]]=le;function Nt(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&e[r]==0;)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}Nt.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=ae.gexp(ae.glog(this.get(r))+ae.glog(e.get(n)));return new Nt(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=ae.glog(this.get(0))-ae.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<e.getLength();n++)r[n]^=ae.gexp(ae.glog(e.get(n))+t);return new Nt(r,0).mod(e)}};function Fe(e,t){this.totalCount=e,this.dataCount=t}Fe.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];Fe.getRSBlocks=function(e,t){var r=Fe.getRsBlockTable(e,t);if(r==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,s=[],i=0;i<n;i++)for(var o=r[i*3+0],a=r[i*3+1],l=r[i*3+2],c=0;c<o;c++)s.push(new Fe(a,l));return s};Fe.getRsBlockTable=function(e,t){switch(t){case Xe.L:return Fe.RS_BLOCK_TABLE[(e-1)*4+0];case Xe.M:return Fe.RS_BLOCK_TABLE[(e-1)*4+1];case Xe.Q:return Fe.RS_BLOCK_TABLE[(e-1)*4+2];case Xe.H:return Fe.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};function Xc(){this.buffer=[],this.length=0}Xc.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Zs=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Yc(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof e=="string"&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(l){switch(l){case"L":return Xe.L;case"M":return Xe.M;case"Q":return Xe.Q;case"H":return Xe.H;default:throw new Error("Unknwon error correction level: "+l)}}function n(l,c){for(var d=s(l),u=1,h=0,f=0,p=Zs.length;f<=p;f++){var y=Zs[f];if(!y)throw new Error("Content too long: expected "+h+" but got "+d);switch(c){case"L":h=y[0];break;case"M":h=y[1];break;case"Q":h=y[2];break;case"H":h=y[3];break;default:throw new Error("Unknwon error correction level: "+c)}if(d<=h)break;u++}if(u>Zs.length)throw new Error("Content too long");return u}function s(l){var c=encodeURI(l).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return c.length+(c.length!=l?3:0)}var i=this.options.content,o=n(i,this.options.ecl),a=r(this.options.ecl);this.qrcode=new Be(o,a),this.qrcode.addData(i),this.qrcode.make()}Yc.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;typeof e>"u"&&(e={container:t.container||"svg"});for(var n=typeof t.pretty<"u"?!!t.pretty:!0,s=n?" ":"",i=n?`\r
2
2
  `:"",o=t.width,a=t.height,l=r.length,c=o/(l+2*t.padding),d=a/(l+2*t.padding),u=typeof t.join<"u"?!!t.join:!1,h=typeof t.swap<"u"?!!t.swap:!1,f=typeof t.xmlDeclaration<"u"?!!t.xmlDeclaration:!0,p=typeof t.predefined<"u"?!!t.predefined:!1,y=p?s+'<defs><path id="qrmodule" d="M0 0 h'+d+" v"+c+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+i:"",g=s+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+i,b="",m="",_=0;_<l;_++)for(var L=0;L<l;L++){var v=r[L][_];if(v){var R=L*c+t.padding*c,U=_*d+t.padding*d;if(h){var Z=R;R=U,U=Z}if(u){var te=c+R,G=d+U;R=Number.isInteger(R)?Number(R):R.toFixed(2),U=Number.isInteger(U)?Number(U):U.toFixed(2),te=Number.isInteger(te)?Number(te):te.toFixed(2),G=Number.isInteger(G)?Number(G):G.toFixed(2),m+="M"+R+","+U+" V"+G+" H"+te+" V"+U+" H"+R+" Z "}else p?b+=s+'<use x="'+R.toString()+'" y="'+U.toString()+'" href="#qrmodule" />'+i:b+=s+'<rect x="'+R.toString()+'" y="'+U.toString()+'" width="'+c+'" height="'+d+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+i}}u&&(b=s+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+m+'" />');let z="";if(this.options.image!==void 0&&this.options.image.svg){const E=o*this.options.image.width/100,w=a*this.options.image.height/100,I=o/2-E/2,k=a/2-w/2;z+=`<svg x="${I}" y="${k}" width="${E}" height="${w}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,z+=this.options.image.svg+i,z+="</svg>"}var V="";switch(e.container){case"svg":f&&(V+='<?xml version="1.0" standalone="yes"?>'+i),V+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+i,V+=y+g+b,V+=z,V+="</svg>";break;case"svg-viewbox":f&&(V+='<?xml version="1.0" standalone="yes"?>'+i),V+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+i,V+=y+g+b,V+=z,V+="</svg>";break;case"g":V+='<g width="'+o+'" height="'+a+'">'+i,V+=y+g+b,V+=z,V+="</g>";break;default:V+=(y+g+b+z).replace(/^\s+/,"");break}return V};var nh=Yc,sh=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(En,"__esModule",{value:!0});En.QRCode=void 0;const ih=me,ua=bn,oh=sh(nh),ah=e=>{const[t,r]=(0,ua.useState)("");return(0,ua.useEffect)(()=>{var n,s;const i=new oh.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:(n=e.width)!==null&&n!==void 0?n:256,height:(s=e.height)!==null&&s!==void 0?s:256,padding:0,image:e.image}),o=$.from(i.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)},[e.bgColor,e.content,e.fgColor,e.height,e.image,e.width]),t?(0,ih.h)("img",{src:t,alt:"QR Code"}):null};En.QRCode=ah;var Sn={},Hi={};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=(()=>".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}")();var ch=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.Spinner=void 0;const jr=me,lh=ch(Hi),uh=e=>{var t;const r=(t=e.size)!==null&&t!==void 0?t:64,n=e.color||"#000";return(0,jr.h)("div",{class:"-cbwsdk-spinner"},(0,jr.h)("style",null,lh.default),(0,jr.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,jr.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};Sn.Spinner=uh;var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.default=(()=>".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}")();var el=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jt,"__esModule",{value:!0});jt.CoinbaseWalletSteps=jt.ConnectContent=void 0;const ht=el(ur),j=me,dh=S,hh=Wt,fh=yn,ph=wn,gh=vn,mh=En,_h=Sn,bh=el(Ui),Qs={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:tl},yh=e=>e==="light"?"#FFFFFF":"#0A0B0D";function wh(e){const{theme:t}=e,r=(0,dh.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId),n=Qs.steps;return(0,j.h)("div",{"data-testid":"connect-content",className:(0,ht.default)("-cbwsdk-connect-content",t)},(0,j.h)("style",null,bh.default),(0,j.h)("div",{className:"-cbwsdk-connect-content-header"},(0,j.h)("h2",{className:(0,ht.default)("-cbwsdk-connect-content-heading",t)},"Scan to connect with our mobile app"),e.onCancel&&(0,j.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:e.onCancel},(0,j.h)(fh.CloseIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,j.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,j.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,j.h)(vh,{title:Qs.title,description:Qs.description,theme:t})),(0,j.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,j.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,j.h)(mh.QRCode,{content:r,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,j.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:hh.LIB_VERSION}),(0,j.h)("input",{type:"hidden",value:r})),(0,j.h)(n,{theme:t}),!e.isConnected&&(0,j.h)("div",{"data-testid":"connecting-spinner",className:(0,ht.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,j.h)(_h.Spinner,{size:36,color:t==="dark"?"#FFF":"#000"}),(0,j.h)("p",null,"Connecting...")))))}jt.ConnectContent=wh;function vh({title:e,description:t,theme:r}){return(0,j.h)("div",{className:(0,ht.default)("-cbwsdk-connect-item",r)},(0,j.h)("div",null,(0,j.h)(ph.CoinbaseWalletRound,null)),(0,j.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,j.h)("h3",{className:"-cbwsdk-connect-item-title"},e),(0,j.h)("p",{className:"-cbwsdk-connect-item-description"},t)))}function tl({theme:e}){return(0,j.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,j.h)("li",{className:(0,ht.default)("-cbwsdk-wallet-steps-item",e)},(0,j.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,j.h)("li",{className:(0,ht.default)("-cbwsdk-wallet-steps-item",e)},(0,j.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,j.h)("span",null,"Tap ",(0,j.h)("strong",null,"Scan")," "),(0,j.h)("span",{className:(0,ht.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,j.h)(gh.QRCodeIcon,{fill:yh(e)})))))}jt.CoinbaseWalletSteps=tl;var Cn={},kn={};Object.defineProperty(kn,"__esModule",{value:!0});kn.ArrowLeftIcon=void 0;const da=me;function Eh(e){return(0,da.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),(0,da.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}kn.ArrowLeftIcon=Eh;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.LaptopIcon=void 0;const Ks=me;function Sh(e){return(0,Ks.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,Ks.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,Ks.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}Rn.LaptopIcon=Sh;var In={};Object.defineProperty(In,"__esModule",{value:!0});In.SafeIcon=void 0;const ha=me;function Ch(e){return(0,ha.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,ha.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}In.SafeIcon=Ch;var Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=(()=>".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}")();var rl=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.TryExtensionContent=void 0;const tt=rl(ur),ne=me,Xs=bn,kh=kn,Rh=Rn,Ih=In,Ah=rl(Vi);function Nh({theme:e}){const[t,r]=(0,Xs.useState)(!1),n=(0,Xs.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),s=(0,Xs.useCallback)(()=>{t?window.location.reload():(n(),r(!0))},[n,t]);return(0,ne.h)("div",{class:(0,tt.default)("-cbwsdk-try-extension",e)},(0,ne.h)("style",null,Ah.default),(0,ne.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,ne.h)("h3",{class:(0,tt.default)("-cbwsdk-try-extension-heading",e)},"Or try the Coinbase Wallet browser extension"),(0,ne.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,ne.h)("button",{class:(0,tt.default)("-cbwsdk-try-extension-cta",e),onClick:s},t?"Refresh":"Install"),(0,ne.h)("div",null,!t&&(0,ne.h)(kh.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:e==="light"?"#0052FF":"#588AF5"})))),(0,ne.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,ne.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,ne.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,ne.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,ne.h)("span",{class:(0,tt.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,ne.h)(Rh.LaptopIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ne.h)("div",{class:(0,tt.default)("-cbwsdk-try-extension-list-item-copy",e)},"Connect with dapps with just one click on your desktop browser")),(0,ne.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,ne.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,ne.h)("span",{class:(0,tt.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,ne.h)(Ih.SafeIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ne.h)("div",{class:(0,tt.default)("-cbwsdk-try-extension-list-item-copy",e)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Cn.TryExtensionContent=Nh;var Wi={};Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=(()=>".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}")();var nl=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_n,"__esModule",{value:!0});_n.ConnectDialog=void 0;const Ys=nl(ur),rt=me,ei=bn,Lh=jt,Th=Cn,Mh=nl(Wi),Ph=e=>{const{isOpen:t,darkMode:r}=e,[n,s]=(0,ei.useState)(!t),[i,o]=(0,ei.useState)(!t);(0,ei.useEffect)(()=>{const l=[window.setTimeout(()=>{o(!t)},10)];return t?s(!1):l.push(window.setTimeout(()=>{s(!0)},360)),()=>{l.forEach(window.clearTimeout)}},[t]);const a=r?"dark":"light";return(0,rt.h)("div",{class:(0,Ys.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,rt.h)("style",null,Mh.default),(0,rt.h)("div",{class:(0,Ys.default)("-cbwsdk-connect-dialog-backdrop",a,i&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,rt.h)("div",{class:"-cbwsdk-connect-dialog"},(0,rt.h)("div",{class:(0,Ys.default)("-cbwsdk-connect-dialog-box",i&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,rt.h)(Lh.ConnectContent,{theme:a,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel}),(0,rt.h)(Th.TryExtensionContent,{theme:a}))))};_n.ConnectDialog=Ph;Object.defineProperty(mn,"__esModule",{value:!0});mn.LinkFlow=void 0;const ti=me,Oh=_n;class $h{constructor(t){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render()}setConnected(t){this.connected!==t&&(this.connected=t,this.render())}setChainId(t){this.chainId!==t&&(this.chainId=t,this.render())}detach(){var t;this.root&&((0,ti.render)(null,this.root),(t=this.root.parentElement)===null||t===void 0||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,ti.render)((0,ti.h)(Oh.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}mn.LinkFlow=$h;var zi={},qi={};Object.defineProperty(qi,"__esModule",{value:!0});qi.default=(()=>".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}")();(function(e){var t=N&&N.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const r=t(ur),n=me,s=bn,i=t(qi),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class l{constructor(h){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=h.darkMode}attach(h){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",h.appendChild(this.root),this.render()}presentItem(h){const f=this.nextItemKey++;return this.items.set(f,h),this.render(),()=>{this.items.delete(f),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([h,f])=>(0,n.h)(e.SnackbarInstance,Object.assign({},f,{key:h}))))),this.root)}}e.Snackbar=l;const c=u=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,i.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},u.children));e.SnackbarContainer=c;const d=({autoExpand:u,message:h,menuItems:f})=>{const[p,y]=(0,s.useState)(!0),[g,b]=(0,s.useState)(u??!1);(0,s.useEffect)(()=>{const _=[window.setTimeout(()=>{y(!1)},1),window.setTimeout(()=>{b(!0)},1e4)];return()=>{_.forEach(window.clearTimeout)}});const m=()=>{b(!g)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",p&&"-cbwsdk-snackbar-instance-hidden",g&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:m},(0,n.h)("img",{src:o,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},h),(0,n.h)("div",{class:"-gear-container"},!g&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:a,class:"-gear-icon",title:"Expand"}))),f&&f.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},f.map((_,L)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",_.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:_.onClick,key:L},(0,n.h)("svg",{width:_.svgWidth,height:_.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":_.defaultFillRule,"clip-rule":_.defaultClipRule,d:_.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",_.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},_.info)))))};e.SnackbarInstance=d})(zi);Object.defineProperty(_r,"__esModule",{value:!0});_r.WalletLinkRelayUI=void 0;const xh=br,Fh=mn,jh=zi;class Bh{constructor(t){this.standalone=null,this.attached=!1,this.snackbar=new jh.Snackbar({darkMode:t.darkMode}),this.linkFlow=new Fh.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",t.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,xh.injectCssReset)()}setConnected(t){this.linkFlow.setConnected(t)}setChainId(t){this.linkFlow.setChainId(t)}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(t){let r;return t.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]}:r={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(t){this.standalone=t}isStandalone(){var t;return(t=this.standalone)!==null&&t!==void 0?t:!1}}_r.WalletLinkRelayUI=Bh;Object.defineProperty(mr,"__esModule",{value:!0});mr.WalletLinkRelay=void 0;const St=dr,Dh=se,K=S,nt=zt,fa=Ce,Qe=qt,Hh=fn,st=Vt,Uh=_r;class We extends fa.RelayAbstract{constructor(t){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=o=>{var a;this.isLinked=o;const l=this.storage.getItem(fa.LOCAL_STORAGE_ADDRESSES_KEY);if(o&&(this.session.linked=o),this.isUnlinkedErrorState=!1,l){const c=l.split(" "),d=this.storage.getItem("IsStandaloneSigning")==="true";if(c[0]!==""&&!o&&this.session.linked&&!d){this.isUnlinkedErrorState=!0;const u=this.getSessionIdHash();(a=this.diagnostic)===null||a===void 0||a.log(nt.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:u})}}},this.metadataUpdated=(o,a)=>{this.storage.setItem(o,a)},this.chainUpdated=(o,a)=>{this.chainCallbackParams.chainId===o&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:o,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(o,a))},this.accountUpdated=o=>{this.accountsCallback&&this.accountsCallback([o]),We.accountRequestCallbackIds.size>0&&(Array.from(We.accountRequestCallbackIds.values()).forEach(a=>{const l={type:"WEB3_RESPONSE",id:a,response:{method:"requestEthereumAccounts",result:[o]}};this.invokeCallback(Object.assign(Object.assign({},l),{id:a}))}),We.accountRequestCallbackIds.clear())},this.connectedUpdated=o=>{this.ui.setConnected(o)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;const{session:n,ui:s,connection:i}=this.subscribe();this._session=n,this.connection=i,this.relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=(r=t.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=s}subscribe(){const t=Qe.Session.load(this.storage)||new Qe.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,s=new Hh.WalletLinkConnection({session:t,linkAPIUrl:r,diagnostic:n,listener:this}),{version:i,darkMode:o}=this.options,a=this.options.uiConstructor({linkAPIUrl:r,version:i,darkMode:o,session:t});return s.connect(),{session:t,ui:a,connection:s}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(t=>setTimeout(()=>t(null),1e3))]).then(()=>{var t,r;const n=this.ui.isStandalone();(t=this.diagnostic)===null||t===void 0||t.log(nt.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const s=Qe.Session.load(this.storage);if((s==null?void 0:s.id)===this._session.id?this.storage.clear():s&&((r=this.diagnostic)===null||r===void 0||r.log(nt.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:Qe.Session.hash(s.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:i,ui:o,connection:a}=this.subscribe();this._session=i,this.connection=a,this.ui=o,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(t=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(nt.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${t}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(t,r){this.appName=t,this.appLogoUrl=r}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,r){this.storage.setItem(t,r)}signEthereumMessage(t,r,n,s){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,K.hexStringFromBuffer)(t,!0),address:r,addPrefix:n,typedDataJson:s||null}})}ethereumAddressFromSignedMessage(t,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,K.hexStringFromBuffer)(t,!0),signature:(0,K.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,K.bigIntStringFromBN)(t.weiValue),data:(0,K.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,K.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,K.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,K.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,K.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,K.bigIntStringFromBN)(t.weiValue),data:(0,K.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,K.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,K.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,K.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,K.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,K.hexStringFromBuffer)(t,!0),chainId:r}})}scanQRCode(t){return this.sendRequest({method:"scanQRCode",params:{regExp:t}})}getQRCodeUrl(){return(0,K.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(t,r){return this.sendRequest({method:"generic",params:{action:r,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let r=null;const n=(0,K.randomBytesHex)(8),s=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,o),r==null||r()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:s,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,l=>{if(r==null||r(),(0,st.isErrorResponse)(l))return a(new Error(l.errorMessage));o(l)}),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)}),cancel:s}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}setDappDefaultChainCallback(t){this.dappDefaultChain=t,this.ui instanceof Uh.WalletLinkRelayUI&&this.ui.setChainId(t)}publishWeb3RequestEvent(t,r){var n;const s={type:"WEB3_REQUEST",id:t,request:r},i=Qe.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(nt.EVENTS.WEB3_REQUEST,{eventId:s.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?Qe.Session.hash(i.id):"",isSessionMismatched:((i==null?void 0:i.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",s,!0).then(o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(nt.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:s.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?Qe.Session.hash(i.id):"",isSessionMismatched:((i==null?void 0:i.id)!==this._session.id).toString()})}).catch(o=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s.id,response:{method:r.method,errorMessage:o.message}})})}publishWeb3RequestCanceledEvent(t){const r={type:"WEB3_REQUEST_CANCELED",id:t};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(t,r,n){return this.connection.publishEvent(t,r,n)}handleWeb3ResponseMessage(t){var r;const{response:n}=t;if((r=this.diagnostic)===null||r===void 0||r.log(nt.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){We.accountRequestCallbackIds.forEach(s=>this.invokeCallback(Object.assign(Object.assign({},t),{id:s}))),We.accountRequestCallbackIds.clear();return}this.invokeCallback(t)}handleErrorResponse(t,r,n,s){var i;const o=(i=n==null?void 0:n.message)!==null&&i!==void 0?i:(0,St.getMessageFromCode)(s);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:{method:r,errorMessage:o,errorCode:s}})}invokeCallback(t){const r=this.relayEventManager.callbacks.get(t.id);r&&(r(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,K.randomBytesHex)(8),n=i=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,t.method,i)};return{promise:new Promise((i,o)=>{if(this.relayEventManager.callbacks.set(r,a=>{if(this.ui.hideRequestEthereumAccounts(),(0,st.isErrorResponse)(a))return o(new Error(a.errorMessage));i(a)}),this.ui.inlineAccountsResponse()){const a=l=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:r,response:{method:"requestEthereumAccounts",result:l}})};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:a})}else{const a=St.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(a)})}We.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,t)}),cancel:n}}selectProvider(t){const r={method:"selectProvider",params:{providerOptions:t}},n=(0,K.randomBytesHex)(8),s=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},i=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,d=>{if((0,st.isErrorResponse)(d))return a(new Error(d.errorMessage));o(d)});const l=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:Dh.ProviderType.Unselected}})},c=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:d}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:c,onCancel:l,providerOptions:t})});return{cancel:s,promise:i}}watchAsset(t,r,n,s,i,o){const a={method:"watchAsset",params:{type:t,options:{address:r,symbol:n,decimals:s,image:i},chainId:o}};let l=null;const c=(0,K.randomBytesHex)(8),d=h=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,a.method,h),l==null||l()};this.ui.inlineWatchAsset()||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));const u=new Promise((h,f)=>{this.relayEventManager.callbacks.set(c,g=>{if(l==null||l(),(0,st.isErrorResponse)(g))return f(new Error(g.errorMessage));h(g)});const p=g=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:c,response:{method:"watchAsset",result:!1}})},y=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:c,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:y,onCancel:p,type:t,address:r,symbol:n,decimals:s,image:i,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(c,a)});return{cancel:d,promise:u}}addEthereumChain(t,r,n,s,i,o){const a={method:"addEthereumChain",params:{chainId:t,rpcUrls:r,blockExplorerUrls:s,chainName:i,iconUrls:n,nativeCurrency:o}};let l=null;const c=(0,K.randomBytesHex)(8),d=h=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,a.method,h),l==null||l()};return this.ui.inlineAddEthereumChain(t)||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((h,f)=>{this.relayEventManager.callbacks.set(c,g=>{if(l==null||l(),(0,st.isErrorResponse)(g))return f(new Error(g.errorMessage));h(g)});const p=g=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:c,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},y=g=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:c,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:g}}})};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:p,onApprove:y,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(t)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(c,a)}),cancel:d}}switchEthereumChain(t,r){const n={method:"switchEthereumChain",params:Object.assign({chainId:t},{address:r})},s=(0,K.randomBytesHex)(8),i=a=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,n.method,a)};return{promise:new Promise((a,l)=>{this.relayEventManager.callbacks.set(s,u=>{if((0,st.isErrorResponse)(u)&&u.errorCode)return l(St.standardErrors.provider.custom({code:u.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,st.isErrorResponse)(u))return l(new Error(u.errorMessage));a(u)});const c=u=>{var h;if(u){const f=(h=(0,St.getErrorCode)(u))!==null&&h!==void 0?h:St.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(s,"switchEthereumChain",u instanceof Error?u:St.standardErrors.provider.unsupportedChain(t),f)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},d=u=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:u}}})};this.ui.switchEthereumChain({onCancel:c,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(s,n)}),cancel:i}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return Qe.Session.hash(this._session.id)}sendRequestStandalone(t,r){const n=i=>{this.handleErrorResponse(t,r.method,i)},s=i=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:i})};switch(r.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:r,onSuccess:s,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:r,onSuccess:s,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:r,onSuccess:s,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:s});break;default:n();break}}}mr.WalletLinkRelay=We;We.accountRequestCallbackIds=new Set;var Er={},An={},sl={};(function(e){var t=N&&N.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,o,a)}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=N&&N.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zi,e)})(sl);var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=(()=>".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}")();var il=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(An,"__esModule",{value:!0});An.RedirectDialog=void 0;const Vh=il(ur),xe=me,Wh=br,zh=sl,qh=il(Ji);class Jh{constructor(){this.root=null}attach(){const t=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",t.appendChild(this.root),(0,Wh.injectCssReset)()}present(t){this.render(t)}clear(){this.render(null)}render(t){this.root&&((0,xe.render)(null,this.root),t&&(0,xe.render)((0,xe.h)(Gh,Object.assign({},t,{onDismiss:()=>{this.clear()}})),this.root))}}An.RedirectDialog=Jh;const Gh=({title:e,buttonText:t,darkMode:r,onButtonClick:n,onDismiss:s})=>{const i=r?"dark":"light";return(0,xe.h)(zh.SnackbarContainer,{darkMode:r},(0,xe.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,xe.h)("style",null,qh.default),(0,xe.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:s}),(0,xe.h)("div",{class:(0,Vh.default)("-cbwsdk-redirect-dialog-box",i)},(0,xe.h)("p",null,e),(0,xe.h)("button",{onClick:n},t))))};Object.defineProperty(Er,"__esModule",{value:!0});Er.MobileRelayUI=void 0;const Zh=An;class Qh{constructor(t){this.attached=!1,this.darkMode=!1,this.redirectDialog=new Zh.RedirectDialog,this.darkMode=t.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(t){}redirectToCoinbaseWallet(t){const r=new URL("https://go.cb-w.com/walletlink");r.searchParams.append("redirect_url",window.location.href),t&&r.searchParams.append("wl_url",t);const n=document.createElement("a");n.target="cbw-opener",n.href=r.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(t){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(t)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(t)},99)}showConnecting(t){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}Er.MobileRelayUI=Qh;Object.defineProperty(gr,"__esModule",{value:!0});gr.MobileRelay=void 0;const Kh=S,Xh=mr,Yh=Er;class ef extends Xh.WalletLinkRelay{constructor(t){var r;super(t),this._enableMobileWalletLink=(r=t.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const t=(0,Kh.getLocation)();t.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(t.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(t,r){if(super.publishWeb3RequestEvent(t,r),!(this._enableMobileWalletLink&&this.ui instanceof Yh.MobileRelayUI))return;let n=!1;switch(r.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(t){super.handleWeb3ResponseMessage(t)}connectAndSignIn(t){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:t.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:t.statement,resources:t.resources}})}}gr.MobileRelay=ef;const{Transform:tf}=gc;var rf=e=>class ol extends tf{constructor(r,n,s,i,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=s,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,s){let i=null;try{this.update(r,n)}catch(o){i=o}s(i)}_flush(r){let n=null;try{this.push(this.digest())}catch(s){n=s}r(n)}update(r,n){if(!$.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return $.isBuffer(r)||(r=$.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new ol(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:nf}=gc;var sf=e=>class al extends nf{constructor(r,n,s,i){super(i),this._rate=r,this._capacity=n,this._delimitedSuffix=s,this._options=i,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,s){let i=null;try{this.update(r,n)}catch(o){i=o}s(i)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!$.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return $.isBuffer(r)||(r=$.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let s=this._state.squeeze(r);return n!==void 0&&(s=s.toString(n)),s}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new al(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const of=rf,af=sf;var cf=function(e){const t=of(e),r=af(e);return function(n,s){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,s);case"keccak256":return new t(1088,512,null,256,s);case"keccak384":return new t(832,768,null,384,s);case"keccak512":return new t(576,1024,null,512,s);case"sha3-224":return new t(1152,448,6,224,s);case"sha3-256":return new t(1088,512,6,256,s);case"sha3-384":return new t(832,768,6,384,s);case"sha3-512":return new t(576,1024,6,512,s);case"shake128":return new r(1344,256,31,s);case"shake256":return new r(1088,512,31,s);default:throw new Error("Invald algorithm: "+n)}}},cl={};const pa=[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];cl.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],i=e[3]^e[13]^e[23]^e[33]^e[43],o=e[4]^e[14]^e[24]^e[34]^e[44],a=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],u=e[9]^e[19]^e[29]^e[39]^e[49];let h=d^(s<<1|i>>>31),f=u^(i<<1|s>>>31);const p=e[0]^h,y=e[1]^f,g=e[10]^h,b=e[11]^f,m=e[20]^h,_=e[21]^f,L=e[30]^h,v=e[31]^f,R=e[40]^h,U=e[41]^f;h=r^(o<<1|a>>>31),f=n^(a<<1|o>>>31);const Z=e[2]^h,te=e[3]^f,G=e[12]^h,z=e[13]^f,V=e[22]^h,E=e[23]^f,w=e[32]^h,I=e[33]^f,k=e[42]^h,A=e[43]^f;h=s^(l<<1|c>>>31),f=i^(c<<1|l>>>31);const C=e[4]^h,M=e[5]^f,H=e[14]^h,O=e[15]^f,q=e[24]^h,de=e[25]^f,Q=e[34]^h,Ge=e[35]^f,Kn=e[44]^h,Eo=e[45]^f;h=o^(d<<1|u>>>31),f=a^(u<<1|d>>>31);const So=e[6]^h,Co=e[7]^f,ko=e[16]^h,Ro=e[17]^f,Io=e[26]^h,Ao=e[27]^f,No=e[36]^h,Lo=e[37]^f,To=e[46]^h,Mo=e[47]^f;h=l^(r<<1|n>>>31),f=c^(n<<1|r>>>31);const Po=e[8]^h,Oo=e[9]^f,$o=e[18]^h,xo=e[19]^f,Fo=e[28]^h,jo=e[29]^f,Bo=e[38]^h,Do=e[39]^f,Ho=e[48]^h,Uo=e[49]^f,Xn=p,Yn=y,es=b<<4|g>>>28,ts=g<<4|b>>>28,rs=m<<3|_>>>29,ns=_<<3|m>>>29,ss=v<<9|L>>>23,is=L<<9|v>>>23,os=R<<18|U>>>14,as=U<<18|R>>>14,cs=Z<<1|te>>>31,ls=te<<1|Z>>>31,us=z<<12|G>>>20,ds=G<<12|z>>>20,hs=V<<10|E>>>22,fs=E<<10|V>>>22,ps=I<<13|w>>>19,gs=w<<13|I>>>19,ms=k<<2|A>>>30,_s=A<<2|k>>>30,bs=M<<30|C>>>2,ys=C<<30|M>>>2,ws=H<<6|O>>>26,vs=O<<6|H>>>26,Es=de<<11|q>>>21,Ss=q<<11|de>>>21,Cs=Q<<15|Ge>>>17,ks=Ge<<15|Q>>>17,Rs=Eo<<29|Kn>>>3,Is=Kn<<29|Eo>>>3,As=So<<28|Co>>>4,Ns=Co<<28|So>>>4,Ls=Ro<<23|ko>>>9,Ts=ko<<23|Ro>>>9,Ms=Io<<25|Ao>>>7,Ps=Ao<<25|Io>>>7,Os=No<<21|Lo>>>11,$s=Lo<<21|No>>>11,xs=Mo<<24|To>>>8,Fs=To<<24|Mo>>>8,js=Po<<27|Oo>>>5,Bs=Oo<<27|Po>>>5,Ds=$o<<20|xo>>>12,Hs=xo<<20|$o>>>12,Us=jo<<7|Fo>>>25,Vs=Fo<<7|jo>>>25,Ws=Bo<<8|Do>>>24,zs=Do<<8|Bo>>>24,qs=Ho<<14|Uo>>>18,Js=Uo<<14|Ho>>>18;e[0]=Xn^~us&Es,e[1]=Yn^~ds&Ss,e[10]=As^~Ds&rs,e[11]=Ns^~Hs&ns,e[20]=cs^~ws&Ms,e[21]=ls^~vs&Ps,e[30]=js^~es&hs,e[31]=Bs^~ts&fs,e[40]=bs^~Ls&Us,e[41]=ys^~Ts&Vs,e[2]=us^~Es&Os,e[3]=ds^~Ss&$s,e[12]=Ds^~rs&ps,e[13]=Hs^~ns&gs,e[22]=ws^~Ms&Ws,e[23]=vs^~Ps&zs,e[32]=es^~hs&Cs,e[33]=ts^~fs&ks,e[42]=Ls^~Us&ss,e[43]=Ts^~Vs&is,e[4]=Es^~Os&qs,e[5]=Ss^~$s&Js,e[14]=rs^~ps&Rs,e[15]=ns^~gs&Is,e[24]=Ms^~Ws&os,e[25]=Ps^~zs&as,e[34]=hs^~Cs&xs,e[35]=fs^~ks&Fs,e[44]=Us^~ss&ms,e[45]=Vs^~is&_s,e[6]=Os^~qs&Xn,e[7]=$s^~Js&Yn,e[16]=ps^~Rs&As,e[17]=gs^~Is&Ns,e[26]=Ws^~os&cs,e[27]=zs^~as&ls,e[36]=Cs^~xs&js,e[37]=ks^~Fs&Bs,e[46]=ss^~ms&bs,e[47]=is^~_s&ys,e[8]=qs^~Xn&us,e[9]=Js^~Yn&ds,e[18]=Rs^~As&Ds,e[19]=Is^~Ns&Hs,e[28]=os^~cs&ws,e[29]=as^~ls&vs,e[38]=xs^~js&es,e[39]=Fs^~Bs&ts,e[48]=ms^~bs&Ls,e[49]=_s^~ys&Ts,e[0]^=pa[t*2],e[1]^=pa[t*2+1]}};const Kr=cl;function Jt(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Jt.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Jt.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(Kr.p1600(this.state),this.count=0)};Jt.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&Kr.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),Kr.p1600(this.state),this.count=0,this.squeezing=!0};Jt.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=$.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Kr.p1600(this.state),this.count=0);return t};Jt.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var lf=Jt,uf=cf(lf);const df=uf,hf=nn;function ll(e){return $.allocUnsafe(e).fill(0)}function ul(e,t,r){const n=ll(t);return e=Nn(e),r?e.length<t?(e.copy(n),n):e.slice(0,t):e.length<t?(e.copy(n,t-e.length),n):e.slice(-t)}function ff(e,t){return ul(e,t,!0)}function Nn(e){if(!$.isBuffer(e))if(Array.isArray(e))e=$.from(e);else if(typeof e=="string")dl(e)?e=$.from(mf(hl(e)),"hex"):e=$.from(e);else if(typeof e=="number")e=intToBuffer(e);else if(e==null)e=$.allocUnsafe(0);else if(hf.isBN(e))e=e.toArrayLike($);else if(e.toArray)e=$.from(e.toArray());else throw new Error("invalid type");return e}function pf(e){return e=Nn(e),"0x"+e.toString("hex")}function gf(e,t){return e=Nn(e),t||(t=256),df("keccak"+t).update(e).digest()}function mf(e){return e.length%2?"0"+e:e}function dl(e){return typeof e=="string"&&e.match(/^0x[0-9A-Fa-f]*$/)}function hl(e){return typeof e=="string"&&e.startsWith("0x")?e.slice(2):e}var fl={zeros:ll,setLength:ul,setLengthRight:ff,isHexString:dl,stripHexPrefix:hl,toBuffer:Nn,bufferToHex:pf,keccak:gf};const ft=fl,lt=nn;function pl(e){return e.startsWith("int[")?"int256"+e.slice(3):e==="int"?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):e==="uint"?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):e==="fixed"?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):e==="ufixed"?"ufixed128x128":e}function Lt(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function ga(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function gl(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?t[2]===""?"dynamic":parseInt(t[2],10):null}function ot(e){var t=typeof e;if(t==="string")return ft.isHexString(e)?new lt(ft.stripHexPrefix(e),16):new lt(e,10);if(t==="number")return new lt(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function $e(e,t){var r,n,s,i;if(e==="address")return $e("uint160",ot(t));if(e==="bool")return $e("uint8",t?1:0);if(e==="string")return $e("bytes",new $(t,"utf8"));if(bf(e)){if(typeof t.length>"u")throw new Error("Not an array?");if(r=gl(e),r!=="dynamic"&&r!==0&&t.length>r)throw new Error("Elements exceed array size: "+r);s=[],e=e.slice(0,e.lastIndexOf("[")),typeof t=="string"&&(t=JSON.parse(t));for(i in t)s.push($e(e,t[i]));if(r==="dynamic"){var o=$e("uint256",t.length);s.unshift(o)}return $.concat(s)}else{if(e==="bytes")return t=new $(t),s=$.concat([$e("uint256",t.length),t]),t.length%32!==0&&(s=$.concat([s,ft.zeros(32-t.length%32)])),s;if(e.startsWith("bytes")){if(r=Lt(e),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return ft.setLengthRight(t,32)}else if(e.startsWith("uint")){if(r=Lt(e),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=ot(t),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike($,"be",32)}else if(e.startsWith("int")){if(r=Lt(e),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=ot(t),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike($,"be",32)}else if(e.startsWith("ufixed")){if(r=ga(e),n=ot(t),n<0)throw new Error("Supplied ufixed is negative");return $e("uint256",n.mul(new lt(2).pow(new lt(r[1]))))}else if(e.startsWith("fixed"))return r=ga(e),$e("int256",ot(t).mul(new lt(2).pow(new lt(r[1]))))}throw new Error("Unsupported or invalid type: "+e)}function _f(e){return e==="string"||e==="bytes"||gl(e)==="dynamic"}function bf(e){return e.lastIndexOf("]")===e.length-1}function yf(e,t){var r=[],n=[],s=32*e.length;for(var i in e){var o=pl(e[i]),a=t[i],l=$e(o,a);_f(o)?(r.push($e("uint256",s)),n.push(l),s+=l.length):r.push(l)}return $.concat(r.concat(n))}function ml(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var r,n,s=[],i=0;i<e.length;i++){var o=pl(e[i]),a=t[i];if(o==="bytes")s.push(a);else if(o==="string")s.push(new $(a,"utf8"));else if(o==="bool")s.push(new $(a?"01":"00","hex"));else if(o==="address")s.push(ft.setLength(a,20));else if(o.startsWith("bytes")){if(r=Lt(o),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);s.push(ft.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=Lt(o),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=ot(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());s.push(n.toArrayLike($,"be",r/8))}else if(o.startsWith("int")){if(r=Lt(o),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=ot(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());s.push(n.toTwos(r).toArrayLike($,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return $.concat(s)}function wf(e,t){return ft.keccak(ml(e,t))}var vf={rawEncode:yf,solidityPack:ml,soliditySHA3:wf};const Ae=fl,sr=vf,_l={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},ri={encodeData(e,t,r,n=!0){const s=["bytes32"],i=[this.hashType(e,r)];if(n){const o=(a,l,c)=>{if(r[l]!==void 0)return["bytes32",c==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Ae.keccak(this.encodeData(l,c,r,n))];if(c===void 0)throw new Error(`missing value for field ${a} of type ${l}`);if(l==="bytes")return["bytes32",Ae.keccak(c)];if(l==="string")return typeof c=="string"&&(c=$.from(c,"utf8")),["bytes32",Ae.keccak(c)];if(l.lastIndexOf("]")===l.length-1){const d=l.slice(0,l.lastIndexOf("[")),u=c.map(h=>o(a,d,h));return["bytes32",Ae.keccak(sr.rawEncode(u.map(([h])=>h),u.map(([,h])=>h)))]}return[l,c]};for(const a of r[e]){const[l,c]=o(a.name,a.type,t[a.name]);s.push(l),i.push(c)}}else for(const o of r[e]){let a=t[o.name];if(a!==void 0)if(o.type==="bytes")s.push("bytes32"),a=Ae.keccak(a),i.push(a);else if(o.type==="string")s.push("bytes32"),typeof a=="string"&&(a=$.from(a,"utf8")),a=Ae.keccak(a),i.push(a);else if(r[o.type]!==void 0)s.push("bytes32"),a=Ae.keccak(this.encodeData(o.type,a,r,n)),i.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(o.type),i.push(a)}}return sr.rawEncode(s,i)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter(s=>s!==e);n=[e].concat(n.sort());for(const s of n){if(!t[s])throw new Error("No type definition specified: "+s);r+=s+"("+t[s].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||t[e]===void 0)return r;r.push(e);for(const n of t[e])for(const s of this.findTypeDependencies(n.type,t,r))!r.includes(s)&&r.push(s);return r},hashStruct(e,t,r,n=!0){return Ae.keccak(this.encodeData(e,t,r,n))},hashType(e,t){return Ae.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const r in _l.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){const r=this.sanitizeData(e),n=[$.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,t)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,t)),Ae.keccak($.concat(n))}};var Ef={TYPED_MESSAGE_SCHEMA:_l,TypedDataUtils:ri,hashForSignTypedDataLegacy:function(e){return Sf(e.data)},hashForSignTypedData_v3:function(e){return ri.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return ri.hash(e.data)}};function Sf(e){const t=new Error("Expect argument to be non-empty array");if(typeof e!="object"||!e.length)throw t;const r=e.map(function(i){return i.type==="bytes"?Ae.toBuffer(i.value):i.value}),n=e.map(function(i){return i.type}),s=e.map(function(i){if(!i.name)throw t;return i.type+" "+i.name});return sr.soliditySHA3(["bytes32","bytes32"],[sr.soliditySHA3(new Array(e.length).fill("string"),s),sr.soliditySHA3(n,r)])}var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.filterFromParam=Bt.FilterPolyfill=void 0;const It=se,fe=S,Cf=5*60*1e3,at={jsonrpc:"2.0",id:0};class kf{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,It.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=t}async newFilter(t){const r=bl(t),n=this.makeFilterId(),s=await this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,"initial cursor position:",s),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,fe.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),r=await this.setInitialCursorPosition(t,"latest");return console.info(`Installing new block filter (${t}) with initial cursor position:`,r),this.blockFilters.add(t),this.setFilterTimeout(t),(0,fe.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),r=await this.setInitialCursorPosition(t,"latest");return console.info(`Installing new block filter (${t}) with initial cursor position:`,r),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,fe.hexStringFromIntNumber)(t)}uninstallFilter(t){const r=(0,fe.intNumberFromHexString)(t);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(t){const r=(0,fe.intNumberFromHexString)(t);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(Br())}async getFilterLogs(t){const r=(0,fe.intNumberFromHexString)(t),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},at),{method:"eth_getLogs",params:[ma(n)]})):Br()}makeFilterId(){return(0,It.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise((r,n)=>{this.provider.sendAsync(t,(s,i)=>{if(s)return n(s);if(Array.isArray(i)||i==null)return n(new Error(`unexpected response received: ${JSON.stringify(i)}`));r(i)})})}deleteFilter(t){console.info(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const r=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!r)return Br();const s=await this.getCurrentBlockHeight(),i=r.toBlock==="latest"?s:r.toBlock;if(n>s||n>Number(r.toBlock))return Dr();console.info(`Fetching logs from ${n} to ${i} for filter ${t}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},at),{method:"eth_getLogs",params:[ma(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:i}))]}));if(Array.isArray(o.result)){const a=o.result.map(c=>(0,fe.intNumberFromHexString)(c.blockNumber||"0x0")),l=Math.max(...a);if(l&&l>n){const c=(0,It.IntNumber)(l+1);console.info(`Moving cursor position for filter (${t}) from ${n} to ${c}`),this.cursors.set(t,c)}}return o}async getBlockFilterChanges(t){const r=this.cursors.get(t);if(!r)return Br();const n=await this.getCurrentBlockHeight();if(r>n)return Dr();console.info(`Fetching blocks from ${r} to ${n} for filter (${t})`);const s=(await Promise.all((0,fe.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,It.IntNumber)(o))))).filter(o=>!!o),i=(0,It.IntNumber)(r+s.length);return console.info(`Moving cursor position for filter (${t}) from ${r} to ${i}`),this.cursors.set(t,i),Object.assign(Object.assign({},at),{result:s})}async getPendingTransactionFilterChanges(t){return Promise.resolve(Dr())}async setInitialCursorPosition(t,r){const n=await this.getCurrentBlockHeight(),s=typeof r=="number"&&r>n?r:n;return this.cursors.set(t,s),s}setFilterTimeout(t){const r=this.timeouts.get(t);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.info(`Filter (${t}) timed out`),this.deleteFilter(t)},Cf);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const t=new Date;if(t.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=t;const r=await this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))}async _getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},at),{method:"eth_blockNumber",params:[]}));return(0,fe.intNumberFromHexString)((0,fe.ensureHexString)(t))}async getBlockHashByNumber(t){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},at),{method:"eth_getBlockByNumber",params:[(0,fe.hexStringFromIntNumber)(t),!1]}));return r.result&&typeof r.result.hash=="string"?(0,fe.ensureHexString)(r.result.hash):null}}Bt.FilterPolyfill=kf;function bl(e){return{fromBlock:_a(e.fromBlock),toBlock:_a(e.toBlock),addresses:e.address===void 0?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}Bt.filterFromParam=bl;function ma(e){const t={fromBlock:ba(e.fromBlock),toBlock:ba(e.toBlock),topics:e.topics};return e.addresses!==null&&(t.address=e.addresses),t}function _a(e){if(e===void 0||e==="latest"||e==="pending")return"latest";if(e==="earliest")return(0,It.IntNumber)(0);if((0,fe.isHexString)(e))return(0,fe.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${String(e)}`)}function ba(e){return e==="latest"?e:(0,fe.hexStringFromIntNumber)(e)}function Br(){return Object.assign(Object.assign({},at),{error:{code:-32e3,message:"filter not found"}})}function Dr(){return Object.assign(Object.assign({},at),{result:[]})}var Ln={},yl={},Tn={},Gi=Rf;function Rf(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const ya=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let s=0;s<arguments.length;s++)n[s]=arguments[s];return new r((s,i)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){const l=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)l[c-1]=arguments[c];o?(l.unshift(o),i(l)):s(l)}else o?i(o):s(a)}):n.push(function(o){if(t.multiArgs){const a=new Array(arguments.length-1);for(let l=0;l<arguments.length;l++)a[l]=arguments[l];s(a)}else s(o)}),e.apply(this,n)})};var If=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=s=>{const i=o=>typeof o=="string"?s===o:o.test(s);return t.include?t.include.some(i):!t.exclude.some(i)};let n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):ya(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(const s in e){const i=e[s];n[s]=typeof i=="function"&&r(s)?ya(i,t):i}return n},Sr={},Cr={};Object.defineProperty(Cr,"__esModule",{value:!0});const Af=mc;function wa(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function Nf(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}let Lf=class extends Af.EventEmitter{emit(t,...r){let n=t==="error";const s=this._events;if(s!==void 0)n=n&&s.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const i=s[t];if(i===void 0)return!1;if(typeof i=="function")wa(i,this,r);else{const o=i.length,a=Nf(i);for(let l=0;l<o;l+=1)wa(a[l],this,r)}return!0}};Cr.default=Lf;var Tf=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.BaseBlockTracker=void 0;const Mf=Tf(Cr),Pf=1e3,Of=(e,t)=>e+t,va=["sync","latest"];class $f extends Mf.default{constructor(t){super(),this._blockResetDuration=t.blockResetDuration||20*Pf,this._usePastBlocks=t.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(t){return t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t){va.includes(t)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return va.map(t=>this.listenerCount(t)).reduce(Of)}_shouldUseNewBlock(t){const r=this._currentBlock;if(!r)return!0;const n=Ea(t),s=Ea(r);return this._usePastBlocks&&n<s||n>s}_newPotentialLatest(t){this._shouldUseNewBlock(t)&&this._setCurrentBlock(t)}_setCurrentBlock(t){const r=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:r,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}Sr.BaseBlockTracker=$f;function Ea(e){return Number.parseInt(e,16)}var wl={},vl={},ue={};class El extends TypeError{constructor(t,r){let n;const{message:s,explanation:i,...o}=t,{path:a}=t,l=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??l),i!=null&&(this.cause=l),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function xf(e){return Re(e)&&typeof e[Symbol.iterator]=="function"}function Re(e){return typeof e=="object"&&e!=null}function Sa(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function ie(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Ff(e){const{done:t,value:r}=e.next();return t?void 0:r}function jf(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:s,branch:i}=t,{type:o}=r,{refinement:a,message:l=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${ie(n)}\``}=e;return{value:n,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...e,message:l}}function*Si(e,t,r,n){xf(e)||(e=[e]);for(const s of e){const i=jf(s,t,r,n);i&&(yield i)}}function*Zi(e,t,r={}){const{path:n=[],branch:s=[e],coerce:i=!1,mask:o=!1}=r,a={path:n,branch:s};if(i&&(e=t.coercer(e,a),o&&t.type!=="type"&&Re(t.schema)&&Re(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,a))c.explanation=r.message,l="not_valid",yield[c,void 0];for(let[c,d,u]of t.entries(e,a)){const h=Zi(d,u,{path:c===void 0?n:[...n,c],branch:c===void 0?s:[...s,d],coerce:i,mask:o,message:r.message});for(const f of h)f[0]?(l=f[0].refinement!=null?"not_refined":"not_valid",yield[f[0],void 0]):i&&(d=f[1],c===void 0?e=d:e instanceof Map?e.set(c,d):e instanceof Set?e.add(d):Re(e)&&(d!==void 0||c in e)&&(e[c]=d))}if(l!=="not_valid")for(const c of t.refiner(e,a))c.explanation=r.message,l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class re{constructor(t){const{type:r,schema:n,validator:s,refiner:i,coercer:o=l=>l,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,s?this.validator=(l,c)=>{const d=s(l,c);return Si(d,c,this,l)}:this.validator=()=>[],i?this.refiner=(l,c)=>{const d=i(l,c);return Si(d,c,this,l)}:this.refiner=()=>[]}assert(t,r){return Sl(t,this,r)}create(t,r){return Cl(t,this,r)}is(t){return Qi(t,this)}mask(t,r){return kl(t,this,r)}validate(t,r={}){return Gt(t,this,r)}}function Sl(e,t,r){const n=Gt(e,t,{message:r});if(n[0])throw n[0]}function Cl(e,t,r){const n=Gt(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function kl(e,t,r){const n=Gt(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Qi(e,t){return!Gt(e,t)[0]}function Gt(e,t,r={}){const n=Zi(e,t,r),s=Ff(n);return s[0]?[new El(s[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Bf(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),n=Object.assign({},...r);return t?Rr(n):kr(n)}function _e(e,t){return new re({type:e,schema:null,validator:t})}function Df(e,t){return new re({...e,refiner:(r,n)=>r===void 0||e.refiner(r,n),validator(r,n){return r===void 0?!0:(t(r,n),e.validator(r,n))}})}function Hf(e){return new re({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function Uf(e){let t;return new re({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator(r,n){return t??(t=e()),t.validator(r,n)},coercer(r,n){return t??(t=e()),t.coercer(r,n)},refiner(r,n){return t??(t=e()),t.refiner(r,n)}})}function Vf(e,t){const{schema:r}=e,n={...r};for(const s of t)delete n[s];switch(e.type){case"type":return Rr(n);default:return kr(n)}}function Wf(e){const t=e instanceof re,r=t?{...e.schema}:{...e};for(const n in r)r[n]=Rl(r[n]);return t&&e.type==="type"?Rr(r):kr(r)}function zf(e,t){const{schema:r}=e,n={};for(const s of t)n[s]=r[s];switch(e.type){case"type":return Rr(n);default:return kr(n)}}function qf(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_e(e,t)}function Jf(){return _e("any",()=>!0)}function Gf(e){return new re({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ie(t)}`}})}function Zf(){return _e("bigint",e=>typeof e=="bigint")}function Qf(){return _e("boolean",e=>typeof e=="boolean")}function Kf(){return _e("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${ie(e)}`)}function Xf(e){const t={},r=e.map(n=>ie(n)).join();for(const n of e)t[n]=n;return new re({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${ie(n)}`}})}function Yf(){return _e("func",e=>typeof e=="function"||`Expected a function, but received: ${ie(e)}`)}function e0(e){return _e("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ie(t)}`)}function t0(){return _e("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${ie(e)}`)}function r0(e){return new re({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function n0(e){const t=ie(e),r=typeof e;return new re({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${ie(n)}`}})}function s0(e,t){return new re({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,s]of r.entries())yield[n,n,e],yield[n,s,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${ie(r)}`}})}function Ki(){return _e("never",()=>!1)}function i0(e){return new re({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function o0(){return _e("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ie(e)}`)}function kr(e){const t=e?Object.keys(e):[],r=Ki();return new re({type:"object",schema:e||null,*entries(n){if(e&&Re(n)){const s=new Set(Object.keys(n));for(const i of t)s.delete(i),yield[i,n[i],e[i]];for(const i of s)yield[i,n[i],r]}},validator(n){return Re(n)||`Expected an object, but received: ${ie(n)}`},coercer(n){return Re(n)?{...n}:n}})}function Rl(e){return new re({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function a0(e,t){return new re({type:"record",schema:null,*entries(r){if(Re(r))for(const n in r){const s=r[n];yield[n,n,e],yield[n,s,t]}},validator(r){return Re(r)||`Expected an object, but received: ${ie(r)}`}})}function c0(){return _e("regexp",e=>e instanceof RegExp)}function l0(e){return new re({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${ie(t)}`}})}function Il(){return _e("string",e=>typeof e=="string"||`Expected a string, but received: ${ie(e)}`)}function u0(e){const t=Ki();return new re({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let s=0;s<n;s++)yield[s,r[s],e[s]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${ie(r)}`}})}function Rr(e){const t=Object.keys(e);return new re({type:"type",schema:e,*entries(r){if(Re(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return Re(r)||`Expected an object, but received: ${ie(r)}`},coercer(r){return Re(r)?{...r}:r}})}function d0(e){const t=e.map(r=>r.type).join(" | ");return new re({type:"union",schema:null,coercer(r){for(const n of e){const[s,i]=n.validate(r,{coerce:!0});if(!s)return i}return r},validator(r,n){const s=[];for(const i of e){const[...o]=Zi(r,i,n),[a]=o;if(a[0])for(const[l]of o)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ie(r)}`,...s]}})}function Al(){return _e("unknown",()=>!0)}function Xi(e,t,r){return new re({...e,coercer:(n,s)=>Qi(n,t)?e.coercer(r(n,s),s):e.coercer(n,s)})}function h0(e,t,r={}){return Xi(e,Al(),n=>{const s=typeof t=="function"?t():t;if(n===void 0)return s;if(!r.strict&&Sa(n)&&Sa(s)){const i={...n};let o=!1;for(const a in s)i[a]===void 0&&(i[a]=s[a],o=!0);if(o)return i}return n})}function f0(e){return Xi(e,Il(),t=>t.trim())}function p0(e){return bt(e,"empty",t=>{const r=Nl(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function Nl(e){return e instanceof Map||e instanceof Set?e.size:e.length}function g0(e,t,r={}){const{exclusive:n}=r;return bt(e,"max",s=>n?s<t:s<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${s}\``)}function m0(e,t,r={}){const{exclusive:n}=r;return bt(e,"min",s=>n?s>t:s>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${s}\``)}function _0(e){return bt(e,"nonempty",t=>Nl(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function b0(e,t){return bt(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function y0(e,t,r=t){const n=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return bt(e,"size",i=>{if(typeof i=="number"||i instanceof Date)return t<=i&&i<=r||`${n} ${s} but received \`${i}\``;if(i instanceof Map||i instanceof Set){const{size:o}=i;return t<=o&&o<=r||`${n} with a size ${s} but received one with a size of \`${o}\``}else{const{length:o}=i;return t<=o&&o<=r||`${n} with a length ${s} but received one with a length of \`${o}\``}})}function bt(e,t,r){return new re({...e,*refiner(n,s){yield*e.refiner(n,s);const i=r(n,s),o=Si(i,s,e,n);for(const a of o)yield{...a,refinement:t}}})}const w0=Object.freeze(Object.defineProperty({__proto__:null,Struct:re,StructError:El,any:Jf,array:Gf,assert:Sl,assign:Bf,bigint:Zf,boolean:Qf,coerce:Xi,create:Cl,date:Kf,defaulted:h0,define:_e,deprecated:Df,dynamic:Hf,empty:p0,enums:Xf,func:Yf,instance:e0,integer:t0,intersection:r0,is:Qi,lazy:Uf,literal:n0,map:s0,mask:kl,max:g0,min:m0,never:Ki,nonempty:_0,nullable:i0,number:o0,object:kr,omit:Vf,optional:Rl,partial:Wf,pattern:b0,pick:zf,record:a0,refine:bt,regexp:c0,set:l0,size:y0,string:Il,struct:qf,trimmed:f0,tuple:u0,type:Rr,union:d0,unknown:Al,validate:Gt},Symbol.toStringTag,{value:"Module"})),yt=sn(w0);Object.defineProperty(ue,"__esModule",{value:!0});ue.assertExhaustive=ue.assertStruct=ue.assert=ue.AssertionError=void 0;const v0=yt;function E0(e){return typeof e=="object"&&e!==null&&"message"in e}function S0(e){var t,r;return typeof((r=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function C0(e){const t=E0(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function Ll(e,t){return S0(e)?new e({message:t}):e({message:t})}class Yi extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}ue.AssertionError=Yi;function k0(e,t="Assertion failed.",r=Yi){if(!e)throw t instanceof Error?t:Ll(r,t)}ue.assert=k0;function R0(e,t,r="Assertion failed",n=Yi){try{(0,v0.assert)(e,t)}catch(s){throw Ll(n,`${r}: ${C0(s)}.`)}}ue.assertStruct=R0;function I0(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}ue.assertExhaustive=I0;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.base64=void 0;const A0=yt,N0=ue,L0=(e,t={})=>{var r,n;const s=(r=t.paddingRequired)!==null&&r!==void 0?r:!1,i=(n=t.characterSet)!==null&&n!==void 0?n:"base64";let o;i==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,N0.assert)(i==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return s?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,A0.pattern)(e,a)};Ir.base64=L0;var B={},Ar={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=yt,r=ue;e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function n(c){return(0,t.is)(c,e.HexStruct)}e.isHexString=n;function s(c){return(0,t.is)(c,e.StrictHexStruct)}e.isStrictHexString=s;function i(c){(0,r.assert)(n(c),"Value must be a hexadecimal string.")}e.assertIsHexString=i;function o(c){(0,r.assert)(s(c),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function a(c){return c.startsWith("0x")?c:c.startsWith("0X")?`0x${c.substring(2)}`:`0x${c}`}e.add0x=a;function l(c){return c.startsWith("0x")||c.startsWith("0X")?c.substring(2):c}e.remove0x=l})(Ar);Object.defineProperty(B,"__esModule",{value:!0});B.createDataView=B.concatBytes=B.valueToBytes=B.stringToBytes=B.numberToBytes=B.signedBigIntToBytes=B.bigIntToBytes=B.hexToBytes=B.bytesToString=B.bytesToNumber=B.bytesToSignedBigInt=B.bytesToBigInt=B.bytesToHex=B.assertIsBytes=B.isBytes=void 0;const we=ue,Ci=Ar,Ca=48,ka=58,Ra=87;function T0(){const e=[];return()=>{if(e.length===0)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const M0=T0();function eo(e){return e instanceof Uint8Array}B.isBytes=eo;function Zt(e){(0,we.assert)(eo(e),"Value must be a Uint8Array.")}B.assertIsBytes=Zt;function Tl(e){if(Zt(e),e.length===0)return"0x";const t=M0(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,Ci.add0x)(r.join(""))}B.bytesToHex=Tl;function Ml(e){Zt(e);const t=Tl(e);return BigInt(t)}B.bytesToBigInt=Ml;function P0(e){Zt(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(e.length*8,t)}B.bytesToSignedBigInt=P0;function O0(e){Zt(e);const t=Ml(e);return(0,we.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}B.bytesToNumber=O0;function $0(e){return Zt(e),new TextDecoder().decode(e)}B.bytesToString=$0;function Mn(e){var t;if(((t=e==null?void 0:e.toLowerCase)===null||t===void 0?void 0:t.call(e))==="0x")return new Uint8Array;(0,Ci.assertIsHexString)(e);const r=(0,Ci.remove0x)(e).toLowerCase(),n=r.length%2===0?r:`0${r}`,s=new Uint8Array(n.length/2);for(let i=0;i<s.length;i++){const o=n.charCodeAt(i*2),a=n.charCodeAt(i*2+1),l=o-(o<ka?Ca:Ra),c=a-(a<ka?Ca:Ra);s[i]=l*16+c}return s}B.hexToBytes=Mn;function Pl(e){(0,we.assert)(typeof e=="bigint","Value must be a bigint."),(0,we.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return Mn(t)}B.bigIntToBytes=Pl;function x0(e,t){(0,we.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function F0(e,t){(0,we.assert)(typeof e=="bigint","Value must be a bigint."),(0,we.assert)(typeof t=="number","Byte length must be a number."),(0,we.assert)(t>0,"Byte length must be greater than 0."),(0,we.assert)(x0(e,t),"Byte length is too small to represent the given value.");let r=e;const n=new Uint8Array(t);for(let s=0;s<n.length;s++)n[s]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()}B.signedBigIntToBytes=F0;function Ol(e){(0,we.assert)(typeof e=="number","Value must be a number."),(0,we.assert)(e>=0,"Value must be a non-negative number."),(0,we.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return Mn(t)}B.numberToBytes=Ol;function $l(e){return(0,we.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}B.stringToBytes=$l;function xl(e){if(typeof e=="bigint")return Pl(e);if(typeof e=="number")return Ol(e);if(typeof e=="string")return e.startsWith("0x")?Mn(e):$l(e);if(eo(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}B.valueToBytes=xl;function j0(e){const t=new Array(e.length);let r=0;for(let s=0;s<e.length;s++){const i=xl(e[s]);t[s]=i,r+=i.length}const n=new Uint8Array(r);for(let s=0,i=0;s<t.length;s++)n.set(t[s],i),i+=t[s].length;return n}B.concatBytes=j0;function B0(e){if(typeof $<"u"&&e instanceof $){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}B.createDataView=B0;var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ChecksumStruct=void 0;const Ia=yt,D0=Ir;Pn.ChecksumStruct=(0,Ia.size)((0,D0.base64)((0,Ia.string)(),{paddingRequired:!0}),44,44);var De={};Object.defineProperty(De,"__esModule",{value:!0});De.createHex=De.createBytes=De.createBigInt=De.createNumber=void 0;const ee=yt,H0=ue,Fl=B,On=Ar,jl=(0,ee.union)([(0,ee.number)(),(0,ee.bigint)(),(0,ee.string)(),On.StrictHexStruct]),U0=(0,ee.coerce)((0,ee.number)(),jl,Number),V0=(0,ee.coerce)((0,ee.bigint)(),jl,BigInt);(0,ee.union)([On.StrictHexStruct,(0,ee.instance)(Uint8Array)]);const W0=(0,ee.coerce)((0,ee.instance)(Uint8Array),(0,ee.union)([On.StrictHexStruct]),Fl.hexToBytes),z0=(0,ee.coerce)(On.StrictHexStruct,(0,ee.instance)(Uint8Array),Fl.bytesToHex);function q0(e){try{const t=(0,ee.create)(e,U0);return(0,H0.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof ee.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}De.createNumber=q0;function J0(e){try{return(0,ee.create)(e,V0)}catch(t){throw t instanceof ee.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}De.createBigInt=J0;function G0(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,ee.create)(e,W0)}catch(t){throw t instanceof ee.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}De.createBytes=G0;function Z0(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,ee.create)(e,z0)}catch(t){throw t instanceof ee.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}De.createHex=Z0;var Dt={},Bl=N&&N.__classPrivateFieldSet||function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},pe=N&&N.__classPrivateFieldGet||function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Ie,Pe;Object.defineProperty(Dt,"__esModule",{value:!0});Dt.FrozenSet=Dt.FrozenMap=void 0;class to{constructor(t){Ie.set(this,void 0),Bl(this,Ie,new Map(t),"f"),Object.freeze(this)}get size(){return pe(this,Ie,"f").size}[(Ie=new WeakMap,Symbol.iterator)](){return pe(this,Ie,"f")[Symbol.iterator]()}entries(){return pe(this,Ie,"f").entries()}forEach(t,r){return pe(this,Ie,"f").forEach((n,s,i)=>t.call(r,n,s,this))}get(t){return pe(this,Ie,"f").get(t)}has(t){return pe(this,Ie,"f").has(t)}keys(){return pe(this,Ie,"f").keys()}values(){return pe(this,Ie,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}Dt.FrozenMap=to;class ro{constructor(t){Pe.set(this,void 0),Bl(this,Pe,new Set(t),"f"),Object.freeze(this)}get size(){return pe(this,Pe,"f").size}[(Pe=new WeakMap,Symbol.iterator)](){return pe(this,Pe,"f")[Symbol.iterator]()}entries(){return pe(this,Pe,"f").entries()}forEach(t,r){return pe(this,Pe,"f").forEach((n,s,i)=>t.call(r,n,s,this))}has(t){return pe(this,Pe,"f").has(t)}keys(){return pe(this,Pe,"f").keys()}values(){return pe(this,Pe,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}Dt.FrozenSet=ro;Object.freeze(to);Object.freeze(to.prototype);Object.freeze(ro);Object.freeze(ro.prototype);var Dl={};Object.defineProperty(Dl,"__esModule",{value:!0});var Hl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=yt,r=ue,n=()=>(0,t.define)("finite number",v=>(0,t.is)(v,(0,t.number)())&&Number.isFinite(v));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),n(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(v,R)=>{function U(Z,te){const z=[...te.validator(Z,R)];return z.length>0?z:!0}try{const Z=U(v,e.UnsafeJsonStruct);return Z!==!0?Z:U(JSON.parse(JSON.stringify(v)),e.UnsafeJsonStruct)}catch(Z){return Z instanceof RangeError?"Circular reference detected":!1}});function s(v){return(0,t.is)(v,e.JsonStruct)}e.isValidJson=s;function i(v){(0,r.assertStruct)(v,e.JsonStruct,"Invalid JSON value");const R=JSON.stringify(v);return new TextEncoder().encode(R).byteLength}e.getJsonSize=i,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function o(v){return(0,t.is)(v,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=o;function a(v,R){(0,r.assertStruct)(v,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",R)}e.assertIsJsonRpcNotification=a;function l(v){return(0,t.is)(v,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=l;function c(v,R){(0,r.assertStruct)(v,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",R)}e.assertIsJsonRpcRequest=c,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function d(v){return(0,t.is)(v,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=d;function u(v,R){(0,r.assertStruct)(v,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",R)}e.assertIsPendingJsonRpcResponse=u;function h(v){return(0,t.is)(v,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=h;function f(v,R){(0,r.assertStruct)(v,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",R)}e.assertIsJsonRpcResponse=f;function p(v){return(0,t.is)(v,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=p;function y(v,R){(0,r.assertStruct)(v,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",R)}e.assertIsJsonRpcSuccess=y;function g(v){return(0,t.is)(v,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=g;function b(v,R){(0,r.assertStruct)(v,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",R)}e.assertIsJsonRpcFailure=b;function m(v){return(0,t.is)(v,e.JsonRpcErrorStruct)}e.isJsonRpcError=m;function _(v,R){(0,r.assertStruct)(v,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",R)}e.assertIsJsonRpcError=_;function L(v){const{permitEmptyString:R,permitFractions:U,permitNull:Z}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},v);return G=>!!(typeof G=="number"&&(U||Number.isInteger(G))||typeof G=="string"&&(R||G.length>0)||Z&&G===null)}e.getJsonRpcIdValidator=L})(Hl);var Ul={};Object.defineProperty(Ul,"__esModule",{value:!0});var Ht={},ki={exports:{}},ni,Aa;function Q0(){if(Aa)return ni;Aa=1;var e=1e3,t=e*60,r=t*60,n=r*24,s=n*7,i=n*365.25;ni=function(d,u){u=u||{};var h=typeof d;if(h==="string"&&d.length>0)return o(d);if(h==="number"&&isFinite(d))return u.long?l(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function o(d){if(d=String(d),!(d.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(u){var h=parseFloat(u[1]),f=(u[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*s;case"days":case"day":case"d":return h*n;case"hours":case"hour":case"hrs":case"hr":case"h":return h*r;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(d){var u=Math.abs(d);return u>=n?Math.round(d/n)+"d":u>=r?Math.round(d/r)+"h":u>=t?Math.round(d/t)+"m":u>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var u=Math.abs(d);return u>=n?c(d,u,n,"day"):u>=r?c(d,u,r,"hour"):u>=t?c(d,u,t,"minute"):u>=e?c(d,u,e,"second"):d+" ms"}function c(d,u,h,f){var p=u>=h*1.5;return Math.round(d/h)+" "+f+(p?"s":"")}return ni}function K0(e){r.debug=r,r.default=r,r.coerce=l,r.disable=i,r.enable=s,r.enabled=o,r.humanize=Q0(),r.destroy=c,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let u=0;for(let h=0;h<d.length;h++)u=(u<<5)-u+d.charCodeAt(h),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=t;function r(d){let u,h=null,f,p;function y(...g){if(!y.enabled)return;const b=y,m=Number(new Date),_=m-(u||m);b.diff=_,b.prev=u,b.curr=m,u=m,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let L=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(R,U)=>{if(R==="%%")return"%";L++;const Z=r.formatters[U];if(typeof Z=="function"){const te=g[L];R=Z.call(b,te),g.splice(L,1),L--}return R}),r.formatArgs.call(b,g),(b.log||r.log).apply(b,g)}return y.namespace=d,y.useColors=r.useColors(),y.color=r.selectColor(d),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(f!==r.namespaces&&(f=r.namespaces,p=r.enabled(d)),p),set:g=>{h=g}}),typeof r.init=="function"&&r.init(y),y}function n(d,u){const h=r(this.namespace+(typeof u>"u"?":":u)+d);return h.log=this.log,h}function s(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let u;const h=(typeof d=="string"?d:"").split(/[\s,]+/),f=h.length;for(u=0;u<f;u++)h[u]&&(d=h[u].replace(/\*/g,".*?"),d[0]==="-"?r.skips.push(new RegExp("^"+d.slice(1)+"$")):r.names.push(new RegExp("^"+d+"$")))}function i(){const d=[...r.names.map(a),...r.skips.map(a).map(u=>"-"+u)].join(",");return r.enable(""),d}function o(d){if(d[d.length-1]==="*")return!0;let u,h;for(u=0,h=r.skips.length;u<h;u++)if(r.skips[u].test(d))return!1;for(u=0,h=r.names.length;u<h;u++)if(r.names[u].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var X0=K0;(function(e,t){t.formatArgs=n,t.save=s,t.load=i,t.useColors=r,t.storage=o(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let d=0,u=0;l[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(d++,h==="%c"&&(u=d))}),l.splice(u,0,c)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof _i<"u"&&"env"in _i&&(l={}.DEBUG),l}function o(){try{return localStorage}catch{}}e.exports=X0(t);const{formatters:a}=e.exports;a.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(ki,ki.exports);var Y0=ki.exports,e1=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.createModuleLogger=Ht.createProjectLogger=void 0;const t1=e1(Y0),r1=(0,t1.default)("metamask");function n1(e){return r1.extend(e)}Ht.createProjectLogger=n1;function s1(e,t){return e.extend(t)}Ht.createModuleLogger=s1;var Vl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(c){return Array.isArray(c)&&c.length>0}e.isNonEmptyArray=t;function r(c){return c==null}e.isNullOrUndefined=r;function n(c){return!!c&&typeof c=="object"&&!Array.isArray(c)}e.isObject=n;const s=(c,d)=>Object.hasOwnProperty.call(c,d);e.hasProperty=s,function(c){c[c.Null=4]="Null",c[c.Comma=1]="Comma",c[c.Wrapper=1]="Wrapper",c[c.True=4]="True",c[c.False=5]="False",c[c.Quote=1]="Quote",c[c.Colon=1]="Colon",c[c.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function i(c){if(typeof c!="object"||c===null)return!1;try{let d=c;for(;Object.getPrototypeOf(d)!==null;)d=Object.getPrototypeOf(d);return Object.getPrototypeOf(c)===d}catch{return!1}}e.isPlainObject=i;function o(c){return c.charCodeAt(0)<=127}e.isASCII=o;function a(c){var d;return c.split("").reduce((h,f)=>o(f)?h+1:h+2,0)+((d=c.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&d!==void 0?d:[]).length}e.calculateStringSize=a;function l(c){return c.toString().length}e.calculateNumberSize=l})(Vl);var He={};Object.defineProperty(He,"__esModule",{value:!0});He.hexToBigInt=He.hexToNumber=He.bigIntToHex=He.numberToHex=void 0;const Tt=ue,cr=Ar,i1=e=>((0,Tt.assert)(typeof e=="number","Value must be a number."),(0,Tt.assert)(e>=0,"Value must be a non-negative number."),(0,Tt.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,cr.add0x)(e.toString(16)));He.numberToHex=i1;const o1=e=>((0,Tt.assert)(typeof e=="bigint","Value must be a bigint."),(0,Tt.assert)(e>=0,"Value must be a non-negative bigint."),(0,cr.add0x)(e.toString(16)));He.bigIntToHex=o1;const a1=e=>{(0,cr.assertIsHexString)(e);const t=parseInt(e,16);return(0,Tt.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};He.hexToNumber=a1;const c1=e=>((0,cr.assertIsHexString)(e),BigInt((0,cr.add0x)(e)));He.hexToBigInt=c1;var Wl={};Object.defineProperty(Wl,"__esModule",{value:!0});var zl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(i){i[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=i=>Number.isInteger(i)&&i>=0,r=(i,o)=>{if(!t(i))throw new Error(`"${o}" must be a non-negative integer. Received: "${i}".`)};function n(i,o){return r(i,"count"),i*o}e.inMilliseconds=n;function s(i){return r(i,"timestamp"),Date.now()-i}e.timeSince=s})(zl);var ql={};Object.defineProperty(ql,"__esModule",{value:!0});var Jl={},Ri={exports:{}};const l1="2.0.0",Gl=256,u1=Number.MAX_SAFE_INTEGER||9007199254740991,d1=16,h1=Gl-6,f1=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var $n={MAX_LENGTH:Gl,MAX_SAFE_COMPONENT_LENGTH:d1,MAX_SAFE_BUILD_LENGTH:h1,MAX_SAFE_INTEGER:u1,RELEASE_TYPES:f1,SEMVER_SPEC_VERSION:l1,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const p1=typeof _i=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var xn=p1;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=$n,i=xn;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],c=t.t={};let d=0;const u="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[u,n]],f=y=>{for(const[g,b]of h)y=y.split(`${g}*`).join(`${g}{0,${b}}`).split(`${g}+`).join(`${g}{1,${b}}`);return y},p=(y,g,b)=>{const m=f(g),_=d++;i(y,_,g),c[y]=_,l[_]=g,o[_]=new RegExp(g,b?"g":void 0),a[_]=new RegExp(m,b?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${u}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ri,Ri.exports);var Nr=Ri.exports;const g1=Object.freeze({loose:!0}),m1=Object.freeze({}),_1=e=>e?typeof e!="object"?g1:e:m1;var no=_1;const Na=/^[0-9]+$/,Zl=(e,t)=>{const r=Na.test(e),n=Na.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},b1=(e,t)=>Zl(t,e);var Ql={compareIdentifiers:Zl,rcompareIdentifiers:b1};const Hr=xn,{MAX_LENGTH:La,MAX_SAFE_INTEGER:Ur}=$n,{safeRe:Ta,t:Ma}=Nr,y1=no,{compareIdentifiers:Ct}=Ql;let w1=class Oe{constructor(t,r){if(r=y1(r),t instanceof Oe){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>La)throw new TypeError(`version is longer than ${La} characters`);Hr("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Ta[Ma.LOOSE]:Ta[Ma.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Ur||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ur||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ur||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i<Ur)return i}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Hr("SemVer.compare",this.version,this.options,t),!(t instanceof Oe)){if(typeof t=="string"&&t===this.version)return 0;t=new Oe(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Oe||(t=new Oe(t,this.options)),Ct(this.major,t.major)||Ct(this.minor,t.minor)||Ct(this.patch,t.patch)}comparePre(t){if(t instanceof Oe||(t=new Oe(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],s=t.prerelease[r];if(Hr("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return Ct(n,s)}while(++r)}compareBuild(t){t instanceof Oe||(t=new Oe(t,this.options));let r=0;do{const n=this.build[r],s=t.build[r];if(Hr("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return Ct(n,s)}while(++r)}inc(t,r,n){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),Ct(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var ge=w1;const Pa=ge,v1=(e,t,r=!1)=>{if(e instanceof Pa)return e;try{return new Pa(e,t)}catch(n){if(!r)return null;throw n}};var Qt=v1;const E1=Qt,S1=(e,t)=>{const r=E1(e,t);return r?r.version:null};var C1=S1;const k1=Qt,R1=(e,t)=>{const r=k1(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var I1=R1;const Oa=ge,A1=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new Oa(e instanceof Oa?e.version:e,r).inc(t,n,s).version}catch{return null}};var N1=A1;const $a=Qt,L1=(e,t)=>{const r=$a(e,null,!0),n=$a(t,null,!0),s=r.compare(n);if(s===0)return null;const i=s>0,o=i?r:n,a=i?n:r,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};var T1=L1;const M1=ge,P1=(e,t)=>new M1(e,t).major;var O1=P1;const $1=ge,x1=(e,t)=>new $1(e,t).minor;var F1=x1;const j1=ge,B1=(e,t)=>new j1(e,t).patch;var D1=B1;const H1=Qt,U1=(e,t)=>{const r=H1(e,t);return r&&r.prerelease.length?r.prerelease:null};var V1=U1;const xa=ge,W1=(e,t,r)=>new xa(e,r).compare(new xa(t,r));var Le=W1;const z1=Le,q1=(e,t,r)=>z1(t,e,r);var J1=q1;const G1=Le,Z1=(e,t)=>G1(e,t,!0);var Q1=Z1;const Fa=ge,K1=(e,t,r)=>{const n=new Fa(e,r),s=new Fa(t,r);return n.compare(s)||n.compareBuild(s)};var so=K1;const X1=so,Y1=(e,t)=>e.sort((r,n)=>X1(r,n,t));var ep=Y1;const tp=so,rp=(e,t)=>e.sort((r,n)=>tp(n,r,t));var np=rp;const sp=Le,ip=(e,t,r)=>sp(e,t,r)>0;var Fn=ip;const op=Le,ap=(e,t,r)=>op(e,t,r)<0;var io=ap;const cp=Le,lp=(e,t,r)=>cp(e,t,r)===0;var Kl=lp;const up=Le,dp=(e,t,r)=>up(e,t,r)!==0;var Xl=dp;const hp=Le,fp=(e,t,r)=>hp(e,t,r)>=0;var oo=fp;const pp=Le,gp=(e,t,r)=>pp(e,t,r)<=0;var ao=gp;const mp=Kl,_p=Xl,bp=Fn,yp=oo,wp=io,vp=ao,Ep=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return mp(e,r,n);case"!=":return _p(e,r,n);case">":return bp(e,r,n);case">=":return yp(e,r,n);case"<":return wp(e,r,n);case"<=":return vp(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var Yl=Ep;const Sp=ge,Cp=Qt,{safeRe:Vr,t:Wr}=Nr,kp=(e,t)=>{if(e instanceof Sp)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Vr[Wr.COERCEFULL]:Vr[Wr.COERCE]);else{const l=t.includePrerelease?Vr[Wr.COERCERTLFULL]:Vr[Wr.COERCERTL];let c;for(;(c=l.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||c.index+c[0].length!==r.index+r[0].length)&&(r=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(r===null)return null;const n=r[2],s=r[3]||"0",i=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Cp(`${n}.${s}.${i}${o}${a}`,t)};var Rp=kp,si,ja;function Ip(){return ja||(ja=1,si=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),si}var Ap=D;D.Node=pt;D.create=D;function D(e){var t=this;if(t instanceof D||(t=new D),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(s){t.push(s)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}D.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};D.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};D.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};D.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)Lp(this,arguments[e]);return this.length};D.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)Tp(this,arguments[e]);return this.length};D.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};D.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};D.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++)e.call(t,r.value,n,this),r=r.next};D.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--)e.call(t,r.value,n,this),r=r.prev};D.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};D.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};D.prototype.map=function(e,t){t=t||this;for(var r=new D,n=this.head;n!==null;)r.push(e.call(t,n.value,this)),n=n.next;return r};D.prototype.mapReverse=function(e,t){t=t||this;for(var r=new D,n=this.tail;n!==null;)r.push(e.call(t,n.value,this)),n=n.prev;return r};D.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)r=e(r,n.value,s),n=n.next;return r};D.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)r=e(r,n.value,s),n=n.prev;return r};D.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};D.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};D.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new D;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,s=this.head;s!==null&&n<e;n++)s=s.next;for(;s!==null&&n<t;n++,s=s.next)r.push(s.value);return r};D.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new D;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,s=this.tail;s!==null&&n>t;n--)s=s.prev;for(;s!==null&&n>e;n--,s=s.prev)r.push(s.value);return r};D.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;s!==null&&n<e;n++)s=s.next;for(var i=[],n=0;s&&n<t;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<r.length;n++)s=Np(this,s,r[n]);return i};D.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};function Np(e,t,r){var n=t===e.head?new pt(r,null,t,e):new pt(r,t,t.next,e);return n.next===null&&(e.tail=n),n.prev===null&&(e.head=n),e.length++,n}function Lp(e,t){e.tail=new pt(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function Tp(e,t){e.head=new pt(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function pt(e,t,r,n){if(!(this instanceof pt))return new pt(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Ip()(D)}catch{}const Mp=Ap,ct=Symbol("max"),ze=Symbol("length"),kt=Symbol("lengthCalculator"),ir=Symbol("allowStale"),ut=Symbol("maxAge"),Ue=Symbol("dispose"),Ba=Symbol("noDisposeOnSet"),oe=Symbol("lruList"),Ne=Symbol("cache"),eu=Symbol("updateAgeOnGet"),ii=()=>1;class Pp{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[ct]=t.max||1/0;const r=t.length||ii;if(this[kt]=typeof r!="function"?ii:r,this[ir]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[ut]=t.maxAge||0,this[Ue]=t.dispose,this[Ba]=t.noDisposeOnSet||!1,this[eu]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[ct]=t||1/0,Xt(this)}get max(){return this[ct]}set allowStale(t){this[ir]=!!t}get allowStale(){return this[ir]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[ut]=t,Xt(this)}get maxAge(){return this[ut]}set lengthCalculator(t){typeof t!="function"&&(t=ii),t!==this[kt]&&(this[kt]=t,this[ze]=0,this[oe].forEach(r=>{r.length=this[kt](r.value,r.key),this[ze]+=r.length})),Xt(this)}get lengthCalculator(){return this[kt]}get length(){return this[ze]}get itemCount(){return this[oe].length}rforEach(t,r){r=r||this;for(let n=this[oe].tail;n!==null;){const s=n.prev;Da(this,t,n,r),n=s}}forEach(t,r){r=r||this;for(let n=this[oe].head;n!==null;){const s=n.next;Da(this,t,n,r),n=s}}keys(){return this[oe].toArray().map(t=>t.key)}values(){return this[oe].toArray().map(t=>t.value)}reset(){this[Ue]&&this[oe]&&this[oe].length&&this[oe].forEach(t=>this[Ue](t.key,t.value)),this[Ne]=new Map,this[oe]=new Mp,this[ze]=0}dump(){return this[oe].map(t=>Xr(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[oe]}set(t,r,n){if(n=n||this[ut],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0,i=this[kt](r,t);if(this[Ne].has(t)){if(i>this[ct])return Mt(this,this[Ne].get(t)),!1;const l=this[Ne].get(t).value;return this[Ue]&&(this[Ba]||this[Ue](t,l.value)),l.now=s,l.maxAge=n,l.value=r,this[ze]+=i-l.length,l.length=i,this.get(t),Xt(this),!0}const o=new Op(t,r,i,s,n);return o.length>this[ct]?(this[Ue]&&this[Ue](t,r),!1):(this[ze]+=o.length,this[oe].unshift(o),this[Ne].set(t,this[oe].head),Xt(this),!0)}has(t){if(!this[Ne].has(t))return!1;const r=this[Ne].get(t).value;return!Xr(this,r)}get(t){return oi(this,t,!0)}peek(t){return oi(this,t,!1)}pop(){const t=this[oe].tail;return t?(Mt(this,t),t.value):null}del(t){Mt(this,this[Ne].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const o=i-r;o>0&&this.set(s.k,s.v,o)}}}prune(){this[Ne].forEach((t,r)=>oi(this,r,!1))}}const oi=(e,t,r)=>{const n=e[Ne].get(t);if(n){const s=n.value;if(Xr(e,s)){if(Mt(e,n),!e[ir])return}else r&&(e[eu]&&(n.value.now=Date.now()),e[oe].unshiftNode(n));return s.value}},Xr=(e,t)=>{if(!t||!t.maxAge&&!e[ut])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[ut]&&r>e[ut]},Xt=e=>{if(e[ze]>e[ct])for(let t=e[oe].tail;e[ze]>e[ct]&&t!==null;){const r=t.prev;Mt(e,t),t=r}},Mt=(e,t)=>{if(t){const r=t.value;e[Ue]&&e[Ue](r.key,r.value),e[ze]-=r.length,e[Ne].delete(r.key),e[oe].removeNode(t)}};class Op{constructor(t,r,n,s,i){this.key=t,this.value=r,this.length=n,this.now=s,this.maxAge=i||0}}const Da=(e,t,r,n)=>{let s=r.value;Xr(e,s)&&(Mt(e,r),e[ir]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};var $p=Pp,ai,Ha;function Te(){if(Ha)return ai;Ha=1;class e{constructor(w,I){if(I=n(I),w instanceof e)return w.loose===!!I.loose&&w.includePrerelease===!!I.includePrerelease?w:new e(w.raw,I);if(w instanceof s)return this.raw=w.value,this.set=[[w]],this.format(),this;if(this.options=I,this.loose=!!I.loose,this.includePrerelease=!!I.includePrerelease,this.raw=w.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(k=>this.parseRange(k.trim())).filter(k=>k.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const k=this.set[0];if(this.set=this.set.filter(A=>!p(A[0])),this.set.length===0)this.set=[k];else if(this.set.length>1){for(const A of this.set)if(A.length===1&&y(A[0])){this.set=[A];break}}}this.format()}format(){return this.range=this.set.map(w=>w.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(w){const k=((this.options.includePrerelease&&h)|(this.options.loose&&f))+":"+w,A=r.get(k);if(A)return A;const C=this.options.loose,M=C?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];w=w.replace(M,z(this.options.includePrerelease)),i("hyphen replace",w),w=w.replace(a[l.COMPARATORTRIM],c),i("comparator trim",w),w=w.replace(a[l.TILDETRIM],d),i("tilde trim",w),w=w.replace(a[l.CARETTRIM],u),i("caret trim",w);let H=w.split(" ").map(Q=>b(Q,this.options)).join(" ").split(/\s+/).map(Q=>G(Q,this.options));C&&(H=H.filter(Q=>(i("loose invalid filter",Q,this.options),!!Q.match(a[l.COMPARATORLOOSE])))),i("range list",H);const O=new Map,q=H.map(Q=>new s(Q,this.options));for(const Q of q){if(p(Q))return[Q];O.set(Q.value,Q)}O.size>1&&O.has("")&&O.delete("");const de=[...O.values()];return r.set(k,de),de}intersects(w,I){if(!(w instanceof e))throw new TypeError("a Range is required");return this.set.some(k=>g(k,I)&&w.set.some(A=>g(A,I)&&k.every(C=>A.every(M=>C.intersects(M,I)))))}test(w){if(!w)return!1;if(typeof w=="string")try{w=new o(w,this.options)}catch{return!1}for(let I=0;I<this.set.length;I++)if(V(this.set[I],w,this.options))return!0;return!1}}ai=e;const t=$p,r=new t({max:1e3}),n=no,s=jn(),i=xn,o=ge,{safeRe:a,t:l,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:u}=Nr,{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:f}=$n,p=E=>E.value==="<0.0.0-0",y=E=>E.value==="",g=(E,w)=>{let I=!0;const k=E.slice();let A=k.pop();for(;I&&k.length;)I=k.every(C=>A.intersects(C,w)),A=k.pop();return I},b=(E,w)=>(i("comp",E,w),E=v(E,w),i("caret",E),E=_(E,w),i("tildes",E),E=U(E,w),i("xrange",E),E=te(E,w),i("stars",E),E),m=E=>!E||E.toLowerCase()==="x"||E==="*",_=(E,w)=>E.trim().split(/\s+/).map(I=>L(I,w)).join(" "),L=(E,w)=>{const I=w.loose?a[l.TILDELOOSE]:a[l.TILDE];return E.replace(I,(k,A,C,M,H)=>{i("tilde",E,k,A,C,M,H);let O;return m(A)?O="":m(C)?O=`>=${A}.0.0 <${+A+1}.0.0-0`:m(M)?O=`>=${A}.${C}.0 <${A}.${+C+1}.0-0`:H?(i("replaceTilde pr",H),O=`>=${A}.${C}.${M}-${H} <${A}.${+C+1}.0-0`):O=`>=${A}.${C}.${M} <${A}.${+C+1}.0-0`,i("tilde return",O),O})},v=(E,w)=>E.trim().split(/\s+/).map(I=>R(I,w)).join(" "),R=(E,w)=>{i("caret",E,w);const I=w.loose?a[l.CARETLOOSE]:a[l.CARET],k=w.includePrerelease?"-0":"";return E.replace(I,(A,C,M,H,O)=>{i("caret",E,A,C,M,H,O);let q;return m(C)?q="":m(M)?q=`>=${C}.0.0${k} <${+C+1}.0.0-0`:m(H)?C==="0"?q=`>=${C}.${M}.0${k} <${C}.${+M+1}.0-0`:q=`>=${C}.${M}.0${k} <${+C+1}.0.0-0`:O?(i("replaceCaret pr",O),C==="0"?M==="0"?q=`>=${C}.${M}.${H}-${O} <${C}.${M}.${+H+1}-0`:q=`>=${C}.${M}.${H}-${O} <${C}.${+M+1}.0-0`:q=`>=${C}.${M}.${H}-${O} <${+C+1}.0.0-0`):(i("no pr"),C==="0"?M==="0"?q=`>=${C}.${M}.${H}${k} <${C}.${M}.${+H+1}-0`:q=`>=${C}.${M}.${H}${k} <${C}.${+M+1}.0-0`:q=`>=${C}.${M}.${H} <${+C+1}.0.0-0`),i("caret return",q),q})},U=(E,w)=>(i("replaceXRanges",E,w),E.split(/\s+/).map(I=>Z(I,w)).join(" ")),Z=(E,w)=>{E=E.trim();const I=w.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return E.replace(I,(k,A,C,M,H,O)=>{i("xRange",E,k,A,C,M,H,O);const q=m(C),de=q||m(M),Q=de||m(H),Ge=Q;return A==="="&&Ge&&(A=""),O=w.includePrerelease?"-0":"",q?A===">"||A==="<"?k="<0.0.0-0":k="*":A&&Ge?(de&&(M=0),H=0,A===">"?(A=">=",de?(C=+C+1,M=0,H=0):(M=+M+1,H=0)):A==="<="&&(A="<",de?C=+C+1:M=+M+1),A==="<"&&(O="-0"),k=`${A+C}.${M}.${H}${O}`):de?k=`>=${C}.0.0${O} <${+C+1}.0.0-0`:Q&&(k=`>=${C}.${M}.0${O} <${C}.${+M+1}.0-0`),i("xRange return",k),k})},te=(E,w)=>(i("replaceStars",E,w),E.trim().replace(a[l.STAR],"")),G=(E,w)=>(i("replaceGTE0",E,w),E.trim().replace(a[w.includePrerelease?l.GTE0PRE:l.GTE0],"")),z=E=>(w,I,k,A,C,M,H,O,q,de,Q,Ge,Kn)=>(m(k)?I="":m(A)?I=`>=${k}.0.0${E?"-0":""}`:m(C)?I=`>=${k}.${A}.0${E?"-0":""}`:M?I=`>=${I}`:I=`>=${I}${E?"-0":""}`,m(q)?O="":m(de)?O=`<${+q+1}.0.0-0`:m(Q)?O=`<${q}.${+de+1}.0-0`:Ge?O=`<=${q}.${de}.${Q}-${Ge}`:E?O=`<${q}.${de}.${+Q+1}-0`:O=`<=${O}`,`${I} ${O}`.trim()),V=(E,w,I)=>{for(let k=0;k<E.length;k++)if(!E[k].test(w))return!1;if(w.prerelease.length&&!I.includePrerelease){for(let k=0;k<E.length;k++)if(i(E[k].semver),E[k].semver!==s.ANY&&E[k].semver.prerelease.length>0){const A=E[k].semver;if(A.major===w.major&&A.minor===w.minor&&A.patch===w.patch)return!0}return!1}return!0};return ai}var ci,Ua;function jn(){if(Ua)return ci;Ua=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(d,u){if(u=r(u),d instanceof t){if(d.loose===!!u.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),o("comparator",d,u),this.options=u,this.loose=!!u.loose,this.parse(d),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(d){const u=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],h=d.match(u);if(!h)throw new TypeError(`Invalid comparator: ${d}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new a(h[2],this.options.loose):this.semver=e}toString(){return this.value}test(d){if(o("Comparator.test",d,this.options.loose),this.semver===e||d===e)return!0;if(typeof d=="string")try{d=new a(d,this.options)}catch{return!1}return i(d,this.operator,this.semver,this.options)}intersects(d,u){if(!(d instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(d.value,u).test(this.value):d.operator===""?d.value===""?!0:new l(this.value,u).test(d.semver):(u=r(u),u.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||i(this.semver,"<",d.semver,u)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||i(this.semver,">",d.semver,u)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}ci=t;const r=no,{safeRe:n,t:s}=Nr,i=Yl,o=xn,a=ge,l=Te();return ci}const xp=Te(),Fp=(e,t,r)=>{try{t=new xp(t,r)}catch{return!1}return t.test(e)};var Bn=Fp;const jp=Te(),Bp=(e,t)=>new jp(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Dp=Bp;const Hp=ge,Up=Te(),Vp=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Up(t,r)}catch{return null}return e.forEach(o=>{i.test(o)&&(!n||s.compare(o)===-1)&&(n=o,s=new Hp(n,r))}),n};var Wp=Vp;const zp=ge,qp=Te(),Jp=(e,t,r)=>{let n=null,s=null,i=null;try{i=new qp(t,r)}catch{return null}return e.forEach(o=>{i.test(o)&&(!n||s.compare(o)===1)&&(n=o,s=new zp(n,r))}),n};var Gp=Jp;const li=ge,Zp=Te(),Va=Fn,Qp=(e,t)=>{e=new Zp(e,t);let r=new li("0.0.0");if(e.test(r)||(r=new li("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){const s=e.set[n];let i=null;s.forEach(o=>{const a=new li(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Va(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Va(r,i))&&(r=i)}return r&&e.test(r)?r:null};var Kp=Qp;const Xp=Te(),Yp=(e,t)=>{try{return new Xp(e,t).range||"*"}catch{return null}};var eg=Yp;const tg=ge,tu=jn(),{ANY:rg}=tu,ng=Te(),sg=Bn,Wa=Fn,za=io,ig=ao,og=oo,ag=(e,t,r,n)=>{e=new tg(e,n),t=new ng(t,n);let s,i,o,a,l;switch(r){case">":s=Wa,i=ig,o=za,a=">",l=">=";break;case"<":s=za,i=og,o=Wa,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sg(e,t,n))return!1;for(let c=0;c<t.set.length;++c){const d=t.set[c];let u=null,h=null;if(d.forEach(f=>{f.semver===rg&&(f=new tu(">=0.0.0")),u=u||f,h=h||f,s(f.semver,u.semver,n)?u=f:o(f.semver,h.semver,n)&&(h=f)}),u.operator===a||u.operator===l||(!h.operator||h.operator===a)&&i(e,h.semver))return!1;if(h.operator===l&&o(e,h.semver))return!1}return!0};var co=ag;const cg=co,lg=(e,t,r)=>cg(e,t,">",r);var ug=lg;const dg=co,hg=(e,t,r)=>dg(e,t,"<",r);var fg=hg;const qa=Te(),pg=(e,t,r)=>(e=new qa(e,r),t=new qa(t,r),e.intersects(t,r));var gg=pg;const mg=Bn,_g=Le;var bg=(e,t,r)=>{const n=[];let s=null,i=null;const o=e.sort((d,u)=>_g(d,u,r));for(const d of o)mg(d,t,r)?(i=d,s||(s=d)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);const a=[];for(const[d,u]of n)d===u?a.push(d):!u&&d===o[0]?a.push("*"):u?d===o[0]?a.push(`<=${u}`):a.push(`${d} - ${u}`):a.push(`>=${d}`);const l=a.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return l.length<c.length?l:t};const Ja=Te(),lo=jn(),{ANY:ui}=lo,Yt=Bn,uo=Le,yg=(e,t,r={})=>{if(e===t)return!0;e=new Ja(e,r),t=new Ja(t,r);let n=!1;e:for(const s of e.set){for(const i of t.set){const o=vg(s,i,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},wg=[new lo(">=0.0.0-0")],Ga=[new lo(">=0.0.0")],vg=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ui){if(t.length===1&&t[0].semver===ui)return!0;r.includePrerelease?e=wg:e=Ga}if(t.length===1&&t[0].semver===ui){if(r.includePrerelease)return!0;t=Ga}const n=new Set;let s,i;for(const f of e)f.operator===">"||f.operator===">="?s=Za(s,f,r):f.operator==="<"||f.operator==="<="?i=Qa(i,f,r):n.add(f.semver);if(n.size>1)return null;let o;if(s&&i){if(o=uo(s.semver,i.semver,r),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const f of n){if(s&&!Yt(f,String(s),r)||i&&!Yt(f,String(i),r))return null;for(const p of t)if(!Yt(f,String(p),r))return!1;return!0}let a,l,c,d,u=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;u&&u.prerelease.length===1&&i.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(const f of t){if(d=d||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",s){if(h&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===h.major&&f.semver.minor===h.minor&&f.semver.patch===h.patch&&(h=!1),f.operator===">"||f.operator===">="){if(a=Za(s,f,r),a===f&&a!==s)return!1}else if(s.operator===">="&&!Yt(s.semver,String(f),r))return!1}if(i){if(u&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch&&(u=!1),f.operator==="<"||f.operator==="<="){if(l=Qa(i,f,r),l===f&&l!==i)return!1}else if(i.operator==="<="&&!Yt(i.semver,String(f),r))return!1}if(!f.operator&&(i||s)&&o!==0)return!1}return!(s&&c&&!i&&o!==0||i&&d&&!s&&o!==0||h||u)},Za=(e,t,r)=>{if(!e)return t;const n=uo(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Qa=(e,t,r)=>{if(!e)return t;const n=uo(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var Eg=yg;const di=Nr,Ka=$n,Sg=ge,Xa=Ql,Cg=Qt,kg=C1,Rg=I1,Ig=N1,Ag=T1,Ng=O1,Lg=F1,Tg=D1,Mg=V1,Pg=Le,Og=J1,$g=Q1,xg=so,Fg=ep,jg=np,Bg=Fn,Dg=io,Hg=Kl,Ug=Xl,Vg=oo,Wg=ao,zg=Yl,qg=Rp,Jg=jn(),Gg=Te(),Zg=Bn,Qg=Dp,Kg=Wp,Xg=Gp,Yg=Kp,em=eg,tm=co,rm=ug,nm=fg,sm=gg,im=bg,om=Eg;var am={parse:Cg,valid:kg,clean:Rg,inc:Ig,diff:Ag,major:Ng,minor:Lg,patch:Tg,prerelease:Mg,compare:Pg,rcompare:Og,compareLoose:$g,compareBuild:xg,sort:Fg,rsort:jg,gt:Bg,lt:Dg,eq:Hg,neq:Ug,gte:Vg,lte:Wg,cmp:zg,coerce:qg,Comparator:Jg,Range:Gg,satisfies:Zg,toComparators:Qg,maxSatisfying:Kg,minSatisfying:Xg,minVersion:Yg,validRange:em,outside:tm,gtr:rm,ltr:nm,intersects:sm,simplifyRange:im,subset:om,SemVer:Sg,re:di.re,src:di.src,tokens:di.t,SEMVER_SPEC_VERSION:Ka.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ka.RELEASE_TYPES,compareIdentifiers:Xa.compareIdentifiers,rcompareIdentifiers:Xa.rcompareIdentifiers};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=am,r=yt,n=ue;e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",u=>(0,t.valid)(u)===null?`Expected SemVer version, got "${u}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",u=>(0,t.validRange)(u)===null?`Expected SemVer range, got "${u}"`:!0);function s(u){return(0,r.is)(u,e.VersionStruct)}e.isValidSemVerVersion=s;function i(u){return(0,r.is)(u,e.VersionRangeStruct)}e.isValidSemVerRange=i;function o(u){(0,n.assertStruct)(u,e.VersionStruct)}e.assertIsSemVerVersion=o;function a(u){(0,n.assertStruct)(u,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function l(u,h){return(0,t.gt)(u,h)}e.gtVersion=l;function c(u,h){return(0,t.gtr)(u,h)}e.gtRange=c;function d(u,h){return(0,t.satisfies)(u,h,{includePrerelease:!0})}e.satisfiesVersionRange=d})(Jl);(function(e){var t=N&&N.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,o,a)}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=N&&N.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(ue,e),r(Ir,e),r(B,e),r(Pn,e),r(De,e),r(Dt,e),r(Dl,e),r(Ar,e),r(Hl,e),r(Ul,e),r(Ht,e),r(Vl,e),r(He,e),r(Wl,e),r(zl,e),r(ql,e),r(Jl,e)})(vl);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const t=vl;Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})(wl);var ru=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.PollingBlockTracker=void 0;const cm=ru(Gi),lm=ru(If),um=Sr,Ya=wl,ec=(0,Ya.createModuleLogger)(Ya.projectLogger,"polling-block-tracker"),dm=(0,cm.default)(),hm=1e3;class fm extends um.BaseBlockTracker{constructor(t={}){var r;if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},t),{blockResetDuration:(r=t.blockResetDuration)!==null&&r!==void 0?r:t.pollingInterval})),this._provider=t.provider,this._pollingInterval=t.pollingInterval||20*hm,this._retryTimeout=t.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=t.keepEventLoopActive===void 0?!0:t.keepEventLoopActive,this._setSkipCacheFlag=t.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var t;this._isRunning;)try{await this._updateLatestBlock();const r=tc(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
3
3
  ${(t=r.stack)!==null&&t!==void 0?t:r}`);try{this.emit("error",n)}catch{console.error(n)}const s=tc(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await s}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:dm(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0),ec("Making request",t);const r=await(0,lm.default)(n=>this._provider.sendAsync(t,n))();if(ec("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
4
4
  ${r.error.message}`);return r.result}}Tn.PollingBlockTracker=fm;function tc(e,t){return new Promise(r=>{const n=setTimeout(r,e);n.unref&&t&&n.unref()})}var Dn={},pm=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.SubscribeBlockTracker=void 0;const gm=pm(Gi),mm=Sr,_m=(0,gm.default)();class bm extends mm.BaseBlockTracker{constructor(t={}){if(!t.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(t),this._provider=t.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const t=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(t)}catch(t){this.emit("error",t)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(t){this.emit("error",t)}}_call(t,...r){return new Promise((n,s)=>{this._provider.sendAsync({id:_m(),method:t,params:r,jsonrpc:"2.0"},(i,o)=>{i?s(i):n(o.result)})})}_handleSubData(t,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}}Dn.SubscribeBlockTracker=bm;(function(e){var t=N&&N.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i),Object.defineProperty(n,o,{enumerable:!0,get:function(){return s[i]}})}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=N&&N.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Tn,e),r(Dn,e)})(yl);var ho={},Hn={},Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getUniqueId=void 0;const nu=4294967295;let hi=Math.floor(Math.random()*nu);function ym(){return hi=(hi+1)%nu,hi}Lr.getUniqueId=ym;Object.defineProperty(Hn,"__esModule",{value:!0});Hn.createIdRemapMiddleware=void 0;const wm=Lr;function vm(){return(e,t,r,n)=>{const s=e.id,i=wm.getUniqueId();e.id=i,t.id=i,r(o=>{e.id=s,t.id=s,o()})}}Hn.createIdRemapMiddleware=vm;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});Un.createAsyncMiddleware=void 0;function Em(e){return async(t,r,n,s)=>{let i;const o=new Promise(d=>{i=d});let a=null,l=!1;const c=async()=>{l=!0,n(d=>{a=d,i()}),await o};try{await e(t,r,c),l?(await o,a(null)):s(null)}catch(d){a?a(d):s(d)}}}Un.createAsyncMiddleware=Em;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.createScaffoldMiddleware=void 0;function Sm(e){return(t,r,n,s)=>{const i=e[t.method];return i===void 0?n():typeof i=="function"?i(t,r,n,s):(r.result=i,s())}}Vn.createScaffoldMiddleware=Sm;var Tr={},fo={};Object.defineProperty(fo,"__esModule",{value:!0});const Cm=mc;function rc(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function km(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}let Rm=class extends Cm.EventEmitter{emit(t,...r){let n=t==="error";const s=this._events;if(s!==void 0)n=n&&s.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const i=s[t];if(i===void 0)return!1;if(typeof i=="function")rc(i,this,r);else{const o=i.length,a=km(i);for(let l=0;l<o;l+=1)rc(a[l],this,r)}return!0}};fo.default=Rm;var su={},Ye={},Im=lr;lr.default=lr;lr.stable=au;lr.stableStringify=au;var Yr="[...]",iu="[Circular]",gt=[],dt=[];function ou(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function lr(e,t,r,n){typeof n>"u"&&(n=ou()),Ii(e,"",0,[],void 0,0,n);var s;try{dt.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,cu(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;gt.length!==0;){var i=gt.pop();i.length===4?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}}return s}function Pt(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==void 0?s.configurable?(Object.defineProperty(n,r,{value:e}),gt.push([n,r,t,s])):dt.push([t,r,e]):(n[r]=e,gt.push([n,r,t]))}function Ii(e,t,r,n,s,i,o){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){Pt(iu,e,t,s);return}if(typeof o.depthLimit<"u"&&i>o.depthLimit){Pt(Yr,e,t,s);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Pt(Yr,e,t,s);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Ii(e[a],a,a,n,e,i,o);else{var l=Object.keys(e);for(a=0;a<l.length;a++){var c=l[a];Ii(e[c],c,a,n,e,i,o)}}n.pop()}}function Am(e,t){return e<t?-1:e>t?1:0}function au(e,t,r,n){typeof n>"u"&&(n=ou());var s=Ai(e,"",0,[],void 0,0,n)||e,i;try{dt.length===0?i=JSON.stringify(s,t,r):i=JSON.stringify(s,cu(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;gt.length!==0;){var o=gt.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Ai(e,t,r,n,s,i,o){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){Pt(iu,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&i>o.depthLimit){Pt(Yr,e,t,s);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Pt(Yr,e,t,s);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Ai(e[a],a,a,n,e,i,o);else{var l={},c=Object.keys(e).sort(Am);for(a=0;a<c.length;a++){var d=c[a];Ai(e[d],d,a,n,e,i,o),l[d]=e[d]}if(typeof s<"u")gt.push([s,t,e]),s[t]=l;else return l}n.pop()}}function cu(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(dt.length>0)for(var n=0;n<dt.length;n++){var s=dt[n];if(s[1]===t&&s[0]===r){r=s[2],dt.splice(n,1);break}}return e.call(this,t,r)}}Object.defineProperty(Ye,"__esModule",{value:!0});Ye.EthereumProviderError=Ye.EthereumRpcError=void 0;const Nm=Im;class lu extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return Nm.default(this.serialize(),Mm,2)}}Ye.EthereumRpcError=lu;class Lm extends lu{constructor(t,r,n){if(!Tm(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}Ye.EthereumProviderError=Lm;function Tm(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function Mm(e,t){if(t!=="[Circular]")return t}var po={},et={};Object.defineProperty(et,"__esModule",{value:!0});et.errorValues=et.errorCodes=void 0;et.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};et.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=et,r=Ye,n=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",i={code:n,message:o(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(h,f=s){if(Number.isInteger(h)){const p=h.toString();if(u(t.errorValues,p))return t.errorValues[p].message;if(c(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return f}e.getMessageFromCode=o;function a(h){if(!Number.isInteger(h))return!1;const f=h.toString();return!!(t.errorValues[f]||c(h))}e.isValidCode=a;function l(h,{fallbackError:f=i,shouldIncludeStack:p=!1}={}){var y,g;if(!f||!Number.isInteger(f.code)||typeof f.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(h instanceof r.EthereumRpcError)return h.serialize();const b={};if(h&&typeof h=="object"&&!Array.isArray(h)&&u(h,"code")&&a(h.code)){const _=h;b.code=_.code,_.message&&typeof _.message=="string"?(b.message=_.message,u(_,"data")&&(b.data=_.data)):(b.message=o(b.code),b.data={originalError:d(h)})}else{b.code=f.code;const _=(y=h)===null||y===void 0?void 0:y.message;b.message=_&&typeof _=="string"?_:f.message,b.data={originalError:d(h)}}const m=(g=h)===null||g===void 0?void 0:g.stack;return p&&h&&m&&typeof m=="string"&&(b.stack=m),b}e.serializeError=l;function c(h){return h>=-32099&&h<=-32e3}function d(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function u(h,f){return Object.prototype.hasOwnProperty.call(h,f)}})(po);var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.ethErrors=void 0;const go=Ye,uu=po,he=et;Wn.ethErrors={rpc:{parse:e=>Ee(he.errorCodes.rpc.parse,e),invalidRequest:e=>Ee(he.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ee(he.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ee(he.errorCodes.rpc.methodNotFound,e),internal:e=>Ee(he.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ee(t,e)},invalidInput:e=>Ee(he.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ee(he.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ee(he.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ee(he.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ee(he.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ee(he.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>er(he.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>er(he.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>er(he.errorCodes.provider.unsupportedMethod,e),disconnected:e=>er(he.errorCodes.provider.disconnected,e),chainDisconnected:e=>er(he.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new go.EthereumProviderError(t,r,n)}}};function Ee(e,t){const[r,n]=du(t);return new go.EthereumRpcError(e,r||uu.getMessageFromCode(e),n)}function er(e,t){const[r,n]=du(t);return new go.EthereumProviderError(e,r||uu.getMessageFromCode(e),n)}function du(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Ye;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=po;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=Wn;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const s=et;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(su);var Pm=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.JsonRpcEngine=void 0;const Om=Pm(fo),Se=su;class Ve extends Om.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?r?this._handleBatch(t,r):this._handleBatch(t):r?this._handle(t,r):this._promiseHandle(t)}asMiddleware(){return async(t,r,n,s)=>{try{const[i,o,a]=await Ve._runAllMiddleware(t,r,this._middleware);return o?(await Ve._runReturnHandlers(a),s(i)):n(async l=>{try{await Ve._runReturnHandlers(a)}catch(c){return l(c)}return l()})}catch(i){return s(i)}}}async _handleBatch(t,r){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(t){return new Promise(r=>{this._handle(t,(n,s)=>{r(s)})})}async _handle(t,r){if(!t||Array.isArray(t)||typeof t!="object"){const o=new Se.EthereumRpcError(Se.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof t}`,{request:t});return r(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof t.method!="string"){const o=new Se.EthereumRpcError(Se.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof t.method}`,{request:t});return r(o,{id:t.id,jsonrpc:"2.0",error:o})}const n=Object.assign({},t),s={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,s)}catch(o){i=o}return i&&(delete s.result,s.error||(s.error=Se.serializeError(i))),r(i,s)}async _processRequest(t,r){const[n,s,i]=await Ve._runAllMiddleware(t,r,this._middleware);if(Ve._checkForCompletion(t,r,s),await Ve._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,r,n){const s=[];let i=null,o=!1;for(const a of n)if([i,o]=await Ve._runMiddleware(t,r,a,s),o)break;return[i,o,s.reverse()]}static _runMiddleware(t,r,n,s){return new Promise(i=>{const o=l=>{const c=l||r.error;c&&(r.error=Se.serializeError(c)),i([c,!0])},a=l=>{r.error?o(r.error):(l&&(typeof l!="function"&&o(new Se.EthereumRpcError(Se.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof l}" for request: