@dcl/blog-site 0.2.2 → 0.2.3-23948667956.commit-cfe47f9

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 (302) hide show
  1. package/assets/QueryClientProvider-mZKMZTwe.js +2 -0
  2. package/assets/RoobertPRO-Bold-DDyOqNrI.woff2 +0 -0
  3. package/assets/SignInRedirect-CXUOqOjy.js +11 -0
  4. package/assets/X-3yocgepi.js +15 -0
  5. package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +1 -0
  6. package/assets/__federation_expose_App-CMGDAIUH.js +1 -0
  7. package/assets/__federation_fn_import-C51lglKS.js +1 -0
  8. package/assets/__federation_shared_@dcl/hooks-Dm9PRmKy.js +535 -0
  9. package/assets/__federation_shared_@dcl/schemas-CVwtHlVJ.js +1 -0
  10. package/assets/__federation_shared_@emotion/react-AmEOkpjC.js +1 -0
  11. package/assets/__federation_shared_@emotion/styled-aZ9bk9Xh.js +1 -0
  12. package/assets/__federation_shared_@reduxjs/toolkit-DIZvwqf7.js +1 -0
  13. package/assets/__federation_shared_decentraland-ui2-KxrbFOTA.js +358 -0
  14. package/assets/__federation_shared_react-B3tlNTLg.js +1 -0
  15. package/assets/__federation_shared_react-dom-CCS4dT_K.js +1 -0
  16. package/assets/__federation_shared_react-redux-Ckcz2edF.js +13 -0
  17. package/assets/__federation_shared_react-router-dom-jUWpDOjR.js +49 -0
  18. package/assets/__federation_shared_viem-Cdp7wK0V.js +2 -0
  19. package/assets/__federation_shared_wagmi-CHWRoybR.js +17 -0
  20. package/assets/__vite-optional-peer-dep_lottie-react_decentraland-ui2-BIHI7g3E.js +1 -0
  21. package/assets/_commonjsHelpers-C4iS2aBk.js +1 -0
  22. package/assets/{add-Dnkf3E3Q.js → add-DHMb_tRw.js} +2 -2
  23. package/assets/all-wallets-Bo3QRxXL.js +6 -0
  24. package/assets/{app-store-C9FH4_zP.js → app-store-BHwDXU8D.js} +2 -2
  25. package/assets/{apple-Dm5w1W69.js → apple-BFX-plRw.js} +2 -2
  26. package/assets/arrow-bottom-Djx9NXV2.js +8 -0
  27. package/assets/{arrow-bottom-circle-Bgw9yiHN.js → arrow-bottom-circle-DcJnW2eo.js} +2 -2
  28. package/assets/arrow-left-BS_dJGSP.js +8 -0
  29. package/assets/arrow-right-B-mwy0Iu.js +8 -0
  30. package/assets/arrow-top-Di1bbZG1.js +8 -0
  31. package/assets/auto-track-pkMvCaah.js +1 -0
  32. package/assets/{bank-qNUWniDB.js → bank-B9SMq-ix.js} +2 -2
  33. package/assets/{basic-DJvhbg9L.js → basic-DijYF-IW.js} +124 -124
  34. package/assets/biconomy-CCw3vtwR.js +1 -0
  35. package/assets/{browser-Du0KKb8R.js → browser-CdKdszu-.js} +2 -2
  36. package/assets/{card-BpDAuOwe.js → card-CQu4Eu8c.js} +2 -2
  37. package/assets/ccip-AgQ5AD9v.js +1 -0
  38. package/assets/chains-D88UzVoE.js +1 -0
  39. package/assets/{checkmark-srdyV91l.js → checkmark-D2vezo75.js} +2 -2
  40. package/assets/{checkmark-bold-BYtPga6u.js → checkmark-bold-DriAapzP.js} +2 -2
  41. package/assets/chevron-bottom-CcFEOVdH.js +8 -0
  42. package/assets/chevron-left-BXS-ybhL.js +8 -0
  43. package/assets/chevron-right-TvO5COya.js +8 -0
  44. package/assets/chevron-top-D84SgxMg.js +8 -0
  45. package/assets/{chrome-store-D-UYtj15.js → chrome-store-rpsfVQln.js} +2 -2
  46. package/assets/{clock-BGyfn2Ix.js → clock-BMJ2gt7b.js} +2 -2
  47. package/assets/close-kAWkeKAP.js +8 -0
  48. package/assets/{coinPlaceholder-o1yCmFLN.js → coinPlaceholder-Dz8MKewa.js} +2 -2
  49. package/assets/common-D37S_OFt.js +1 -0
  50. package/assets/{compass-BrX88OdU.js → compass-BednEqu-.js} +2 -2
  51. package/assets/controller-D0Gc4Hsp.js +2 -0
  52. package/assets/{copy-CGKLgPMf.js → copy-D7rBk-hZ.js} +2 -2
  53. package/assets/core-Bn8Mr-tS.js +907 -0
  54. package/assets/create-submenu-Bu20F8-Z.webp +0 -0
  55. package/assets/createBundlerClient-DhRCLsYO.js +4 -0
  56. package/assets/createClient-C9QPJaZu.js +1 -0
  57. package/assets/cursor-C8UG2IDe.js +3 -0
  58. package/assets/{cursor-transparent--gaS-5ET.js → cursor-transparent-CyP0H3C5.js} +2 -2
  59. package/assets/decimals-B7Pm5rZk.js +1 -0
  60. package/assets/decimals-DedKFk8m.js +1 -0
  61. package/assets/defineChain-7I0Ce1VT.js +1 -0
  62. package/assets/{desktop-D3dzP-FX.js → desktop-LBcRpcZE.js} +2 -2
  63. package/assets/detectExtension-C2uVeK-n.js +1 -0
  64. package/assets/{disconnect-CsHX0nla.js → disconnect-DEBEe-yK.js} +2 -2
  65. package/assets/{discord-TnXCJHRv.js → discord-BlVFKMf0.js} +2 -2
  66. package/assets/emotion-react.browser.esm-BzYQLDSp.js +8 -0
  67. package/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-TsHx33zg.js +1 -0
  68. package/assets/encode-DvvW4ZKt.js +2 -0
  69. package/assets/engine-CD7SeAap.js +1 -0
  70. package/assets/estimate-gas-CeHGaIbG.js +3 -0
  71. package/assets/estimate-l1-fee-ClMO5l7U.js +1 -0
  72. package/assets/eth_estimateGas-C2ENZ_HR.js +1 -0
  73. package/assets/eth_getStorageAt-BHgF2qz5.js +1 -0
  74. package/assets/eth_getTransactionCount-DWnnw2mX.js +1 -0
  75. package/assets/ethereum-dN7ENYl_.js +1 -0
  76. package/assets/{etherscan-BNOTAlpJ.js → etherscan-C_pqcV9R.js} +2 -2
  77. package/assets/events-B5inrCVE.js +1 -0
  78. package/assets/{exclamation-triangle-3cTnBFEz.js → exclamation-triangle-R9Xq3IaG.js} +2 -2
  79. package/assets/explore-submenu-BFVuYMi9.webp +0 -0
  80. package/assets/{extension-C7i3kBcJ.js → extension-DkA_7Cbg.js} +2 -2
  81. package/assets/external-link-BPOw_fuW.js +8 -0
  82. package/assets/extractIPFS-B4LGER25.js +1 -0
  83. package/assets/{facebook-BtRXxuTh.js → facebook-CMZk_t1A.js} +2 -2
  84. package/assets/{farcaster-DuvCkOsj.js → farcaster-CveILPqa.js} +2 -2
  85. package/assets/fee-data-BKBGP5kG.js +1 -0
  86. package/assets/fetchTokenMetadata-BLDHgO8L.js +2 -0
  87. package/assets/{filters-q4uY0GXA.js → filters-BspTrZpX.js} +2 -2
  88. package/assets/get-ecosystem-wallet-info-D3PrM5FE.js +1 -0
  89. package/assets/getBalance-D7nzATjL.js +2 -0
  90. package/assets/getInstalledModules-Ck_Gj8FO.js +1 -0
  91. package/assets/getNFT-BcCS23O_.js +1 -0
  92. package/assets/getNFT-DXdMP0Q5.js +2 -0
  93. package/assets/{github-DdvkoPeB.js → github-DoFHEMIF.js} +2 -2
  94. package/assets/{google-d4Ql9qix.js → google-NTQi9GVe.js} +2 -2
  95. package/assets/governance-submenu-VTIKvCIL.webp +0 -0
  96. package/assets/{help-circle-BY_Weu8t.js → help-circle-DV0uNPdn.js} +2 -2
  97. package/assets/hex-B0Rx0hII.js +2 -0
  98. package/assets/{id-BJNb6vOI.js → id-UAVc1FOO.js} +1 -1
  99. package/assets/{image-DIsXNsXJ.js → image-BeHBzCPG.js} +2 -2
  100. package/assets/in-app-wallet-calls-CvFtsXP9.js +1 -0
  101. package/assets/index-B2OCb4Ez.js +1 -0
  102. package/assets/index-B65z14KI.js +4 -0
  103. package/assets/index-BAhlRyDG.js +1 -0
  104. package/assets/{index-DOqN8xaU.js → index-BTtTX-5z.js} +1 -1
  105. package/assets/index-BjzJcZq6.js +1 -0
  106. package/assets/index-BjzJcZq6__bundled.js +24 -0
  107. package/assets/index-BozJS3za.js +12 -0
  108. package/assets/index-C05H8NDX.js +1 -0
  109. package/assets/index-C1IoT2if.js +3 -0
  110. package/assets/index-C2hdqzGT.js +2 -0
  111. package/assets/index-CgMDPZul.js +13 -0
  112. package/assets/index-CjuQOkbh.js +2 -0
  113. package/assets/index-CpR9p5nk.js +1 -0
  114. package/assets/index-D1lXZVQu.js +45 -0
  115. package/assets/index-D6ZAha0r.js +395 -0
  116. package/assets/{index-X-a697cI.js → index-DJ7GgcJ9.js} +2 -2
  117. package/assets/index-DajuSfcu.js +2 -0
  118. package/assets/index-DeklogZX.js +1 -0
  119. package/assets/index-DmAaXUNv.js +1 -0
  120. package/assets/index-Dy0yjznp.js +1 -0
  121. package/assets/index-Dy0yjznp__bundled.js +9 -0
  122. package/assets/index-HvoTJwGm.js +1 -0
  123. package/assets/index-MYKNZAUu.js +8 -0
  124. package/assets/index-Tsk25L8E.js +1 -0
  125. package/assets/index.es-C8Kfv-K1.js +11 -0
  126. package/assets/index.es-CAXGMBEH.js +1 -0
  127. package/assets/index.es-D3pP9hN4.js +27 -0
  128. package/assets/index.es-D5YKsq2-.js +2 -0
  129. package/assets/index.umd-DK712HHb.js +1 -0
  130. package/assets/{info-BvPgRaaJ.js → info-CzcA85TO.js} +2 -2
  131. package/assets/{info-circle-sWcom9RD.js → info-circle-D3Mr3R9u.js} +2 -2
  132. package/assets/is-plan-event-enabled-DeNtQvA5.js +1 -0
  133. package/assets/json-BHzNJmTy.js +1 -0
  134. package/assets/jsx-runtime-DncYoG30.js +1 -0
  135. package/assets/jsx-runtime-DncYoG30__bundled.js +9 -0
  136. package/assets/learn-submenu-sfxVP5Db.webp +0 -0
  137. package/assets/{lightbulb-HJchniSu.js → lightbulb-B2FZtM_8.js} +2 -2
  138. package/assets/localBatchGatewayRequest-BIEAG3VG.js +1 -0
  139. package/assets/{mail-DlRijJmV.js → mail-CkhGbows.js} +2 -2
  140. package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
  141. package/assets/{mobile-CoiDw6cg.js → mobile-1H3FtqAS.js} +2 -2
  142. package/assets/{more-LUiRL6x4.js → more-CZiQi624.js} +2 -2
  143. package/assets/{network-placeholder-Cj3jgVfo.js → network-placeholder-DA2bm2rC.js} +2 -2
  144. package/assets/{nftPlaceholder-LkhQmGFs.js → nftPlaceholder-C9t5Ydxp.js} +2 -2
  145. package/assets/off-D8z0OQ3M.js +8 -0
  146. package/assets/op-gas-fee-reducer-CfxMcvXl.js +1 -0
  147. package/assets/openzeppelin-ZKz6sLW9.js +1 -0
  148. package/assets/ownerOf-D1aXOt9Q.js +1 -0
  149. package/assets/parseNft-LjEwmOst.js +2 -0
  150. package/assets/passkeys-CTJ4NPfL.js +1 -0
  151. package/assets/{play-store-DBit2AoS.js → play-store-_X5LrPwx.js} +2 -2
  152. package/assets/{plus-CZe-WgSN.js → plus-JriDhMxt.js} +2 -2
  153. package/assets/preload-helper-BorDCKdG.js +1 -0
  154. package/assets/publicKeyToAddress-CxEKPAKT.js +1 -0
  155. package/assets/{qr-code-BhW7ZXY-.js → qr-code-DaB080BF.js} +2 -2
  156. package/assets/{qr-overlay-DsRPQv6v.js → qr-overlay-CGnFhcTk.js} +1 -1
  157. package/assets/{recycle-horizontal-DBnWoDRV.js → recycle-horizontal-CGeFmMrT.js} +2 -2
  158. package/assets/redux-BNDF-Lt-.js +1 -0
  159. package/assets/{refresh-qvocxvcf.js → refresh-Dgvxxw5C.js} +2 -2
  160. package/assets/remoteEntry.js +1 -0
  161. package/assets/{reown-logo-C-45v-AJ.js → reown-logo-CBX48aN9.js} +2 -2
  162. package/assets/resolveImplementation-Cb2bL1tx.js +1 -0
  163. package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +2 -0
  164. package/assets/rpc-ti0b0r_u.js +3 -0
  165. package/assets/search-DamXBOxM.js +8 -0
  166. package/assets/secp256k1-UEF-yOzn.js +1 -0
  167. package/assets/{send-DI2x4DfJ.js → send-BLpUSx_G.js} +2 -2
  168. package/assets/send-batch-transaction-DnH876GL.js +1 -0
  169. package/assets/send-eip712-transaction-D_FU-Avh.js +2 -0
  170. package/assets/send-gasless-transaction-MP1Q_mLW.js +2 -0
  171. package/assets/serializeTransaction-mtsVBaO6.js +1 -0
  172. package/assets/session-proposal-CM3P7DaL.js +1 -0
  173. package/assets/session-request-Dqw67u3p.js +2 -0
  174. package/assets/sha256-DYtpy1Qz.js +1 -0
  175. package/assets/signing-BFeVjjPi.js +5 -0
  176. package/assets/store-DOLZnwHk.js +1 -0
  177. package/assets/{swapHorizontal-eTjjU7d8.js → swapHorizontal-Br-MZ1tO.js} +2 -2
  178. package/assets/{swapHorizontalBold-B86nJTAP.js → swapHorizontalBold-CkUNbZ1G.js} +2 -2
  179. package/assets/{swapHorizontalMedium-CNT7ELrN.js → swapHorizontalMedium-D3qEQNb5.js} +2 -2
  180. package/assets/{swapHorizontalRoundedBold-R_inXmIh.js → swapHorizontalRoundedBold-CzzBPCtt.js} +2 -2
  181. package/assets/{swapVertical-DBChOUj8.js → swapVertical-Mrn3zm_W.js} +2 -2
  182. package/assets/{telegram-DjYbgHgS.js → telegram-ZTLC9FiA.js} +2 -2
  183. package/assets/thirdweb-CHfVLLbM.js +1 -0
  184. package/assets/thirdweb-D5ezTmuN.js +27 -0
  185. package/assets/{three-dots-VoULPGrI.js → three-dots-DYl4uQjm.js} +2 -2
  186. package/assets/totalSupply-B5jHW8gx.js +1 -0
  187. package/assets/tslib.es6-DbvBTznf.js +1 -0
  188. package/assets/{twitch-ETBgqGHE.js → twitch-DPLkA98Q.js} +2 -2
  189. package/assets/{twitterIcon-N584dzfh.js → twitterIcon-BEY_UAyG.js} +2 -2
  190. package/assets/uid-D00jCazq.js +44 -0
  191. package/assets/{uint8-array-CjVHUazS.js → uint8-array-DZKEMhA1.js} +1 -1
  192. package/assets/utils-C7urdXtO.js +2 -0
  193. package/assets/utils-CozXUO91.js +1 -0
  194. package/assets/{verify-Dp4bztGk.js → verify-DuPdiufm.js} +2 -2
  195. package/assets/{verify-filled-B7WhO3Kn.js → verify-filled-CdqEW5AP.js} +2 -2
  196. package/assets/{w3m-modal-BmEHfmEu.js → w3m-modal-BLzhBUlF.js} +34 -34
  197. package/assets/wait-for-tx-receipt-B-o5aPQ8.js +1 -0
  198. package/assets/{wallet-tXSvlbUa.js → wallet-CZw1g3L8.js} +2 -2
  199. package/assets/{wallet-placeholder-B2e9Wl_u.js → wallet-placeholder-OAkoJuru.js} +2 -2
  200. package/assets/{walletconnect-D70wSjLs.js → walletconnect-BJ3w7-IU.js} +4 -4
  201. package/assets/wallets-Q5RcRyG6.js +16 -0
  202. package/assets/{warning-circle-CsTkZ4Rl.js → warning-circle-DpDeOZKv.js} +2 -2
  203. package/assets/web-connector-CB7tpRui.js +9 -0
  204. package/assets/webSocket-dQW3n9NM.js +3 -0
  205. package/assets/withCache-DYumIHzL.js +1 -0
  206. package/assets/{x-DwOCQuex.js → x-liJqLZUi.js} +2 -2
  207. package/assets/zora-sepolia-DNJ2DQat.js +1 -0
  208. package/index.html +17 -3
  209. package/package.json +3 -3
  210. package/assets/RoobertPRO-Bold-BLoSpx-h.otf +0 -0
  211. package/assets/all-wallets-C5N9p7Oh.js +0 -6
  212. package/assets/arrow-bottom-CXaxVEeb.js +0 -8
  213. package/assets/arrow-left-pgI3hg3C.js +0 -8
  214. package/assets/arrow-right-CyKp2yFa.js +0 -8
  215. package/assets/arrow-top-B2waxVPx.js +0 -8
  216. package/assets/auto-track-BvFI9h3i.js +0 -1
  217. package/assets/biconomy-DZsFbmF0.js +0 -1
  218. package/assets/ccip-CpLmER95.js +0 -1
  219. package/assets/chains-BJ1WS73W.js +0 -1
  220. package/assets/chevron-bottom-C2aa3E9i.js +0 -8
  221. package/assets/chevron-left-jGoftk_A.js +0 -8
  222. package/assets/chevron-right-Dt6SfcNy.js +0 -8
  223. package/assets/chevron-top-CBCgyIVe.js +0 -8
  224. package/assets/close-BQpWkcd5.js +0 -8
  225. package/assets/common-B5-2TPMC.js +0 -1
  226. package/assets/controller-BW9fJMCh.js +0 -2
  227. package/assets/core-f4taWsy5.js +0 -908
  228. package/assets/create-submenu-DEFVbrc5.png +0 -0
  229. package/assets/createBundlerClient-r1Kofl9Y.js +0 -8
  230. package/assets/cursor-l_ly71I2.js +0 -3
  231. package/assets/decimals-BB5yEnWu.js +0 -1
  232. package/assets/decimals-D7yTLBH-.js +0 -1
  233. package/assets/detectExtension-BOyq5ueD.js +0 -1
  234. package/assets/engine-COatTZhI.js +0 -1
  235. package/assets/estimate-l1-fee-gm3XrWSf.js +0 -1
  236. package/assets/eth_estimateGas-A6ba-Fl3.js +0 -1
  237. package/assets/eth_getStorageAt-DiqyV3Wq.js +0 -1
  238. package/assets/eth_getTransactionCount-CF50onAO.js +0 -1
  239. package/assets/ethereum-Bb-GI0c-.js +0 -1
  240. package/assets/events-CjOrSHaz.js +0 -1
  241. package/assets/explore-submenu-KVl6Dc-h.png +0 -0
  242. package/assets/external-link-C6RRSRES.js +0 -8
  243. package/assets/extractIPFS-BchHnCEN.js +0 -1
  244. package/assets/fetchTokenMetadata-ClRC5ORW.js +0 -2
  245. package/assets/get-ecosystem-wallet-info-C2CJ_2OU.js +0 -1
  246. package/assets/getBalance-DGuxWuYL.js +0 -1
  247. package/assets/getInstalledModules-A3tAP18V.js +0 -1
  248. package/assets/getNFT-C7cllYFm.js +0 -1
  249. package/assets/getNFT-CQKD7QHk.js +0 -2
  250. package/assets/governance-submenu-CXxLX9nT.png +0 -0
  251. package/assets/hashTypedData-7WNMs5EV.js +0 -1
  252. package/assets/in-app-wallet-calls-CIRR0eJZ.js +0 -1
  253. package/assets/index-B1P0UjN9.js +0 -1
  254. package/assets/index-BNdVKnva.js +0 -2
  255. package/assets/index-BtvcwkC4.js +0 -1
  256. package/assets/index-C3CMrfih.js +0 -1
  257. package/assets/index-C8ynIJrk.js +0 -395
  258. package/assets/index-Ca6sys5l.js +0 -3
  259. package/assets/index-CvqvWWYJ.js +0 -2
  260. package/assets/index-CxA55UWl.js +0 -1
  261. package/assets/index-D-W42D03.js +0 -12
  262. package/assets/index-DC9TKWAz.js +0 -23
  263. package/assets/index-DFfsl0Io.js +0 -4
  264. package/assets/index-DN2JqH-l.js +0 -895
  265. package/assets/index-DfqIHbWG.js +0 -2
  266. package/assets/index-pQ6ZXw4u.js +0 -13
  267. package/assets/index-qMD90g0X.js +0 -1
  268. package/assets/index.es-B2O4h03u.js +0 -12
  269. package/assets/index.es-BEAksKXY.js +0 -2
  270. package/assets/index.es-Dxxm_SKC.js +0 -1
  271. package/assets/index.es-MXG0VeeZ.js +0 -27
  272. package/assets/index.umd-DvfMpbcY.js +0 -1
  273. package/assets/is-plan-event-enabled-DS1Agtkw.js +0 -1
  274. package/assets/learn-submenu-Xs1jOwfy.png +0 -0
  275. package/assets/localBatchGatewayRequest-CHeIulW5.js +0 -1
  276. package/assets/marketplace-submenu-CjxTqNhj.png +0 -0
  277. package/assets/off-BCDn43Xl.js +0 -8
  278. package/assets/openzeppelin-_xpy9vRo.js +0 -1
  279. package/assets/ownerOf-ClSM4brX.js +0 -1
  280. package/assets/parseNft-BmEusGKu.js +0 -2
  281. package/assets/passkeys-CqFedyqV.js +0 -1
  282. package/assets/resolveImplementation-BssH7H5b.js +0 -1
  283. package/assets/rpc-DMtarHL0.js +0 -3
  284. package/assets/search-CAzZVrZw.js +0 -8
  285. package/assets/secp256k1-C_4ya0Qz.js +0 -1
  286. package/assets/secp256k1-CnKxz2gu.js +0 -1
  287. package/assets/secp256k1-oGq0B4P7.js +0 -1
  288. package/assets/send-batch-transaction-DfUNUZ4Z.js +0 -1
  289. package/assets/send-eip712-transaction-Ro5QmOlW.js +0 -2
  290. package/assets/send-gasless-transaction-B-Uu5KdW.js +0 -2
  291. package/assets/session-proposal-CRjqbz7W.js +0 -1
  292. package/assets/session-request-BI3BlMfs.js +0 -2
  293. package/assets/sha256-ChRob2fv.js +0 -1
  294. package/assets/signing-B1K_Jdsm.js +0 -30
  295. package/assets/thirdweb-0Fl_ECmE.js +0 -27
  296. package/assets/thirdweb-DZ2vK6IO.js +0 -1
  297. package/assets/totalSupply-ClM38QOc.js +0 -1
  298. package/assets/utils-B3vUvlNq.js +0 -1
  299. package/assets/wait-for-tx-receipt-pc2BJc62.js +0 -1
  300. package/assets/wallets-Dj6CY1yi.js +0 -17
  301. package/assets/web-connector-CiZO9RvI.js +0 -9
  302. package/assets/zora-sepolia-CZ4Tf1UH.js +0 -1
