@dcl/blog-site 0.3.1-24533807769.commit-2e68981 → 0.3.1-24574465167.commit-1f456d2
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.
- package/assets/AuthorPage-Df6gn9_m.js +1 -0
- package/assets/BlogPage-B4pxSza8.js +1 -0
- package/assets/CategoryPage-CxeJ3QiI.js +1 -0
- package/assets/Media-BiHT3qBR.js +1 -0
- package/assets/PageLayout-Ciu0k-U_.js +1 -0
- package/assets/PostCard-Dd4F35zx.js +1 -0
- package/assets/PostPage-QHfmu2Vt.js +1 -0
- package/assets/PostPage.styled-D5lERqJA.js +2 -0
- package/assets/PreviewPage-J15Hru2y.js +1 -0
- package/assets/{QueryClientProvider-Dv18L3Bf.js → QueryClientProvider-OhEAiC0P.js} +1 -1
- package/assets/SEO-DW5vf2xx.js +5 -0
- package/assets/SearchPage-Aj2MbbZU.js +1 -0
- package/assets/SignInRedirect-qy6q_tZq.js +1 -0
- package/assets/{WalletStateProvider-Bb79ArZ-.js → WalletStateProvider-CdpYlS08.js} +1 -1
- package/assets/{Web3Inner-CgxSXeS_.js → Web3Inner-BJ-KSM84.js} +1 -1
- package/assets/{Web3SyncProvider-D6_GzSKM.js → Web3SyncProvider-CVoNw-Ck.js} +2 -2
- package/assets/X-DOiZv48t.js +15 -0
- package/assets/__federation_expose_App-8sv1g15i.js +1 -0
- package/assets/{__federation_fn_import-BxyPyKYw.js → __federation_fn_import-DNtjaGC4.js} +1 -1
- package/assets/__federation_shared_@dcl/core-web3/lazy-DkP-jRSY.js +2 -0
- package/assets/__federation_shared_@dcl/{core-web3-CKa_YLUg.js → core-web3-B8eHhcKW.js} +2 -2
- package/assets/__federation_shared_@dcl/{hooks-BUl9fwJ6.js → hooks-6RDCWtS0.js} +5 -5
- package/assets/__federation_shared_@dcl/schemas-Bx07hTGg.js +1 -0
- package/assets/__federation_shared_@emotion/react-TNrN6Qto.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-DWCD7TRI.js → styled-CGJjdZ7M.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-DhNprCzs.js → __federation_shared_decentraland-ui2-Bc45XQnG.js} +28 -31
- package/assets/__federation_shared_react-D4NpQaXx.js +1 -0
- package/assets/__federation_shared_react-dom-BnMp-IwM.js +1 -0
- package/assets/{__federation_shared_react-redux-BbbSoEti.js → __federation_shared_react-redux-C0CNQCVL.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-CghPW3T5.js → __federation_shared_react-router-dom-DwnKrWTP.js} +1 -1
- package/assets/{__federation_shared_viem-BSisS619.js → __federation_shared_viem-BnQWYaJC.js} +1 -1
- package/assets/{__federation_shared_wagmi-BNNJMvLV.js → __federation_shared_wagmi-gkTMllsk.js} +1 -1
- package/assets/{add-CdrtIhqC.js → add-CrlFk3Q3.js} +1 -1
- package/assets/{all-wallets-Cmla8eMe.js → all-wallets-Cn4vlXAg.js} +1 -1
- package/assets/{app-store-ma7uMa9T.js → app-store-Be5qHevD.js} +1 -1
- package/assets/{apple-bELCHYbt.js → apple-BLF9iOOU.js} +1 -1
- package/assets/{arrow-bottom-DloKu1fV.js → arrow-bottom-DkIzNCmM.js} +1 -1
- package/assets/{arrow-bottom-circle-DzXI01oZ.js → arrow-bottom-circle-DTIccLhb.js} +1 -1
- package/assets/{arrow-left-B55lkgKK.js → arrow-left-Dn2O6Yc9.js} +1 -1
- package/assets/{arrow-right-Bw7eQ4QH.js → arrow-right-BhwoZxOJ.js} +1 -1
- package/assets/{arrow-top-Dn6leB_M.js → arrow-top-CKR018aC.js} +1 -1
- package/assets/authRedirect-CDwN-vsd.js +1 -0
- package/assets/{auto-track-CkHj-ik-.js → auto-track-D5pJjTP0.js} +1 -1
- package/assets/{bank-DH1VVekh.js → bank-C7cxDWGw.js} +1 -1
- package/assets/{basic-CpaLk7Rk.js → basic-C9P9esct.js} +1 -1
- package/assets/{biconomy-C-Aa3WOy.js → biconomy-C3StBANE.js} +1 -1
- package/assets/{browser-Cy2ntZlE.js → browser-DJ7_iUnZ.js} +1 -1
- package/assets/{card-DeDlu8qm.js → card-JDGi0NHR.js} +1 -1
- package/assets/{ccip-O3XMTSRc.js → ccip-CIy6Np-r.js} +1 -1
- package/assets/{checkmark-DNVFeB3s.js → checkmark-CPuFFcJX.js} +1 -1
- package/assets/{checkmark-bold-DEcOisss.js → checkmark-bold-mWhrN4oP.js} +1 -1
- package/assets/{chevron-bottom-xDV_oQI6.js → chevron-bottom-BiS2oxh-.js} +1 -1
- package/assets/{chevron-left-BYtOhhqm.js → chevron-left-mgiwYveY.js} +1 -1
- package/assets/{chevron-right-CfsnvkD5.js → chevron-right-BBbwfFkV.js} +1 -1
- package/assets/{chevron-top-CONIZzEr.js → chevron-top-vRyln5TS.js} +1 -1
- package/assets/{chrome-store-D9VGMy-w.js → chrome-store-BMwl9GFC.js} +1 -1
- package/assets/{clock-DRArrlZN.js → clock-Cyo1NCoz.js} +1 -1
- package/assets/{close-BnL2HnLj.js → close-DpLs-6ut.js} +1 -1
- package/assets/{coinPlaceholder-DspCsB1d.js → coinPlaceholder-CMWbyfzw.js} +1 -1
- package/assets/{compass-CL9Ubv1C.js → compass-BZlWuYsQ.js} +1 -1
- package/assets/config-DzzapLE-.js +1 -0
- package/assets/contentful-5JGMFnCq.js +4 -0
- package/assets/{controller-BVrxdctz.js → controller-zrh0AA5v.js} +2 -2
- package/assets/{copy-DzcJW_6z.js → copy-C8XbJm81.js} +1 -1
- package/assets/{core-CNeX_97j.js → core-CmzgCi5e.js} +3 -3
- package/assets/{createBundlerClient-BPAMiN0_.js → createBundlerClient-CvVX10zF.js} +1 -1
- package/assets/{createClient-B3NJif4G.js → createClient-DuiD_-hg.js} +1 -1
- package/assets/{cursor-VEXLPp4L.js → cursor-DgKI5UfF.js} +1 -1
- package/assets/{cursor-transparent-eNYb23WQ.js → cursor-transparent-DYc-PvMS.js} +1 -1
- package/assets/{decimals-QcoDvy79.js → decimals-BprNBSsW.js} +1 -1
- package/assets/{decimals-Bcje5XLK.js → decimals-DC_X5ByZ.js} +1 -1
- package/assets/defaultTheme-0boCqa4G.js +1 -0
- package/assets/{desktop-B8dtxVkT.js → desktop-BXu5vjTJ.js} +1 -1
- package/assets/{detectExtension-CCed483c.js → detectExtension-B_qG6Uj3.js} +1 -1
- package/assets/{disconnect-5l_BrY-g.js → disconnect-BIjCZBSY.js} +1 -1
- package/assets/{discord-vPm7sSnB.js → discord-BHe20Bgu.js} +1 -1
- package/assets/emotion-element-f0de968e.browser.esm-DUNwabDo.js +8 -0
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-BLv21GTb.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-B88ZkZJW.js} +1 -1
- package/assets/{encode-D4fq-GtO.js → encode-w1S6O2Jy.js} +2 -2
- package/assets/{engine-C-meN4xY.js → engine-CjoYEL_B.js} +1 -1
- package/assets/{estimate-gas-DFiVp-Bb.js → estimate-gas-Clq1zGmM.js} +3 -3
- package/assets/{estimate-l1-fee-lAfdaqWJ.js → estimate-l1-fee-D_wtZw7B.js} +1 -1
- package/assets/{eth_getStorageAt-DFwf_hwV.js → eth_getStorageAt-BPq1D0T-.js} +1 -1
- package/assets/{etherscan-Ck2P6D17.js → etherscan-CG5vA-W6.js} +1 -1
- package/assets/events-DqOg3rR3.js +1 -0
- package/assets/{exclamation-triangle-DfbN77Lf.js → exclamation-triangle-GyJq4nAX.js} +1 -1
- package/assets/{extension-CtEMnFwe.js → extension-muflT2fN.js} +1 -1
- package/assets/{external-link-B0IDyBri.js → external-link-DH3pNf93.js} +1 -1
- package/assets/{extractIPFS-DIosWHkP.js → extractIPFS-CN8RjoYW.js} +1 -1
- package/assets/{facebook-C0UeZpYw.js → facebook-Dvt8S6HP.js} +1 -1
- package/assets/{farcaster-CYOZFCGP.js → farcaster-CExK9GF3.js} +1 -1
- package/assets/{fee-data-BpKOAsFJ.js → fee-data-ITl-GLgb.js} +1 -1
- package/assets/{fetchTokenMetadata-DqYbYFuX.js → fetchTokenMetadata-C8Ab2EFW.js} +2 -2
- package/assets/{filters-NBQeHIU7.js → filters-BjkvScGN.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-CDZa8BmK.js → get-ecosystem-wallet-info-BMnnm-zL.js} +1 -1
- package/assets/{getBalance-Bw5byYn3.js → getBalance-D97jBzkx.js} +1 -1
- package/assets/{getInstalledModules-By8IApsm.js → getInstalledModules-bM9ZiQVT.js} +1 -1
- package/assets/{getNFT-YU4EH9Wq.js → getNFT-DXArYl_b.js} +2 -2
- package/assets/{getNFT-DEyn-Dm_.js → getNFT-o2zOBSOX.js} +1 -1
- package/assets/{github-C4rc0OEq.js → github-DIcpmiTD.js} +1 -1
- package/assets/{google-kXTnc_BR.js → google-Ckbmg2Ga.js} +1 -1
- package/assets/{help-circle-Bwzt3B2p.js → help-circle-s_lVA58g.js} +1 -1
- package/assets/{id-zOIHpH1K.js → id-DeQgQo7H.js} +1 -1
- package/assets/{image-B1eT9feQ.js → image-DbZ9UUJ_.js} +1 -1
- package/assets/{in-app-wallet-calls-C61H1buU.js → in-app-wallet-calls-DzF9AO72.js} +1 -1
- package/assets/index-B584AmqK.js +1 -0
- package/assets/{index-Dy0yjznp__bundled.js → index-B584AmqK__bundled.js} +1 -1
- package/assets/index-BHSHxmEC.js +1 -0
- package/assets/{index-BqjaI3ay.js → index-BtR4l8xs.js} +1 -1
- package/assets/{index-AMqzEpe3.js → index-BxRTPul1.js} +1 -1
- package/assets/{index-DD6DIvwj.js → index-C0Hq4IJY.js} +1 -1
- package/assets/index-C1_ZJ2Fz.js +2 -0
- package/assets/{index-CQa-TpsF.js → index-C2PA63OZ.js} +2 -2
- package/assets/{index-CUrF8sCH.js → index-C7wwE81D.js} +3 -3
- package/assets/index-C9JLZTTc.js +1 -0
- package/assets/{index-C3DFzjjm.js → index-CA0YZX5c.js} +1 -1
- package/assets/index-CDytriL0.js +3 -0
- package/assets/{index-BozJS3za.js → index-CFfzHT-l.js} +4 -4
- package/assets/{index-B5C7HYRN.js → index-Cl9Sxyic.js} +1 -1
- package/assets/index-CsRwhq7r.js +1 -0
- package/assets/{index-DFwD9Y6T.js → index-CyHd0GjE.js} +1 -1
- package/assets/index-DmRwGcGJ.js +2 -0
- package/assets/index-DyjOKhts.js +2 -0
- package/assets/index-_YWtfAHj.js +1 -0
- package/assets/{index-BjzJcZq6__bundled.js → index-_YWtfAHj__bundled.js} +1 -1
- package/assets/{index-C1_xRJU5.js → index-eLC4bAt3.js} +1 -1
- package/assets/{index-BOPorWEt.js → index-yCW6eWvL.js} +1 -1
- package/assets/index.es-BRoT1QUU.js +2 -0
- package/assets/{index.es-D3pP9hN4.js → index.es-Bjzmmtjk.js} +1 -1
- package/assets/{index.es-CX6b-_J8.js → index.es-DDZKss3Y.js} +1 -1
- package/assets/{index.es-Co6Vfgvo.js → index.es-t7HDtKGz.js} +3 -3
- package/assets/index.modern-zayAXp-r.js +5 -0
- package/assets/index.umd-ddl_WOWs.js +1 -0
- package/assets/{info-fCoUT5OA.js → info-B83FYyYF.js} +1 -1
- package/assets/{info-circle-BSc3Qu0H.js → info-circle-BIW8YsHS.js} +1 -1
- package/assets/{jsx-runtime-DncYoG30.js → jsx-runtime-BWEVYhay.js} +1 -1
- package/assets/{jsx-runtime-DncYoG30__bundled.js → jsx-runtime-BWEVYhay__bundled.js} +1 -1
- package/assets/{lightbulb-CtEeQpR-.js → lightbulb-D3FjAVfy.js} +1 -1
- package/assets/{mail-CyEGKrO1.js → mail-B-gu_WkI.js} +1 -1
- package/assets/{mobile-va3MMBf-.js → mobile-COjPZ1X2.js} +1 -1
- package/assets/{more-CNKLmFKq.js → more-Ra8fJn--.js} +1 -1
- package/assets/{network-placeholder-COaPFv9Z.js → network-placeholder-DWM9do2v.js} +1 -1
- package/assets/{nftPlaceholder-CwqKeCBT.js → nftPlaceholder-BkuiJ1Fi.js} +1 -1
- package/assets/{off-BXJei5ZC.js → off-KeVYYonx.js} +1 -1
- package/assets/{openzeppelin-5tViGSfu.js → openzeppelin-65KMFHrE.js} +1 -1
- package/assets/{ownerOf-B0jDYVPj.js → ownerOf-B5EfXA60.js} +1 -1
- package/assets/{parseNft-C9UVkjKp.js → parseNft-CtU7M4OG.js} +2 -2
- package/assets/{play-store-DPqFtu_u.js → play-store-Dvga_7y6.js} +1 -1
- package/assets/{plus-BRStu8oq.js → plus-1d7HZSRm.js} +1 -1
- package/assets/{preload-helper-DtiUdDj_.js → preload-helper-5SOR_wM4.js} +1 -1
- package/assets/{qr-code-zVq-PsFR.js → qr-code-DHi3Cbzt.js} +1 -1
- package/assets/{qr-overlay-CzG9L326.js → qr-overlay-wjVP52h3.js} +1 -1
- package/assets/{recycle-horizontal-BUcJt7KV.js → recycle-horizontal-f80ctvB9.js} +1 -1
- package/assets/{refresh-DoJwoFWZ.js → refresh-DCOqM3zJ.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-VGJ4-w32.js → reown-logo-Bh1MMtyx.js} +1 -1
- package/assets/{resolveImplementation-CDZMD3pd.js → resolveImplementation-eBjFZj8j.js} +1 -1
- package/assets/rich-text-react-renderer.es5-DX5s0zF9.js +2 -0
- package/assets/{search-qfys2xfh.js → search-CZQy06by.js} +1 -1
- package/assets/{send-BNIku3tf.js → send-D-TwjhV1.js} +1 -1
- package/assets/{send-batch-transaction-DJsVdrRi.js → send-batch-transaction-Ugc9XCfc.js} +1 -1
- package/assets/{send-eip712-transaction-zZlwlA8h.js → send-eip712-transaction-CsbokYJ3.js} +2 -2
- package/assets/{send-gasless-transaction-0zsgzkl7.js → send-gasless-transaction-XWm5OsJP.js} +2 -2
- package/assets/{serializeAuthorizationList-B224vId9.js → serializeAuthorizationList-sXgqtd3N.js} +1 -1
- package/assets/{session-proposal-DQKIaN0P.js → session-proposal-BZkE3xXx.js} +1 -1
- package/assets/{session-request-DO6jaRLL.js → session-request-BS122IY1.js} +2 -2
- package/assets/{signing-D7Amo-_J.js → signing-DLkAwP5Y.js} +3 -3
- package/assets/{slice-D08eqHRd.js → slice-D5Jq-FmM.js} +1 -1
- package/assets/{slice-DH_M4Fq9.js → slice-DpowZ_6S.js} +1 -1
- package/assets/{swapHorizontal-D4EMXwCW.js → swapHorizontal-DH1W1UoG.js} +1 -1
- package/assets/{swapHorizontalBold-DPzDpA5S.js → swapHorizontalBold-D8QA6zjc.js} +1 -1
- package/assets/{swapHorizontalMedium-BO1_vkWp.js → swapHorizontalMedium-D6iiMSB9.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-D5f2zm5T.js → swapHorizontalRoundedBold-CG0CSrfy.js} +1 -1
- package/assets/{swapVertical-Cl2TRZgu.js → swapVertical-BVkEaika.js} +1 -1
- package/assets/{telegram-COuwS3-1.js → telegram-BRL2ke_g.js} +1 -1
- package/assets/{thirdweb-ChZTN2O0.js → thirdweb-B-Xe4N-j.js} +3 -3
- package/assets/{three-dots-DaJ9Yk_z.js → three-dots-Ce3AHErA.js} +1 -1
- package/assets/{totalSupply-CeZQpDgj.js → totalSupply-BycaSCJm.js} +1 -1
- package/assets/{twitch-ChHlcjtL.js → twitch-BOhm2e6I.js} +1 -1
- package/assets/{twitterIcon-BHaGUsBd.js → twitterIcon-Bi32kZ_p.js} +1 -1
- package/assets/{uid-BE5dre25.js → uid-Cob2hcqP.js} +3 -3
- package/assets/useInfiniteBlogPosts-CA3uk6ie.js +1 -0
- package/assets/{verify-BJHlq4Cl.js → verify-XBYDp8cg.js} +1 -1
- package/assets/{verify-filled-CUQ_cX7L.js → verify-filled-DIs-cByX.js} +1 -1
- package/assets/{w3m-modal-BQt7iWW0.js → w3m-modal-CkzQCU-p.js} +1 -1
- package/assets/{wait-for-tx-receipt-mEy_aAXI.js → wait-for-tx-receipt-BmfZs18K.js} +1 -1
- package/assets/{wallet-Bqa5aoUK.js → wallet-DhGCzxG1.js} +1 -1
- package/assets/{wallet-placeholder-ZqWJAmHm.js → wallet-placeholder-CbhoKZ6M.js} +1 -1
- package/assets/{walletconnect-DgD3JeRt.js → walletconnect-Bo6cSb7c.js} +1 -1
- package/assets/{wallets-DBEqpf9_.js → wallets-DpmOypgu.js} +5 -5
- package/assets/{warning-circle-C-GR2K3_.js → warning-circle-DXO4TTWk.js} +1 -1
- package/assets/{web-connector-DbEpPXWA.js → web-connector-D9njQB_l.js} +3 -3
- package/assets/{webSocket-D9rKCHPk.js → webSocket-i6CHiIgb.js} +1 -1
- package/assets/{x-dxs8B49F.js → x-5st4UAZO.js} +1 -1
- package/index.html +29 -16
- package/package.json +3 -3
- package/assets/SignInRedirect-CXE_9i3I.js +0 -9
- package/assets/X-Bfq5REIM.js +0 -15
- package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +0 -1
- package/assets/__federation_expose_App-c8Vsr-t8.js +0 -1
- package/assets/__federation_shared_@dcl/core-web3/lazy-CB9aN5En.js +0 -2
- package/assets/__federation_shared_@dcl/schemas-DMXTEmDf.js +0 -1
- package/assets/__federation_shared_@emotion/react-Dqhl2Mup.js +0 -1
- package/assets/__federation_shared_react-B3tlNTLg.js +0 -1
- package/assets/__federation_shared_react-dom-CCS4dT_K.js +0 -1
- package/assets/_commonjsHelpers-C4iS2aBk.js +0 -1
- package/assets/emotion-react.browser.esm-C-lDaXQ7.js +0 -8
- package/assets/events-B5inrCVE.js +0 -1
- package/assets/index-BjA_RJ3F.js +0 -2
- package/assets/index-BjzJcZq6.js +0 -1
- package/assets/index-C1IoT2if.js +0 -3
- package/assets/index-CgX6dKUG.js +0 -2
- package/assets/index-DU4RVPgw.js +0 -1
- package/assets/index-Dy0yjznp.js +0 -1
- package/assets/index-IYkCvEK_.js +0 -1
- package/assets/index-Tsk25L8E.js +0 -1
- package/assets/index.es-D5YKsq2-.js +0 -2
- package/assets/index.umd-DK712HHb.js +0 -1
- package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__fileDeps=["assets/add-
|
|
2
|
-
import{u as N,v as q,i as S,r as b,c as E,d as f,x as Y,y as V,f as H,e as X}from"./core-
|
|
1
|
+
const __vite__fileDeps=["assets/add-CrlFk3Q3.js","assets/core-CmzgCi5e.js","assets/preload-helper-5SOR_wM4.js","assets/events-DqOg3rR3.js","assets/contentful-5JGMFnCq.js","assets/index.es-Bjzmmtjk.js","assets/index-nibyPLVP.js","assets/__federation_fn_import-DNtjaGC4.js","assets/index.es-BRoT1QUU.js","assets/all-wallets-Cn4vlXAg.js","assets/arrow-bottom-circle-DTIccLhb.js","assets/app-store-Be5qHevD.js","assets/apple-BLF9iOOU.js","assets/arrow-bottom-DkIzNCmM.js","assets/arrow-left-Dn2O6Yc9.js","assets/arrow-right-BhwoZxOJ.js","assets/arrow-top-CKR018aC.js","assets/bank-C7cxDWGw.js","assets/browser-DJ7_iUnZ.js","assets/card-JDGi0NHR.js","assets/checkmark-CPuFFcJX.js","assets/checkmark-bold-mWhrN4oP.js","assets/chevron-bottom-BiS2oxh-.js","assets/chevron-left-mgiwYveY.js","assets/chevron-right-BBbwfFkV.js","assets/chevron-top-vRyln5TS.js","assets/chrome-store-BMwl9GFC.js","assets/clock-Cyo1NCoz.js","assets/close-DpLs-6ut.js","assets/compass-BZlWuYsQ.js","assets/coinPlaceholder-CMWbyfzw.js","assets/copy-C8XbJm81.js","assets/cursor-DgKI5UfF.js","assets/cursor-transparent-DYc-PvMS.js","assets/desktop-BXu5vjTJ.js","assets/disconnect-BIjCZBSY.js","assets/discord-BHe20Bgu.js","assets/etherscan-CG5vA-W6.js","assets/extension-muflT2fN.js","assets/external-link-DH3pNf93.js","assets/facebook-Dvt8S6HP.js","assets/farcaster-CExK9GF3.js","assets/filters-BjkvScGN.js","assets/github-DIcpmiTD.js","assets/google-Ckbmg2Ga.js","assets/help-circle-s_lVA58g.js","assets/image-DbZ9UUJ_.js","assets/id-DeQgQo7H.js","assets/info-circle-BIW8YsHS.js","assets/lightbulb-D3FjAVfy.js","assets/mail-B-gu_WkI.js","assets/mobile-COjPZ1X2.js","assets/more-Ra8fJn--.js","assets/network-placeholder-DWM9do2v.js","assets/nftPlaceholder-BkuiJ1Fi.js","assets/off-KeVYYonx.js","assets/play-store-Dvga_7y6.js","assets/plus-1d7HZSRm.js","assets/qr-code-DHi3Cbzt.js","assets/recycle-horizontal-f80ctvB9.js","assets/refresh-DCOqM3zJ.js","assets/search-CZQy06by.js","assets/send-D-TwjhV1.js","assets/swapHorizontal-DH1W1UoG.js","assets/swapHorizontalMedium-D6iiMSB9.js","assets/swapHorizontalBold-D8QA6zjc.js","assets/swapHorizontalRoundedBold-CG0CSrfy.js","assets/swapVertical-BVkEaika.js","assets/telegram-BRL2ke_g.js","assets/three-dots-Ce3AHErA.js","assets/twitch-BOhm2e6I.js","assets/x-5st4UAZO.js","assets/twitterIcon-Bi32kZ_p.js","assets/verify-XBYDp8cg.js","assets/verify-filled-DIs-cByX.js","assets/wallet-DhGCzxG1.js","assets/walletconnect-Bo6cSb7c.js","assets/wallet-placeholder-CbhoKZ6M.js","assets/warning-circle-DXO4TTWk.js","assets/info-B83FYyYF.js","assets/exclamation-triangle-GyJq4nAX.js","assets/reown-logo-Bh1MMtyx.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{u as N,v as q,i as S,r as b,c as E,d as f,x as Y,y as V,f as H,e as X}from"./core-CmzgCi5e.js";import{_ as a}from"./preload-helper-5SOR_wM4.js";const w={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:i,truncate:r}){return t.length<=e+i?t:r==="end"?`${t.substring(0,e)}...`:r==="start"?`...${t.substring(t.length-i)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(i))}`},generateAvatarColors(t){const i=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),r=this.hexToRgb(i),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),c=100-3*Number(n?.replace("px","")),s=`${c}% ${c}% at 65% 40%`,u=[];for(let h=0;h<5;h+=1){const p=this.tintColor(r,.15*h);u.push(`rgb(${p[0]}, ${p[1]}, ${p[2]})`)}return`
|
|
3
3
|
--local-color-1: ${u[0]};
|
|
4
4
|
--local-color-2: ${u[1]};
|
|
5
5
|
--local-color-3: ${u[2]};
|
|
@@ -82,7 +82,7 @@ import{u as N,v as q,i as S,r as b,c as E,d as f,x as Y,y as V,f as H,e as X}fro
|
|
|
82
82
|
width: var(--local-width);
|
|
83
83
|
height: var(--local-height);
|
|
84
84
|
}
|
|
85
|
-
`;var A=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(o=(n<3?c(o):n>3?c(e,i,o):c(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const M={add:async()=>(await a(async()=>{const{addSvg:t}=await import("./add-CdrtIhqC.js");return{addSvg:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).addSvg,allWallets:async()=>(await a(async()=>{const{allWalletsSvg:t}=await import("./all-wallets-Cmla8eMe.js");return{allWalletsSvg:t}},__vite__mapDeps([9,1,2,3,4,5,6,7,8]))).allWalletsSvg,arrowBottomCircle:async()=>(await a(async()=>{const{arrowBottomCircleSvg:t}=await import("./arrow-bottom-circle-DzXI01oZ.js");return{arrowBottomCircleSvg:t}},__vite__mapDeps([10,1,2,3,4,5,6,7,8]))).arrowBottomCircleSvg,appStore:async()=>(await a(async()=>{const{appStoreSvg:t}=await import("./app-store-ma7uMa9T.js");return{appStoreSvg:t}},__vite__mapDeps([11,1,2,3,4,5,6,7,8]))).appStoreSvg,apple:async()=>(await a(async()=>{const{appleSvg:t}=await import("./apple-bELCHYbt.js");return{appleSvg:t}},__vite__mapDeps([12,1,2,3,4,5,6,7,8]))).appleSvg,arrowBottom:async()=>(await a(async()=>{const{arrowBottomSvg:t}=await import("./arrow-bottom-DloKu1fV.js");return{arrowBottomSvg:t}},__vite__mapDeps([13,1,2,3,4,5,6,7,8]))).arrowBottomSvg,arrowLeft:async()=>(await a(async()=>{const{arrowLeftSvg:t}=await import("./arrow-left-B55lkgKK.js");return{arrowLeftSvg:t}},__vite__mapDeps([14,1,2,3,4,5,6,7,8]))).arrowLeftSvg,arrowRight:async()=>(await a(async()=>{const{arrowRightSvg:t}=await import("./arrow-right-Bw7eQ4QH.js");return{arrowRightSvg:t}},__vite__mapDeps([15,1,2,3,4,5,6,7,8]))).arrowRightSvg,arrowTop:async()=>(await a(async()=>{const{arrowTopSvg:t}=await import("./arrow-top-Dn6leB_M.js");return{arrowTopSvg:t}},__vite__mapDeps([16,1,2,3,4,5,6,7,8]))).arrowTopSvg,bank:async()=>(await a(async()=>{const{bankSvg:t}=await import("./bank-DH1VVekh.js");return{bankSvg:t}},__vite__mapDeps([17,1,2,3,4,5,6,7,8]))).bankSvg,browser:async()=>(await a(async()=>{const{browserSvg:t}=await import("./browser-Cy2ntZlE.js");return{browserSvg:t}},__vite__mapDeps([18,1,2,3,4,5,6,7,8]))).browserSvg,card:async()=>(await a(async()=>{const{cardSvg:t}=await import("./card-DeDlu8qm.js");return{cardSvg:t}},__vite__mapDeps([19,1,2,3,4,5,6,7,8]))).cardSvg,checkmark:async()=>(await a(async()=>{const{checkmarkSvg:t}=await import("./checkmark-DNVFeB3s.js");return{checkmarkSvg:t}},__vite__mapDeps([20,1,2,3,4,5,6,7,8]))).checkmarkSvg,checkmarkBold:async()=>(await a(async()=>{const{checkmarkBoldSvg:t}=await import("./checkmark-bold-DEcOisss.js");return{checkmarkBoldSvg:t}},__vite__mapDeps([21,1,2,3,4,5,6,7,8]))).checkmarkBoldSvg,chevronBottom:async()=>(await a(async()=>{const{chevronBottomSvg:t}=await import("./chevron-bottom-xDV_oQI6.js");return{chevronBottomSvg:t}},__vite__mapDeps([22,1,2,3,4,5,6,7,8]))).chevronBottomSvg,chevronLeft:async()=>(await a(async()=>{const{chevronLeftSvg:t}=await import("./chevron-left-BYtOhhqm.js");return{chevronLeftSvg:t}},__vite__mapDeps([23,1,2,3,4,5,6,7,8]))).chevronLeftSvg,chevronRight:async()=>(await a(async()=>{const{chevronRightSvg:t}=await import("./chevron-right-CfsnvkD5.js");return{chevronRightSvg:t}},__vite__mapDeps([24,1,2,3,4,5,6,7,8]))).chevronRightSvg,chevronTop:async()=>(await a(async()=>{const{chevronTopSvg:t}=await import("./chevron-top-CONIZzEr.js");return{chevronTopSvg:t}},__vite__mapDeps([25,1,2,3,4,5,6,7,8]))).chevronTopSvg,chromeStore:async()=>(await a(async()=>{const{chromeStoreSvg:t}=await import("./chrome-store-D9VGMy-w.js");return{chromeStoreSvg:t}},__vite__mapDeps([26,1,2,3,4,5,6,7,8]))).chromeStoreSvg,clock:async()=>(await a(async()=>{const{clockSvg:t}=await import("./clock-DRArrlZN.js");return{clockSvg:t}},__vite__mapDeps([27,1,2,3,4,5,6,7,8]))).clockSvg,close:async()=>(await a(async()=>{const{closeSvg:t}=await import("./close-BnL2HnLj.js");return{closeSvg:t}},__vite__mapDeps([28,1,2,3,4,5,6,7,8]))).closeSvg,compass:async()=>(await a(async()=>{const{compassSvg:t}=await import("./compass-CL9Ubv1C.js");return{compassSvg:t}},__vite__mapDeps([29,1,2,3,4,5,6,7,8]))).compassSvg,coinPlaceholder:async()=>(await a(async()=>{const{coinPlaceholderSvg:t}=await import("./coinPlaceholder-DspCsB1d.js");return{coinPlaceholderSvg:t}},__vite__mapDeps([30,1,2,3,4,5,6,7,8]))).coinPlaceholderSvg,copy:async()=>(await a(async()=>{const{copySvg:t}=await import("./copy-DzcJW_6z.js");return{copySvg:t}},__vite__mapDeps([31,1,2,3,4,5,6,7,8]))).copySvg,cursor:async()=>(await a(async()=>{const{cursorSvg:t}=await import("./cursor-VEXLPp4L.js");return{cursorSvg:t}},__vite__mapDeps([32,1,2,3,4,5,6,7,8]))).cursorSvg,cursorTransparent:async()=>(await a(async()=>{const{cursorTransparentSvg:t}=await import("./cursor-transparent-eNYb23WQ.js");return{cursorTransparentSvg:t}},__vite__mapDeps([33,1,2,3,4,5,6,7,8]))).cursorTransparentSvg,desktop:async()=>(await a(async()=>{const{desktopSvg:t}=await import("./desktop-B8dtxVkT.js");return{desktopSvg:t}},__vite__mapDeps([34,1,2,3,4,5,6,7,8]))).desktopSvg,disconnect:async()=>(await a(async()=>{const{disconnectSvg:t}=await import("./disconnect-5l_BrY-g.js");return{disconnectSvg:t}},__vite__mapDeps([35,1,2,3,4,5,6,7,8]))).disconnectSvg,discord:async()=>(await a(async()=>{const{discordSvg:t}=await import("./discord-vPm7sSnB.js");return{discordSvg:t}},__vite__mapDeps([36,1,2,3,4,5,6,7,8]))).discordSvg,etherscan:async()=>(await a(async()=>{const{etherscanSvg:t}=await import("./etherscan-Ck2P6D17.js");return{etherscanSvg:t}},__vite__mapDeps([37,1,2,3,4,5,6,7,8]))).etherscanSvg,extension:async()=>(await a(async()=>{const{extensionSvg:t}=await import("./extension-CtEMnFwe.js");return{extensionSvg:t}},__vite__mapDeps([38,1,2,3,4,5,6,7,8]))).extensionSvg,externalLink:async()=>(await a(async()=>{const{externalLinkSvg:t}=await import("./external-link-B0IDyBri.js");return{externalLinkSvg:t}},__vite__mapDeps([39,1,2,3,4,5,6,7,8]))).externalLinkSvg,facebook:async()=>(await a(async()=>{const{facebookSvg:t}=await import("./facebook-C0UeZpYw.js");return{facebookSvg:t}},__vite__mapDeps([40,1,2,3,4,5,6,7,8]))).facebookSvg,farcaster:async()=>(await a(async()=>{const{farcasterSvg:t}=await import("./farcaster-CYOZFCGP.js");return{farcasterSvg:t}},__vite__mapDeps([41,1,2,3,4,5,6,7,8]))).farcasterSvg,filters:async()=>(await a(async()=>{const{filtersSvg:t}=await import("./filters-NBQeHIU7.js");return{filtersSvg:t}},__vite__mapDeps([42,1,2,3,4,5,6,7,8]))).filtersSvg,github:async()=>(await a(async()=>{const{githubSvg:t}=await import("./github-C4rc0OEq.js");return{githubSvg:t}},__vite__mapDeps([43,1,2,3,4,5,6,7,8]))).githubSvg,google:async()=>(await a(async()=>{const{googleSvg:t}=await import("./google-kXTnc_BR.js");return{googleSvg:t}},__vite__mapDeps([44,1,2,3,4,5,6,7,8]))).googleSvg,helpCircle:async()=>(await a(async()=>{const{helpCircleSvg:t}=await import("./help-circle-Bwzt3B2p.js");return{helpCircleSvg:t}},__vite__mapDeps([45,1,2,3,4,5,6,7,8]))).helpCircleSvg,image:async()=>(await a(async()=>{const{imageSvg:t}=await import("./image-B1eT9feQ.js");return{imageSvg:t}},__vite__mapDeps([46,1,2,3,4,5,6,7,8]))).imageSvg,id:async()=>(await a(async()=>{const{idSvg:t}=await import("./id-zOIHpH1K.js");return{idSvg:t}},__vite__mapDeps([47,1,2,3,4,5,6,7,8]))).idSvg,infoCircle:async()=>(await a(async()=>{const{infoCircleSvg:t}=await import("./info-circle-BSc3Qu0H.js");return{infoCircleSvg:t}},__vite__mapDeps([48,1,2,3,4,5,6,7,8]))).infoCircleSvg,lightbulb:async()=>(await a(async()=>{const{lightbulbSvg:t}=await import("./lightbulb-CtEeQpR-.js");return{lightbulbSvg:t}},__vite__mapDeps([49,1,2,3,4,5,6,7,8]))).lightbulbSvg,mail:async()=>(await a(async()=>{const{mailSvg:t}=await import("./mail-CyEGKrO1.js");return{mailSvg:t}},__vite__mapDeps([50,1,2,3,4,5,6,7,8]))).mailSvg,mobile:async()=>(await a(async()=>{const{mobileSvg:t}=await import("./mobile-va3MMBf-.js");return{mobileSvg:t}},__vite__mapDeps([51,1,2,3,4,5,6,7,8]))).mobileSvg,more:async()=>(await a(async()=>{const{moreSvg:t}=await import("./more-CNKLmFKq.js");return{moreSvg:t}},__vite__mapDeps([52,1,2,3,4,5,6,7,8]))).moreSvg,networkPlaceholder:async()=>(await a(async()=>{const{networkPlaceholderSvg:t}=await import("./network-placeholder-COaPFv9Z.js");return{networkPlaceholderSvg:t}},__vite__mapDeps([53,1,2,3,4,5,6,7,8]))).networkPlaceholderSvg,nftPlaceholder:async()=>(await a(async()=>{const{nftPlaceholderSvg:t}=await import("./nftPlaceholder-CwqKeCBT.js");return{nftPlaceholderSvg:t}},__vite__mapDeps([54,1,2,3,4,5,6,7,8]))).nftPlaceholderSvg,off:async()=>(await a(async()=>{const{offSvg:t}=await import("./off-BXJei5ZC.js");return{offSvg:t}},__vite__mapDeps([55,1,2,3,4,5,6,7,8]))).offSvg,playStore:async()=>(await a(async()=>{const{playStoreSvg:t}=await import("./play-store-DPqFtu_u.js");return{playStoreSvg:t}},__vite__mapDeps([56,1,2,3,4,5,6,7,8]))).playStoreSvg,plus:async()=>(await a(async()=>{const{plusSvg:t}=await import("./plus-BRStu8oq.js");return{plusSvg:t}},__vite__mapDeps([57,1,2,3,4,5,6,7,8]))).plusSvg,qrCode:async()=>(await a(async()=>{const{qrCodeIcon:t}=await import("./qr-code-zVq-PsFR.js");return{qrCodeIcon:t}},__vite__mapDeps([58,1,2,3,4,5,6,7,8]))).qrCodeIcon,recycleHorizontal:async()=>(await a(async()=>{const{recycleHorizontalSvg:t}=await import("./recycle-horizontal-BUcJt7KV.js");return{recycleHorizontalSvg:t}},__vite__mapDeps([59,1,2,3,4,5,6,7,8]))).recycleHorizontalSvg,refresh:async()=>(await a(async()=>{const{refreshSvg:t}=await import("./refresh-DoJwoFWZ.js");return{refreshSvg:t}},__vite__mapDeps([60,1,2,3,4,5,6,7,8]))).refreshSvg,search:async()=>(await a(async()=>{const{searchSvg:t}=await import("./search-qfys2xfh.js");return{searchSvg:t}},__vite__mapDeps([61,1,2,3,4,5,6,7,8]))).searchSvg,send:async()=>(await a(async()=>{const{sendSvg:t}=await import("./send-BNIku3tf.js");return{sendSvg:t}},__vite__mapDeps([62,1,2,3,4,5,6,7,8]))).sendSvg,swapHorizontal:async()=>(await a(async()=>{const{swapHorizontalSvg:t}=await import("./swapHorizontal-D4EMXwCW.js");return{swapHorizontalSvg:t}},__vite__mapDeps([63,1,2,3,4,5,6,7,8]))).swapHorizontalSvg,swapHorizontalMedium:async()=>(await a(async()=>{const{swapHorizontalMediumSvg:t}=await import("./swapHorizontalMedium-BO1_vkWp.js");return{swapHorizontalMediumSvg:t}},__vite__mapDeps([64,1,2,3,4,5,6,7,8]))).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await a(async()=>{const{swapHorizontalBoldSvg:t}=await import("./swapHorizontalBold-DPzDpA5S.js");return{swapHorizontalBoldSvg:t}},__vite__mapDeps([65,1,2,3,4,5,6,7,8]))).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await a(async()=>{const{swapHorizontalRoundedBoldSvg:t}=await import("./swapHorizontalRoundedBold-D5f2zm5T.js");return{swapHorizontalRoundedBoldSvg:t}},__vite__mapDeps([66,1,2,3,4,5,6,7,8]))).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await a(async()=>{const{swapVerticalSvg:t}=await import("./swapVertical-Cl2TRZgu.js");return{swapVerticalSvg:t}},__vite__mapDeps([67,1,2,3,4,5,6,7,8]))).swapVerticalSvg,telegram:async()=>(await a(async()=>{const{telegramSvg:t}=await import("./telegram-COuwS3-1.js");return{telegramSvg:t}},__vite__mapDeps([68,1,2,3,4,5,6,7,8]))).telegramSvg,threeDots:async()=>(await a(async()=>{const{threeDotsSvg:t}=await import("./three-dots-DaJ9Yk_z.js");return{threeDotsSvg:t}},__vite__mapDeps([69,1,2,3,4,5,6,7,8]))).threeDotsSvg,twitch:async()=>(await a(async()=>{const{twitchSvg:t}=await import("./twitch-ChHlcjtL.js");return{twitchSvg:t}},__vite__mapDeps([70,1,2,3,4,5,6,7,8]))).twitchSvg,twitter:async()=>(await a(async()=>{const{xSvg:t}=await import("./x-dxs8B49F.js");return{xSvg:t}},__vite__mapDeps([71,1,2,3,4,5,6,7,8]))).xSvg,twitterIcon:async()=>(await a(async()=>{const{twitterIconSvg:t}=await import("./twitterIcon-BHaGUsBd.js");return{twitterIconSvg:t}},__vite__mapDeps([72,1,2,3,4,5,6,7,8]))).twitterIconSvg,verify:async()=>(await a(async()=>{const{verifySvg:t}=await import("./verify-BJHlq4Cl.js");return{verifySvg:t}},__vite__mapDeps([73,1,2,3,4,5,6,7,8]))).verifySvg,verifyFilled:async()=>(await a(async()=>{const{verifyFilledSvg:t}=await import("./verify-filled-CUQ_cX7L.js");return{verifyFilledSvg:t}},__vite__mapDeps([74,1,2,3,4,5,6,7,8]))).verifyFilledSvg,wallet:async()=>(await a(async()=>{const{walletSvg:t}=await import("./wallet-Bqa5aoUK.js");return{walletSvg:t}},__vite__mapDeps([75,1,2,3,4,5,6,7,8]))).walletSvg,walletConnect:async()=>(await a(async()=>{const{walletConnectSvg:t}=await import("./walletconnect-DgD3JeRt.js");return{walletConnectSvg:t}},__vite__mapDeps([76,1,2,3,4,5,6,7,8]))).walletConnectSvg,walletConnectLightBrown:async()=>(await a(async()=>{const{walletConnectLightBrownSvg:t}=await import("./walletconnect-DgD3JeRt.js");return{walletConnectLightBrownSvg:t}},__vite__mapDeps([76,1,2,3,4,5,6,7,8]))).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await a(async()=>{const{walletConnectBrownSvg:t}=await import("./walletconnect-DgD3JeRt.js");return{walletConnectBrownSvg:t}},__vite__mapDeps([76,1,2,3,4,5,6,7,8]))).walletConnectBrownSvg,walletPlaceholder:async()=>(await a(async()=>{const{walletPlaceholderSvg:t}=await import("./wallet-placeholder-ZqWJAmHm.js");return{walletPlaceholderSvg:t}},__vite__mapDeps([77,1,2,3,4,5,6,7,8]))).walletPlaceholderSvg,warningCircle:async()=>(await a(async()=>{const{warningCircleSvg:t}=await import("./warning-circle-C-GR2K3_.js");return{warningCircleSvg:t}},__vite__mapDeps([78,1,2,3,4,5,6,7,8]))).warningCircleSvg,x:async()=>(await a(async()=>{const{xSvg:t}=await import("./x-dxs8B49F.js");return{xSvg:t}},__vite__mapDeps([71,1,2,3,4,5,6,7,8]))).xSvg,info:async()=>(await a(async()=>{const{infoSvg:t}=await import("./info-fCoUT5OA.js");return{infoSvg:t}},__vite__mapDeps([79,1,2,3,4,5,6,7,8]))).infoSvg,exclamationTriangle:async()=>(await a(async()=>{const{exclamationTriangleSvg:t}=await import("./exclamation-triangle-DfbN77Lf.js");return{exclamationTriangleSvg:t}},__vite__mapDeps([80,1,2,3,4,5,6,7,8]))).exclamationTriangleSvg,reown:async()=>(await a(async()=>{const{reownSvg:t}=await import("./reown-logo-VGJ4-w32.js");return{reownSvg:t}},__vite__mapDeps([81,1,2,3,4,5,6,7,8]))).reownSvg};async function gt(t){if(D.has(t))return D.get(t);const i=(M[t]??M.copy)();return D.set(t,i),i}let m=class extends E{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=`
|
|
85
|
+
`;var A=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(o=(n<3?c(o):n>3?c(e,i,o):c(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const M={add:async()=>(await a(async()=>{const{addSvg:t}=await import("./add-CrlFk3Q3.js");return{addSvg:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).addSvg,allWallets:async()=>(await a(async()=>{const{allWalletsSvg:t}=await import("./all-wallets-Cn4vlXAg.js");return{allWalletsSvg:t}},__vite__mapDeps([9,1,2,3,4,5,6,7,8]))).allWalletsSvg,arrowBottomCircle:async()=>(await a(async()=>{const{arrowBottomCircleSvg:t}=await import("./arrow-bottom-circle-DTIccLhb.js");return{arrowBottomCircleSvg:t}},__vite__mapDeps([10,1,2,3,4,5,6,7,8]))).arrowBottomCircleSvg,appStore:async()=>(await a(async()=>{const{appStoreSvg:t}=await import("./app-store-Be5qHevD.js");return{appStoreSvg:t}},__vite__mapDeps([11,1,2,3,4,5,6,7,8]))).appStoreSvg,apple:async()=>(await a(async()=>{const{appleSvg:t}=await import("./apple-BLF9iOOU.js");return{appleSvg:t}},__vite__mapDeps([12,1,2,3,4,5,6,7,8]))).appleSvg,arrowBottom:async()=>(await a(async()=>{const{arrowBottomSvg:t}=await import("./arrow-bottom-DkIzNCmM.js");return{arrowBottomSvg:t}},__vite__mapDeps([13,1,2,3,4,5,6,7,8]))).arrowBottomSvg,arrowLeft:async()=>(await a(async()=>{const{arrowLeftSvg:t}=await import("./arrow-left-Dn2O6Yc9.js");return{arrowLeftSvg:t}},__vite__mapDeps([14,1,2,3,4,5,6,7,8]))).arrowLeftSvg,arrowRight:async()=>(await a(async()=>{const{arrowRightSvg:t}=await import("./arrow-right-BhwoZxOJ.js");return{arrowRightSvg:t}},__vite__mapDeps([15,1,2,3,4,5,6,7,8]))).arrowRightSvg,arrowTop:async()=>(await a(async()=>{const{arrowTopSvg:t}=await import("./arrow-top-CKR018aC.js");return{arrowTopSvg:t}},__vite__mapDeps([16,1,2,3,4,5,6,7,8]))).arrowTopSvg,bank:async()=>(await a(async()=>{const{bankSvg:t}=await import("./bank-C7cxDWGw.js");return{bankSvg:t}},__vite__mapDeps([17,1,2,3,4,5,6,7,8]))).bankSvg,browser:async()=>(await a(async()=>{const{browserSvg:t}=await import("./browser-DJ7_iUnZ.js");return{browserSvg:t}},__vite__mapDeps([18,1,2,3,4,5,6,7,8]))).browserSvg,card:async()=>(await a(async()=>{const{cardSvg:t}=await import("./card-JDGi0NHR.js");return{cardSvg:t}},__vite__mapDeps([19,1,2,3,4,5,6,7,8]))).cardSvg,checkmark:async()=>(await a(async()=>{const{checkmarkSvg:t}=await import("./checkmark-CPuFFcJX.js");return{checkmarkSvg:t}},__vite__mapDeps([20,1,2,3,4,5,6,7,8]))).checkmarkSvg,checkmarkBold:async()=>(await a(async()=>{const{checkmarkBoldSvg:t}=await import("./checkmark-bold-mWhrN4oP.js");return{checkmarkBoldSvg:t}},__vite__mapDeps([21,1,2,3,4,5,6,7,8]))).checkmarkBoldSvg,chevronBottom:async()=>(await a(async()=>{const{chevronBottomSvg:t}=await import("./chevron-bottom-BiS2oxh-.js");return{chevronBottomSvg:t}},__vite__mapDeps([22,1,2,3,4,5,6,7,8]))).chevronBottomSvg,chevronLeft:async()=>(await a(async()=>{const{chevronLeftSvg:t}=await import("./chevron-left-mgiwYveY.js");return{chevronLeftSvg:t}},__vite__mapDeps([23,1,2,3,4,5,6,7,8]))).chevronLeftSvg,chevronRight:async()=>(await a(async()=>{const{chevronRightSvg:t}=await import("./chevron-right-BBbwfFkV.js");return{chevronRightSvg:t}},__vite__mapDeps([24,1,2,3,4,5,6,7,8]))).chevronRightSvg,chevronTop:async()=>(await a(async()=>{const{chevronTopSvg:t}=await import("./chevron-top-vRyln5TS.js");return{chevronTopSvg:t}},__vite__mapDeps([25,1,2,3,4,5,6,7,8]))).chevronTopSvg,chromeStore:async()=>(await a(async()=>{const{chromeStoreSvg:t}=await import("./chrome-store-BMwl9GFC.js");return{chromeStoreSvg:t}},__vite__mapDeps([26,1,2,3,4,5,6,7,8]))).chromeStoreSvg,clock:async()=>(await a(async()=>{const{clockSvg:t}=await import("./clock-Cyo1NCoz.js");return{clockSvg:t}},__vite__mapDeps([27,1,2,3,4,5,6,7,8]))).clockSvg,close:async()=>(await a(async()=>{const{closeSvg:t}=await import("./close-DpLs-6ut.js");return{closeSvg:t}},__vite__mapDeps([28,1,2,3,4,5,6,7,8]))).closeSvg,compass:async()=>(await a(async()=>{const{compassSvg:t}=await import("./compass-BZlWuYsQ.js");return{compassSvg:t}},__vite__mapDeps([29,1,2,3,4,5,6,7,8]))).compassSvg,coinPlaceholder:async()=>(await a(async()=>{const{coinPlaceholderSvg:t}=await import("./coinPlaceholder-CMWbyfzw.js");return{coinPlaceholderSvg:t}},__vite__mapDeps([30,1,2,3,4,5,6,7,8]))).coinPlaceholderSvg,copy:async()=>(await a(async()=>{const{copySvg:t}=await import("./copy-C8XbJm81.js");return{copySvg:t}},__vite__mapDeps([31,1,2,3,4,5,6,7,8]))).copySvg,cursor:async()=>(await a(async()=>{const{cursorSvg:t}=await import("./cursor-DgKI5UfF.js");return{cursorSvg:t}},__vite__mapDeps([32,1,2,3,4,5,6,7,8]))).cursorSvg,cursorTransparent:async()=>(await a(async()=>{const{cursorTransparentSvg:t}=await import("./cursor-transparent-DYc-PvMS.js");return{cursorTransparentSvg:t}},__vite__mapDeps([33,1,2,3,4,5,6,7,8]))).cursorTransparentSvg,desktop:async()=>(await a(async()=>{const{desktopSvg:t}=await import("./desktop-BXu5vjTJ.js");return{desktopSvg:t}},__vite__mapDeps([34,1,2,3,4,5,6,7,8]))).desktopSvg,disconnect:async()=>(await a(async()=>{const{disconnectSvg:t}=await import("./disconnect-BIjCZBSY.js");return{disconnectSvg:t}},__vite__mapDeps([35,1,2,3,4,5,6,7,8]))).disconnectSvg,discord:async()=>(await a(async()=>{const{discordSvg:t}=await import("./discord-BHe20Bgu.js");return{discordSvg:t}},__vite__mapDeps([36,1,2,3,4,5,6,7,8]))).discordSvg,etherscan:async()=>(await a(async()=>{const{etherscanSvg:t}=await import("./etherscan-CG5vA-W6.js");return{etherscanSvg:t}},__vite__mapDeps([37,1,2,3,4,5,6,7,8]))).etherscanSvg,extension:async()=>(await a(async()=>{const{extensionSvg:t}=await import("./extension-muflT2fN.js");return{extensionSvg:t}},__vite__mapDeps([38,1,2,3,4,5,6,7,8]))).extensionSvg,externalLink:async()=>(await a(async()=>{const{externalLinkSvg:t}=await import("./external-link-DH3pNf93.js");return{externalLinkSvg:t}},__vite__mapDeps([39,1,2,3,4,5,6,7,8]))).externalLinkSvg,facebook:async()=>(await a(async()=>{const{facebookSvg:t}=await import("./facebook-Dvt8S6HP.js");return{facebookSvg:t}},__vite__mapDeps([40,1,2,3,4,5,6,7,8]))).facebookSvg,farcaster:async()=>(await a(async()=>{const{farcasterSvg:t}=await import("./farcaster-CExK9GF3.js");return{farcasterSvg:t}},__vite__mapDeps([41,1,2,3,4,5,6,7,8]))).farcasterSvg,filters:async()=>(await a(async()=>{const{filtersSvg:t}=await import("./filters-BjkvScGN.js");return{filtersSvg:t}},__vite__mapDeps([42,1,2,3,4,5,6,7,8]))).filtersSvg,github:async()=>(await a(async()=>{const{githubSvg:t}=await import("./github-DIcpmiTD.js");return{githubSvg:t}},__vite__mapDeps([43,1,2,3,4,5,6,7,8]))).githubSvg,google:async()=>(await a(async()=>{const{googleSvg:t}=await import("./google-Ckbmg2Ga.js");return{googleSvg:t}},__vite__mapDeps([44,1,2,3,4,5,6,7,8]))).googleSvg,helpCircle:async()=>(await a(async()=>{const{helpCircleSvg:t}=await import("./help-circle-s_lVA58g.js");return{helpCircleSvg:t}},__vite__mapDeps([45,1,2,3,4,5,6,7,8]))).helpCircleSvg,image:async()=>(await a(async()=>{const{imageSvg:t}=await import("./image-DbZ9UUJ_.js");return{imageSvg:t}},__vite__mapDeps([46,1,2,3,4,5,6,7,8]))).imageSvg,id:async()=>(await a(async()=>{const{idSvg:t}=await import("./id-DeQgQo7H.js");return{idSvg:t}},__vite__mapDeps([47,1,2,3,4,5,6,7,8]))).idSvg,infoCircle:async()=>(await a(async()=>{const{infoCircleSvg:t}=await import("./info-circle-BIW8YsHS.js");return{infoCircleSvg:t}},__vite__mapDeps([48,1,2,3,4,5,6,7,8]))).infoCircleSvg,lightbulb:async()=>(await a(async()=>{const{lightbulbSvg:t}=await import("./lightbulb-D3FjAVfy.js");return{lightbulbSvg:t}},__vite__mapDeps([49,1,2,3,4,5,6,7,8]))).lightbulbSvg,mail:async()=>(await a(async()=>{const{mailSvg:t}=await import("./mail-B-gu_WkI.js");return{mailSvg:t}},__vite__mapDeps([50,1,2,3,4,5,6,7,8]))).mailSvg,mobile:async()=>(await a(async()=>{const{mobileSvg:t}=await import("./mobile-COjPZ1X2.js");return{mobileSvg:t}},__vite__mapDeps([51,1,2,3,4,5,6,7,8]))).mobileSvg,more:async()=>(await a(async()=>{const{moreSvg:t}=await import("./more-Ra8fJn--.js");return{moreSvg:t}},__vite__mapDeps([52,1,2,3,4,5,6,7,8]))).moreSvg,networkPlaceholder:async()=>(await a(async()=>{const{networkPlaceholderSvg:t}=await import("./network-placeholder-DWM9do2v.js");return{networkPlaceholderSvg:t}},__vite__mapDeps([53,1,2,3,4,5,6,7,8]))).networkPlaceholderSvg,nftPlaceholder:async()=>(await a(async()=>{const{nftPlaceholderSvg:t}=await import("./nftPlaceholder-BkuiJ1Fi.js");return{nftPlaceholderSvg:t}},__vite__mapDeps([54,1,2,3,4,5,6,7,8]))).nftPlaceholderSvg,off:async()=>(await a(async()=>{const{offSvg:t}=await import("./off-KeVYYonx.js");return{offSvg:t}},__vite__mapDeps([55,1,2,3,4,5,6,7,8]))).offSvg,playStore:async()=>(await a(async()=>{const{playStoreSvg:t}=await import("./play-store-Dvga_7y6.js");return{playStoreSvg:t}},__vite__mapDeps([56,1,2,3,4,5,6,7,8]))).playStoreSvg,plus:async()=>(await a(async()=>{const{plusSvg:t}=await import("./plus-1d7HZSRm.js");return{plusSvg:t}},__vite__mapDeps([57,1,2,3,4,5,6,7,8]))).plusSvg,qrCode:async()=>(await a(async()=>{const{qrCodeIcon:t}=await import("./qr-code-DHi3Cbzt.js");return{qrCodeIcon:t}},__vite__mapDeps([58,1,2,3,4,5,6,7,8]))).qrCodeIcon,recycleHorizontal:async()=>(await a(async()=>{const{recycleHorizontalSvg:t}=await import("./recycle-horizontal-f80ctvB9.js");return{recycleHorizontalSvg:t}},__vite__mapDeps([59,1,2,3,4,5,6,7,8]))).recycleHorizontalSvg,refresh:async()=>(await a(async()=>{const{refreshSvg:t}=await import("./refresh-DCOqM3zJ.js");return{refreshSvg:t}},__vite__mapDeps([60,1,2,3,4,5,6,7,8]))).refreshSvg,search:async()=>(await a(async()=>{const{searchSvg:t}=await import("./search-CZQy06by.js");return{searchSvg:t}},__vite__mapDeps([61,1,2,3,4,5,6,7,8]))).searchSvg,send:async()=>(await a(async()=>{const{sendSvg:t}=await import("./send-D-TwjhV1.js");return{sendSvg:t}},__vite__mapDeps([62,1,2,3,4,5,6,7,8]))).sendSvg,swapHorizontal:async()=>(await a(async()=>{const{swapHorizontalSvg:t}=await import("./swapHorizontal-DH1W1UoG.js");return{swapHorizontalSvg:t}},__vite__mapDeps([63,1,2,3,4,5,6,7,8]))).swapHorizontalSvg,swapHorizontalMedium:async()=>(await a(async()=>{const{swapHorizontalMediumSvg:t}=await import("./swapHorizontalMedium-D6iiMSB9.js");return{swapHorizontalMediumSvg:t}},__vite__mapDeps([64,1,2,3,4,5,6,7,8]))).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await a(async()=>{const{swapHorizontalBoldSvg:t}=await import("./swapHorizontalBold-D8QA6zjc.js");return{swapHorizontalBoldSvg:t}},__vite__mapDeps([65,1,2,3,4,5,6,7,8]))).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await a(async()=>{const{swapHorizontalRoundedBoldSvg:t}=await import("./swapHorizontalRoundedBold-CG0CSrfy.js");return{swapHorizontalRoundedBoldSvg:t}},__vite__mapDeps([66,1,2,3,4,5,6,7,8]))).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await a(async()=>{const{swapVerticalSvg:t}=await import("./swapVertical-BVkEaika.js");return{swapVerticalSvg:t}},__vite__mapDeps([67,1,2,3,4,5,6,7,8]))).swapVerticalSvg,telegram:async()=>(await a(async()=>{const{telegramSvg:t}=await import("./telegram-BRL2ke_g.js");return{telegramSvg:t}},__vite__mapDeps([68,1,2,3,4,5,6,7,8]))).telegramSvg,threeDots:async()=>(await a(async()=>{const{threeDotsSvg:t}=await import("./three-dots-Ce3AHErA.js");return{threeDotsSvg:t}},__vite__mapDeps([69,1,2,3,4,5,6,7,8]))).threeDotsSvg,twitch:async()=>(await a(async()=>{const{twitchSvg:t}=await import("./twitch-BOhm2e6I.js");return{twitchSvg:t}},__vite__mapDeps([70,1,2,3,4,5,6,7,8]))).twitchSvg,twitter:async()=>(await a(async()=>{const{xSvg:t}=await import("./x-5st4UAZO.js");return{xSvg:t}},__vite__mapDeps([71,1,2,3,4,5,6,7,8]))).xSvg,twitterIcon:async()=>(await a(async()=>{const{twitterIconSvg:t}=await import("./twitterIcon-Bi32kZ_p.js");return{twitterIconSvg:t}},__vite__mapDeps([72,1,2,3,4,5,6,7,8]))).twitterIconSvg,verify:async()=>(await a(async()=>{const{verifySvg:t}=await import("./verify-XBYDp8cg.js");return{verifySvg:t}},__vite__mapDeps([73,1,2,3,4,5,6,7,8]))).verifySvg,verifyFilled:async()=>(await a(async()=>{const{verifyFilledSvg:t}=await import("./verify-filled-DIs-cByX.js");return{verifyFilledSvg:t}},__vite__mapDeps([74,1,2,3,4,5,6,7,8]))).verifyFilledSvg,wallet:async()=>(await a(async()=>{const{walletSvg:t}=await import("./wallet-DhGCzxG1.js");return{walletSvg:t}},__vite__mapDeps([75,1,2,3,4,5,6,7,8]))).walletSvg,walletConnect:async()=>(await a(async()=>{const{walletConnectSvg:t}=await import("./walletconnect-Bo6cSb7c.js");return{walletConnectSvg:t}},__vite__mapDeps([76,1,2,3,4,5,6,7,8]))).walletConnectSvg,walletConnectLightBrown:async()=>(await a(async()=>{const{walletConnectLightBrownSvg:t}=await import("./walletconnect-Bo6cSb7c.js");return{walletConnectLightBrownSvg:t}},__vite__mapDeps([76,1,2,3,4,5,6,7,8]))).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await a(async()=>{const{walletConnectBrownSvg:t}=await import("./walletconnect-Bo6cSb7c.js");return{walletConnectBrownSvg:t}},__vite__mapDeps([76,1,2,3,4,5,6,7,8]))).walletConnectBrownSvg,walletPlaceholder:async()=>(await a(async()=>{const{walletPlaceholderSvg:t}=await import("./wallet-placeholder-CbhoKZ6M.js");return{walletPlaceholderSvg:t}},__vite__mapDeps([77,1,2,3,4,5,6,7,8]))).walletPlaceholderSvg,warningCircle:async()=>(await a(async()=>{const{warningCircleSvg:t}=await import("./warning-circle-DXO4TTWk.js");return{warningCircleSvg:t}},__vite__mapDeps([78,1,2,3,4,5,6,7,8]))).warningCircleSvg,x:async()=>(await a(async()=>{const{xSvg:t}=await import("./x-5st4UAZO.js");return{xSvg:t}},__vite__mapDeps([71,1,2,3,4,5,6,7,8]))).xSvg,info:async()=>(await a(async()=>{const{infoSvg:t}=await import("./info-B83FYyYF.js");return{infoSvg:t}},__vite__mapDeps([79,1,2,3,4,5,6,7,8]))).infoSvg,exclamationTriangle:async()=>(await a(async()=>{const{exclamationTriangleSvg:t}=await import("./exclamation-triangle-GyJq4nAX.js");return{exclamationTriangleSvg:t}},__vite__mapDeps([80,1,2,3,4,5,6,7,8]))).exclamationTriangleSvg,reown:async()=>(await a(async()=>{const{reownSvg:t}=await import("./reown-logo-Bh1MMtyx.js");return{reownSvg:t}},__vite__mapDeps([81,1,2,3,4,5,6,7,8]))).reownSvg};async function gt(t){if(D.has(t))return D.get(t);const i=(M[t]??M.copy)();return D.set(t,i),i}let m=class extends E{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=`
|
|
86
86
|
--local-color: ${`var(--wui-color-${this.color});`}
|
|
87
87
|
--local-width: ${`var(--wui-icon-size-${this.size});`}
|
|
88
88
|
--local-aspect-ratio: ${this.aspectRatio}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var oe={},M={};(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"BLOCKS",{enumerable:!0,get:function(){return E}});var E=function(e){return e.DOCUMENT="document",e.PARAGRAPH="paragraph",e.HEADING_1="heading-1",e.HEADING_2="heading-2",e.HEADING_3="heading-3",e.HEADING_4="heading-4",e.HEADING_5="heading-5",e.HEADING_6="heading-6",e.OL_LIST="ordered-list",e.UL_LIST="unordered-list",e.LIST_ITEM="list-item",e.HR="hr",e.QUOTE="blockquote",e.EMBEDDED_ENTRY="embedded-entry-block",e.EMBEDDED_ASSET="embedded-asset-block",e.EMBEDDED_RESOURCE="embedded-resource-block",e.TABLE="table",e.TABLE_ROW="table-row",e.TABLE_CELL="table-cell",e.TABLE_HEADER_CELL="table-header-cell",e}({})})(M);var H={};(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"INLINES",{enumerable:!0,get:function(){return E}});var E=function(e){return e.ASSET_HYPERLINK="asset-hyperlink",e.EMBEDDED_ENTRY="embedded-entry-inline",e.EMBEDDED_RESOURCE="embedded-resource-inline",e.ENTRY_HYPERLINK="entry-hyperlink",e.HYPERLINK="hyperlink",e.RESOURCE_HYPERLINK="resource-hyperlink",e}({})})(H);var Y={};(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"MARKS",{enumerable:!0,get:function(){return E}});var E=function(e){return e.BOLD="bold",e.ITALIC="italic",e.UNDERLINE="underline",e.CODE="code",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.STRIKETHROUGH="strikethrough",e}({})})(Y);var V={};(function(h){Object.defineProperty(h,"__esModule",{value:!0});function E(f,u){for(var O in u)Object.defineProperty(f,O,{enumerable:!0,get:Object.getOwnPropertyDescriptor(u,O).get})}E(h,{get CONTAINERS(){return t},get HEADINGS(){return r},get LIST_ITEM_BLOCKS(){return A},get TABLE_BLOCKS(){return s},get TEXT_CONTAINERS(){return _},get TOP_LEVEL_BLOCKS(){return b},get V1_MARKS(){return d},get V1_NODE_TYPES(){return c},get VOID_BLOCKS(){return n}});var e=M,m=H,g=Y;function y(f,u){(u==null||u>f.length)&&(u=f.length);for(var O=0,S=new Array(u);O<u;O++)S[O]=f[O];return S}function D(f){if(Array.isArray(f))return y(f)}function C(f,u,O){return u in f?Object.defineProperty(f,u,{value:O,enumerable:!0,configurable:!0,writable:!0}):f[u]=O,f}function L(f){if(typeof Symbol<"u"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f)}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(f){return D(f)||L(f)||p(f)||I()}function p(f,u){if(f){if(typeof f=="string")return y(f,u);var O=Object.prototype.toString.call(f).slice(8,-1);if(O==="Object"&&f.constructor&&(O=f.constructor.name),O==="Map"||O==="Set")return Array.from(O);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return y(f,u)}}var b=[e.BLOCKS.PARAGRAPH,e.BLOCKS.HEADING_1,e.BLOCKS.HEADING_2,e.BLOCKS.HEADING_3,e.BLOCKS.HEADING_4,e.BLOCKS.HEADING_5,e.BLOCKS.HEADING_6,e.BLOCKS.OL_LIST,e.BLOCKS.UL_LIST,e.BLOCKS.HR,e.BLOCKS.QUOTE,e.BLOCKS.EMBEDDED_ENTRY,e.BLOCKS.EMBEDDED_ASSET,e.BLOCKS.EMBEDDED_RESOURCE,e.BLOCKS.TABLE],A=[e.BLOCKS.PARAGRAPH,e.BLOCKS.HEADING_1,e.BLOCKS.HEADING_2,e.BLOCKS.HEADING_3,e.BLOCKS.HEADING_4,e.BLOCKS.HEADING_5,e.BLOCKS.HEADING_6,e.BLOCKS.OL_LIST,e.BLOCKS.UL_LIST,e.BLOCKS.HR,e.BLOCKS.QUOTE,e.BLOCKS.EMBEDDED_ENTRY,e.BLOCKS.EMBEDDED_ASSET,e.BLOCKS.EMBEDDED_RESOURCE],s=[e.BLOCKS.TABLE,e.BLOCKS.TABLE_ROW,e.BLOCKS.TABLE_CELL,e.BLOCKS.TABLE_HEADER_CELL],n=[e.BLOCKS.HR,e.BLOCKS.EMBEDDED_ENTRY,e.BLOCKS.EMBEDDED_ASSET,e.BLOCKS.EMBEDDED_RESOURCE],o,t=(o={},C(o,e.BLOCKS.OL_LIST,[e.BLOCKS.LIST_ITEM]),C(o,e.BLOCKS.UL_LIST,[e.BLOCKS.LIST_ITEM]),C(o,e.BLOCKS.LIST_ITEM,A),C(o,e.BLOCKS.QUOTE,[e.BLOCKS.PARAGRAPH]),C(o,e.BLOCKS.TABLE,[e.BLOCKS.TABLE_ROW]),C(o,e.BLOCKS.TABLE_ROW,[e.BLOCKS.TABLE_CELL,e.BLOCKS.TABLE_HEADER_CELL]),C(o,e.BLOCKS.TABLE_CELL,[e.BLOCKS.PARAGRAPH,e.BLOCKS.UL_LIST,e.BLOCKS.OL_LIST]),C(o,e.BLOCKS.TABLE_HEADER_CELL,[e.BLOCKS.PARAGRAPH]),o),r=[e.BLOCKS.HEADING_1,e.BLOCKS.HEADING_2,e.BLOCKS.HEADING_3,e.BLOCKS.HEADING_4,e.BLOCKS.HEADING_5,e.BLOCKS.HEADING_6],_=[e.BLOCKS.PARAGRAPH].concat(a(r)),c=[e.BLOCKS.DOCUMENT,e.BLOCKS.PARAGRAPH,e.BLOCKS.HEADING_1,e.BLOCKS.HEADING_2,e.BLOCKS.HEADING_3,e.BLOCKS.HEADING_4,e.BLOCKS.HEADING_5,e.BLOCKS.HEADING_6,e.BLOCKS.OL_LIST,e.BLOCKS.UL_LIST,e.BLOCKS.LIST_ITEM,e.BLOCKS.HR,e.BLOCKS.QUOTE,e.BLOCKS.EMBEDDED_ENTRY,e.BLOCKS.EMBEDDED_ASSET,m.INLINES.HYPERLINK,m.INLINES.ENTRY_HYPERLINK,m.INLINES.ASSET_HYPERLINK,m.INLINES.EMBEDDED_ENTRY,"text"],d=[g.MARKS.BOLD,g.MARKS.CODE,g.MARKS.ITALIC,g.MARKS.UNDERLINE]})(V);var W={};Object.defineProperty(W,"__esModule",{value:!0});var q={};Object.defineProperty(q,"__esModule",{value:!0});var Q={};(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"EMPTY_DOCUMENT",{enumerable:!0,get:function(){return e}});var E=M,e={nodeType:E.BLOCKS.DOCUMENT,data:{},content:[{nodeType:E.BLOCKS.PARAGRAPH,data:{},content:[{nodeType:"text",value:"",marks:[],data:{}}]}]}})(Q);var F={};(function(h){Object.defineProperty(h,"__esModule",{value:!0});function E(t,r){for(var _ in r)Object.defineProperty(t,_,{enumerable:!0,get:Object.getOwnPropertyDescriptor(r,_).get})}E(h,{get isBlock(){return p},get isEmptyParagraph(){return A},get isInline(){return a},get isText(){return b},get stripEmptyTrailingParagraphFromDocument(){return o}});var e=M,m=H;function g(t,r,_){return r in t?Object.defineProperty(t,r,{value:_,enumerable:!0,configurable:!0,writable:!0}):t[r]=_,t}function y(t){for(var r=1;r<arguments.length;r++){var _=arguments[r]!=null?arguments[r]:{},c=Object.keys(_);typeof Object.getOwnPropertySymbols=="function"&&(c=c.concat(Object.getOwnPropertySymbols(_).filter(function(d){return Object.getOwnPropertyDescriptor(_,d).enumerable}))),c.forEach(function(d){g(t,d,_[d])})}return t}function D(t,r){var _=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);_.push.apply(_,c)}return _}function C(t,r){return r=r??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(_){Object.defineProperty(t,_,Object.getOwnPropertyDescriptor(r,_))}),t}function L(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function I(t,r){var _=!0,c=!1,d=void 0;try{for(var f=Object.keys(t)[Symbol.iterator](),u;!(_=(u=f.next()).done);_=!0){var O=u.value;if(r===t[O])return!0}}catch(S){c=!0,d=S}finally{try{!_&&f.return!=null&&f.return()}finally{if(c)throw d}}return!1}function a(t){return I(m.INLINES,t.nodeType)}function p(t){return I(e.BLOCKS,t.nodeType)}function b(t){return t.nodeType==="text"}function A(t){if(t.nodeType!==e.BLOCKS.PARAGRAPH||t.content.length!==1)return!1;var r=t.content[0];return r.nodeType==="text"&&r.value===""}function s(t){return t!=null&&(typeof t>"u"?"undefined":L(t))==="object"&&"content"in t&&Array.isArray(t.content)}var n=2;function o(t){if(!s(t)||t.content.length<n)return t;var r=t.content[t.content.length-1];return A(r)?C(y({},t),{content:t.content.slice(0,-1)}):t}})(F);var X={},U={},ae=h=>{if(Object.prototype.toString.call(h)!=="[object Object]")return!1;const E=Object.getPrototypeOf(h);return E===null||E===Object.prototype},J={};(function(h){Object.defineProperty(h,"__esModule",{value:!0});function E(s,n){for(var o in n)Object.defineProperty(s,o,{enumerable:!0,get:Object.getOwnPropertyDescriptor(n,o).get})}E(h,{get enumError(){return p},get maxSizeError(){return a},get minSizeError(){return I},get requiredPropertyError(){return A},get typeMismatchError(){return L},get unknownPropertyError(){return b}});function e(s,n){(n==null||n>s.length)&&(n=s.length);for(var o=0,t=new Array(n);o<n;o++)t[o]=s[o];return t}function m(s){if(Array.isArray(s))return e(s)}function g(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(s){return m(s)||g(s)||C(s)||y()}function C(s,n){if(s){if(typeof s=="string")return e(s,n);var o=Object.prototype.toString.call(s).slice(8,-1);if(o==="Object"&&s.constructor&&(o=s.constructor.name),o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return e(s,n)}}var L=function(s){var n=s.path,o=s.property,t=s.typeName,r=s.value;return{details:'The type of "'.concat(o,'" is incorrect, expected type: ').concat(t),name:"type",path:n.toArray(),type:t,value:r}},I=function(s){var n=s.min,o=s.value,t=s.path;return{name:"size",min:n,path:t.toArray(),details:"Size must be at least ".concat(n),value:o}},a=function(s){var n=s.max,o=s.value,t=s.path;return{name:"size",max:n,path:t.toArray(),details:"Size must be at most ".concat(n),value:o}},p=function(s){var n=s.expected,o=s.value,t=s.path;return{details:"Value must be one of expected values",name:"in",expected:D(n).sort(),path:t.toArray(),value:o}},b=function(s){var n=s.property,o=s.path;return{details:'The property "'.concat(n,'" is not expected'),name:"unexpected",path:o.toArray()}},A=function(s){var n=s.property,o=s.path;return{details:'The property "'.concat(n,'" is required here'),name:"required",path:o.toArray()}}})(J);(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"ObjectAssertion",{enumerable:!0,get:function(){return s}});var E=I(ae),e=J;function m(n,o){(o==null||o>n.length)&&(o=n.length);for(var t=0,r=new Array(o);t<o;t++)r[t]=n[t];return r}function g(n){if(Array.isArray(n))return m(n)}function y(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function D(n,o){for(var t=0;t<o.length;t++){var r=o[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function C(n,o,t){return o&&D(n.prototype,o),n}function L(n,o,t){return o in n?Object.defineProperty(n,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[o]=t,n}function I(n){return n&&n.__esModule?n:{default:n}}function a(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(n){return g(n)||a(n)||A(n)||p()}function A(n,o){if(n){if(typeof n=="string")return m(n,o);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(n,o)}}var s=function(){function n(o,t){var r=this,_=this;y(this,n),L(this,"obj",void 0),L(this,"path",void 0),L(this,"_errors",void 0),L(this,"catch",void 0),L(this,"exists",void 0),L(this,"object",void 0),L(this,"string",void 0),L(this,"number",void 0),L(this,"array",void 0),L(this,"enum",void 0),L(this,"empty",void 0),L(this,"minLength",void 0),L(this,"noAdditionalProperties",void 0),L(this,"each",void 0),this.obj=o,this.path=t,this._errors=[],this.catch=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];var u;(u=_._errors).push.apply(u,b(d))},this.exists=function(c){return c in r.obj?!0:(r.catch((0,e.requiredPropertyError)({property:c,path:r.path.of(c)})),!1)},this.object=function(c){var d=c?r.obj[c]:r.obj;if(c&&!r.exists(c))return!1;if((0,E.default)(d))return!0;var f=c?r.path.of(c):r.path,u,O=(u=c??r.path.last())!==null&&u!==void 0?u:"value";return r.catch((0,e.typeMismatchError)({typeName:"Object",property:O,path:f,value:d})),!1},this.string=function(c){var d=r.obj[c];return c&&!r.exists(c)?!1:typeof d=="string"?!0:(r.catch((0,e.typeMismatchError)({typeName:"String",property:c,path:r.path.of(c),value:d})),!1)},this.number=function(c,d){var f=r.obj[c];return d&&!(c in r.obj)?!0:r.exists(c)?typeof f=="number"&&!Number.isNaN(f)?!0:(r.catch((0,e.typeMismatchError)({typeName:"Number",property:c,path:r.path.of(c),value:f})),!1):!1},this.array=function(c){var d=r.obj[c];return c&&!r.exists(c)?!1:Array.isArray(d)?!0:(r.catch((0,e.typeMismatchError)({typeName:"Array",property:c,path:r.path.of(c),value:d})),!1)},this.enum=function(c,d){var f=r.obj[c];return typeof f=="string"&&d.includes(f)?!0:(r.catch((0,e.enumError)({expected:d,value:f,path:r.path.of(c)})),!1)},this.empty=function(c){if(!r.array(c))return!1;var d=r.obj[c];return d.length===0?!0:(r.catch((0,e.maxSizeError)({max:0,value:d,path:r.path.of(c)})),!1)},this.minLength=function(c,d){if(!r.array(c))return!1;var f=r.obj[c];return f.length>=d?!0:(r.catch((0,e.minSizeError)({min:d,value:f,path:r.path.of(c)})),!1)},this.noAdditionalProperties=function(c){var d=Object.keys(r.obj).sort().filter(function(f){return!c.includes(f)});return d.forEach(function(f){return r.catch((0,e.unknownPropertyError)({property:f,path:r.path.of(f)}))}),d.length===0},this.each=function(c,d){if(r.array(c)){var f=r.obj[c],u=!1;f.forEach(function(O,S){if(!u){var R=d(O,r.path.of(c).of(S));R.length>0&&(u=!0),r.catch.apply(r,b(R))}})}}}return C(n,[{key:"errors",get:function(){var t=this,r=function(_){return JSON.stringify({details:_.details,path:_.path})};return this._errors.filter(function(_,c){return t._errors.findIndex(function(d){return r(_)===r(d)})===c})}}]),n}()})(U);var Z={};(function(h){Object.defineProperty(h,"__esModule",{value:!0});function E(i,l){for(var v in l)Object.defineProperty(i,v,{enumerable:!0,get:Object.getOwnPropertyDescriptor(l,v).get})}E(h,{get EntityLinkAssertion(){return u},get HyperLinkAssertion(){return O},get NodeAssertion(){return f},get VOID_CONTENT(){return d},get assert(){return S},get assertLink(){return R}});var e=U;function m(i,l){(l==null||l>i.length)&&(l=i.length);for(var v=0,B=new Array(l);v<l;v++)B[v]=i[v];return B}function g(i){if(Array.isArray(i))return m(i)}function y(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function D(i,l,v){return l=p(l),n(i,c()?Reflect.construct(l,v||[],p(i).constructor):l.apply(i,v))}function C(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}function L(i,l){for(var v=0;v<l.length;v++){var B=l[v];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(i,B.key,B)}}function I(i,l,v){return l&&L(i.prototype,l),i}function a(i,l,v){return l in i?Object.defineProperty(i,l,{value:v,enumerable:!0,configurable:!0,writable:!0}):i[l]=v,i}function p(i){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},p(i)}function b(i,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(l&&l.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),l&&o(i,l)}function A(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(i,l){return l&&(r(l)==="object"||typeof l=="function")?l:y(i)}function o(i,l){return o=Object.setPrototypeOf||function(B,T){return B.__proto__=T,B},o(i,l)}function t(i){return g(i)||A(i)||_(i)||s()}function r(i){"@swc/helpers - typeof";return i&&typeof Symbol<"u"&&i.constructor===Symbol?"symbol":typeof i}function _(i,l){if(i){if(typeof i=="string")return m(i,l);var v=Object.prototype.toString.call(i).slice(8,-1);if(v==="Object"&&i.constructor&&(v=i.constructor.name),v==="Map"||v==="Set")return Array.from(v);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return m(i,l)}}function c(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c=function(){return!!i})()}var d=[],f=function(){function i(l,v){C(this,i),a(this,"contentRule",void 0),a(this,"validateData",void 0),this.contentRule=l,this.validateData=v}return I(i,[{key:"assert",value:function(v,B){var T=new e.ObjectAssertion(v,B);if(!T.object())return T.errors;T.noAdditionalProperties(["nodeType","data","content"]);var N=Array.isArray(this.contentRule)?{nodeTypes:this.contentRule}:this.contentRule(v,B),K=N.nodeTypes,j=N.min,w=j===void 0?0:j;if(K.length===0&&w>0)throw new Error("Invalid content rule. Cannot have enforce a 'min' of ".concat(w," with no nodeTypes"));if(T.minLength("content",w),K.length===0?T.empty("content"):T.each("content",function(re,ne){var G=new e.ObjectAssertion(re,ne);return G.object()&&G.enum("nodeType",K),G.errors}),T.object("data")){var P,x,z,k,te=(k=(x=(z=this).validateData)===null||x===void 0?void 0:x.call(z,v.data,B.of("data")))!==null&&k!==void 0?k:[];(P=T).catch.apply(P,t(te))}return T.errors}}]),i}(),u=function(i){b(l,i);function l(v,B){C(this,l);var T;return T=D(this,l,[B,function(N,K){return y(T).assertLink(N,K)}]),a(T,"linkType",void 0),a(T,"type",void 0),a(T,"assertLink",void 0),T.linkType=v,T.assertLink=function(N,K){var j=new e.ObjectAssertion(N,K);if(j.object("target")){var w,P=new e.ObjectAssertion(N.target.sys,K.of("target").of("sys"));P.object()&&(P.enum("type",[T.type]),P.enum("linkType",[T.linkType]),T.type==="Link"?(P.string("id"),P.noAdditionalProperties(["type","linkType","id"])):T.type==="ResourceLink"&&(P.string("urn"),P.noAdditionalProperties(["type","linkType","urn"]))),(w=j).catch.apply(w,t(P.errors))}return j.noAdditionalProperties(["target"]),j.errors},T.type=T.linkType.startsWith("Contentful:")?"ResourceLink":"Link",T}return l}(f),O=function(i){b(l,i);function l(){C(this,l);var v;return v=D(this,l,[["text"],function(B,T){return y(v).assertLink(B,T)}]),a(v,"assertLink",function(B,T){var N=new e.ObjectAssertion(B,T);return N.string("uri"),N.noAdditionalProperties(["uri"]),N.errors}),v}return l}(f),S=function(i,l){return new f(i,l)},R=function(i,l){return new u(i,l)}})(Z);var $={};(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"Path",{enumerable:!0,get:function(){return I}});function E(a,p){(p==null||p>a.length)&&(p=a.length);for(var b=0,A=new Array(p);b<p;b++)A[b]=a[b];return A}function e(a){if(Array.isArray(a))return E(a)}function m(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")}function g(a,p,b){return p in a?Object.defineProperty(a,p,{value:b,enumerable:!0,configurable:!0,writable:!0}):a[p]=b,a}function y(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(a){return e(a)||y(a)||L(a)||D()}function L(a,p){if(a){if(typeof a=="string")return E(a,p);var b=Object.prototype.toString.call(a).slice(8,-1);if(b==="Object"&&a.constructor&&(b=a.constructor.name),b==="Map"||b==="Set")return Array.from(b);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return E(a,p)}}var I=function a(){var p=this,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];m(this,a),g(this,"path",void 0),g(this,"of",void 0),g(this,"isRoot",void 0),g(this,"last",void 0),g(this,"toArray",void 0),this.path=b,this.of=function(A){return new a(C(p.path).concat([A]))},this.isRoot=function(){return p.path.length===0},this.last=function(){return p.path[p.path.length-1]},this.toArray=function(){return p.path}}})($);var ee={};(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"assertText",{enumerable:!0,get:function(){return e}});var E=U;function e(m,g){var y=new E.ObjectAssertion(m,g);return y.object()&&(y.noAdditionalProperties(["nodeType","data","value","marks"]),y.object("data"),y.each("marks",function(D,C){var L=new E.ObjectAssertion(D,C);return L.object()&&L.string("type"),L.errors}),y.string("value")),y.errors}})(ee);(function(h){Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(h,"validateRichTextDocument",{enumerable:!0,get:function(){return f}});var E=M,e=H,m=V,g=U,y=Z,D=$,C=ee;function L(u,O){(O==null||O>u.length)&&(O=u.length);for(var S=0,R=new Array(O);S<O;S++)R[S]=u[S];return R}function I(u){if(Array.isArray(u))return L(u)}function a(u,O,S){return O in u?Object.defineProperty(u,O,{value:S,enumerable:!0,configurable:!0,writable:!0}):u[O]=S,u}function p(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(u){return I(u)||p(u)||s(u)||b()}function s(u,O){if(u){if(typeof u=="string")return L(u,O);var S=Object.prototype.toString.call(u).slice(8,-1);if(S==="Object"&&u.constructor&&(S=u.constructor.name),S==="Map"||S==="Set")return Array.from(S);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return L(u,O)}}var n=(0,y.assert)(A(Object.values(e.INLINES)).concat(["text"]).sort()),o=(0,y.assert)([E.BLOCKS.LIST_ITEM]),t=(0,y.assertLink)("Entry",y.VOID_CONTENT),r=(0,y.assert)(function(){return{nodeTypes:[E.BLOCKS.PARAGRAPH],min:1}},function(u,O){var S=new g.ObjectAssertion(u,O);return S.noAdditionalProperties(["colspan","rowspan"]),S.number("colspan",!0),S.number("rowspan",!0),S.errors}),_,c=(_={},a(_,E.BLOCKS.DOCUMENT,(0,y.assert)(m.TOP_LEVEL_BLOCKS)),a(_,E.BLOCKS.PARAGRAPH,n),a(_,E.BLOCKS.HEADING_1,n),a(_,E.BLOCKS.HEADING_2,n),a(_,E.BLOCKS.HEADING_3,n),a(_,E.BLOCKS.HEADING_4,n),a(_,E.BLOCKS.HEADING_5,n),a(_,E.BLOCKS.HEADING_6,n),a(_,E.BLOCKS.QUOTE,(0,y.assert)(m.CONTAINERS[E.BLOCKS.QUOTE])),a(_,E.BLOCKS.EMBEDDED_ENTRY,t),a(_,E.BLOCKS.EMBEDDED_ASSET,(0,y.assertLink)("Asset",y.VOID_CONTENT)),a(_,E.BLOCKS.EMBEDDED_RESOURCE,(0,y.assertLink)("Contentful:Entry",y.VOID_CONTENT)),a(_,E.BLOCKS.HR,(0,y.assert)(y.VOID_CONTENT)),a(_,E.BLOCKS.OL_LIST,o),a(_,E.BLOCKS.UL_LIST,o),a(_,E.BLOCKS.LIST_ITEM,(0,y.assert)(A(m.LIST_ITEM_BLOCKS).sort())),a(_,E.BLOCKS.TABLE,(0,y.assert)(function(){return{nodeTypes:[E.BLOCKS.TABLE_ROW],min:1}})),a(_,E.BLOCKS.TABLE_ROW,(0,y.assert)(function(){return{nodeTypes:[E.BLOCKS.TABLE_CELL,E.BLOCKS.TABLE_HEADER_CELL],min:1}})),a(_,E.BLOCKS.TABLE_CELL,r),a(_,E.BLOCKS.TABLE_HEADER_CELL,r),a(_,e.INLINES.HYPERLINK,new y.HyperLinkAssertion),a(_,e.INLINES.EMBEDDED_ENTRY,t),a(_,e.INLINES.EMBEDDED_RESOURCE,(0,y.assertLink)("Contentful:Entry",y.VOID_CONTENT)),a(_,e.INLINES.ENTRY_HYPERLINK,(0,y.assertLink)("Entry",["text"])),a(_,e.INLINES.ASSET_HYPERLINK,(0,y.assertLink)("Asset",["text"])),a(_,e.INLINES.RESOURCE_HYPERLINK,(0,y.assertLink)("Contentful:Entry",["text"])),_);function d(u,O){if(u.nodeType==="text")return(0,C.assertText)(u,O);var S=c[u.nodeType].assert(u,O);if(S.length>0)return S;var R=new g.ObjectAssertion(u,O);return R.each("content",function(i,l){return d(i,l)}),R.errors}var f=function(u){var O=new D.Path,S=new g.ObjectAssertion(u,O);return S.object()&&S.enum("nodeType",[E.BLOCKS.DOCUMENT]),S.errors.length>0?S.errors:d(u,O)}})(X);(function(h){Object.defineProperty(h,"__esModule",{value:!0});function E(p,b){for(var A in b)Object.defineProperty(p,A,{enumerable:!0,get:Object.getOwnPropertyDescriptor(b,A).get})}E(h,{get BLOCKS(){return e.BLOCKS},get EMPTY_DOCUMENT(){return y.EMPTY_DOCUMENT},get INLINES(){return m.INLINES},get MARKS(){return g.MARKS},get helpers(){return D},get validateRichTextDocument(){return C.validateRichTextDocument}});var e=M,m=H,g=Y;L(V,h),L(W,h),L(q,h);var y=Q,D=a(F),C=X;function L(p,b){return Object.keys(p).forEach(function(A){A!=="default"&&!Object.prototype.hasOwnProperty.call(b,A)&&Object.defineProperty(b,A,{enumerable:!0,get:function(){return p[A]}})}),p}function I(p){if(typeof WeakMap!="function")return null;var b=new WeakMap,A=new WeakMap;return(I=function(s){return s?A:b})(p)}function a(p,b){if(p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var A=I(b);if(A&&A.has(p))return A.get(p);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in p)if(o!=="default"&&Object.prototype.hasOwnProperty.call(p,o)){var t=n?Object.getOwnPropertyDescriptor(p,o):null;t&&(t.get||t.set)?Object.defineProperty(s,o,t):s[o]=p[o]}return s.default=p,A&&A.set(p,s),s}})(oe);export{oe as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as A}from"./_commonjsHelpers-C4iS2aBk.js";var Bt={exports:{}},ts={},re={},xe={},Fe={},C={},ze={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(p){if(super(),!e.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((S,O)=>`${S}${O}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((S,O)=>(O instanceof r&&(S[O.str]=(S[O.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function s(m,...p){const S=[m[0]];let O=0;for(;O<p.length;)c(S,p[O]),S.push(m[++O]);return new n(S)}e._=s;const o=new n("+");function i(m,...p){const S=[E(m[0])];let O=0;for(;O<p.length;)S.push(o),c(S,p[O]),S.push(o,E(m[++O]));return u(S),new n(S)}e.str=i;function c(m,p){p instanceof n?m.push(...p._items):p instanceof r?m.push(p):m.push(h(p))}e.addCodeArg=c;function u(m){let p=1;for(;p<m.length-1;){if(m[p]===o){const S=l(m[p-1],m[p+1]);if(S!==void 0){m.splice(p-1,3,S);continue}m[p++]="+"}p++}}function l(m,p){if(p==='""')return m;if(m==='""')return p;if(typeof m=="string")return p instanceof r||m[m.length-1]!=='"'?void 0:typeof p!="string"?`${m.slice(0,-1)}${p}"`:p[0]==='"'?m.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(m instanceof r))return`"${m}${p.slice(1)}`}function d(m,p){return p.emptyStr()?m:m.emptyStr()?p:i`${m}${p}`}e.strConcat=d;function h(m){return typeof m=="number"||typeof m=="boolean"||m===null?m:E(Array.isArray(m)?m.join(","):m)}function w(m){return new n(E(m))}e.stringify=w;function E(m){return JSON.stringify(m).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=E;function v(m){return typeof m=="string"&&e.IDENTIFIER.test(m)?new n(`.${m}`):s`[${m}]`}e.getProperty=v;function b(m){if(typeof m=="string"&&e.IDENTIFIER.test(m))return new n(`${m}`);throw new Error(`CodeGen: invalid export name: ${m}, use explicit $id name mapping`)}e.getEsmExportName=b;function _(m){return new n(m.toString())}e.regexpCode=_})(ze);var Yt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ze;class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:d}={}){this._names={},this._prefixes=l,this._parent=d}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const d=this._names[l]||this._nameGroup(l);return`${l}${d.index++}`}_nameGroup(l){var d,h;if(!((h=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||h===void 0)&&h.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class o extends t.Name{constructor(l,d){super(d),this.prefix=l}setValue(l,{property:d,itemIndex:h}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(d)}[${h}]`}}e.ValueScopeName=o;const i=(0,t._)`\n`;class c extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?i:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,d){var h;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(l),{prefix:E}=w,v=(h=d.key)!==null&&h!==void 0?h:d.ref;let b=this._values[E];if(b){const p=b.get(v);if(p)return p}else b=this._values[E]=new Map;b.set(v,w);const _=this._scope[E]||(this._scope[E]=[]),m=_.length;return _[m]=d.ref,w.setValue(d,{property:E,itemIndex:m}),w}getValue(l,d){const h=this._values[l];if(h)return h.get(d)}scopeRefs(l,d=this._values){return this._reduceValues(d,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${l}${h.scopePath}`})}scopeCode(l=this._values,d,h){return this._reduceValues(l,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},d,h)}_reduceValues(l,d,h={},w){let E=t.nil;for(const v in l){const b=l[v];if(!b)continue;const _=h[v]=h[v]||new Map;b.forEach(m=>{if(_.has(m))return;_.set(m,n.Started);let p=d(m);if(p){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;E=(0,t._)`${E}${S} ${m} = ${p};${this.opts._n}`}else if(p=w?.(m))E=(0,t._)`${E}${p}${this.opts._n}`;else throw new r(m);_.set(m,n.Completed)})}return E}}e.ValueScope=c})(Yt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ze,r=Yt;var n=ze;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Yt;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(a,f){return this}}class i extends o{constructor(a,f,P){super(),this.varKind=a,this.name=f,this.rhs=P}render({es5:a,_n:f}){const P=a?r.varKinds.var:this.varKind,k=this.rhs===void 0?"":` = ${this.rhs}`;return`${P} ${this.name}${k};`+f}optimizeNames(a,f){if(a[this.name.str])return this.rhs&&(this.rhs=ue(this.rhs,a,f)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends o{constructor(a,f,P){super(),this.lhs=a,this.rhs=f,this.sideEffects=P}render({_n:a}){return`${this.lhs} = ${this.rhs};`+a}optimizeNames(a,f){if(!(this.lhs instanceof t.Name&&!a[this.lhs.str]&&!this.sideEffects))return this.rhs=ue(this.rhs,a,f),this}get names(){const a=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ge(a,this.rhs)}}class u extends c{constructor(a,f,P,k){super(a,P,k),this.op=f}render({_n:a}){return`${this.lhs} ${this.op}= ${this.rhs};`+a}}class l extends o{constructor(a){super(),this.label=a,this.names={}}render({_n:a}){return`${this.label}:`+a}}class d extends o{constructor(a){super(),this.label=a,this.names={}}render({_n:a}){return`break${this.label?` ${this.label}`:""};`+a}}class h extends o{constructor(a){super(),this.error=a}render({_n:a}){return`throw ${this.error};`+a}get names(){return this.error.names}}class w extends o{constructor(a){super(),this.code=a}render({_n:a}){return`${this.code};`+a}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(a,f){return this.code=ue(this.code,a,f),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class E extends o{constructor(a=[]){super(),this.nodes=a}render(a){return this.nodes.reduce((f,P)=>f+P.render(a),"")}optimizeNodes(){const{nodes:a}=this;let f=a.length;for(;f--;){const P=a[f].optimizeNodes();Array.isArray(P)?a.splice(f,1,...P):P?a[f]=P:a.splice(f,1)}return a.length>0?this:void 0}optimizeNames(a,f){const{nodes:P}=this;let k=P.length;for(;k--;){const j=P[k];j.optimizeNames(a,f)||(Se(a,j.names),P.splice(k,1))}return P.length>0?this:void 0}get names(){return this.nodes.reduce((a,f)=>ne(a,f.names),{})}}class v extends E{render(a){return"{"+a._n+super.render(a)+"}"+a._n}}class b extends E{}class _ extends v{}_.kind="else";class m extends v{constructor(a,f){super(f),this.condition=a}render(a){let f=`if(${this.condition})`+super.render(a);return this.else&&(f+="else "+this.else.render(a)),f}optimizeNodes(){super.optimizeNodes();const a=this.condition;if(a===!0)return this.nodes;let f=this.else;if(f){const P=f.optimizeNodes();f=this.else=Array.isArray(P)?new _(P):P}if(f)return a===!1?f instanceof m?f:f.nodes:this.nodes.length?this:new m(je(a),f instanceof m?[f]:f.nodes);if(!(a===!1||!this.nodes.length))return this}optimizeNames(a,f){var P;if(this.else=(P=this.else)===null||P===void 0?void 0:P.optimizeNames(a,f),!!(super.optimizeNames(a,f)||this.else))return this.condition=ue(this.condition,a,f),this}get names(){const a=super.names;return ge(a,this.condition),this.else&&ne(a,this.else.names),a}}m.kind="if";class p extends v{}p.kind="for";class S extends p{constructor(a){super(),this.iteration=a}render(a){return`for(${this.iteration})`+super.render(a)}optimizeNames(a,f){if(super.optimizeNames(a,f))return this.iteration=ue(this.iteration,a,f),this}get names(){return ne(super.names,this.iteration.names)}}class O extends p{constructor(a,f,P,k){super(),this.varKind=a,this.name=f,this.from=P,this.to=k}render(a){const f=a.es5?r.varKinds.var:this.varKind,{name:P,from:k,to:j}=this;return`for(${f} ${P}=${k}; ${P}<${j}; ${P}++)`+super.render(a)}get names(){const a=ge(super.names,this.from);return ge(a,this.to)}}class I extends p{constructor(a,f,P,k){super(),this.loop=a,this.varKind=f,this.name=P,this.iterable=k}render(a){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(a)}optimizeNames(a,f){if(super.optimizeNames(a,f))return this.iterable=ue(this.iterable,a,f),this}get names(){return ne(super.names,this.iterable.names)}}class x extends v{constructor(a,f,P){super(),this.name=a,this.args=f,this.async=P}render(a){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(a)}}x.kind="func";class U extends E{render(a){return"return "+super.render(a)}}U.kind="return";class W extends v{render(a){let f="try"+super.render(a);return this.catch&&(f+=this.catch.render(a)),this.finally&&(f+=this.finally.render(a)),f}optimizeNodes(){var a,f;return super.optimizeNodes(),(a=this.catch)===null||a===void 0||a.optimizeNodes(),(f=this.finally)===null||f===void 0||f.optimizeNodes(),this}optimizeNames(a,f){var P,k;return super.optimizeNames(a,f),(P=this.catch)===null||P===void 0||P.optimizeNames(a,f),(k=this.finally)===null||k===void 0||k.optimizeNames(a,f),this}get names(){const a=super.names;return this.catch&&ne(a,this.catch.names),this.finally&&ne(a,this.finally.names),a}}class ce extends v{constructor(a){super(),this.error=a}render(a){return`catch(${this.error})`+super.render(a)}}ce.kind="catch";class pe extends v{render(a){return"finally"+super.render(a)}}pe.kind="finally";class Pe{constructor(a,f={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...f,_n:f.lines?`
|
|
1
|
+
import{c as A}from"./contentful-5JGMFnCq.js";var Bt={exports:{}},ts={},re={},xe={},Fe={},C={},ze={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(p){if(super(),!e.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((S,O)=>`${S}${O}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((S,O)=>(O instanceof r&&(S[O.str]=(S[O.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function s(m,...p){const S=[m[0]];let O=0;for(;O<p.length;)c(S,p[O]),S.push(m[++O]);return new n(S)}e._=s;const o=new n("+");function i(m,...p){const S=[E(m[0])];let O=0;for(;O<p.length;)S.push(o),c(S,p[O]),S.push(o,E(m[++O]));return u(S),new n(S)}e.str=i;function c(m,p){p instanceof n?m.push(...p._items):p instanceof r?m.push(p):m.push(h(p))}e.addCodeArg=c;function u(m){let p=1;for(;p<m.length-1;){if(m[p]===o){const S=l(m[p-1],m[p+1]);if(S!==void 0){m.splice(p-1,3,S);continue}m[p++]="+"}p++}}function l(m,p){if(p==='""')return m;if(m==='""')return p;if(typeof m=="string")return p instanceof r||m[m.length-1]!=='"'?void 0:typeof p!="string"?`${m.slice(0,-1)}${p}"`:p[0]==='"'?m.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(m instanceof r))return`"${m}${p.slice(1)}`}function d(m,p){return p.emptyStr()?m:m.emptyStr()?p:i`${m}${p}`}e.strConcat=d;function h(m){return typeof m=="number"||typeof m=="boolean"||m===null?m:E(Array.isArray(m)?m.join(","):m)}function w(m){return new n(E(m))}e.stringify=w;function E(m){return JSON.stringify(m).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=E;function v(m){return typeof m=="string"&&e.IDENTIFIER.test(m)?new n(`.${m}`):s`[${m}]`}e.getProperty=v;function b(m){if(typeof m=="string"&&e.IDENTIFIER.test(m))return new n(`${m}`);throw new Error(`CodeGen: invalid export name: ${m}, use explicit $id name mapping`)}e.getEsmExportName=b;function _(m){return new n(m.toString())}e.regexpCode=_})(ze);var Yt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ze;class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:d}={}){this._names={},this._prefixes=l,this._parent=d}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const d=this._names[l]||this._nameGroup(l);return`${l}${d.index++}`}_nameGroup(l){var d,h;if(!((h=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||h===void 0)&&h.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class o extends t.Name{constructor(l,d){super(d),this.prefix=l}setValue(l,{property:d,itemIndex:h}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(d)}[${h}]`}}e.ValueScopeName=o;const i=(0,t._)`\n`;class c extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?i:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,d){var h;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(l),{prefix:E}=w,v=(h=d.key)!==null&&h!==void 0?h:d.ref;let b=this._values[E];if(b){const p=b.get(v);if(p)return p}else b=this._values[E]=new Map;b.set(v,w);const _=this._scope[E]||(this._scope[E]=[]),m=_.length;return _[m]=d.ref,w.setValue(d,{property:E,itemIndex:m}),w}getValue(l,d){const h=this._values[l];if(h)return h.get(d)}scopeRefs(l,d=this._values){return this._reduceValues(d,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${l}${h.scopePath}`})}scopeCode(l=this._values,d,h){return this._reduceValues(l,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},d,h)}_reduceValues(l,d,h={},w){let E=t.nil;for(const v in l){const b=l[v];if(!b)continue;const _=h[v]=h[v]||new Map;b.forEach(m=>{if(_.has(m))return;_.set(m,n.Started);let p=d(m);if(p){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;E=(0,t._)`${E}${S} ${m} = ${p};${this.opts._n}`}else if(p=w?.(m))E=(0,t._)`${E}${p}${this.opts._n}`;else throw new r(m);_.set(m,n.Completed)})}return E}}e.ValueScope=c})(Yt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ze,r=Yt;var n=ze;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Yt;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(a,f){return this}}class i extends o{constructor(a,f,P){super(),this.varKind=a,this.name=f,this.rhs=P}render({es5:a,_n:f}){const P=a?r.varKinds.var:this.varKind,k=this.rhs===void 0?"":` = ${this.rhs}`;return`${P} ${this.name}${k};`+f}optimizeNames(a,f){if(a[this.name.str])return this.rhs&&(this.rhs=ue(this.rhs,a,f)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends o{constructor(a,f,P){super(),this.lhs=a,this.rhs=f,this.sideEffects=P}render({_n:a}){return`${this.lhs} = ${this.rhs};`+a}optimizeNames(a,f){if(!(this.lhs instanceof t.Name&&!a[this.lhs.str]&&!this.sideEffects))return this.rhs=ue(this.rhs,a,f),this}get names(){const a=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ge(a,this.rhs)}}class u extends c{constructor(a,f,P,k){super(a,P,k),this.op=f}render({_n:a}){return`${this.lhs} ${this.op}= ${this.rhs};`+a}}class l extends o{constructor(a){super(),this.label=a,this.names={}}render({_n:a}){return`${this.label}:`+a}}class d extends o{constructor(a){super(),this.label=a,this.names={}}render({_n:a}){return`break${this.label?` ${this.label}`:""};`+a}}class h extends o{constructor(a){super(),this.error=a}render({_n:a}){return`throw ${this.error};`+a}get names(){return this.error.names}}class w extends o{constructor(a){super(),this.code=a}render({_n:a}){return`${this.code};`+a}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(a,f){return this.code=ue(this.code,a,f),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class E extends o{constructor(a=[]){super(),this.nodes=a}render(a){return this.nodes.reduce((f,P)=>f+P.render(a),"")}optimizeNodes(){const{nodes:a}=this;let f=a.length;for(;f--;){const P=a[f].optimizeNodes();Array.isArray(P)?a.splice(f,1,...P):P?a[f]=P:a.splice(f,1)}return a.length>0?this:void 0}optimizeNames(a,f){const{nodes:P}=this;let k=P.length;for(;k--;){const j=P[k];j.optimizeNames(a,f)||(Se(a,j.names),P.splice(k,1))}return P.length>0?this:void 0}get names(){return this.nodes.reduce((a,f)=>ne(a,f.names),{})}}class v extends E{render(a){return"{"+a._n+super.render(a)+"}"+a._n}}class b extends E{}class _ extends v{}_.kind="else";class m extends v{constructor(a,f){super(f),this.condition=a}render(a){let f=`if(${this.condition})`+super.render(a);return this.else&&(f+="else "+this.else.render(a)),f}optimizeNodes(){super.optimizeNodes();const a=this.condition;if(a===!0)return this.nodes;let f=this.else;if(f){const P=f.optimizeNodes();f=this.else=Array.isArray(P)?new _(P):P}if(f)return a===!1?f instanceof m?f:f.nodes:this.nodes.length?this:new m(je(a),f instanceof m?[f]:f.nodes);if(!(a===!1||!this.nodes.length))return this}optimizeNames(a,f){var P;if(this.else=(P=this.else)===null||P===void 0?void 0:P.optimizeNames(a,f),!!(super.optimizeNames(a,f)||this.else))return this.condition=ue(this.condition,a,f),this}get names(){const a=super.names;return ge(a,this.condition),this.else&&ne(a,this.else.names),a}}m.kind="if";class p extends v{}p.kind="for";class S extends p{constructor(a){super(),this.iteration=a}render(a){return`for(${this.iteration})`+super.render(a)}optimizeNames(a,f){if(super.optimizeNames(a,f))return this.iteration=ue(this.iteration,a,f),this}get names(){return ne(super.names,this.iteration.names)}}class O extends p{constructor(a,f,P,k){super(),this.varKind=a,this.name=f,this.from=P,this.to=k}render(a){const f=a.es5?r.varKinds.var:this.varKind,{name:P,from:k,to:j}=this;return`for(${f} ${P}=${k}; ${P}<${j}; ${P}++)`+super.render(a)}get names(){const a=ge(super.names,this.from);return ge(a,this.to)}}class I extends p{constructor(a,f,P,k){super(),this.loop=a,this.varKind=f,this.name=P,this.iterable=k}render(a){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(a)}optimizeNames(a,f){if(super.optimizeNames(a,f))return this.iterable=ue(this.iterable,a,f),this}get names(){return ne(super.names,this.iterable.names)}}class x extends v{constructor(a,f,P){super(),this.name=a,this.args=f,this.async=P}render(a){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(a)}}x.kind="func";class U extends E{render(a){return"return "+super.render(a)}}U.kind="return";class W extends v{render(a){let f="try"+super.render(a);return this.catch&&(f+=this.catch.render(a)),this.finally&&(f+=this.finally.render(a)),f}optimizeNodes(){var a,f;return super.optimizeNodes(),(a=this.catch)===null||a===void 0||a.optimizeNodes(),(f=this.finally)===null||f===void 0||f.optimizeNodes(),this}optimizeNames(a,f){var P,k;return super.optimizeNames(a,f),(P=this.catch)===null||P===void 0||P.optimizeNames(a,f),(k=this.finally)===null||k===void 0||k.optimizeNames(a,f),this}get names(){const a=super.names;return this.catch&&ne(a,this.catch.names),this.finally&&ne(a,this.finally.names),a}}class ce extends v{constructor(a){super(),this.error=a}render(a){return`catch(${this.error})`+super.render(a)}}ce.kind="catch";class pe extends v{render(a){return"finally"+super.render(a)}}pe.kind="finally";class Pe{constructor(a,f={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...f,_n:f.lines?`
|
|
2
2
|
`:""},this._extScope=a,this._scope=new r.Scope({parent:a}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(a){return this._scope.name(a)}scopeName(a){return this._extScope.name(a)}scopeValue(a,f){const P=this._extScope.value(a,f);return(this._values[P.prefix]||(this._values[P.prefix]=new Set)).add(P),P}getScopeValue(a,f){return this._extScope.getValue(a,f)}scopeRefs(a){return this._extScope.scopeRefs(a,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(a,f,P,k){const j=this._scope.toName(f);return P!==void 0&&k&&(this._constants[j.str]=P),this._leafNode(new i(a,j,P)),j}const(a,f,P){return this._def(r.varKinds.const,a,f,P)}let(a,f,P){return this._def(r.varKinds.let,a,f,P)}var(a,f,P){return this._def(r.varKinds.var,a,f,P)}assign(a,f,P){return this._leafNode(new c(a,f,P))}add(a,f){return this._leafNode(new u(a,e.operators.ADD,f))}code(a){return typeof a=="function"?a():a!==t.nil&&this._leafNode(new w(a)),this}object(...a){const f=["{"];for(const[P,k]of a)f.length>1&&f.push(","),f.push(P),(P!==k||this.opts.es5)&&(f.push(":"),(0,t.addCodeArg)(f,k));return f.push("}"),new t._Code(f)}if(a,f,P){if(this._blockNode(new m(a)),f&&P)this.code(f).else().code(P).endIf();else if(f)this.code(f).endIf();else if(P)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(a){return this._elseNode(new m(a))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(m,_)}_for(a,f){return this._blockNode(a),f&&this.code(f).endFor(),this}for(a,f){return this._for(new S(a),f)}forRange(a,f,P,k,j=this.opts.es5?r.varKinds.var:r.varKinds.let){const T=this._scope.toName(a);return this._for(new O(j,T,f,P),()=>k(T))}forOf(a,f,P,k=r.varKinds.const){const j=this._scope.toName(a);if(this.opts.es5){const T=f instanceof t.Name?f:this.var("_arr",f);return this.forRange("_i",0,(0,t._)`${T}.length`,q=>{this.var(j,(0,t._)`${T}[${q}]`),P(j)})}return this._for(new I("of",k,j,f),()=>P(j))}forIn(a,f,P,k=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(a,(0,t._)`Object.keys(${f})`,P);const j=this._scope.toName(a);return this._for(new I("in",k,j,f),()=>P(j))}endFor(){return this._endBlockNode(p)}label(a){return this._leafNode(new l(a))}break(a){return this._leafNode(new d(a))}return(a){const f=new U;if(this._blockNode(f),this.code(a),f.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(U)}try(a,f,P){if(!f&&!P)throw new Error('CodeGen: "try" without "catch" and "finally"');const k=new W;if(this._blockNode(k),this.code(a),f){const j=this.name("e");this._currNode=k.catch=new ce(j),f(j)}return P&&(this._currNode=k.finally=new pe,this.code(P)),this._endBlockNode(ce,pe)}throw(a){return this._leafNode(new h(a))}block(a,f){return this._blockStarts.push(this._nodes.length),a&&this.code(a).endBlock(f),this}endBlock(a){const f=this._blockStarts.pop();if(f===void 0)throw new Error("CodeGen: not in self-balancing block");const P=this._nodes.length-f;if(P<0||a!==void 0&&P!==a)throw new Error(`CodeGen: wrong number of nodes: ${P} vs ${a} expected`);return this._nodes.length=f,this}func(a,f=t.nil,P,k){return this._blockNode(new x(a,f,P)),k&&this.code(k).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(a=1){for(;a-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(a){return this._currNode.nodes.push(a),this}_blockNode(a){this._currNode.nodes.push(a),this._nodes.push(a)}_endBlockNode(a,f){const P=this._currNode;if(P instanceof a||f&&P instanceof f)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${f?`${a.kind}/${f.kind}`:a.kind}"`)}_elseNode(a){const f=this._currNode;if(!(f instanceof m))throw new Error('CodeGen: "else" without "if"');return this._currNode=f.else=a,this}get _root(){return this._nodes[0]}get _currNode(){const a=this._nodes;return a[a.length-1]}set _currNode(a){const f=this._nodes;f[f.length-1]=a}}e.CodeGen=Pe;function ne(y,a){for(const f in a)y[f]=(y[f]||0)+(a[f]||0);return y}function ge(y,a){return a instanceof t._CodeOrName?ne(y,a.names):y}function ue(y,a,f){if(y instanceof t.Name)return P(y);if(!k(y))return y;return new t._Code(y._items.reduce((j,T)=>(T instanceof t.Name&&(T=P(T)),T instanceof t._Code?j.push(...T._items):j.push(T),j),[]));function P(j){const T=f[j.str];return T===void 0||a[j.str]!==1?j:(delete a[j.str],T)}function k(j){return j instanceof t._Code&&j._items.some(T=>T instanceof t.Name&&a[T.str]===1&&f[T.str]!==void 0)}}function Se(y,a){for(const f in a)y[f]=(y[f]||0)-(a[f]||0)}function je(y){return typeof y=="boolean"||typeof y=="number"||y===null?!y:(0,t._)`!${$(y)}`}e.not=je;const Je=g(e.operators.AND);function We(...y){return y.reduce(Je)}e.and=We;const ve=g(e.operators.OR);function R(...y){return y.reduce(ve)}e.or=R;function g(y){return(a,f)=>a===t.nil?f:f===t.nil?a:(0,t._)`${$(a)} ${y} ${$(f)}`}function $(y){return y instanceof t.Name?y:(0,t._)`(${y})`}})(C);var N={};Object.defineProperty(N,"__esModule",{value:!0});N.checkStrictMode=N.getErrorPath=N.Type=N.useFunc=N.setEvaluated=N.evaluatedPropsToName=N.mergeEvaluated=N.eachItem=N.unescapeJsonPointer=N.escapeJsonPointer=N.escapeFragment=N.unescapeFragment=N.schemaRefOrVal=N.schemaHasRulesButRef=N.schemaHasRules=N.checkUnknownRules=N.alwaysValidSchema=N.toHash=void 0;const z=C,Zs=ze;function eo(e){const t={};for(const r of e)t[r]=!0;return t}N.toHash=eo;function to(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(rs(e,t),!ns(t,e.self.RULES.all))}N.alwaysValidSchema=to;function rs(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;const s=n.RULES.keywords;for(const o in t)s[o]||as(e,`unknown keyword: "${o}"`)}N.checkUnknownRules=rs;function ns(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}N.schemaHasRules=ns;function ro(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}N.schemaHasRulesButRef=ro;function no({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,z._)`${r}`}return(0,z._)`${e}${t}${(0,z.getProperty)(n)}`}N.schemaRefOrVal=no;function so(e){return ss(decodeURIComponent(e))}N.unescapeFragment=so;function oo(e){return encodeURIComponent(Vr(e))}N.escapeFragment=oo;function Vr(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}N.escapeJsonPointer=Vr;function ss(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}N.unescapeJsonPointer=ss;function ao(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}N.eachItem=ao;function Tn({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,i,c)=>{const u=i===void 0?o:i instanceof z.Name?(o instanceof z.Name?e(s,o,i):t(s,o,i),i):o instanceof z.Name?(t(s,i,o),o):r(o,i);return c===z.Name&&!(u instanceof z.Name)?n(s,u):u}}N.mergeEvaluated={props:Tn({mergeNames:(e,t,r)=>e.if((0,z._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,z._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,z._)`${r} || {}`).code((0,z._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,z._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,z._)`${r} || {}`),Kr(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:os}),items:Tn({mergeNames:(e,t,r)=>e.if((0,z._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,z._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,z._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,z._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function os(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,z._)`{}`);return t!==void 0&&Kr(e,r,t),r}N.evaluatedPropsToName=os;function Kr(e,t,r){Object.keys(r).forEach(n=>e.assign((0,z._)`${t}${(0,z.getProperty)(n)}`,!0))}N.setEvaluated=Kr;const Mn={};function io(e,t){return e.scopeValue("func",{ref:t,code:Mn[t.code]||(Mn[t.code]=new Zs._Code(t.code))})}N.useFunc=io;var Qt;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Qt||(N.Type=Qt={}));function co(e,t,r){if(e instanceof z.Name){const n=t===Qt.Num;return r?n?(0,z._)`"[" + ${e} + "]"`:(0,z._)`"['" + ${e} + "']"`:n?(0,z._)`"/" + ${e}`:(0,z._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,z.getProperty)(e).toString():"/"+Vr(e)}N.getErrorPath=co;function as(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}N.checkStrictMode=as;var ie={};Object.defineProperty(ie,"__esModule",{value:!0});const Q=C,uo={data:new Q.Name("data"),valCxt:new Q.Name("valCxt"),instancePath:new Q.Name("instancePath"),parentData:new Q.Name("parentData"),parentDataProperty:new Q.Name("parentDataProperty"),rootData:new Q.Name("rootData"),dynamicAnchors:new Q.Name("dynamicAnchors"),vErrors:new Q.Name("vErrors"),errors:new Q.Name("errors"),this:new Q.Name("this"),self:new Q.Name("self"),scope:new Q.Name("scope"),json:new Q.Name("json"),jsonPos:new Q.Name("jsonPos"),jsonLen:new Q.Name("jsonLen"),jsonPart:new Q.Name("jsonPart")};ie.default=uo;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=C,r=N,n=ie;e.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},e.keyword$DataError={message:({keyword:_,schemaType:m})=>m?(0,t.str)`"${_}" keyword must be ${m} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function s(_,m=e.keywordError,p,S){const{it:O}=_,{gen:I,compositeRule:x,allErrors:U}=O,W=h(_,m,p);S??(x||U)?u(I,W):l(O,(0,t._)`[${W}]`)}e.reportError=s;function o(_,m=e.keywordError,p){const{it:S}=_,{gen:O,compositeRule:I,allErrors:x}=S,U=h(_,m,p);u(O,U),I||x||l(S,n.default.vErrors)}e.reportExtraError=o;function i(_,m){_.assign(n.default.errors,m),_.if((0,t._)`${n.default.vErrors} !== null`,()=>_.if(m,()=>_.assign((0,t._)`${n.default.vErrors}.length`,m),()=>_.assign(n.default.vErrors,null)))}e.resetErrorsCount=i;function c({gen:_,keyword:m,schemaValue:p,data:S,errsCount:O,it:I}){if(O===void 0)throw new Error("ajv implementation error");const x=_.name("err");_.forRange("i",O,n.default.errors,U=>{_.const(x,(0,t._)`${n.default.vErrors}[${U}]`),_.if((0,t._)`${x}.instancePath === undefined`,()=>_.assign((0,t._)`${x}.instancePath`,(0,t.strConcat)(n.default.instancePath,I.errorPath))),_.assign((0,t._)`${x}.schemaPath`,(0,t.str)`${I.errSchemaPath}/${m}`),I.opts.verbose&&(_.assign((0,t._)`${x}.schema`,p),_.assign((0,t._)`${x}.data`,S))})}e.extendErrors=c;function u(_,m){const p=_.const("err",m);_.if((0,t._)`${n.default.vErrors} === null`,()=>_.assign(n.default.vErrors,(0,t._)`[${p}]`),(0,t._)`${n.default.vErrors}.push(${p})`),_.code((0,t._)`${n.default.errors}++`)}function l(_,m){const{gen:p,validateName:S,schemaEnv:O}=_;O.$async?p.throw((0,t._)`new ${_.ValidationError}(${m})`):(p.assign((0,t._)`${S}.errors`,m),p.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(_,m,p){const{createErrors:S}=_.it;return S===!1?(0,t._)`{}`:w(_,m,p)}function w(_,m,p={}){const{gen:S,it:O}=_,I=[E(O,p),v(_,p)];return b(_,m,I),S.object(...I)}function E({errorPath:_},{instancePath:m}){const p=m?(0,t.str)`${_}${(0,r.getErrorPath)(m,r.Type.Str)}`:_;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,p)]}function v({keyword:_,it:{errSchemaPath:m}},{schemaPath:p,parentSchema:S}){let O=S?m:(0,t.str)`${m}/${_}`;return p&&(O=(0,t.str)`${O}${(0,r.getErrorPath)(p,r.Type.Str)}`),[d.schemaPath,O]}function b(_,{params:m,message:p},S){const{keyword:O,data:I,schemaValue:x,it:U}=_,{opts:W,propertyName:ce,topSchemaRef:pe,schemaPath:Pe}=U;S.push([d.keyword,O],[d.params,typeof m=="function"?m(_):m||(0,t._)`{}`]),W.messages&&S.push([d.message,typeof p=="function"?p(_):p]),W.verbose&&S.push([d.schema,x],[d.parentSchema,(0,t._)`${pe}${Pe}`],[n.default.data,I]),ce&&S.push([d.propertyName,ce])}})(Fe);Object.defineProperty(xe,"__esModule",{value:!0});xe.boolOrEmptySchema=xe.topBoolOrEmptySchema=void 0;const lo=Fe,fo=C,po=ie,ho={message:"boolean schema is false"};function mo(e){const{gen:t,schema:r,validateName:n}=e;r===!1?is(e,!1):typeof r=="object"&&r.$async===!0?t.return(po.default.data):(t.assign((0,fo._)`${n}.errors`,null),t.return(!0))}xe.topBoolOrEmptySchema=mo;function yo(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),is(e)):r.var(t,!0)}xe.boolOrEmptySchema=yo;function is(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,lo.reportError)(s,ho,void 0,t)}var J={},Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.getRules=Te.isJSONType=void 0;const _o=["string","number","integer","boolean","null","object","array"],go=new Set(_o);function vo(e){return typeof e=="string"&&go.has(e)}Te.isJSONType=vo;function $o(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Te.getRules=$o;var he={};Object.defineProperty(he,"__esModule",{value:!0});he.shouldUseRule=he.shouldUseGroup=he.schemaHasRulesForType=void 0;function wo({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&cs(e,n)}he.schemaHasRulesForType=wo;function cs(e,t){return t.rules.some(r=>us(e,r))}he.shouldUseGroup=cs;function us(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}he.shouldUseRule=us;Object.defineProperty(J,"__esModule",{value:!0});J.reportTypeError=J.checkDataTypes=J.checkDataType=J.coerceAndCheckDataType=J.getJSONTypes=J.getSchemaTypes=J.DataType=void 0;const bo=Te,Eo=he,Po=Fe,V=C,ls=N;var Ve;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ve||(J.DataType=Ve={}));function So(e){const t=ds(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}J.getSchemaTypes=So;function ds(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(bo.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}J.getJSONTypes=ds;function jo(e,t){const{gen:r,data:n,opts:s}=e,o=Oo(t,s.coerceTypes),i=t.length>0&&!(o.length===0&&t.length===1&&(0,Eo.schemaHasRulesForType)(e,t[0]));if(i){const c=xr(t,n,s.strictNumbers,Ve.Wrong);r.if(c,()=>{o.length?Ro(e,t,o):zr(e)})}return i}J.coerceAndCheckDataType=jo;const fs=new Set(["string","number","integer","boolean","null"]);function Oo(e,t){return t?e.filter(r=>fs.has(r)||t==="array"&&r==="array"):[]}function Ro(e,t,r){const{gen:n,data:s,opts:o}=e,i=n.let("dataType",(0,V._)`typeof ${s}`),c=n.let("coerced",(0,V._)`undefined`);o.coerceTypes==="array"&&n.if((0,V._)`${i} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,V._)`${s}[0]`).assign(i,(0,V._)`typeof ${s}`).if(xr(t,s,o.strictNumbers),()=>n.assign(c,s))),n.if((0,V._)`${c} !== undefined`);for(const l of r)(fs.has(l)||l==="array"&&o.coerceTypes==="array")&&u(l);n.else(),zr(e),n.endIf(),n.if((0,V._)`${c} !== undefined`,()=>{n.assign(s,c),ko(e,c)});function u(l){switch(l){case"string":n.elseIf((0,V._)`${i} == "number" || ${i} == "boolean"`).assign(c,(0,V._)`"" + ${s}`).elseIf((0,V._)`${s} === null`).assign(c,(0,V._)`""`);return;case"number":n.elseIf((0,V._)`${i} == "boolean" || ${s} === null
|
|
3
3
|
|| (${i} == "string" && ${s} && ${s} == +${s})`).assign(c,(0,V._)`+${s}`);return;case"integer":n.elseIf((0,V._)`${i} === "boolean" || ${s} === null
|
|
4
4
|
|| (${i} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,(0,V._)`+${s}`);return;case"boolean":n.elseIf((0,V._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf((0,V._)`${s} === "true" || ${s} === 1`).assign(c,!0);return;case"null":n.elseIf((0,V._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(c,null);return;case"array":n.elseIf((0,V._)`${i} === "string" || ${i} === "number"
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{g as Pn}from"./contentful-5JGMFnCq.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};
|