@@ -0,0 +1 @@
1
+ import{b as a}from"./tslib.es6-DbvBTznf.js";import{i as c}from"./is-plan-event-enabled-DeNtQvA5.js";function l(r,u){var i,n;if(!r||!Object.keys(r))return{};var o=r.integrations?Object.keys(r.integrations).filter(function(e){return r.integrations[e]===!1}):[],s=[];return((i=u.remotePlugins)!==null&&i!==void 0?i:[]).forEach(function(e){o.forEach(function(t){e.creationName==t&&s.push(e.name)})}),((n=u.remotePlugins)!==null&&n!==void 0?n:[]).reduce(function(e,t){return t.settings.subscriptions&&s.includes(t.name)&&t.settings.subscriptions.forEach(function(f){return e["".concat(t.name," ").concat(f.partnerAction)]=!1}),e},{})}function v(r,u){function i(n){var o=r,s=n.event.event;if(o&&s){var e=o[s];if(c(o,e)){var t=l(e,u);n.updateEvent("integrations",a(a(a({},n.event.integrations),e?.integrations),t))}else return n.updateEvent("integrations",a(a({},n.event.integrations),{All:!1,"Segment.io":!0})),n}return n}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:i,alias:i,track:i,identify:i,group:i}}export{v as schemaFilter};
@@ -0,0 +1,3 @@
1
+ import{a as Pn}from"./_commonjsHelpers-C4iS2aBk.js";import{B as ke,_ as w,h as qe,y as Tn}from"./hooks.module-Cpp96UEK.js";import{e as Rn}from"./index-6E4L_h32.js";const On=(t,e)=>{let n;switch(t){case"standard":return n=e,`data:image/svg+xml,%3Csvg width='${e}' height='${n}' 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 n=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${n}' 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 n=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' 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 n=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' 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 n=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' 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 n=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' 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 n=e,`data:image/svg+xml,%3Csvg width='${e}' height='${n}' 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 `}};class M{constructor(e,n){this.scope=e,this.module=n}storeObject(e,n){this.setItem(e,JSON.stringify(n))}loadObject(e){const n=this.getItem(e);return n?JSON.parse(n):void 0}setItem(e,n){localStorage.setItem(this.scopedKey(e),n)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),n=[];for(let s=0;s<localStorage.length;s++){const i=localStorage.key(s);typeof i=="string"&&i.startsWith(e)&&n.push(i)}n.forEach(s=>localStorage.removeItem(s))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new M("CBWSDK").clear(),new M("walletlink").clear()}}const E={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}},Ee={"-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."}},dt="Unspecified error message.",Nn="Unspecified server error.";function Ae(t,e=dt){if(t&&Number.isInteger(t)){const n=t.toString();if(Ie(Ee,n))return Ee[n].message;if(lt(t))return Nn}return e}function Dn(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!(Ee[e]||lt(t))}function Un(t,{shouldIncludeStack:e=!1}={}){const n={};if(t&&typeof t=="object"&&!Array.isArray(t)&&Ie(t,"code")&&Dn(t.code)){const s=t;n.code=s.code,s.message&&typeof s.message=="string"?(n.message=s.message,Ie(s,"data")&&(n.data=s.data)):(n.message=Ae(n.code),n.data={originalError:Ve(t)})}else n.code=E.rpc.internal,n.message=Ke(t,"message")?t.message:dt,n.data={originalError:Ve(t)};return e&&(n.stack=Ke(t,"stack")?t.stack:void 0),n}function lt(t){return t>=-32099&&t<=-32e3}function Ve(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t}function Ie(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ke(t,e){return typeof t=="object"&&t!==null&&e in t&&typeof t[e]=="string"}const g={rpc:{parse:t=>A(E.rpc.parse,t),invalidRequest:t=>A(E.rpc.invalidRequest,t),invalidParams:t=>A(E.rpc.invalidParams,t),methodNotFound:t=>A(E.rpc.methodNotFound,t),internal:t=>A(E.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return A(e,t)},invalidInput:t=>A(E.rpc.invalidInput,t),resourceNotFound:t=>A(E.rpc.resourceNotFound,t),resourceUnavailable:t=>A(E.rpc.resourceUnavailable,t),transactionRejected:t=>A(E.rpc.transactionRejected,t),methodNotSupported:t=>A(E.rpc.methodNotSupported,t),limitExceeded:t=>A(E.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Z(E.provider.userRejectedRequest,t),unauthorized:t=>Z(E.provider.unauthorized,t),unsupportedMethod:t=>Z(E.provider.unsupportedMethod,t),disconnected:t=>Z(E.provider.disconnected,t),chainDisconnected:t=>Z(E.provider.chainDisconnected,t),unsupportedChain:t=>Z(E.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:s}=t;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new ft(e,n,s)}}};function A(t,e){const[n,s]=ht(e);return new ut(t,n||Ae(t),s)}function Z(t,e){const[n,s]=ht(e);return new ft(t,n||Ae(t),s)}function ht(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}class ut extends Error{constructor(e,n,s){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string.');super(n),this.code=e,s!==void 0&&(this.data=s)}}class ft extends ut{constructor(e,n,s){if(!Bn(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,n,s)}}function Bn(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function Le(){return t=>t}const se=Le(),Hn=Le(),jn=Le();function N(t){return Math.floor(t)}const pt=/^[0-9]*$/,gt=/^[a-f0-9]*$/;function V(t){return Me(crypto.getRandomValues(new Uint8Array(t)))}function Me(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}function de(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>Number.parseInt(e,16)))}function $(t,e=!1){const n=t.toString("hex");return se(e?`0x${n}`:n)}function ge(t){return $(Ce(t),!0)}function P(t){return jn(t.toString(10))}function W(t){return se(`0x${BigInt(t).toString(16)}`)}function mt(t){return t.startsWith("0x")||t.startsWith("0X")}function Pe(t){return mt(t)?t.slice(2):t}function wt(t){return mt(t)?`0x${t.slice(2)}`:`0x${t}`}function le(t){if(typeof t!="string")return!1;const e=Pe(t).toLowerCase();return gt.test(e)}function Wn(t,e=!1){if(typeof t=="string"){const n=Pe(t).toLowerCase();if(gt.test(n))return se(e?`0x${n}`:n)}throw g.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}function Te(t,e=!1){let n=Wn(t,!1);return n.length%2===1&&(n=se(`0${n}`)),e?se(`0x${n}`):n}function B(t){if(typeof t=="string"){const e=Pe(t).toLowerCase();if(le(e)&&e.length===40)return Hn(wt(e))}throw g.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}function Ce(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string"){if(le(t)){const e=Te(t,!1);return Buffer.from(e,"hex")}return Buffer.from(t,"utf8")}throw g.rpc.invalidParams(`Not binary data: ${String(t)}`)}function ee(t){if(typeof t=="number"&&Number.isInteger(t))return N(t);if(typeof t=="string"){if(pt.test(t))return N(Number(t));if(le(t))return N(Number(BigInt(Te(t,!0))))}throw g.rpc.invalidParams(`Not an integer: ${String(t)}`)}function Q(t){if(t!==null&&(typeof t=="bigint"||Vn(t)))return BigInt(t.toString(10));if(typeof t=="number")return BigInt(ee(t));if(typeof t=="string"){if(pt.test(t))return BigInt(t);if(le(t))return BigInt(Te(t,!0))}throw g.rpc.invalidParams(`Not an integer: ${String(t)}`)}function qn(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw g.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}function Vn(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}function Kn(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:n}=document.location,s=t?t.getAttribute("href"):null;return!s||s.startsWith("javascript:")||s.startsWith("vbscript:")?`${e}//${n}/favicon.ico`:s.startsWith("http://")||s.startsWith("https://")||s.startsWith("data:")?s:s.startsWith("//")?e+s:`${e}//${n}${s}`}async function Fn(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function zn(t,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},t,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Zn(t,e){const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,new TextEncoder().encode(e));return{iv:n,cipherText:s}}async function Gn(t,{iv:e,cipherText:n}){const s=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,n);return new TextDecoder().decode(s)}function bt(t){switch(t){case"public":return"spki";case"private":return"pkcs8"}}async function yt(t,e){const n=bt(t),s=await crypto.subtle.exportKey(n,e);return Me(new Uint8Array(s))}async function vt(t,e){const n=bt(t),s=de(e).buffer;return await crypto.subtle.importKey(n,new Uint8Array(s),{name:"ECDH",namedCurve:"P-256"},!0,t==="private"?["deriveKey"]:[])}async function Yn(t,e){const n=JSON.stringify(t,(s,i)=>{if(!(i instanceof Error))return i;const r=i;return Object.assign(Object.assign({},r.code?{code:r.code}:{}),{message:r.message})});return Zn(e,n)}async function Jn(t,e){return JSON.parse(await Gn(e,t))}const me={storageKey:"ownPrivateKey",keyType:"private"},we={storageKey:"ownPublicKey",keyType:"public"},be={storageKey:"peerPublicKey",keyType:"public"};class Qn{constructor(){this.storage=new M("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(be,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(we.storageKey),this.storage.removeItem(me.storageKey),this.storage.removeItem(be.storageKey)}async generateKeyPair(){const e=await Fn();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(me,e.privateKey),await this.storeKey(we,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(me)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(we)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(be)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await zn(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const n=this.storage.getItem(e.storageKey);return n?vt(e.keyType,n):null}async storeKey(e,n){const s=await yt(e.keyType,n);this.storage.setItem(e.storageKey,s)}}const J="4.3.0",kt="@coinbase/wallet-sdk";async function Re(t,e){const n=Object.assign(Object.assign({},t),{jsonrpc:"2.0",id:crypto.randomUUID()}),s=await window.fetch(e,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":J,"X-Cbw-Sdk-Platform":kt}}),{result:i,error:r}=await s.json();if(r)throw r;return i}function Xn(){return globalThis.coinbaseWalletExtension}function $n(){var t,e;try{const n=globalThis;return(t=n.ethereum)!==null&&t!==void 0?t:(e=n.top)===null||e===void 0?void 0:e.ethereum}catch{return}}function Et({metadata:t,preference:e}){var n,s;const{appName:i,appLogoUrl:r,appChainIds:a}=t;if(e.options!=="smartWalletOnly"){const d=Xn();if(d)return(n=d.setAppInfo)===null||n===void 0||n.call(d,i,r,a,e),d}const o=$n();if(o?.isCoinbaseBrowser)return(s=o.setAppInfo)===null||s===void 0||s.call(o,i,r,a,e),o}function es(t){if(!t||typeof t!="object"||Array.isArray(t))throw g.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if(typeof e!="string"||e.length===0)throw g.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:t});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw g.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:t});switch(e){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw g.provider.unsupportedMethod()}}const Fe="accounts",ze="activeChain",Ze="availableChains",Ge="walletCapabilities";class ts{constructor(e){var n,s,i;this.metadata=e.metadata,this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new Qn,this.storage=new M("CBWSDK","SCWStateManager"),this.accounts=(n=this.storage.loadObject(Fe))!==null&&n!==void 0?n:[],this.chain=this.storage.loadObject(ze)||{id:(i=(s=e.metadata.appChainIds)===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:1},this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(e){var n,s,i,r;await((s=(n=this.communicator).waitForPopupLoaded)===null||s===void 0?void 0:s.call(n));const a=await this.createRequestMessage({handshake:{method:e.method,params:Object.assign({},this.metadata,(i=e.params)!==null&&i!==void 0?i:{})}}),o=await this.communicator.postRequestAndWaitForResponse(a);if("failure"in o.content)throw o.content.failure;const d=await vt("public",o.sender);await this.keyManager.setPeerPublicKey(d);const p=(await this.decryptResponseMessage(o)).result;if("error"in p)throw p.error;switch(e.method){case"eth_requestAccounts":{const u=p.value;this.accounts=u,this.storage.storeObject(Fe,u),(r=this.callback)===null||r===void 0||r.call(this,"accountsChanged",u);break}}}async request(e){var n;if(this.accounts.length===0)switch(e.method){case"wallet_sendCalls":return this.sendRequestToPopup(e);default:throw g.provider.unauthorized()}switch(e.method){case"eth_requestAccounts":return(n=this.callback)===null||n===void 0||n.call(this,"connect",{chainId:W(this.chain.id)}),this.accounts;case"eth_accounts":return this.accounts;case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return W(this.chain.id);case"wallet_getCapabilities":return this.storage.loadObject(Ge);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"wallet_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);default:if(!this.chain.rpcUrl)throw g.rpc.internal("No RPC URL set for chain");return Re(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){var n,s;await((s=(n=this.communicator).waitForPopupLoaded)===null||s===void 0?void 0:s.call(n));const i=await this.sendEncryptedRequest(e),a=(await this.decryptResponseMessage(i)).result;if("error"in a)throw a.error;return a.value}async cleanup(){var e,n;this.storage.clear(),await this.keyManager.clear(),this.accounts=[],this.chain={id:(n=(e=this.metadata.appChainIds)===null||e===void 0?void 0:e[0])!==null&&n!==void 0?n:1}}async handleSwitchChainRequest(e){var n;const s=e.params;if(!s||!(!((n=s[0])===null||n===void 0)&&n.chainId))throw g.rpc.invalidParams();const i=ee(s[0].chainId);if(this.updateChain(i))return null;const a=await this.sendRequestToPopup(e);return a===null&&this.updateChain(i),a}async sendEncryptedRequest(e){const n=await this.keyManager.getSharedSecret();if(!n)throw g.provider.unauthorized("No valid session found, try requestAccounts before other methods");const s=await Yn({action:e,chainId:this.chain.id},n),i=await this.createRequestMessage({encrypted:s});return this.communicator.postRequestAndWaitForResponse(i)}async createRequestMessage(e){const n=await yt("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:n,content:e,timestamp:new Date}}async decryptResponseMessage(e){var n,s;const i=e.content;if("failure"in i)throw i.failure;const r=await this.keyManager.getSharedSecret();if(!r)throw g.provider.unauthorized("Invalid session");const a=await Jn(i.encrypted,r),o=(n=a.data)===null||n===void 0?void 0:n.chains;if(o){const l=Object.entries(o).map(([p,u])=>({id:Number(p),rpcUrl:u}));this.storage.storeObject(Ze,l),this.updateChain(this.chain.id,l)}const d=(s=a.data)===null||s===void 0?void 0:s.capabilities;return d&&this.storage.storeObject(Ge,d),a}updateChain(e,n){var s;const i=n??this.storage.loadObject(Ze),r=i?.find(a=>a.id===e);return r?(r!==this.chain&&(this.chain=r,this.storage.storeObject(ze,r),(s=this.callback)===null||s===void 0||s.call(this,"chainChanged",W(r.id))),!0):!1}}var b={},f={};Object.defineProperty(f,"__esModule",{value:!0});f.toBig=f.shrSL=f.shrSH=f.rotrSL=f.rotrSH=f.rotrBL=f.rotrBH=f.rotr32L=f.rotr32H=f.rotlSL=f.rotlSH=f.rotlBL=f.rotlBH=f.add5L=f.add5H=f.add4L=f.add4H=f.add3L=f.add3H=void 0;f.add=Ut;f.fromBig=Oe;f.split=It;const oe=BigInt(2**32-1),Se=BigInt(32);function Oe(t,e=!1){return e?{h:Number(t&oe),l:Number(t>>Se&oe)}:{h:Number(t>>Se&oe)|0,l:Number(t&oe)|0}}function It(t,e=!1){const n=t.length;let s=new Uint32Array(n),i=new Uint32Array(n);for(let r=0;r<n;r++){const{h:a,l:o}=Oe(t[r],e);[s[r],i[r]]=[a,o]}return[s,i]}const Ct=(t,e)=>BigInt(t>>>0)<<Se|BigInt(e>>>0);f.toBig=Ct;const St=(t,e,n)=>t>>>n;f.shrSH=St;const xt=(t,e,n)=>t<<32-n|e>>>n;f.shrSL=xt;const _t=(t,e,n)=>t>>>n|e<<32-n;f.rotrSH=_t;const At=(t,e,n)=>t<<32-n|e>>>n;f.rotrSL=At;const Lt=(t,e,n)=>t<<64-n|e>>>n-32;f.rotrBH=Lt;const Mt=(t,e,n)=>t>>>n-32|e<<64-n;f.rotrBL=Mt;const Pt=(t,e)=>e;f.rotr32H=Pt;const Tt=(t,e)=>t;f.rotr32L=Tt;const Rt=(t,e,n)=>t<<n|e>>>32-n;f.rotlSH=Rt;const Ot=(t,e,n)=>e<<n|t>>>32-n;f.rotlSL=Ot;const Nt=(t,e,n)=>e<<n-32|t>>>64-n;f.rotlBH=Nt;const Dt=(t,e,n)=>t<<n-32|e>>>64-n;f.rotlBL=Dt;function Ut(t,e,n,s){const i=(e>>>0)+(s>>>0);return{h:t+n+(i/2**32|0)|0,l:i|0}}const Bt=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0);f.add3L=Bt;const Ht=(t,e,n,s)=>e+n+s+(t/2**32|0)|0;f.add3H=Ht;const jt=(t,e,n,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(s>>>0);f.add4L=jt;const Wt=(t,e,n,s,i)=>e+n+s+i+(t/2**32|0)|0;f.add4H=Wt;const qt=(t,e,n,s,i)=>(t>>>0)+(e>>>0)+(n>>>0)+(s>>>0)+(i>>>0);f.add5L=qt;const Vt=(t,e,n,s,i,r)=>e+n+s+i+r+(t/2**32|0)|0;f.add5H=Vt;const ns={fromBig:Oe,split:It,toBig:Ct,shrSH:St,shrSL:xt,rotrSH:_t,rotrSL:At,rotrBH:Lt,rotrBL:Mt,rotr32H:Pt,rotr32L:Tt,rotlSH:Rt,rotlSL:Ot,rotlBH:Nt,rotlBL:Dt,add:Ut,add3L:Bt,add3H:Ht,add4L:jt,add4H:Wt,add5H:Vt,add5L:qt};f.default=ns;var Kt={},he={};Object.defineProperty(he,"__esModule",{value:!0});he.crypto=void 0;he.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=n,t.anumber=s,t.abytes=i,t.ahash=r,t.aexists=a,t.aoutput=o,t.u8=d,t.u32=l,t.clean=p,t.createView=u,t.rotr=m,t.rotl=v,t.byteSwap=F,t.byteSwap32=z,t.bytesToHex=vn,t.hexToBytes=kn,t.asyncLoop=In,t.utf8ToBytes=pe,t.bytesToUtf8=Cn,t.toBytes=ae,t.kdfInputToBytes=Sn,t.concatBytes=xn,t.checkOpts=_n,t.createHasher=Ue,t.createOptHasher=Be,t.createXOFer=He,t.randomBytes=Ln;const e=he;function n(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function s(c){if(!Number.isSafeInteger(c)||c<0)throw new Error("positive integer expected, got "+c)}function i(c,...h){if(!n(c))throw new Error("Uint8Array expected");if(h.length>0&&!h.includes(c.length))throw new Error("Uint8Array expected of length "+h+", got length="+c.length)}function r(c){if(typeof c!="function"||typeof c.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");s(c.outputLen),s(c.blockLen)}function a(c,h=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(h&&c.finished)throw new Error("Hash#digest() has already been called")}function o(c,h){i(c);const y=h.outputLen;if(c.length<y)throw new Error("digestInto() expects output buffer of length at least "+y)}function d(c){return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}function l(c){return new Uint32Array(c.buffer,c.byteOffset,Math.floor(c.byteLength/4))}function p(...c){for(let h=0;h<c.length;h++)c[h].fill(0)}function u(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}function m(c,h){return c<<32-h|c>>>h}function v(c,h){return c<<h|c>>>32-h>>>0}t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function F(c){return c<<24&4278190080|c<<8&16711680|c>>>8&65280|c>>>24&255}t.swap8IfBE=t.isLE?c=>c:c=>F(c),t.byteSwapIfBE=t.swap8IfBE;function z(c){for(let h=0;h<c.length;h++)c[h]=F(c[h]);return c}t.swap32IfBE=t.isLE?c=>c:z;const Ne=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",yn=Array.from({length:256},(c,h)=>h.toString(16).padStart(2,"0"));function vn(c){if(i(c),Ne)return c.toHex();let h="";for(let y=0;y<c.length;y++)h+=yn[c[y]];return h}const O={_0:48,_9:57,A:65,F:70,a:97,f:102};function De(c){if(c>=O._0&&c<=O._9)return c-O._0;if(c>=O.A&&c<=O.F)return c-(O.A-10);if(c>=O.a&&c<=O.f)return c-(O.a-10)}function kn(c){if(typeof c!="string")throw new Error("hex string expected, got "+typeof c);if(Ne)return Uint8Array.fromHex(c);const h=c.length,y=h/2;if(h%2)throw new Error("hex string expected, got unpadded hex of length "+h);const k=new Uint8Array(y);for(let I=0,_=0;I<y;I++,_+=2){const je=De(c.charCodeAt(_)),We=De(c.charCodeAt(_+1));if(je===void 0||We===void 0){const Mn=c[_]+c[_+1];throw new Error('hex string expected, got non-hex character "'+Mn+'" at index '+_)}k[I]=je*16+We}return k}const En=async()=>{};t.nextTick=En;async function In(c,h,y){let k=Date.now();for(let I=0;I<c;I++){y(I);const _=Date.now()-k;_>=0&&_<h||(await(0,t.nextTick)(),k+=_)}}function pe(c){if(typeof c!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(c))}function Cn(c){return new TextDecoder().decode(c)}function ae(c){return typeof c=="string"&&(c=pe(c)),i(c),c}function Sn(c){return typeof c=="string"&&(c=pe(c)),i(c),c}function xn(...c){let h=0;for(let k=0;k<c.length;k++){const I=c[k];i(I),h+=I.length}const y=new Uint8Array(h);for(let k=0,I=0;k<c.length;k++){const _=c[k];y.set(_,I),I+=_.length}return y}function _n(c,h){if(h!==void 0&&{}.toString.call(h)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(c,h)}class An{}t.Hash=An;function Ue(c){const h=k=>c().update(ae(k)).digest(),y=c();return h.outputLen=y.outputLen,h.blockLen=y.blockLen,h.create=()=>c(),h}function Be(c){const h=(k,I)=>c(I).update(ae(k)).digest(),y=c({});return h.outputLen=y.outputLen,h.blockLen=y.blockLen,h.create=k=>c(k),h}function He(c){const h=(k,I)=>c(I).update(ae(k)).digest(),y=c({});return h.outputLen=y.outputLen,h.blockLen=y.blockLen,h.create=k=>c(k),h}t.wrapConstructor=Ue,t.wrapConstructorWithOpts=Be,t.wrapXOFConstructorWithOpts=He;function Ln(c=32){if(e.crypto&&typeof e.crypto.getRandomValues=="function")return e.crypto.getRandomValues(new Uint8Array(c));if(e.crypto&&typeof e.crypto.randomBytes=="function")return Uint8Array.from(e.crypto.randomBytes(c));throw new Error("crypto.getRandomValues must be defined")}})(Kt);Object.defineProperty(b,"__esModule",{value:!0});b.shake256=b.shake128=b.keccak_512=b.keccak_384=b.keccak_256=b.keccak_224=b.sha3_512=b.sha3_384=b.sha3_256=b.sha3_224=b.Keccak=void 0;b.keccakP=Yt;const ie=f,S=Kt,ss=BigInt(0),X=BigInt(1),is=BigInt(2),rs=BigInt(7),as=BigInt(256),os=BigInt(113),Ft=[],zt=[],Zt=[];for(let t=0,e=X,n=1,s=0;t<24;t++){[n,s]=[s,(2*n+3*s)%5],Ft.push(2*(5*s+n)),zt.push((t+1)*(t+2)/2%64);let i=ss;for(let r=0;r<7;r++)e=(e<<X^(e>>rs)*os)%as,e&is&&(i^=X<<(X<<BigInt(r))-X);Zt.push(i)}const Gt=(0,ie.split)(Zt,!0),cs=Gt[0],ds=Gt[1],Ye=(t,e,n)=>n>32?(0,ie.rotlBH)(t,e,n):(0,ie.rotlSH)(t,e,n),Je=(t,e,n)=>n>32?(0,ie.rotlBL)(t,e,n):(0,ie.rotlSL)(t,e,n);function Yt(t,e=24){const n=new Uint32Array(10);for(let s=24-e;s<24;s++){for(let a=0;a<10;a++)n[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const o=(a+8)%10,d=(a+2)%10,l=n[d],p=n[d+1],u=Ye(l,p,1)^n[o],m=Je(l,p,1)^n[o+1];for(let v=0;v<50;v+=10)t[a+v]^=u,t[a+v+1]^=m}let i=t[2],r=t[3];for(let a=0;a<24;a++){const o=zt[a],d=Ye(i,r,o),l=Je(i,r,o),p=Ft[a];i=t[p],r=t[p+1],t[p]=d,t[p+1]=l}for(let a=0;a<50;a+=10){for(let o=0;o<10;o++)n[o]=t[a+o];for(let o=0;o<10;o++)t[a+o]^=~n[(o+2)%10]&n[(o+4)%10]}t[0]^=cs[s],t[1]^=ds[s]}(0,S.clean)(n)}class re extends S.Hash{constructor(e,n,s,i=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=n,this.outputLen=s,this.enableXOF=i,this.rounds=r,(0,S.anumber)(s),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,S.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,S.swap32IfBE)(this.state32),Yt(this.state32,this.rounds),(0,S.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,S.aexists)(this),e=(0,S.toBytes)(e),(0,S.abytes)(e);const{blockLen:n,state:s}=this,i=e.length;for(let r=0;r<i;){const a=Math.min(n-this.pos,i-r);for(let o=0;o<a;o++)s[this.pos++]^=e[r++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:s,blockLen:i}=this;e[s]^=n,n&128&&s===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){(0,S.aexists)(this,!1),(0,S.abytes)(e),this.finish();const n=this.state,{blockLen:s}=this;for(let i=0,r=e.length;i<r;){this.posOut>=s&&this.keccak();const a=Math.min(s-this.posOut,r-i);e.set(n.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,S.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,S.aoutput)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,S.clean)(this.state)}_cloneInto(e){const{blockLen:n,suffix:s,outputLen:i,rounds:r,enableXOF:a}=this;return e||(e=new re(n,s,i,a,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=s,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}}b.Keccak=re;const q=(t,e,n)=>(0,S.createHasher)(()=>new re(e,t,n));b.sha3_224=q(6,144,224/8);b.sha3_256=q(6,136,256/8);b.sha3_384=q(6,104,384/8);b.sha3_512=q(6,72,512/8);b.keccak_224=q(1,144,224/8);b.keccak_256=q(1,136,256/8);b.keccak_384=q(1,104,384/8);b.keccak_512=q(1,72,512/8);const Jt=(t,e,n)=>(0,S.createXOFer)((s={})=>new re(e,t,s.dkLen===void 0?n:s.dkLen,!0));b.shake128=Jt(31,168,128/8);b.shake256=Jt(31,136,256/8);const{keccak_256:ls}=b;function Qt(t){return Buffer.allocUnsafe(t).fill(0)}function hs(t){return t.toString(2).length}function Xt(t,e){let n=t.toString(16);n.length%2!==0&&(n="0"+n);const s=n.match(/.{1,2}/g).map(i=>parseInt(i,16));for(;s.length<e;)s.unshift(0);return Buffer.from(s)}function us(t,e){const n=t<0n;let s;if(n){const i=(1n<<BigInt(e))-1n;s=(~t&i)+1n}else s=t;return s&=(1n<<BigInt(e))-1n,s}function $t(t,e,n){const s=Qt(e);return t=ue(t),n?t.length<e?(t.copy(s),s):t.slice(0,e):t.length<e?(t.copy(s,e-t.length),s):t.slice(-e)}function fs(t,e){return $t(t,e,!0)}function ue(t){if(!Buffer.isBuffer(t))if(Array.isArray(t))t=Buffer.from(t);else if(typeof t=="string")en(t)?t=Buffer.from(ms(tn(t)),"hex"):t=Buffer.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=Buffer.allocUnsafe(0);else if(typeof t=="bigint")t=Xt(t);else if(t.toArray)t=Buffer.from(t.toArray());else throw new Error("invalid type");return t}function ps(t){return t=ue(t),"0x"+t.toString("hex")}function gs(t,e){if(t=ue(t),e||(e=256),e!==256)throw new Error("unsupported");return Buffer.from(ls(new Uint8Array(t)))}function ms(t){return t.length%2?"0"+t:t}function en(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function tn(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}var nn={zeros:Qt,setLength:$t,setLengthRight:fs,isHexString:en,stripHexPrefix:tn,toBuffer:ue,bufferToHex:ps,keccak:gs,bitLengthFromBigInt:hs,bufferBEFromBigInt:Xt,twosFromBigInt:us};const x=nn;function sn(t){return t.startsWith("int[")?"int256"+t.slice(3):t==="int"?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):t==="uint"?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):t==="fixed"?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):t==="ufixed"?"ufixed128x128":t}function G(t){return Number.parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function Qe(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[Number.parseInt(e[1],10),Number.parseInt(e[2],10)]}function rn(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":Number.parseInt(e[2],10):null}function K(t){var e=typeof t;if(e==="string"||e==="number")return BigInt(t);if(e==="bigint")return t;throw new Error("Argument is not a number")}function R(t,e){var n,s,i,r;if(t==="address")return R("uint160",K(e));if(t==="bool")return R("uint8",e?1:0);if(t==="string")return R("bytes",new Buffer(e,"utf8"));if(bs(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(n=rn(t),n!=="dynamic"&&n!==0&&e.length>n)throw new Error("Elements exceed array size: "+n);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(r in e)i.push(R(t,e[r]));if(n==="dynamic"){var a=R("uint256",e.length);i.unshift(a)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([R("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,x.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(n=G(t),n<1||n>32)throw new Error("Invalid bytes<N> width: "+n);return x.setLengthRight(e,32)}else if(t.startsWith("uint")){if(n=G(t),n%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);s=K(e);const o=x.bitLengthFromBigInt(s);if(o>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+o);if(s<0)throw new Error("Supplied uint is negative");return x.bufferBEFromBigInt(s,32)}else if(t.startsWith("int")){if(n=G(t),n%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);s=K(e);const o=x.bitLengthFromBigInt(s);if(o>n)throw new Error("Supplied int exceeds width: "+n+" vs "+o);const d=x.twosFromBigInt(s,256);return x.bufferBEFromBigInt(d,32)}else if(t.startsWith("ufixed")){if(n=Qe(t),s=K(e),s<0)throw new Error("Supplied ufixed is negative");return R("uint256",s*BigInt(2)**BigInt(n[1]))}else if(t.startsWith("fixed"))return n=Qe(t),R("int256",K(e)*BigInt(2)**BigInt(n[1]))}throw new Error("Unsupported or invalid type: "+t)}function ws(t){return t==="string"||t==="bytes"||rn(t)==="dynamic"}function bs(t){return t.lastIndexOf("]")===t.length-1}function ys(t,e){var n=[],s=[],i=32*t.length;for(var r in t){var a=sn(t[r]),o=e[r],d=R(a,o);ws(a)?(n.push(R("uint256",i)),s.push(d),i+=d.length):n.push(d)}return Buffer.concat(n.concat(s))}function an(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var n,s,i=[],r=0;r<t.length;r++){var a=sn(t[r]),o=e[r];if(a==="bytes")i.push(o);else if(a==="string")i.push(new Buffer(o,"utf8"));else if(a==="bool")i.push(new Buffer(o?"01":"00","hex"));else if(a==="address")i.push(x.setLength(o,20));else if(a.startsWith("bytes")){if(n=G(a),n<1||n>32)throw new Error("Invalid bytes<N> width: "+n);i.push(x.setLengthRight(o,n))}else if(a.startsWith("uint")){if(n=G(a),n%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);s=K(o);const d=x.bitLengthFromBigInt(s);if(d>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+d);i.push(x.bufferBEFromBigInt(s,n/8))}else if(a.startsWith("int")){if(n=G(a),n%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);s=K(o);const d=x.bitLengthFromBigInt(s);if(d>n)throw new Error("Supplied int exceeds width: "+n+" vs "+d);const l=x.twosFromBigInt(s,n);i.push(x.bufferBEFromBigInt(l,n/8))}else throw new Error("Unsupported or invalid type: "+a)}return Buffer.concat(i)}function vs(t,e){return x.keccak(an(t,e))}var ks={rawEncode:ys,solidityPack:an,soliditySHA3:vs};const L=nn,te=ks,on={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"]},ye={encodeData(t,e,n,s=!0){const i=["bytes32"],r=[this.hashType(t,n)];if(s){const a=(o,d,l)=>{if(n[d]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":L.keccak(this.encodeData(d,l,n,s))];if(l===void 0)throw new Error(`missing value for field ${o} of type ${d}`);if(d==="bytes")return["bytes32",L.keccak(l)];if(d==="string")return typeof l=="string"&&(l=Buffer.from(l,"utf8")),["bytes32",L.keccak(l)];if(d.lastIndexOf("]")===d.length-1){const p=d.slice(0,d.lastIndexOf("[")),u=l.map(m=>a(o,p,m));return["bytes32",L.keccak(te.rawEncode(u.map(([m])=>m),u.map(([,m])=>m)))]}return[d,l]};for(const o of n[t]){const[d,l]=a(o.name,o.type,e[o.name]);i.push(d),r.push(l)}}else for(const a of n[t]){let o=e[a.name];if(o!==void 0)if(a.type==="bytes")i.push("bytes32"),o=L.keccak(o),r.push(o);else if(a.type==="string")i.push("bytes32"),typeof o=="string"&&(o=Buffer.from(o,"utf8")),o=L.keccak(o),r.push(o);else if(n[a.type]!==void 0)i.push("bytes32"),o=L.keccak(this.encodeData(a.type,o,n,s)),r.push(o);else{if(a.type.lastIndexOf("]")===a.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(a.type),r.push(o)}}return te.rawEncode(i,r)},encodeType(t,e){let n="",s=this.findTypeDependencies(t,e).filter(i=>i!==t);s=[t].concat(s.sort());for(const i of s){if(!e[i])throw new Error("No type definition specified: "+i);n+=i+"("+e[i].map(({name:a,type:o})=>o+" "+a).join(",")+")"}return n},findTypeDependencies(t,e,n=[]){if(t=t.match(/^\w*/)[0],n.includes(t)||e[t]===void 0)return n;n.push(t);for(const s of e[t])for(const i of this.findTypeDependencies(s.type,e,n))!n.includes(i)&&n.push(i);return n},hashStruct(t,e,n,s=!0){return L.keccak(this.encodeData(t,e,n,s))},hashType(t,e){return L.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const n in on.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const n=this.sanitizeData(t),s=[Buffer.from("1901","hex")];return s.push(this.hashStruct("EIP712Domain",n.domain,n.types,e)),n.primaryType!=="EIP712Domain"&&s.push(this.hashStruct(n.primaryType,n.message,n.types,e)),L.keccak(Buffer.concat(s))}};var Es={TYPED_MESSAGE_SCHEMA:on,TypedDataUtils:ye,hashForSignTypedDataLegacy:function(t){return Is(t.data)},hashForSignTypedData_v3:function(t){return ye.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return ye.hash(t.data)}};function Is(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const n=t.map(function(r){return r.type==="bytes"?L.toBuffer(r.value):r.value}),s=t.map(function(r){return r.type}),i=t.map(function(r){if(!r.name)throw e;return r.type+" "+r.name});return te.soliditySHA3(["bytes32","bytes32"],[te.soliditySHA3(new Array(t.length).fill("string"),i),te.soliditySHA3(s,n)])}const ce=Pn(Es),Cs="walletUsername",xe="Addresses",Ss="AppVersion";function C(t){return t.errorMessage!==void 0}class xs{constructor(e){this.secret=e}async encrypt(e){const n=this.secret;if(n.length!==64)throw Error("secret must be 256 bits");const s=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",de(n),{name:"aes-gcm"},!1,["encrypt","decrypt"]),r=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,r.encode(e)),o=16,d=a.slice(a.byteLength-o),l=a.slice(0,a.byteLength-o),p=new Uint8Array(d),u=new Uint8Array(l),m=new Uint8Array([...s,...p,...u]);return Me(m)}async decrypt(e){const n=this.secret;if(n.length!==64)throw Error("secret must be 256 bits");return new Promise((s,i)=>{(async function(){const r=await crypto.subtle.importKey("raw",de(n),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=de(e),o=a.slice(0,12),d=a.slice(12,28),l=a.slice(28),p=new Uint8Array([...l,...d]),u={name:"AES-GCM",iv:new Uint8Array(o)};try{const m=await window.crypto.subtle.decrypt(u,r,p),v=new TextDecoder;s(v.decode(m))}catch(m){i(m)}})()})}}class _s{constructor(e,n,s){this.linkAPIUrl=e,this.sessionId=n;const i=`${n}:${s}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(n=>fetch(`${this.linkAPIUrl}/events/${n.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(n=>console.error("Unabled to mark event as failed:",n))}async fetchUnseenEvents(){var e;const n=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(n.ok){const{events:s,error:i}=await n.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const r=(e=s?.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(r),r}throw new Error(`Check unseen events failed: ${n.status}`)}}var U;(function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"})(U||(U={}));class As{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,n=WebSocket){this.WebSocketClass=n,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,n)=>{var s;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(r){n(r);return}(s=this.connectionStateListener)===null||s===void 0||s.call(this,U.CONNECTING),i.onclose=r=>{var a;this.clearWebSocket(),n(new Error(`websocket error ${r.code}: ${r.reason}`)),(a=this.connectionStateListener)===null||a===void 0||a.call(this,U.DISCONNECTED)},i.onopen=r=>{var a;e(),(a=this.connectionStateListener)===null||a===void 0||a.call(this,U.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(d=>this.sendData(d)),this.pendingData=[])},i.onmessage=r=>{var a,o;if(r.data==="h")(a=this.incomingDataListener)===null||a===void 0||a.call(this,{type:"Heartbeat"});else try{const d=JSON.parse(r.data);(o=this.incomingDataListener)===null||o===void 0||o.call(this,d)}catch{}}})}disconnect(){var e;const{webSocket:n}=this;if(n){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,U.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{n.close()}catch{}}}sendData(e){const{webSocket:n}=this;if(!n){this.pendingData.push(e),this.connect();return}n.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}const Xe=1e4,Ls=6e4;class Ms{constructor({session:e,linkAPIUrl:n,listener:s}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=N(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=r=>{if(!r)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",o=>r.JsonRpcUrl&&this.handleChainUpdated(o,r.JsonRpcUrl)]]).forEach((o,d)=>{const l=r[d];l!==void 0&&o(l)})},this.handleDestroyed=r=>{var a;r==="1"&&((a=this.listener)===null||a===void 0||a.resetAndReload())},this.handleAccountUpdated=async r=>{var a;const o=await this.cipher.decrypt(r);(a=this.listener)===null||a===void 0||a.accountUpdated(o)},this.handleMetadataUpdated=async(r,a)=>{var o;const d=await this.cipher.decrypt(a);(o=this.listener)===null||o===void 0||o.metadataUpdated(r,d)},this.handleWalletUsernameUpdated=async r=>{this.handleMetadataUpdated(Cs,r)},this.handleAppVersionUpdated=async r=>{this.handleMetadataUpdated(Ss,r)},this.handleChainUpdated=async(r,a)=>{var o;const d=await this.cipher.decrypt(r),l=await this.cipher.decrypt(a);(o=this.listener)===null||o===void 0||o.chainUpdated(d,l)},this.session=e,this.cipher=new xs(e.secret),this.listener=s;const i=new As(`${n}/rpc`,WebSocket);i.setConnectionStateListener(async r=>{let a=!1;switch(r){case U.DISCONNECTED:if(!this.destroyed){const o=async()=>{await new Promise(d=>setTimeout(d,5e3)),this.destroyed||i.connect().catch(()=>{o()})};o()}break;case U.CONNECTED:a=await this.handleConnected(),this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Xe),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case U.CONNECTING:break}this.connected!==a&&(this.connected=a)}),i.setIncomingDataListener(r=>{var a;switch(r.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const o=r.type==="IsLinkedOK"?r.linked:void 0;this.linked=o||r.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{this.handleSessionMetadataUpdated(r.metadata);break}case"Event":{this.handleIncomingEvent(r);break}}r.id!==void 0&&((a=this.requestResolutions.get(r.id))===null||a===void 0||a(r))}),this.ws=i,this.http=new _s(n,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}async destroy(){this.destroyed||(await this.makeRequest({type:"SetSessionConfig",id:N(this.nextReqId++),sessionId:this.session.id,metadata:{__destroyed:"1"}},{timeout:1e3}),this.destroyed=!0,this.ws.disconnect(),this.listener=void 0)}get connected(){return this._connected}set connected(e){this._connected=e}get linked(){return this._linked}set linked(e){var n,s;this._linked=e,e&&((n=this.onceLinked)===null||n===void 0||n.call(this)),(s=this.listener)===null||s===void 0||s.linkedUpdated(e)}setOnceLinked(e){return new Promise(n=>{this.linked?e().then(n):this.onceLinked=()=>{e().then(n),this.onceLinked=void 0}})}async handleIncomingEvent(e){var n;if(e.type!=="Event"||e.event!=="Web3Response")return;const s=await this.cipher.decrypt(e.data),i=JSON.parse(s);if(i.type!=="WEB3_RESPONSE")return;const{id:r,response:a}=i;(n=this.listener)===null||n===void 0||n.handleWeb3ResponseMessage(r,a)}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(n=>this.handleIncomingEvent(n))}async publishEvent(e,n,s=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},n),{origin:location.origin,location:location.href,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),r={type:"PublishEvent",id:N(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:s};return this.setOnceLinked(async()=>{const a=await this.makeRequest(r);if(a.type==="Fail")throw new Error(a.error||"failed to publish event");return a.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Xe*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,n={timeout:Ls}){const s=e.id;this.sendData(e);let i;return Promise.race([new Promise((r,a)=>{i=window.setTimeout(()=>{a(new Error(`request ${s} timed out`))},n.timeout)}),new Promise(r=>{this.requestResolutions.set(s,a=>{clearTimeout(i),r(a),this.requestResolutions.delete(s)})})])}async handleConnected(){return(await this.makeRequest({type:"HostSession",id:N(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key})).type==="Fail"?!1:(this.sendData({type:"IsLinked",id:N(this.nextReqId++),sessionId:this.session.id}),this.sendData({type:"GetSessionConfig",id:N(this.nextReqId++),sessionId:this.session.id}),!0)}}class Ps{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,n=wt(e.toString(16));return this.callbacks.get(n)&&this.callbacks.delete(n),e}}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ts(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function fe(t,...e){if(!Ts(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function $e(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Rs(t,e){fe(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function _e(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function ve(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function T(t,e){return t<<32-e|t>>>e}const Os=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Ns=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Ds(t){if(fe(t),Os)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=Ns[t[n]];return e}function Us(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function cn(t){return typeof t=="string"&&(t=Us(t)),fe(t),t}class Bs{}function Hs(t){const e=s=>t().update(cn(s)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function js(t,e,n,s){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,s);const i=BigInt(32),r=BigInt(4294967295),a=Number(n>>i&r),o=Number(n&r),d=s?4:0,l=s?0:4;t.setUint32(e+d,a,s),t.setUint32(e+l,o,s)}function Ws(t,e,n){return t&e^~t&n}function qs(t,e,n){return t&e^t&n^e&n}class Vs extends Bs{constructor(e,n,s,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=n,this.padOffset=s,this.isLE=i,this.buffer=new Uint8Array(e),this.view=ve(this.buffer)}update(e){$e(this),e=cn(e),fe(e);const{view:n,buffer:s,blockLen:i}=this,r=e.length;for(let a=0;a<r;){const o=Math.min(i-this.pos,r-a);if(o===i){const d=ve(e);for(;i<=r-a;a+=i)this.process(d,a);continue}s.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){$e(this),Rs(e,this),this.finished=!0;const{buffer:n,view:s,blockLen:i,isLE:r}=this;let{pos:a}=this;n[a++]=128,_e(this.buffer.subarray(a)),this.padOffset>i-a&&(this.process(s,0),a=0);for(let u=a;u<i;u++)n[u]=0;js(s,i-8,BigInt(this.length*8),r),this.process(s,0);const o=ve(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=d/4,p=this.get();if(l>p.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)o.setUint32(4*u,p[u],r)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const s=e.slice(0,n);return this.destroy(),s}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:s,length:i,finished:r,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=r,e.length=i,e.pos=o,i%n&&e.buffer.set(s),e}clone(){return this._cloneInto()}}const H=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ks=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),j=new Uint32Array(64);class Fs extends Vs{constructor(e=32){super(64,e,8,!1),this.A=H[0]|0,this.B=H[1]|0,this.C=H[2]|0,this.D=H[3]|0,this.E=H[4]|0,this.F=H[5]|0,this.G=H[6]|0,this.H=H[7]|0}get(){const{A:e,B:n,C:s,D:i,E:r,F:a,G:o,H:d}=this;return[e,n,s,i,r,a,o,d]}set(e,n,s,i,r,a,o,d){this.A=e|0,this.B=n|0,this.C=s|0,this.D=i|0,this.E=r|0,this.F=a|0,this.G=o|0,this.H=d|0}process(e,n){for(let u=0;u<16;u++,n+=4)j[u]=e.getUint32(n,!1);for(let u=16;u<64;u++){const m=j[u-15],v=j[u-2],F=T(m,7)^T(m,18)^m>>>3,z=T(v,17)^T(v,19)^v>>>10;j[u]=z+j[u-7]+F+j[u-16]|0}let{A:s,B:i,C:r,D:a,E:o,F:d,G:l,H:p}=this;for(let u=0;u<64;u++){const m=T(o,6)^T(o,11)^T(o,25),v=p+m+Ws(o,d,l)+Ks[u]+j[u]|0,z=(T(s,2)^T(s,13)^T(s,22))+qs(s,i,r)|0;p=l,l=d,d=o,o=a+v|0,a=r,r=i,i=s,s=v+z|0}s=s+this.A|0,i=i+this.B|0,r=r+this.C|0,a=a+this.D|0,o=o+this.E|0,d=d+this.F|0,l=l+this.G|0,p=p+this.H|0,this.set(s,i,r,a,o,d,l,p)}roundClean(){_e(j)}destroy(){this.set(0,0,0,0,0,0,0,0),_e(this.buffer)}}const zs=Hs(()=>new Fs),Zs=zs,et="session:id",tt="session:secret",nt="session:linked";class Y{constructor(e,n,s,i=!1){this.storage=e,this.id=n,this.secret=s,this.key=Ds(Zs(`${n}, ${s} WalletLink`)),this._linked=!!i}static create(e){const n=V(16),s=V(32);return new Y(e,n,s).save()}static load(e){const n=e.getItem(et),s=e.getItem(nt),i=e.getItem(tt);return n&&i?new Y(e,n,i,s==="1"):null}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this.storage.setItem(et,this.id),this.storage.setItem(tt,this.secret),this.persistLinked(),this}persistLinked(){this.storage.setItem(nt,this._linked?"1":"0")}}function Gs(){try{return window.frameElement!==null}catch{return!1}}function Ys(){try{return Gs()&&window.top?window.top.location:window.location}catch{return window.location}}function Js(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window?.navigator)===null||t===void 0?void 0:t.userAgent)}function dn(){var t,e;return(e=(t=window?.matchMedia)===null||t===void 0?void 0:t.call(window,"(prefers-color-scheme: dark)").matches)!==null&&e!==void 0?e:!1}const Qs='@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}';function ln(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(Qs)),document.documentElement.appendChild(t)}function hn(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=hn(t[e]))&&(s&&(s+=" "),s+=n);else for(e in t)t[e]&&(s&&(s+=" "),s+=e);return s}function ne(){for(var t,e,n=0,s="";n<arguments.length;)(t=arguments[n++])&&(e=hn(t))&&(s&&(s+=" "),s+=e);return s}const Xs=".-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}",$s="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",ei="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class ti{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=dn()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const n=this.nextItemKey++;return this.items.set(n,e),this.render(),()=>{this.items.delete(n),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&ke(w("div",null,w(un,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,n])=>w(ni,Object.assign({},n,{key:e}))))),this.root)}}const un=t=>w("div",{class:ne("-cbwsdk-snackbar-container")},w("style",null,Xs),w("div",{class:"-cbwsdk-snackbar"},t.children)),ni=({autoExpand:t,message:e,menuItems:n})=>{const[s,i]=qe(!0),[r,a]=qe(t??!1);Tn(()=>{const d=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{a(!0)},1e4)];return()=>{d.forEach(window.clearTimeout)}});const o=()=>{a(!r)};return w("div",{class:ne("-cbwsdk-snackbar-instance",s&&"-cbwsdk-snackbar-instance-hidden",r&&"-cbwsdk-snackbar-instance-expanded")},w("div",{class:"-cbwsdk-snackbar-instance-header",onClick:o},w("img",{src:$s,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",w("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),w("div",{class:"-gear-container"},!r&&w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),w("img",{src:ei,class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&w("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map((d,l)=>w("div",{class:ne("-cbwsdk-snackbar-instance-menu-item",d.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:d.onClick,key:l},w("svg",{width:d.svgWidth,height:d.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w("path",{"fill-rule":d.defaultFillRule,"clip-rule":d.defaultClipRule,d:d.path,fill:"#AAAAAA"})),w("span",{class:ne("-cbwsdk-snackbar-instance-menu-item-info",d.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},d.info)))))};class si{constructor(){this.attached=!1,this.snackbar=new ti}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,n=document.createElement("div");n.className="-cbwsdk-css-reset",e.appendChild(n),this.snackbar.attach(n),this.attached=!0,ln()}showConnecting(e){let n;return e.isUnlinkedErrorState?n={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:e.onResetConnection}]}:n={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:e.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:e.onResetConnection}]},this.snackbar.presentItem(n)}}const ii=".-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}";class ri{constructor(){this.root=null,this.darkMode=dn()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),ln()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&(ke(null,this.root),e&&ke(w(ai,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}const ai=({title:t,buttonText:e,darkMode:n,onButtonClick:s,onDismiss:i})=>{const r=n?"dark":"light";return w(un,{darkMode:n},w("div",{class:"-cbwsdk-redirect-dialog"},w("style",null,ii),w("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),w("div",{class:ne("-cbwsdk-redirect-dialog-box",r)},w("p",null,t),w("button",{onClick:s},e))))},oi="https://keys.coinbase.com/connect",ci="http://rpc.wallet.coinbase.com",st="https://www.walletlink.org",di="https://go.cb-w.com/walletlink";class it{constructor(){this.attached=!1,this.redirectDialog=new ri}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const n=new URL(di);n.searchParams.append("redirect_url",Ys().href),e&&n.searchParams.append("wl_url",e);const s=document.createElement("a");s.target="cbw-opener",s.href=n.href,s.rel="noreferrer noopener",s.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}class D{constructor(e){this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.isMobileWeb=Js(),this.linkedUpdated=r=>{this.isLinked=r;const a=this.storage.getItem(xe);if(r&&(this._session.linked=r),this.isUnlinkedErrorState=!1,a){const o=a.split(" "),d=this.storage.getItem("IsStandaloneSigning")==="true";o[0]!==""&&!r&&this._session.linked&&!d&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(r,a)=>{this.storage.setItem(r,a)},this.chainUpdated=(r,a)=>{this.chainCallbackParams.chainId===r&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:r,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(a,Number.parseInt(r,10)))},this.accountUpdated=r=>{this.accountsCallback&&this.accountsCallback([r]),D.accountRequestCallbackIds.size>0&&(Array.from(D.accountRequestCallbackIds.values()).forEach(a=>{this.invokeCallback(a,{method:"requestEthereumAccounts",result:[r]})}),D.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.metadata=e.metadata,this.accountsCallback=e.accountsCallback,this.chainCallback=e.chainCallback;const{session:n,ui:s,connection:i}=this.subscribe();this._session=n,this.connection=i,this.relayEventManager=new Ps,this.ui=s,this.ui.attach()}subscribe(){const e=Y.load(this.storage)||Y.create(this.storage),{linkAPIUrl:n}=this,s=new Ms({session:e,linkAPIUrl:n,listener:this}),i=this.isMobileWeb?new it:new si;return s.connect(),{session:e,ui:i,connection:s}}resetAndReload(){this.connection.destroy().then(()=>{const e=Y.load(this.storage);e?.id===this._session.id&&M.clearAll(),document.location.reload()}).catch(e=>{})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:P(e.weiValue),data:$(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?P(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?P(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?P(e.gasPriceInWei):null,gasLimit:e.gasLimit?P(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:P(e.weiValue),data:$(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?P(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?P(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?P(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?P(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,n){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:$(e,!0),chainId:n}})}getWalletLinkSession(){return this._session}sendRequest(e){let n=null;const s=V(8),i=r=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,e.method,r),n?.()};return new Promise((r,a)=>{n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(s,o=>{if(n?.(),C(o))return a(new Error(o.errorMessage));r(o)}),this.publishWeb3RequestEvent(s,e)})}publishWeb3RequestEvent(e,n){const s={type:"WEB3_REQUEST",id:e,request:n};this.publishEvent("Web3Request",s,!0).then(i=>{}).catch(i=>{this.handleWeb3ResponseMessage(s.id,{method:n.method,errorMessage:i.message})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(n.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof it)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){const n={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",n,!1).then()}publishEvent(e,n,s){return this.connection.publishEvent(e,n,s)}handleWeb3ResponseMessage(e,n){if(n.method==="requestEthereumAccounts"){D.accountRequestCallbackIds.forEach(s=>this.invokeCallback(s,n)),D.accountRequestCallbackIds.clear();return}this.invokeCallback(e,n)}handleErrorResponse(e,n,s){var i;const r=(i=s?.message)!==null&&i!==void 0?i:"Unspecified error message.";this.handleWeb3ResponseMessage(e,{method:n,errorMessage:r})}invokeCallback(e,n){const s=this.relayEventManager.callbacks.get(e);s&&(s(n),this.relayEventManager.callbacks.delete(e))}requestEthereumAccounts(){const{appName:e,appLogoUrl:n}=this.metadata,s={method:"requestEthereumAccounts",params:{appName:e,appLogoUrl:n}},i=V(8);return new Promise((r,a)=>{this.relayEventManager.callbacks.set(i,o=>{if(C(o))return a(new Error(o.errorMessage));r(o)}),D.accountRequestCallbackIds.add(i),this.publishWeb3RequestEvent(i,s)})}watchAsset(e,n,s,i,r,a){const o={method:"watchAsset",params:{type:e,options:{address:n,symbol:s,decimals:i,image:r},chainId:a}};let d=null;const l=V(8),p=u=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,o.method,u),d?.()};return d=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:p,onResetConnection:this.resetAndReload}),new Promise((u,m)=>{this.relayEventManager.callbacks.set(l,v=>{if(d?.(),C(v))return m(new Error(v.errorMessage));u(v)}),this.publishWeb3RequestEvent(l,o)})}addEthereumChain(e,n,s,i,r,a){const o={method:"addEthereumChain",params:{chainId:e,rpcUrls:n,blockExplorerUrls:i,chainName:r,iconUrls:s,nativeCurrency:a}};let d=null;const l=V(8),p=u=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,o.method,u),d?.()};return d=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:p,onResetConnection:this.resetAndReload}),new Promise((u,m)=>{this.relayEventManager.callbacks.set(l,v=>{if(d?.(),C(v))return m(new Error(v.errorMessage));u(v)}),this.publishWeb3RequestEvent(l,o)})}switchEthereumChain(e,n){const s={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:n})};let i=null;const r=V(8),a=o=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,s.method,o),i?.()};return i=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:a,onResetConnection:this.resetAndReload}),new Promise((o,d)=>{this.relayEventManager.callbacks.set(r,l=>{if(i?.(),C(l)&&l.errorCode)return d(g.provider.custom({code:l.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if(C(l))return d(new Error(l.errorMessage));o(l)}),this.publishWeb3RequestEvent(r,s)})}}D.accountRequestCallbackIds=new Set;const rt="DefaultChainId",at="DefaultJsonRpcUrl";class fn{constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new M("walletlink",st),this.callback=e.callback||null;const n=this._storage.getItem(xe);if(n){const s=n.split(" ");s[0]!==""&&(this._addresses=s.map(i=>B(i)))}this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:n,secret:s}=e.getWalletLinkSession();return{id:n,secret:s}}async handshake(){await this._eth_requestAccounts()}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(at))!==null&&e!==void 0?e:void 0}set jsonRpcUrl(e){this._storage.setItem(at,e)}updateProviderInfo(e,n){var s;this.jsonRpcUrl=e;const i=this.getChainId();this._storage.setItem(rt,n.toString(10)),ee(n)!==i&&((s=this.callback)===null||s===void 0||s.call(this,"chainChanged",W(n)))}async watchAsset(e){const n=Array.isArray(e)?e[0]:e;if(!n.type)throw g.rpc.invalidParams("Type is required");if(n?.type!=="ERC20")throw g.rpc.invalidParams(`Asset of type '${n.type}' is not supported`);if(!n?.options)throw g.rpc.invalidParams("Options are required");if(!n?.options.address)throw g.rpc.invalidParams("Address is required");const s=this.getChainId(),{address:i,symbol:r,image:a,decimals:o}=n.options,l=await this.initializeRelay().watchAsset(n.type,i,r,o,a,s?.toString());return C(l)?!1:!!l.result}async addEthereumChain(e){var n,s;const i=e[0];if(((n=i.rpcUrls)===null||n===void 0?void 0:n.length)===0)throw g.rpc.invalidParams("please pass in at least 1 rpcUrl");if(!i.chainName||i.chainName.trim()==="")throw g.rpc.invalidParams("chainName is a required field");if(!i.nativeCurrency)throw g.rpc.invalidParams("nativeCurrency is a required field");const r=Number.parseInt(i.chainId,16);if(r===this.getChainId())return!1;const a=this.initializeRelay(),{rpcUrls:o=[],blockExplorerUrls:d=[],chainName:l,iconUrls:p=[],nativeCurrency:u}=i,m=await a.addEthereumChain(r.toString(),o,p,d,l,u);if(C(m))return!1;if(((s=m.result)===null||s===void 0?void 0:s.isApproved)===!0)return this.updateProviderInfo(o[0],r),null;throw g.rpc.internal("unable to add ethereum chain")}async switchEthereumChain(e){const n=e[0],s=Number.parseInt(n.chainId,16),r=await this.initializeRelay().switchEthereumChain(s.toString(10),this.selectedAddress||void 0);if(C(r))throw r;const a=r.result;return a.isApproved&&a.rpcUrl.length>0&&this.updateProviderInfo(a.rpcUrl,s),null}async cleanup(){this.callback=null,this._relay&&this._relay.resetAndReload(),this._storage.clear()}_setAddresses(e,n){var s;if(!Array.isArray(e))throw new Error("addresses is not an array");const i=e.map(r=>B(r));JSON.stringify(i)!==JSON.stringify(this._addresses)&&(this._addresses=i,(s=this.callback)===null||s===void 0||s.call(this,"accountsChanged",i),this._storage.setItem(xe,i.join(" ")))}async request(e){const n=e.params||[];switch(e.method){case"eth_accounts":return[...this._addresses];case"eth_coinbase":return this.selectedAddress||null;case"net_version":return this.getChainId().toString(10);case"eth_chainId":return W(this.getChainId());case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_ecRecover":case"personal_ecRecover":return this.ecRecover(e);case"personal_sign":return this.personalSign(e);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":return this.signTypedData(e);case"wallet_addEthereumChain":return this.addEthereumChain(n);case"wallet_switchEthereumChain":return this.switchEthereumChain(n);case"wallet_watchAsset":return this.watchAsset(n);default:if(!this.jsonRpcUrl)throw g.rpc.internal("No RPC URL set for chain");return Re(e,this.jsonRpcUrl)}}_ensureKnownAddress(e){const n=B(e);if(!this._addresses.map(i=>B(i)).includes(n))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?B(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);const s=e.to?B(e.to):null,i=e.value!=null?Q(e.value):BigInt(0),r=e.data?Ce(e.data):Buffer.alloc(0),a=e.nonce!=null?ee(e.nonce):null,o=e.gasPrice!=null?Q(e.gasPrice):null,d=e.maxFeePerGas!=null?Q(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?Q(e.maxPriorityFeePerGas):null,p=e.gas!=null?Q(e.gas):null,u=e.chainId?ee(e.chainId):this.getChainId();return{fromAddress:n,toAddress:s,weiValue:i,data:r,nonce:a,gasPriceInWei:o,maxFeePerGas:d,maxPriorityFeePerGas:l,gasLimit:p,chainId:u}}async ecRecover(e){const{method:n,params:s}=e;if(!Array.isArray(s))throw g.rpc.invalidParams();const r=await this.initializeRelay().sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:ge(s[0]),signature:ge(s[1]),addPrefix:n==="personal_ecRecover"}});if(C(r))throw r;return r.result}getChainId(){var e;return Number.parseInt((e=this._storage.getItem(rt))!==null&&e!==void 0?e:"1",10)}async _eth_requestAccounts(){var e,n;if(this._addresses.length>0)return(e=this.callback)===null||e===void 0||e.call(this,"connect",{chainId:W(this.getChainId())}),this._addresses;const i=await this.initializeRelay().requestEthereumAccounts();if(C(i))throw i;if(!i.result)throw new Error("accounts received is empty");return this._setAddresses(i.result),(n=this.callback)===null||n===void 0||n.call(this,"connect",{chainId:W(this.getChainId())}),this._addresses}async personalSign({params:e}){if(!Array.isArray(e))throw g.rpc.invalidParams();const n=e[1],s=e[0];this._ensureKnownAddress(n);const r=await this.initializeRelay().sendRequest({method:"signEthereumMessage",params:{address:B(n),message:ge(s),addPrefix:!0,typedDataJson:null}});if(C(r))throw r;return r.result}async _eth_signTransaction(e){const n=this._prepareTransactionParams(e[0]||{}),i=await this.initializeRelay().signEthereumTransaction(n);if(C(i))throw i;return i.result}async _eth_sendRawTransaction(e){const n=Ce(e[0]),i=await this.initializeRelay().submitEthereumTransaction(n,this.getChainId());if(C(i))throw i;return i.result}async _eth_sendTransaction(e){const n=this._prepareTransactionParams(e[0]||{}),i=await this.initializeRelay().signAndSubmitEthereumTransaction(n);if(C(i))throw i;return i.result}async signTypedData(e){const{method:n,params:s}=e;if(!Array.isArray(s))throw g.rpc.invalidParams();const i=l=>{const p={eth_signTypedData_v1:ce.hashForSignTypedDataLegacy,eth_signTypedData_v3:ce.hashForSignTypedData_v3,eth_signTypedData_v4:ce.hashForSignTypedData_v4,eth_signTypedData:ce.hashForSignTypedData_v4};return $(p[n]({data:qn(l)}),!0)},r=s[n==="eth_signTypedData_v1"?1:0],a=s[n==="eth_signTypedData_v1"?0:1];this._ensureKnownAddress(r);const d=await this.initializeRelay().sendRequest({method:"signEthereumMessage",params:{address:B(r),message:i(a),typedDataJson:JSON.stringify(a,null,2),addPrefix:!1}});if(C(d))throw d;return d.result}initializeRelay(){return this._relay||(this._relay=new D({linkAPIUrl:st,storage:this._storage,metadata:this.metadata,accountsCallback:this._setAddresses.bind(this),chainCallback:this.updateProviderInfo.bind(this)})),this._relay}}const pn="SignerType",gn=new M("CBWSDK","SignerConfigurator");function li(){return gn.getItem(pn)}function hi(t){gn.setItem(pn,t)}async function ui(t){const{communicator:e,metadata:n,handshakeRequest:s,callback:i}=t;pi(e,n,i).catch(()=>{});const r={id:crypto.randomUUID(),event:"selectSignerType",data:Object.assign(Object.assign({},t.preference),{handshakeRequest:s})},{data:a}=await e.postRequestAndWaitForResponse(r);return a}function fi(t){const{signerType:e,metadata:n,communicator:s,callback:i}=t;switch(e){case"scw":return new ts({metadata:n,callback:i,communicator:s});case"walletlink":return new fn({metadata:n,callback:i})}}async function pi(t,e,n){await t.onMessage(({event:i})=>i==="WalletLinkSessionRequest");const s=new fn({metadata:e,callback:n});t.postMessage({event:"WalletLinkUpdate",data:{session:s.getSession()}}),await s.handshake(),t.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}const gi=`Coinbase Wallet SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Coinbase Smart Wallet app.
2
+
3
+ Please see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.`,mi=()=>{let t;return{getCrossOriginOpenerPolicy:()=>t===void 0?"undefined":t,checkCrossOriginOpenerPolicy:async()=>{if(typeof window>"u"){t="non-browser-env";return}try{const e=`${window.location.origin}${window.location.pathname}`,n=await fetch(e,{method:"HEAD"});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const s=n.headers.get("Cross-Origin-Opener-Policy");t=s??"null",t==="same-origin"&&console.error(gi)}catch(e){console.error("Error checking Cross-Origin-Opener-Policy:",e.message),t="error"}}}},{checkCrossOriginOpenerPolicy:mn,getCrossOriginOpenerPolicy:wi}=mi(),ot=420,ct=540;function bi(t){const e=(window.innerWidth-ot)/2+window.screenX,n=(window.innerHeight-ct)/2+window.screenY;vi(t);const s=`wallet_${crypto.randomUUID()}`,i=window.open(t,s,`width=${ot}, height=${ct}, left=${e}, top=${n}`);if(i?.focus(),!i)throw g.rpc.internal("Pop up window failed to open");return i}function yi(t){t&&!t.closed&&t.close()}function vi(t){const e={sdkName:kt,sdkVersion:J,origin:window.location.origin,coop:wi()};for(const[n,s]of Object.entries(e))t.searchParams.append(n,s.toString())}class ki{constructor({url:e=oi,metadata:n,preference:s}){this.popup=null,this.listeners=new Map,this.postMessage=async i=>{(await this.waitForPopupLoaded()).postMessage(i,this.url.origin)},this.postRequestAndWaitForResponse=async i=>{const r=this.onMessage(({requestId:a})=>a===i.id);return this.postMessage(i),await r},this.onMessage=async i=>new Promise((r,a)=>{const o=d=>{if(d.origin!==this.url.origin)return;const l=d.data;i(l)&&(r(l),window.removeEventListener("message",o),this.listeners.delete(o))};window.addEventListener("message",o),this.listeners.set(o,{reject:a})}),this.disconnect=()=>{yi(this.popup),this.popup=null,this.listeners.forEach(({reject:i},r)=>{i(g.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",r)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(this.popup=bi(this.url),this.onMessage(({event:i})=>i==="PopupUnload").then(this.disconnect).catch(()=>{}),this.onMessage(({event:i})=>i==="PopupLoaded").then(i=>{this.postMessage({requestId:i.id,data:{version:J,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw g.rpc.internal();return this.popup})),this.url=new URL(e),this.metadata=n,this.preference=s}}function Ei(t){const e=Un(Ii(t),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");return n.searchParams.set("version",J),n.searchParams.set("code",e.code.toString()),n.searchParams.set("message",e.message),Object.assign(Object.assign({},e),{docUrl:n.href})}function Ii(t){var e;if(typeof t=="string")return{message:t,code:E.rpc.internal};if(C(t)){const n=t.errorMessage,s=(e=t.errorCode)!==null&&e!==void 0?e:n.match(/(denied|rejected)/i)?E.provider.userRejectedRequest:void 0;return Object.assign(Object.assign({},t),{message:n,code:s,data:{method:t.method}})}return t}class Ci extends Rn.EventEmitter{}var Si=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n};class wn extends Ci{constructor(e){var{metadata:n}=e,s=e.preference,{keysUrl:i}=s,r=Si(s,["keysUrl"]);super(),this.signer=null,this.isCoinbaseWallet=!0,this.metadata=n,this.preference=r,this.communicator=new ki({url:i,metadata:n,preference:r});const a=li();a&&(this.signer=this.initSigner(a))}async request(e){try{if(es(e),!this.signer)switch(e.method){case"eth_requestAccounts":{const n=await this.requestSignerSelection(e),s=this.initSigner(n);await s.handshake(e),this.signer=s,hi(n);break}case"wallet_sendCalls":{const n=this.initSigner("scw");await n.handshake({method:"handshake"});const s=await n.request(e);return await n.cleanup(),s}case"wallet_getCallsStatus":return Re(e,ci);case"net_version":return 1;case"eth_chainId":return W(1);default:throw g.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")}return await this.signer.request(e)}catch(n){const{code:s}=n;return s===E.provider.unauthorized&&this.disconnect(),Promise.reject(Ei(n))}}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){var e;await((e=this.signer)===null||e===void 0?void 0:e.cleanup()),this.signer=null,M.clearAll(),this.emit("disconnect",g.provider.disconnected("User initiated disconnection"))}requestSignerSelection(e){return ui({communicator:this.communicator,preference:this.preference,metadata:this.metadata,handshakeRequest:e,callback:this.emit.bind(this)})}initSigner(e){return fi({signerType:e,metadata:this.metadata,communicator:this.communicator,callback:this.emit.bind(this)})}}function bn(t){if(t){if(!["all","smartWalletOnly","eoaOnly"].includes(t.options))throw new Error(`Invalid options: ${t.options}`);if(t.attribution&&t.attribution.auto!==void 0&&t.attribution.dataSuffix!==void 0)throw new Error("Attribution cannot contain both auto and dataSuffix properties")}}class Pi{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||Kn(),appChainIds:e.appChainIds||[]},this.storeLatestVersion(),mn()}makeWeb3Provider(e={options:"all"}){var n;bn(e);const s={metadata:this.metadata,preference:e};return(n=Et(s))!==null&&n!==void 0?n:new wn(s)}getCoinbaseWalletLogo(e,n=240){return On(e,n)}storeLatestVersion(){new M("CBWSDK").setItem("VERSION",J)}}function xi(t){var e;const n={metadata:t.metadata,preference:t.preference};return(e=Et(n))!==null&&e!==void 0?e:new wn(n)}const _i={options:"all"};function Ti(t){var e;new M("CBWSDK").setItem("VERSION",J),mn();const s={metadata:{appName:t.appName||"Dapp",appLogoUrl:t.appLogoUrl||"",appChainIds:t.appChainIds||[]},preference:Object.assign(_i,(e=t.preference)!==null&&e!==void 0?e:{})};bn(s.preference);let i=null;return{getProvider:()=>(i||(i=xi(s)),i)}}export{Pi as CoinbaseWalletSDK,Ti as createCoinbaseWalletSDK,Pi as default};
@@ -0,0 +1,2 @@
1
+ const __vite__fileDeps=["assets/index-HvoTJwGm.js","assets/tslib.es6-DbvBTznf.js","assets/is-plan-event-enabled-DeNtQvA5.js","assets/index-CjuQOkbh.js","assets/preload-helper-BorDCKdG.js","assets/index-C05H8NDX.js","assets/index-DmAaXUNv.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{_ as q}from"./preload-helper-BorDCKdG.js";import{d as L,b as f,e as Ht,c as C,_ as y,a as m}from"./tslib.es6-DbvBTznf.js";import{c as M}from"./_commonjsHelpers-C4iS2aBk.js";import{i as se}from"./inherits_browser-BlmhoU4v.js";function Xe(e,t,r){t.split&&(t=t.split("."));for(var n=0,i=t.length,o=e,a,u;n<i&&(u=""+t[n++],!(u==="__proto__"||u==="constructor"||u==="prototype"));)o=o[u]=n===i?r:typeof(a=o[u])==typeof t?a:t[n]*0!==0||~(""+t[n]).indexOf(".")?{}:[]}var Nr=function(e,t){return Object.keys(e).filter(function(r){return t(r,e[r])}).reduce(function(r,n){return r[n]=e[n],r},{})},oe=function(e){L(t,e);function t(r,n){var i=e.call(this,"".concat(r," ").concat(n))||this;return i.field=r,i}return t}(Error);function ee(e){return typeof e=="string"}function Ze(e){return typeof e=="number"}function he(e){return typeof e=="function"}function Lr(e){return e!=null}function U(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()==="object"}var st="is not a string",ct="is not an object",Rr="is nil";function qr(e){if(!Lr(e))throw new oe("Event",Rr);if(typeof e!="object")throw new oe("Event",ct)}function Ur(e){if(!ee(e.type))throw new oe(".type",st)}function zr(e){if(!ee(e.event))throw new oe(".event",st)}function Br(e){if(!U(e.properties))throw new oe(".properties",ct)}function Kr(e){if(!U(e.traits))throw new oe(".traits",ct)}function $r(e){if(!ee(e.messageId))throw new oe(".messageId",st)}function Vr(e){qr(e),Ur(e),$r(e),e.type==="track"&&(zr(e),Br(e)),["group","identify"].includes(e.type)&&Kr(e)}var Gr=function(){function e(t){var r,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=(r=t.onEventMethodCall)!==null&&r!==void 0?r:function(){},this.onFinishedEvent=(n=t.onFinishedEvent)!==null&&n!==void 0?n:function(){}}return e}(),Jr=function(){function e(t){this.settings=new Gr(t)}return e.prototype.track=function(t,r,n,i){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize(f(f({},this.baseEvent()),{event:t,type:"track",properties:r??{},options:f({},n),integrations:f({},i)}))},e.prototype.page=function(t,r,n,i,o){var a;this.settings.onEventMethodCall({type:"page",options:i});var u={type:"page",properties:f({},n),options:f({},i),integrations:f({},o)};return t!==null&&(u.category=t,u.properties=(a=u.properties)!==null&&a!==void 0?a:{},u.properties.category=t),r!==null&&(u.name=r),this.normalize(f(f({},this.baseEvent()),u))},e.prototype.screen=function(t,r,n,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var a={type:"screen",properties:f({},n),options:f({},i),integrations:f({},o)};return t!==null&&(a.category=t),r!==null&&(a.name=r),this.normalize(f(f({},this.baseEvent()),a))},e.prototype.identify=function(t,r,n,i){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize(f(f({},this.baseEvent()),{type:"identify",userId:t,traits:r??{},options:f({},n),integrations:i}))},e.prototype.group=function(t,r,n,i){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize(f(f({},this.baseEvent()),{type:"group",traits:r??{},options:f({},n),integrations:f({},i),groupId:t}))},e.prototype.alias=function(t,r,n,i){this.settings.onEventMethodCall({type:"alias",options:n});var o={userId:t,type:"alias",options:f({},n),integrations:f({},i)};return r!==null&&(o.previousId=r),t===void 0?this.normalize(f(f({},o),this.baseEvent())):this.normalize(f(f({},this.baseEvent()),o))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(t){var r,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var i=Object.keys(t),o=(r=t.context)!==null&&r!==void 0?r:{},a={};return i.forEach(function(u){u!=="context"&&(n.includes(u)?Xe(a,u,t[u]):Xe(o,u,t[u]))}),[o,a]},e.prototype.normalize=function(t){var r,n,i=Object.keys((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(p,h){var v,g;return f(f({},p),(v={},v[h]=!!(!((g=t.integrations)===null||g===void 0)&&g[h]),v))},{});t.options=Nr(t.options||{},function(p,h){return h!==void 0});var o=f(f({},i),(n=t.options)===null||n===void 0?void 0:n.integrations),a=t.options?this.context(t.options):[],u=a[0],s=a[1],c=t.options,l=Ht(t,["options"]),d=f(f(f(f({timestamp:new Date},l),{context:u,integrations:o}),s),{messageId:c.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),Vr(d),d},e}();function Wr(e,t){return new Promise(function(r,n){var i=setTimeout(function(){n(Error("Promise timed out"))},t);e.then(function(o){return clearTimeout(i),r(o)}).catch(n)})}function Qr(e){return new Promise(function(t){return setTimeout(t,e)})}function Hr(e,t,r){var n=function(){try{return Promise.resolve(t(e))}catch(i){return Promise.reject(i)}};return Qr(r).then(function(){return Wr(n(),1e3)}).catch(function(i){e?.log("warn","Callback Error",{error:i}),e?.stats.increment("callback_error")}).then(function(){return e})}var Xt=function(){var e,t,r=!1,n=new Promise(function(i,o){e=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];r=!0,i.apply(void 0,a)},t=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];r=!0,o.apply(void 0,a)}});return{resolve:e,reject:t,promise:n,isSettled:function(){return r}}},lt=function(){function e(t){var r;this.callbacks={},this.warned=!1,this.maxListeners=(r=t?.maxListeners)!==null&&r!==void 0?r:10}return e.prototype.warnIfPossibleMemoryLeak=function(t){this.warned||this.maxListeners&&this.callbacks[t].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(t,r){return this.callbacks[t]?(this.callbacks[t].push(r),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[r],this},e.prototype.once=function(t,r){var n=this,i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n.off(t,i),r.apply(n,o)};return this.on(t,i),this},e.prototype.off=function(t,r){var n,i=(n=this.callbacks[t])!==null&&n!==void 0?n:[],o=i.filter(function(a){return a!==r});return this.callbacks[t]=o,this},e.prototype.emit=function(t){for(var r=this,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=(n=this.callbacks[t])!==null&&n!==void 0?n:[];return a.forEach(function(u){u.apply(r,i)}),this},e}();function Xr(e){var t=Math.random()+1,r=e.minTimeout,n=r===void 0?500:r,i=e.factor,o=i===void 0?2:i,a=e.attempt,u=e.maxTimeout,s=u===void 0?1/0:u;return Math.min(t*n*Math.pow(o,a),s)}var Zt="onRemoveFromFuture",ft=function(e){L(t,e);function t(r,n,i){var o=e.call(this)||this;return o.future=[],o.maxAttempts=r,o.queue=n,o.seen=i??{},o}return t.prototype.push=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n.map(function(a){var u=r.updateAttempts(a);return u>r.maxAttempts||r.includes(a)?!1:(r.queue.push(a),!0)});return this.queue=this.queue.sort(function(a,u){return r.getAttempts(a)-r.getAttempts(u)}),o},t.prototype.pushWithBackoff=function(r,n){var i=this;if(n===void 0&&(n=0),n==0&&this.getAttempts(r)===0)return this.push(r)[0];var o=this.updateAttempts(r);if(o>this.maxAttempts||this.includes(r))return!1;var a=Xr({attempt:o-1});return n>0&&a<n&&(a=n),setTimeout(function(){i.queue.push(r),i.future=i.future.filter(function(u){return u.id!==r.id}),i.emit(Zt)},a),this.future.push(r),!0},t.prototype.getAttempts=function(r){var n;return(n=this.seen[r.id])!==null&&n!==void 0?n:0},t.prototype.updateAttempts=function(r){return this.seen[r.id]=this.getAttempts(r)+1,this.getAttempts(r)},t.prototype.includes=function(r){return this.queue.includes(r)||this.future.includes(r)||!!this.queue.find(function(n){return n.id===r.id})||!!this.future.find(function(n){return n.id===r.id})},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(lt),ne=256,Ce=[],Oe;for(;ne--;)Ce[ne]=(ne+256).toString(16).substring(1);function dt(){var e=0,t,r="";if(!Oe||ne+16>256){for(Oe=Array(e=256);e--;)Oe[e]=256*Math.random()|0;e=ne=0}for(;e<16;e++)t=Oe[ne+e],e==6?r+=Ce[t&15|64]:e==8?r+=Ce[t&63|128]:r+=Ce[t],e&1&&e>1&&e<11&&(r+="-");return ne++,r}var Zr=function(){function e(){this._logs=[]}return e.prototype.log=function(t,r,n){var i=new Date;this._logs.push({level:t,message:r,time:i,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce(function(r,n){var i,o,a,u=f(f({},n),{json:JSON.stringify(n.extras,null," "),extras:n.extras});delete u.time;var s=(a=(o=n.time)===null||o===void 0?void 0:o.toISOString())!==null&&a!==void 0?a:"";return r[s]&&(s="".concat(s,"-").concat(Math.random())),f(f({},r),(i={},i[s]=u,i))},{});console.table?console.table(t):console.log(t)}else this.logs.forEach(function(r){var n=r.level,i=r.message,o=r.extras;n==="info"||n==="debug"?console.log(i,o??""):console[n](i,o??"")});this._logs=[]},e}(),Yr=function(e){var t={gauge:"g",counter:"c"};return t[e]},Yt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(t,r,n){r===void 0&&(r=1),this.metrics.push({metric:t,value:r,tags:n??[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(t,r,n){this.metrics.push({metric:t,value:r,tags:n??[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var t=this.metrics.map(function(r){return f(f({},r),{tags:r.tags.join(",")})});console.table?console.table(t):console.log(t),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(t){return{m:t.metric,v:t.value,t:t.tags,k:Yr(t.type),e:t.timestamp}})},e}(),en=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Yt),ae=function(){function e(t){var r,n,i;this.retry=(r=t.retry)!==null&&r!==void 0?r:!0,this.type=(n=t.type)!==null&&n!==void 0?n:"plugin Error",this.reason=(i=t.reason)!==null&&i!==void 0?i:""}return e}(),De=function(){function e(t,r,n,i){r===void 0&&(r=dt()),n===void 0&&(n=new en),i===void 0&&(i=new Zr),this.attempts=0,this.event=t,this._id=r,this.logger=i,this.stats=n}return e.system=function(){},e.prototype.isSame=function(t){return t.id===this.id},e.prototype.cancel=function(t){throw t||new ae({reason:"Context Cancel"})},e.prototype.log=function(t,r,n){this.logger.log(t,r,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(t,r){var n;if(t.split(".")[0]==="integrations"){var i=t.split(".")[1];if(((n=this.event.integrations)===null||n===void 0?void 0:n[i])===!1)return this.event}return Xe(this.event,t,r),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(t){this._failedDelivery=t},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function tn(e,t){var r={};return e.forEach(function(n){var i,o=void 0;{var a=n[t];o=typeof a!="string"?JSON.stringify(a):a}o!==void 0&&(r[o]=C(C([],(i=r[o])!==null&&i!==void 0?i:[],!0),[n],!1))}),r}var rn=function(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"},nn=function(){var e,t,r=0;return{done:function(){return e},run:function(n){var i=n();return rn(i)&&(++r===1&&(e=new Promise(function(o){return t=o})),i.finally(function(){return--r===0&&t()})),i}}};function on(e){return y(this,void 0,void 0,function(){var t;return m(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e()];case 1:return[2,r.sent()];case 2:return t=r.sent(),[2,Promise.reject(t)];case 3:return[2]}})})}function Se(e,t){e.log("debug","plugin",{plugin:t.name});var r=new Date().getTime(),n=t[e.event.type];if(n===void 0)return Promise.resolve(e);var i=on(function(){return n.apply(t,[e])}).then(function(o){var a=new Date().getTime()-r;return o.stats.gauge("plugin_time",a,["plugin:".concat(t.name)]),o}).catch(function(o){if(o instanceof ae&&o.type==="middleware_cancellation")throw o;return o instanceof ae?(e.log("warn",o.type,{plugin:t.name,error:o}),o):(e.log("error","plugin Error",{plugin:t.name,error:o}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),o)});return i}function an(e,t){return Se(e,t).then(function(r){if(r instanceof De)return r;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(r)})}var un=function(e){L(t,e);function t(r){var n=e.call(this)||this;return n.criticalTasks=nn(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=r,n.queue.on(Zt,function(){n.scheduleFlush(0)}),n}return t.prototype.register=function(r,n,i){return y(this,void 0,void 0,function(){var o,a,u=this;return m(this,function(s){switch(s.label){case 0:return this.plugins.push(n),o=function(c){u.failedInitializations.push(n.name),u.emit("initialization_failure",n),console.warn(n.name,c),r.log("warn","Failed to load destination",{plugin:n.name,error:c}),u.plugins=u.plugins.filter(function(l){return l!==n})},n.type==="destination"&&n.name!=="Segment.io"?(n.load(r,i).catch(o),[3,4]):[3,1];case 1:return s.trys.push([1,3,,4]),[4,n.load(r,i)];case 2:return s.sent(),[3,4];case 3:return a=s.sent(),o(a),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(r,n,i){return y(this,void 0,void 0,function(){var o;return m(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(r,i))]:[3,2];case 1:a.sent(),a.label=2;case 2:return this.plugins=this.plugins.filter(function(u){return u.name!==n.name}),[3,4];case 3:return o=a.sent(),r.log("warn","Failed to unload destination",{plugin:n.name,error:o}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(r){return y(this,void 0,void 0,function(){var n;return m(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.push(r),n=this.subscribeToDelivery(r),this.scheduleFlush(0),[2,n]})})},t.prototype.subscribeToDelivery=function(r){return y(this,void 0,void 0,function(){var n=this;return m(this,function(i){return[2,new Promise(function(o){var a=function(u,s){u.isSame(r)&&(n.off("flush",a),o(u))};n.on("flush",a)})]})})},t.prototype.dispatchSingle=function(r){return y(this,void 0,void 0,function(){var n=this;return m(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.updateAttempts(r),r.attempts=1,[2,this.deliver(r).catch(function(o){var a=n.enqueuRetry(o,r);return a?n.subscribeToDelivery(r):(r.setFailedDelivery({reason:o}),r)})]})})},t.prototype.isEmpty=function(){return this.queue.length===0},t.prototype.scheduleFlush=function(r){var n=this;r===void 0&&(r=500),!this.flushing&&(this.flushing=!0,setTimeout(function(){n.flush().then(function(){setTimeout(function(){n.flushing=!1,n.queue.length&&n.scheduleFlush(0)},0)})},r))},t.prototype.deliver=function(r){return y(this,void 0,void 0,function(){var n,i,o,a;return m(this,function(u){switch(u.label){case 0:return[4,this.criticalTasks.done()];case 1:u.sent(),n=Date.now(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.flushOne(r)];case 3:return r=u.sent(),i=Date.now()-n,this.emit("delivery_success",r),r.stats.gauge("delivered",i),r.log("debug","Delivered",r.event),[2,r];case 4:throw o=u.sent(),a=o,r.log("error","Failed to deliver",a),this.emit("delivery_failure",r,a),r.stats.increment("delivery_failed"),o;case 5:return[2]}})})},t.prototype.enqueuRetry=function(r,n){var i=!(r instanceof ae)||r.retry;return i?this.queue.pushWithBackoff(n):!1},t.prototype.flush=function(){return y(this,void 0,void 0,function(){var r,n,i;return m(this,function(o){switch(o.label){case 0:if(this.queue.length===0)return[2,[]];if(r=this.queue.pop(),!r)return[2,[]];r.attempts=this.queue.getAttempts(r),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.deliver(r)];case 2:return r=o.sent(),this.emit("flush",r,!0),[3,4];case 3:return n=o.sent(),i=this.enqueuRetry(n,r),i||(r.setFailedDelivery({reason:n}),this.emit("flush",r,!1)),[2,[]];case 4:return[2,[r]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(r){var n=this.plugins.filter(function(h){var v,g,S;if(h.type!=="destination"&&h.name!=="Segment.io")return!0;var _=void 0;return(v=h.alternativeNames)===null||v===void 0||v.forEach(function(b){r[b]!==void 0&&(_=r[b])}),(S=(g=r[h.name])!==null&&g!==void 0?g:_)!==null&&S!==void 0?S:(h.name==="Segment.io"?!0:r.All)!==!1}),i=tn(n,"type"),o=i.before,a=o===void 0?[]:o,u=i.enrichment,s=u===void 0?[]:u,c=i.destination,l=c===void 0?[]:c,d=i.after,p=d===void 0?[]:d;return{before:a,enrichment:s,destinations:l,after:p}},t.prototype.flushOne=function(r){var n,i;return y(this,void 0,void 0,function(){var o,a,u,s,c,l,v,d,p,h,v,g,S,_,b;return m(this,function(E){switch(E.label){case 0:if(!this.isReady())throw new Error("Not ready");r.attempts>1&&this.emit("delivery_retry",r),o=this.availableExtensions((n=r.event.integrations)!==null&&n!==void 0?n:{}),a=o.before,u=o.enrichment,s=0,c=a,E.label=1;case 1:return s<c.length?(l=c[s],[4,an(r,l)]):[3,4];case 2:v=E.sent(),v instanceof De&&(r=v),this.emit("message_enriched",r,l),E.label=3;case 3:return s++,[3,1];case 4:d=0,p=u,E.label=5;case 5:return d<p.length?(h=p[d],[4,Se(r,h)]):[3,8];case 6:v=E.sent(),v instanceof De&&(r=v),this.emit("message_enriched",r,h),E.label=7;case 7:return d++,[3,5];case 8:return g=this.availableExtensions((i=r.event.integrations)!==null&&i!==void 0?i:{}),S=g.destinations,_=g.after,[4,new Promise(function(O,I){setTimeout(function(){var x=S.map(function(k){return Se(r,k)});Promise.all(x).then(O).catch(I)},0)})];case 9:return E.sent(),r.stats.increment("message_delivered"),this.emit("message_delivered",r),b=_.map(function(O){return Se(r,O)}),[4,Promise.all(b)];case 10:return E.sent(),[2,r]}})})},t}(lt),sn=function(e,t){var r=Date.now()-e;return Math.max((t??300)-r,0)};function cn(e,t,r,n){return y(this,void 0,void 0,function(){var i,o;return m(this,function(a){switch(a.label){case 0:return r.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=a.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=a.sent(),a.label=4;case 4:return n?.callback?[4,Hr(o,n.callback,sn(i,n.timeout))]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return n?.debug&&o.flush(),[2,o]}})})}function er(e,t,r,n){var i,o=[e,t,r,n],a=U(e)?e.event:e;if(!a||!ee(a))throw new Error("Event missing");var u=U(e)?(i=e.properties)!==null&&i!==void 0?i:{}:U(t)?t:{},s={};he(r)||(s=r??{}),U(e)&&!he(t)&&(s=t??{});var c=o.find(he);return[a,u,s,c]}function Ye(e,t,r,n,i){var o,a,u=null,s=null,c=[e,t,r,n,i],l=c.filter(ee);l.length===1?ee(c[1])?(s=c[1],u=null):(s=l[0],u=null):l.length===2&&(typeof c[0]=="string"&&(u=c[0]),typeof c[1]=="string"&&(s=c[1]));var d=c.find(he),p=c.filter(U);return p.length===1?U(c[2])?(a={},o=c[2]):U(c[3])?(o={},a=c[3]):(o=p[0],a={}):p.length===2&&(o=p[0],a=p[1]),[u,s,o??(o={}),a??(a={}),d]}var et=function(e){return function(){for(var t,r,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var a={},u=["callback","options","traits","id"],s=0,c=i;s<c.length;s++){var l=c[s],d=u.pop();if(d==="id"){if(ee(l)||Ze(l)){a.id=l.toString();continue}if(l==null)continue;d=u.pop()}if((d==="traits"||d==="options")&&(l==null||U(l))&&(a[d]=l),he(l)){a.callback=l;break}}return[(t=a.id)!==null&&t!==void 0?t:e.id(),(r=a.traits)!==null&&r!==void 0?r:{},(n=a.options)!==null&&n!==void 0?n:{},a.callback]}};function tr(e,t,r,n){Ze(e)&&(e=e.toString()),Ze(t)&&(t=t.toString());var i=[e,t,r,n],o=i.filter(ee),a=o[0],u=a===void 0?e:a,s=o[1],c=s===void 0?null:s,l=i.filter(U)[0],d=l===void 0?{}:l,p=i.find(he);return[u,c,d,p]}function vt(){return typeof window<"u"}function Oo(){return!vt()}function ln(){return vt()?window.navigator.onLine:!0}function Ee(){return!ln()}function fn(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],a=[],u={},s=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:s,headers:{keys:function(){return o},entries:function(){return a},get:function(l){return u[l.toLowerCase()]},has:function(l){return l.toLowerCase()in u}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(l,d,p){o.push(d=d.toLowerCase()),a.push([d,p]),u[d]=u[d]?u[d]+","+p:p}),r(s())},i.onerror=n,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})}var ht=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:null},Te=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ht();return(r&&r.fetch||fn).apply(void 0,e)},je="1.82.0",rr="api.segment.io/v1",dn=function(e,t,r){var n=t.reduce(function(i,o){var a=o.split(":"),u=a[0],s=a[1];return i[u]=s,i},{});return{type:"Counter",metric:e,value:1,tags:f(f({},n),{library:"analytics.js",library_version:"npm:next-".concat(je)})}};function Ve(e){console.error("Error sending segment performance metrics",e)}var vn=function(){function e(t){var r=this,n,i,o,a,u;if(this.host=(n=t?.host)!==null&&n!==void 0?n:rr,this.sampleRate=(i=t?.sampleRate)!==null&&i!==void 0?i:1,this.flushTimer=(o=t?.flushTimer)!==null&&o!==void 0?o:30*1e3,this.maxQueueSize=(a=t?.maxQueueSize)!==null&&a!==void 0?a:20,this.protocol=(u=t?.protocol)!==null&&u!==void 0?u:"https",this.queue=[],this.sampleRate>0){var s=!1,c=function(){s||(s=!0,r.flush().catch(Ve),s=!1,setTimeout(c,r.flushTimer))};c()}}return e.prototype.increment=function(t,r){if(t.includes("analytics_js.")&&r.length!==0&&!(Math.random()>this.sampleRate)&&!(this.queue.length>=this.maxQueueSize)){var n=dn(t,r);this.queue.push(n),t.includes("error")&&this.flush().catch(Ve)}},e.prototype.flush=function(){return y(this,void 0,void 0,function(){var t=this;return m(this,function(r){switch(r.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(n){Ve(n),t.sampleRate=0})];case 1:return r.sent(),[2]}})})},e.prototype.send=function(){return y(this,void 0,void 0,function(){var t,r,n;return m(this,function(i){return t={series:this.queue},this.queue=[],r={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,Te(n,{headers:r,body:JSON.stringify(t),method:"POST"})]})})},e}(),xe,nr=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.initRemoteMetrics=function(r){xe=new vn(r)},t.prototype.increment=function(r,n,i){e.prototype.increment.call(this,r,n,i),xe?.increment(r,i??[])},t}(Yt),z=function(e){L(t,e);function t(r,n){return e.call(this,r,n,new nr)||this}return t.system=function(){return new this({type:"track",event:"system"})},t}(De);function hn(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()==="object"}var ir="bpc",or=function(e,t,r,n,i,o){return{__t:ir,c:t,p:n,u:e,s:r,t:i,r:o}},pn=Object.keys(or("","","","","",""));function yn(e){if(!hn(e)||e.__t!==ir)return!1;for(var t in e)if(!pn.includes(t))return!1;return!0}var mn=function(e,t){return e.indexOf("?")>-1?e:e+t},gn=function(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)},bn=function(e){try{return new URL(e).pathname}catch{return e[0]==="/"?e:"/"+e}},ar=function(e){var t=e.c,r=e.p,n=e.s,i=e.u,o=e.r,a=e.t,u=t?bn(t):r,s=t?mn(t,n):gn(i);return{path:u,referrer:o,search:n,title:a,url:s}},ur=function(){var e=document.querySelector("link[rel='canonical']");return or(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},_n=function(){return ar(ur())};function wn(e,t){return Object.assign.apply(Object,C([{}],t.map(function(r){var n;if(e&&Object.prototype.hasOwnProperty.call(e,r))return n={},n[r]=e[r],n}),!1))}var le=function(e,t){t===void 0&&(t=_n());var r=e.context,n;e.type==="page"&&(n=e.properties&&wn(e.properties,Object.keys(t)),e.properties=f(f(f({},t),e.properties),e.name?{name:e.name}:{})),r.page=f(f(f({},t),n),r.page)},sr=function(e){L(t,e);function t(r){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat(dt())},onEventMethodCall:function(i){var o=i.options;n.maybeUpdateAnonId(o)},onFinishedEvent:function(i){return n.addIdentity(i),i}})||this;return n.user=r,n}return t.prototype.maybeUpdateAnonId=function(r){r?.anonymousId&&this.user.anonymousId(r.anonymousId)},t.prototype.addIdentity=function(r){this.user.id()&&(r.userId=this.user.id()),this.user.anonymousId()&&(r.anonymousId=this.user.anonymousId())},t.prototype.track=function(r,n,i,o,a){var u=e.prototype.track.call(this,r,n,i,o);return le(u,a),u},t.prototype.page=function(r,n,i,o,a,u){var s=e.prototype.page.call(this,r,n,i,o,a);return le(s,u),s},t.prototype.screen=function(r,n,i,o,a,u){var s=e.prototype.screen.call(this,r,n,i,o,a);return le(s,u),s},t.prototype.identify=function(r,n,i,o,a){var u=e.prototype.identify.call(this,r,n,i,o);return le(u,a),u},t.prototype.group=function(r,n,i,o,a){var u=e.prototype.group.call(this,r,n,i,o);return le(u,a),u},t.prototype.alias=function(r,n,i,o,a){var u=e.prototype.alias.call(this,r,n,i,o);return le(u,a),u},t}(Jr),cr=function(e){return"addMiddleware"in e&&e.type==="destination"},V={getItem:function(){},setItem:function(){},removeItem:function(){}};try{V=vt()&&window.localStorage?window.localStorage:V}catch(e){console.warn("Unable to access localStorage",e)}function lr(e){var t=V.getItem(e);return(t?JSON.parse(t):[]).map(function(r){return new z(r.event,r.id)})}function Sn(e,t){var r=lr(e),n=C(C([],t,!0),r,!0),i=n.reduce(function(o,a){var u;return f(f({},o),(u={},u[a.id]=a,u))},{});V.setItem(e,JSON.stringify(Object.values(i)))}function fr(e){var t=V.getItem(e);return t?JSON.parse(t):{}}function En(e,t){var r=fr(e);V.setItem(e,JSON.stringify(f(f({},r),t)))}function Ut(e){V.removeItem(e)}var In=function(){return new Date().getTime()};function tt(e,t,r){r===void 0&&(r=0);var n=50,i="persisted-queue:v1:".concat(e,":lock"),o=function(c){return new Date().getTime()>c},a=V.getItem(i),u=a?JSON.parse(a):null,s=u===null||o(u);if(s){V.setItem(i,JSON.stringify(In()+n)),t(),V.removeItem(i);return}!s&&r<3?setTimeout(function(){tt(e,t,r+1)},n):console.error("Unable to retrieve lock")}var pt=function(e){L(t,e);function t(r,n){var i=e.call(this,r,[])||this,o="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),u=[],s={};return tt(n,function(){try{u=lr(o),s=fr(a),Ut(o),Ut(a),i.queue=C(C([],u,!0),i.queue,!0),i.seen=f(f({},s),i.seen)}catch(c){console.error(c)}}),window.addEventListener("pagehide",function(){if(i.todo>0){var c=C(C([],i.queue,!0),i.future,!0);try{tt(n,function(){Sn(o,c),En(a,i.seen)})}catch(l){console.error(l)}}}),i}return t}(ft),Pn=function(e){L(t,e);function t(r){return e.call(this,typeof r=="string"?new pt(4,r):r)||this}return t.prototype.flush=function(){return y(this,void 0,void 0,function(){return m(this,function(r){return Ee()?[2,[]]:[2,e.prototype.flush.call(this)]})})},t}(un);function yt(e){for(var t=e.constructor.prototype,r=0,n=Object.getOwnPropertyNames(t);r<n.length;r++){var i=n[r];if(i!=="constructor"){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&typeof o.value=="function"&&(e[i]=e[i].bind(e))}}return e}/*! js-cookie v3.0.1 | MIT */function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var An={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function rt(e,t){function r(i,o,a){if(!(typeof document>"u")){a=Me({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var s in a)a[s]&&(u+="; "+s,a[s]!==!0&&(u+="="+a[s].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var s=o[u].split("="),c=s.slice(1).join("=");try{var l=decodeURIComponent(s[0]);if(a[l]=e.read(c,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Me({},o,{expires:-1}))},withAttributes:function(i){return rt(this.converter,Me({},this.attributes,i))},withConverter:function(i){return rt(Me({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var W=rt(An,{path:"/"});function On(e){var t=e.hostname,r=t.split("."),n=r[r.length-1],i=[];if(r.length===4&&parseInt(n,10)>0||r.length<=1)return i;for(var o=r.length-2;o>=0;--o)i.push(r.slice(o).join("."));return i}function xn(e){try{return new URL(e)}catch{return}}function dr(e){var t=xn(e);if(t)for(var r=On(t),n=0;n<r.length;++n){var i="__tld__",o=r[n],a={domain:"."+o};try{if(W.set(i,"1",a),W.get(i))return W.remove(i,a),o}catch{return}}}var Mn=365,vr=function(){function e(t){t===void 0&&(t=e.defaults),this.options=f(f({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:Mn,domain:dr(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){var r;try{var n=W.get(t);if(n==null)return null;try{return(r=JSON.parse(n))!==null&&r!==void 0?r:null}catch{return n??null}}catch{return null}},e.prototype.set=function(t,r){typeof r=="string"?W.set(t,r,this.opts()):r===null?W.remove(t,this.opts()):W.set(t,JSON.stringify(r),this.opts())},e.prototype.remove=function(t){return W.remove(t,this.opts())},e}(),Cn=function(){function e(){}return e.prototype.localStorageWarning=function(t,r){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(r))},e.prototype.get=function(t){var r;try{var n=localStorage.getItem(t);if(n===null)return null;try{return(r=JSON.parse(n))!==null&&r!==void 0?r:null}catch{return n??null}}catch{return this.localStorageWarning(t,"unavailable"),null}},e.prototype.set=function(t,r){try{localStorage.setItem(t,JSON.stringify(r))}catch{this.localStorageWarning(t,"full")}},e.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch{this.localStorageWarning(t,"unavailable")}},e}(),mt=function(){function e(){this.cache={}}return e.prototype.get=function(t){var r;return(r=this.cache[t])!==null&&r!==void 0?r:null},e.prototype.set=function(t,r){this.cache[t]=r},e.prototype.remove=function(t){delete this.cache[t]},e}(),j={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function hr(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every(function(t){return Object.values(j).includes(t)})}function kn(e){return typeof e=="object"&&e.name!==void 0}var Ge=function(e,t,r,n){console.warn("".concat(e.constructor.name,": Can't ").concat(t,' key "').concat(r,'" | Err: ').concat(n))},Y=function(){function e(t){this.stores=t}return e.prototype.get=function(t){for(var r=null,n=0,i=this.stores;n<i.length;n++){var o=i[n];try{if(r=o.get(t),r!=null)return r}catch(a){Ge(o,"get",t,a)}}return null},e.prototype.set=function(t,r){this.stores.forEach(function(n){try{n.set(t,r)}catch(i){Ge(n,"set",t,i)}})},e.prototype.clear=function(t){this.stores.forEach(function(r){try{r.remove(t)}catch(n){Ge(r,"remove",t,n)}})},e.prototype.getAndSync=function(t){var r=this.get(t),n=typeof r=="number"?r.toString():r;return this.set(t,n),n},e}();function nt(e){var t=e.map(function(r){var n,i;switch(kn(r)?(n=r.name,i=r.settings):n=r,n){case j.Cookie:return new vr(i);case j.LocalStorage:return new Cn;case j.Memory:return new mt;default:throw new Error("Unknown Store Type: ".concat(r))}});return t}function pr(e,t){return e.map(function(r){return t&&r===j.Cookie?{name:r,settings:t}:r})}var re={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},gt=function(){function e(t,r){t===void 0&&(t=re);var n=this,i,o,a,u;this.options={},this.id=function(c){if(n.options.disable)return null;var l=n.identityStore.getAndSync(n.idKey);if(c!==void 0){n.identityStore.set(n.idKey,c);var d=c!==l&&l!==null&&c!==null;d&&n.anonymousId(null)}var p=n.identityStore.getAndSync(n.idKey);if(p)return p;var h=n.legacyUserStore.get(re.cookie.oldKey);return h?typeof h=="object"?h.id:h:null},this.anonymousId=function(c){var l,d;if(n.options.disable)return null;if(c===void 0){var p=(l=n.identityStore.getAndSync(n.anonKey))!==null&&l!==void 0?l:(d=n.legacySIO())===null||d===void 0?void 0:d[0];if(p)return p}return c===null?(n.identityStore.set(n.anonKey,null),n.identityStore.getAndSync(n.anonKey)):(n.identityStore.set(n.anonKey,c??dt()),n.identityStore.getAndSync(n.anonKey))},this.traits=function(c){var l;if(!n.options.disable)return c===null&&(c={}),c&&n.traitsStore.set(n.traitsKey,c??{}),(l=n.traitsStore.get(n.traitsKey))!==null&&l!==void 0?l:{}},this.options=f(f({},re),t),this.cookieOptions=r,this.idKey=(o=(i=t.cookie)===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:re.cookie.key,this.traitsKey=(u=(a=t.localStorage)===null||a===void 0?void 0:a.key)!==null&&u!==void 0?u:re.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,r),this.legacyUserStore=this.createStorage(this.options,r,function(c){return c===j.Cookie}),this.traitsStore=this.createStorage(this.options,r,function(c){return c!==j.Cookie});var s=this.legacyUserStore.get(re.cookie.oldKey);s&&typeof s=="object"&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),yt(this)}return e.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var r=t.split("----"),n=r[0],i=r[1];return[n,i]},e.prototype.identify=function(t,r){if(!this.options.disable){r=r??{};var n=this.id();(n===null||n===t)&&(r=f(f({},this.traits()),r)),t&&this.id(t),this.traits(r)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(t,r,n){var i=[j.LocalStorage,j.Cookie,j.Memory];return t.disable?new Y([]):t.persist?(t.storage!==void 0&&t.storage!==null&&hr(t.storage)&&(i=t.storage.stores),t.localStorageFallbackDisabled&&(i=i.filter(function(o){return o!==j.LocalStorage})),n&&(i=i.filter(n)),new Y(nt(pr(i,r)))):new Y([new mt])},e.defaults=re,e}(),zt={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},yr=function(e){L(t,e);function t(r,n){r===void 0&&(r=zt);var i=e.call(this,f(f({},zt),r),n)||this;return i.anonymousId=function(o){},yt(i),i}return t}(gt),bt="analytics";function _t(){return window[bt]}function Dn(e){bt=e}function Fn(e){window[bt]=e}var Tn=function(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"},mr=function(e,t,r){r.getAndRemove(e).forEach(function(n){Ne(t,n).catch(console.error)})},jn=function(e,t){return y(void 0,void 0,void 0,function(){var r,n,i;return m(this,function(o){switch(o.label){case 0:r=0,n=t.getAndRemove("addSourceMiddleware"),o.label=1;case 1:return r<n.length?(i=n[r],[4,Ne(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},Nn=function(e,t){return y(void 0,void 0,void 0,function(){var r,n,i;return m(this,function(o){switch(o.label){case 0:r=0,n=t.getAndRemove("register"),o.label=1;case 1:return r<n.length?(i=n[r],[4,Ne(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},Ln=mr.bind(void 0,"on"),Rn=mr.bind(void 0,"setAnonymousId"),qn=function(e,t){Object.keys(t.calls).forEach(function(r){t.getAndRemove(r).forEach(function(n){setTimeout(function(){Ne(e,n).catch(console.error)},0)})})},fe=function(e){if(gr(e)){var t=e.pop();return ar(t)}},gr=function(e){var t=e[e.length-1];return yn(t)},it=function(){function e(t,r,n,i){n===void 0&&(n=function(){}),i===void 0&&(i=console.error),this.method=t,this.resolve=n,this.reject=i,this.called=!1,this.args=r}return e}(),Un=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(e.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),e.prototype.get=function(t){var r;return(r=this.calls[t])!==null&&r!==void 0?r:[]},e.prototype.getAndRemove=function(t){var r=this.get(t);return this.calls[t]=[],r},e.prototype.add=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];r.forEach(function(i){var o=["track","screen","alias","group","page","identify"];o.includes(i.method)&&!gr(i.args)&&(i.args=C(C([],i.args,!0),[ur()],!1)),t.calls[i.method]?t.calls[i.method].push(i):t.calls[i.method]=[i]})},e.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},e.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},e.prototype._pushSnippetWindowBuffer=function(){},e}();function Ne(e,t){return y(this,void 0,void 0,function(){var r,n;return m(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,r=e[t.method].apply(e,t.args),Tn(r)?[4,r]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(r),[3,4];case 3:return n=i.sent(),t.reject(n),[3,4];case 4:return[2]}})})}var zn=function(){function e(t){var r=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=je,this._preInitBuffer=new Un,this._promise=t(this._preInitBuffer),this._promise.then(function(n){var i=n[0],o=n[1];r.instance=i,r.ctx=o}).catch(function(){})}return e.prototype.then=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).then.apply(t,r)},e.prototype.catch=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).catch.apply(t,r)},e.prototype.finally=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).finally.apply(t,r)},e.prototype._createMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(r.instance){var a=(n=r.instance)[t].apply(n,i);return Promise.resolve(a)}return new Promise(function(u,s){r._preInitBuffer.add(new it(t,i,u,s))})}},e.prototype._createChainableMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return r.instance?((n=r.instance)[t].apply(n,i),r):(r._preInitBuffer.add(new it(t,i)),r)}},e}(),X={},G={},wt={},br={exports:{}};(function(e){e.exports=t(r),e.exports.find=e.exports,e.exports.replace=function(u,s,c,l){return t(i).call(this,u,s,c,l),u},e.exports.del=function(u,s,c){return t(n).call(this,u,s,null,c),u};function t(u){return function(s,c,l,d){var p=d&&a(d.normalizer)?d.normalizer:o;c=p(c);for(var h,v=!1;!v;)g();function g(){for(h in s){var S=p(h);if(c.indexOf(S)===0){var _=c.substr(S.length);if(_.charAt(0)==="."||_.length===0){c=_.substr(1);var b=s[h];if(b==null){v=!0;return}if(!c.length){v=!0;return}s=b;return}}}h=void 0,v=!0}if(h)return s==null?s:u(s,h,l)}}function r(u,s){if(u.hasOwnProperty(s))return u[s]}function n(u,s){return u.hasOwnProperty(s)&&delete u[s],u}function i(u,s,c){return u.hasOwnProperty(s)&&(u[s]=c),u}function o(u){return u.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}function a(u){return typeof u=="function"}})(br);var Le=br.exports,Bn=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wt,"__esModule",{value:!0});var H=Bn(Le);function de(e,t){return function(){var r=this.traits(),n=this.properties?this.properties():{};return H.default(r,"address."+e)||H.default(r,e)||(t?H.default(r,"address."+t):null)||(t?H.default(r,t):null)||H.default(n,"address."+e)||H.default(n,e)||(t?H.default(n,"address."+t):null)||(t?H.default(n,t):null)}}function Kn(e){e.zip=de("postalCode","zip"),e.country=de("country"),e.street=de("street"),e.state=de("state"),e.city=de("city"),e.region=de("region")}wt.default=Kn;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.clone=void 0;function ot(e){if(typeof e!="object")return e;if(Object.prototype.toString.call(e)==="[object Object]"){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=ot(e[r]));return t}else return Array.isArray(e)?e.map(ot):e}Re.clone=ot;var St={};Object.defineProperty(St,"__esModule",{value:!0});var $n={Salesforce:!0};function Vn(e){return!$n[e]}St.default=Vn;var qe={},_r=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;qe.parse=function(e){var t=[1,5,6,7,11,12],r=_r.exec(e),n=0;if(!r)return new Date(e);for(var i=0,o;o=t[i];i++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0,r[4]===" "?n=new Date().getTimezoneOffset():r[9]!=="Z"&&r[10]&&(n=r[11]*60+r[12],r[10]==="+"&&(n=0-n));var a=Date.UTC(r[1],r[2],r[3],r[5],r[6]+n,r[7],r[8]);return new Date(a)};qe.is=function(e,t){return typeof e!="string"||t&&/^\d{4}-\d{2}-\d{2}/.test(e)===!1?!1:_r.test(e)};var Et={},Gn=/\d{13}/;Et.is=function(e){return Gn.test(e)};Et.parse=function(e){return e=parseInt(e,10),new Date(e)};var It={},Jn=/\d{10}/;It.is=function(e){return Jn.test(e)};It.parse=function(e){var t=parseInt(e,10)*1e3;return new Date(t)};var Bt=qe,Kt=Et,$t=It,Wn=Object.prototype,wr=Wn.toString;function Qn(e){return wr.call(e)==="[object Date]"}function Hn(e){return wr.call(e)==="[object Number]"}var Pt=function(t){return Qn(t)?t:Hn(t)?new Date(Xn(t)):Bt.is(t)?Bt.parse(t):Kt.is(t)?Kt.parse(t):$t.is(t)?$t.parse(t):new Date(t)};function Xn(e){return e<315576e5?e*1e3:e}var Vt=qe,Zn=At;function At(e,t){return t===void 0&&(t=!0),e&&typeof e=="object"?Yn(e,t):Array.isArray(e)?ei(e,t):Vt.is(e,t)?Vt.parse(e):e}function Yn(e,t){return Object.keys(e).forEach(function(r){e[r]=At(e[r],t)}),e}function ei(e,t){return e.forEach(function(r,n){e[n]=At(r,t)}),e}var Ie=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G,"__esModule",{value:!0});G.Facade=void 0;var ti=Ie(wt),ye=Re,ri=Ie(St),ni=Ie(Pt),at=Ie(Le),ii=Ie(Zn);function R(e,t){t=t||{},this.raw=ye.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=ye.clone(e)),"traverse"in t||(t.traverse=!0),"timestamp"in e?e.timestamp=ni.default(e.timestamp):e.timestamp=new Date,t.traverse&&ii.default(e),this.opts=t,this.obj=e}G.Facade=R;var P=R.prototype;P.proxy=function(e){var t=e.split(".");e=t.shift();var r=this[e]||this.obj[e];return r&&(typeof r=="function"&&(r=r.call(this)||{}),t.length===0?this.opts.clone?ut(r):r:(r=at.default(r,t.join(".")),this.opts.clone?ut(r):r))};P.field=function(e){var t=this.obj[e];return this.opts.clone?ut(t):t};R.proxy=function(e){return function(){return this.proxy(e)}};R.field=function(e){return function(){return this.field(e)}};R.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var r=this.proxy(e);return r&&(r=[this.opts.clone?ye.clone(r):r]),r||[]}};R.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var r=this.proxy(e+"s");if(Array.isArray(r))return r[0]}};P.json=function(){var e=this.opts.clone?ye.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e};P.rawEvent=function(){return this.raw};P.options=function(e){var t=this.obj.options||this.obj.context||{},r=this.opts.clone?ye.clone(t):t;if(!e)return r;if(this.enabled(e)){var n=this.integrations(),i=n[e]||at.default(n,e);return typeof i!="object"&&(i=at.default(this.options(),e)),typeof i=="object"?i:{}}};P.context=P.options;P.enabled=function(e){var t=this.proxy("options.providers.all");typeof t!="boolean"&&(t=this.proxy("options.all")),typeof t!="boolean"&&(t=this.proxy("integrations.all")),typeof t!="boolean"&&(t=!0);var r=t&&ri.default(e),n=this.integrations();if(n.providers&&n.providers.hasOwnProperty(e)&&(r=n.providers[e]),n.hasOwnProperty(e)){var i=n[e];typeof i=="boolean"?r=i:r=!0}return!!r};P.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()};P.active=function(){var e=this.proxy("options.active");return e==null&&(e=!0),e};P.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")};P.sessionId=P.anonymousId;P.groupId=R.proxy("options.groupId");P.traits=function(e){var t=this.proxy("options.traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=this[n]==null?this.proxy("options.traits."+n):this[n]();if(i==null)continue;t[e[n]]=i,delete t[n]}return t};P.library=function(){var e=this.proxy("options.library");return e?typeof e=="string"?{name:e,version:null}:e:{name:"unknown",version:null}};P.device=function(){var e=this.proxy("context.device");(typeof e!="object"||e===null)&&(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e};P.userAgent=R.proxy("context.userAgent");P.timezone=R.proxy("context.timezone");P.timestamp=R.field("timestamp");P.channel=R.field("channel");P.ip=R.proxy("context.ip");P.userId=R.field("userId");ti.default(P);function ut(e){return ye.clone(e)}var Ue={},oi=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Alias=void 0;var ai=oi(se),Sr=G;function B(e,t){Sr.Facade.call(this,e,t)}Ue.Alias=B;ai.default(B,Sr.Facade);B.prototype.action=function(){return"alias"};B.prototype.type=B.prototype.action;B.prototype.previousId=function(){return this.field("previousId")||this.field("from")};B.prototype.from=B.prototype.previousId;B.prototype.userId=function(){return this.field("userId")||this.field("to")};B.prototype.to=B.prototype.userId;var ze={},me={};Object.defineProperty(me,"__esModule",{value:!0});var ui=/.+\@.+\..+/;function si(e){return ui.test(e)}me.default=si;var Ot=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.Group=void 0;var ci=Ot(se),li=Ot(me),fi=Ot(Pt),ge=G;function xt(e,t){ge.Facade.call(this,e,t)}ze.Group=xt;ci.default(xt,ge.Facade);var K=xt.prototype;K.action=function(){return"group"};K.type=K.action;K.groupId=ge.Facade.field("groupId");K.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return fi.default(e)};K.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();if(li.default(t))return t};K.traits=function(e){var t=this.properties(),r=this.groupId();e=e||{},r&&(t.id=r);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=this[n]==null?this.proxy("traits."+n):this[n]();if(i==null)continue;t[e[n]]=i,delete t[n]}return t};K.name=ge.Facade.proxy("traits.name");K.industry=ge.Facade.proxy("traits.industry");K.employees=ge.Facade.proxy("traits.employees");K.properties=function(){return this.field("traits")||this.field("properties")||{}};var Pe={},Be=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.Identify=void 0;var J=G,pe=Be(Le),di=Be(se),vi=Be(me),Er=Be(Pt),ie=function(e){return e.trim()};function Mt(e,t){J.Facade.call(this,e,t)}Pe.Identify=Mt;di.default(Mt,J.Facade);var A=Mt.prototype;A.action=function(){return"identify"};A.type=A.action;A.traits=function(e){var t=this.field("traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("traits."+n):this[n]();i!=null&&(t[e[n]]=i,n!==e[n]&&delete t[n])}return t};A.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();if(vi.default(t))return t};A.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return Er.default(e)};A.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Er.default(e)};A.companyName=function(){return this.proxy("traits.company.name")};A.name=function(){var e=this.proxy("traits.name");if(typeof e=="string")return ie(e);var t=this.firstName(),r=this.lastName();if(t&&r)return ie(t+" "+r)};A.firstName=function(){var e=this.proxy("traits.firstName");if(typeof e=="string")return ie(e);var t=this.proxy("traits.name");if(typeof t=="string")return ie(t).split(" ")[0]};A.lastName=function(){var e=this.proxy("traits.lastName");if(typeof e=="string")return ie(e);var t=this.proxy("traits.name");if(typeof t=="string"){var r=ie(t).indexOf(" ");if(r!==-1)return ie(t.substr(r+1))}};A.uid=function(){return this.userId()||this.username()||this.email()};A.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};A.age=function(){var e=this.birthday(),t=pe.default(this.traits(),"age");if(t!=null)return t;if(e instanceof Date){var r=new Date;return r.getFullYear()-e.getFullYear()}};A.avatar=function(){var e=this.traits();return pe.default(e,"avatar")||pe.default(e,"photoUrl")||pe.default(e,"avatarUrl")};A.position=function(){var e=this.traits();return pe.default(e,"position")||pe.default(e,"jobTitle")};A.username=J.Facade.proxy("traits.username");A.website=J.Facade.one("traits.website");A.websites=J.Facade.multi("traits.website");A.phone=J.Facade.one("traits.phone");A.phones=J.Facade.multi("traits.phone");A.address=J.Facade.proxy("traits.address");A.gender=J.Facade.proxy("traits.gender");A.birthday=J.Facade.proxy("traits.birthday");var be={},Ct=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0});be.Track=void 0;var hi=Ct(se),F=G,pi=Pe,yi=Ct(me),Ir=Ct(Le);function kt(e,t){F.Facade.call(this,e,t)}be.Track=kt;hi.default(kt,F.Facade);var w=kt.prototype;w.action=function(){return"track"};w.type=w.action;w.event=F.Facade.field("event");w.value=F.Facade.proxy("properties.value");w.category=F.Facade.proxy("properties.category");w.id=F.Facade.proxy("properties.id");w.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};w.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};w.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};w.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};w.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};w.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};w.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};w.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};w.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};w.sku=F.Facade.proxy("properties.sku");w.tax=F.Facade.proxy("properties.tax");w.name=F.Facade.proxy("properties.name");w.price=F.Facade.proxy("properties.price");w.total=F.Facade.proxy("properties.total");w.repeat=F.Facade.proxy("properties.repeat");w.coupon=F.Facade.proxy("properties.coupon");w.shipping=F.Facade.proxy("properties.shipping");w.discount=F.Facade.proxy("properties.discount");w.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};w.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};w.description=F.Facade.proxy("properties.description");w.plan=F.Facade.proxy("properties.plan");w.subtotal=function(){var e=Ir.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var r=this.tax();r&&(t-=r),r=this.shipping(),r&&(t-=r),r=this.discount(),r&&(t+=r)}return t};w.products=function(){var e=this.properties(),t=Ir.default(e,"products");return Array.isArray(t)?t.filter(function(r){return r!==null}):[]};w.quantity=function(){var e=this.obj.properties||{};return e.quantity||1};w.currency=function(){var e=this.obj.properties||{};return e.currency||"USD"};w.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};w.query=F.Facade.proxy("options.query");w.properties=function(e){var t=this.field("properties")||{};e=e||{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=this[r]==null?this.proxy("properties."+r):this[r]();if(n==null)continue;t[e[r]]=n,delete t[r]}return t};w.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};w.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();if(yi.default(t))return t};w.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event(),r=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;return!e&&t&&t.match(r)&&(e=this.proxy("properties.total")),mi(e)};w.cents=function(){var e=this.revenue();return typeof e!="number"?this.value()||0:e*100};w.identify=function(){var e=this.json();return e.traits=this.traits(),new pi.Identify(e,this.opts)};function mi(e){if(e){if(typeof e=="number")return e;if(typeof e=="string"&&(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e)))return e}}var Ae={},Pr=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.Page=void 0;var gi=Pr(se),ce=G,bi=be,_i=Pr(me);function Dt(e,t){ce.Facade.call(this,e,t)}Ae.Page=Dt;gi.default(Dt,ce.Facade);var N=Dt.prototype;N.action=function(){return"page"};N.type=N.action;N.category=ce.Facade.field("category");N.name=ce.Facade.field("name");N.title=ce.Facade.proxy("properties.title");N.path=ce.Facade.proxy("properties.path");N.url=ce.Facade.proxy("properties.url");N.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};N.properties=function(e){var t=this.field("properties")||{},r=this.category(),n=this.name();e=e||{},r&&(t.category=r),n&&(t.name=n);for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=this[i]==null?this.proxy("properties."+i):this[i]();if(o==null)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t};N.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();if(_i.default(t))return t};N.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t};N.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"};N.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new bi.Track(t,this.opts)};var Ke={},wi=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Screen=void 0;var Si=wi(se),Ar=Ae,Ei=be;function ue(e,t){Ar.Page.call(this,e,t)}Ke.Screen=ue;Si.default(ue,Ar.Page);ue.prototype.action=function(){return"screen"};ue.prototype.type=ue.prototype.action;ue.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"};ue.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Ei.Track(t,this.opts)};var $e={},Ii=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});$e.Delete=void 0;var Pi=Ii(se),Or=G;function Ft(e,t){Or.Facade.call(this,e,t)}$e.Delete=Ft;Pi.default(Ft,Or.Facade);Ft.prototype.type=function(){return"delete"};(function(e){var t=M&&M.__assign||function(){return t=Object.assign||function(l){for(var d,p=1,h=arguments.length;p<h;p++){d=arguments[p];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(l[v]=d[v])}return l},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var r=G;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return r.Facade}});var n=Ue;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return n.Alias}});var i=ze;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Pe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=be;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var u=Ae;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return u.Page}});var s=Ke;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return s.Screen}});var c=$e;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},r.Facade),{Alias:n.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:u.Page,Screen:s.Screen,Delete:c.Delete})})(X);function Fe(e,t){var r=new X.Facade(e,t);return e.type==="track"&&(r=new X.Track(e,t)),e.type==="identify"&&(r=new X.Identify(e,t)),e.type==="page"&&(r=new X.Page(e,t)),e.type==="alias"&&(r=new X.Alias(e,t)),e.type==="group"&&(r=new X.Group(e,t)),e.type==="screen"&&(r=new X.Screen(e,t)),Object.defineProperty(r,"obj",{value:e,writable:!0}),r}var Ai=function(e){var t=!1;window.addEventListener("pagehide",function(){t||(t=!0,e(t))}),document.addEventListener("visibilitychange",function(){if(document.visibilityState=="hidden"){if(t)return;t=!0}else t=!1;e(t)})},xr=function(e){L(t,e);function t(r,n){var i=e.call(this,r)||this;return i.retryTimeout=n,i.name="RateLimitError",i}return t}(Error),Mr=function(e){return f({"Content-Type":"text/plain"},typeof e=="function"?e():e)},Oi=500,xi=64;function Tt(e){var t=encodeURI(JSON.stringify(e)).split(/%..|./).length-1;return t/1024}function Mi(e){return Tt(e)>=Oi-50}function Ci(e){return Tt(e)>=xi-10}function ki(e){var t=[],r=0;return e.forEach(function(n){var i=Tt(t[r]);i>=64&&r++,t[r]?t[r].push(n):t[r]=[n]}),t}function Di(e,t){var r,n,i=[],o=!1,a=(r=t?.size)!==null&&r!==void 0?r:10,u=(n=t?.timeout)!==null&&n!==void 0?n:5e3,s=0;function c(v){var g;if(v.length!==0){var S=(g=v[0])===null||g===void 0?void 0:g.writeKey,_=v.map(function(b){var E=b;E.sentAt;var O=Ht(E,["sentAt"]);return O});return Te("https://".concat(e,"/b"),{credentials:t?.credentials,keepalive:t?.keepalive||o,headers:Mr(t?.headers),method:"post",body:JSON.stringify({writeKey:S,batch:_,sentAt:new Date().toISOString()}),priority:t?.priority}).then(function(b){var E;if(b.status>=500)throw new Error("Bad response from server: ".concat(b.status));if(b.status===429){var O=(E=b.headers)===null||E===void 0?void 0:E.get("x-ratelimit-reset"),I=typeof O=="string"?parseInt(O)*1e3:u;throw new xr("Rate limit exceeded: ".concat(b.status),I)}})}}function l(v){var g;return v===void 0&&(v=1),y(this,void 0,void 0,function(){var S;return m(this,function(_){return i.length?(S=i,i=[],[2,(g=c(S))===null||g===void 0?void 0:g.catch(function(b){var E,O=z.system();O.log("error","Error sending batch",b),v<=((E=t?.maxRetries)!==null&&E!==void 0?E:10)&&(b.name==="RateLimitError"&&(s=b.retryTimeout),i.push.apply(i,S),i.map(function(I){if("_metadata"in I){var x=I;x._metadata=f(f({},x._metadata),{retryCount:v})}}),p(v+1))})]):[2]})})}var d;function p(v){v===void 0&&(v=1),!d&&(d=setTimeout(function(){d=void 0,l(v).catch(console.error)},s||u),s=0)}Ai(function(v){if(o=v,o&&i.length){var g=ki(i).map(c);Promise.all(g).catch(console.error)}});function h(v,g){return y(this,void 0,void 0,function(){var S;return m(this,function(_){return i.push(g),S=i.length>=a||Mi(i)||t?.keepalive&&Ci(i),[2,S||o?l():p()]})})}return{dispatch:h}}function Fi(e){function t(r,n){return Te(r,{credentials:e?.credentials,keepalive:e?.keepalive,headers:Mr(e?.headers),method:"post",body:JSON.stringify(n),priority:e?.priority}).then(function(i){var o;if(i.status>=500)throw new Error("Bad response from server: ".concat(i.status));if(i.status===429){var a=(o=i.headers)===null||o===void 0?void 0:o.get("x-ratelimit-reset"),u=a?parseInt(a)*1e3:5e3;throw new xr("Rate limit exceeded: ".concat(i.status),u)}})}return{dispatch:t}}function Ti(e,t,r,n,i){var o,a=e.user();delete t.options,t.writeKey=r?.apiKey,t.userId=t.userId||a.id(),t.anonymousId=t.anonymousId||a.anonymousId(),t.sentAt=new Date;var u=e.queue.failedInitializations||[];u.length>0&&(t._metadata={failedInitializations:u}),i!=null&&(i.attempts>1&&(t._metadata=f(f({},t._metadata),{retryCount:i.attempts})),i.attempts++);var s=[],c=[];for(var l in n){var d=n[l];l==="Segment.io"&&s.push(l),d.bundlingStatus==="bundled"&&s.push(l),d.bundlingStatus==="unbundled"&&c.push(l)}for(var p=0,h=r?.unbundledIntegrations||[];p<h.length;p++){var v=h[p];c.includes(v)||c.push(v)}var g=(o=r?.maybeBundledConfigIds)!==null&&o!==void 0?o:{},S=[];return s.sort().forEach(function(_){var b;((b=g[_])!==null&&b!==void 0?b:[]).forEach(function(E){S.push(E)})}),r?.addBundledMetadata!==!1&&(t._metadata=f(f({},t._metadata),{bundled:s.sort(),unbundled:c.sort(),bundledIds:S})),t}var ji=function(e,t){return y(void 0,void 0,void 0,function(){var r;return m(this,function(n){return r=function(i){return y(void 0,void 0,void 0,function(){var o;return m(this,function(a){switch(a.label){case 0:return e(i)?(o=r,[4,t()]):[3,2];case 1:return[2,o.apply(void 0,[a.sent()])];case 2:return[2]}})})},[2,r(void 0)]})})};function Ni(e,t){return y(this,void 0,void 0,function(){var r,n=this;return m(this,function(i){switch(i.label){case 0:return r=[],Ee()?[2,t]:[4,ji(function(){return t.length>0&&!Ee()},function(){return y(n,void 0,void 0,function(){var o,a,u;return m(this,function(s){switch(s.label){case 0:return o=t.pop(),o?[4,Se(o,e)]:[2];case 1:return a=s.sent(),u=a instanceof z,u||r.push(o),[2]}})})})];case 1:return i.sent(),r.map(function(o){return t.pushWithBackoff(o)}),[2,t]}})})}function ve(e,t,r,n){var i=this;e||setTimeout(function(){return y(i,void 0,void 0,function(){var o,a;return m(this,function(u){switch(u.label){case 0:return o=!0,[4,Ni(r,t)];case 1:return a=u.sent(),o=!1,t.todo>0&&n(o,a,r,n),[2]}})})},Math.random()*5e3)}function Li(e,t){var r,n,i,o,a=e.user();return t.previousId=(i=(n=(r=t.previousId)!==null&&r!==void 0?r:t.from)!==null&&n!==void 0?n:a.id())!==null&&i!==void 0?i:a.anonymousId(),t.userId=(o=t.userId)!==null&&o!==void 0?o:t.to,delete t.from,delete t.to,t}var Ri=function(e){return e.name==="Segment.io"};function Cr(e,t,r){var n,i,o;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(s)),s.clear()});var a=(n=t?.apiKey)!==null&&n!==void 0?n:"",u=e.options.disableClientPersistence?new ft(e.queue.queue.maxAttempts,[]):new pt(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),s=new Set,c=!1,l=(i=t?.apiHost)!==null&&i!==void 0?i:rr,d=(o=t?.protocol)!==null&&o!==void 0?o:"https",p="".concat(d,"://").concat(l),h=t?.deliveryStrategy,v=h&&"strategy"in h&&h.strategy==="batching"?Di(l,h.config):Fi(h?.config);function g(_){return y(this,void 0,void 0,function(){var b,E;return m(this,function(O){return Ee()?(u.push(_),ve(c,u,S,ve),[2,_]):(s.add(_),b=_.event.type.charAt(0),E=Fe(_.event).json(),_.event.type==="track"&&delete E.traits,_.event.type==="alias"&&(E=Li(e,E)),u.getAttempts(_)>=u.maxAttempts?(s.delete(_),[2,_]):[2,v.dispatch("".concat(p,"/").concat(b),Ti(e,E,t,r,_)).then(function(){return _}).catch(function(I){if(_.log("error","Error sending event",I),I.name==="RateLimitError"){var x=I.retryTimeout;u.pushWithBackoff(_,x)}else u.pushWithBackoff(_);return ve(c,u,S,ve),_}).finally(function(){s.delete(_)})])})})}var S={metadata:{writeKey:a,apiHost:l,protocol:d},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:g,identify:g,page:g,alias:g,group:g,screen:g};return u.todo&&ve(c,u,S,ve),S}var Z="This is being deprecated and will be not be available in future releases of Analytics JS",Je=ht(),We=Je?.analytics;function qi(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=t?10:1,i=r?new ft(n,[]):new pt(n,e);return new Pn(i)}var Ui=function(){function e(t,r){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var o;return(o=r.plugins.find(Ri))===null||o===void 0?void 0:o.metadata},this.writeKey=t.writeKey;var i={integrations:{"Segment.io":{apiKey:""}}};this.cdnSettings=(n=t.cdnSettings)!==null&&n!==void 0?n:i,this.cdnURL=t.cdnURL}return Object.defineProperty(e.prototype,"apiHost",{get:function(){var t,r;return(r=(t=this._getSegmentPluginMetadata)===null||t===void 0?void 0:t.call(this))===null||r===void 0?void 0:r.apiHost},enumerable:!1,configurable:!0}),e}();function $(){console.warn(Z)}var jt=function(e){L(t,e);function t(r,n,i,o,a){var u=this,s,c;u=e.call(this)||this,u._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=$,u.addIntegrationMiddleware=$,u.listeners=$,u.addEventListener=$,u.removeAllListeners=$,u.removeListener=$,u.removeEventListener=$,u.hasListeners=$,u.add=$,u.addIntegration=$;var l=n?.cookie,d=(s=n?.disableClientPersistence)!==null&&s!==void 0?s:!1;u.queue=i??qi("".concat(r.writeKey,":event-queue"),n?.retryQueue,d),u.settings=new Ui(r,u.queue);var p=n?.storage;return u._universalStorage=u.createStore(d,p,l),u._user=o??new gt(f({persist:!d,storage:n?.storage},n?.user),l).load(),u._group=a??new yr(f({persist:!d,storage:n?.storage},n?.group),l).load(),u.eventFactory=new sr(u._user),u.integrations=(c=n?.integrations)!==null&&c!==void 0?c:{},u.options=n??{},yt(u),u}return t.prototype.createStore=function(r,n,i){return r?new Y([new mt]):n&&hr(n)?new Y(nt(pr(n.stores,i))):new Y(nt([j.LocalStorage,{name:j.Cookie,settings:i},j.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d=this;return m(this,function(p){return i=fe(r),o=er.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=this.eventFactory.track(a,u,s,this.integrations,i),[2,this._dispatch(l,c).then(function(h){return d.emit("track",a,h.event.properties,h.event.options),h})]})})},t.prototype.page=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d,p=this;return m(this,function(h){return i=fe(r),o=Ye.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4],d=this.eventFactory.page(a,u,s,c,this.integrations,i),[2,this._dispatch(d,l).then(function(v){return p.emit("page",a,u,v.event.properties,v.event.options),v})]})})},t.prototype.identify=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d=this;return m(this,function(p){return i=fe(r),o=et(this._user).apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],this._user.identify(a,u),l=this.eventFactory.identify(this._user.id(),this._user.traits(),s,this.integrations,i),[2,this._dispatch(l,c).then(function(h){return d.emit("identify",h.event.userId,h.event.traits,h.event.options),h})]})})},t.prototype.group=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=fe(n);if(n.length===0)return this._group;var a=et(this._group).apply(void 0,n),u=a[0],s=a[1],c=a[2],l=a[3];this._group.identify(u,s);var d=this._group.id(),p=this._group.traits(),h=this.eventFactory.group(d,p,c,this.integrations,o);return this._dispatch(h,l).then(function(v){return r.emit("group",v.event.groupId,v.event.traits,v.event.options),v})},t.prototype.alias=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d=this;return m(this,function(p){return i=fe(r),o=tr.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=this.eventFactory.alias(a,u,s,this.integrations,i),[2,this._dispatch(l,c).then(function(h){return d.emit("alias",a,u,h.event.options),h})]})})},t.prototype.screen=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d,p=this;return m(this,function(h){return i=fe(r),o=Ye.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4],d=this.eventFactory.screen(a,u,s,c,this.integrations,i),[2,this._dispatch(d,l).then(function(v){return p.emit("screen",a,u,v.event.properties,v.event.options),v})]})})},t.prototype.trackClick=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return m(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-pkMvCaah.js"),[])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,C([this],r,!1))]}})})},t.prototype.trackLink=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return m(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-pkMvCaah.js"),[])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,C([this],r,!1))]}})})},t.prototype.trackSubmit=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return m(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-pkMvCaah.js"),[])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,C([this],r,!1))]}})})},t.prototype.trackForm=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return m(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-pkMvCaah.js"),[])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,C([this],r,!1))]}})})},t.prototype.register=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a=this;return m(this,function(u){switch(u.label){case 0:return i=z.system(),o=r.map(function(s){return a.queue.register(i,s,a)}),[4,Promise.all(o)];case 1:return u.sent(),[2,i]}})})},t.prototype.deregister=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a=this;return m(this,function(u){switch(u.label){case 0:return i=z.system(),o=r.map(function(s){var c=a.queue.plugins.find(function(l){return l.name===s});if(c)return a.queue.deregister(i,c,a);i.log("warn","plugin ".concat(s," not found"))}),[4,Promise.all(o)];case 1:return u.sent(),[2,i]}})})},t.prototype.debug=function(r){return r===!1&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=r,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(r){this.settings.timeout=r},t.prototype._dispatch=function(r,n){return y(this,void 0,void 0,function(){var i;return m(this,function(o){return i=new z(r),i.stats.increment("analytics_js.invoke",1,[r.type]),Ee()&&!this.options.retryQueue?[2,i]:[2,cn(i,this.queue,this,{callback:n,debug:this._debug,timeout:this.settings.timeout})]})})},t.prototype.addSourceMiddleware=function(r){return y(this,void 0,void 0,function(){var n=this;return m(this,function(i){switch(i.label){case 0:return[4,this.queue.criticalTasks.run(function(){return y(n,void 0,void 0,function(){var o,a,u;return m(this,function(s){switch(s.label){case 0:return[4,q(()=>Promise.resolve().then(()=>no),void 0)];case 1:return o=s.sent().sourceMiddlewarePlugin,a={},this.queue.plugins.forEach(function(c){if(c.type==="destination")return a[c.name]=!0}),u=o(r,a),[4,this.register(u)];case 2:return s.sent(),[2]}})})})];case 1:return i.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(r){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return this.queue.plugins.filter(cr).forEach(function(o){(r==="*"||o.name.toLowerCase()===r.toLowerCase())&&o.addMiddleware.apply(o,n)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(r){return this._user.anonymousId(r)},t.prototype.queryString=function(r){return y(this,void 0,void 0,function(){var n;return m(this,function(i){switch(i.label){case 0:return this.options.useQueryString===!1?[2,[]]:[4,q(()=>import("./index-DeklogZX.js"),[])];case 1:return n=i.sent().queryString,[2,n(this,r)]}})})},t.prototype.use=function(r){return r(this),this},t.prototype.ready=function(r){return r===void 0&&(r=function(n){return n}),y(this,void 0,void 0,function(){return m(this,function(n){return[2,Promise.all(this.queue.plugins.map(function(i){return i.ready?i.ready():Promise.resolve()})).then(function(i){return r(i),i})]})})},t.prototype.noConflict=function(){return console.warn(Z),Fn(We??this),this},t.prototype.normalize=function(r){return console.warn(Z),this.eventFactory.normalize(r)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Z),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return je},enumerable:!1,configurable:!0}),t.prototype.initialize=function(r,n){return y(this,void 0,void 0,function(){return m(this,function(i){return console.warn(Z),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(r){return y(this,void 0,void 0,function(){return m(this,function(n){switch(n.label){case 0:return console.warn(Z),[4,this.page({path:r})];case 1:return n.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var r;return console.warn(Z),(r=this._plugins)!==null&&r!==void 0?r:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Z);var r=this.queue.plugins.filter(function(n){return n.type==="destination"}).reduce(function(n,i){var o="".concat(i.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),a=window[o];if(!a)return n;var u=a.Integration;return u?(n[i.name]=u,n):(n[i.name]=a,n)},{});return r},enumerable:!1,configurable:!0}),t.prototype.push=function(r){var n=this,i=r.shift();i&&!n[i]||n[i].apply(this,r)},t}(lt),Gt=function(e){L(t,e);function t(){var r=e.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return r.initialized=!0,r}return t}(jt),Jt={};function kr(){return typeof process>"u"||!Jt?{}:Jt}var zi=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,Bi=function(){var e,t=Array.prototype.slice.call(document.querySelectorAll("script"));return t.forEach(function(r){var n,i=(n=r.getAttribute("src"))!==null&&n!==void 0?n:"",o=zi.exec(i);o&&o[1]&&(e=o[1])}),e},ke,Ki=function(){var e,t=ke??((e=_t())===null||e===void 0?void 0:e._cdn);return t},$i=function(e){var t=_t();t&&(t._cdn=e),ke=e},Nt=function(){var e=Ki();if(e)return e;var t=Bi();return t||"https://cdn.segment.com"},xo=function(){var e=Nt();return"".concat(e,"/next-integrations")};function Vi(e,t){var r,n=Object.entries((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(i,o){var a,u,s=o[0],c=o[1];return typeof c=="object"?f(f({},i),(a={},a[s]=c,a)):f(f({},i),(u={},u[s]={},u))},{});return Object.entries(e.integrations).reduce(function(i,o){var a,u=o[0],s=o[1];return f(f({},i),(a={},a[u]=f(f({},s),n[u]),a))},{})}function Gi(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Ji(e){return y(this,void 0,void 0,function(){var t;return m(this,function(r){return t=navigator.userAgentData,t?e?[2,t.getHighEntropyValues(e).catch(function(){return t.toJSON()})]:[2,t.toJSON()]:[2,void 0]})})}var _e;function Wi(){if(_e)return _e;var e=dr(window.location.href);return _e={expires:31536e6,secure:!1,path:"/"},e&&(_e.domain=e),_e}function Qi(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&");for(var r=e.split("&"),n=0,i=r;n<i.length;n++){var o=i[n],a=o.split("="),u=a[0],s=a[1];if(t[u])return{id:s,type:t[u]}}}function Hi(e){return e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&"),e.split("&").reduce(function(t,r){var n=r.split("="),i=n[0],o=n[1],a=o===void 0?"":o;if(i.includes("utm_")&&i.length>4){var u=i.slice(4);u==="campaign"&&(u="name"),t[u]=Gi(a)}return t},{})}function Xi(){var e=W.get("_ga");if(e&&e.startsWith("amp"))return e}function Zi(e,t,r){var n,i=new Y(r?[]:[new vr(Wi())]),o=i.get("s:context.referrer"),a=(n=Qi(e))!==null&&n!==void 0?n:o;a&&(t&&(t.referrer=f(f({},t.referrer),a)),i.set("s:context.referrer",a))}var Yi=function(e){try{var t=new URLSearchParams;return Object.entries(e).forEach(function(r){var n=r[0],i=r[1];Array.isArray(i)?i.forEach(function(o){return t.append(n,o)}):t.append(n,i)}),t.toString()}catch{return""}},eo=function(){function e(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(r,n){return y(t,void 0,void 0,function(){var i;return m(this,function(o){switch(o.label){case 0:this.instance=n,o.label=1;case 1:return o.trys.push([1,3,,4]),i=this,[4,Ji(this.instance.options.highEntropyValuesClientHints)];case 2:return i.userAgentData=o.sent(),[3,4];case 3:return o.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(r){var n,i,o=r.event.context,a=o.page.search||"",u=typeof a=="object"?Yi(a):a;o.userAgent=navigator.userAgent,o.userAgentData=t.userAgentData;var s=navigator.userLanguage||navigator.language;typeof o.locale>"u"&&typeof s<"u"&&(o.locale=s),(n=o.library)!==null&&n!==void 0||(o.library={name:"analytics.js",version:"".concat("npm:next","-").concat(je)}),u&&!o.campaign&&(o.campaign=Hi(u));var c=Xi();c&&(o.amp={id:c}),Zi(u,o,(i=t.instance.options.disableClientPersistence)!==null&&i!==void 0?i:!1);try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}return r},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich}return e}(),to=new eo;function Dr(e){var t=Array.prototype.slice.call(window.document.querySelectorAll("script"));return t.find(function(r){return r.src===e})}function Qe(e,t){var r=Dr(e);if(r!==void 0){var n=r?.getAttribute("status");if(n==="loaded")return Promise.resolve(r);if(n==="loading")return new Promise(function(i,o){r.addEventListener("load",function(){return i(r)}),r.addEventListener("error",function(a){return o(a)})})}return new Promise(function(i,o){var a,u=window.document.createElement("script");u.type="text/javascript",u.src=e,u.async=!0,u.setAttribute("status","loading");for(var s=0,c=Object.entries({});s<c.length;s++){var l=c[s],d=l[0],p=l[1];u.setAttribute(d,p)}u.onload=function(){u.onerror=u.onload=null,u.setAttribute("status","loaded"),i(u)},u.onerror=function(){u.onerror=u.onload=null,u.setAttribute("status","error"),o(new Error("Failed to load ".concat(e)))};var h=window.document.querySelector("script");h?(a=h.parentElement)===null||a===void 0||a.insertBefore(u,h):window.document.head.appendChild(u)})}function Mo(e){var t=Dr(e);return t!==void 0&&t.remove(),Promise.resolve()}function Fr(e,t,r){return y(this,void 0,void 0,function(){function n(c,l){return y(this,void 0,void 0,function(){var d,p,h;return m(this,function(v){switch(v.label){case 0:return d=!1,p=null,[4,l({payload:Fe(c,{clone:!0,traverse:!1}),integration:e,next:function(g){d=!0,g===null&&(p=null),g&&(p=g.obj)}})];case 1:return v.sent(),!d&&p!==null&&(p=p,p.integrations=f(f({},c.integrations),(h={},h[e]=!1,h))),[2,p]}})})}var i,o,a,u,s;return m(this,function(c){switch(c.label){case 0:i=Fe(t,{clone:!0,traverse:!1}).rawEvent(),o=0,a=r,c.label=1;case 1:return o<a.length?(u=a[o],[4,n(i,u)]):[3,4];case 2:if(s=c.sent(),s===null)return[2,null];i=s,c.label=3;case 3:return o++,[3,1];case 4:return[2,i]}})})}function ro(e,t){function r(n){return y(this,void 0,void 0,function(){var i;return m(this,function(o){switch(o.label){case 0:return i=!1,[4,e({payload:Fe(n.event,{clone:!0,traverse:!1}),integrations:t??{},next:function(a){i=!0,a&&(n.event=a.obj)}})];case 1:if(o.sent(),!i)throw new ae({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(n){return Promise.resolve(n)},track:r,page:r,screen:r,identify:r,alias:r,group:r}}const no=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:Fr,sourceMiddlewarePlugin:ro},Symbol.toStringTag,{value:"Module"}));function we(e,t){var r=t.methodName,n=t.integrationName,i=t.type,o=t.didError,a=o===void 0?!1:o;e.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(r),"integration_name:".concat(n),"type:".concat(i)])}var io=function(){function e(t,r){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=Xt(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=r,this.name=t,this.type=r.type,this.alternativeNames.push(r.name)}return e.prototype.addMiddleware=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.type==="destination"&&(t=this.middleware).push.apply(t,r)},e.prototype.transform=function(t){return y(this,void 0,void 0,function(){var r;return m(this,function(n){switch(n.label){case 0:return[4,Fr(this.name,t.event,this.middleware)];case 1:return r=n.sent(),r===null&&t.cancel(new ae({retry:!1,reason:"dropped by destination middleware"})),[2,new z(r)]}})})},e.prototype._createMethod=function(t){var r=this;return function(n){return y(r,void 0,void 0,function(){var i,o;return m(this,function(a){switch(a.label){case 0:return this.action[t]?(i=n,this.type!=="destination"?[3,2]:[4,this.transform(n)]):[2,n];case 1:i=a.sent(),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!a.sent())throw new Error("Something prevented the destination from getting ready");return we(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](i)];case 4:return a.sent(),[3,6];case 5:throw o=a.sent(),we(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),o;case 6:return[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return y(this,void 0,void 0,function(){return m(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}})})},e.prototype.load=function(t,r){return y(this,void 0,void 0,function(){var n,i,o,a;return m(this,function(u){switch(u.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];u.label=1;case 1:return u.trys.push([1,3,,4]),we(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,r),o=(i=this.loadPromise).resolve,[4,n];case 2:return o.apply(i,[u.sent()]),[2,n];case 3:throw a=u.sent(),we(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(a),a;case 4:return[2]}})})},e.prototype.unload=function(t,r){var n,i;return(i=(n=this.action).unload)===null||i===void 0?void 0:i.call(n,t,r)},e}();function oo(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];return e.forEach(function(r){t.forEach(function(n){var i;if(r[n]===void 0)throw new Error("Plugin: ".concat((i=r.name)!==null&&i!==void 0?i:"unknown"," missing required function ").concat(n))})}),!0}function ao(e,t){var r=e[t.creationName],n=e[t.name];return e.All===!1&&!r&&!n||r===!1||n===!1}function uo(e,t){return y(this,void 0,void 0,function(){var r,n,i,o,a,u;return m(this,function(s){switch(s.label){case 0:if(s.trys.push([0,9,,10]),r=new RegExp("https://cdn.segment.(com|build)"),n=Nt(),!t)return[3,6];i=e.url.split("/"),o=i[i.length-2],a=e.url.replace(o,btoa(o).replace(/=/g,"")),s.label=1;case 1:return s.trys.push([1,3,,5]),[4,Qe(a.replace(r,n))];case 2:return s.sent(),[3,5];case 3:return s.sent(),[4,Qe(e.url.replace(r,n))];case 4:return s.sent(),[3,5];case 5:return[3,8];case 6:return[4,Qe(e.url.replace(r,n))];case 7:s.sent(),s.label=8;case 8:return typeof window[e.libraryName]=="function"?[2,window[e.libraryName]]:[3,10];case 9:throw u=s.sent(),console.error("Failed to create PluginFactory",e),u;case 10:return[2]}})})}function so(e,t,r,n,i,o){var a,u,s;return y(this,void 0,void 0,function(){var c,l,d,p=this;return m(this,function(h){switch(h.label){case 0:return c=[],l=(u=(a=e.middlewareSettings)===null||a===void 0?void 0:a.routingRules)!==null&&u!==void 0?u:[],d=((s=e.remotePlugins)!==null&&s!==void 0?s:[]).map(function(v){return y(p,void 0,void 0,function(){var g,S,_,b,E,O,I;return m(this,function(x){switch(x.label){case 0:if(ao(t,v))return[2];x.label=1;case 1:return x.trys.push([1,6,,7]),S=o?.find(function(k){var Q=k.pluginName;return Q===v.name}),S?[3,3]:[4,uo(v,n?.obfuscate)];case 2:S=x.sent(),x.label=3;case 3:return g=S,g?(_=r[v.name],[4,g(f(f({},v.settings),_))]):[3,5];case 4:b=x.sent(),E=Array.isArray(b)?b:[b],oo(E),O=l.filter(function(k){return k.destinationName===v.creationName}),E.forEach(function(k){var Q=new io(v.creationName,k);O.length&&i&&Q.addMiddleware(i),c.push(Q)}),x.label=5;case 5:return[3,7];case 6:return I=x.sent(),console.warn("Failed to load Remote Plugin",I),we(z.system(),{integrationName:v.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}})})}),[4,Promise.all(d)];case 1:return h.sent(),[2,c.filter(Boolean)]}})})}var He,Wt,co=ht(),Qt=(He=(Wt=co).__SEGMENT_INSPECTOR__)!==null&&He!==void 0?He:Wt.__SEGMENT_INSPECTOR__={},lo=function(e){var t;return(t=Qt.attach)===null||t===void 0?void 0:t.call(Qt,e)};function fo(e,t){return Te("".concat(t,"/v1/projects/").concat(e,"/settings")).then(function(r){return r.ok?r.json():r.text().then(function(n){throw new Error(n)})}).catch(function(r){throw console.error(r.message),r})}function vo(e){return kr().NODE_ENV!=="test"&&Object.keys(e.integrations).length>1}function ho(e){var t,r,n;return kr().NODE_ENV!=="test"&&((n=(r=(t=e.middlewareSettings)===null||t===void 0?void 0:t.routingRules)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>0}function po(e,t){Rn(e,t),Ln(e,t)}function yo(e,t,r){return y(this,void 0,void 0,function(){return m(this,function(n){switch(n.label){case 0:return[4,go(e,t)];case 1:return n.sent(),qn(e,r),[2]}})})}var mo=function(){var e,t,r=(e=window.location.hash)!==null&&e!==void 0?e:"",n=(t=window.location.search)!==null&&t!==void 0?t:"",i=n.length?n:r.replace(/(?=#).*(?=\?)/,"");return i},go=function(e,t){return y(void 0,void 0,void 0,function(){return m(this,function(r){switch(r.label){case 0:return t.includes("ajs_")?[4,e.queryString(t).catch(console.error)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})};function bo(e,t,r,n,i,o,a){var u,s,c;return i===void 0&&(i=[]),y(this,void 0,void 0,function(){var l,d,p,h,v,g,S,_,b,E,O,I,x,k,Q,Tr=this;return m(this,function(T){switch(T.label){case 0:return po(r,a),l=i?.filter(function(D){return typeof D=="object"}),d=i?.filter(function(D){return typeof D=="function"&&typeof D.pluginName=="string"}),ho(t)?[4,q(()=>import("./index-SSgaCJsD.js"),[]).then(function(D){return D.tsubMiddleware(t.middlewareSettings.routingRules)})]:[3,2];case 1:return h=T.sent(),[3,3];case 2:h=void 0,T.label=3;case 3:return p=h,vo(t)||o.length>0?[4,q(()=>import("./index-HvoTJwGm.js"),__vite__mapDeps([0,1,2])).then(function(D){return D.ajsDestinations(e,t,r.integrations,n,p,o)})]:[3,5];case 4:return g=T.sent(),[3,6];case 5:g=[],T.label=6;case 6:return v=g,t.legacyVideoPluginsEnabled?[4,q(()=>import("./index-CjuQOkbh.js"),__vite__mapDeps([3,4,1])).then(function(D){return D.loadLegacyVideoPlugins(r)})]:[3,8];case 7:T.sent(),T.label=8;case 8:return!((u=n.plan)===null||u===void 0)&&u.track?[4,q(()=>import("./index-C05H8NDX.js"),__vite__mapDeps([5,1,2])).then(function(D){var te;return D.schemaFilter((te=n.plan)===null||te===void 0?void 0:te.track,t)})]:[3,10];case 9:return _=T.sent(),[3,11];case 10:_=void 0,T.label=11;case 11:return S=_,b=Vi(t,n),[4,so(t,r.integrations,b,n,p,d).catch(function(D){return console.error("Failed to load remote plugins",D),[]})];case 12:return E=T.sent(),O=C(C([to],v,!0),E,!0),S&&O.push(S),I=((s=n.integrations)===null||s===void 0?void 0:s.All)===!1&&!n.integrations["Segment.io"]||n.integrations&&n.integrations["Segment.io"]===!1,I?[3,14]:(k=(x=O).push,[4,Cr(r,b["Segment.io"],t.integrations)]);case 13:k.apply(x,[T.sent()]),T.label=14;case 14:return[4,r.register.apply(r,C(C([],O,!1),l,!1))];case 15:return Q=T.sent(),[4,Nn(r,a)];case 16:return T.sent(),Object.entries((c=t.enabledMiddleware)!==null&&c!==void 0?c:{}).some(function(D){var te=D[1];return te})?[4,q(()=>import("./index-DmAaXUNv.js"),__vite__mapDeps([6,1])).then(function(D){var te=D.remoteMiddlewares;return y(Tr,void 0,void 0,function(){var Lt,Rt;return m(this,function(qt){switch(qt.label){case 0:return[4,te(Q,t,n.obfuscate)];case 1:return Lt=qt.sent(),Rt=Lt.map(function(jr){return r.addSourceMiddleware(jr)}),[2,Promise.all(Rt)]}})})})]:[3,18];case 17:T.sent(),T.label=18;case 18:return[4,jn(r,a)];case 19:return T.sent(),[2,Q]}})})}function _o(e,t,r){var n,i,o,a,u,s,c,l,d;return t===void 0&&(t={}),y(this,void 0,void 0,function(){var p,h,v,g,S,_,b,E,O,I,x;return m(this,function(k){switch(k.label){case 0:return t.disable===!0?[2,[new Gt,z.system()]]:(t.globalAnalyticsKey&&Dn(t.globalAnalyticsKey),e.cdnURL&&$i(e.cdnURL),t.initialPageview&&r.add(new it("page",[])),p=mo(),h=(n=e.cdnURL)!==null&&n!==void 0?n:Nt(),(i=e.cdnSettings)!==null&&i!==void 0?(g=i,[3,3]):[3,1]);case 1:return[4,fo(e.writeKey,h)];case 2:g=k.sent(),k.label=3;case 3:return v=g,t.updateCDNSettings&&(v=t.updateCDNSettings(v)),typeof t.disable!="function"?[3,5]:[4,t.disable(v)];case 4:if(S=k.sent(),S)return[2,[new Gt,z.system()]];k.label=5;case 5:return _=(a=(o=v.integrations["Segment.io"])===null||o===void 0?void 0:o.retryQueue)!==null&&a!==void 0?a:!0,t=f({retryQueue:_},t),b=new jt(f(f({},e),{cdnSettings:v,cdnURL:h}),t),lo(b),E=(u=e.plugins)!==null&&u!==void 0?u:[],O=(s=e.classicIntegrations)!==null&&s!==void 0?s:[],I=(c=t.integrations)===null||c===void 0?void 0:c["Segment.io"],nr.initRemoteMetrics(f(f({},v.metrics),{host:(l=I?.apiHost)!==null&&l!==void 0?l:(d=v.metrics)===null||d===void 0?void 0:d.host,protocol:I?.protocol})),[4,bo(e.writeKey,v,b,t,E,O,r)];case 6:return x=k.sent(),b.initialized=!0,b.emit("initialize",e,t),[4,yo(b,p,r)];case 7:return k.sent(),[2,[b,x]]}})})}var wo=function(e){L(t,e);function t(){var r=this,n=Xt(),i=n.promise,o=n.resolve;return r=e.call(this,function(a){return i.then(function(u){var s=u[0],c=u[1];return _o(s,c,a)})})||this,r._resolveLoadStart=function(a,u){return o([a,u])},r}return t.prototype.load=function(r,n){return n===void 0&&(n={}),this._resolveLoadStart(r,n),this},t.load=function(r,n){return n===void 0&&(n={}),new t().load(r,n)},t.standalone=function(r,n){return t.load({writeKey:r},n).then(function(i){return i[0]})},t}(zn),So=function(){function e(){}return e.load=function(){return Promise.reject(new Error("AnalyticsNode is not available in browsers."))},e}();const Co=Object.freeze(Object.defineProperty({__proto__:null,Analytics:jt,AnalyticsBrowser:wo,AnalyticsNode:So,Context:z,ContextCancelation:ae,EventFactory:sr,Group:yr,UniversalStorage:Y,User:gt,getGlobalAnalytics:_t,isDestinationPluginWithAddMiddleware:cr,resolveAliasArguments:tr,resolveArguments:er,resolvePageArguments:Ye,resolveUserArguments:et,segmentio:Cr},Symbol.toStringTag,{value:"Module"}));export{ae as C,ft as P,Gi as a,U as b,Ee as c,Fr as d,X as e,Xt as f,xo as g,pt as h,Oo as i,ji as j,Se as k,Qe as l,Vi as m,z as n,ln as o,Wr as p,Co as q,we as r,Mo as u};