@fangorn-network/westmarch 0.0.19-dev → 2026.10.20-dev
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/README.md +29 -1
- package/docs/app-to-agent.md +81 -26
- package/package.json +9 -5
- package/plugin/scripts/fx.mjs +7 -9
- package/site/dist/assets/AccountNotFoundScreen-C4njXc69-RUyAWRzV.js +1 -0
- package/site/dist/assets/AddFundsSelectionScreen-RAoCn7ej-ZV-LlYBe.js +31 -0
- package/site/dist/assets/Address-H8kD1d9O-CGQnt7Pu.js +17 -0
- package/site/dist/assets/AffirmativeConsentScreen-BG0MJxku-CKn2JLwq.js +6 -0
- package/site/dist/assets/AllowlistRejectionScreen-Cae6e1Od-9oIP9fma.js +1 -0
- package/site/dist/assets/ArrowsRightLeftIcon-BEhBD_6N.js +1 -0
- package/site/dist/assets/AuthenticateWithWalletScreen-CU6hIcFT-D1wLlSJs.js +1 -0
- package/site/dist/assets/AwaitingEvmToSolBridgingScreen-D0e_sZMS-CSBbHTyz.js +1 -0
- package/site/dist/assets/AwaitingExternalEthereumTransferScreen-ur5HL4R7-BsRq-xBt.js +1 -0
- package/site/dist/assets/AwaitingPasswordlessCodeScreen-DRHz76mM-BPdhsKvN.js +103 -0
- package/site/dist/assets/AwaitingSolToEvmBridgingScreen-CdLRrGD2-CEGNdrkr.js +1 -0
- package/site/dist/assets/BridgeNetworkSelectionView-CFGjB2nO-Da9P7eSx.js +68 -0
- package/site/dist/assets/CaptchaScreen-DbpvkIGx-BecgMnD_.js +1 -0
- package/site/dist/assets/CheckCircleIcon-DBiWFjO6.js +1 -0
- package/site/dist/assets/CheckCircleIcon-DzG2ROJZ.js +1 -0
- package/site/dist/assets/Checkbox-D1EDeo41-DMHcj9o_.js +52 -0
- package/site/dist/assets/ChevronDownIcon-2Os56gUt.js +1 -0
- package/site/dist/assets/Chip-CZKIKt9K-BWzs9fj5.js +26 -0
- package/site/dist/assets/CoinbaseOnrampStatusScreen-BbyCJDXL-CFvcSiDs.js +16 -0
- package/site/dist/assets/ConnectEmailForm-B-VRE0MN-BozkCg8q.js +3 -0
- package/site/dist/assets/ConnectLedgerScreen-DWHABGot-DaCnbBzh.js +10 -0
- package/site/dist/assets/ConnectOnlyLandingScreen-CZYx9Bmp-DUkCLkxD.js +1 -0
- package/site/dist/assets/ConnectOnlyStatusScreen-DCRzjxHx-Dv_5nMkZ.js +1 -0
- package/site/dist/assets/ConnectOrCreateScreen-CUUYUO07-DSGEeB3Y.js +1 -0
- package/site/dist/assets/ConnectPhoneForm-Dek5xn4C-C-s4s_Lq.js +95 -0
- package/site/dist/assets/ConnectWalletView-DqI-PTvX-BKX7fdYr.js +74 -0
- package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-DSoAuMFZ.js +7 -0
- package/site/dist/assets/CopyToClipboard-i_OQSBJr-CZTXyfV0.js +39 -0
- package/site/dist/assets/CopyableText-CQapvaMr-DHO818I0.js +28 -0
- package/site/dist/assets/CrossAppAuthScreen-CLw7ymZq-DW4nRGfz.js +1 -0
- package/site/dist/assets/CustomLandingScreenView-Cm_MBSyX-DH8Nnb4Y.js +22 -0
- package/site/dist/assets/DelegatedActionsConsentScreen-DYF2U4y5-gfUS_uV5.js +1 -0
- package/site/dist/assets/DelegatedActionsRevokeScreen-bPp6Uwyh-DZj9HTHc.js +1 -0
- package/site/dist/assets/DepositAddressAddressStepView-4vdkb55L-eHYsDK9W.js +187 -0
- package/site/dist/assets/DepositAddressScreen-DBLRs7aI-DK_XVgVk.js +8 -0
- package/site/dist/assets/DepositAddressV3Screen-CDqIEMQw-6gRZzhLe.js +1 -0
- package/site/dist/assets/{EmailInputForm-Cqo1mda8-B2NG3K5V.js → EmailInputForm-Cqo1mda8-CZD4r5LM.js} +11 -11
- package/site/dist/assets/EmbeddedWalletConnectingScreen-D4T7DUzs-BZu2ae0k.js +1 -0
- package/site/dist/assets/EmbeddedWalletCreatedScreen-D7WhW5ve-86pviemJ.js +1 -0
- package/site/dist/assets/EmbeddedWalletKeyExportScreen-CqV4NYQ3-vDcvT53Y.js +23 -0
- package/site/dist/assets/EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-rNJAtSJc.js +1 -0
- package/site/dist/assets/EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-I8Q95280.js +1 -0
- package/site/dist/assets/EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-Coi7OxoI.js +1 -0
- package/site/dist/assets/EnrollTotp-Dibew4dp-DC7FrDgo.js +66 -0
- package/site/dist/assets/EnvelopeIcon-DY6ERnW7.js +1 -0
- package/site/dist/assets/ErrorBanner-BcpGRt0h-BvESwN99.js +21 -0
- package/site/dist/assets/{ErrorMessage-D8VaAP5m-CrZOnUyg.js → ErrorMessage-D8VaAP5m-oSruKN8L.js} +2 -2
- package/site/dist/assets/ErrorScreen-DipdTWzE-DnKGxH1Z.js +4 -0
- package/site/dist/assets/ExclamationCircleIcon-BZhlqH0r.js +1 -0
- package/site/dist/assets/ExclamationTriangleIcon-CkAOJIYV.js +1 -0
- package/site/dist/assets/FarcasterConnectStatusScreen-51tjUxqq-4pi7jooW.js +75 -0
- package/site/dist/assets/FarcasterSignerStatusScreen-6x-Uh95G-z2XCMaLL.js +28 -0
- package/site/dist/assets/FiatOnrampScreen-BAhYeiTI-CBVA9v1-.js +491 -0
- package/site/dist/assets/FingerPrintIcon-ra2dqmJO.js +1 -0
- package/site/dist/assets/FundSolWalletWithExternalSolanaWallet-WtLwYaOl-DwAwc6Ny.js +1 -0
- package/site/dist/assets/FundWalletMethodHeader-BWNkokCT-CZszQsZf.js +1 -0
- package/site/dist/assets/FundWithBankDepositScreen-DajkHxBD-DfX6nvFQ.js +58 -0
- package/site/dist/assets/FundingEditAmountScreen-CpvpiO4M-CDS_sk_t.js +1 -0
- package/site/dist/assets/FundingMethodSelectionScreen-Db7vhRlE-CPfNQemT.js +1 -0
- package/site/dist/assets/GlobeAltIcon-SEUEIe_E.js +1 -0
- package/site/dist/assets/GooglePay-B53WnudL-aap7zwag.js +1 -0
- package/site/dist/assets/HCaptchaWrapper-CUi9LJsp-DgSjCjQI.js +4 -0
- package/site/dist/assets/InAppBrowserLoginNotPossible-BMR9br1T-DO4wICml.js +1 -0
- package/site/dist/assets/InfoBanner-Cb3p1z12-CDWt2ADo.js +22 -0
- package/site/dist/assets/InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js +1 -0
- package/site/dist/assets/InstallWalletScreen-DTA8dwLv-DGpewEch.js +1 -0
- package/site/dist/assets/{JsonTree-BHzNC-ic-DcNcbSoM.js → JsonTree-BHzNC-ic-pAEq1bl9.js} +3 -3
- package/site/dist/assets/{LabelXs-oqZNqbm_-iafrj25N.js → LabelXs-oqZNqbm_-D09YjVR4.js} +2 -2
- package/site/dist/assets/LandingScreen-CGWUoSUG-CUOCWUXd.js +1 -0
- package/site/dist/assets/{Layouts-BMRfo5hw-CeCOyCLK.js → Layouts-BMRfo5hw-D2u1-w8g.js} +16 -16
- package/site/dist/assets/Link-BdDilT2T-BYiP1zvW.js +40 -0
- package/site/dist/assets/LinkConflictScreen-C3ZEPsgl-Tb6cAepT.js +77 -0
- package/site/dist/assets/LinkEmailScreen-dKo9frwc-pq0NF2JO.js +1 -0
- package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js +117 -0
- package/site/dist/assets/LinkPhoneScreen-oIUpfj0w-B80UJqAZ.js +1 -0
- package/site/dist/assets/{LoadingSkeleton-BMsgO5PV-CiEyS5PZ.js → LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js} +6 -6
- package/site/dist/assets/LockClosedIcon-BqkoEL9J.js +1 -0
- package/site/dist/assets/LoginFailedScreen-CN0dJV6U-DlnOM-Kh.js +1 -0
- package/site/dist/assets/ManualTransferScreen-CHqcuqbs-DSShupq9.js +1 -0
- package/site/dist/assets/MfaAuthEnrollmentFlowScreen-Dj7gPTRC-DUPV_SLA.js +1 -0
- package/site/dist/assets/MfaAuthVerifyFlowScreen-DbFpyWMy-D96GpzXX.js +1 -0
- package/site/dist/assets/MfaEnrollmentFlowScreen-DhLnGgnr-CYQDa4ND.js +1 -0
- package/site/dist/assets/MfaVerifyFlowScreen-C_XPjMRP-CJtSAXGN.js +1 -0
- package/site/dist/assets/ModalFooter-BCuEK_nz-D2I8KWtk.js +403 -0
- package/site/dist/assets/MoonpayStatusScreen-CzTUtokc-Bx5aHy-z.js +16 -0
- package/site/dist/assets/OAuthStatusScreen-ufbOa-da-CS6988X2.js +1 -0
- package/site/dist/assets/OpenLink-CUpJ1mOr-EZWVSX2r.js +39 -0
- package/site/dist/assets/PasskeySelectSignupOrLogin-xh2ScC_l-BY4eK5Jh.js +1 -0
- package/site/dist/assets/PasskeyStatusScreen-Bla8MaOk-LXys76u9.js +6 -0
- package/site/dist/assets/PasswordRecoveryScreen-awGXZkQk-RczvLvmo.js +20 -0
- package/site/dist/assets/{PhArrowCircleDown-D97G-BOA.js → PhArrowCircleDown-BtlNV0TZ.js} +5 -5
- package/site/dist/assets/PhArrowClockwise-mOiWYLMV.js +14 -0
- package/site/dist/assets/PhArrowDown-CkoOD89h.js +14 -0
- package/site/dist/assets/PhArrowLeft-C0jlxVhM.js +14 -0
- package/site/dist/assets/PhArrowRight-BI-V03Xf.js +14 -0
- package/site/dist/assets/{PhArrowSquareOut-Bk2CMG3I.js → PhArrowSquareOut-DnQ7n_B4.js} +5 -5
- package/site/dist/assets/PhArrowUp-izKvURUW.js +14 -0
- package/site/dist/assets/PhArrowUpRight-Bn-JhHsY.js +14 -0
- package/site/dist/assets/{PhArrowsClockwise-BXRn1GEl.js → PhArrowsClockwise-Brtx2Re-.js} +5 -5
- package/site/dist/assets/{PhArrowsDownUp-DM09Jo_3.js → PhArrowsDownUp-PZosTqZG.js} +5 -5
- package/site/dist/assets/PhArrowsLeftRight-CYsRQ2qh.js +14 -0
- package/site/dist/assets/{PhBank-fHbgCqqZ.js → PhBank-hhPAIPVb.js} +5 -5
- package/site/dist/assets/PhBrowser-BjzAmrHO.js +14 -0
- package/site/dist/assets/PhCaretDown-ddSjwcwm.js +14 -0
- package/site/dist/assets/PhCaretLeft-B7YLoNEF.js +14 -0
- package/site/dist/assets/PhCaretRight-BY8D5MIg.js +14 -0
- package/site/dist/assets/PhCaretUp-BG10nSut.js +14 -0
- package/site/dist/assets/PhCheck-DrKd7pBC.js +14 -0
- package/site/dist/assets/{PhCircleHalf-MJZeRBGF.js → PhCircleHalf-Bk9C4DvT.js} +5 -5
- package/site/dist/assets/PhClock-Sj17weCB.js +14 -0
- package/site/dist/assets/{PhCompass-hYn3HhGN.js → PhCompass-Df1ugFO-.js} +5 -5
- package/site/dist/assets/PhCopy-rgttky8E.js +14 -0
- package/site/dist/assets/{PhCreditCard-Fy4pzwtt.js → PhCreditCard-CZpdid2n.js} +5 -5
- package/site/dist/assets/{PhCurrencyDollar-BgiaenCi.js → PhCurrencyDollar-B6IKKjue.js} +5 -5
- package/site/dist/assets/{PhDesktop-CxrzCSv5.js → PhDesktop-BuCDXYJj.js} +5 -5
- package/site/dist/assets/PhDeviceMobile-CnybhXY-.js +14 -0
- package/site/dist/assets/PhDotsThree-CSAEcba1.js +14 -0
- package/site/dist/assets/PhEnvelope-SmaNeXoQ.js +14 -0
- package/site/dist/assets/PhFunnelSimple-DKx35ITq.js +14 -0
- package/site/dist/assets/{PhGlobe-DvmSc9_A.js → PhGlobe-q1mqj65V.js} +5 -5
- package/site/dist/assets/{PhIdentificationCard-CfkZm-5K.js → PhIdentificationCard-BeLXJpfZ.js} +5 -5
- package/site/dist/assets/{PhImage-Cf0J2ZfJ.js → PhImage-BYrKfN9k.js} +5 -5
- package/site/dist/assets/{PhInfo-Bwi51-2X.js → PhInfo-X33f06Ej.js} +5 -5
- package/site/dist/assets/{PhLightbulb-C4FZV7Es.js → PhLightbulb-DMZJsowR.js} +5 -5
- package/site/dist/assets/PhMagnifyingGlass-B6D0sWFL.js +14 -0
- package/site/dist/assets/{PhPaperPlaneRight-zxQVvPLX.js → PhPaperPlaneRight-Dvo-nXr9.js} +5 -5
- package/site/dist/assets/PhPlus-CBvZvLax.js +14 -0
- package/site/dist/assets/{PhPower-CFyWDmgD.js → PhPower-D8-AcNM6.js} +5 -5
- package/site/dist/assets/{PhPuzzlePiece-BjoNVfST.js → PhPuzzlePiece-C-7mYqGO.js} +5 -5
- package/site/dist/assets/{PhQrCode-CP3tFauY.js → PhQrCode-uIXlI5ER.js} +5 -5
- package/site/dist/assets/{PhQuestion-wOWJBd3G.js → PhQuestion-rUoqC2sC.js} +5 -5
- package/site/dist/assets/{PhQuestionMark-CV0k9C0Y.js → PhQuestionMark-W55Txvvb.js} +5 -5
- package/site/dist/assets/{PhSealCheck-vIKzREuN.js → PhSealCheck-BeVLq9PH.js} +5 -5
- package/site/dist/assets/{PhSignOut-CxELV-i0.js → PhSignOut-Cq2PivQ6.js} +5 -5
- package/site/dist/assets/{PhSpinner-CGDmbzUd.js → PhSpinner-CZMtAFdX.js} +5 -5
- package/site/dist/assets/{PhTrash-C9PD0SAt.js → PhTrash-BamrmMsN.js} +5 -5
- package/site/dist/assets/{PhUser-0sWNXQeZ.js → PhUser-A2fxqIV0.js} +5 -5
- package/site/dist/assets/{PhVault-6JTskUcC.js → PhVault-B8m1usHw.js} +5 -5
- package/site/dist/assets/{PhWarning-CoKs3gz6.js → PhWarning-CpkID9oi.js} +5 -5
- package/site/dist/assets/PhWarningCircle-Cm58gXb9.js +14 -0
- package/site/dist/assets/PhX-C3b4cCEy.js +14 -0
- package/site/dist/assets/PhoneIcon-CzbssTb8.js +1 -0
- package/site/dist/assets/PinInput-DbZ0b1i1-1DtLWL81.js +247 -0
- package/site/dist/assets/QrCode-DbnZwlkH-ChwcUk_h.js +22 -0
- package/site/dist/assets/RecoveryOAuthStatusScreen-CsgtTI2x-C79jd345.js +1 -0
- package/site/dist/assets/RecoveryPasswordCreateScreen-Be-qJ-LU-C9c0x-yq.js +1 -0
- package/site/dist/assets/RecoverySelectionScreen-D1iGtpmi-PNqHb6CI.js +7 -0
- package/site/dist/assets/{Screen-D30meWsY-CCeVNuWs.js → Screen-D30meWsY-DDum2qlY.js} +22 -22
- package/site/dist/assets/{ScreenHeader-CHmc4-Lu-DjyrH7IK.js → ScreenHeader-CHmc4-Lu-BqrAEXbV.js} +4 -4
- package/site/dist/assets/ScreenLayout-OwaQQcxH-B4Z8FjFp.js +1 -0
- package/site/dist/assets/{SelectSourceAsset-CWFog6gm-RKjBsB6m.js → SelectSourceAsset-CWFog6gm-8iXuqbAs.js} +18 -18
- package/site/dist/assets/SetAutomaticRecoveryScreen-BO_OEqAZ-CUpQZ9wq.js +14 -0
- package/site/dist/assets/SetWalletPasswordForm-DwCTVtAh-ZzvPLj2s.js +15 -0
- package/site/dist/assets/ShieldCheckIcon-Bjwe_-PV.js +1 -0
- package/site/dist/assets/SignRequestScreen-BHKv32KR-0qGeNipB.js +26 -0
- package/site/dist/assets/{StackedContainer-B2vaEl56-eQCM2cmv.js → StackedContainer-B2vaEl56-C-ojzCoQ.js} +2 -2
- package/site/dist/assets/StandardSignAndSendTransactionScreen-CfhIXVtd-C3lgJb68.js +20 -0
- package/site/dist/assets/{Subtitle-CV-2yKE4-zxWw2m1Q.js → Subtitle-CV-2yKE4-o-1FQLlX.js} +2 -2
- package/site/dist/assets/TelegramAuthScreen-UL9zLfO8-l35_C2DG.js +1 -0
- package/site/dist/assets/{Title-BnzYV3Is-B_JpTatT.js → Title-BnzYV3Is-RX1f0RV-.js} +2 -2
- package/site/dist/assets/TodoList-DnyULl18-JxWWU9KA.js +36 -0
- package/site/dist/assets/TransactionDetails-e9nesl30-C91nJPM9.js +109 -0
- package/site/dist/assets/TransactionErrorView-BDBNqA_f-Cpm-4xzm.js +178 -0
- package/site/dist/assets/TransferFromWalletScreen-Qvn1Yuno-BWCH7-Si.js +31 -0
- package/site/dist/assets/TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js +6 -0
- package/site/dist/assets/TurnstileWrapper-B7sNddys-Dgr80Gih.js +1 -0
- package/site/dist/assets/UpdateEmailScreen-DVOhPV0H-Clk4zk-8.js +1 -0
- package/site/dist/assets/UpdatePhoneScreen-CXRswTNZ-BgRsoR3B.js +1 -0
- package/site/dist/assets/UserLimitReachedScreen-5we2DHn8-D-SU-vAz.js +1 -0
- package/site/dist/assets/{Value-DTgR824E-BRuIGiec.js → Value-DTgR824E-DZpvBCWi.js} +7 -7
- package/site/dist/assets/WalletCards-DH1rqayz-UuZ4i_Ze.js +1 -0
- package/site/dist/assets/WalletIcon-B1i03Vqc.js +1 -0
- package/site/dist/assets/WalletInfoCard-sq_2wgFg-TXTxmb8L.js +29 -0
- package/site/dist/assets/WalletInterstitialScreen-Sh7LfsAh-CbrFb0ON.js +1 -0
- package/site/dist/assets/WalletLink-DK5LB5Ha-BYQZV7UV.js +20 -0
- package/site/dist/assets/WalletOverflowButton-bfCnp-9T-CNgSPnTS.js +1 -0
- package/site/dist/assets/WarningBanner-ZZqCEtZK-DNZUUOph.js +21 -0
- package/site/dist/assets/__vite-browser-external-BIHI7g3E.js +1 -0
- package/site/dist/assets/analytics-mkkvFRju-DOXuftJB.js +1 -0
- package/site/dist/assets/basic-C9wn6QoQ.js +1575 -0
- package/site/dist/assets/bytes-CjWw8TJh.js +1 -0
- package/site/dist/assets/capitalizeFirstLetter-DmLYqXsO-tV1Idewc.js +1 -0
- package/site/dist/assets/ccip-BhHEqVIW.js +1 -0
- package/site/dist/assets/check-C_DTyjLS.js +1 -0
- package/site/dist/assets/chevron-down-iklXXH-z.js +1 -0
- package/site/dist/assets/circle-alert-KEOUF48T.js +1 -0
- package/site/dist/assets/circle-check-big-BJ_ADwB4.js +1 -0
- package/site/dist/assets/circle-x-BSfWmhYk.js +1 -0
- package/site/dist/assets/client-BnDcP42J.js +9 -0
- package/site/dist/assets/client-DH86IrJA.js +125 -0
- package/site/dist/assets/coinbase-DCPC2L_R-2ivYfoMv.js +3 -0
- package/site/dist/assets/copy-sK00DOfH.js +1 -0
- package/site/dist/assets/core-CRE213RM.js +211 -0
- package/site/dist/assets/createLucideIcon-D9OK_uxG.js +1 -0
- package/site/dist/assets/custom-V1wex-Di.js +1 -0
- package/site/dist/assets/dijkstra-COg3n3zL.js +1 -0
- package/site/dist/assets/embed.worker-BRIYO7m8.js +1 -0
- package/site/dist/assets/encodePacked-DyXYq3Cc.js +1 -0
- package/site/dist/assets/ethers-zTjbodk5-DSYOi6tU.js +1 -0
- package/site/dist/assets/external-link-Cdp8NBio.js +1 -0
- package/site/dist/assets/fallback-DiFue5Zm.js +1 -0
- package/site/dist/assets/farcaster-DPlSjvF5-DP2DLoHZ.js +1 -0
- package/site/dist/assets/features-B6BTj_BL.js +5 -0
- package/site/dist/assets/fingerprint-pattern-gFJTz5e4.js +1 -0
- package/site/dist/assets/floating-ui.react-D9ndYqYK.js +1 -0
- package/site/dist/assets/floating-ui.react-dom-CNbOgOFt.js +1 -0
- package/site/dist/assets/formatErc20TokenAmount-BuPk9xcy-CkAr4Oc0.js +1 -0
- package/site/dist/assets/getChainName-DjpPdUSc-c2urPd0g.js +1 -0
- package/site/dist/assets/getErc20Balance-jXNpFf0N-mFQ9Iqk-.js +1 -0
- package/site/dist/assets/getErc20TokenInfo-BNTrzLMP-Dx5he_uG.js +1 -0
- package/site/dist/assets/getFormattedUsdFromLamports-De3U9GlO-C446pzMl.js +1 -0
- package/site/dist/assets/getTransactionCount-80UHlwAV.js +1 -0
- package/site/dist/assets/getUsdcMintAddress-BVgm9GRo-FDalV59C.js +1 -0
- package/site/dist/assets/hashTypedData-Beq57Ogb.js +22 -0
- package/site/dist/assets/hooks.module-ClpaQ1Tg.js +1 -0
- package/site/dist/assets/hourglass-CB7z_I9H.js +1 -0
- package/site/dist/assets/http-BocEfKYb.js +19 -0
- package/site/dist/assets/index-0knDOgU9.js +1 -0
- package/site/dist/assets/index-9jNeS_nC.js +1 -0
- package/site/dist/assets/index-B--T-Fmt.js +16 -0
- package/site/dist/assets/index-BDkarAkX.js +2 -0
- package/site/dist/assets/index-BMfMy017.js +679 -0
- package/site/dist/assets/index-BOd8jv8-.js +1 -0
- package/site/dist/assets/index-BdEw5wyl-2VGMzHIs.js +1 -0
- package/site/dist/assets/index-C8ThRelw.js +9 -0
- package/site/dist/assets/{index-CWARkn2w-Cezl_uBr.js → index-CWARkn2w-D6ikWJWj.js} +7 -7
- package/site/dist/assets/{wui-ux-by-reown-fVu0QkI4.js → index-CztIxJB6.js} +296 -296
- package/site/dist/assets/index-D4LdLFDC.js +1 -0
- package/site/dist/assets/index-D6T-s6sR.js +1 -0
- package/site/dist/assets/index-D7396TWe.js +1 -0
- package/site/dist/assets/index-DdxtHe81.js +2 -0
- package/site/dist/assets/index-DvMddJcd-D7AEQrzj.js +12 -0
- package/site/dist/assets/index-nibyPLVP.js +1 -0
- package/site/dist/assets/index.browser-B6Bt5URJ.js +1 -0
- package/site/dist/assets/isPaymentRequestAvailable-Bq1cemEn-D7xtzRqA.js +1 -0
- package/site/dist/assets/landmark-CMLKifhk.js +1 -0
- package/site/dist/assets/lock-BkyjNE8h.js +1 -0
- package/site/dist/assets/mail-B6-Tq9Ld.js +1 -0
- package/site/dist/assets/native-CJ5et6AR.js +1 -0
- package/site/dist/assets/nonceManager-zkW7cM66.js +1 -0
- package/site/dist/assets/parseEther-C7aOvuze.js +1 -0
- package/site/dist/assets/parseSignature-BIjcuWdB.js +1 -0
- package/site/dist/assets/preload-helper-PPVm8Dsz.js +1 -0
- package/site/dist/assets/privateKeyToAccount-CRvvpHWf.js +1 -0
- package/site/dist/assets/property-CnFDNXw5.js +3 -0
- package/site/dist/assets/react-auth_false-DedQs79w.js +1 -0
- package/site/dist/assets/reservoir-x-nGuZkT-DFxAFt2v.js +1 -0
- package/site/dist/assets/roles-DV_6FRBZ.js +1 -0
- package/site/dist/assets/safe-url-D7SRPu33-A8zMgOTd.js +1 -0
- package/site/dist/assets/serializeErc6492Signature-CeJeL3h6.js +1 -0
- package/site/dist/assets/serializeTransaction-L-_Ej-jW.js +8 -0
- package/site/dist/assets/{shared-DRZUmnL5-xqAUARWo.js → shared-DRZUmnL5-MWD-C-pp.js} +33 -33
- package/site/dist/assets/{shared-FM0rljBt--Avg6q2R.js → shared-FM0rljBt-c4eSjzGj.js} +6 -6
- package/site/dist/assets/shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-CF2QteTJ.js +1 -0
- package/site/dist/assets/simulateTransaction-CfuOrae4-BHUMPf6Q.js +1 -0
- package/site/dist/assets/smartphone-DAN5rY0T.js +1 -0
- package/site/dist/assets/stripe.esm-Dv8C3q95.js +2 -0
- package/site/dist/assets/styles-BsotlekN-Cjuu2SDV.js +9 -0
- package/site/dist/assets/{styles-Cm9H63WO-D90SsXOs.js → styles-Cm9H63WO-Cv1TbqYi.js} +17 -17
- package/site/dist/assets/{styles-DVyDvTdj-BTABn2K8.js → styles-DVyDvTdj-CI4xZNHp.js} +8 -8
- package/site/dist/assets/{styles-hslXy6xG-D-49b1rk.js → styles-hslXy6xG-DeVcFoDD.js} +23 -23
- package/site/dist/assets/telegram-B-JqnkqZ-DTjJLkIF.js +1 -0
- package/site/dist/assets/to-ui-error-DWe-qwS3-Dx3yzcV0.js +4 -0
- package/site/dist/assets/toAccount-Bq6rbpbI.js +1 -0
- package/site/dist/assets/transaction-BNTP-bFm-CrebgH-D.js +1 -0
- package/site/dist/assets/transactionReceipt-BwJl-gjg.js +1 -0
- package/site/dist/assets/transfer-6YztDh-t-DU6hH7CZ.js +1 -0
- package/site/dist/assets/transformers.web-BEKVh7pD.js +40 -0
- package/site/dist/assets/transformers.web-aWa49tv1.js +40 -0
- package/site/dist/assets/triangle-alert-ndoiBs4y.js +1 -0
- package/site/dist/assets/twitch-5IOe4sIQ-BXviIywg.js +1 -0
- package/site/dist/assets/useGetSolPrice-x7gfUIHJ-C7axYJ--.js +1 -0
- package/site/dist/assets/useGetTokenPrice-CaoUkb79-CR4CrguU.js +1 -0
- package/site/dist/assets/useI18n-C-5n_noF-C_t8QqBJ.js +1 -0
- package/site/dist/assets/useWalletBalance-CZnP5f_f-BnSHLVI_.js +1 -0
- package/site/dist/assets/w3m-modal-Bz5KWTQ-.js +1174 -0
- package/site/dist/assets/wallet-DTM31trz.js +2 -0
- package/site/dist/assets/wallet-UESEqPei.js +1 -0
- package/site/dist/assets/wallet-connect-BvJtUsDt-CnvUnFbz.js +1 -0
- package/site/dist/assets/walletconnect-v2-3frQFwbg-CzQk99gS.js +15 -0
- package/site/dist/assets/x-B2_XdOVQ.js +1 -0
- package/site/dist/index.html +120 -8
- package/site/feed.js +16 -1
- package/site/no-model.js +4 -0
- package/site/worker.js +597 -58
- package/src/agent/agent-card.js +20 -11
- package/src/agent/mcp.js +150 -316
- package/src/agent/view-tools.js +53 -12
- package/src/agent/x402.js +379 -44
- package/src/core/embed.js +51 -52
- package/src/core/embed.worker.js +1 -1
- package/src/core/shard.js +7 -3
- package/src/discover/apps.js +4 -3
- package/src/discover/explore.js +36 -22
- package/src/market/reactions.js +2 -2
- package/src/publish/devnet.js +95 -0
- package/src/publish/lint.js +2 -1
- package/src/publish/ship.js +517 -236
- package/src/publish/view-cli.js +11 -10
- package/src/publish/view.js +359 -206
- package/src/taste/taste-doc.js +3 -2
- package/src/taste/taste.js +2 -2
- package/src/taste/vault.js +3 -1
- package/site/dist/assets/AccountNotFoundScreen-C4njXc69-BOfmiSH1.js +0 -1
- package/site/dist/assets/AddFundsSelectionScreen-RAoCn7ej-B6uvYyqa.js +0 -31
- package/site/dist/assets/Address-H8kD1d9O-DcHv7A8C.js +0 -17
- package/site/dist/assets/AffirmativeConsentScreen-BG0MJxku-v2wz-N-s.js +0 -6
- package/site/dist/assets/AllowlistRejectionScreen-Cae6e1Od-DhVy9iGN.js +0 -1
- package/site/dist/assets/ApiController-BbhXeqTV.js +0 -5
- package/site/dist/assets/ArrowsRightLeftIcon-cp60yobq.js +0 -1
- package/site/dist/assets/AuthenticateWithWalletScreen-CU6hIcFT-B0eT1zE6.js +0 -1
- package/site/dist/assets/AwaitingEvmToSolBridgingScreen-D0e_sZMS-DL5PH-v_.js +0 -1
- package/site/dist/assets/AwaitingExternalEthereumTransferScreen-ur5HL4R7-n1BsRPqc.js +0 -1
- package/site/dist/assets/AwaitingPasswordlessCodeScreen-DRHz76mM-BVl2BJDY.js +0 -103
- package/site/dist/assets/AwaitingSolToEvmBridgingScreen-CdLRrGD2-BD-OZUQb.js +0 -1
- package/site/dist/assets/BridgeNetworkSelectionView-CFGjB2nO-CaYrzRje.js +0 -68
- package/site/dist/assets/CaptchaScreen-DbpvkIGx-BQJ7inx1.js +0 -1
- package/site/dist/assets/CheckCircleIcon-BM409mGI.js +0 -1
- package/site/dist/assets/CheckCircleIcon-NCOQc0Gs.js +0 -1
- package/site/dist/assets/Checkbox-D1EDeo41-rHlvsZzP.js +0 -52
- package/site/dist/assets/ChevronDownIcon-CW-4MSpE.js +0 -1
- package/site/dist/assets/Chip-CZKIKt9K-CutJG010.js +0 -26
- package/site/dist/assets/CoinbaseOnrampStatusScreen-BbyCJDXL-DDaMC7cl.js +0 -16
- package/site/dist/assets/ConnectEmailForm-B-VRE0MN-DVSf4tFJ.js +0 -3
- package/site/dist/assets/ConnectLedgerScreen-DWHABGot-h0uYIUi6.js +0 -10
- package/site/dist/assets/ConnectOnlyLandingScreen-CZYx9Bmp-DP19hJq5.js +0 -1
- package/site/dist/assets/ConnectOnlyStatusScreen-DCRzjxHx-DHvijlTx.js +0 -1
- package/site/dist/assets/ConnectOrCreateScreen-CUUYUO07-ewmXYPTQ.js +0 -1
- package/site/dist/assets/ConnectPhoneForm-Dek5xn4C-DUYdmVtr.js +0 -95
- package/site/dist/assets/ConnectWalletView-DqI-PTvX-RobGErVW.js +0 -74
- package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-Bbiq3hY6.js +0 -1
- package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-DPkOGNWl.js +0 -7
- package/site/dist/assets/ConnectorUtil-BO1L6VvV.js +0 -21
- package/site/dist/assets/ConstantsUtil-DmLsRHAl.js +0 -198
- package/site/dist/assets/CopyToClipboard-i_OQSBJr-DujUHNzW.js +0 -39
- package/site/dist/assets/CopyableText-CQapvaMr-DMIdpDaU.js +0 -28
- package/site/dist/assets/CrossAppAuthScreen-CLw7ymZq-DbGy4QyA.js +0 -1
- package/site/dist/assets/CustomLandingScreenView-Cm_MBSyX-B3WqJZBh.js +0 -22
- package/site/dist/assets/DelegatedActionsConsentScreen-DYF2U4y5-CmUDoS0C.js +0 -1
- package/site/dist/assets/DelegatedActionsRevokeScreen-bPp6Uwyh-fcO51q5H.js +0 -1
- package/site/dist/assets/DepositAddressAddressStepView-4vdkb55L-ClAb_j1B.js +0 -187
- package/site/dist/assets/DepositAddressScreen-DBLRs7aI-CN1P_KY9.js +0 -8
- package/site/dist/assets/DepositAddressV3Screen-CDqIEMQw-BtDZmuEN.js +0 -1
- package/site/dist/assets/EmbeddedWalletConnectingScreen-D4T7DUzs-D3pExuaW.js +0 -1
- package/site/dist/assets/EmbeddedWalletCreatedScreen-D7WhW5ve-CLsJbPYQ.js +0 -1
- package/site/dist/assets/EmbeddedWalletKeyExportScreen-CqV4NYQ3-DI6bu-oi.js +0 -23
- package/site/dist/assets/EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-BQ9Ygr0P.js +0 -1
- package/site/dist/assets/EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-CxrfLr5q.js +0 -1
- package/site/dist/assets/EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-DHZRGoTN.js +0 -1
- package/site/dist/assets/EnrollTotp-Dibew4dp-7gVtJ1Jt.js +0 -66
- package/site/dist/assets/EnvelopeIcon-Dh2vSVj4.js +0 -1
- package/site/dist/assets/ErrorBanner-BcpGRt0h-BKOYTyCi.js +0 -21
- package/site/dist/assets/ErrorScreen-DipdTWzE-BT8TtRTx.js +0 -4
- package/site/dist/assets/ErrorScreen-DipdTWzE-DAam41Xl.js +0 -1
- package/site/dist/assets/ExclamationCircleIcon-DUA2wMfO.js +0 -1
- package/site/dist/assets/ExclamationTriangleIcon-eZfaqcFq.js +0 -1
- package/site/dist/assets/FarcasterConnectStatusScreen-51tjUxqq-BPCBi37Q.js +0 -75
- package/site/dist/assets/FarcasterSignerStatusScreen-6x-Uh95G-XCmWpnUd.js +0 -28
- package/site/dist/assets/FiatOnrampScreen-BAhYeiTI-DJRcUh2N.js +0 -491
- package/site/dist/assets/FingerPrintIcon-Dm6kxmg7.js +0 -1
- package/site/dist/assets/FundSolWalletWithExternalSolanaWallet-WtLwYaOl-BfNVSTb1.js +0 -1
- package/site/dist/assets/FundWalletMethodHeader-BWNkokCT-BQdbJ5Bb.js +0 -1
- package/site/dist/assets/FundWithBankDepositScreen-DajkHxBD-BfvMcHb6.js +0 -58
- package/site/dist/assets/FundingEditAmountScreen-CpvpiO4M-VBfbahnA.js +0 -1
- package/site/dist/assets/FundingMethodSelectionScreen-Db7vhRlE-CMuBYf64.js +0 -1
- package/site/dist/assets/GlobeAltIcon-vqrVV5ho.js +0 -1
- package/site/dist/assets/GooglePay-B53WnudL-BX5_WtCx.js +0 -1
- package/site/dist/assets/HCaptchaWrapper-CUi9LJsp-D-I8j7NO.js +0 -4
- package/site/dist/assets/InAppBrowserLoginNotPossible-BMR9br1T-BY3j50El.js +0 -1
- package/site/dist/assets/InfoBanner-Cb3p1z12-DLBl_Ywy.js +0 -22
- package/site/dist/assets/InjectedWalletIcon-DLcYOGDj-DLSV_NjP.js +0 -1
- package/site/dist/assets/InstallWalletScreen-DTA8dwLv-CxreyXoD.js +0 -1
- package/site/dist/assets/LandingScreen-CGWUoSUG-Q7hgXKvM.js +0 -1
- package/site/dist/assets/Link-BdDilT2T-BEDEdHuS.js +0 -40
- package/site/dist/assets/LinkConflictScreen-C3ZEPsgl-DK1z_v7y.js +0 -77
- package/site/dist/assets/LinkEmailScreen-dKo9frwc-BYYpJ5-6.js +0 -1
- package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-uhub9C26.js +0 -1
- package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-uid22VTN.js +0 -117
- package/site/dist/assets/LinkPhoneScreen-oIUpfj0w-CVQibNi9.js +0 -1
- package/site/dist/assets/Loader-UAZqxsnw-Cy7hEE2f.js +0 -62
- package/site/dist/assets/LockClosedIcon-BgY_5v_Z.js +0 -1
- package/site/dist/assets/LoginFailedScreen-CN0dJV6U-DhUMiJZJ.js +0 -1
- package/site/dist/assets/ManualTransferScreen-CHqcuqbs-DMygAXMU.js +0 -1
- package/site/dist/assets/MfaAuthEnrollmentFlowScreen-Dj7gPTRC-_1GFUSIg.js +0 -1
- package/site/dist/assets/MfaAuthVerifyFlowScreen-DbFpyWMy-DLnBJ5b8.js +0 -1
- package/site/dist/assets/MfaEnrollmentFlowScreen-DhLnGgnr-BUJY1lzs.js +0 -1
- package/site/dist/assets/MfaVerifyFlowScreen-C_XPjMRP-25l5fVun.js +0 -1
- package/site/dist/assets/ModalFooter-BCuEK_nz-c-khvG4Y.js +0 -403
- package/site/dist/assets/MoonpayStatusScreen-CzTUtokc-BRFN2eXr.js +0 -16
- package/site/dist/assets/OAuthStatusScreen-ufbOa-da-DL30vu07.js +0 -1
- package/site/dist/assets/OpenLink-CUpJ1mOr-DfAvJRyK.js +0 -39
- package/site/dist/assets/PasskeySelectSignupOrLogin-xh2ScC_l-DtxhRQyw.js +0 -1
- package/site/dist/assets/PasskeyStatusScreen-Bla8MaOk-CNfu8ujT.js +0 -6
- package/site/dist/assets/PasswordRecoveryScreen-awGXZkQk-BR6z6xE8.js +0 -20
- package/site/dist/assets/PhArrowClockwise-DVgyFuez.js +0 -14
- package/site/dist/assets/PhArrowDown-87b1BizM.js +0 -14
- package/site/dist/assets/PhArrowLeft-Da0MfnbK.js +0 -14
- package/site/dist/assets/PhArrowRight-AdrIL4DW.js +0 -14
- package/site/dist/assets/PhArrowUp-4sgyKPGx.js +0 -14
- package/site/dist/assets/PhArrowUpRight-BNghD2zq.js +0 -14
- package/site/dist/assets/PhArrowsLeftRight-MuKBLUoF.js +0 -14
- package/site/dist/assets/PhBrowser-2-9m-AkM.js +0 -14
- package/site/dist/assets/PhCaretDown-BDNabFuL.js +0 -14
- package/site/dist/assets/PhCaretLeft-CI460R-A.js +0 -14
- package/site/dist/assets/PhCaretRight-D7ZS3Ls8.js +0 -14
- package/site/dist/assets/PhCaretUp-C-iIfyvO.js +0 -14
- package/site/dist/assets/PhCheck-DxQXn57r.js +0 -14
- package/site/dist/assets/PhClock-x3MS3Mwi.js +0 -14
- package/site/dist/assets/PhCopy-CWNYcABI.js +0 -14
- package/site/dist/assets/PhDeviceMobile-CsyA5Goi.js +0 -14
- package/site/dist/assets/PhDotsThree-D-k1BiYg.js +0 -14
- package/site/dist/assets/PhEnvelope-D8kzeNox.js +0 -14
- package/site/dist/assets/PhFunnelSimple-CfQs5DAW.js +0 -14
- package/site/dist/assets/PhMagnifyingGlass-C9u8jSCJ.js +0 -14
- package/site/dist/assets/PhPlus-C4UoW-2n.js +0 -14
- package/site/dist/assets/PhWarningCircle-BXHw1fCt.js +0 -14
- package/site/dist/assets/PhX-DX0SFIqC.js +0 -14
- package/site/dist/assets/PhoneIcon-CvIiPwYQ.js +0 -1
- package/site/dist/assets/PinInput-DbZ0b1i1-CDXZBdQx.js +0 -247
- package/site/dist/assets/PrivyPluginContext-DA-yS5vO-CtQWBiV2.js +0 -1
- package/site/dist/assets/QrCode-DbnZwlkH-BymHrKY7.js +0 -22
- package/site/dist/assets/RecoveryOAuthStatusScreen-CsgtTI2x-Dro1btv5.js +0 -1
- package/site/dist/assets/RecoveryPasswordCreateScreen-Be-qJ-LU-C1q1hiaN.js +0 -1
- package/site/dist/assets/RecoverySelectionScreen-D1iGtpmi-C21D20gD.js +0 -7
- package/site/dist/assets/SIWXUtil-CHZVugix.js +0 -1
- package/site/dist/assets/ScreenLayout-OwaQQcxH-CrQM6kvA.js +0 -1
- package/site/dist/assets/SetAutomaticRecoveryScreen-BO_OEqAZ-BcWHJoEG.js +0 -14
- package/site/dist/assets/SetWalletPasswordForm-DwCTVtAh-kq1zvA7d.js +0 -11
- package/site/dist/assets/ShieldCheckIcon-o6RHYev1.js +0 -1
- package/site/dist/assets/SignRequestScreen-BHKv32KR-iQCaBkcz.js +0 -26
- package/site/dist/assets/SolanaWalletConnector-C7Lqk-Wz-BUdJJ0ep.js +0 -1
- package/site/dist/assets/StandardSignAndSendTransactionScreen-CfhIXVtd-nART-xUU.js +0 -20
- package/site/dist/assets/TelegramAuthScreen-UL9zLfO8-Dw9geyK3.js +0 -1
- package/site/dist/assets/TodoList-DnyULl18-C8Eyy28X.js +0 -36
- package/site/dist/assets/TransactionDetails-e9nesl30-DeEL1JQS.js +0 -109
- package/site/dist/assets/TransactionErrorView-BDBNqA_f-Dffuo7I4.js +0 -178
- package/site/dist/assets/TransferFromWalletScreen-Qvn1Yuno-CWLWUiHy.js +0 -31
- package/site/dist/assets/TransferOrBridgeLoadingScreen-Dl1I_iIz-Bo-tm6wr.js +0 -6
- package/site/dist/assets/TurnstileWrapper-B7sNddys-Jwy1tJtm.js +0 -1
- package/site/dist/assets/UpdateEmailScreen-DVOhPV0H-gFbSIUhh.js +0 -1
- package/site/dist/assets/UpdatePhoneScreen-CXRswTNZ-Coy4E1NQ.js +0 -1
- package/site/dist/assets/UserLimitReachedScreen-5we2DHn8-D7m70C4b.js +0 -1
- package/site/dist/assets/WalletCards-DH1rqayz-Bgp9Fsgs.js +0 -1
- package/site/dist/assets/WalletIcon-gKf0gTw6.js +0 -1
- package/site/dist/assets/WalletInfoCard-sq_2wgFg-ISBsQt8p.js +0 -29
- package/site/dist/assets/WalletInterstitialScreen-Sh7LfsAh-DG-RuO-F.js +0 -1
- package/site/dist/assets/WalletLink-DK5LB5Ha-CXBqCHf3.js +0 -20
- package/site/dist/assets/WalletOverflowButton-bfCnp-9T-DP0-PoZL.js +0 -1
- package/site/dist/assets/WarningBanner-ZZqCEtZK-2eU4Qo74.js +0 -21
- package/site/dist/assets/__vite-browser-external-CitKSmYk.js +0 -1
- package/site/dist/assets/_esm-CJe2F7LL.js +0 -7
- package/site/dist/assets/_esm-zhBBffjV.js +0 -1
- package/site/dist/assets/accounts-Bq8t1wAD.js +0 -1
- package/site/dist/assets/accounts-D96UKWkC.js +0 -1
- package/site/dist/assets/analytics-mkkvFRju-BRBcadka.js +0 -1
- package/site/dist/assets/baseSepolia-DX-qGsik.js +0 -1
- package/site/dist/assets/basic-MlZ7f4s9.js +0 -1575
- package/site/dist/assets/capitalizeFirstLetter-DmLYqXsO-DtOXx-2n.js +0 -1
- package/site/dist/assets/ccip-BI9LWBBg.js +0 -1
- package/site/dist/assets/ccip-C-59SNEF.js +0 -7
- package/site/dist/assets/ccip-y08wK9du.js +0 -1
- package/site/dist/assets/chain-DM3oH6Px.js +0 -8
- package/site/dist/assets/check-BPgcwEPP.js +0 -1
- package/site/dist/assets/chevron-down-BSsbXkK-.js +0 -1
- package/site/dist/assets/circle-alert-DWaeLZNj.js +0 -1
- package/site/dist/assets/circle-check-big-Chb1ivw9.js +0 -1
- package/site/dist/assets/circle-x-AV9Cet0R.js +0 -1
- package/site/dist/assets/client-D0IV9lV9.js +0 -2
- package/site/dist/assets/client-Dsa7_3V3.js +0 -9
- package/site/dist/assets/coinbase-DCPC2L_R-Rs9nVCfm.js +0 -3
- package/site/dist/assets/copy-Ckr0AkL6.js +0 -1
- package/site/dist/assets/core-zQ1tZtVZ.js +0 -12
- package/site/dist/assets/createLucideIcon-IPW50ckY.js +0 -1
- package/site/dist/assets/defineChain-CiuCXUZW.js +0 -1
- package/site/dist/assets/dijkstra-Drfl93V4.js +0 -1
- package/site/dist/assets/dist-BxQqwnue.js +0 -16
- package/site/dist/assets/dist-Cm7pNAtL.js +0 -1
- package/site/dist/assets/dist-CoS6E-3x.js +0 -1
- package/site/dist/assets/dist-Dl07uGq1.js +0 -1
- package/site/dist/assets/embed.worker-ugGhEqCV.js +0 -1
- package/site/dist/assets/errors-BQ3N-RVt-BLqjTPNR.js +0 -1
- package/site/dist/assets/esm-C3DslVJx.js +0 -1
- package/site/dist/assets/esm-Ci1ogKuK.js +0 -1
- package/site/dist/assets/esm-DXsETz3H.js +0 -1
- package/site/dist/assets/esm-n2lWo7kz.js +0 -1
- package/site/dist/assets/esm-vs5jNx_Y.js +0 -37
- package/site/dist/assets/ethers-zTjbodk5-B7BBFFKf.js +0 -1
- package/site/dist/assets/eventemitter3-CL76jPsW.js +0 -1
- package/site/dist/assets/external-link-D-uehwM2.js +0 -1
- package/site/dist/assets/farcaster-DPlSjvF5-BqTvDXBR.js +0 -1
- package/site/dist/assets/features-CYXRa3_m.js +0 -2
- package/site/dist/assets/fingerprint-pattern-D8ytA16Q.js +0 -1
- package/site/dist/assets/floating-ui.react-dom-DKWOL9UG.js +0 -1
- package/site/dist/assets/floating-ui.react-xRkl9O3u.js +0 -1
- package/site/dist/assets/formatErc20TokenAmount-BuPk9xcy-BVqOKQif.js +0 -1
- package/site/dist/assets/formatter-CVbp4SlJ.js +0 -1
- package/site/dist/assets/get-entropy-details-for-user-dHRH5Gpi-Dukf7_kJ.js +0 -1
- package/site/dist/assets/getChainName-DjpPdUSc-DUyKDrnp.js +0 -1
- package/site/dist/assets/getErc20Balance-jXNpFf0N-V2btxzrJ.js +0 -1
- package/site/dist/assets/getErc20TokenInfo-BNTrzLMP-CtCwQuGA.js +0 -1
- package/site/dist/assets/getFormattedUsdFromLamports-De3U9GlO-Gx4_wxON.js +0 -1
- package/site/dist/assets/getUsdcMintAddress-BVgm9GRo-r2UnDeEy.js +0 -1
- package/site/dist/assets/guards-BIW-GiMJ-CHfXo8XI.js +0 -1
- package/site/dist/assets/hooks.module-BYZGfwDl.js +0 -1
- package/site/dist/assets/hourglass-CPG1HZmf.js +0 -1
- package/site/dist/assets/id-UqEwL2BI-CdKXapd-.js +0 -1
- package/site/dist/assets/index-BdEw5wyl-ChSJvPZk.js +0 -1
- package/site/dist/assets/index-CKdAF_dK.js +0 -8
- package/site/dist/assets/index-DvMddJcd-D-4mRLKK.js +0 -12
- package/site/dist/assets/index-YiCw0Y_x-BX1zsiqG.js +0 -437
- package/site/dist/assets/index.browser-B-i-Lj3J.js +0 -1
- package/site/dist/assets/index.browser-BMmUcykv.js +0 -1
- package/site/dist/assets/index.es-BmqyoBEM.js +0 -2
- package/site/dist/assets/index.es-C1v1or--.js +0 -3
- package/site/dist/assets/isPaymentRequestAvailable-Bq1cemEn-By6r0dVB.js +0 -1
- package/site/dist/assets/jsx-runtime-BbDfbRii.js +0 -1
- package/site/dist/assets/landmark-CH6LV6F0.js +0 -1
- package/site/dist/assets/lib-BsS8z8Lj.js +0 -1
- package/site/dist/assets/localBatchGatewayRequest-5YxrERBj.js +0 -32
- package/site/dist/assets/lock-DcskI4Bb.js +0 -1
- package/site/dist/assets/logger-CsXm3oIv-B0UYpNFI.js +0 -1
- package/site/dist/assets/mail-Bs0r5yOi.js +0 -1
- package/site/dist/assets/modal-context-CwmSeFcv-DruX9J1E.js +0 -1
- package/site/dist/assets/native-BKj27wfc.js +0 -1
- package/site/dist/assets/ofetch.CWycOUEr-CHp-crOQ.js +0 -1
- package/site/dist/assets/parseAbi-Csg-8t59.js +0 -2
- package/site/dist/assets/parseAbiParameters-BWbIMYe4.js +0 -1
- package/site/dist/assets/parseEther-CGP3gnf2.js +0 -1
- package/site/dist/assets/pkce-DXF0yKjP-Bqz4wAsq.js +0 -1
- package/site/dist/assets/preload-helper-BaNbYf_w.js +0 -1
- package/site/dist/assets/privy-context-81KmsBw2-CjWGzyg7.js +0 -2
- package/site/dist/assets/property-DuZ9DLP4.js +0 -3
- package/site/dist/assets/react-DCXkXSrv.js +0 -1
- package/site/dist/assets/react-DQnMl2Xv.js +0 -1
- package/site/dist/assets/react-DrJ0MmMO.js +0 -1
- package/site/dist/assets/react-auth-sHnipzbS.js +0 -1
- package/site/dist/assets/react-dom-5dW7aKoP.js +0 -1
- package/site/dist/assets/reservoir-x-nGuZkT-BMX127i6.js +0 -1
- package/site/dist/assets/roles-32M1l9jI.js +0 -1
- package/site/dist/assets/roles-DKPW79Ca.js +0 -1
- package/site/dist/assets/rolldown-runtime-BcKkbAw3.js +0 -1
- package/site/dist/assets/safe-url-D7SRPu33-CkMedGro.js +0 -1
- package/site/dist/assets/secp256k1-C4nzcPo-.js +0 -1
- package/site/dist/assets/secp256k1-D92aGNnU.js +0 -1
- package/site/dist/assets/secp256k1-DmbwyFau.js +0 -1
- package/site/dist/assets/secp256k1-_MleGpqL.js +0 -1
- package/site/dist/assets/secp256k1-xl2og-wO.js +0 -1
- package/site/dist/assets/serializeAuthorizationList-CX8hGL56.js +0 -1
- package/site/dist/assets/serializeSignature-DfxkPnu-.js +0 -2
- package/site/dist/assets/sha2-BU_QyRTx.js +0 -1
- package/site/dist/assets/shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-ByFOTrQK.js +0 -1
- package/site/dist/assets/simulateTransaction-CfuOrae4-CMFGDgT_.js +0 -1
- package/site/dist/assets/smartphone-CcEZ-XAy.js +0 -1
- package/site/dist/assets/src-BBjkfi-Q.js +0 -1
- package/site/dist/assets/storage-Ufl800Ne-EalZTH9q.js +0 -9
- package/site/dist/assets/stringify-BlDm7tuc.js +0 -21
- package/site/dist/assets/stripe.esm-CZRDpc-N.js +0 -2
- package/site/dist/assets/styles-BsotlekN-CXEB4Ud9.js +0 -9
- package/site/dist/assets/telegram-B-JqnkqZ-RBoY3PLx.js +0 -1
- package/site/dist/assets/to-ui-error-DWe-qwS3-DgCO-Y70.js +0 -4
- package/site/dist/assets/toViemAccount-B5iDGq1b-DZ1MBqUW.js +0 -2
- package/site/dist/assets/transaction-BNTP-bFm-M5tJx8vY.js +0 -1
- package/site/dist/assets/transfer-6YztDh-t-BVQkTvG-.js +0 -1
- package/site/dist/assets/transformers.web-D4RvOP4-.js +0 -40
- package/site/dist/assets/transformers.web-D8W1u_I2.js +0 -49
- package/site/dist/assets/triangle-alert-CWjYH75H.js +0 -1
- package/site/dist/assets/twitch-5IOe4sIQ-lDtgk0os.js +0 -1
- package/site/dist/assets/types-4CuOD23i.js +0 -1
- package/site/dist/assets/use-headless-crypto-deposit-Yn-QRLB3-Dn6_8w-Y.js +0 -1
- package/site/dist/assets/use-unlink-wallet-BKK4_5Ur-DgsQ75lh.js +0 -1
- package/site/dist/assets/useActiveWallet-B-yZYGc6-B6JWREbk.js +0 -123
- package/site/dist/assets/useGetSolPrice-x7gfUIHJ-D1hmQfpA.js +0 -1
- package/site/dist/assets/useGetTokenPrice-CaoUkb79-ZnbuJ-vP.js +0 -1
- package/site/dist/assets/useI18n-C-5n_noF-BcqC76yj.js +0 -1
- package/site/dist/assets/useWalletBalance-CZnP5f_f-L3V0jDjL.js +0 -1
- package/site/dist/assets/useWallets-X1ndvJ_U-CLwUcevw.js +0 -1
- package/site/dist/assets/utils-BkR7EQjg.js +0 -1
- package/site/dist/assets/utils-DJhBNOZA.js +0 -1
- package/site/dist/assets/utils-DdckVfQr.js +0 -1
- package/site/dist/assets/w3m-modal-BMubXAoG.js +0 -1174
- package/site/dist/assets/wallet-Bn85Sg2W.js +0 -1
- package/site/dist/assets/wallet-connect-BvJtUsDt-Y03hhqFN.js +0 -1
- package/site/dist/assets/wallet-uSKqQsgP.js +0 -2
- package/site/dist/assets/walletconnect-registry-xxG8XLCb-D1SSFvMp.js +0 -1
- package/site/dist/assets/walletconnect-v2-3frQFwbg-Dv6JY_ko.js +0 -12
- package/site/dist/assets/x-rlSp9U7W.js +0 -1
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B--T-Fmt.js","./hooks.module-ClpaQ1Tg.js","./index-9jNeS_nC.js","./transactionReceipt-BwJl-gjg.js","./serializeTransaction-L-_Ej-jW.js","./http-BocEfKYb.js","./hashTypedData-Beq57Ogb.js","./getTransactionCount-80UHlwAV.js","./preload-helper-PPVm8Dsz.js","./index-nibyPLVP.js","./nonceManager-zkW7cM66.js","./serializeErc6492Signature-CeJeL3h6.js","./bytes-CjWw8TJh.js","./parseSignature-BIjcuWdB.js","./encodePacked-DyXYq3Cc.js","./coinbase-DCPC2L_R-2ivYfoMv.js","./index-BOd8jv8-.js","./toAccount-Bq6rbpbI.js","./index-D6T-s6sR.js","./walletconnect-v2-3frQFwbg-CzQk99gS.js","./wallet-connect-BvJtUsDt-CnvUnFbz.js","./TurnstileWrapper-B7sNddys-Dgr80Gih.js","./HCaptchaWrapper-CUi9LJsp-DgSjCjQI.js","./AccountNotFoundScreen-C4njXc69-RUyAWRzV.js","./ScreenLayout-OwaQQcxH-B4Z8FjFp.js","./ModalFooter-BCuEK_nz-D2I8KWtk.js","./Screen-D30meWsY-DDum2qlY.js","./index-CWARkn2w-D6ikWJWj.js","./createLucideIcon-D9OK_uxG.js","./AddFundsSelectionScreen-RAoCn7ej-ZV-LlYBe.js","./GooglePay-B53WnudL-aap7zwag.js","./isPaymentRequestAvailable-Bq1cemEn-D7xtzRqA.js","./styles-DVyDvTdj-CI4xZNHp.js","./styles-hslXy6xG-DeVcFoDD.js","./landmark-CMLKifhk.js","./wallet-UESEqPei.js","./AffirmativeConsentScreen-BG0MJxku-CKn2JLwq.js","./shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-CF2QteTJ.js","./external-link-Cdp8NBio.js","./AllowlistRejectionScreen-Cae6e1Od-9oIP9fma.js","./safe-url-D7SRPu33-A8zMgOTd.js","./lock-BkyjNE8h.js","./AuthenticateWithWalletScreen-CU6hIcFT-D1wLlSJs.js","./ConnectWalletView-DqI-PTvX-BKX7fdYr.js","./CopyableText-CQapvaMr-DHO818I0.js","./check-C_DTyjLS.js","./copy-sK00DOfH.js","./Link-BdDilT2T-BYiP1zvW.js","./QrCode-DbnZwlkH-ChwcUk_h.js","./dijkstra-COg3n3zL.js","./EmailInputForm-Cqo1mda8-CZD4r5LM.js","./ErrorMessage-D8VaAP5m-oSruKN8L.js","./useI18n-C-5n_noF-C_t8QqBJ.js","./WalletCards-DH1rqayz-UuZ4i_Ze.js","./AwaitingEvmToSolBridgingScreen-D0e_sZMS-CSBbHTyz.js","./CheckCircleIcon-DBiWFjO6.js","./Layouts-BMRfo5hw-D2u1-w8g.js","./ScreenHeader-CHmc4-Lu-BqrAEXbV.js","./FundWalletMethodHeader-BWNkokCT-CZszQsZf.js","./useGetTokenPrice-CaoUkb79-CR4CrguU.js","./useGetSolPrice-x7gfUIHJ-C7axYJ--.js","./analytics-mkkvFRju-DOXuftJB.js","./reservoir-x-nGuZkT-DFxAFt2v.js","./getChainName-DjpPdUSc-c2urPd0g.js","./transaction-BNTP-bFm-CrebgH-D.js","./getFormattedUsdFromLamports-De3U9GlO-C446pzMl.js","./BridgeNetworkSelectionView-CFGjB2nO-Da9P7eSx.js","./getErc20Balance-jXNpFf0N-mFQ9Iqk-.js","./Value-DTgR824E-DZpvBCWi.js","./LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js","./Subtitle-CV-2yKE4-o-1FQLlX.js","./Title-BnzYV3Is-RX1f0RV-.js","./WalletIcon-B1i03Vqc.js","./Chip-CZKIKt9K-BWzs9fj5.js","./TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js","./InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js","./Address-H8kD1d9O-CGQnt7Pu.js","./GlobeAltIcon-SEUEIe_E.js","./shared-FM0rljBt-c4eSjzGj.js","./ChevronDownIcon-2Os56gUt.js","./formatErc20TokenAmount-BuPk9xcy-CkAr4Oc0.js","./ethers-zTjbodk5-DSYOi6tU.js","./styles-Cm9H63WO-Cv1TbqYi.js","./LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js","./TodoList-DnyULl18-JxWWU9KA.js","./x-B2_XdOVQ.js","./circle-check-big-BJ_ADwB4.js","./fingerprint-pattern-gFJTz5e4.js","./floating-ui.react-D9ndYqYK.js","./floating-ui.react-dom-CNbOgOFt.js","./custom-V1wex-Di.js","./AwaitingExternalEthereumTransferScreen-ur5HL4R7-BsRq-xBt.js","./transfer-6YztDh-t-DU6hH7CZ.js","./parseEther-C7aOvuze.js","./AwaitingPasswordlessCodeScreen-DRHz76mM-BPdhsKvN.js","./EnvelopeIcon-DY6ERnW7.js","./PhoneIcon-CzbssTb8.js","./AwaitingSolToEvmBridgingScreen-CdLRrGD2-CEGNdrkr.js","./CaptchaScreen-DbpvkIGx-BecgMnD_.js","./circle-x-BSfWmhYk.js","./CoinbaseOnrampStatusScreen-BbyCJDXL-CFvcSiDs.js","./ArrowsRightLeftIcon-BEhBD_6N.js","./CheckCircleIcon-DzG2ROJZ.js","./ConnectLedgerScreen-DWHABGot-DaCnbBzh.js","./ConnectOnlyLandingScreen-CZYx9Bmp-DUkCLkxD.js","./ConnectOnlyStatusScreen-DCRzjxHx-Dv_5nMkZ.js","./ConnectionStatusScreen-fUfROm9m-DSoAuMFZ.js","./ConnectOrCreateScreen-CUUYUO07-DSGEeB3Y.js","./CustomLandingScreenView-Cm_MBSyX-DH8Nnb4Y.js","./ConnectEmailForm-B-VRE0MN-BozkCg8q.js","./mail-B6-Tq9Ld.js","./farcaster-DPlSjvF5-DP2DLoHZ.js","./FingerPrintIcon-ra2dqmJO.js","./ConnectPhoneForm-Dek5xn4C-C-s4s_Lq.js","./twitch-5IOe4sIQ-BXviIywg.js","./telegram-B-JqnkqZ-DTjJLkIF.js","./WalletOverflowButton-bfCnp-9T-CNgSPnTS.js","./smartphone-DAN5rY0T.js","./CrossAppAuthScreen-CLw7ymZq-DW4nRGfz.js","./DelegatedActionsConsentScreen-DYF2U4y5-gfUS_uV5.js","./WalletInfoCard-sq_2wgFg-TXTxmb8L.js","./LabelXs-oqZNqbm_-D09YjVR4.js","./circle-alert-KEOUF48T.js","./DelegatedActionsRevokeScreen-bPp6Uwyh-DZj9HTHc.js","./DepositAddressScreen-DBLRs7aI-DK_XVgVk.js","./DepositAddressAddressStepView-4vdkb55L-eHYsDK9W.js","./hourglass-CB7z_I9H.js","./chevron-down-iklXXH-z.js","./triangle-alert-ndoiBs4y.js","./DepositAddressV3Screen-CDqIEMQw-6gRZzhLe.js","./EmbeddedWalletConnectingScreen-D4T7DUzs-BZu2ae0k.js","./EmbeddedWalletCreatedScreen-D7WhW5ve-86pviemJ.js","./EmbeddedWalletKeyExportScreen-CqV4NYQ3-vDcvT53Y.js","./WarningBanner-ZZqCEtZK-DNZUUOph.js","./ExclamationTriangleIcon-CkAOJIYV.js","./EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-rNJAtSJc.js","./RecoveryPasswordCreateScreen-Be-qJ-LU-C9c0x-yq.js","./SetWalletPasswordForm-DwCTVtAh-ZzvPLj2s.js","./shared-DRZUmnL5-MWD-C-pp.js","./Checkbox-D1EDeo41-DMHcj9o_.js","./EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-I8Q95280.js","./EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-Coi7OxoI.js","./ErrorScreen-DipdTWzE-DnKGxH1Z.js","./FarcasterConnectStatusScreen-51tjUxqq-4pi7jooW.js","./OpenLink-CUpJ1mOr-EZWVSX2r.js","./FarcasterSignerStatusScreen-6x-Uh95G-z2XCMaLL.js","./CopyToClipboard-i_OQSBJr-CZTXyfV0.js","./FiatOnrampScreen-BAhYeiTI-CBVA9v1-.js","./SelectSourceAsset-CWFog6gm-8iXuqbAs.js","./InfoBanner-Cb3p1z12-CDWt2ADo.js","./FundSolWalletWithExternalSolanaWallet-WtLwYaOl-DwAwc6Ny.js","./index-D4LdLFDC.js","./getUsdcMintAddress-BVgm9GRo-FDalV59C.js","./simulateTransaction-CfuOrae4-BHUMPf6Q.js","./FundWithBankDepositScreen-DajkHxBD-DfX6nvFQ.js","./FundingEditAmountScreen-CpvpiO4M-CDS_sk_t.js","./FundingMethodSelectionScreen-Db7vhRlE-CPfNQemT.js","./ErrorBanner-BcpGRt0h-BvESwN99.js","./ExclamationCircleIcon-BZhlqH0r.js","./getErc20TokenInfo-BNTrzLMP-Dx5he_uG.js","./index-BdEw5wyl-2VGMzHIs.js","./InAppBrowserLoginNotPossible-BMR9br1T-DO4wICml.js","./InstallWalletScreen-DTA8dwLv-DGpewEch.js","./LandingScreen-CGWUoSUG-CUOCWUXd.js","./LinkConflictScreen-C3ZEPsgl-Tb6cAepT.js","./StackedContainer-B2vaEl56-C-ojzCoQ.js","./capitalizeFirstLetter-DmLYqXsO-tV1Idewc.js","./LinkEmailScreen-dKo9frwc-pq0NF2JO.js","./LinkPhoneScreen-oIUpfj0w-B80UJqAZ.js","./LoginFailedScreen-CN0dJV6U-DlnOM-Kh.js","./ManualTransferScreen-CHqcuqbs-DSShupq9.js","./useWalletBalance-CZnP5f_f-BnSHLVI_.js","./MfaAuthEnrollmentFlowScreen-Dj7gPTRC-DUPV_SLA.js","./ShieldCheckIcon-Bjwe_-PV.js","./EnrollTotp-Dibew4dp-DC7FrDgo.js","./PinInput-DbZ0b1i1-1DtLWL81.js","./MfaAuthVerifyFlowScreen-DbFpyWMy-D96GpzXX.js","./to-ui-error-DWe-qwS3-Dx3yzcV0.js","./TransactionDetails-e9nesl30-C91nJPM9.js","./WalletLink-DK5LB5Ha-BYQZV7UV.js","./MfaEnrollmentFlowScreen-DhLnGgnr-CYQDa4ND.js","./MoonpayStatusScreen-CzTUtokc-Bx5aHy-z.js","./OAuthStatusScreen-ufbOa-da-CS6988X2.js","./PasskeySelectSignupOrLogin-xh2ScC_l-BY4eK5Jh.js","./PasskeyStatusScreen-Bla8MaOk-LXys76u9.js","./PasswordRecoveryScreen-awGXZkQk-RczvLvmo.js","./RecoveryOAuthStatusScreen-CsgtTI2x-C79jd345.js","./styles-BsotlekN-Cjuu2SDV.js","./RecoverySelectionScreen-D1iGtpmi-PNqHb6CI.js","./LockClosedIcon-BqkoEL9J.js","./index-DvMddJcd-D7AEQrzj.js","./JsonTree-BHzNC-ic-pAEq1bl9.js","./TransactionErrorView-BDBNqA_f-Cpm-4xzm.js","./SetAutomaticRecoveryScreen-BO_OEqAZ-CUpQZ9wq.js","./SignRequestScreen-BHKv32KR-0qGeNipB.js","./StandardSignAndSendTransactionScreen-CfhIXVtd-C3lgJb68.js","./index.browser-B6Bt5URJ.js","./TelegramAuthScreen-UL9zLfO8-l35_C2DG.js","./TransferFromWalletScreen-Qvn1Yuno-BWCH7-Si.js","./UpdateEmailScreen-DVOhPV0H-Clk4zk-8.js","./UpdatePhoneScreen-CXRswTNZ-BgRsoR3B.js","./UserLimitReachedScreen-5we2DHn8-D-SU-vAz.js","./WalletInterstitialScreen-Sh7LfsAh-CbrFb0ON.js","./MfaVerifyFlowScreen-C_XPjMRP-CJtSAXGN.js","./index-DdxtHe81.js","./wallet-DTM31trz.js","./privateKeyToAccount-CRvvpHWf.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as K}from"./preload-helper-PPVm8Dsz.js";import{r as g,t as de,R as up}from"./index-BOd8jv8-.js";import{g as Zl,r as g0}from"./index-9jNeS_nC.js";import{s as pp,g as Gy,k as w0,m as hp,d as F2,t as En,f as Yy,e as mn,i as Bl}from"./serializeTransaction-L-_Ej-jW.js";import{c as b3,F as L3,s as Jy,a as Xy,b as Qy,f as _a,t as em,d as v0,e as fp,g as Ds,i as tm,h as C0,j as _0,k as yp,p as nm,v as mp,l as ui,m as pt,n as Ka,o as Dt,q as Yc,r as gn,u as ie,w as Ke,x as pi,y as Bo,z as zl,B as Ut,A as Ur,C as ji,D as rm,E as im,G as b0,H as L0,I as A3,J as Gn,K as am,L as A0,M as E0,N as sm,O as Us,P as om,Q as lm,R as x0,S as dm,T as os,U as cm,V as um,W as k0,X as pm,Y as hm,Z as fm,_ as ym,$ as mm,a0 as $0,a1 as gm,a2 as E3,a3 as wm,a4 as vm,a5 as Cm,a6 as Zi,a7 as Ws,a8 as Kl,a9 as _m,aa as zo,ab as bm,ac as Lm,ad as ho,ae as Am,af as Em,ag as xm,ah as km,ai as Ko,aj as ls,ak as $m,al as Sm}from"./http-BocEfKYb.js";import{e as Tm,f as Im,d as Mm,a as Pm,g as Rm,c as S0}from"./transactionReceipt-BwJl-gjg.js";import{p as tr}from"./getTransactionCount-80UHlwAV.js";import{t as Om}from"./toAccount-Bq6rbpbI.js";import{h as T0}from"./hashTypedData-Beq57Ogb.js";import{p as I0}from"./parseSignature-BIjcuWdB.js";import{r as Nm}from"./index-D6T-s6sR.js";const M0=L3(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),Fm=M0.create(BigInt("-3")),jm=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Dm=b3({a:Fm,b:jm,Fp:M0,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},Jy),P0=L3(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),Um=P0.create(BigInt("-3")),Wm=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");b3({a:Um,b:Wm,Fp:P0,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},Xy);const R0=L3(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),Vm=R0.create(BigInt("-3")),Hm=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");b3({a:Vm,b:Hm,Fp:R0,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},Qy);const Zm=Dm;function x3(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Bm(e,...t){if(!x3(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function O0(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(n=>typeof n=="string"):t.every(n=>Number.isSafeInteger(n)):!1}function ds(e,t){if(typeof t!="string")throw new Error(`${e}: string expected`);return!0}function Vs(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function qo(e){if(!Array.isArray(e))throw new Error("array expected")}function Go(e,t){if(!O0(!0,t))throw new Error(`${e}: array of strings expected`)}function N0(e,t){if(!O0(!1,t))throw new Error(`${e}: array of numbers expected`)}function Hs(...e){const t=a=>a,n=(a,s)=>o=>a(s(o)),r=e.map(a=>a.encode).reduceRight(n,t),i=e.map(a=>a.decode).reduce(n,t);return{encode:r,decode:i}}function Zs(e){const t=typeof e=="string"?e.split(""):e,n=t.length;Go("alphabet",t);const r=new Map(t.map((i,a)=>[i,a]));return{encode:i=>(qo(i),i.map(a=>{if(!Number.isSafeInteger(a)||a<0||a>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${a}". Allowed: ${e}`);return t[a]})),decode:i=>(qo(i),i.map(a=>{ds("alphabet.decode",a);const s=r.get(a);if(s===void 0)throw new Error(`Unknown letter: "${a}". Allowed: ${e}`);return s}))}}function Bs(e=""){return ds("join",e),{encode:t=>(Go("join.decode",t),t.join(e)),decode:t=>(ds("join.decode",t),t.split(e))}}function F0(e,t="="){return Vs(e),ds("padding",t),{encode(n){for(Go("padding.encode",n);n.length*e%8;)n.push(t);return n},decode(n){Go("padding.decode",n);let r=n.length;if(r*e%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8===0)throw new Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function gp(e,t,n){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(qo(e),!e.length)return[];let r=0;const i=[],a=Array.from(e,o=>{if(Vs(o),o<0||o>=t)throw new Error(`invalid integer: ${o}`);return o}),s=a.length;for(;;){let o=0,l=!0;for(let c=r;c<s;c++){const u=a[c],p=t*o,h=p+u;if(!Number.isSafeInteger(h)||p/t!==o||h-u!==p)throw new Error("convertRadix: carry overflow");const f=h/n;o=h%n;const y=Math.floor(f);if(a[c]=y,!Number.isSafeInteger(y)||y*n+o!==h)throw new Error("convertRadix: carry overflow");if(l)y?l=!1:r=c;else continue}if(i.push(o),l)break}for(let o=0;o<e.length-1&&e[o]===0;o++)i.push(0);return i.reverse()}const j0=(e,t)=>t===0?e:j0(t,e%t),Yo=(e,t)=>e+(t-j0(e,t)),Id=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function wp(e,t,n,r){if(qo(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Yo(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Yo(t,n)}`);let i=0,a=0;const s=Id[t],o=Id[n]-1,l=[];for(const c of e){if(Vs(c),c>=s)throw new Error(`convertRadix2: invalid data word=${c} from=${t}`);if(i=i<<t|c,a+t>32)throw new Error(`convertRadix2: carry overflow pos=${a} from=${t}`);for(a+=t;a>=n;a-=n)l.push((i>>a-n&o)>>>0);const u=Id[a];if(u===void 0)throw new Error("invalid carry");i&=u-1}if(i=i<<n-a&o,!r&&a>=t)throw new Error("Excess padding");if(!r&&i>0)throw new Error(`Non-zero padding: ${i}`);return r&&a>0&&l.push(i>>>0),l}function zm(e){Vs(e);const t=2**8;return{encode:n=>{if(!x3(n))throw new Error("radix.encode input should be Uint8Array");return gp(Array.from(n),t,e)},decode:n=>(N0("radix.decode",n),Uint8Array.from(gp(n,e,t)))}}function ql(e,t=!1){if(Vs(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Yo(8,e)>32||Yo(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!x3(n))throw new Error("radix2.encode input should be Uint8Array");return wp(Array.from(n),8,e,!t)},decode:n=>(N0("radix2.decode",n),Uint8Array.from(wp(n,e,8,t)))}}const bW=Hs(ql(5),Zs("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),F0(5),Bs("")),Km=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",qm=(e,t)=>{ds("base64",e);const n=/^[A-Za-z0-9=+/]+$/,r="base64";if(e.length>0&&!n.test(e))throw new Error("invalid base64");return Uint8Array.fromBase64(e,{alphabet:r,lastChunkHandling:"strict"})},ba=Km?{encode(e){return Bm(e),e.toBase64()},decode(e){return qm(e)}}:Hs(ql(6),Zs("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),F0(6),Bs("")),Gm=Hs(ql(6),Zs("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Bs("")),D0=Hs(ql(6),Zs("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Bs("")),Ym=e=>Hs(zm(58),Zs(e),Bs("")),qa=Ym("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function U0(e){const{hash:t,payload:n,publicKey:r,signature:i}=e;return Zm.verify(i,n instanceof Uint8Array?n:_a(n),em(r).substring(2),{lowS:!0,...t?{prehash:!0}:{}})}v0("ox.p256.fromSeed.v1");const Jm=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const fo={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function Xm(e){const t=e.replace(/=+$/,""),n=t.length,r=new Uint8Array(n+3);Jm.encodeInto(t+"===",r);for(let a=0,s=0;a<t.length;a+=4,s+=3){const o=(fo[r[a]]<<18)+(fo[r[a+1]]<<12)+(fo[r[a+2]]<<6)+fo[r[a+3]];r[s]=o>>16,r[s+1]=o>>8&255,r[s+2]=o&255}const i=(n>>2)*3+(n%4&&n%4-1);return new Uint8Array(r.buffer,0,i)}function Qm(e){const{challenge:t,metadata:n,origin:r,publicKey:i,rpId:a,signature:s}=e,{authenticatorData:o,clientDataJSON:l,userVerificationRequired:c}=n,u=_a(o);if(u.length<37)return!1;if(a!==void 0){const m=u.slice(0,32),w=fp(Ds(a),{as:"Bytes"});if(!tm(m,w))return!1}const p=u[32];if((p&1)!==1||c&&(p&4)!==4||(p&8)!==8&&(p&16)===16)return!1;const h=JSON.parse(l);if(h.type!=="webauthn.get"||!h.challenge||C0(Xm(h.challenge))!==t||r!==void 0&&!(Array.isArray(r)?r:[r]).includes(h.origin))return!1;const f=fp(v0(l),{as:"Bytes"}),y=_0(u,f);return U0({hash:!0,payload:y,publicKey:i,signature:s})}function e9(e){return Qm(e)}function t9(e){const t=_a(yp(e.from)),n=nm(mp(e.salt)?e.salt:_a(e.salt),32),r="bytecodeHash"in e?mp(e.bytecodeHash)?e.bytecodeHash:_a(e.bytecodeHash):ui(e.bytecode,{as:"Bytes"});return yp(pt(ui(_0(_a("0xff"),t,n,r),{as:"Hex"}),12))}const Jc=2049,n9=48,wr=8,r9=8,i9=2n**64n-1n,Sa=`0x${"00".repeat(32)}`,a9="tempo:multisig:account",s9="0x583cc63a2e37f645b43eac911b1a6d6de08b83abdc308c61364edda8cfc3bd37",o9="tempo:multisig:signature";function zs(e){const{owners:t,salt:n,threshold:r,version:i=0n}=e;if(typeof n<"u"&&Dt(n)!==32)throw new Ot({reason:"salt must be 32 bytes"});if(k3(i),t.length===0)throw new Ot({reason:"owners cannot be empty"});if(t.length>n9)throw new Ot({reason:"too many owners"});if(!Number.isInteger(Number(r)))throw new Ot({reason:"threshold must be an integer"});if(Number(r)<1)throw new Ot({reason:"threshold cannot be zero"});if(Number(r)>r9)throw new Ot({reason:"threshold exceeds max threshold"});let a=0;const s=[];let o;for(const c of t){if(!pi(c.owner)||Ke(c.owner)===0n)throw new Ot({reason:"owner cannot be zero"});if(!Number.isInteger(Number(c.weight)))throw new Ot({reason:"owner weight must be an integer"});if(Number(c.weight)<1)throw new Ot({reason:"owner weight cannot be zero"});const u=Ke(c.owner);if(typeof o<"u"&&o>=u)throw new Ot({reason:"owners must be strictly ascending"});o=u;const p=Number(c.weight);a+=p,s.push(p)}if(a>255)throw new Ot({reason:"total owner weight exceeds u8 max"});if(Number(r)>a)throw new Ot({reason:"threshold exceeds total owner weight"});const l=s.sort((c,u)=>u-c).slice(0,wr).reduce((c,u)=>c+u,0);if(Number(r)>l)throw new Ot({reason:`threshold exceeds weight reachable by ${wr} owner signatures`})}function On(e){const t=e.version??0n;k3(t);const r={owners:[...e.owners].sort((i,a)=>Ke(i.owner)<Ke(a.owner)?-1:1),salt:e.salt?zl(e.salt,32):Sa,threshold:e.threshold,version:BigInt(t)};return zs(r),r}function W0(e){return On({...e,version:Ke(e.version)})}function l9(e){const[t,n,r,i]=e;if(e.length!==4||typeof t!="string"||Dt(t)!==32||typeof n!="string"||Dt(n)>8||n.startsWith("0x00")||typeof r!="string"||Dt(r)>1||r.startsWith("0x00")||!Array.isArray(i)||i.some(s=>!Array.isArray(s)||s.length!==2||typeof s[0]!="string"||!pi(s[0])||typeof s[1]!="string"||Dt(s[1])>1||s[1].startsWith("0x00")))throw new Ot({reason:"invalid config RLP tuple"});const a={salt:t&&t!=="0x"?zl(t,32):Sa,version:n==="0x"?0n:Ke(n),threshold:r==="0x"?0:Bo(r),owners:i.map(s=>{const[o,l]=s;return{owner:o,weight:!l||l==="0x"?0:Bo(l)}})};return zs(a),a}function d9(e,t){if(Ka(t.factory),zs(e),BigInt(e.version??0)!==0n)throw new Ot({reason:"account address requires version zero"});const n=ui(gn(Ds(a9),zl(e.salt??Sa,32),ie(e.threshold,{size:1}),ie(e.owners.length,{size:1}),...e.owners.flatMap(i=>[i.owner,ie(i.weight,{size:1})]))),r=t9({bytecodeHash:s9,from:t.factory,salt:n});if(Ke(r)===0n)throw new Ot({reason:"derived account cannot be zero"});if(e.owners.some(i=>Ur(i.owner,r)))throw new Ot({reason:"derived account cannot be an owner"});return r}function Ga(e){const{account:t,config:n,payload:r}=e;if(k3(n.version),Ka(t),Dt(Yc(r))!==32)throw new Ot({reason:"payload must be 32 bytes"});return ui(gn(Ds(o9),Yc(r),t,ie(n.version??0n,{size:8})))}function V0(e){zs(e);const t=e.owners.map(i=>[i.owner,ie(i.weight)]),n=e.salt?zl(e.salt,32):Sa,r=BigInt(e.version??0);return[n,r===0n?"0x":ie(r),ie(e.threshold),t]}class Ot extends Ut{constructor({reason:t}){super(`Invalid native multisig config: ${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MultisigConfig.InvalidConfigError"})}}function k3(e){if(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&!Number.isSafeInteger(e)||BigInt(e)<0n||BigInt(e)>i9)throw new Ot({reason:"version must be an unsigned 64-bit integer"})}const Xc="0x01",Qc="0x02",eu="0x03",Po="0x04",Jo="0x05",Ti="0x7777777777777777777777777777777777777777777777777777777777777777";function Bi(e){const t=zi(e);if(t==="secp256k1"){b0(e.signature);return}if(t==="p256"){const n=e,r=[];if(typeof n.signature?.r!="bigint"&&r.push("signature.r"),typeof n.signature?.s!="bigint"&&r.push("signature.s"),typeof n.prehash!="boolean"&&r.push("prehash"),n.publicKey?(typeof n.publicKey.x!="bigint"&&r.push("publicKey.x"),typeof n.publicKey.y!="bigint"&&r.push("publicKey.y")):r.push("publicKey"),r.length>0)throw new nu({envelope:e,missing:r,type:"p256"});return}if(t==="webAuthn"){const n=e,r=[];if(typeof n.signature?.r!="bigint"&&r.push("signature.r"),typeof n.signature?.s!="bigint"&&r.push("signature.s"),n.metadata?(n.metadata.authenticatorData||r.push("metadata.authenticatorData"),n.metadata.clientDataJSON||r.push("metadata.clientDataJSON")):r.push("metadata"),n.publicKey?(typeof n.publicKey.x!="bigint"&&r.push("publicKey.x"),typeof n.publicKey.y!="bigint"&&r.push("publicKey.y")):r.push("publicKey"),r.length>0)throw new nu({envelope:e,missing:r,type:"webAuthn"});return}if(t==="keychain"){const n=e;H0(n),Bi(n.inner);return}if(t==="multisig"){Z0(e);return}}function H0(e){if(e.version!=="v1")return;let t=e.inner;for(;zi(t)==="keychain";)t=t.inner;if(zi(t)==="multisig")throw new Xr({reason:"multisig access keys require keychain V2"})}function Z0(e){const t=[];if(e.account||t.push("account"),e.config||t.push("config"),Array.isArray(e.signatures)||t.push("signatures"),t.length>0)throw new nu({envelope:e,missing:t,type:"multisig"});if(!pi(e.account))throw new Xr({reason:"multisig account is invalid"});if(Ke(e.account)===0n)throw new Xr({reason:"multisig account cannot be zero"});if(e.signatures.length===0)throw new Xr({reason:"multisig signatures cannot be empty"});if(e.signatures.length>wr)throw new Xr({reason:`multisig signatures exceed ${wr}`});if(zs(e.config),(e.config.version??0n)===0n&&e.config.owners.some(n=>Ur(n.owner,e.account)))throw new Xr({reason:"initial account cannot be an owner"});for(const n of e.signatures){const r=zi(n);if(r==="keychain"||r==="multisig")throw new Xr({reason:"owner approvals must be primitive signatures"});if(Bi(n),Dt(dn(n))>Jc)throw new Xr({reason:`multisig owner signature exceeds ${Jc} bytes`})}}function Br(e){const{signature:t,root:n}=e;return t.type==="keychain"?n?t.userAddress:Br({...e,signature:t.inner}):t.type==="multisig"?t.account:ji(B0(e))}function B0(e){const{payload:t,signature:n}=e;switch(n.type){case"secp256k1":return am({payload:t,signature:n.signature});case"p256":case"webAuthn":return n.publicKey;case"keychain":return B0({payload:t,signature:n.inner});case"multisig":throw new Ki({envelope:n})}}function vr(e){return z0(e)}function z0(e){const t=e.endsWith(Ti.slice(2))?pt(e,0,-Dt(Ti)):e;if(Dt(t)===65){const s=im(t);return b0(s),{signature:s,type:"secp256k1"}}const r=pt(t,0,1),i=pt(t,1),a=Dt(i);if(r===Xc){if(a!==129)throw new zn({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:Ke(pt(i,64,96)),y:Ke(pt(i,96,128))},prehash:Bo(pt(i,128,129))!==0,signature:{r:Ke(pt(i,0,32)),s:Ke(pt(i,32,64))},type:"p256"}}if(r===Qc){if(a<128)throw new zn({reason:`Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${a} bytes`,serialized:t});const s=a-128,o=pt(i,0,s);let l,c;for(let u=37;u<s;u++){const p=L0(pt(o,u));if(p.startsWith("{")&&p.endsWith("}"))try{JSON.parse(p),l=pt(o,0,u),c=p;break}catch{}}if(!l||!c)throw new zn({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:Ke(pt(i,s+64,s+96)),y:Ke(pt(i,s+96,s+128))},metadata:{authenticatorData:l,clientDataJSON:c},signature:{r:Ke(pt(i,s,s+32)),s:Ke(pt(i,s+32,s+64))},type:"webAuthn"}}if(r===eu||r===Po){const s=pt(i,0,20),o=z0(pt(i,20)),l={userAddress:s,inner:o,type:"keychain",version:r===Po?"v2":"v1"};return Bi(l),l}if(r===Jo){const s=A3(i);if(!Array.isArray(s)||s.length!==3)throw new zn({reason:"invalid multisig wire shape: expected exactly three fields",serialized:t});const[o,l,c]=s;if(typeof o!="string"||!pi(o))throw new zn({reason:"invalid multisig account",serialized:t});if(!Array.isArray(l))throw new zn({reason:"invalid multisig config",serialized:t});if(!Array.isArray(c)||c.length===0||c.length>wr)throw new zn({reason:"invalid multisig signatures list",serialized:t});const u={type:"multisig",account:o,config:l9(l),signatures:c.map(p=>{if(!Gn(p)||Dt(p)>Jc)throw new zn({reason:"invalid multisig owner signature",serialized:t});if(Dt(p)!==65&&!["0x01","0x02"].includes(pt(p,0,1)))throw new zn({reason:"owner approvals must be primitive signatures",serialized:t});return vr(p)})};return Z0(u),u}throw new zn({reason:`Unknown signature type identifier: ${r}. Expected ${Xc} (P256), ${Qc} (WebAuthn), ${eu} (Keychain V1), ${Po} (Keychain V2), or ${Jo} (Multisig)`,serialized:t})}function en(e,t){if(typeof e=="string")return vr(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const n=zi(e);if(n==="multisig"){const r=e;return{...r,config:On(r.config),signatures:r.signatures.map(i=>en(i)),type:n}}return{...e,...n==="p256"?{prehash:e.prehash}:{},...n==="keychain"?{...typeof e=="object"&&e!==null&&"version"in e&&e.version?{}:{version:"v2"},...typeof e=="object"&&"keyId"in e&&e.keyId?{}:(()=>{const r=e.inner;return r.type==="p256"||r.type==="webAuthn"?{keyId:ji(r.publicKey)}:(r.type==="secp256k1"&&t?.payload,{})})()}:{},type:n}}function Gl(e){if(typeof e=="string"){const t=vr(gn(Jo,e));if(t.type!=="multisig")throw new Ki({envelope:e});return t}if(e.type==="secp256k1")return{signature:E0(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:Ke(e.pubKeyX),y:Ke(e.pubKeyY)},signature:{r:Ke(e.r),s:Ke(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,n=Dt(t);let r,i;for(let a=37;a<n;a++){const s=L0(pt(t,a));if(s.startsWith("{")&&s.endsWith("}"))try{JSON.parse(s),r=pt(t,0,a),i=s;break}catch{}}if(!r||!i)throw new zn({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{metadata:{authenticatorData:r,clientDataJSON:i},publicKey:{prefix:4,x:Ke(e.pubKeyX),y:Ke(e.pubKeyY)},signature:{r:Ke(e.r),s:Ke(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e){const t=e,n={type:"keychain",userAddress:t.userAddress,inner:Gl(t.signature),...t.keyId?{keyId:t.keyId}:{},...t.version?{version:t.version}:{}};return Bi(n),n}throw new Ki({envelope:e})}function zi(e){if(typeof e!="object"||e===null)throw new Ki({envelope:e});if("type"in e&&e.type)return e.type;if("signature"in e&&!("publicKey"in e)&&typeof e.signature=="object"&&e.signature!==null&&"r"in e.signature&&"s"in e.signature&&"yParity"in e.signature||"r"in e&&"s"in e&&"yParity"in e)return"secp256k1";if("signature"in e&&"prehash"in e&&"publicKey"in e&&typeof e.prehash=="boolean")return"p256";if("signature"in e&&"metadata"in e&&"publicKey"in e)return"webAuthn";if("userAddress"in e&&"inner"in e)return"keychain";if("account"in e&&"config"in e&&"signatures"in e)return"multisig";throw new Ki({envelope:e})}function dn(e,t={}){const n=zi(e);if(n==="secp256k1")return gn(sm(e.signature),t.magic?Ti:"0x");if(n==="p256"){const r=e;return gn(Xc,ie(r.signature.r,{size:32}),ie(r.signature.s,{size:32}),ie(r.publicKey.x,{size:32}),ie(r.publicKey.y,{size:32}),ie(r.prehash?1:0,{size:1}),t.magic?Ti:"0x")}if(n==="webAuthn"){const r=e,i=gn(r.metadata.authenticatorData,Ds(r.metadata.clientDataJSON));return gn(Qc,i,ie(r.signature.r,{size:32}),ie(r.signature.s,{size:32}),ie(r.publicKey.x,{size:32}),ie(r.publicKey.y,{size:32}),t.magic?Ti:"0x")}if(n==="keychain"){const r=e;Bi(r);const i=r.version==="v1"?eu:Po;return gn(i,r.userAddress,dn(r.inner),t.magic?Ti:"0x")}if(n==="multisig"){const r=e;return Bi(r),gn(Jo,Us([r.account,V0(r.config),r.signatures.map(i=>dn(i))]),t.magic?Ti:"0x")}throw new Ki({envelope:e})}function $3(e){const{signatures:t}=e,n=Ga(e);return t.map(r=>({key:Ke(Br({payload:n,signature:r})),signature:r})).sort((r,i)=>r.key<i.key?-1:r.key>i.key?1:0).map(r=>r.signature)}function S3(e){const t=zi(e);if(t==="secp256k1")return{...om(e.signature),type:"secp256k1"};if(t==="p256"){const n=e;return{preHash:n.prehash,pubKeyX:ie(n.publicKey.x,{size:32}),pubKeyY:ie(n.publicKey.y,{size:32}),r:ie(n.signature.r,{size:32}),s:ie(n.signature.s,{size:32}),type:"p256"}}if(t==="webAuthn"){const n=e,r=gn(n.metadata.authenticatorData,Ds(n.metadata.clientDataJSON));return{pubKeyX:ie(n.publicKey.x,{size:32}),pubKeyY:ie(n.publicKey.y,{size:32}),r:ie(n.signature.r,{size:32}),s:ie(n.signature.s,{size:32}),type:"webAuthn",webauthnData:r}}if(t==="keychain"){const n=e;return H0(n),{type:"keychain",userAddress:n.userAddress,signature:S3(n.inner),...n.keyId?{keyId:n.keyId}:{},...n.version?{version:n.version}:{}}}if(t==="multisig")return pt(dn(e),1);throw new Ki({envelope:e})}function tu(e,t){const{payload:n}=t,r=(()=>{if(t.address)return t.address;if(t.publicKey)return ji(t.publicKey)})();if(!r)return!1;const i=en(e);if(i.type==="secp256k1")return r?rm({address:r,payload:n,signature:i.signature}):!1;if(i.type==="p256"){const a=ji(i.publicKey);return Ur(a,r)?U0({hash:i.prehash,publicKey:i.publicKey,payload:n,signature:i.signature}):!1}if(i.type==="webAuthn"){const a=ji(i.publicKey);return Ur(a,r)?e9({challenge:Yc(n),metadata:i.metadata,publicKey:i.publicKey,signature:i.signature}):!1}throw new c9(`Unable to verify signature envelope of type "${i.type}".`)}class Ki extends Ut{constructor({envelope:t}){super(`Unable to coerce value (\`${A0(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}class nu extends Ut{constructor({envelope:t,missing:n,type:r}){super(`Signature envelope of type "${r}" is missing required properties: ${n.map(i=>`\`${i}\``).join(", ")}.
|
|
3
|
+
|
|
4
|
+
Provided: ${A0(t)}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.MissingPropertiesError"})}}let zn=class extends Ut{constructor({reason:t,serialized:n}){super(`Unable to deserialize signature envelope: ${t}`,{metaMessages:[`Serialized: ${n}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidSerializedError"})}};class Xr extends Ut{constructor({reason:t}){super(`Invalid native multisig owner approval: ${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidMultisigApprovalError"})}}class c9 extends Ut{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}}function ln(e){return e.startsWith("tempo")?u9(e).address:e}function u9(e){if(!e.startsWith("tempox"))throw new p9({address:e});const t=e.slice(6);return lm(t,{strict:!0}),{address:x0(t)}}class p9 extends Ut{constructor({address:t}){super(`Tempo address "${t}" has an invalid prefix. Expected "tempox".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TempoAddress.InvalidPrefixError"})}}function h9(e,t={}){if(typeof e.chainId=="string")return K0(e);const n={...e,address:ln(e.address)};return t.signature?{...n,signature:t.signature}:n}function K0(e){const{address:t,chainId:n,nonce:r}=e,i=Gl(e.signature);return{address:t,chainId:Number(n),nonce:BigInt(r),signature:i}}function f9(e){return e.map(t=>K0(t))}function y9(e){const[t,n,r,i]=e,a={address:n,chainId:t==="0x"?0:Number(t),nonce:r==="0x"?0n:BigInt(r)};return i&&(a.signature=vr(i)),h9(a)}function m9(e){const t=[];for(const n of e)t.push(y9(n));return t}function g9(e){const{address:t,chainId:n,nonce:r,signature:i}=e;return{address:t,chainId:ie(n),nonce:ie(r),signature:S3(i)}}function w9(e){return e.map(t=>g9(t))}function v9(e){const{address:t,chainId:n,nonce:r}=e,i=e.signature?dn(e.signature):void 0;return[n?ie(n):"0x",t,r?ie(r):"0x",...i?[i]:[]]}function C9(e){if(!e||e.length===0)return[];const t=[];for(const n of e)t.push(v9(n));return t}const _9="0x20c0";function q0(e){if(typeof e=="string"){const n=ln(e);return Ka(n),n}const t=ie(e,{size:18});return gn(_9,t)}function Yl(e,t={}){if("keyId"in e)return G0(e);Ks(e.type,e.account);const n=e;n.witness!==void 0&&qs(n.witness),n.signature&&Ta(n.signature);const r={...n,...n.account!==void 0?{account:ln(n.account)}:{},address:ln(n.address),...n.limits?{limits:n.limits.map(i=>({...i,token:ln(i.token)}))}:{},...n.scopes?{scopes:n.scopes.map(i=>({...i,address:ln(i.address),selector:M3(i.selector),...i.recipients?{recipients:i.recipients.map(a=>ln(a))}:{}}))}:{}};if(t.signature){const i=en(t.signature);return Ta(i),{...r,signature:i}}return r}function G0(e){const{allowedCalls:t,chainId:n,keyId:r,expiry:i,limits:a,keyType:s}=e,o=e.witness??void 0,l=e.isAdmin??void 0,c=e.account??void 0;Ks(s,c);const u=Gl(e.signature);Ta(u),o!==void 0&&qs(o);const p=t?t.flatMap(h=>!h.selectorRules||h.selectorRules.length===0?[{address:h.target}]:h.selectorRules.map(f=>({address:h.target,selector:A9(f.selector),...f.recipients&&f.recipients.length>0?{recipients:f.recipients}:{}}))):void 0;return{address:r,chainId:n==="0x"?0n:Ke(n),...i!=null?{expiry:Number(i)}:{},limits:a?.map(h=>({token:h.token,limit:BigInt(h.limit),...h.period&&Xo(h.period)>0?{period:Xo(h.period)}:{}})),...p?{scopes:p}:{},signature:u,...s==="multisig"?{account:c,type:s}:{type:s},...o!==void 0?{witness:o}:{},...c!==void 0?{account:c}:{},...l?{isAdmin:!0}:{}}}function Y0(e){const[t,n]=e,[r,i,a,...s]=t,o=(()=>{switch(i){case"0x":case"0x00":return"secp256k1";case"0x01":return"p256";case"0x02":return"webAuthn";case"0x03":return"multisig";default:throw new Error(`Invalid key type: ${i}`)}})(),[l,c,u,p,h,f]=s,y=yo(l)?void 0:Xo(l)||void 0,m=Array.isArray(c)&&c.length>0?c.map(S=>{const[b,F,H]=S;return{token:b,limit:L9(F),...H!==void 0?{period:Xo(H)}:{}}}):void 0,w=Array.isArray(u)?u.flatMap(S=>{const[b,F]=S;return!Array.isArray(F)||F.length===0?[{address:b}]:F.map(H=>{const[ae,G]=H;return{address:b,selector:ae,...Array.isArray(G)&&G.length>0?{recipients:G}:{}}})}):void 0,E=yo(p)?void 0:p;E!==void 0&&qs(E);const _=(()=>{if(!yo(h)){if(h!=="0x01")throw new x9(h);return!0}})(),C=yo(f)?void 0:f;Ks(o,C);const k={address:a,chainId:r==="0x"?0n:Ke(r),...o==="multisig"?{account:C,type:o}:{type:o},...y!==void 0?{expiry:y}:{},...m!==void 0?{limits:m}:{},...w!==void 0?{scopes:w}:{},...E!==void 0?{witness:E}:{},...C!==void 0?{account:C}:{},..._?{isAdmin:!0}:{}};if(n){const S=vr(n);Ta(S),k.signature=S}return Yl(k)}function Jl(e){return b9(e)}function T3(e){const t=A3(e);return Y0(t)}function b9(e){const[t]=I3(e),n=Us(t);return ui(n)}function ru(e){const t=I3(e);return Us(t)}function J0(e){Ks(e.type,e.account);const{address:t,scopes:n,chainId:r,expiry:i,limits:a,type:s,signature:o,witness:l,isAdmin:c,account:u}=e;Ta(o),l!==void 0&&qs(l);const p=(()=>{if(!n)return;const h=new Map;for(const f of n){const y=f.address;h.has(y)||h.set(y,[]),f.selector&&h.get(y).push({selector:M3(f.selector),...f.recipients&&f.recipients.length>0?{recipients:f.recipients}:{}})}return[...h.entries()].map(([f,y])=>({target:f,...y.length>0?{selectorRules:y}:{}}))})();return{chainId:r===0n?"0x":ie(r),expiry:typeof i=="number"?ie(i):null,keyId:ln(t),...s==="multisig"?{account:u,keyType:s}:{keyType:s},limits:a?.map(({token:h,limit:f,period:y})=>({token:h,limit:ie(f),...y?{period:iu(y)}:{}})),signature:S3(o),...p?{allowedCalls:p}:{},...l!==void 0?{witness:l}:{},...c?{isAdmin:!0}:{},...u!==void 0?{account:u}:{}}}function I3(e){Ks(e.type,e.account);const{address:t,chainId:n,scopes:r,expiry:i,limits:a,witness:s,isAdmin:o,account:l}=e;s!==void 0&&qs(s);const c=(()=>{if(e.signature)return Ta(e.signature),dn(e.signature)})(),u=e.type,p=(()=>{switch(u){case"secp256k1":return"0x";case"p256":return"0x01";case"webAuthn":return"0x02";case"multisig":return"0x03";default:throw new Error(`Invalid key type: ${u}`)}})(),h=a?.map(C=>{const k=[C.token,vp(C.limit)];return C.period&&C.period>0&&k.push(iu(C.period)),k}),f=(()=>{if(!r)return;const C=new Map;for(const k of r){const S=k.address;C.has(S)||C.set(S,[]),k.selector&&C.get(S).push([M3(k.selector),k.recipients??[]])}return[...C.entries()].map(([k,S])=>[k,S.map(([b,F])=>[b,F])])})(),y=s!==void 0||o||l!==void 0,m=[{value:i!=null&&i!==0?iu(i):void 0,placeholder:"0x"},{value:h,placeholder:y?"0x":[]},{value:f,placeholder:"0x"},{value:s,placeholder:"0x"},{value:o?"0x01":void 0,placeholder:"0x"},{value:l,placeholder:"0x"}];let w=-1;for(let C=m.length-1;C>=0;C--)if(m[C].value!==void 0){w=C;break}const E=m.slice(0,w+1).map(({value:C,placeholder:k})=>C??k);return[[vp(n),p,t,...E],...c?[c]:[]]}function vp(e){return e===0n?"0x":ie(e)}function iu(e){return e===0?"0x":ie(e)}function L9(e){return e==="0x"?0n:BigInt(e)}function Xo(e){return e==="0x"?0:Bo(e)}function A9(e){return typeof e=="string"?e:Array.isArray(e)?C0(new Uint8Array(e)):e}function M3(e){if(e)return e.startsWith("0x")?e:dm(e)}function Ks(e,t){if(e==="multisig"&&t==null)throw new $9}function qs(e){if(Dt(e)!==32)throw new E9(e)}function Ta(e){if(e.type==="keychain")throw new k9(e.type)}function yo(e){return e===void 0||e==="0x"}class E9 extends Error{constructor(t){super(`Witness \`${t}\` must be exactly 32 bytes (got ${Dt(t)} bytes).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"KeyAuthorization.InvalidWitnessSizeError"})}}class x9 extends Error{constructor(t){super(`Admin marker \`${t}\` is invalid; expected \`0x01\` (TIP-1049).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"KeyAuthorization.InvalidAdminMarkerError"})}}class k9 extends Error{constructor(t){super(`Signature type \`${t}\` is invalid for key authorizations; expected \`secp256k1\`, \`p256\`, \`webAuthn\`, or \`multisig\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"KeyAuthorization.InvalidSignatureTypeError"})}}class $9 extends Error{constructor(){super("Multisig key grants require a parent account binding."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"KeyAuthorization.MissingAccountError"})}}function S9(e){const t=[];for(let n=0;n<e.length;n++){const[r,i]=e[n];r&&Ka(r,{strict:!1}),t.push({address:r,storageKeys:i.map(a=>os(a)?a:cm(a))})}return t}function T9(e){if(!e||e.length===0)return[];const t=[];for(const{address:n,storageKeys:r}of e){for(let i=0;i<r.length;i++)if(Dt(r[i])!==32)throw new I9({storageKey:r[i]});n&&Ka(n,{strict:!1}),t.push([n,r])}return t}class I9 extends Ut{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Dt(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const Cp={wei:0,gwei:9,szabo:12,finney:15,ether:18};function M9(e,t=0){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${a?`.${a}`:""}`}function au(e,t="wei"){return M9(e,Cp.gwei-Cp[t])}class P9 extends Ut{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${au(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.FeeCapTooHighError"})}}class R9 extends Ut{constructor({chainId:t}){super(typeof t<"u"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidChainIdError"})}}class O9 extends Ut{constructor({attributes:t,serialized:n,type:r}){const i=Object.entries(t).map(([a,s])=>typeof s>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${n}"`,i.length>0?`Missing Attributes: ${i.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidSerializedError"})}}class N9 extends Ut{constructor({maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${au(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${au(n)} gwei`:""}).`].join(`
|
|
5
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const X0="0x78",F9="0x76",_p="tempo";function P3(e){const{calls:t,chainId:n,maxFeePerGas:r,maxPriorityFeePerGas:i,validBefore:a,validAfter:s}=e;if(!t||t.length===0)throw new W9;if(typeof a=="number"&&typeof s=="number"&&a<=s)throw new V9({validBefore:a,validAfter:s});if(t)for(const o of t)o.to&&Ka(o.to,{strict:!1});if(n<=0)throw new R9({chainId:n});if(r&&BigInt(r)>2n**256n-1n)throw new P9({feeCap:r});if(i&&r&&i>r)throw new N9({maxFeePerGas:r,maxPriorityFeePerGas:i})}function Xl(e){const t=A3(pt(e,1)),[n,r,i,a,s,o,l,c,u,p,h,f,y,m,w]=t,E=Array.isArray(m)?m:void 0,_=E?w:m;if(!(t.length===13||t.length===14||t.length===15))throw new O9({attributes:{authorizationList:y,chainId:n,maxPriorityFeePerGas:r,maxFeePerGas:i,gas:a,calls:s,accessList:o,keyAuthorization:E,nonceKey:l,nonce:c,validBefore:u,validAfter:p,feeToken:h,feePayerSignatureOrSender:f,...t.length>12?{signature:_}:{}},serialized:e,type:_p});let C={chainId:Number(n),type:_p};if(Gn(a)&&a!=="0x"&&(C.gas=BigInt(a)),Gn(c)&&(C.nonce=c==="0x"?0n:BigInt(c)),Gn(i)&&i!=="0x"&&(C.maxFeePerGas=BigInt(i)),Gn(r)&&r!=="0x"&&(C.maxPriorityFeePerGas=BigInt(r)),Gn(l)&&(C.nonceKey=l==="0x"?0n:BigInt(l)),Gn(u)&&u!=="0x"&&(C.validBefore=Number(u)),Gn(p)&&p!=="0x"&&(C.validAfter=Number(p)),Gn(h)&&h!=="0x"&&(C.feeToken=h),s&&s!=="0x"){const S=s;C.calls=S.map(b=>{const[F,H,ae]=b,G={};return F&&F!=="0x"&&(G.to=F),H&&H!=="0x"&&(G.value=BigInt(H)),ae&&ae!=="0x"&&(G.data=ae),G})}o?.length!==0&&o!=="0x"&&(C.accessList=S9(o)),y?.length!==0&&y!=="0x"&&(C.authorizationList=m9(y)),f!=="0x"&&f!==void 0&&(f==="0x00"||pi(f)?(C.feePayerSignature=null,pi(f)&&(C.from=f)):C.feePayerSignature=um(f)),E&&(C.keyAuthorization=Y0(E));const k=_?vr(_):void 0;if(k&&(C={...C,signature:k}),!C.from&&k)try{C.from=Br({payload:Ia(Qo(C)),signature:k,root:!0})}catch{}return P3(C),C}function Qo(e,t={}){const{feePayerSignature:n,signature:r}=t,i=typeof e=="string"?Xl(e):e;return i.from&&(i.from=ln(i.from)),i.calls&&(i.calls=i.calls.map(a=>({...a,...a.to?{to:ln(a.to)}:{}}))),P3(i),{...i,...r?{signature:en(r)}:{},...n?{feePayerSignature:k0(n)}:{},type:"tempo"}}function Rr(e,t={}){const{accessList:n,authorizationList:r,calls:i,chainId:a,feeToken:s,gas:o,keyAuthorization:l,nonce:c,nonceKey:u,maxFeePerGas:p,maxPriorityFeePerGas:h,validBefore:f,validAfter:y}=e;P3(e);const m=T9(n),w=t.signature||e.signature,E=C9(r),_=i.map(b=>[b.to?ln(b.to):"0x",b.value?ie(b.value):"0x",b.data??"0x"]);let C=!1;const k=(()=>{if(t.sender)return t.sender;if(t.format==="feePayer"&&w){const F=en(w);if(F.type==="keychain")return F.userAddress;if(F.type==="p256"||F.type==="webAuthn")return ji(F.publicKey);if(F.type==="secp256k1")return pm({payload:Ia(Qo(e)),signature:F.signature})}const b=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return b===null?(C=!0,"0x00"):b?hm(b):"0x"})(),S=[ie(a),h?ie(h):"0x",p?ie(p):"0x",o?ie(o):"0x",_,m,u?ie(u):"0x",c?ie(c):"0x",typeof f=="number"?ie(f):"0x",typeof y=="number"?ie(y):"0x",!C&&(typeof s=="bigint"||typeof s=="string")?q0(s):"0x",k,E,...l?[I3(l)]:[],...w?[dn(en(w))]:[]];return gn(t.format==="feePayer"?X0:F9,Us(S))}function j9(e){return Rr({...e,signature:void 0,...e.feePayerSignature!==void 0?{feePayerSignature:null}:{}})}function Ia(e,t={}){const n=D9(e,{presign:!0});return t.from?ui(gn("0x04",n,ln(t.from))):n}function D9(e,t={}){const n=t.presign?j9(e):Rr(e);return ui(n)}function U9(e,t){const n=ln(t.sender),r=Rr({...e,signature:void 0},{sender:n,format:"feePayer"});return ui(r)}class W9 extends Ut{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class V9 extends Ut{constructor({validBefore:t,validAfter:n}){super(`validBefore (${t}) must be greater than validAfter (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.InvalidValidityWindowError"})}}function H9(e){const{account:t,config:n}=e,r=Ia(Xl(e.transaction));return Ga({account:t,config:n,payload:r})}async function Z9(e){const{account:t,approvals:n,hash:r}=e;if(!pi(t)||Ke(t)===0n)throw new G2({reason:"account is invalid"});if(!os(r))throw new G2({reason:"hash is invalid"});const i=On(e.config);return K9({approvals:n,config:i,hash:r})}function B9(e,t){const n=T3(e);if(n.signature)throw new ge({reason:"keyAuthorization must not contain a signature"});if(ru(n).toLowerCase()!==e.toLowerCase())throw new ge({reason:"keyAuthorization is not canonically serialized"});const r=On(t.config),i=$3({account:t.account,config:r,payload:Jl(n),signatures:t.approvals.map(a=>e5(t.account,a,r))});return ru(Yl(n,{signature:en({account:t.account,config:r,signatures:i})}))}function z9(e){try{const t=On(e.config);if(typeof t.threshold!="number"||t.owners.some(r=>typeof r.weight!="number"))throw new ge({reason:"config threshold and owner weights must be numbers"});const n={...e,config:t};if(G9(n,t),n.type==="transaction")Y9(n);else if(n.type==="keyAuthorization")J9(n,t);else throw new ge({reason:"unknown operation type"});return n}catch(t){throw t instanceof ge?t:new ge({cause:t})}}function Q0(e){try{const t=e.config?.version;if(typeof t!="string"||!Gn(t))throw new ge({reason:"config.version must be a hexadecimal quantity"});const n=Ke(t);if(ie(n)!==t)throw new ge({reason:"config.version must use canonical quantity encoding"});return z9({...e,config:W0(e.config)})}catch(t){throw t instanceof ge?t:new ge({cause:t})}}async function K9(e){const t=new Map(e.config.owners.map(l=>[l.owner.toLowerCase(),{address:l.owner,weight:Number(l.weight)}])),n=new Map;for(const l of e.approvals){const c=en(l);if(c.type==="keychain"||c.type==="multisig")throw new G2({reason:"only primitive signatures can approve a multisig operation"});const u=Br({payload:e.hash,signature:c}),p=t.get(u.toLowerCase());if(!p)throw new G2({reason:`signature is from non-owner ${u}`});const h=u.toLowerCase(),f=n.get(h);f?f.signatures.push(c):n.set(h,{address:p.address,signatures:[c],weight:p.weight})}const r=[],i=[];for(const l of n.values()){const u=l.signatures.map(p=>{if(!tu(p,{address:l.address,payload:e.hash}))throw new G2({reason:`signature from owner ${l.address} is invalid`});return dn(p)}).sort(q9)[0];r.push({address:l.address,signature:u,weight:l.weight}),i.push({address:l.address,signature:u})}const a=r.sort((l,c)=>c.weight-l.weight||Md(l,c)),s=[];let o=0;for(const l of a.slice(0,wr)){if(o>=Number(e.config.threshold))break;s.push(l),o+=l.weight}return s.sort(Md),{approvals:i.sort(Md).map(l=>l.signature),selectedApprovals:s.map(l=>l.signature),signatureCount:s.length,threshold:Number(e.config.threshold),weight:o}}function Md(e,t){const n=Ke(e.address),r=Ke(t.address);return n<r?-1:n>r?1:0}function q9(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n<r?-1:n>r?1:0}function G9(e,t){if(!pi(e.account))throw new ge({reason:"account is invalid"});if(Ke(e.account)===0n)throw new ge({reason:"account cannot be zero"});if(!os(e.hash))throw new ge({reason:"hash is invalid"});if(ga(e.createdAt,"createdAt"),ga(e.updatedAt,"updatedAt"),e.updatedAt<e.createdAt)throw new ge({reason:"updatedAt cannot precede createdAt"});if(ga(e.signatureCount,"signatureCount"),ga(e.threshold,"threshold"),ga(e.weight,"weight"),e.threshold!==Number(t.threshold))throw new ge({reason:"threshold must equal config.threshold"});if(e.weight>255)throw new ge({reason:"weight exceeds u8 max"});if(e.signatureCount>wr)throw new ge({reason:"too many selected signatures"});if(!Array.isArray(e.approvals))throw new ge({reason:"approvals must be an array"});if(e.approvals.length>t.owners.length)throw new ge({reason:"too many retained approvals"});if(e.signatureCount>e.approvals.length)throw new ge({reason:"signatureCount exceeds retained approvals"});if(e.signatureCount===0!=(e.weight===0))throw new ge({reason:"signatureCount and weight must both be zero or nonzero"});const n=new Map(t.owners.map(a=>[a.owner.toLowerCase(),Number(a.weight)])),r=[],i=new Set;for(const a of e.approvals){if(typeof a!="string"||!Gn(a,{strict:!0}))throw new ge({reason:"approval is invalid"});const s=e5(e.account,a,t),l=Br({payload:e.hash,signature:s}).toLowerCase(),c=n.get(l);if(c===void 0)throw new ge({reason:"approval is from a non-owner"});if(i.has(l))throw new ge({reason:e.type==="keyAuthorization"?"key authorization contains duplicate owner approvals":"duplicate owner approval"});i.add(l),r.push(c)}if(!Q9(r,e.signatureCount,e.weight))throw new ge({reason:"weight is not reachable by signatureCount retained owner approvals"})}function Y9(e){if("keyAuthorization"in e&&e.keyAuthorization!==void 0)throw new ge({reason:"transaction operations cannot contain keyAuthorization"});const t=e.expiresAt,n=e.submissionId,r=e.transactionHash;if(e.status==="pending"){if(t!==void 0||n!==void 0||r!==void 0)throw new ge({reason:"pending transactions cannot contain submission fields"})}else if(e.status==="submitting"){if(ga(t,"expiresAt"),!os(n??""))throw new ge({reason:"submissionId is invalid"});if(n.toLowerCase()===e.hash.toLowerCase())throw new ge({reason:"submissionId must differ from the operation hash"});if(r!==void 0)throw new ge({reason:"submitting transactions cannot contain transactionHash"})}else if(e.status==="success"){if(!os(r??""))throw new ge({reason:"transactionHash is invalid"});if(t!==void 0||n!==void 0)throw new ge({reason:"successful transactions cannot contain submission fields"})}else throw new ge({reason:"invalid transaction status"});if(e.status!=="pending"&&(e.weight<e.threshold||e.signatureCount===0))throw new ge({reason:"submitted transactions must have quorum"});if(typeof e.transaction!="string")throw new ge({reason:"transaction is invalid"});const i=Xl(e.transaction);if(i.signature)throw new ge({reason:"transaction must not contain an outer sender signature"});if(i.from&&i.from.toLowerCase()!==e.account.toLowerCase())throw new ge({reason:"transaction sender does not match the operation account"});t5(e,Ia(i));const a=e.transaction.startsWith(X0);if(Rr(i,a?i.from?{format:"feePayer",sender:i.from}:{format:"feePayer"}:{}).toLowerCase()!==e.transaction.toLowerCase())throw new ge({reason:"transaction is not canonically serialized"})}function J9(e,t){const n=e;if(n.expiresAt!==void 0||n.submissionId!==void 0||n.transaction!==void 0||n.transactionHash!==void 0)throw new ge({reason:"key authorization operations cannot contain transaction fields"});if(e.status!=="pending"&&e.status!=="success")throw new ge({reason:"invalid key authorization status"});if(e.status==="success"&&(e.weight<e.threshold||e.signatureCount===0))throw new ge({reason:"successful key authorizations must have quorum"});if(e.status==="pending"&&e.weight>=e.threshold)throw new ge({reason:"pending key authorizations cannot have quorum"});if(typeof e.keyAuthorization!="string")throw new ge({reason:"keyAuthorization is invalid"});const r=T3(e.keyAuthorization);if(!r.account||r.account.toLowerCase()!==e.account.toLowerCase())throw new ge({reason:"key authorization account does not match the operation account"});const i=r.signature;if(e.status==="pending"&&i)throw new ge({reason:"pending key authorizations must be unsigned"});if(e.status==="success"){if(i?.type!=="multisig")throw new ge({reason:"successful key authorizations require a multisig signature"});if(i.account.toLowerCase()!==e.account.toLowerCase())throw new ge({reason:"key authorization signature account does not match"});if(i.signatures.length!==e.signatureCount)throw new ge({reason:"key authorization signatureCount does not match its signature"});if(X9(e,i.signatures,r),!eg(i.config,t))throw new ge({reason:"key authorization config does not match"})}if(t5(e,Jl(r)),ru(r).toLowerCase()!==e.keyAuthorization.toLowerCase())throw new ge({reason:"keyAuthorization is not canonically serialized"})}function e5(e,t,n){const r=vr(t);if(r.type==="keychain"||r.type==="multisig")throw new ge({reason:"only primitive owner approvals are allowed"});if(Bi({account:e,config:n,signatures:[r],type:"multisig"}),dn(r).toLowerCase()!==t.toLowerCase())throw new ge({reason:"approval is not canonical"});return r}function X9(e,t,n){const r=e.approvals.map(s=>vr(s));for(const s of t){const o=r.findIndex(l=>dn(l).toLowerCase()===dn(s).toLowerCase());if(o===-1)throw new ge({reason:"key authorization signature is not a retained approval"});r.splice(o,1)}const i=Ga({account:e.account,config:e.config,payload:Jl(n)}),a=t.map(s=>Br({payload:i,signature:s}));for(let s=1;s<a.length;s++){const o=Ke(a[s-1]),l=Ke(a[s]);if(o===l)throw new ge({reason:"key authorization contains duplicate owner approvals"});if(o>l)throw new ge({reason:"key authorization approvals are not canonically ordered"})}}function Q9(e,t,n){const r=Array.from({length:t+1},()=>new Set);r[0].add(0);for(const i of e)for(let a=t;a>0;a--)for(const s of r[a-1])r[a].add(s+i);return r[t].has(n)}function t5(e,t){if(Ga({account:e.account,config:e.config,payload:t}).toLowerCase()!==e.hash.toLowerCase())throw new ge({reason:"hash does not match the operation payload"})}function ga(e,t){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new ge({reason:`${t} must be a nonnegative safe integer`})}function eg(e,t){const n=On(e),r=On(t);return fm(n.salt??Sa,r.salt??Sa)&&n.threshold===r.threshold&&n.version===r.version&&n.owners.length===r.owners.length&&n.owners.every((i,a)=>{const s=r.owners[a];return Ur(i.owner,s.owner)&&i.weight===s.weight})}class G2 extends Ut{constructor(t={}){super(t.reason?`Invalid multisig approval: ${t.reason}.`:"Invalid multisig approval.",{cause:t.cause}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MultisigOperation.InvalidApprovalError"})}}class ge extends Ut{constructor(t={}){super(t.reason?`Invalid multisig operation: ${t.reason}.`:"Invalid multisig operation.",{cause:t.cause}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MultisigOperation.InvalidOperationError"})}}function bp(e){const{approvals:t,config:n}=e;return tg(t),{approvals:t.map(({keyData:r,keyType:i,owner:a})=>({...r!==void 0?{keyData:rg(r)}:{},...i!==void 0?{keyType:i}:{},owner:a})),config:ng(n)}}function tg(e){if(e.some(t=>typeof t!="object"||t===null||"spec"in t||"type"in t))throw new Lp({reason:"only untagged primitive owner approvals are allowed"});if(e.length>wr)throw new Lp({reason:`approval count exceeds ${wr}`})}function ng(e){return Us(V0(e))}function rg(e){const t=Dt(e);return t<=4?e:ie(t,{size:2})}class Lp extends Ut{constructor(t){super(`Invalid multisig simulation: ${t.reason}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MultisigSimulation.InvalidSimulationError"})}}const n5={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},r5={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ig(e,t={}){if(!e)return null;const n=ym(e),r={...e,...n};return r.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,"blockTimestamp"in e&&(r.blockTimestamp=e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0),r.data=e.input,r.gas=BigInt(e.gas??0n),r.nonce=BigInt(e.nonce??0n),r.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,r.value=BigInt(e.value??0n),e.authorizationList&&(r.authorizationList=mm(e.authorizationList)),e.chainId&&(r.chainId=Number(e.chainId)),e.gasPrice&&(r.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(r.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(r.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(r.type=r5[e.type]??e.type),n&&(r.v=$0(n.yParity)),r}const i5={...n5,tempo:"0x76"},ag={...r5,"0x76":"tempo"};function sg(e,t={}){if(!e)return null;const n=ig(e);return n.type=ag[e.type],e.aaAuthorizationList&&(n.authorizationList=f9(e.aaAuthorizationList),delete n.aaAuthorizationList),e.calls&&(n.calls=e.calls.map(r=>({to:r.to,value:r.value&&r.value!=="0x"?BigInt(r.value):void 0,data:r.input||r.data||"0x"}))),e.feeToken&&(n.feeToken=e.feeToken),e.nonceKey&&(n.nonceKey=BigInt(e.nonceKey)),e.signature&&(n.signature=Gl(e.signature)),e.validAfter&&(n.validAfter=Number(e.validAfter)),e.validBefore&&(n.validBefore=Number(e.validBefore)),e.keyAuthorization&&(n.keyAuthorization=G0(e.keyAuthorization)),e.feePayerSignature&&(n.feePayerSignature=E0(e.feePayerSignature),n.feePayerSignature.v=$0(n.feePayerSignature.yParity)),n}function og(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=gm(e.authorizationList)),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(t.blobs=e.blobs),typeof e.chainId<"u"&&(t.chainId=ie(e.chainId)),typeof e.data<"u"?(t.data=e.data,t.input=e.data):typeof e.input<"u"&&(t.data=e.input,t.input=e.input),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=ie(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=ie(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=ie(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=ie(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=ie(e.maxPriorityFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=ie(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=ie(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=n5[e.type]||e.type),typeof e.value<"u"&&(t.value=ie(e.value)),t}function lg(e){const t=og({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=w9(e.authorizationList)),e.calls?t.calls=e.calls.map(r=>({to:r.to?ln(r.to):r.to,value:r.value?ie(r.value):"0x",data:r.data??"0x"})):(e.to||e.data||e.value)&&(t.calls=[{to:e.to?ln(e.to):void 0,value:e.value?ie(e.value):"0x",data:e.data??"0x"}]),typeof e.feeToken<"u"&&(t.feeToken=q0(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=J0(e.keyAuthorization)),e.keyAuthorizationSimulation&&(t.keyAuthorizationSimulation=bp(e.keyAuthorizationSimulation)),e.multisigSimulation&&(t.multisigSimulation=bp(e.multisigSimulation)),typeof e.validBefore<"u"&&(t.validBefore=ie(e.validBefore)),typeof e.validAfter<"u"&&(t.validAfter=ie(e.validAfter));const n=(()=>{if(e.nonceKey==="random")return E3(6);if(typeof e.nonceKey=="bigint")return ie(e.nonceKey)})();return n&&(t.nonceKey=n),(typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.multisigSimulation<"u"||typeof e.nonceKey<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"||e.type==="tempo")&&(t.type=i5.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}const a5={4217:{base:4217e5,range:100261e4},42431:{base:142431e4,range:723173648}},s5=4217;a5[s5].base;function o5(e,t=s5){const{base:n,range:r}=cg(t);return n+e%r}class dg extends Ut{constructor({sourceId:t}){super(`Source chain ID "${t}" is not supported.`,{metaMessages:["Supported source chain IDs: 4217, 42431."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ZoneId.UnsupportedSourceIdError"})}}function cg(e){if(e===4217||e===42431)return a5[e];throw new dg({sourceId:e})}const xn=[{name:"authorizeKey",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"uint8",name:"signatureType"},{type:"uint64",name:"expiry"},{type:"bool",name:"enforceLimits"},{type:"tuple[]",name:"limits",components:[{type:"address",name:"token"},{type:"uint256",name:"amount"}]}],outputs:[]},{name:"authorizeKey",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"uint8",name:"signatureType"},{type:"tuple",name:"config",components:[{type:"uint64",name:"expiry"},{type:"bool",name:"enforceLimits"},{type:"tuple[]",name:"limits",components:[{type:"address",name:"token"},{type:"uint256",name:"amount"},{type:"uint64",name:"period"}]},{type:"bool",name:"allowAnyCalls"},{type:"tuple[]",name:"allowedCalls",components:[{type:"address",name:"target"},{type:"tuple[]",name:"selectorRules",components:[{type:"bytes4",name:"selector"},{type:"address[]",name:"recipients"}]}]}]}],outputs:[]},{name:"authorizeKey",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"uint8",name:"signatureType"},{type:"tuple",name:"config",components:[{type:"uint64",name:"expiry"},{type:"bool",name:"enforceLimits"},{type:"tuple[]",name:"limits",components:[{type:"address",name:"token"},{type:"uint256",name:"amount"},{type:"uint64",name:"period"}]},{type:"bool",name:"allowAnyCalls"},{type:"tuple[]",name:"allowedCalls",components:[{type:"address",name:"target"},{type:"tuple[]",name:"selectorRules",components:[{type:"bytes4",name:"selector"},{type:"address[]",name:"recipients"}]}]}]},{type:"bytes32",name:"witness"}],outputs:[]},{name:"authorizeAdminKey",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"uint8",name:"signatureType"},{type:"bytes32",name:"witness"}],outputs:[]},{name:"burnKeyAuthorizationWitness",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"witness"}],outputs:[]},{name:"revokeKey",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"}],outputs:[]},{name:"updateSpendingLimit",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"address",name:"token"},{type:"uint256",name:"newLimit"}],outputs:[]},{name:"setAllowedCalls",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"tuple[]",name:"scopes",components:[{type:"address",name:"target"},{type:"tuple[]",name:"selectorRules",components:[{type:"bytes4",name:"selector"},{type:"address[]",name:"recipients"}]}]}],outputs:[]},{name:"removeAllowedCalls",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"keyId"},{type:"address",name:"target"}],outputs:[]},{name:"getKey",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"address",name:"keyId"}],outputs:[{type:"tuple",components:[{type:"uint8",name:"signatureType"},{type:"address",name:"keyId"},{type:"uint64",name:"expiry"},{type:"bool",name:"enforceLimits"},{type:"bool",name:"isRevoked"}]}]},{name:"getRemainingLimit",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"address",name:"keyId"},{type:"address",name:"token"}],outputs:[{type:"uint256",name:"remaining"}]},{name:"getRemainingLimitWithPeriod",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"address",name:"keyId"},{type:"address",name:"token"}],outputs:[{type:"uint256",name:"remaining"},{type:"uint64",name:"periodEnd"}]},{name:"getAllowedCalls",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"address",name:"keyId"}],outputs:[{type:"bool",name:"isScoped"},{type:"tuple[]",name:"scopes",components:[{type:"address",name:"target"},{type:"tuple[]",name:"selectorRules",components:[{type:"bytes4",name:"selector"},{type:"address[]",name:"recipients"}]}]}]},{name:"isKeyAuthorizationWitnessBurned",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"bytes32",name:"witness"}],outputs:[{type:"bool"}]},{name:"isAdminKey",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"address",name:"keyId"}],outputs:[{type:"bool"}]},{name:"getTransactionKey",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"KeyAuthorized",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"address",name:"publicKey",indexed:!0},{type:"uint8",name:"signatureType"},{type:"uint64",name:"expiry"}]},{name:"AdminKeyAuthorized",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"address",name:"publicKey",indexed:!0}]},{name:"KeyRevoked",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"address",name:"publicKey",indexed:!0}]},{name:"SpendingLimitUpdated",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"address",name:"publicKey",indexed:!0},{type:"address",name:"token",indexed:!0},{type:"uint256",name:"newLimit"}]},{name:"AccessKeySpend",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"address",name:"publicKey",indexed:!0},{type:"address",name:"token",indexed:!0},{type:"uint256",name:"amount"},{type:"uint256",name:"remainingLimit"}]},{name:"KeyAuthorizationWitness",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"bytes32",name:"witness",indexed:!0}]},{name:"KeyAuthorizationWitnessBurned",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"bytes32",name:"witness",indexed:!0}]},{name:"UnauthorizedCaller",type:"error",inputs:[]},{name:"KeyAlreadyExists",type:"error",inputs:[]},{name:"KeyNotFound",type:"error",inputs:[]},{name:"KeyExpired",type:"error",inputs:[]},{name:"SpendingLimitExceeded",type:"error",inputs:[]},{name:"InvalidSpendingLimit",type:"error",inputs:[]},{name:"InvalidSignatureType",type:"error",inputs:[]},{name:"ZeroPublicKey",type:"error",inputs:[]},{name:"ExpiryInPast",type:"error",inputs:[]},{name:"KeyAlreadyRevoked",type:"error",inputs:[]},{name:"SignatureTypeMismatch",type:"error",inputs:[{type:"uint8",name:"expected"},{type:"uint8",name:"actual"}]},{name:"CallNotAllowed",type:"error",inputs:[]},{name:"InvalidCallScope",type:"error",inputs:[]},{name:"InvalidKeyId",type:"error",inputs:[]},{name:"InvalidKeyAuthorizationWitness",type:"error",inputs:[]},{name:"KeyAuthorizationWitnessAlreadyBurned",type:"error",inputs:[]},{name:"LegacyAuthorizeKeySelectorChanged",type:"error",inputs:[{type:"bytes4",name:"newSelector"}]}],ug=[{name:"registerVirtualMaster",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"salt"}],outputs:[{type:"bytes4",name:"masterId"}]},{name:"getMaster",type:"function",stateMutability:"view",inputs:[{type:"bytes4",name:"masterId"}],outputs:[{type:"address"}]},{name:"resolveRecipient",type:"function",stateMutability:"view",inputs:[{type:"address",name:"to"}],outputs:[{type:"address",name:"effectiveRecipient"}]},{name:"resolveVirtualAddress",type:"function",stateMutability:"view",inputs:[{type:"address",name:"virtualAddr"}],outputs:[{type:"address",name:"master"}]},{name:"isVirtualAddress",type:"function",stateMutability:"pure",inputs:[{type:"address",name:"addr"}],outputs:[{type:"bool"}]},{name:"decodeVirtualAddress",type:"function",stateMutability:"pure",inputs:[{type:"address",name:"addr"}],outputs:[{type:"bool",name:"isVirtual"},{type:"bytes4",name:"masterId"},{type:"bytes6",name:"userTag"}]},{name:"isImplicitlyApproved",type:"function",stateMutability:"view",inputs:[{type:"address",name:"addr"}],outputs:[{type:"bool"}]},{name:"MasterRegistered",type:"event",inputs:[{type:"bytes4",name:"masterId",indexed:!0},{type:"address",name:"masterAddress",indexed:!0}]},{name:"MasterIdCollision",type:"error",inputs:[{type:"address",name:"master"}]},{name:"InvalidMasterAddress",type:"error",inputs:[]},{name:"ProofOfWorkFailed",type:"error",inputs:[]},{name:"VirtualAddressUnregistered",type:"error",inputs:[]}],el=[{name:"deriveAccount",type:"function",stateMutability:"pure",inputs:[{type:"bytes32",name:"salt"},{type:"uint8",name:"threshold"},{type:"tuple[]",name:"owners",components:[{type:"address",name:"owner"},{type:"uint8",name:"weight"}]}],outputs:[{type:"address",name:"account"}]},{name:"getConfigCommitment",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"bytes32",name:"commitment"}]},{name:"updateConfig",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"current",components:[{type:"bytes32",name:"salt"},{type:"uint64",name:"version"},{type:"uint8",name:"threshold"},{type:"tuple[]",name:"owners",components:[{type:"address",name:"owner"},{type:"uint8",name:"weight"}]}]},{type:"uint8",name:"threshold"},{type:"tuple[]",name:"owners",components:[{type:"address",name:"owner"},{type:"uint8",name:"weight"}]}],outputs:[]},{name:"MultisigConfigUpdated",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"bytes32",name:"salt"},{type:"uint64",name:"version"},{type:"uint8",name:"threshold"},{type:"tuple[]",name:"owners",components:[{type:"address",name:"owner"},{type:"uint8",name:"weight"}]}]},{name:"InvalidAccount",type:"error",inputs:[]},{name:"InvalidConfig",type:"error",inputs:[]},{name:"InvalidThreshold",type:"error",inputs:[]},{name:"InvalidMultisigOwner",type:"error",inputs:[]},{name:"InvalidWeight",type:"error",inputs:[]},{name:"TooManyOwners",type:"error",inputs:[]},{name:"DuplicateOwner",type:"error",inputs:[]},{name:"InvalidOwnerOrder",type:"error",inputs:[]},{name:"UnauthorizedMultisigCaller",type:"error",inputs:[]}],pg=[{name:"getCommitteeMembers",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64",name:"epoch"},{type:"bytes32[]",name:"publicKeys"}]},{name:"setCommitteeMembers",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"epoch"},{type:"bytes32[]",name:"publicKeys"}],outputs:[]},{name:"Unauthorized",type:"error",inputs:[]}],hg=[{name:"getNonce",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"uint256",name:"nonceKey"}],outputs:[{type:"uint64",name:"nonce"}]},{name:"NonceIncremented",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"uint256",name:"nonceKey",indexed:!0},{type:"uint64",name:"newNonce"}]},{name:"ProtocolNonceNotSupported",type:"error",inputs:[]},{name:"InvalidNonceKey",type:"error",inputs:[]},{name:"NonceOverflow",type:"error",inputs:[]},{name:"ExpiringNonceReplay",type:"error",inputs:[]},{name:"ExpiringNonceSetFull",type:"error",inputs:[]},{name:"InvalidExpiringNonceExpiry",type:"error",inputs:[]}],fg=[{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"receipt"}],outputs:[{type:"uint256",name:"amount"}]},{name:"claim",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"bytes",name:"receipt"}],outputs:[]},{name:"burnBlockedReceipt",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes",name:"receipt"}],outputs:[]},{name:"TransferBlocked",type:"event",inputs:[{type:"address",name:"token",indexed:!0},{type:"address",name:"receiver",indexed:!0},{type:"uint64",name:"blockedNonce",indexed:!0},{type:"uint256",name:"amount"},{type:"uint8",name:"receiptVersion"},{type:"bytes",name:"receipt"}]},{name:"ReceiptClaimed",type:"event",inputs:[{type:"address",name:"token",indexed:!0},{type:"address",name:"receiver",indexed:!0},{type:"uint64",name:"blockedNonce",indexed:!0},{type:"uint64",name:"blockedAt"},{type:"uint8",name:"receiptVersion"},{type:"address",name:"originator"},{type:"address",name:"recipient"},{type:"address",name:"recoveryAuthority"},{type:"address",name:"caller"},{type:"address",name:"to"},{type:"uint256",name:"amount"}]},{name:"ReceiptBurned",type:"event",inputs:[{type:"address",name:"token",indexed:!0},{type:"address",name:"receiver",indexed:!0},{type:"uint64",name:"blockedNonce",indexed:!0},{type:"uint64",name:"blockedAt"},{type:"uint8",name:"receiptVersion"},{type:"address",name:"originator"},{type:"address",name:"recipient"},{type:"address",name:"recoveryAuthority"},{type:"address",name:"caller"},{type:"uint256",name:"amount"}]},{name:"InvalidReceipt",type:"error",inputs:[]},{name:"InvalidClaimAddress",type:"error",inputs:[]},{name:"UnauthorizedClaimer",type:"error",inputs:[]},{name:"AddressReserved",type:"error",inputs:[]}],l5=[{name:"recover",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"hash"},{type:"bytes",name:"signature"}],outputs:[{type:"address",name:"signer"}]},{name:"verify",type:"function",stateMutability:"view",inputs:[{type:"address",name:"signer"},{type:"bytes32",name:"hash"},{type:"bytes",name:"signature"}],outputs:[{type:"bool"}]},{name:"verifyKeychain",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"bytes32",name:"hash"},{type:"bytes",name:"signature"}],outputs:[{type:"bool"}]},{name:"verifyKeychainAdmin",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"bytes32",name:"hash"},{type:"bytes",name:"signature"}],outputs:[{type:"bool"}]},{name:"InvalidFormat",type:"error",inputs:[]},{name:"InvalidSignature",type:"error",inputs:[]}],yg=[{name:"createPair",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"base"}],outputs:[{type:"bytes32",name:"key"}]},{name:"place",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"bool",name:"isBid"},{type:"int16",name:"tick"}],outputs:[{type:"uint128",name:"orderId"}]},{name:"placeFlip",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"bool",name:"isBid"},{type:"int16",name:"tick"},{type:"int16",name:"flipTick"}],outputs:[{type:"uint128",name:"orderId"}]},{name:"cancel",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint128",name:"orderId"}],outputs:[]},{name:"cancelStaleOrder",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint128",name:"orderId"}],outputs:[]},{name:"swapExactAmountIn",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"tokenIn"},{type:"address",name:"tokenOut"},{type:"uint128",name:"amountIn"},{type:"uint128",name:"minAmountOut"}],outputs:[{type:"uint128",name:"amountOut"}]},{name:"swapExactAmountOut",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"tokenIn"},{type:"address",name:"tokenOut"},{type:"uint128",name:"amountOut"},{type:"uint128",name:"maxAmountIn"}],outputs:[{type:"uint128",name:"amountIn"}]},{name:"quoteSwapExactAmountIn",type:"function",stateMutability:"view",inputs:[{type:"address",name:"tokenIn"},{type:"address",name:"tokenOut"},{type:"uint128",name:"amountIn"}],outputs:[{type:"uint128",name:"amountOut"}]},{name:"quoteSwapExactAmountOut",type:"function",stateMutability:"view",inputs:[{type:"address",name:"tokenIn"},{type:"address",name:"tokenOut"},{type:"uint128",name:"amountOut"}],outputs:[{type:"uint128",name:"amountIn"}]},{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{type:"address",name:"user"},{type:"address",name:"token"}],outputs:[{type:"uint128"}]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"},{type:"uint128",name:"amount"}],outputs:[]},{name:"getOrder",type:"function",stateMutability:"view",inputs:[{type:"uint128",name:"orderId"}],outputs:[{type:"tuple",components:[{type:"uint128",name:"orderId"},{type:"address",name:"maker"},{type:"bytes32",name:"bookKey"},{type:"bool",name:"isBid"},{type:"int16",name:"tick"},{type:"uint128",name:"amount"},{type:"uint128",name:"remaining"},{type:"uint128",name:"prev"},{type:"uint128",name:"next"},{type:"bool",name:"isFlip"},{type:"int16",name:"flipTick"}]}]},{name:"getTickLevel",type:"function",stateMutability:"view",inputs:[{type:"address",name:"base"},{type:"int16",name:"tick"},{type:"bool",name:"isBid"}],outputs:[{type:"uint128",name:"head"},{type:"uint128",name:"tail"},{type:"uint128",name:"totalLiquidity"}]},{name:"pairKey",type:"function",stateMutability:"pure",inputs:[{type:"address",name:"tokenA"},{type:"address",name:"tokenB"}],outputs:[{type:"bytes32"}]},{name:"nextOrderId",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128"}]},{name:"books",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"pairKey"}],outputs:[{type:"tuple",components:[{type:"address",name:"base"},{type:"address",name:"quote"},{type:"int16",name:"bestBidTick"},{type:"int16",name:"bestAskTick"}]}]},{name:"bookIndexForKey",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"bookKey"}],outputs:[{type:"bool",name:"set"},{type:"uint32",name:"index"}]},{name:"bookKeyForIndex",type:"function",stateMutability:"view",inputs:[{type:"uint32",name:"index"}],outputs:[{type:"bytes32",name:"bookKey"}]},{name:"setBookIndex",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint32",name:"index"}],outputs:[]},{name:"storageCredits",type:"function",stateMutability:"view",inputs:[{type:"address",name:"user"}],outputs:[{type:"uint64",name:"credits"}]},{name:"MIN_TICK",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"int16"}]},{name:"MAX_TICK",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"int16"}]},{name:"TICK_SPACING",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"int16"}]},{name:"PRICE_SCALE",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"uint32"}]},{name:"MIN_ORDER_AMOUNT",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"uint128"}]},{name:"MIN_PRICE",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"uint32"}]},{name:"MAX_PRICE",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"uint32"}]},{name:"tickToPrice",type:"function",stateMutability:"pure",inputs:[{type:"int16",name:"tick"}],outputs:[{type:"uint32",name:"price"}]},{name:"priceToTick",type:"function",stateMutability:"pure",inputs:[{type:"uint32",name:"price"}],outputs:[{type:"int16",name:"tick"}]},{name:"PairCreated",type:"event",inputs:[{type:"bytes32",name:"key",indexed:!0},{type:"address",name:"base",indexed:!0},{type:"address",name:"quote",indexed:!0}]},{name:"OrderPlaced",type:"event",inputs:[{type:"uint128",name:"orderId",indexed:!0},{type:"address",name:"maker",indexed:!0},{type:"address",name:"token",indexed:!0},{type:"uint128",name:"amount"},{type:"bool",name:"isBid"},{type:"int16",name:"tick"},{type:"bool",name:"isFlipOrder"},{type:"int16",name:"flipTick"}]},{name:"OrderFilled",type:"event",inputs:[{type:"uint128",name:"orderId",indexed:!0},{type:"address",name:"maker",indexed:!0},{type:"address",name:"taker",indexed:!0},{type:"uint128",name:"amountFilled"},{type:"bool",name:"partialFill"}]},{name:"OrderFlipped",type:"event",inputs:[{type:"uint128",name:"orderId",indexed:!0},{type:"address",name:"maker",indexed:!0},{type:"address",name:"token",indexed:!0},{type:"uint128",name:"amount"},{type:"bool",name:"isBid"},{type:"int16",name:"tick"},{type:"int16",name:"flipTick"}]},{name:"FlipFailed",type:"event",inputs:[{type:"uint128",name:"orderId",indexed:!0},{type:"address",name:"maker",indexed:!0},{type:"bytes4",name:"reason"}]},{name:"OrderCancelled",type:"event",inputs:[{type:"uint128",name:"orderId",indexed:!0}]},{name:"Unauthorized",type:"error",inputs:[]},{name:"PairDoesNotExist",type:"error",inputs:[]},{name:"PairAlreadyExists",type:"error",inputs:[]},{name:"OrderDoesNotExist",type:"error",inputs:[]},{name:"IdenticalTokens",type:"error",inputs:[]},{name:"InvalidToken",type:"error",inputs:[]},{name:"TickOutOfBounds",type:"error",inputs:[{type:"int16",name:"tick"}]},{name:"InvalidTick",type:"error",inputs:[]},{name:"InvalidFlipTick",type:"error",inputs:[]},{name:"InsufficientBalance",type:"error",inputs:[]},{name:"InsufficientLiquidity",type:"error",inputs:[]},{name:"InsufficientOutput",type:"error",inputs:[]},{name:"MaxInputExceeded",type:"error",inputs:[]},{name:"BelowMinimumOrderSize",type:"error",inputs:[{type:"uint128",name:"amount"}]},{name:"InvalidBaseToken",type:"error",inputs:[]},{name:"OrderNotStale",type:"error",inputs:[]},{name:"IndexAlreadySet",type:"error",inputs:[]}],mg=[{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"uint64"}]},{name:"modeOf",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"uint8"}]},{name:"budgetOf",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"uint64"}]},{name:"setMode",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint8",name:"newMode"}],outputs:[]},{name:"setBudget",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"credits"}],outputs:[]},{name:"InvalidMode",type:"error",inputs:[]},{name:"OnlyDirectCall",type:"error",inputs:[]}],gg=[{name:"userTokens",type:"function",stateMutability:"view",inputs:[{type:"address",name:"user"}],outputs:[{type:"address"}]},{name:"validatorTokens",type:"function",stateMutability:"view",inputs:[{type:"address",name:"validator"}],outputs:[{type:"address"}]},{name:"setUserToken",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"}],outputs:[]},{name:"setValidatorToken",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"}],outputs:[]},{name:"distributeFees",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"validator"},{type:"address",name:"token"}],outputs:[]},{name:"collectedFees",type:"function",stateMutability:"view",inputs:[{type:"address",name:"validator"},{type:"address",name:"token"}],outputs:[{type:"uint256"}]},{name:"UserTokenSet",type:"event",inputs:[{type:"address",name:"user",indexed:!0},{type:"address",name:"token",indexed:!0}]},{name:"ValidatorTokenSet",type:"event",inputs:[{type:"address",name:"validator",indexed:!0},{type:"address",name:"token",indexed:!0}]},{name:"FeesDistributed",type:"event",inputs:[{type:"address",name:"validator",indexed:!0},{type:"address",name:"token",indexed:!0},{type:"uint256",name:"amount"}]},{name:"InvalidToken",type:"error",inputs:[]},{name:"InsufficientFeeTokenBalance",type:"error",inputs:[]},{name:"CannotChangeWithinBlock",type:"error",inputs:[]}],wg=[{name:"M",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"N",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"SCALE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"MIN_LIQUIDITY",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"getPoolId",type:"function",stateMutability:"pure",inputs:[{type:"address",name:"userToken"},{type:"address",name:"validatorToken"}],outputs:[{type:"bytes32"}]},{name:"getPool",type:"function",stateMutability:"view",inputs:[{type:"address",name:"userToken"},{type:"address",name:"validatorToken"}],outputs:[{type:"tuple",components:[{type:"uint128",name:"reserveUserToken"},{type:"uint128",name:"reserveValidatorToken"}]}]},{name:"pools",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"poolId"}],outputs:[{type:"tuple",components:[{type:"uint128",name:"reserveUserToken"},{type:"uint128",name:"reserveValidatorToken"}]}]},{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"userToken"},{type:"address",name:"validatorToken"},{type:"uint256",name:"amountValidatorToken"},{type:"address",name:"to"}],outputs:[{type:"uint256",name:"liquidity"}]},{name:"burn",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"userToken"},{type:"address",name:"validatorToken"},{type:"uint256",name:"liquidity"},{type:"address",name:"to"}],outputs:[{type:"uint256",name:"amountUserToken"},{type:"uint256",name:"amountValidatorToken"}]},{name:"totalSupply",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"poolId"}],outputs:[{type:"uint256"}]},{name:"liquidityBalances",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"poolId"},{type:"address",name:"user"}],outputs:[{type:"uint256"}]},{name:"rebalanceSwap",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"userToken"},{type:"address",name:"validatorToken"},{type:"uint256",name:"amountOut"},{type:"address",name:"to"}],outputs:[{type:"uint256",name:"amountIn"}]},{name:"Mint",type:"event",inputs:[{type:"address",name:"sender"},{type:"address",name:"to",indexed:!0},{type:"address",name:"userToken",indexed:!0},{type:"address",name:"validatorToken",indexed:!0},{type:"uint256",name:"amountValidatorToken"},{type:"uint256",name:"liquidity"}]},{name:"Burn",type:"event",inputs:[{type:"address",name:"sender",indexed:!0},{type:"address",name:"userToken",indexed:!0},{type:"address",name:"validatorToken",indexed:!0},{type:"uint256",name:"amountUserToken"},{type:"uint256",name:"amountValidatorToken"},{type:"uint256",name:"liquidity"},{type:"address",name:"to"}]},{name:"RebalanceSwap",type:"event",inputs:[{type:"address",name:"userToken",indexed:!0},{type:"address",name:"validatorToken",indexed:!0},{type:"address",name:"swapper",indexed:!0},{type:"uint256",name:"amountIn"},{type:"uint256",name:"amountOut"}]},{name:"IdenticalAddresses",type:"error",inputs:[]},{name:"InvalidToken",type:"error",inputs:[]},{name:"InsufficientLiquidity",type:"error",inputs:[]},{name:"InsufficientReserves",type:"error",inputs:[]},{name:"InvalidAmount",type:"error",inputs:[]},{name:"DivisionByZero",type:"error",inputs:[]},{name:"InvalidSwapCalculation",type:"error",inputs:[]}],vg=[{name:"CLOSE_GRACE_PERIOD",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"VOUCHER_TYPEHASH",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"open",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"uint96",name:"deposit"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"}],outputs:[{type:"bytes32",name:"channelId"}]},{name:"settle",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]},{type:"uint96",name:"cumulativeAmount"},{type:"bytes",name:"signature"}],outputs:[]},{name:"topUp",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]},{type:"uint96",name:"additionalDeposit"}],outputs:[]},{name:"close",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]},{type:"uint96",name:"cumulativeAmount"},{type:"uint96",name:"captureAmount"},{type:"bytes",name:"signature"}],outputs:[]},{name:"requestClose",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]}],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]}],outputs:[]},{name:"getChannel",type:"function",stateMutability:"view",inputs:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]}],outputs:[{type:"tuple",components:[{type:"tuple",name:"descriptor",components:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}]},{type:"tuple",name:"state",components:[{type:"uint96",name:"settled"},{type:"uint96",name:"deposit"},{type:"uint32",name:"closeRequestedAt"}]}]}]},{name:"getChannelState",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"channelId"}],outputs:[{type:"tuple",components:[{type:"uint96",name:"settled"},{type:"uint96",name:"deposit"},{type:"uint32",name:"closeRequestedAt"}]}]},{name:"getChannelStatesBatch",type:"function",stateMutability:"view",inputs:[{type:"bytes32[]",name:"channelIds"}],outputs:[{type:"tuple[]",components:[{type:"uint96",name:"settled"},{type:"uint96",name:"deposit"},{type:"uint32",name:"closeRequestedAt"}]}]},{name:"computeChannelId",type:"function",stateMutability:"view",inputs:[{type:"address",name:"payer"},{type:"address",name:"payee"},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"bytes32",name:"salt"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"expiringNonceHash"}],outputs:[{type:"bytes32"}]},{name:"getVoucherDigest",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"channelId"},{type:"uint96",name:"cumulativeAmount"}],outputs:[{type:"bytes32"}]},{name:"domainSeparator",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"storageCredits",type:"function",stateMutability:"view",inputs:[{type:"address",name:"payer"}],outputs:[{type:"uint64",name:"credits"}]},{name:"ChannelOpened",type:"event",inputs:[{type:"bytes32",name:"channelId",indexed:!0},{type:"address",name:"payer",indexed:!0},{type:"address",name:"payee",indexed:!0},{type:"address",name:"operator"},{type:"address",name:"token"},{type:"address",name:"authorizedSigner"},{type:"bytes32",name:"salt"},{type:"bytes32",name:"expiringNonceHash"},{type:"uint96",name:"deposit"}]},{name:"Settled",type:"event",inputs:[{type:"bytes32",name:"channelId",indexed:!0},{type:"address",name:"payer",indexed:!0},{type:"address",name:"payee",indexed:!0},{type:"uint96",name:"cumulativeAmount"},{type:"uint96",name:"deltaPaid"},{type:"uint96",name:"newSettled"}]},{name:"TopUp",type:"event",inputs:[{type:"bytes32",name:"channelId",indexed:!0},{type:"address",name:"payer",indexed:!0},{type:"address",name:"payee",indexed:!0},{type:"uint96",name:"additionalDeposit"},{type:"uint96",name:"newDeposit"}]},{name:"CloseRequested",type:"event",inputs:[{type:"bytes32",name:"channelId",indexed:!0},{type:"address",name:"payer",indexed:!0},{type:"address",name:"payee",indexed:!0},{type:"uint256",name:"closeGraceEnd"}]},{name:"ChannelClosed",type:"event",inputs:[{type:"bytes32",name:"channelId",indexed:!0},{type:"address",name:"payer",indexed:!0},{type:"address",name:"payee",indexed:!0},{type:"uint96",name:"settledToPayee"},{type:"uint96",name:"refundedToPayer"}]},{name:"CloseRequestCancelled",type:"event",inputs:[{type:"bytes32",name:"channelId",indexed:!0},{type:"address",name:"payer",indexed:!0},{type:"address",name:"payee",indexed:!0}]},{name:"ChannelAlreadyExists",type:"error",inputs:[]},{name:"ChannelNotFound",type:"error",inputs:[]},{name:"NotPayer",type:"error",inputs:[]},{name:"NotPayeeOrOperator",type:"error",inputs:[]},{name:"InvalidPayee",type:"error",inputs:[]},{name:"ZeroDeposit",type:"error",inputs:[]},{name:"ExpiringNonceHashNotSet",type:"error",inputs:[]},{name:"InvalidSignature",type:"error",inputs:[]},{name:"AmountExceedsDeposit",type:"error",inputs:[]},{name:"AmountNotIncreasing",type:"error",inputs:[]},{name:"CaptureAmountInvalid",type:"error",inputs:[]},{name:"CloseNotReady",type:"error",inputs:[]},{name:"DepositOverflow",type:"error",inputs:[]}],Cg=[{name:"createToken",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"name"},{type:"string",name:"symbol"},{type:"string",name:"currency"},{type:"address",name:"quoteToken"},{type:"address",name:"admin"},{type:"bytes32",name:"salt"}],outputs:[{type:"address"}]},{name:"createToken",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"name"},{type:"string",name:"symbol"},{type:"string",name:"currency"},{type:"address",name:"quoteToken"},{type:"address",name:"admin"},{type:"bytes32",name:"salt"},{type:"string",name:"logoURI"}],outputs:[{type:"address"}]},{name:"isTIP20",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"}],outputs:[{type:"bool"}]},{name:"getTokenAddress",type:"function",stateMutability:"pure",inputs:[{type:"address",name:"sender"},{type:"bytes32",name:"salt"}],outputs:[{type:"address"}]},{name:"TokenCreated",type:"event",inputs:[{type:"address",name:"token",indexed:!0},{type:"string",name:"name"},{type:"string",name:"symbol"},{type:"string",name:"currency"},{type:"address",name:"quoteToken"},{type:"address",name:"admin"},{type:"bytes32",name:"salt"}]},{name:"AddressReserved",type:"error",inputs:[]},{name:"AddressNotReserved",type:"error",inputs:[]},{name:"InvalidQuoteToken",type:"error",inputs:[]},{name:"TokenAlreadyExists",type:"error",inputs:[{type:"address",name:"token"}]}],_g=[{name:"name",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{name:"symbol",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{name:"decimals",type:"function",stateMutability:"pure",inputs:[],outputs:[{type:"uint8"}]},{name:"totalSupply",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"quoteToken",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"nextQuoteToken",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"uint256"}]},{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[{type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"spender"},{type:"uint256",name:"amount"}],outputs:[{type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{type:"address",name:"owner"},{type:"address",name:"spender"}],outputs:[{type:"uint256"}]},{name:"transferFrom",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"from"},{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[{type:"bool"}]},{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},{name:"burn",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"amount"}],outputs:[]},{name:"currency",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{name:"supplyCap",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"paused",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bool"}]},{name:"transferPolicyId",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"logoURI",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{name:"setLogoURI",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"newLogoURI"}],outputs:[]},{name:"burnBlocked",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"from"},{type:"uint256",name:"amount"}],outputs:[]},{name:"burnAt",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"from"},{type:"uint256",name:"amount"}],outputs:[]},{name:"mintWithMemo",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"},{type:"bytes32",name:"memo"}],outputs:[]},{name:"burnWithMemo",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"amount"},{type:"bytes32",name:"memo"}],outputs:[]},{name:"transferWithMemo",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"},{type:"bytes32",name:"memo"}],outputs:[]},{name:"transferFromWithMemo",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"from"},{type:"address",name:"to"},{type:"uint256",name:"amount"},{type:"bytes32",name:"memo"}],outputs:[{type:"bool"}]},{name:"changeTransferPolicyId",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"newPolicyId"}],outputs:[]},{name:"setSupplyCap",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"newSupplyCap"}],outputs:[]},{name:"pause",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"unpause",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"setNextQuoteToken",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newQuoteToken"}],outputs:[]},{name:"completeQuoteTokenUpdate",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"PAUSE_ROLE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"UNPAUSE_ROLE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"ISSUER_ROLE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"BURN_BLOCKED_ROLE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"BURN_AT_ROLE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"permit",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"owner"},{type:"address",name:"spender"},{type:"uint256",name:"value"},{type:"uint256",name:"deadline"},{type:"uint8",name:"v"},{type:"bytes32",name:"r"},{type:"bytes32",name:"s"}],outputs:[]},{name:"nonces",type:"function",stateMutability:"view",inputs:[{type:"address",name:"owner"}],outputs:[{type:"uint256"}]},{name:"DOMAIN_SEPARATOR",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"distributeReward",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"amount"}],outputs:[]},{name:"setRewardRecipient",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"recipient"}],outputs:[]},{name:"claimRewards",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[{type:"uint256"}]},{name:"optedInSupply",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128"}]},{name:"globalRewardPerToken",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"userRewardInfo",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"tuple",components:[{type:"address",name:"rewardRecipient"},{type:"uint256",name:"rewardPerToken"},{type:"uint256",name:"rewardBalance"}]}]},{name:"getPendingRewards",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"uint128"}]},{name:"Transfer",type:"event",inputs:[{type:"address",name:"from",indexed:!0},{type:"address",name:"to",indexed:!0},{type:"uint256",name:"amount"}]},{name:"Approval",type:"event",inputs:[{type:"address",name:"owner",indexed:!0},{type:"address",name:"spender",indexed:!0},{type:"uint256",name:"amount"}]},{name:"Mint",type:"event",inputs:[{type:"address",name:"to",indexed:!0},{type:"uint256",name:"amount"}]},{name:"Burn",type:"event",inputs:[{type:"address",name:"from",indexed:!0},{type:"uint256",name:"amount"}]},{name:"BurnBlocked",type:"event",inputs:[{type:"address",name:"from",indexed:!0},{type:"uint256",name:"amount"}]},{name:"BurnAt",type:"event",inputs:[{type:"address",name:"burner",indexed:!0},{type:"address",name:"from",indexed:!0},{type:"uint256",name:"amount",indexed:!0}]},{name:"TransferWithMemo",type:"event",inputs:[{type:"address",name:"from",indexed:!0},{type:"address",name:"to",indexed:!0},{type:"uint256",name:"amount"},{type:"bytes32",name:"memo",indexed:!0}]},{name:"TransferPolicyUpdate",type:"event",inputs:[{type:"address",name:"updater",indexed:!0},{type:"uint64",name:"newPolicyId",indexed:!0}]},{name:"SupplyCapUpdate",type:"event",inputs:[{type:"address",name:"updater",indexed:!0},{type:"uint256",name:"newSupplyCap",indexed:!0}]},{name:"PauseStateUpdate",type:"event",inputs:[{type:"address",name:"updater",indexed:!0},{type:"bool",name:"isPaused"}]},{name:"NextQuoteTokenSet",type:"event",inputs:[{type:"address",name:"updater",indexed:!0},{type:"address",name:"nextQuoteToken",indexed:!0}]},{name:"QuoteTokenUpdate",type:"event",inputs:[{type:"address",name:"updater",indexed:!0},{type:"address",name:"newQuoteToken",indexed:!0}]},{name:"RewardDistributed",type:"event",inputs:[{type:"address",name:"funder",indexed:!0},{type:"uint256",name:"amount"}]},{name:"RewardRecipientSet",type:"event",inputs:[{type:"address",name:"holder",indexed:!0},{type:"address",name:"recipient",indexed:!0}]},{name:"LogoURIUpdated",type:"event",inputs:[{type:"address",name:"updater",indexed:!0},{type:"string",name:"newLogoURI"}]},{name:"InsufficientBalance",type:"error",inputs:[{type:"uint256",name:"available"},{type:"uint256",name:"required"},{type:"address",name:"token"}]},{name:"InsufficientAllowance",type:"error",inputs:[]},{name:"SupplyCapExceeded",type:"error",inputs:[]},{name:"InvalidSupplyCap",type:"error",inputs:[]},{name:"InvalidPayload",type:"error",inputs:[]},{name:"PolicyForbids",type:"error",inputs:[]},{name:"InvalidRecipient",type:"error",inputs:[]},{name:"ContractPaused",type:"error",inputs:[]},{name:"InvalidCurrency",type:"error",inputs:[]},{name:"InvalidQuoteToken",type:"error",inputs:[]},{name:"InvalidAmount",type:"error",inputs:[]},{name:"NoOptedInSupply",type:"error",inputs:[]},{name:"Unauthorized",type:"error",inputs:[]},{name:"ProtectedAddress",type:"error",inputs:[]},{name:"InvalidToken",type:"error",inputs:[]},{name:"Uninitialized",type:"error",inputs:[]},{name:"InvalidTransferPolicyId",type:"error",inputs:[]},{name:"PermitExpired",type:"error",inputs:[]},{name:"InvalidSignature",type:"error",inputs:[]},{name:"LogoURITooLong",type:"error",inputs:[]},{name:"InvalidLogoURI",type:"error",inputs:[]},{name:"hasRole",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"bytes32",name:"role"}],outputs:[{type:"bool"}]},{name:"getRoleAdmin",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"role"}],outputs:[{type:"bytes32"}]},{name:"grantRole",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"role"},{type:"address",name:"account"}],outputs:[]},{name:"revokeRole",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"role"},{type:"address",name:"account"}],outputs:[]},{name:"renounceRole",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"role"}],outputs:[]},{name:"setRoleAdmin",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"role"},{type:"bytes32",name:"adminRole"}],outputs:[]},{name:"RoleMembershipUpdated",type:"event",inputs:[{type:"bytes32",name:"role",indexed:!0},{type:"address",name:"account",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"bool",name:"hasRole"}]},{name:"RoleAdminUpdated",type:"event",inputs:[{type:"bytes32",name:"role",indexed:!0},{type:"bytes32",name:"newAdminRole",indexed:!0},{type:"address",name:"sender",indexed:!0}]},{name:"Unauthorized",type:"error",inputs:[]}],bg=[{name:"policyIdCounter",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"policyExists",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"}],outputs:[{type:"bool"}]},{name:"tokenTransferPolicyId",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"}],outputs:[{type:"bool",name:"isSet"},{type:"uint64",name:"policyId"}]},{name:"policyData",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"}],outputs:[{type:"uint8",name:"policyType"},{type:"address",name:"admin"}]},{name:"isAuthorized",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"user"}],outputs:[{type:"bool"}]},{name:"isAuthorizedSender",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"user"}],outputs:[{type:"bool"}]},{name:"isAuthorizedRecipient",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"user"}],outputs:[{type:"bool"}]},{name:"isAuthorizedMintRecipient",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"user"}],outputs:[{type:"bool"}]},{name:"compoundPolicyData",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"policyId"}],outputs:[{type:"uint64",name:"senderPolicyId"},{type:"uint64",name:"recipientPolicyId"},{type:"uint64",name:"mintRecipientPolicyId"}]},{name:"receivePolicy",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"bool",name:"hasReceivePolicy"},{type:"uint64",name:"senderPolicyId"},{type:"uint8",name:"senderPolicyType"},{type:"uint64",name:"tokenFilterId"},{type:"uint8",name:"tokenFilterType"},{type:"address",name:"recoveryAuthority"}]},{name:"validateReceivePolicy",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"},{type:"address",name:"sender"},{type:"address",name:"receiver"}],outputs:[{type:"bool",name:"authorized"},{type:"uint8",name:"blockedReason"}]},{name:"createPolicy",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"admin"},{type:"uint8",name:"policyType"}],outputs:[{type:"uint64"}]},{name:"createPolicyWithAccounts",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"admin"},{type:"uint8",name:"policyType"},{type:"address[]",name:"accounts"}],outputs:[{type:"uint64"}]},{name:"setPolicyAdmin",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"admin"}],outputs:[]},{name:"modifyPolicyWhitelist",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"account"},{type:"bool",name:"allowed"}],outputs:[]},{name:"modifyPolicyBlacklist",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"policyId"},{type:"address",name:"account"},{type:"bool",name:"restricted"}],outputs:[]},{name:"createCompoundPolicy",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"senderPolicyId"},{type:"uint64",name:"recipientPolicyId"},{type:"uint64",name:"mintRecipientPolicyId"}],outputs:[{type:"uint64"}]},{name:"setReceivePolicy",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"senderPolicyId"},{type:"uint64",name:"tokenFilterId"},{type:"address",name:"recoveryAuthority"}],outputs:[]},{name:"migrateTransferPolicyIds",type:"function",stateMutability:"nonpayable",inputs:[{type:"address[]",name:"tokens"}],outputs:[{type:"uint256",name:"migrated"}]},{name:"PolicyAdminUpdated",type:"event",inputs:[{type:"uint64",name:"policyId",indexed:!0},{type:"address",name:"updater",indexed:!0},{type:"address",name:"admin",indexed:!0}]},{name:"PolicyCreated",type:"event",inputs:[{type:"uint64",name:"policyId",indexed:!0},{type:"address",name:"updater",indexed:!0},{type:"uint8",name:"policyType"}]},{name:"WhitelistUpdated",type:"event",inputs:[{type:"uint64",name:"policyId",indexed:!0},{type:"address",name:"updater",indexed:!0},{type:"address",name:"account",indexed:!0},{type:"bool",name:"allowed"}]},{name:"BlacklistUpdated",type:"event",inputs:[{type:"uint64",name:"policyId",indexed:!0},{type:"address",name:"updater",indexed:!0},{type:"address",name:"account",indexed:!0},{type:"bool",name:"restricted"}]},{name:"CompoundPolicyCreated",type:"event",inputs:[{type:"uint64",name:"policyId",indexed:!0},{type:"address",name:"creator",indexed:!0},{type:"uint64",name:"senderPolicyId"},{type:"uint64",name:"recipientPolicyId"},{type:"uint64",name:"mintRecipientPolicyId"}]},{name:"ReceivePolicyUpdated",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"uint64",name:"senderPolicyId"},{type:"uint64",name:"tokenFilterId"},{type:"address",name:"recoveryAuthority"}]},{name:"Unauthorized",type:"error",inputs:[]},{name:"PolicyNotFound",type:"error",inputs:[]},{name:"PolicyNotSimple",type:"error",inputs:[]},{name:"InvalidPolicyType",type:"error",inputs:[]},{name:"IncompatiblePolicyType",type:"error",inputs:[]},{name:"VirtualAddressNotAllowed",type:"error",inputs:[]},{name:"InvalidReceivePolicyType",type:"error",inputs:[]},{name:"InvalidRecoveryAuthority",type:"error",inputs:[]}],Lg=[{name:"getActiveValidators",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"tuple[]",name:"validators",components:[{type:"bytes32",name:"publicKey"},{type:"address",name:"validatorAddress"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"feeRecipient"},{type:"uint64",name:"index"},{type:"uint64",name:"addedAtHeight"},{type:"uint64",name:"deactivatedAtHeight"}]}]},{name:"getInitializedAtHeight",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"owner",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"validatorCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"validatorByIndex",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"index"}],outputs:[{type:"tuple",components:[{type:"bytes32",name:"publicKey"},{type:"address",name:"validatorAddress"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"feeRecipient"},{type:"uint64",name:"index"},{type:"uint64",name:"addedAtHeight"},{type:"uint64",name:"deactivatedAtHeight"}]}]},{name:"validatorByAddress",type:"function",stateMutability:"view",inputs:[{type:"address",name:"validatorAddress"}],outputs:[{type:"tuple",components:[{type:"bytes32",name:"publicKey"},{type:"address",name:"validatorAddress"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"feeRecipient"},{type:"uint64",name:"index"},{type:"uint64",name:"addedAtHeight"},{type:"uint64",name:"deactivatedAtHeight"}]}]},{name:"validatorByPublicKey",type:"function",stateMutability:"view",inputs:[{type:"bytes32",name:"publicKey"}],outputs:[{type:"tuple",components:[{type:"bytes32",name:"publicKey"},{type:"address",name:"validatorAddress"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"feeRecipient"},{type:"uint64",name:"index"},{type:"uint64",name:"addedAtHeight"},{type:"uint64",name:"deactivatedAtHeight"}]}]},{name:"getNextNetworkIdentityRotationEpoch",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"isInitialized",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bool"}]},{name:"addValidator",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"validatorAddress"},{type:"bytes32",name:"publicKey"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"feeRecipient"},{type:"bytes",name:"signature"}],outputs:[{type:"uint64",name:"index"}]},{name:"deactivateValidator",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"idx"}],outputs:[]},{name:"rotateValidator",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"idx"},{type:"bytes32",name:"publicKey"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"bytes",name:"signature"}],outputs:[]},{name:"setFeeRecipient",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"idx"},{type:"address",name:"feeRecipient"}],outputs:[]},{name:"setIpAddresses",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"idx"},{type:"string",name:"ingress"},{type:"string",name:"egress"}],outputs:[]},{name:"transferValidatorOwnership",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"idx"},{type:"address",name:"newAddress"}],outputs:[]},{name:"transferOwnership",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newOwner"}],outputs:[]},{name:"setNetworkIdentityRotationEpoch",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"epoch"}],outputs:[]},{name:"migrateValidator",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"idx"}],outputs:[]},{name:"initializeIfMigrated",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"ValidatorAdded",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"address",name:"validatorAddress",indexed:!0},{type:"bytes32",name:"publicKey"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"feeRecipient"}]},{name:"ValidatorDeactivated",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"address",name:"validatorAddress",indexed:!0}]},{name:"ValidatorRotated",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"uint64",name:"deactivatedIndex",indexed:!0},{type:"address",name:"validatorAddress",indexed:!0},{type:"bytes32",name:"oldPublicKey"},{type:"bytes32",name:"newPublicKey"},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"caller"}]},{name:"FeeRecipientUpdated",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"address",name:"feeRecipient"},{type:"address",name:"caller"}]},{name:"IpAddressesUpdated",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"string",name:"ingress"},{type:"string",name:"egress"},{type:"address",name:"caller"}]},{name:"ValidatorOwnershipTransferred",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"address",name:"oldAddress",indexed:!0},{type:"address",name:"newAddress",indexed:!0},{type:"address",name:"caller"}]},{name:"OwnershipTransferred",type:"event",inputs:[{type:"address",name:"oldOwner",indexed:!0},{type:"address",name:"newOwner",indexed:!0}]},{name:"ValidatorMigrated",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"address",name:"validatorAddress",indexed:!0},{type:"bytes32",name:"publicKey"}]},{name:"NetworkIdentityRotationEpochSet",type:"event",inputs:[{type:"uint64",name:"previousEpoch",indexed:!0},{type:"uint64",name:"nextEpoch",indexed:!0}]},{name:"Initialized",type:"event",inputs:[{type:"uint64",name:"height"}]},{name:"SkippedValidatorMigration",type:"event",inputs:[{type:"uint64",name:"index",indexed:!0},{type:"address",name:"validatorAddress",indexed:!0},{type:"bytes32",name:"publicKey"}]},{name:"AlreadyInitialized",type:"error",inputs:[]},{name:"IngressAlreadyExists",type:"error",inputs:[{type:"string",name:"ingress"}]},{name:"EmptyV1ValidatorSet",type:"error",inputs:[]},{name:"InvalidMigrationIndex",type:"error",inputs:[]},{name:"InvalidOwner",type:"error",inputs:[]},{name:"InvalidPublicKey",type:"error",inputs:[]},{name:"InvalidSignature",type:"error",inputs:[]},{name:"InvalidSignatureFormat",type:"error",inputs:[]},{name:"InvalidValidatorAddress",type:"error",inputs:[]},{name:"MigrationNotComplete",type:"error",inputs:[]},{name:"NotInitialized",type:"error",inputs:[]},{name:"NotIp",type:"error",inputs:[{type:"string",name:"input"},{type:"string",name:"backtrace"}]},{name:"NotIpPort",type:"error",inputs:[{type:"string",name:"input"},{type:"string",name:"backtrace"}]},{name:"PublicKeyAlreadyExists",type:"error",inputs:[]},{name:"Unauthorized",type:"error",inputs:[]},{name:"AddressAlreadyHasValidator",type:"error",inputs:[]},{name:"ValidatorAlreadyDeactivated",type:"error",inputs:[]},{name:"ValidatorNotFound",type:"error",inputs:[]}],Ag=[{name:"getValidators",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"tuple[]",name:"validators",components:[{type:"bytes32",name:"publicKey"},{type:"bool",name:"active"},{type:"uint64",name:"index"},{type:"address",name:"validatorAddress"},{type:"string",name:"inboundAddress"},{type:"string",name:"outboundAddress"}]}]},{name:"addValidator",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newValidatorAddress"},{type:"bytes32",name:"publicKey"},{type:"bool",name:"active"},{type:"string",name:"inboundAddress"},{type:"string",name:"outboundAddress"}],outputs:[]},{name:"updateValidator",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newValidatorAddress"},{type:"bytes32",name:"publicKey"},{type:"string",name:"inboundAddress"},{type:"string",name:"outboundAddress"}],outputs:[]},{name:"changeValidatorStatus",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"validator"},{type:"bool",name:"active"}],outputs:[]},{name:"changeValidatorStatusByIndex",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"index"},{type:"bool",name:"active"}],outputs:[]},{name:"owner",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"changeOwner",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newOwner"}],outputs:[]},{name:"getNextFullDkgCeremony",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"setNextFullDkgCeremony",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"epoch"}],outputs:[]},{name:"validatorsArray",type:"function",stateMutability:"view",inputs:[{type:"uint256",name:"index"}],outputs:[{type:"address"}]},{name:"validators",type:"function",stateMutability:"view",inputs:[{type:"address",name:"validator"}],outputs:[{type:"tuple",components:[{type:"bytes32",name:"publicKey"},{type:"bool",name:"active"},{type:"uint64",name:"index"},{type:"address",name:"validatorAddress"},{type:"string",name:"inboundAddress"},{type:"string",name:"outboundAddress"}]}]},{name:"validatorCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"Unauthorized",type:"error",inputs:[]},{name:"ValidatorAlreadyExists",type:"error",inputs:[]},{name:"ValidatorNotFound",type:"error",inputs:[]},{name:"InvalidPublicKey",type:"error",inputs:[]},{name:"NotHostPort",type:"error",inputs:[{type:"string",name:"field"},{type:"string",name:"input"},{type:"string",name:"backtrace"}]},{name:"NotIpPort",type:"error",inputs:[{type:"string",name:"field"},{type:"string",name:"input"},{type:"string",name:"backtrace"}]}],Eg=[{name:"owner",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"transferOwnership",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newOwner"}],outputs:[]},{name:"createZone",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"params",components:[{type:"address",name:"initialToken"},{type:"bool",name:"accessMode"},{type:"bool",name:"gatewayMode"},{type:"address[]",name:"allowedAccounts"},{type:"address[]",name:"zoneGateways"},{type:"address",name:"admin"},{type:"address[]",name:"sequencers"},{type:"uint8",name:"threshold"},{type:"string",name:"rpcUrl"}]}],outputs:[{type:"uint32",name:"zoneId"},{type:"address",name:"portal"}]},{name:"nextZoneId",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint32"}]},{name:"zones",type:"function",stateMutability:"view",inputs:[{type:"uint32",name:"id"}],outputs:[{type:"tuple",name:"info",components:[{type:"uint32",name:"zoneId"},{type:"address",name:"portal"},{type:"bool",name:"accessMode"},{type:"bool",name:"gatewayMode"},{type:"address",name:"admin"},{type:"address[]",name:"sequencers"},{type:"uint8",name:"threshold"},{type:"address",name:"verifier"},{type:"string",name:"rpcUrl"}]}]},{name:"isZonePortal",type:"function",stateMutability:"view",inputs:[{type:"address",name:"portal"}],outputs:[{type:"bool"}]},{name:"OwnershipTransferred",type:"event",inputs:[{type:"address",name:"previousOwner",indexed:!0},{type:"address",name:"newOwner",indexed:!0}]},{name:"ZoneCreated",type:"event",inputs:[{type:"uint32",name:"zoneId",indexed:!0},{type:"address",name:"portal",indexed:!0},{type:"address",name:"initialToken"},{type:"bool",name:"accessMode"},{type:"bool",name:"gatewayMode"},{type:"address",name:"admin"},{type:"address[]",name:"sequencers"},{type:"uint8",name:"threshold"},{type:"address",name:"verifier"}]},{name:"InvalidToken",type:"error",inputs:[]},{name:"TokenTransferPolicyNotSet",type:"error",inputs:[]},{name:"InvalidClosedLoopConfig",type:"error",inputs:[]},{name:"NotOwner",type:"error",inputs:[]},{name:"InvalidAdmin",type:"error",inputs:[]},{name:"InvalidSequencerSet",type:"error",inputs:[]},{name:"AlreadyInitialized",type:"error",inputs:[]},{name:"TokenMetadataTooLong",type:"error",inputs:[]},{name:"DuplicateAllowedAccount",type:"error",inputs:[]},{name:"DuplicateZoneGateway",type:"error",inputs:[]},{name:"ZoneCreated",type:"event",inputs:[{type:"uint32",name:"zoneId",indexed:!0},{type:"address",name:"portal",indexed:!0},{type:"address",name:"messenger",indexed:!0},{type:"address",name:"initialToken"},{type:"address",name:"admin"},{type:"address",name:"sequencer"},{type:"address",name:"verifier"},{type:"bytes32",name:"genesisBlockHash"},{type:"bytes32",name:"genesisTempoBlockHash"},{type:"uint64",name:"genesisTempoBlockNumber"}]},{name:"createZone",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"params",components:[{type:"address",name:"initialToken"},{type:"address",name:"admin"},{type:"address",name:"sequencer"},{type:"address",name:"verifier"},{type:"tuple",name:"zoneParams",components:[{type:"bytes32",name:"genesisBlockHash"},{type:"bytes32",name:"genesisTempoBlockHash"},{type:"uint64",name:"genesisTempoBlockNumber"}]},{type:"string",name:"rpcUrl"}]}],outputs:[{type:"uint32",name:"zoneId"},{type:"address",name:"portal"}]},{name:"verifier",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]}],xg=[{name:"SequencerSetUpdated",type:"event",inputs:[{type:"uint64",name:"nonce",indexed:!0},{type:"uint8",name:"threshold"},{type:"address[]",name:"sequencers"}]},{name:"TokenEnabled",type:"event",inputs:[{type:"address",name:"token",indexed:!0},{type:"string",name:"name"},{type:"string",name:"symbol"},{type:"string",name:"currency"}]},{name:"RoleUpdated",type:"event",inputs:[{type:"address",name:"account",indexed:!0},{type:"uint8",name:"prev"},{type:"uint8",name:"next"}]},{name:"EnforcementModesUpdated",type:"event",inputs:[{type:"bool",name:"accessMode"},{type:"bool",name:"gatewayMode"}]},{name:"LeaderUpdated",type:"event",inputs:[{type:"address",name:"previousLeader",indexed:!0},{type:"address",name:"newLeader",indexed:!0},{type:"uint64",name:"leaderEpoch",indexed:!0},{type:"uint64",name:"leaderActivationTempoBlock"}]},{name:"zoneId",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint32"}]},{name:"admin",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"messenger",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"isAccessEnforced",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bool"}]},{name:"setAccessMode",type:"function",stateMutability:"nonpayable",inputs:[{type:"bool",name:"enforced"}],outputs:[]},{name:"isGatewayOpen",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bool"}]},{name:"setGatewayMode",type:"function",stateMutability:"nonpayable",inputs:[{type:"bool",name:"enforced"}],outputs:[]},{name:"hasRole",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"uint8",name:"role"}],outputs:[{type:"bool"}]},{name:"setAllowedAccount",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"account"},{type:"bool",name:"allowed"}],outputs:[]},{name:"setGateway",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"account"},{type:"bool",name:"allowed"}],outputs:[]},{name:"setPauseGuardian",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"account"},{type:"bool",name:"allowed"}],outputs:[]},{name:"setSequencerSet",type:"function",stateMutability:"nonpayable",inputs:[{type:"address[]",name:"newSequencers"},{type:"uint8",name:"newThreshold"}],outputs:[]},{name:"verifier",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"sequencerSetVersion",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"sequencerThreshold",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{name:"zoneHeight",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"isSequencer",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"}],outputs:[{type:"bool"}]},{name:"sequencerCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"sequencerAt",type:"function",stateMutability:"view",inputs:[{type:"uint256",name:"index"}],outputs:[{type:"address"}]},{name:"leader",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"leaderEpoch",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"leaderActivationTempoBlock",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"setLeader",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newLeader"},{type:"uint64",name:"expectedEpoch"}],outputs:[]},{name:"withdrawalBatchIndex",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"blockHash",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"currentDepositQueueHash",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"lastSyncedTempoBlockNumber",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"withdrawalQueueHead",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"withdrawalQueueTail",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"withdrawalQueueSlot",type:"function",stateMutability:"view",inputs:[{type:"uint256",name:"queueIndex"}],outputs:[{type:"bytes32"}]},{name:"calculateDepositFee",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128",name:"fee"}]},{name:"calculateBouncebackFee",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128",name:"fee"}]},{name:"depositCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"lastProcessedDepositNumber",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"FIXED_DEPOSIT_GAS",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"MAX_GAS_FEE_RATE",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128"}]},{name:"MAX_TOKENS_ENABLED_PER_TEMPO_BLOCK",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"MAX_TOKEN_METADATA_BYTES",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"areDepositsActive",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"}],outputs:[{type:"bool"}]},{name:"tokenConfig",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"}],outputs:[{type:"tuple",components:[{type:"bool",name:"enabled"},{type:"bool",name:"depositsActive"}]}]},{name:"initialize",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint32",name:"zoneId"},{type:"address",name:"initialToken"},{type:"bool",name:"accessMode"},{type:"bool",name:"gatewayMode"},{type:"address[]",name:"allowedAccounts"},{type:"address[]",name:"zoneGateways"},{type:"address",name:"admin"},{type:"address",name:"messenger"},{type:"address[]",name:"sequencers"},{type:"uint8",name:"threshold"},{type:"address",name:"verifier"},{type:"string",name:"rpcUrl"}],outputs:[]},{name:"deliverWithdrawal",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"bytes32",name:"memo"},{type:"uint64",name:"gasLimit"},{type:"bytes",name:"callbackData"}],outputs:[]},{name:"MAX_DEPOSITS_PER_TEMPO_BLOCK",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"MAX_UNPROCESSED_DEPOSITS",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"MAX_UNPROCESSED_TOKEN_ENABLEMENTS",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"MAX_WITHDRAWAL_GAS_LIMIT",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"paused",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bool"}]},{name:"pauseExpiry",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"abdicationEffectiveAt",type:"function",stateMutability:"view",inputs:[{type:"uint8",name:"capability"}],outputs:[{type:"uint64"}]},{name:"processWithdrawals",type:"function",stateMutability:"nonpayable",inputs:[{type:"tuple[]",name:"withdrawals",components:[{type:"address",name:"token"},{type:"bytes32",name:"senderTag"},{type:"address",name:"to"},{type:"uint128",name:"amount"},{type:"bytes32",name:"memo"},{type:"uint64",name:"gasLimit"},{type:"uint64",name:"fallbackNonce"},{type:"bytes",name:"callbackData"},{type:"bytes",name:"encryptedSender"}]},{type:"bytes32",name:"remainingQueue"}],outputs:[]},{name:"pause",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"resume",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"abdicate",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint8",name:"capability"}],outputs:[]},{name:"submitBatch",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"tempoBlockNumber"},{type:"uint64",name:"recentTempoBlockNumber"},{type:"tuple",name:"blockTransition",components:[{type:"bytes32",name:"prevBlockHash"},{type:"bytes32",name:"nextBlockHash"}]},{type:"tuple",name:"depositQueueTransition",components:[{type:"bytes32",name:"prevProcessedHash"},{type:"bytes32",name:"nextProcessedHash"},{type:"uint64",name:"prevDepositNumber"},{type:"uint64",name:"nextDepositNumber"}]},{type:"bytes32",name:"withdrawalQueueHash"},{type:"bytes",name:"verifierConfig"},{type:"bytes",name:"proof"},{type:"uint256",name:"nextZoneHeight"},{type:"bytes[]",name:"signatures"}],outputs:[]},{name:"submitBatch",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"tempoBlockNumber"},{type:"uint64",name:"recentTempoBlockNumber"},{type:"tuple",name:"blockTransition",components:[{type:"bytes32",name:"prevBlockHash"},{type:"bytes32",name:"nextBlockHash"}]},{type:"tuple",name:"depositQueueTransition",components:[{type:"bytes32",name:"prevProcessedHash"},{type:"bytes32",name:"nextProcessedHash"},{type:"uint64",name:"prevDepositNumber"},{type:"uint64",name:"nextDepositNumber"}]},{type:"tuple",name:"tokenEnablementTransition",components:[{type:"uint64",name:"prevProcessedTokenCount"},{type:"uint64",name:"nextProcessedTokenCount"}]},{type:"bytes32",name:"withdrawalQueueHash"},{type:"bytes",name:"verifierConfig"},{type:"bytes",name:"proof"},{type:"uint256",name:"nextZoneHeight"},{type:"bytes[]",name:"signatures"}],outputs:[]},{name:"enableToken",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"}],outputs:[]},{name:"pauseDeposits",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"}],outputs:[]},{name:"resumeDeposits",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"}],outputs:[]},{name:"setZoneGasRate",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint128",name:"newZoneGasRate"}],outputs:[]},{name:"setMaxTempoGasRate",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint128",name:"newMaxTempoGasRate"}],outputs:[]},{name:"setBouncebackGas",type:"function",stateMutability:"nonpayable",inputs:[{type:"uint64",name:"newBouncebackGas"}],outputs:[]},{name:"transferAdmin",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"newAdmin"}],outputs:[]},{name:"acceptAdmin",type:"function",stateMutability:"nonpayable",inputs:[],outputs:[]},{name:"rpcUrl",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{name:"setRpcUrl",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"rpcUrl"}],outputs:[]},{name:"deposit",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"uint256",name:"keyIndex"},{type:"tuple",name:"encrypted",components:[{type:"bytes32",name:"ephemeralPubkeyX"},{type:"uint8",name:"ephemeralPubkeyYParity"},{type:"bytes",name:"ciphertext"},{type:"bytes12",name:"nonce"},{type:"bytes16",name:"tag"}]},{type:"address",name:"tempoRefundRecipient"}],outputs:[{type:"bytes32",name:"newCurrentDepositQueueHash"}]},{name:"depositEncrypted",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"uint256",name:"keyIndex"},{type:"tuple",name:"encrypted",components:[{type:"bytes32",name:"ephemeralPubkeyX"},{type:"uint8",name:"ephemeralPubkeyYParity"},{type:"bytes",name:"ciphertext"},{type:"bytes12",name:"nonce"},{type:"bytes16",name:"tag"}]},{type:"address",name:"tempoRefundRecipient"}],outputs:[{type:"bytes32",name:"newCurrentDepositQueueHash"}]},{name:"setSequencerEncryptionKey",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes32",name:"x"},{type:"uint8",name:"yParity"},{type:"uint8",name:"popV"},{type:"bytes32",name:"popR"},{type:"bytes32",name:"popS"}],outputs:[]},{name:"isTokenEnabled",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"}],outputs:[{type:"bool"}]},{name:"enabledTokenCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"lastProcessedEnabledTokenCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"tokenEnablementCursorInitialized",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bool"}]},{name:"enabledTokenAt",type:"function",stateMutability:"view",inputs:[{type:"uint256",name:"index"}],outputs:[{type:"address"}]},{name:"tokenEnablementHash",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{name:"zoneGasRate",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128"}]},{name:"maxTempoGasRate",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint128"}]},{name:"bouncebackGas",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint64"}]},{name:"pendingAdmin",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"address"}]},{name:"refunds",type:"function",stateMutability:"view",inputs:[{type:"address",name:"token"},{type:"address",name:"owner"}],outputs:[{type:"uint128"}]},{name:"sequencerEncryptionKey",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"bytes32",name:"x"},{type:"uint8",name:"yParity"},{type:"address",name:"pubkey"}]},{name:"encryptionKeyCount",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{name:"encryptionKeyAt",type:"function",stateMutability:"view",inputs:[{type:"uint256",name:"index"}],outputs:[{type:"tuple",name:"entry",components:[{type:"bytes32",name:"x"},{type:"uint8",name:"yParity"},{type:"uint64",name:"activationBlock"}]}]},{name:"isEncryptionKeyValid",type:"function",stateMutability:"view",inputs:[{type:"uint256",name:"keyIndex"}],outputs:[{type:"bool",name:"valid"},{type:"uint64",name:"expiresAtBlock"}]},{name:"encryptionKeyAtBlock",type:"function",stateMutability:"view",inputs:[{type:"uint64",name:"tempoBlockNumber"}],outputs:[{type:"bytes32",name:"x"},{type:"uint8",name:"yParity"},{type:"uint256",name:"keyIndex"}]},{name:"claimRefund",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"token"}],outputs:[{type:"uint128",name:"amount"}]},{name:"DepositMade",type:"event",inputs:[{type:"bytes32",name:"newCurrentDepositQueueHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"token"},{type:"uint128",name:"netAmount"},{type:"uint128",name:"fee"},{type:"uint256",name:"keyIndex"},{type:"bytes32",name:"ephemeralPubkeyX"},{type:"uint8",name:"ephemeralPubkeyYParity"},{type:"bytes",name:"ciphertext"},{type:"bytes12",name:"nonce"},{type:"bytes16",name:"tag"},{type:"address",name:"tempoRefundRecipient"},{type:"uint64",name:"depositNumber"}]},{name:"DepositsPaused",type:"event",inputs:[{type:"address",name:"token",indexed:!0}]},{name:"DepositsResumed",type:"event",inputs:[{type:"address",name:"token",indexed:!0}]},{name:"PortalPaused",type:"event",inputs:[{type:"address",name:"account",indexed:!0}]},{name:"PortalResumed",type:"event",inputs:[{type:"address",name:"account",indexed:!0}]},{name:"AbdicationScheduled",type:"event",inputs:[{type:"uint8",name:"capability",indexed:!0},{type:"uint64",name:"effectiveAt"}]},{name:"RpcUrlUpdated",type:"event",inputs:[{type:"string",name:"rpcUrl"}]},{name:"SequencerEncryptionKeyUpdated",type:"event",inputs:[{type:"bytes32",name:"x"},{type:"uint8",name:"yParity"},{type:"address",name:"pubkey"},{type:"uint256",name:"keyIndex"},{type:"uint64",name:"activationBlock"}]},{name:"BatchSubmitted",type:"event",inputs:[{type:"uint64",name:"withdrawalBatchIndex",indexed:!0},{type:"uint256",name:"withdrawalQueueIndex",indexed:!0},{type:"bytes32",name:"nextProcessedDepositQueueHash"},{type:"bytes32",name:"nextBlockHash"},{type:"bytes32",name:"withdrawalQueueHash"},{type:"uint64",name:"lastProcessedDepositNumber"}]},{name:"BatchSubmitted",type:"event",inputs:[{type:"uint64",name:"withdrawalBatchIndex",indexed:!0},{type:"uint256",name:"withdrawalQueueIndex",indexed:!0},{type:"bytes32",name:"nextProcessedDepositQueueHash"},{type:"bytes32",name:"nextBlockHash"},{type:"bytes32",name:"withdrawalQueueHash"},{type:"uint64",name:"lastProcessedDepositNumber"},{type:"uint64",name:"lastProcessedEnabledTokenCount"}]},{name:"WithdrawalProcessed",type:"event",inputs:[{type:"address",name:"to",indexed:!0},{type:"bytes32",name:"senderTag",indexed:!0},{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"bool",name:"callbackSuccess"}]},{name:"WithdrawalBounceBack",type:"event",inputs:[{type:"bytes32",name:"newCurrentDepositQueueHash",indexed:!0},{type:"uint64",name:"fallbackNonce",indexed:!0},{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"uint64",name:"depositNumber"}]},{name:"DepositBounceBack",type:"event",inputs:[{type:"address",name:"tempoRefundRecipient",indexed:!0},{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"uint128",name:"bouncebackFee"}]},{name:"DepositBounceBackPending",type:"event",inputs:[{type:"address",name:"tempoRefundRecipient",indexed:!0},{type:"address",name:"token"},{type:"uint128",name:"amount"},{type:"uint128",name:"bouncebackFee"}]},{name:"RefundClaimed",type:"event",inputs:[{type:"address",name:"recipient",indexed:!0},{type:"address",name:"token",indexed:!0},{type:"uint128",name:"amount"}]},{name:"ZoneGasRateUpdated",type:"event",inputs:[{type:"uint128",name:"zoneGasRate"}]},{name:"MaxTempoGasRateUpdated",type:"event",inputs:[{type:"uint128",name:"maxTempoGasRate"}]},{name:"BouncebackGasUpdated",type:"event",inputs:[{type:"uint64",name:"bouncebackGas"}]},{name:"AdminTransferStarted",type:"event",inputs:[{type:"address",name:"currentAdmin",indexed:!0},{type:"address",name:"pendingAdmin",indexed:!0}]},{name:"AdminTransferred",type:"event",inputs:[{type:"address",name:"previousAdmin",indexed:!0},{type:"address",name:"newAdmin",indexed:!0}]},{name:"NotSequencer",type:"error",inputs:[]},{name:"NotAdmin",type:"error",inputs:[]},{name:"NotPauseAuthority",type:"error",inputs:[]},{name:"CapabilityAbdicated",type:"error",inputs:[{type:"uint8",name:"capability"}]},{name:"AbdicationAlreadyScheduled",type:"error",inputs:[{type:"uint8",name:"capability"}]},{name:"PortalIsPaused",type:"error",inputs:[]},{name:"NotPendingAdmin",type:"error",inputs:[]},{name:"InvalidProof",type:"error",inputs:[]},{name:"InvalidTempoBlockNumber",type:"error",inputs:[]},{name:"NotFactory",type:"error",inputs:[]},{name:"NotSelf",type:"error",inputs:[]},{name:"AlreadyInitialized",type:"error",inputs:[]},{name:"MustDelegateCall",type:"error",inputs:[]},{name:"CallbackRejected",type:"error",inputs:[]},{name:"TransferFailed",type:"error",inputs:[]},{name:"ReentrantWithdrawal",type:"error",inputs:[]},{name:"EncryptionKeyExpired",type:"error",inputs:[{type:"uint256",name:"keyIndex"},{type:"uint64",name:"activationBlock"},{type:"uint64",name:"supersededAtBlock"}]},{name:"InvalidEncryptionKeyIndex",type:"error",inputs:[{type:"uint256",name:"keyIndex"}]},{name:"NoEncryptionKeySet",type:"error",inputs:[]},{name:"NoEncryptionKeyAtBlock",type:"error",inputs:[{type:"uint64",name:"blockNumber"}]},{name:"InvalidEphemeralPubkey",type:"error",inputs:[]},{name:"InvalidCiphertextLength",type:"error",inputs:[{type:"uint256",name:"actual"},{type:"uint256",name:"expected"}]},{name:"InvalidProofOfPossession",type:"error",inputs:[]},{name:"DepositTooSmall",type:"error",inputs:[]},{name:"TokenEnablementBlockCapacityExceeded",type:"error",inputs:[{type:"uint64",name:"maximum"}]},{name:"TokenMetadataTooLong",type:"error",inputs:[]},{name:"GasFeeRateTooHigh",type:"error",inputs:[]},{name:"DepositsNotActive",type:"error",inputs:[]},{name:"TokenAlreadyEnabled",type:"error",inputs:[]},{name:"TokenTransferPolicyNotSet",type:"error",inputs:[]},{name:"TokenEnablementCursorNotInitialized",type:"error",inputs:[]},{name:"InvalidDepositTransition",type:"error",inputs:[]},{name:"InvalidTokenEnablementTransition",type:"error",inputs:[]},{name:"InvalidSequencerSet",type:"error",inputs:[]},{name:"SequencerConfigurationUnchanged",type:"error",inputs:[]},{name:"InvalidQuorumCertificate",type:"error",inputs:[]},{name:"CallbackDidNotReturnToZone",type:"error",inputs:[]},{name:"InvalidBouncebackRecipient",type:"error",inputs:[]},{name:"TokenNotEnabled",type:"error",inputs:[]},{name:"DepositBlockCapacityExceeded",type:"error",inputs:[{type:"uint64",name:"maximum"}]},{name:"InvalidCallbackTarget",type:"error",inputs:[]},{name:"AccountNotAllowed",type:"error",inputs:[{type:"address",name:"account"}]},{name:"InvalidLeader",type:"error",inputs:[]},{name:"ActiveLeaderRemoved",type:"error",inputs:[]},{name:"LeaderAlreadyUpdatedThisBlock",type:"error",inputs:[]},{name:"StaleLeadershipEpoch",type:"error",inputs:[{type:"uint64",name:"expected"},{type:"uint64",name:"actual"}]},{name:"deposit",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"_token"},{type:"address",name:"to"},{type:"uint128",name:"amount"},{type:"bytes32",name:"memo"},{type:"address",name:"tempoRefundRecipient"}],outputs:[{type:"bytes32"}]}],kg=[{name:"verify",type:"function",stateMutability:"view",inputs:[{type:"uint32",name:"zoneId"},{type:"uint64",name:"tempoBlockNumber"},{type:"uint64",name:"anchorBlockNumber"},{type:"bytes32",name:"anchorBlockHash"},{type:"uint64",name:"expectedWithdrawalBatchIndex"},{type:"uint256",name:"nextZoneHeight"},{type:"tuple",name:"blockTransition",components:[{type:"bytes32",name:"prevBlockHash"},{type:"bytes32",name:"nextBlockHash"}]},{type:"tuple",name:"depositQueueTransition",components:[{type:"bytes32",name:"prevProcessedHash"},{type:"bytes32",name:"nextProcessedHash"},{type:"uint64",name:"prevDepositNumber"},{type:"uint64",name:"nextDepositNumber"}]},{type:"tuple",name:"tokenEnablementTransition",components:[{type:"uint64",name:"prevProcessedTokenCount"},{type:"uint64",name:"nextProcessedTokenCount"}]},{type:"bytes32",name:"withdrawalQueueHash"},{type:"bytes",name:"verifierConfig"},{type:"bytes",name:"proof"}],outputs:[{type:"bool"}]}];[...xn,...ug,...pg,...wg,...gg,...el,...hg,...fg,...l5,...yg,...mg,..._g,...vg,...Cg,...bg,...Ag,...Lg,...Eg,...xg,...kg];o5(0);o5(0,42431);const hi="0xaAAAaaAA00000000000000000000000000000000",d5="0xAACC000000000000000000000000000000000000",$g="0x7171717171717171717171717171717171717171",Sg="0x5165300000000000000000000000000000000000";function Gs(e){const t=en(e);if(t.type==="multisig"||t.type==="keychain")throw new Error("Multisig owners must use primitive signatures.");return t}function c5(e){const t=e.account;return t?.keyType&&t.keyType!=="secp256k1"||t?.source==="accessKey"||t?.source==="multisig"||typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feePayerSignature<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.multisigSimulation<"u"||typeof e.nonceKey<"u"||typeof e.owner<"u"||typeof e.signature<"u"||typeof e.signatures<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"?"tempo":e.type?e.type:Gy(e)}function R3(e){try{return c5(e)==="tempo"}catch{return!1}}function Ap(e){const t=pt(e,0,1);return t==="0x76"||t==="0x78"?Tg(e):wm(e)}async function u5(e,t){if(!R3(e)){if(t&&"type"in t&&t.type!=="secp256k1")throw new Error("Unsupported signature type. Expected `secp256k1` but got `"+t.type+"`.");if(t&&"type"in t){const{r,s:i,yParity:a}=t?.signature;return pp(e,{r:ie(r,{size:32}),s:ie(i,{size:32}),yParity:a})}return pp(e,t)}if(c5(e)==="tempo")return Ig(e,t);throw new Error("Unsupported transaction type")}function Tg(e){const{feePayerSignature:t,nonce:n,...r}=Xl(e);return{...r,nonce:Number(n??0n),feePayerSignature:t&&{r:ie(t.r,{size:32}),s:ie(t.s,{size:32}),yParity:t.yParity}}}async function Ig(e,t){const n=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return en({r:BigInt(t.r),s:BigInt(t.s),yParity:Number(t.yParity)})})(),{chainId:r,feePayer:i,multisigSimulation:a,nonce:s,owner:o,...l}=e,c=(()=>{const w=e.feePayerSignature;if(w)return{r:BigInt(w.r),s:BigInt(w.s),yParity:Number(w.yParity)};if(w===null||i)return null})(),u=typeof e.feePayerSignature<"u"&&e.feePayerSignature!==null,p=typeof n<"u"||!!(a&&e.signatures),h=i===!0&&(!p||!c)||typeof i=="object"&&!p||!p&&u,f={...l,calls:l.calls?.length?l.calls:[{to:l.to||(!l.data||l.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:l.value,data:l.data}],chainId:Number(r),feePayerSignature:c,type:"tempo",...s?{nonce:BigInt(s)}:{}},y={...f};h&&delete y.feeToken;const m=(()=>{if(n)return n;if(!a||!e.signatures)return;const w=Ia(Qo(y)),E=e.signatures.map(S=>Gs(S)),_=On(a.config),C=e.from;if(!C)throw new Error("A multisig sender is required for signing.");const k=$3({account:C,config:_,payload:w,signatures:E});return en({account:C,config:_,signatures:k})})();if(m&&typeof e.feePayer=="object"){const w=Qo(f,{signature:m}),E=e.from??Br({payload:Ia(w),root:!0,signature:m}),_=U9(w,{sender:E}),C=await e.feePayer.sign({hash:_});return Rr(w,{feePayerSignature:k0(C)})}return i===!0||!m&&u?m&&c?Rr(y,{signature:m}):m?Rr(y,{format:"feePayer",sender:e.from,signature:m}):Rr(y,{feePayerSignature:null}):Rr(y,{feePayerSignature:void 0,signature:m})}function su(e){const t=(()=>{if(typeof e=="string")return;const{address:o,...l}=e;return l})(),n=(()=>{if(!t)return;const o=t.owners.map(l=>typeof l=="string"||"address"in l?{owner:l,weight:1}:l);return On({...t,owners:o.map(({owner:l,weight:c})=>({owner:typeof l=="string"?l:l.address,weight:c})),threshold:t.threshold??1})})();if(typeof e!="string"){if((e.address===void 0||e.address==="infer")&&n.version!==0n)throw new Error("An initial multisig config must have version zero.");if(e.address!==void 0&&e.address!=="infer"&&n.version===0n)throw new Error("A current multisig config must have a version.")}const r=x0(typeof e=="string"?e:e.address===void 0||e.address==="infer"?d9(n,{factory:$g}):e.address),i=t?t.owners.flatMap(o=>{const l=typeof o=="string"||"address"in o?o:o.owner;return typeof l=="string"?[]:[tr(l)]}):[];if(i.some(o=>o.source==="multisig"||O3(o)))throw new Error("Multisig owners must use primitive signatures.");const a=n?.owners.flatMap(({owner:o})=>{const l=i.find(c=>Ur(c.address,o));return l?[l]:[]})??[],s={address:r,config:n,owners:a,publicKey:"0x",source:"multisig",type:"local",async sign({hash:o}){return dn(await ou(s,{payload:o}))},async signMessage(){throw new Error("`signMessage` is not supported for multisig accounts.")},async signTransaction(o,l){const{serializer:c=u5}=l??{},u=o;if(u.owner){const m=tr(u.owner);if(m.type!=="local")throw new Error("A local owner account is required to approve a multisig transaction.");if(m.source!=="root")throw new Error("A Tempo owner account is required to approve a multisig transaction.");const{owner:w,...E}=u;return await m.signTransaction(E,l)}if(a.length===0)return await c(o);const p={...u,signatures:void 0,...u.feePayerSignature===void 0?{}:{feePayerSignature:null}},h=w0(await c(p)),f=u.multisigSimulation;if(u.from&&!Ur(u.from,r))throw new Error("Multisig account does not match the transaction sender.");const y=await ou(s,{config:f?.config,payload:h,signatures:u.signatures?.map(m=>Gs(m))});return await c(o,y)},async signTypedData(){throw new Error("`signTypedData` is not supported for multisig accounts.")}};return s}function p5(e){return e.source==="multisig"}async function ou(e,t){const{config:n,payload:r,signatures:i=[]}=t,a=n??e.config;if(!a)throw new Error("A current multisig config is required for local signing.");const s=Ga({account:e.address,config:a,payload:r}),o=[...i],l=new Set;let c=0;for(const p of i){const h=Br({payload:s,signature:p}).toLowerCase(),f=a.owners.find(y=>Ur(y.owner,h));!f||l.has(h)||(l.add(h),c+=Number(f.weight))}const u=[...a.owners].sort((p,h)=>Number(h.weight)-Number(p.weight)||p.owner.toLowerCase().localeCompare(h.owner.toLowerCase()));for(const p of u){if(c>=Number(a.threshold))break;const h=p.owner.toLowerCase();if(l.has(h))continue;const f=e.owners.find(y=>Ur(y.address,p.owner));if(f){if(!f.sign)throw new Error("Multisig owner account cannot sign.");if(o.push(Gs(await f.sign({hash:s}))),l.add(h),c+=Number(p.weight),c>=Number(a.threshold))break}}if(c<Number(a.threshold))throw new Error("Local multisig owners do not meet the threshold.");return en({account:e.address,config:a,signatures:$3({account:e.address,config:a,payload:r,signatures:o})})}function O3(e){return e.source==="accessKey"&&"accessKeyAddress"in e}function h5(e,t){const{admin:n,chainId:r,expiry:i,key:a,limits:s,scopes:o,witness:l}=t,{accessKeyAddress:c,keyType:u}=N3(a),p=O3(e)||p5(e)?{account:e.address}:{};return Jl({address:c,chainId:r,type:u,witness:l,...n?{isAdmin:!0}:{},...p,...n?{}:{expiry:i,limits:s,scopes:o}})}async function Mg(e,t){const{admin:n,chainId:r,expiry:i,key:a,limits:s,multisig:o,scopes:l,signatures:c,witness:u}=t,{accessKeyAddress:p,keyType:h}=N3(a),f=O3(e),y=p5(e),m=f||y?{account:e.address}:{},w=n?{}:{expiry:i,limits:s,scopes:l},E=h5(e,t),_=await(async()=>{if(f)return e.sign({hash:E,raw:!0});if(y){if(!o)throw new Error("Multisig state is required to sign a key authorization.");return dn(await ou(e,{config:o.config,payload:E,signatures:c?.map(C=>Gs(C))}))}return e.sign({hash:E})})();return Yl({address:p,chainId:r,signature:en(_),type:h,...u?{witness:u}:{},...n?{isAdmin:!0}:{},...m,...w})}function N3(e){return"accessKeyAddress"in e?{accessKeyAddress:e.accessKeyAddress,keyType:e.keyType}:"publicKey"in e&&e.publicKey?{accessKeyAddress:ji(vm(e.publicKey)),keyType:e.type}:{accessKeyAddress:e.address,keyType:e.type}}const Ep=["genesis","t0","t1","t1a","t1b","t1c","t2","t3","t4","t5","t6"];function Pg(e,t){return Ep.indexOf(e)<Ep.indexOf(t)}function ir(e){return{...e,data:Cm(e),to:e.address}}async function F3(e,t){const n=await e.request({method:"multisig_getConfig",params:[{address:t.address}]});return n?W0(n):null}async function lu(e,t){const{account:n,...r}=t;return Zi(e,{...r,...lu.call({account:n})})}(function(e){function t(n){return ir({address:d5,abi:el,args:[n.account],functionName:"getConfigCommitment"})}e.call=t})(lu||(lu={}));async function du(e,t){return du.inner(Kl,e,t)}(function(e){async function t(i,a,s){const{account:o,currentConfig:l,nextConfig:c,...u}=s,p=o??a.account,h=(()=>{if(typeof p=="object"&&p.source==="multisig")return p})(),f=(()=>{if(l)return l;if(h?.config)return h.config})(),y=(()=>{if(h)return h.address;if(typeof p=="string")return p;if(p)return p.address})(),m=await(async()=>{if(f)return On(f);if(!y)throw new Error("A multisig account address or current config is required.");const E=await F3(a,{address:y});if(!E)throw new Error(`No current multisig config is cached for account ${y}. Provide the current config.`);return E})(),w=(()=>{if(h)return{...h,config:m};if(typeof p=="object")return p;if(y)return su({address:y,...m})})();return await i(a,{...u,...w?{account:w}:{},...e.call({currentConfig:m,nextConfig:c})})}e.inner=t;function n(i){const a=On(i.currentConfig),s=On({owners:i.nextConfig.owners,salt:a.salt,threshold:i.nextConfig.threshold,version:a.version+1n});return ir({address:d5,abi:el,args:[a,s.threshold,s.owners],functionName:"updateConfig"})}e.call=n;function r(i){const[a]=Ws({abi:el,logs:i,eventName:"MultisigConfigUpdated",strict:!0});if(!a)throw new Error("`MultisigConfigUpdated` event not found.");return a}e.extractEvent=r})(du||(du={}));const Rg={0:"secp256k1",1:"p256",2:"webAuthn"},Og={true:"limited",false:"unlimited"};async function cu(e,t){return cu.inner(_m,e,t)}(function(e){async function t(r,i,a){const{accessKey:s,admin:o,chainId:l=i.chain?.id,expiry:c,limits:u,scopes:p,witness:h,...f}=a,y=f.account??i.account;if(!y)throw new Error("account is required.");if(!l)throw new Error("chainId is required.");const m=await Ng(i,{account:y,accessKey:s,chainId:l,admin:o,expiry:c,limits:u,scopes:p,witness:h});return await r(i,{...f,keyAuthorization:m})}e.inner=t;function n(r){const[i]=Ws({abi:xn,logs:r,eventName:"KeyAuthorized",strict:!0});if(!i)throw new Error("`KeyAuthorized` event not found.");return i}e.extractEvent=n})(cu||(cu={}));async function uu(e,t){return uu.inner(Kl,e,t)}(function(e){async function t(i,a,s){const{witness:o,...l}=s,c=e.call({witness:o});return await i(a,{...l,...c})}e.inner=t;function n(i){const{witness:a}=i;return ir({address:hi,abi:xn,functionName:"burnKeyAuthorizationWitness",args:[a]})}e.call=n;function r(i){const[a]=Ws({abi:xn,logs:i,eventName:"KeyAuthorizationWitnessBurned",strict:!0});if(!a)throw new Error("`KeyAuthorizationWitnessBurned` event not found.");return a}e.extractEvent=r})(uu||(uu={}));async function cs(e,t){const{account:n=e.account,accessKey:r,...i}=t;if(!n)throw new Error("account is required.");const a=tr(n),s=await Zi(e,{...i,account:null,...cs.call({account:a.address,accessKey:r})});return{address:s.keyId,keyType:Rg[s.signatureType]??"secp256k1",expiry:s.expiry,spendPolicy:Og[`${s.enforceLimits}`],isRevoked:s.isRevoked}}(function(e){function t(n){const{account:r,accessKey:i}=n;return ir({address:hi,abi:xn,functionName:"getKey",args:[r,Ma(i)]})}e.call=t})(cs||(cs={}));async function tl(e,t){const{account:n=e.account,accessKey:r,token:i,...a}=t;if(!n)throw new Error("account is required.");const s=tr(n),o=e.chain?.hardfork;if(o&&Pg(o,"t3"))return{remaining:await Zi(e,{...a,...tl.call({account:s.address,accessKey:r,token:i})}),periodEnd:void 0};const[l,c]=await Zi(e,{...a,...tl.callWithPeriod({account:s.address,accessKey:r,token:i})});return{remaining:l,periodEnd:c}}(function(e){function t(r){const{account:i,accessKey:a,token:s}=r;return ir({address:hi,abi:xn,functionName:"getRemainingLimit",args:[i,Ma(a),s]})}e.call=t;function n(r){const{account:i,accessKey:a,token:s}=r;return ir({address:hi,abi:xn,functionName:"getRemainingLimitWithPeriod",args:[i,Ma(a),s]})}e.callWithPeriod=n})(tl||(tl={}));async function pu(e,t){const{account:n=e.account,accessKey:r,...i}=t;if(!n)throw new Error("account is required.");const a=tr(n);return Zi(e,{...i,account:null,...pu.call({account:a.address,accessKey:r})})}(function(e){function t(n){const{account:r,accessKey:i}=n;return ir({address:hi,abi:xn,functionName:"isAdminKey",args:[r,Ma(i)]})}e.call=t})(pu||(pu={}));async function hu(e,t){const{account:n=e.account,witness:r,...i}=t;if(!n)throw new Error("account is required.");const a=tr(n);return Zi(e,{...i,account:null,...hu.call({account:a.address,witness:r})})}(function(e){function t(n){const{account:r,witness:i}=n;return ir({address:hi,abi:xn,functionName:"isKeyAuthorizationWitnessBurned",args:[r,i]})}e.call=t})(hu||(hu={}));async function fu(e,t){return fu.inner(Kl,e,t)}(function(e){async function t(i,a,s){const{accessKey:o,...l}=s,c=e.call({accessKey:o});return await i(a,{...l,...c})}e.inner=t;function n(i){const{accessKey:a}=i;return ir({address:hi,abi:xn,functionName:"revokeKey",args:[Ma(a)]})}e.call=n;function r(i){const[a]=Ws({abi:xn,logs:i,eventName:"KeyRevoked",strict:!0});if(!a)throw new Error("`KeyRevoked` event not found.");return a}e.extractEvent=r})(fu||(fu={}));async function xp(e,t){const{chainId:n=e.chain?.id}=t,r=t.account??e.account;if(!r)throw new Error("account is required.");if(!n)throw new Error("chainId is required.");const i=tr(r),a=await(async()=>{if("multisig"in t)return t.multisig;if(i.source!=="multisig")return;const l=i;if(!l.config)throw new Error("A multisig config is required to prepare a key authorization.");return{config:l.config}})(),s=h5(i,{...t,chainId:BigInt(n),key:t.accessKey}),o=i.source==="multisig"&&a?Ga({account:i.address,config:a.config,payload:s}):s;return{...t,account:i,chainId:n,multisig:a,signPayload:o}}async function Ng(e,t){if("hash"in t&&t.hash||"owner"in t&&t.owner){const u=t,p=u.owner;if(!p||typeof p=="string")throw new Error("A local owner account is required to approve a multisig key authorization.");const f=tr(p).sign;if(!f)throw new Error("A local owner account is required to approve a multisig key authorization.");const y=await(async()=>{if("hash"in u&&u.hash){const Le=dn(en(await f({hash:u.hash})));return{hash:u.hash,signature:Le}}const{account:_,owner:C,...k}=u,S=typeof _=="string"?_:_.address,b=await(async()=>{if(typeof _!="string"&&_.config)return _.config;const Le=await F3(e,{address:S});if(Le)return Le;throw new Error(`No current multisig config is cached for account ${S}. Provide the current config.`)})(),F=(()=>{if(b.version!==0n)return su({address:S,...b});const{version:Le,...ye}=b;return su({address:"infer",...ye})})();if(!zo(F.address,S))throw new Error("Initial multisig config does not match the account.");const H=await xp(e,{...k,account:F}),ae=dn(en(await f({hash:H.signPayload}))),{accessKey:G,admin:he,chainId:Be,expiry:fe,limits:Ie,scopes:Ae,witness:N}=H,{accessKeyAddress:xe,keyType:ke}=N3(G),be=Yl({account:F.address,address:xe,chainId:BigInt(Be),signature:en({account:F.address,config:b,signatures:[Gs(ae)]}),type:ke,...N?{witness:N}:{},...he?{isAdmin:!0}:{expiry:fe,limits:Ie,scopes:Ae}});return{keyAuthorization:J0(be)}})(),m=await e.request({method:"multisig_approveKeyAuthorization",params:[y]}),w=Q0(m),E=T3(await(async()=>{if(w.status==="success")return w.keyAuthorization;const _=await Z9({account:w.account,approvals:w.approvals,config:w.config,hash:w.hash});return B9(w.keyAuthorization,{account:w.account,approvals:_.selectedApprovals.length>0?_.selectedApprovals:_.approvals.slice(0,1),config:w.config})})());if(!E.signature)throw new Error("Expected a signed multisig key authorization.");return{...E,hash:w.hash,multisig:w,status:w.status}}const r="signPayload"in t?t:await xp(e,t),{accessKey:i,account:a,chainId:s,multisig:o,signPayload:l,...c}=r;return Mg(a,{chainId:BigInt(s),key:i,multisig:o,...c})}async function yu(e,t){return yu.inner(Kl,e,t)}(function(e){async function t(i,a,s){const{accessKey:o,token:l,limit:c,...u}=s,p=e.call({accessKey:o,token:l,limit:c});return await i(a,{...u,...p})}e.inner=t;function n(i){const{accessKey:a,token:s,limit:o}=i;return ir({address:hi,abi:xn,functionName:"updateSpendingLimit",args:[Ma(a),s,o]})}e.call=n;function r(i){const[a]=Ws({abi:xn,logs:i,eventName:"SpendingLimitUpdated",strict:!0});if(!a)throw new Error("`SpendingLimitUpdated` event not found.");return a}e.extractEvent=r})(yu||(yu={}));async function mu(e,t){const{account:n,admin:r,hash:i,signature:a,...s}=t;return Zi(e,{...s,...mu.call({account:n,admin:r,hash:i,signature:a})})}(function(e){function t(n){const{account:r,admin:i=!0,hash:a,signature:s}=n;return ir({address:Sg,abi:l5,functionName:i?"verifyKeychainAdmin":"verifyKeychain",args:[r,a,s]})}e.call=t})(mu||(mu={}));function Ma(e){return typeof e=="string"?e:e.accessKeyAddress}function Fg(e){if(!R3(e))return Im(e);const t=e.blockTimestamp==null?void 0:BigInt(e.blockTimestamp),n=e.multisig,{feePayerSignature:r,gasPrice:i,nonce:a,...s}=sg(e);return{...s,accessList:s.accessList,...typeof t<"u"&&{blockTimestamp:t},feePayerSignature:r?{r:ie(r.r,{size:32}),s:ie(r.s,{size:32}),v:BigInt(r.v??27),yParity:r.yParity}:void 0,multisig:f5(n),nonce:Number(a),typeHex:i5[s.type],type:s.type}}function jg(e){return{...Tm(e),multisig:f5(e.multisig),...e.status==="pending"?{status:"pending",type:"tempo"}:{}}}function f5(e){if(!e)return;const t=Q0(e);if(t.type!=="transaction")throw new Error("Expected a multisig transaction operation.");return t}function Dg(e,t){const n=e,r=n.account?tr(n.account):void 0,i=n.owner?tr(n.owner):void 0;if(i?.type==="json-rpc")throw new Error("A local owner account is required to approve a multisig transaction.");if(!R3(n))return bm(e);t&&(n.calls=n.calls??[{to:e.to||(!e.data||e.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:e.value,data:e.data}]),n.feePayer===!0&&!n.feePayerSignature&&delete n.feeToken;const{owner:a,signatures:s,...o}=n,l=lg({...o,type:"tempo"});t==="estimateGas"&&(l.maxFeePerGas=void 0,l.maxPriorityFeePerGas=void 0),l.to=void 0,l.data=void 0,l.value=void 0;const c=i??r,[u,p]=(()=>{const f=c&&"keyType"in c?c.keyType:c?.source;return f?f==="webAuthn"?["webAuthn","0x0578"]:["p256","secp256k1"].includes(f)?[f,void 0]:[n.keyType,kp(n.keyData)]:[n.keyType,kp(n.keyData)]})(),h=c&&"accessKeyAddress"in c?c.accessKeyAddress:n.keyId;return r&&(l.from=r.address),{...l,...n.capabilities?{capabilities:n.capabilities}:{},...p?{keyData:p}:{},...h?{keyId:h}:{},...u?{keyType:u}:{},...n.owner?{owner:void 0}:{},...typeof n.feePayer<"u"?{feePayer:typeof n.feePayer=="object"?tr(n.feePayer):n.feePayer}:{},..."feePayerSignature"in n&&n.feePayerSignature!==void 0?{feePayerSignature:n.feePayerSignature}:{}}}function kp(e){if(!e)return e;const t=(e.length-2)/2;return t<=4?e:ie(t,{size:2})}const ua=new Map;async function Ug(e){ua.set(e,(ua.get(e)??0)+1),await Promise.resolve();const t=(ua.get(e)??0)>1;return queueMicrotask(()=>{const n=ua.get(e)??0;n<=1?ua.delete(e):ua.set(e,n-1)}),t}const Wg=25,$p=((e,t)=>u5(e,t)),y5={blockTime:1e3,extendSchema:Rm(),formatters:{transaction:Pm({exclude:["aaAuthorizationList"],format:Fg}),transactionReceipt:Mm({format:jg}),transactionRequest:xm({format:Dg})},prepareTransactionRequest:[async(e,{client:t,phase:n})=>{const r=e;if(r.hash){if(!r.account||typeof r.account=="string"||r.account.source!=="multisig")throw new Error("A local multisig account is required to approve a stored multisig transaction.");if(!r.owner||typeof r.owner=="string")throw new Error("A local owner account is required to approve a stored multisig transaction.");if(r.owner.source!=="root")throw new Error("A Tempo owner account is required to approve a stored multisig transaction.");const o=await ho(t,Em,"getTransaction")({hash:r.hash}),l="multisig"in o?o.multisig:void 0;if(!l)throw new Error("Expected a multisig operation transaction.");if(!zo(l.account,r.account.address))throw new Error("Multisig operation account does not match the requested account.");const c=Ap(l.transaction);if(H9({account:l.account,config:l.config,transaction:l.transaction}).toLowerCase()!==r.hash.toLowerCase())throw new Error("Multisig operation hash does not match transaction.");return{...c,gas:c.gas??0n,maxFeePerGas:c.maxFeePerGas??0n,maxPriorityFeePerGas:c.maxPriorityFeePerGas??0n,account:r.account,from:l.account,multisigSimulation:Sp({config:l.config,local:r.account}),owner:r.owner}}if(n==="afterFillParameters")return typeof r.gas<"u"&&r.feePayer&&!r.feePayerSignature&&(r.keyAuthorization?.signature.type==="webAuthn"?r.gas=(r.gas??0n)+20000n:r.account?.source==="accessKey"&&(r.gas=(r.gas??0n)+10000n)),r;const i=(()=>{if(r.account?.source==="multisig")return{account:r.account.address,config:r.account.config,local:r.account}})();if(r.owner&&!i)throw new Error("A multisig account is required when an owner is provided.");if(r.owner&&typeof r.owner=="string")throw new Error("A local owner account is required to approve a multisig transaction.");if(r.owner&&r.owner.source!=="root")throw new Error("A Tempo owner account is required to approve a multisig transaction.");const a=!!i&&!!r.owner&&t.transport.multisig===!0;if(i){const{account:o,local:l}=i;if(!o)throw new Error("A multisig account address is required with a current config.");const c=await(async()=>{if(i.config)return i.config;if(!a)return;const u=await ho(t,F3,"getConfig")({address:o});if(!u)throw new Error(`No current multisig config is cached for account ${o}. Provide the current config.`);return u})();if(!c)throw new Error("A multisig config is required to prepare a transaction.");r.from=o,r.multisigSimulation=Sp({config:c,local:l})}const s=await(async()=>{if(r.nonceKey==="expiring"||r.nonceKey===hp)return!0;if(typeof r.nonceKey<"u"||i)return!1;if(r.feePayer&&typeof r.nonceKey>"u")return!0;const o=r.account,l=typeof o=="string"?o:o?.address;return l&&typeof r.nonceKey>"u"?await Ug(l.toLowerCase()):!1})();if(a&&typeof r.nonceKey>"u"?(r.nonceKey=Ke(E3(31))+1n,r.nonce=0):s?(r.nonceKey=hp,r.nonce??=0,typeof r.validAfter>"u"&&(r.validAfter=Hg()),typeof r.validBefore>"u"&&(r.validBefore=Math.floor(Date.now()/1e3)+Wg)):typeof r.nonceKey<"u"&&(r.nonce=typeof r.nonce=="number"?r.nonce:0),!r.keyAuthorization&&r.account?.source==="accessKey"){const o=r.account.keyAuthorizationManager;if(o){const l=r.chainId??r.chain?.id;if(typeof l<"u"){const c=r.account.address,u=r.account.accessKeyAddress,p={address:c,accessKey:u,chainId:l},h=await o.get(p);if(h){const f=BigInt(Math.floor(Date.now()/1e3));if(h.expiry!=null&&BigInt(h.expiry)<=f)await o.remove(p);else{const y=await ho(t,cs,"getMetadata")({account:c,accessKey:u});zo(y.address,u)&&!y.isRevoked&&y.expiry>f?await o.remove(p):r.keyAuthorization=h}}}}}return!r.feeToken&&r.chain?.feeToken&&(r.feeToken=r.chain.feeToken),r},{runAt:["beforeFillTransaction","afterFillParameters"]}],serializers:{transaction:$p,async transactionEnvelope({serializedTransaction:e,transaction:t}){const n=t;if(!n.multisigSimulation)return e;try{vr(e)}catch{if(Ap(e).signature?.type==="multisig")return e;throw new Error("A Tempo owner account is required to approve a multisig transaction.")}return await $p({...n,signatures:[...n.signatures??[],e]})}},async verifyHash(e,t){const{address:n,hash:r,signature:i,mode:a}=t,s=(()=>{if(typeof i=="string")try{return vr(i)}catch{return}})();if(s){if(s?.type==="keychain"&&a==="allowAccessKey"){const o=s.version==="v2"?w0(gn("0x04",r,n)):r,l=(()=>{try{return Br({payload:o,signature:s.inner})}catch{return}})();if(!l)return!1;const c=await cs(e,{account:n,accessKey:l,blockHash:t.blockHash,blockNumber:t.blockNumber,blockTag:t.blockTag,requireCanonical:t.requireCanonical});return c.isRevoked||c.expiry<=BigInt(Math.floor(Date.now()/1e3))?!1:tu(s.inner,{address:l,payload:o})}if(s.type==="p256"||s.type==="webAuthn"){const o=await Lm(e,{address:n,blockHash:t.blockHash,blockNumber:t.blockNumber,blockTag:t.blockTag,requireCanonical:t.requireCanonical});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return tu(s,{address:n,payload:r})}}return await ho(e,Am,"verifyHash")({...t,chain:null})}};function Sp(e){const{config:t,local:n}=e;return{approvals:Zg(t).map(r=>{const i=n?.owners.find(a=>zo(a.address,r.owner));return{...Vg(i),owner:r.owner}}),config:t}}function Vg(e){const t=(()=>{if(e&&typeof e=="object"&&"keyType"in e&&typeof e.keyType=="string")return e.keyType})();return!t||t==="webAuthn"?{keyData:"0x0578",keyType:"webAuthn"}:t==="p256"||t==="secp256k1"?{keyType:t}:{keyData:"0x0578",keyType:"webAuthn"}}function Hg(){const t=BigInt(Math.floor(Date.now()/1e3))-60n;return t<=0n?0:Number(BigInt(E3(8))%t)}function Zg(e){const t=[...e.owners].sort((i,a)=>Number(a.weight)-Number(i.weight)||i.owner.toLowerCase().localeCompare(a.owner.toLowerCase())),n=[];let r=0;for(const i of t.slice(0,wr)){if(r>=Number(e.threshold))break;n.push(i),r+=Number(i.weight)}return n.sort((i,a)=>i.owner.toLowerCase().localeCompare(a.owner.toLowerCase()))}const Di=S0({...y5,id:4217,blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.tempo.xyz"}},contracts:{earnFactory:{address:"0xb5889A96114014d4C032ebD76772c10bF3b97137"},erc4626EngineFactory:{address:"0xd43D00981222a8db444A528E69f19E3cE5A7D2Ff"}},name:"Tempo Mainnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.tempo.xyz"],webSocket:["wss://rpc.tempo.xyz"]}}}),us=S0({...y5,id:42431,hardfork:"t5",blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.testnet.tempo.xyz"}},contracts:{earnFactory:{address:"0xb5889A96114014d4C032ebD76772c10bF3b97137"},erc4626EngineFactory:{address:"0xd43D00981222a8db444A528E69f19E3cE5A7D2Ff"}},name:"Tempo Testnet (Moderato)",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.moderato.tempo.xyz"],webSocket:["wss://rpc.moderato.tempo.xyz"]}},testnet:!0});var Pd={exports:{}},c2={};var Tp;function Bg(){if(Tp)return c2;Tp=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var s=null;if(a!==void 0&&(s=""+a),i.key!==void 0&&(s=""+i.key),"key"in i){a={};for(var o in i)o!=="key"&&(a[o]=i[o])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:a}}return c2.Fragment=t,c2.jsx=n,c2.jsxs=n,c2}var Ip;function zg(){return Ip||(Ip=1,Pd.exports=Bg()),Pd.exports}var d=zg();const Kg={path:"/api/v1/analytics_events",method:"POST"},qg={path:"/api/v1/apps/:app_id",method:"GET"},Gg={path:"/api/v1/funding/coinbase_on_ramp/init",method:"POST"},Yg={path:"/api/v1/funding/coinbase_on_ramp/status",method:"GET"},Jg={path:"/api/v1/apps/:app_id/cross-app/connections",method:"GET"},Xg={path:"/api/v1/custom_jwt_account/authenticate",method:"POST"},Qg={path:"/api/v1/custom_jwt_account/link",method:"POST"},ew={path:"/api/v1/farcaster/init",method:"POST"},tw={path:"/api/v1/farcaster/authenticate",method:"POST"},nw={path:"/api/v1/farcaster/link",method:"POST"},rw={path:"/api/v1/farcaster/unlink",method:"POST"},iw={path:"/api/v1/farcaster/status",method:"GET"},aw={path:"/api/v2/farcaster/init",method:"POST"},sw={path:"/api/v2/farcaster/authenticate",method:"POST"},ow={path:"/api/v1/guest/authenticate",method:"POST"},lw={path:"/api/v1/mfa/passkeys/init",method:"POST"},dw={path:"/api/v1/mfa/passwordless_sms/init",method:"POST"},cw={path:"/api/v1/mfa_auth/passkeys/init",method:"POST"},uw={path:"/api/v1/mfa_auth/passkeys/verify",method:"POST"},pw={path:"/api/v1/mfa_auth/passkeys/enrollment",method:"POST"},hw={path:"/api/v1/mfa_auth/totp/enroll",method:"POST"},fw={path:"/api/v1/mfa_auth/totp/verify",method:"POST"},yw={path:"/api/v1/mfa_auth/totp/init",method:"POST"},mw={path:"/api/v1/mfa_auth/totp/unenroll",method:"POST"},gw={path:"/api/v1/oauth/authenticate",method:"POST"},ww={path:"/api/v1/oauth/init",method:"POST"},vw={path:"/api/v1/oauth/link",method:"POST"},Cw={path:"/api/v1/oauth/unlink",method:"POST"},_w={path:"/api/v1/passkeys/link",method:"POST"},bw={path:"/api/v1/passkeys/authenticate",method:"POST"},Lw={path:"/api/v1/passkeys/register",method:"POST"},Aw={path:"/api/v1/passkeys/authenticate/init",method:"POST"},Ew={path:"/api/v1/passkeys/register/init",method:"POST"},xw={path:"/api/v1/passkeys/link/init",method:"POST"},kw={path:"/api/v1/passwordless/authenticate",method:"POST"},$w={path:"/api/v1/passwordless/init",method:"POST"},Sw={path:"/api/v1/passwordless/link",method:"POST"},Tw={path:"/api/v1/passwordless/unlink",method:"POST"},Iw={path:"/api/v1/passwordless/update",method:"POST"},Mw={path:"/api/v1/passwordless_sms/authenticate",method:"POST"},Pw={path:"/api/v1/passwordless_sms/init",method:"POST"},Rw={path:"/api/v1/passwordless_sms/link",method:"POST"},Ow={path:"/api/v1/passwordless_sms/unlink",method:"POST"},Nw={path:"/api/v1/passwordless_sms/update",method:"POST"},Fw={path:"/api/v1/embedded_wallets/:address/recovery/key_material",method:"POST"},jw={path:"/api/v1/recovery/oauth/init",method:"POST"},Dw={path:"/api/v1/recovery/oauth/authenticate",method:"POST"},Uw={path:"/api/v1/recovery/oauth/init_icloud",method:"POST"},Ww={path:"/api/v1/recovery/configuration_icloud",method:"POST"},Vw={path:"/api/v1/onramp/deposit_addresses/quote",method:"POST"},j3={path:"/api/v1/onramp/deposit_addresses/orders/:order_id",method:"GET"},Hw={path:"/api/v1/onramp/deposit_addresses/:deposit_address_id/next_order",method:"GET"},m5={path:"/api/v1/onramp/deposit_addresses/deposit_config",method:"GET"},Rd={path:"/api/v1/wallets/:wallet_id/deposit_accounts/crypto",method:"POST"},Zw={path:"/api/v1/deposit_accounts/crypto/config",method:"GET"},Bw={path:"/api/v1/deposit_accounts/crypto/quote",method:"POST"},zw={path:"/api/v1/wallets/:wallet_id/deposit_accounts/crypto/orders/:order_id",method:"GET"},Kw={path:"/api/v1/wallets/:wallet_id/deposit_accounts/crypto/next_order",method:"GET"},qw=(e,t)=>t?Object.entries(t).reduce((n,[r,i])=>n.replace(`:${r}`,`${i}`),e):e,Mp={path:"/api/v1/sessions",method:"POST"},Gw={path:"/api/v1/sessions/logout",method:"POST"},Yw={path:"/api/v1/apps/:app_id/smart_wallets",method:"GET"},g5={path:"/api/v1/siwe/init",method:"POST"},Jw={path:"/api/v1/siwe/authenticate",method:"POST"},Xw={path:"/api/v1/siwe/link",method:"POST"},Qw={path:"/api/v1/siwe/link_smart_wallet",method:"POST"},ev={path:"/api/v1/siwe/unlink",method:"POST"},tv={path:"/api/v1/siws/init",method:"POST"},nv={path:"/api/v1/siws/authenticate",method:"POST"},rv={path:"/api/v1/siws/link",method:"POST"},iv={path:"/api/v1/siws/unlink",method:"POST"},av={path:"/api/v1/users/me/accept_terms",method:"POST"},sv={path:"/api/v1/telegram/authenticate",method:"POST"},ov={path:"/api/v1/telegram/link",method:"POST"},lv={path:"/api/v1/telegram/unlink",method:"POST"},dv={path:"/api/v1/plugins/moonpay_on_ramp/sign",method:"POST"},cv={path:"/api/v1/fiat/customer",method:"GET"},uv={path:"/api/v1/fiat/customer",method:"PUT"},pv={path:"/api/v1/fiat/customer/virtual_accounts",method:"PUT"},hv={path:"/api/v1/onramp/fiat/quotes",method:"PUT"},fv={path:"/api/v1/onramp/fiat/provider_session_url",method:"POST"},yv={path:"/api/v1/onramp/fiat/status",method:"GET"},mv={path:"/api/v1/fiat/onramp_enabled",method:"GET"},AW={path:"/api/v1/onramp/stripe/create_link_auth_intent",method:"POST"},EW={path:"/api/v1/onramp/stripe/exchange_tokens",method:"POST"},xW={path:"/api/v1/onramp/stripe/customer",method:"GET"},kW={path:"/api/v1/onramp/stripe/customer/wallets",method:"GET"},$W={path:"/api/v1/onramp/stripe/customer/payment_tokens",method:"GET"},SW={path:"/api/v1/onramp/stripe/create_onramp_session",method:"POST"},TW={path:"/api/v1/onramp/stripe/quote/:session_id",method:"POST"},IW={path:"/api/v1/onramp/stripe/checkout/:session_id",method:"POST"},MW={path:"/api/v1/onramp/stripe/transaction_limits",method:"GET"},gv={path:"/api/v1/users/me",method:"GET"},w5={path:"/api/v1/wallets",method:"POST"},wv={path:"/api/v1/wallets/:wallet_id",method:"GET"},Od={path:"/api/v1/wallets/:wallet_id/rpc",method:"POST"},Nd={path:"/api/v1/wallets/:wallet_id",method:"PATCH"},vv={path:"/api/v1/wallets/revoke",method:"POST"},Fd={path:"/api/v1/wallets/:wallet_id/transfer",method:"POST"},Cv={path:"/api/v1/wallets/:wallet_id/actions/:action_id",method:"GET"},_v={path:"/api/v1/wallets/:wallet_id/actions",method:"GET"};new TextEncoder;const v5=new TextDecoder,bv=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},Lv=e=>{let t=e;t instanceof Uint8Array&&(t=v5.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return bv(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class Av extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(t){var n;super(t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(n=Error.captureStackTrace)===null||n===void 0||n.call(Error,this,this.constructor)}}class _i extends Av{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}function Ev(e){return typeof e=="object"&&e!==null}function xv(e){if(!Ev(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}const kv=Lv;function gu(e){if(typeof e!="string")throw new _i("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new _i("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new _i("Invalid JWT");if(!t)throw new _i("JWTs must contain a payload");let r;try{r=kv(t)}catch{throw new _i("Failed to base64url decode the payload")}let i;try{i=JSON.parse(v5.decode(r))}catch{throw new _i("Failed to parse the decoded payload as JSON")}if(!xv(i))throw new _i("Invalid JWT Claims Set");return i}function C5(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}const zr={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}},D3={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0},Kr={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}},U3={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0},qr={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}},W3={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0},$v={id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0},Sv={id:56,network:"bsc",name:"Binance Smart Chain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{privy:{http:["https://bsc-mainnet.rpc.privy.systems"]},default:{http:["https://56.rpc.thirdweb.com"]},public:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}}},V3={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1},Tv={id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0},Iv={id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},Mv={id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},Pv={id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}},Rv={id:43419,name:"Gunz Mainnet",network:"gunz",nativeCurrency:{name:"GUN",symbol:"GUN",decimals:18},rpcUrls:{privy:{http:["https://gunz-mainnet.rpc.privy.systems"]},default:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]},public:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]}},blockExplorers:{default:{name:"Gunz Explorer",url:"https://gunzscan.io"}}},Ov={id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}},Nv={id:13371,name:"Immutable zkEVM",network:"immutable-zkevm",nativeCurrency:{name:"Immutable Coin",symbol:"IMX",decimals:18},rpcUrls:{privy:{http:["https://immutable-mainnet.rpc.privy.systems"]},default:{http:["https://rpc.immutable.com"]},public:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com"}}},Fv={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1},jv={id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0},Dv={id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}},br={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}},Uv={id:1088,name:"Metis Andromeda",network:"metis",nativeCurrency:{name:"Metis",symbol:"METIS",decimals:18},rpcUrls:{privy:{http:["https://metis-mainnet.rpc.privy.systems"]},default:{http:["https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"]},public:{http:["https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io"}}},aa={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}},H3={id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0},Lr={id:137,name:"Polygon Mainnet",network:"polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}},Z3={id:80002,name:"Polygon Amoy",network:"polygon-amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0},Wv={id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}},B3={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0},Vv={id:1868,name:"Soneium Mainnet",network:"soneium",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://soneium-mainnet.rpc.privy.systems"]},default:{http:["https://rpc.soneium.org"]},public:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com"}}},Hv={id:130,name:"Unichain",network:"unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://unichain-mainnet.rpc.privy.systems"]},default:{http:["https://mainnet.unichain.org"]},public:{http:["https://mainnet.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz"}}},Zv={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{privy:{http:["https://zora-mainnet.rpc.privy.systems"]},default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}},Bv={id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},zv={id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},Ya=[br,B3,Ov,zr,D3,aa,H3,Lr,Z3,V3,Tv,Iv,Mv,qr,W3,$v,Sv,Rv,Nv,Dv,Fv,jv,Uv,Kr,U3,Vv,Hv,Zv,zv,Bv,Wv,Pv],Kv=new Set(Ya.map(e=>e.id));function PW(e){let t=e.filter(n=>!Kv.has(n.id));return Ya.concat(t)}function qv(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}const _5=e=>e.map(t=>{if(t.rpcUrls.privyWalletOverride)return t;let n=Ya.find(r=>r.id===t.id)?.rpcUrls.privy?.http[0];return n?C5(t,n):t}),Gv={id:999},Ja={id:143};var jd={exports:{}},Pp;function Yv(){return Pp||(Pp=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,p,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,p||l,h),y=n?n+c:c;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],f]:l._events[y].push(f):(l._events[y]=f,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],u,p;if(this._eventsCount===0)return c;for(p in u=this._events)t.call(u,p)&&c.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},o.prototype.listeners=function(c){var u=n?n+c:c,p=this._events[u];if(!p)return[];if(p.fn)return[p.fn];for(var h=0,f=p.length,y=new Array(f);h<f;h++)y[h]=p[h].fn;return y},o.prototype.listenerCount=function(c){var u=n?n+c:c,p=this._events[u];return p?p.fn?1:p.length:0},o.prototype.emit=function(c,u,p,h,f,y){var m=n?n+c:c;if(!this._events[m])return!1;var w=this._events[m],E=arguments.length,_,C;if(w.fn){switch(w.once&&this.removeListener(c,w.fn,void 0,!0),E){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,u),!0;case 3:return w.fn.call(w.context,u,p),!0;case 4:return w.fn.call(w.context,u,p,h),!0;case 5:return w.fn.call(w.context,u,p,h,f),!0;case 6:return w.fn.call(w.context,u,p,h,f,y),!0}for(C=1,_=new Array(E-1);C<E;C++)_[C-1]=arguments[C];w.fn.apply(w.context,_)}else{var k=w.length,S;for(C=0;C<k;C++)switch(w[C].once&&this.removeListener(c,w[C].fn,void 0,!0),E){case 1:w[C].fn.call(w[C].context);break;case 2:w[C].fn.call(w[C].context,u);break;case 3:w[C].fn.call(w[C].context,u,p);break;case 4:w[C].fn.call(w[C].context,u,p,h);break;default:if(!_)for(S=1,_=new Array(E-1);S<E;S++)_[S-1]=arguments[S];w[C].fn.apply(w[C].context,_)}}return!0},o.prototype.on=function(c,u,p){return a(this,c,u,p,!1)},o.prototype.once=function(c,u,p){return a(this,c,u,p,!0)},o.prototype.removeListener=function(c,u,p,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return s(this,f),this;var y=this._events[f];if(y.fn)y.fn===u&&(!h||y.once)&&(!p||y.context===p)&&s(this,f);else{for(var m=0,w=[],E=y.length;m<E;m++)(y[m].fn!==u||h&&!y[m].once||p&&y[m].context!==p)&&w.push(y[m]);w.length?this._events[f]=w.length===1?w[0]:w:s(this,f)}return this},o.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&s(this,u)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(jd)),jd.exports}var Jv=Yv();const z3=Zl(Jv),mo={0:"legacy",1:"eip2930",2:"eip1559",3:"eip4844",4:"eip7702"},b5={legacy:0,eip2930:1,eip1559:2,eip4844:3,eip7702:4},Ln=e=>e===void 0?void 0:BigInt(e);function nl(e){let{type:t=2,authorizationList:n,...r}=typeof e=="string"?JSON.parse(e):e,i;r.accessList&&Array.isArray(r.accessList)?i=r.accessList.map(u=>Array.isArray(u)?{address:u[0],storageKeys:u[1]}:u):r.accessList&&(i=Object.entries(r.accessList).map(u=>({address:u[0],storageKeys:u[1]})));let a=Number(r.chainId??1),s=F2(r.data)?r.data:r.data?En(Uint8Array.from(r.data)):void 0,o=r.nonce?Number(r.nonce):void 0,l={chainId:a,data:s,nonce:o,value:Ln(r.value),gas:Ln(r.gas??r.gasLimit)},c=Number(t);if(c===0)return{...r,type:mo[c],...l,gasPrice:Ln(r.gasPrice),accessList:void 0,maxFeePerGas:void 0,maxPriorityFeePerGas:void 0};if(c===1)return{...r,type:mo[c],...l,gasPrice:Ln(r.gasPrice),accessList:i,maxFeePerGas:void 0,maxPriorityFeePerGas:void 0};if(c===2)return{...r,type:mo[c],...l,nonce:o,accessList:i,maxFeePerGas:Ln(r.maxFeePerGas),maxPriorityFeePerGas:Ln(r.maxPriorityFeePerGas),gasPrice:void 0,maxFeePerBlobGas:void 0};if(c===4){let u=(n??[]).map(p=>({address:p.address,chainId:Number(p.chainId),nonce:Number(p.nonce),r:p.r,s:p.s,yParity:p.yParity??(p.v===void 0?0:Number(p.v)-27)}));return{...r,type:mo[c],...l,nonce:o,accessList:i,maxFeePerGas:Ln(r.maxFeePerGas),maxPriorityFeePerGas:Ln(r.maxPriorityFeePerGas),authorizationList:u,gasPrice:void 0,maxFeePerBlobGas:void 0}}throw Error(`Unsupported transaction type: ${t}`)}const Ql=118,L5="tempo",Dd=(e,t)=>{if(e===void 0)return;let n=Number(e);if(!Number.isSafeInteger(n)||n<0)throw Error(`Invalid Tempo ${t}: ${String(e)}`);return n};function Ri(e){if(!e||typeof e!="object")return!1;let t=e.type;if(!(t===118||typeof t=="string"&&t.toLowerCase()==="tempo"))return!1;let n=e.calls;return Array.isArray(n)&&n.length>0}function Rp(e){let t;if(typeof e=="string")try{t=JSON.parse(e)}catch(s){let o=s instanceof Error?s.message:String(s);throw Error(`Invalid Tempo transaction JSON: ${o}`)}else t=e;let n;if(t.accessList&&Array.isArray(t.accessList)?n=t.accessList.map(s=>Array.isArray(s)?{address:s[0],storageKeys:s[1]}:s):t.accessList&&(n=Object.entries(t.accessList).map(s=>({address:s[0],storageKeys:s[1]}))),t.chainId===void 0||t.chainId===null)throw Error("Tempo transactions require a chainId");let r=Number(t.chainId);if(!Number.isSafeInteger(r)||r<=0)throw Error(`Invalid Tempo chainId: ${String(t.chainId)}`);let i=Dd(t.nonce,"nonce");if(!Array.isArray(t.calls)||t.calls.length===0)throw Error("Tempo transactions require at least one call");let a=t.calls.map(s=>({to:s.to,data:s.data,value:Ln(s.value)}));return{type:L5,chainId:r,from:t.from,nonce:i,gas:Ln(t.gasLimit),maxFeePerGas:Ln(t.maxFeePerGas),maxPriorityFeePerGas:Ln(t.maxPriorityFeePerGas),calls:a,feeToken:t.feeToken,nonceKey:Ln(t.nonceKey),validBefore:Dd(t.validBefore,"validBefore"),validAfter:Dd(t.validAfter,"validAfter"),feePayerSignature:t.feePayerSignature,accessList:n}}function Xv(e,t){let{chain:n,gas:r,...i}=e;return{...i,...r!==void 0&&t===void 0?{gasLimit:r}:{}}}var Ud,Op;function Qv(){return Op||(Op=1,Ud=function e(t){if(typeof t=="number"&&isNaN(t))throw new Error("NaN is not allowed");if(typeof t=="number"&&!isFinite(t))throw new Error("Infinity is not allowed");return t===null||typeof t!="object"?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((i,a,s)=>`${i}${s===0?"":","}${e(a===void 0||typeof a=="symbol"?null:a)}`,"")}]`:`{${Object.keys(t).sort().reduce((r,i)=>{if(t[i]===void 0||typeof t[i]=="symbol")return r;const a=r.length===0?"":",";return`${r}${a}${e(i)}:${e(t[i])}`},"")}}`}),Ud}var eC=Qv();const tC=Zl(eC),nC=e=>ba.encode(e),rC=e=>{try{return Uint8Array.from(ba.decode(e))}catch(t){if(t instanceof Error&&t.message.includes("string should have whole number of bytes"))return Uint8Array.from(Gm.decode(e));throw t}},iC=e=>D0.encode(e),aC=e=>Uint8Array.from(D0.decode(e)),sC=new TextEncoder,oC=e=>Uint8Array.from(sC.encode(e)),lC=new TextDecoder,dC=new TextDecoder("utf-8",{fatal:!0}),cC=(e,t)=>(t?.fatal?dC:lC).decode(e),Mt={utf8:{fromBytes:cC,toBytes:oC},base64:{fromBytes:nC,toBytes:rC},base64urlnopad:{fromBytes:iC,toBytes:aC}};var Ye;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(const s of i)if(a(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Ye||(Ye={}));var Np;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Np||(Np={}));const re=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ti=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return Number.isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},z=Ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Wr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof Wr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Wr.create=e=>new Wr(e);const wu=(e,t)=>{let n;switch(e.code){case z.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case z.invalid_union:n="Invalid input";break;case z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case z.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case z.invalid_arguments:n="Invalid function arguments";break;case z.invalid_return_type:n="Invalid function return type";break;case z.invalid_date:n="Invalid date";break;case z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case z.custom:n="Invalid input";break;case z.invalid_intersection_types:n="Intersection results could not be merged";break;case z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case z.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let uC=wu;function pC(){return uC}const hC=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function X(e,t){const n=pC(),r=hC({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===wu?void 0:wu].filter(i=>!!i)});e.common.issues.push(r)}class cn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Se;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,s=await i.value;r.push({key:a,value:s})}return cn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return Se;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[a.value]=s.value)}return{status:t.value,value:r}}}const Se=Object.freeze({status:"aborted"}),j2=e=>({status:"dirty",value:e}),Un=e=>({status:"valid",value:e}),Fp=e=>e.status==="aborted",jp=e=>e.status==="dirty",Pa=e=>e.status==="valid",rl=e=>typeof Promise<"u"&&e instanceof Promise;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(pe||(pe={}));class Cr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Dp=(e,t)=>{if(Pa(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Wr(e.common.issues);return this._error=n,this._error}}};function Fe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,o)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:i}}class Ze{get description(){return this._def.description}_getType(t){return ti(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ti(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cn,ctx:{common:t.parent.common,data:t.data,parsedType:ti(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(rl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ti(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Dp(r,i)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ti(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Pa(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Pa(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ti(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(rl(i)?i:Promise.resolve(i));return Dp(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const s=t(i),o=()=>a.addIssue({code:z.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Xi({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return jr.create(this,this._def)}nullable(){return Qi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return yr.create(this)}promise(){return cl.create(this,this._def)}or(t){return al.create([this,t],this._def)}and(t){return sl.create(this,t,this._def)}transform(t){return new Xi({...Fe(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ul({...Fe(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new k5({typeName:Te.ZodBranded,type:this,...Fe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new pl({...Fe(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return q3.create(this,t)}readonly(){return hl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const fC=/^c[^\s-]{8,}$/i,yC=/^[0-9a-z]+$/,mC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gC=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wC=/^[a-z0-9_-]{21}$/i,vC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,CC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_C=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wd;const LC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,AC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,EC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$C=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,A5="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",SC=new RegExp(`^${A5}$`);function E5(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function TC(e){return new RegExp(`^${E5(e)}$`)}function IC(e){let t=`${A5}T${E5(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function MC(e,t){return!!((t==="v4"||!t)&&LC.test(e)||(t==="v6"||!t)&&EC.test(e))}function PC(e,t){if(!vC.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function RC(e,t){return!!((t==="v4"||!t)&&AC.test(e)||(t==="v6"||!t)&&xC.test(e))}class fr extends Ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const a=this._getOrReturnCtx(t);return X(a,{code:z.invalid_type,expected:re.string,received:a.parsedType}),Se}const r=new cn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),X(i,{code:z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),X(i,{code:z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const s=t.data.length>a.value,o=t.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(t,i),s?X(i,{code:z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&X(i,{code:z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")_C.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"email",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Wd||(Wd=new RegExp(bC,"u")),Wd.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"emoji",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")gC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"uuid",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")wC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"nanoid",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")fC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"cuid",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")yC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"cuid2",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")mC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"ulid",code:z.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),X(i,{validation:"url",code:z.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"regex",code:z.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),X(i,{code:z.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),X(i,{code:z.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),X(i,{code:z.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?IC(a).test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{code:z.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?SC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{code:z.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?TC(a).test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{code:z.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?CC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"duration",code:z.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?MC(t.data,a.version)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"ip",code:z.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?PC(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"jwt",code:z.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?RC(t.data,a.version)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"cidr",code:z.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?kC.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"base64",code:z.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?$C.test(t.data)||(i=this._getOrReturnCtx(t,i),X(i,{validation:"base64url",code:z.invalid_string,message:a.message}),r.dirty()):Ye.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:z.invalid_string,...pe.errToObj(r)})}_addCheck(t){return new fr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...pe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...pe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...pe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...pe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...pe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...pe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...pe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...pe.errToObj(n)})}nonempty(t){return this.min(1,pe.errToObj(t))}trim(){return new fr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fr.create=e=>new fr({checks:[],typeName:Te.ZodString,coerce:e?.coerce??!1,...Fe(e)});function OC(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}class qi extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==re.number){const a=this._getOrReturnCtx(t);return X(a,{code:z.invalid_type,expected:re.number,received:a.parsedType}),Se}let r;const i=new cn;for(const a of this._def.checks)a.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),X(r,{code:z.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),X(r,{code:z.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),X(r,{code:z.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?OC(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),X(r,{code:z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),X(r,{code:z.not_finite,message:a.message}),i.dirty()):Ye.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new qi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new qi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ye.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}qi.create=e=>new qi({checks:[],typeName:Te.ZodNumber,coerce:e?.coerce||!1,...Fe(e)});class Gi extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==re.bigint)return this._getInvalidInput(t);let r;const i=new cn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),X(r,{code:z.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),X(r,{code:z.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),X(r,{code:z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):Ye.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return X(n,{code:z.invalid_type,expected:re.bigint,received:n.parsedType}),Se}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new Gi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Gi.create=e=>new Gi({checks:[],typeName:Te.ZodBigInt,coerce:e?.coerce??!1,...Fe(e)});class il extends Ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return X(r,{code:z.invalid_type,expected:re.boolean,received:r.parsedType}),Se}return Un(t.data)}}il.create=e=>new il({typeName:Te.ZodBoolean,coerce:e?.coerce||!1,...Fe(e)});class Ra extends Ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const a=this._getOrReturnCtx(t);return X(a,{code:z.invalid_type,expected:re.date,received:a.parsedType}),Se}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return X(a,{code:z.invalid_date}),Se}const r=new cn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),X(i,{code:z.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),X(i,{code:z.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):Ye.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ra({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ra.create=e=>new Ra({checks:[],coerce:e?.coerce||!1,typeName:Te.ZodDate,...Fe(e)});class Up extends Ze{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return X(r,{code:z.invalid_type,expected:re.symbol,received:r.parsedType}),Se}return Un(t.data)}}Up.create=e=>new Up({typeName:Te.ZodSymbol,...Fe(e)});class vu extends Ze{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return X(r,{code:z.invalid_type,expected:re.undefined,received:r.parsedType}),Se}return Un(t.data)}}vu.create=e=>new vu({typeName:Te.ZodUndefined,...Fe(e)});class Cu extends Ze{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return X(r,{code:z.invalid_type,expected:re.null,received:r.parsedType}),Se}return Un(t.data)}}Cu.create=e=>new Cu({typeName:Te.ZodNull,...Fe(e)});class _u extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return Un(t.data)}}_u.create=e=>new _u({typeName:Te.ZodAny,...Fe(e)});class Wp extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Un(t.data)}}Wp.create=e=>new Wp({typeName:Te.ZodUnknown,...Fe(e)});class fi extends Ze{_parse(t){const n=this._getOrReturnCtx(t);return X(n,{code:z.invalid_type,expected:re.never,received:n.parsedType}),Se}}fi.create=e=>new fi({typeName:Te.ZodNever,...Fe(e)});class Vp extends Ze{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return X(r,{code:z.invalid_type,expected:re.void,received:r.parsedType}),Se}return Un(t.data)}}Vp.create=e=>new Vp({typeName:Te.ZodVoid,...Fe(e)});class yr extends Ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==re.array)return X(n,{code:z.invalid_type,expected:re.array,received:n.parsedType}),Se;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(s||o)&&(X(n,{code:s?z.too_big:z.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(X(n,{code:z.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(X(n,{code:z.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,o)=>i.type._parseAsync(new Cr(n,s,n.path,o)))).then(s=>cn.mergeArray(r,s));const a=[...n.data].map((s,o)=>i.type._parseSync(new Cr(n,s,n.path,o)));return cn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new yr({...this._def,minLength:{value:t,message:pe.toString(n)}})}max(t,n){return new yr({...this._def,maxLength:{value:t,message:pe.toString(n)}})}length(t,n){return new yr({...this._def,exactLength:{value:t,message:pe.toString(n)}})}nonempty(t){return this.min(1,t)}}yr.create=(e,t)=>new yr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Fe(t)});function wa(e){if(e instanceof Tt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=jr.create(wa(r))}return new Tt({...e._def,shape:()=>t})}else return e instanceof yr?new yr({...e._def,type:wa(e.element)}):e instanceof jr?jr.create(wa(e.unwrap())):e instanceof Qi?Qi.create(wa(e.unwrap())):e instanceof Yi?Yi.create(e.items.map(t=>wa(t))):e}class Tt extends Ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ye.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return X(c,{code:z.invalid_type,expected:re.object,received:c.parsedType}),Se}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof fi&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const u=a[c],p=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cr(i,p,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof fi){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(X(i,{code:z.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const p=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cr(i,p,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const p=await u.key,h=await u.value;c.push({key:p,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>cn.mergeObjectSync(r,c)):cn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new Tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:pe.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Tt({...this._def,unknownKeys:"strip"})}passthrough(){return new Tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Tt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ye.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Tt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ye.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Tt({...this._def,shape:()=>n})}deepPartial(){return wa(this)}partial(t){const n={};for(const r of Ye.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new Tt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ye.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof jr;)a=a._def.innerType;n[r]=a}return new Tt({...this._def,shape:()=>n})}keyof(){return x5(Ye.objectKeys(this.shape))}}Tt.create=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strip",catchall:fi.create(),typeName:Te.ZodObject,...Fe(t)});Tt.strictCreate=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strict",catchall:fi.create(),typeName:Te.ZodObject,...Fe(t)});Tt.lazycreate=(e,t)=>new Tt({shape:e,unknownKeys:"strip",catchall:fi.create(),typeName:Te.ZodObject,...Fe(t)});class al extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(o=>new Wr(o.ctx.common.issues));return X(n,{code:z.invalid_union,unionErrors:s}),Se}if(n.common.async)return Promise.all(r.map(async a=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let a;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(l=>new Wr(l));return X(n,{code:z.invalid_union,unionErrors:o}),Se}}get options(){return this._def.options}}al.create=(e,t)=>new al({options:e,typeName:Te.ZodUnion,...Fe(t)});const Ir=e=>e instanceof Lu?Ir(e.schema):e instanceof Xi?Ir(e.innerType()):e instanceof ll?[e.value]:e instanceof Ji?e.options:e instanceof dl?Ye.objectValues(e.enum):e instanceof ul?Ir(e._def.innerType):e instanceof vu?[void 0]:e instanceof Cu?[null]:e instanceof jr?[void 0,...Ir(e.unwrap())]:e instanceof Qi?[null,...Ir(e.unwrap())]:e instanceof k5||e instanceof hl?Ir(e.unwrap()):e instanceof pl?Ir(e._def.innerType):[];class K3 extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return X(n,{code:z.invalid_type,expected:re.object,received:n.parsedType}),Se;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(X(n,{code:z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const s=Ir(a.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of s){if(i.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,a)}}return new K3({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Fe(r)})}}function bu(e,t){const n=ti(e),r=ti(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const i=Ye.objectKeys(t),a=Ye.objectKeys(e).filter(o=>i.indexOf(o)!==-1),s={...e,...t};for(const o of a){const l=bu(e[o],t[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const s=e[a],o=t[a],l=bu(s,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class sl extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,s)=>{if(Fp(a)||Fp(s))return Se;const o=bu(a.value,s.value);return o.valid?((jp(a)||jp(s))&&n.dirty(),{status:n.value,value:o.data}):(X(r,{code:z.invalid_intersection_types}),Se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,s])=>i(a,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}sl.create=(e,t,n)=>new sl({left:e,right:t,typeName:Te.ZodIntersection,...Fe(n)});class Yi extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return X(r,{code:z.invalid_type,expected:re.array,received:r.parsedType}),Se;if(r.data.length<this._def.items.length)return X(r,{code:z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&r.data.length>this._def.items.length&&(X(r,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Cr(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(a).then(s=>cn.mergeArray(n,s)):cn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Yi({...this._def,rest:t})}}Yi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yi({items:e,typeName:Te.ZodTuple,rest:null,...Fe(t)})};class ol extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.object)return X(r,{code:z.invalid_type,expected:re.object,received:r.parsedType}),Se;const i=[],a=this._def.keyType,s=this._def.valueType;for(const o in r.data)i.push({key:a._parse(new Cr(r,o,r.path,o)),value:s._parse(new Cr(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?cn.mergeObjectAsync(n,i):cn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ze?new ol({keyType:t,valueType:n,typeName:Te.ZodRecord,...Fe(r)}):new ol({keyType:fr.create(),valueType:t,typeName:Te.ZodRecord,...Fe(n)})}}class Hp extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.map)return X(r,{code:z.invalid_type,expected:re.map,received:r.parsedType}),Se;const i=this._def.keyType,a=this._def.valueType,s=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new Cr(r,o,r.path,[c,"key"])),value:a._parse(new Cr(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Se;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Se;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}Hp.create=(e,t,n)=>new Hp({valueType:t,keyType:e,typeName:Te.ZodMap,...Fe(n)});class ps extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return X(r,{code:z.invalid_type,expected:re.set,received:r.parsedType}),Se;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(X(r,{code:z.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(X(r,{code:z.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Se;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>a._parse(new Cr(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(t,n){return new ps({...this._def,minSize:{value:t,message:pe.toString(n)}})}max(t,n){return new ps({...this._def,maxSize:{value:t,message:pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ps.create=(e,t)=>new ps({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Fe(t)});class Lu extends Ze{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Lu.create=(e,t)=>new Lu({getter:e,typeName:Te.ZodLazy,...Fe(t)});class ll extends Ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return X(n,{received:n.data,code:z.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:t.data}}get value(){return this._def.value}}ll.create=(e,t)=>new ll({value:e,typeName:Te.ZodLiteral,...Fe(t)});function x5(e,t){return new Ji({values:e,typeName:Te.ZodEnum,...Fe(t)})}class Ji extends Ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return X(n,{expected:Ye.joinValues(r),received:n.parsedType,code:z.invalid_type}),Se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return X(n,{received:n.data,code:z.invalid_enum_value,options:r}),Se}return Un(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ji.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ji.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ji.create=x5;class dl extends Ze{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const i=Ye.objectValues(n);return X(r,{expected:Ye.joinValues(i),received:r.parsedType,code:z.invalid_type}),Se}if(this._cache||(this._cache=new Set(Ye.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Ye.objectValues(n);return X(r,{received:r.data,code:z.invalid_enum_value,options:i}),Se}return Un(t.data)}get enum(){return this._def.values}}dl.create=(e,t)=>new dl({values:e,typeName:Te.ZodNativeEnum,...Fe(t)});class cl extends Ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return X(n,{code:z.invalid_type,expected:re.promise,received:n.parsedType}),Se;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return Un(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cl.create=(e,t)=>new cl({type:e,typeName:Te.ZodPromise,...Fe(t)});class Xi extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:s=>{X(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const s=i.transform(r.data,a);if(r.common.async)return Promise.resolve(s).then(async o=>{if(n.value==="aborted")return Se;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Se:l.status==="dirty"||n.value==="dirty"?j2(l.value):l});{if(n.value==="aborted")return Se;const o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?Se:o.status==="dirty"||n.value==="dirty"?j2(o.value):o}}if(i.type==="refinement"){const s=o=>{const l=i.refinement(o,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Se:(o.status==="dirty"&&n.dirty(),s(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Se:(o.status==="dirty"&&n.dirty(),s(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Pa(s))return Se;const o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Pa(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:n.value,value:o})):Se);Ye.assertNever(i)}}Xi.create=(e,t,n)=>new Xi({schema:e,typeName:Te.ZodEffects,effect:t,...Fe(n)});Xi.createWithPreprocess=(e,t,n)=>new Xi({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Fe(n)});class jr extends Ze{_parse(t){return this._getType(t)===re.undefined?Un(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}jr.create=(e,t)=>new jr({innerType:e,typeName:Te.ZodOptional,...Fe(t)});class Qi extends Ze{_parse(t){return this._getType(t)===re.null?Un(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qi.create=(e,t)=>new Qi({innerType:e,typeName:Te.ZodNullable,...Fe(t)});class ul extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ul.create=(e,t)=>new ul({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Fe(t)});class pl extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Wr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}pl.create=(e,t)=>new pl({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Fe(t)});class Zp extends Ze{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return X(r,{code:z.invalid_type,expected:re.nan,received:r.parsedType}),Se}return{status:"valid",value:t.data}}}Zp.create=e=>new Zp({typeName:Te.ZodNaN,...Fe(e)});class k5 extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class q3 extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Se:a.status==="dirty"?(n.dirty(),j2(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Se:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new q3({in:t,out:n,typeName:Te.ZodPipeline})}}class hl extends Ze{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Pa(i)&&(i.value=Object.freeze(i.value)),i);return rl(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hl.create=(e,t)=>new hl({innerType:e,typeName:Te.ZodReadonly,...Fe(t)});var Te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Te||(Te={}));const Bp=fr.create,RW=qi.create;Gi.create;const OW=il.create,NW=Ra.create,FW=_u.create;fi.create;const jW=yr.create,NC=Tt.create,DW=al.create,UW=K3.create;sl.create;Yi.create;const WW=ol.create,VW=ll.create,HW=Ji.create,FC=dl.create;cl.create;jr.create;Qi.create;const ZW={string:(e=>fr.create({...e,coerce:!0})),number:(e=>qi.create({...e,coerce:!0})),boolean:(e=>il.create({...e,coerce:!0})),bigint:(e=>Gi.create({...e,coerce:!0})),date:(e=>Ra.create({...e,coerce:!0}))};let Au=(function(e){return e.OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",e.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",e.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",e.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",e.MISSING_MFA_ENROLLMENT="missing_mfa_enrollment",e.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",e.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",e.INVALID_DATA="invalid_data",e.INVALID_CREDENTIALS="invalid_credentials",e.PASSKEY_NOT_REGISTERED="passkey_not_registered",e.INVALID_CAPTCHA="invalid_captcha",e.LINKED_TO_ANOTHER_USER="linked_to_another_user",e.ALLOWLIST_REJECTED="allowlist_rejected",e.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",e.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",e.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",e.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",e.TOO_MANY_REQUESTS="too_many_requests",e.RESOURCE_CONFLICT="resource_conflict",e.INVALID_ORIGIN="invalid_origin",e.MISSING_ORIGIN="missing_origin",e.INVALID_NATIVE_APP_ID="invalid_native_app_id",e.TOKEN_ALREADY_USED="token_already_used",e.ALREADY_LOGGED_OUT="already_logged_out",e.NOT_SUPPORTED="not_supported",e.USER_UNSUBSCRIBED="user_unsubscribed",e.MAX_APPS_REACHED="max_apps_reached",e.USER_LIMIT_REACHED="max_accounts_reached",e.DEVICE_REVOKED="device_revoked",e.WALLET_PASSWORD_EXISTS="wallet_password_exists",e.OAUTH_STATE_MISMATCH="oauth_state_mismatch",e.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",e.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",e.DISALLOWED_LOGIN_METHOD="disallowed_login_method",e.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",e.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",e.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",e.CANNOT_SET_PASSWORD="cannot_set_password",e.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",e.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",e.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",e.USER_DOES_NOT_EXIST="user_does_not_exist",e.ALREADY_EXISTS="resource_already_exists",e.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",e.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",e.FEATURE_NOT_ENABLED="feature_not_enabled",e.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED="onramp_minimum_identity_verification_required",e.ONRAMP_IDENTITY_VERIFICATION_REQUIRED="onramp_identity_verification_required",e.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED="onramp_document_verification_required",e.ONRAMP_UNSUPPORTED_INFORMATION="onramp_unsupported_information",e.ONRAMP_TRANSACTION_LIMIT_REACHED="transaction_limit_reached",e.ONRAMP_QUOTE_EXPIRED="onramp_quote_expired",e.ONRAMP_WALLET_OWNERSHIP_REQUIRED="onramp_wallet_ownership_required",e.INSUFFICIENT_FUNDS="insufficient_funds",e.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",e.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",e.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",e.INVALID_POLICY_FORMAT="invalid_policy_format",e.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",e.POLICY_VIOLATION="policy_violation",e.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",e.COMPLIANCE_BLOCKED="compliance_blocked",e.INVALID_REQUEST="invalid_request",e.SIGNUP_DISABLED="signup_disabled",e.INVALID_STATE="invalid_state",e.WALLET_ENTITY_ASSIGNMENT_FAILED="wallet_entity_assignment_failed",e.WALLET_ENTITY_LIMIT_EXCEEDED="wallet_entity_limit_exceeded",e.WALLET_ENTITY_ALREADY_SET="wallet_entity_already_set",e})({});var jC=class extends Error{status;code;responseData;constructor(t,n,r,i){super(n),this.status=t,this.code=r,this.name="HttpError",this.responseData=i}toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},go=class extends jC{constructor(t,n){super(400,t,n||"invalid_data"),this.name="InvalidInputError"}};NC({error:Bp(),cause:Bp().optional(),code:FC(Au).optional()});const DC=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),UC="privy-retry-attempt",WC=e=>3**e*500,VC=[408,409,425,500,502,503,504],HC=(e,{retryableStatusCodes:t=VC,retryCount:n=3,retryDelayMilliseconds:r=WC,includeRetryAttemptHeader:i=!0}={})=>async(a,s)=>{let o=a instanceof Request?a:new Request(a,s),l=s?.signal??o.signal,c,u=!1,p;for(let h=0;h<=n;h++){let f=new Headers(s?.headers??o.headers);i&&f.set(UC,String(h));try{let y=await e(o.clone(),{...s,headers:f});if(!t.includes(y.status))return y;p=y,u=!1}catch(y){if(l?.aborted)throw y;c===void 0&&(c=y),u=!0}h<n&&await DC(r(h))}if(!u&&p!==void 0)return p;throw c};function wo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!=="__proto__"&&(e[r]=n[r])}return e}var ZC={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Eu(e,t){function n(i,a,s){if(!(typeof document>"u")){s=wo({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var l in s)s[l]&&(o+="; "+l,s[l]!==!0&&(o+="="+s[l].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+o}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],s={},o=0;o<a.length;o++){var l=a[o].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(u in s||(s[u]=e.read(c,u)),i===u)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,a){n(i,"",wo({},a,{expires:-1}))},withAttributes:function(i){return Eu(this.converter,wo({},this.attributes,i))},withConverter:function(i){return Eu(wo({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Vd=Eu(ZC,{path:"/"}),Ro={exports:{}},BC=Ro.exports,zp;function zC(){return zp||(zp=1,(function(e,t){(function(n,r){e.exports=r()})(BC,(function(){var n=function(a,s){if(s=s||{},typeof a!="function")throw new i("fetch must be a function");if(typeof s!="object")throw new i("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new i("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new i("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(o,s),function(c,u){var p=s.retries,h=s.retryDelay,f=s.retryOn;if(u&&u.retries!==void 0)if(r(u.retries))p=u.retries;else throw new i("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(r(u.retryDelay)||typeof u.retryDelay=="function")h=u.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(u&&u.retryOn)if(Array.isArray(u.retryOn)||typeof u.retryOn=="function")f=u.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(y,m){var w=function(_){var C=typeof Request<"u"&&c instanceof Request?c.clone():c;a(C,u).then(function(k){if(Array.isArray(f)&&f.indexOf(k.status)===-1)y(k);else if(typeof f=="function")try{return Promise.resolve(f(_,null,k)).then(function(S){S?E(_,null,k):y(k)}).catch(m)}catch(S){m(S)}else _<p?E(_,null,k):y(k)}).catch(function(k){if(typeof f=="function")try{Promise.resolve(f(_,k,null)).then(function(S){S?E(_,k,null):m(k)}).catch(function(S){m(S)})}catch(S){m(S)}else _<p?E(_,k,null):m(k)})};function E(_,C,k){var S=typeof h=="function"?h(_,C,k):h;setTimeout(function(){w(++_)},S)}w(0)})}};function r(a){return Number.isInteger(a)&&a>=0}function i(a){this.name="ArgumentError",this.message=a}return n}))})(Ro)),Ro.exports}var KC=zC();const qC=Zl(KC),GC={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"450001234",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"},$5={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[2-467])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|[67]3)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","(?:400|[5-9]\\d\\d)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[48]\\d{8}|[2-9]\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|4(?:[0-35]|4[16-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[48]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1(?:05|[2-9]))","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-6]|80[2-46]","11|2[02]|33|4[04]|79[1-6]|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-37-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85[02-46-9]"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[0-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[013]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024","20240"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["20[0-35-7]|4(?:6[45]|[7-9])|[7-9]","20(?:[0135-7]|2[5-9])|4(?:6[45]|[7-9])|[7-9]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[2-4]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:472[2-47-9]|983[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}",[7,8,9,10],[["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","(?:13|8\\d{4})\\d{5}|[235-8]\\d{8}|[23568]\\d{6}",[7,9,10],[["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|29|58)|67[0-46-9]|(?:55|68)[0-69]"],"0$1"],["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|[27]|48)|37|675|(?:55|68)[78]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["548"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[256]|39|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["3"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Ys(e,t){var n=Array.prototype.slice.call(t);return n.push($5),e.apply(this,n)}function Kp(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var a=Number(n[i]),s=Number(r[i]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var YC={}.constructor;function Ui(e){return e!=null&&e.constructor===YC}var JC=/^\d+$/;function XC(e){return JC.test(e)}function Oa(e){"@babel/helpers - typeof";return Oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oa(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e_(r.key),r)}}function td(e,t,n){return t&&QC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function e_(e){var t=t_(e,"string");return Oa(t)=="symbol"?t:t+""}function t_(e,t){if(Oa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var n_="1.2.0",r_="1.7.35",qp=" ext. ",Wt=(function(){function e(t){ed(this,e),S5(t),this.metadata=t,T5.call(this,t)}return td(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var r=this.countryCallingCodes()[n];if(r&&r.length===1&&r[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,r){var i,a;if(n&&(XC(n)?a=n:i=n),r&&(a=r),i&&i!=="001"){var s=this.getCountryMetadata(i);if(!s)throw new Error("Unknown country: ".concat(i));this.numberingPlan=new Gp(s,this)}else if(a){if(!this.hasCallingCode(a))throw new Error("Unknown calling code: ".concat(a));this.numberingPlan=new Gp(this.getNumberingPlanMetadata(a),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var r=this.countryCallingCodes()[n];if(r)return r.length===1&&r[0].length===3?void 0:r}},{key:"getCountryCodeForCallingCode",value:function(n){var r=this.getCountryCodesForCallingCode(n);if(r)return r[0]}},{key:"getNumberingPlanMetadata",value:function(n){var r=this.getCountryCodeForCallingCode(n);if(r)return this.getCountryMetadata(r);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var a=this.countryCallingCodes()[n];if(a&&a.length===1&&a[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}])})(),Gp=(function(){function e(t,n){ed(this,e),this.globalMetadataObject=n,this.metadata=t,T5.call(this,n.metadata)}return td(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"_getDefaultCountryMetadataForThisCallingCode",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this._getDefaultCountryMetadataForThisCallingCode()}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,r=this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[];return r.map(function(i){return new i_(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&Yp(this.types(),n))return new s_(Yp(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?qp:this.metadata[13]||qp}}])})(),i_=(function(){function e(t,n){ed(this,e),this._format=t,this.metadata=n}return td(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!a_.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])})(),a_=/^\(?\$1\)?$/,s_=(function(){function e(t,n){ed(this,e),this.type=t,this.metadata=n}return td(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])})();function Yp(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function S5(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Ui(e)||!Ui(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Ui(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+o_(e)+": "+e,"."))}var o_=function(t){return Oa(t)};function G3(e,t){var n=new Wt(t);if(n.hasCountry(e))return n.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function l_(e,t){return t.countries.hasOwnProperty(e)}function T5(e){var t=e.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?Kp(t,n_)===-1?this.v2=!0:Kp(t,r_)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function Js(e,t,n){return d_(e,void 0,t,n)}function d_(e,t,n,r){n&&(r=new Wt(r.metadata),r.selectNumberingPlan(n));var i=r.type(t),a=i&&i.possibleLengths()||r.possibleLengths();if(!a)return"IS_POSSIBLE";var s=e.length,o=a[0];return o===s?"IS_POSSIBLE":o>s?"TOO_SHORT":a[a.length-1]<s?"TOO_LONG":a.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function c_(e,t,n){t===void 0&&(t={});var r=new Wt(n);if(t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.country||e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return I5(e.phone||e.nationalNumber,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function I5(e,t){return Js(e,void 0,t)==="IS_POSSIBLE"}function Vr(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function u_(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=p_(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p_(e,t){if(e){if(typeof e=="string")return Jp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jp(e,t):void 0}}function Jp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h_=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Y3(e,t,n){if(t=t||{},!(!e.country&&!e.countryCallingCode)){var r=new Wt(n);r.selectNumberingPlan(e.country||e.countryCallingCode);var i=t.v2?e.nationalNumber:e.phone;if(Vr(i,r.nationalNumberPattern())){if(Hd(i,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||Hd(i,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=u_(h_),s;!(s=a()).done;){var o=s.value;if(Hd(i,o,r))return o}}}}function Hd(e,t,n){var r=n.type(t);return!r||!r.pattern()||r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0?!1:Vr(e,r.pattern())}function f_(e,t,n){t=t||{};var r=new Wt(n);if(r.selectNumberingPlan(e.country||e.countryCallingCode),r.hasTypes())return Y3(e,t,r.metadata)!==void 0;var i=t.v2?e.nationalNumber:e.phone;return Vr(i,r.nationalNumberPattern())}var y_=/^[A-Z]{2}$/;function m_(e){return y_.test(e)}function g_(e,t){var n,r,i=new Wt(t);return m_(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e,{country:n,callingCode:r}}function w_(e,t,n){var r=new Wt(n),i=r.getCountryCodesForCallingCode(e);return i?i.filter(function(a){return v_(t,a,n)}):[]}function v_(e,t,n){var r=new Wt(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}var J3=2,C_=17,__=3,un="0-90-9٠-٩۰-۹",b_="-‐-―−ー-",L_="//",A_="..",E_=" ",x_="()()[]\\[\\]",k_="~⁓∼~",nr="".concat(b_).concat(L_).concat(A_).concat(E_).concat(x_).concat(k_),nd="++",$_=new RegExp("(["+un+"])");function M5(e,t,n,r){if(t){var i=new Wt(r);i.selectNumberingPlan(t||n);var a=new RegExp(i.IDDPrefix());if(e.search(a)===0){e=e.slice(e.match(a)[0].length);var s=e.match($_);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return e}}}function xu(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,a,s=r.length-1,o=s>0&&r[s];if(t.nationalPrefixTransformRule()&&o)i=e.replace(n,t.nationalPrefixTransformRule()),s>1&&(a=r[1]);else{var l=r[0];i=e.slice(l.length),o&&(a=r[1])}var c;if(o){var u=e.indexOf(r[1]),p=e.slice(0,u);p===t.numberingPlan.nationalPrefix()&&(c=t.numberingPlan.nationalPrefix())}else c=r[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:a}}}return{nationalNumber:e}}function S_(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=T_(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T_(e,t){if(e){if(typeof e=="string")return Xp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xp(e,t):void 0}}function Xp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P5(e,t,n){for(var r=new Wt(n),i=S_(t),a;!(a=i()).done;){var s=a.value;if(r.selectNumberingPlan(s),r.leadingDigits()){if(e&&e.search(r.leadingDigits())===0)return s}else if(Y3({phone:e,country:s},void 0,r.metadata))return s}}function X3(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return i.length===1?i[0]:P5(n,i,r.metadata)}function ku(e,t,n){var r=xu(e,n),i=r.carrierCode,a=r.nationalNumber;if(a!==e){if(!I_(e,a,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=X3(n.numberingPlan.callingCode(),{nationalNumber:a,metadata:n})),!M_(a,t,n)))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:i}}function I_(e,t,n){return!(Vr(e,n.nationalNumberPattern())&&!Vr(t,n.nationalNumberPattern()))}function M_(e,t,n){switch(Js(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function R5(e,t,n,r,i){if(!(t||n||r))return{number:e};var a=t||n?G3(t||n,i):r;if(e.indexOf(a)===0){var s=new Wt(i);s.selectNumberingPlan(t||n||r);var o=e.slice(a.length),l=ku(o,void 0,s),c=l.nationalNumber,u=ku(e,void 0,s),p=u.nationalNumber;if(!Vr(p,s.nationalNumberPattern())&&Vr(c,s.nationalNumberPattern())||Js(p,void 0,s)==="TOO_LONG")return{countryCallingCode:a,number:o}}return{number:e}}function Q3(e,t,n,r,i){if(!e)return{};var a;if(e[0]!=="+"){var s=M5(e,t||n,r,i);if(s&&s!==e)a=!0,e="+"+s;else{if(t||n||r){var o=R5(e,t,n,r,i),l=o.countryCallingCode,c=o.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}return{number:e}}}if(e[1]==="0")return{};for(var u=new Wt(i),p=2;p-1<=__&&p<=e.length;){var h=e.slice(1,p);if(u.hasCallingCode(h))return u.selectNumberingPlan(h),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:h,number:e.slice(p)};p++}return{}}function O5(e){return e.replace(new RegExp("[".concat(nr,"]+"),"g")," ").trim()}var N5=/(\$\d)/;function F5(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var a=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(N5,t.nationalPrefixFormattingRule()):t.format());return r?O5(a):a}var P_=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function R_(e,t,n){var r=new Wt(n);if(r.selectNumberingPlan(e||t),r.defaultIDDPrefix())return r.defaultIDDPrefix();if(P_.test(r.IDDPrefix()))return r.IDDPrefix()}var O_=";ext=",pa=function(t){return"([".concat(un,"]{1,").concat(t,"})")};function j5(e){var t="20",n="15",r="9",i="6",a="[ \\t,]*",s="[:\\..]?[ \\t,-]*",o="#?",l="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",p="[ \\t]*",h="(?:,{2}|;)",f=O_+pa(t),y=a+l+s+pa(t)+o,m=a+c+s+pa(r)+o,w=u+pa(i)+"#",E=p+h+s+pa(n)+o,_=p+"(?:,)+"+s+pa(r)+o;return f+"|"+y+"|"+m+"|"+w+"|"+E+"|"+_}var N_="["+un+"]{"+J3+"}",F_="["+nd+"]{0,1}(?:["+nr+"]*["+un+"]){3,}["+nr+un+"]*",j_=new RegExp("^["+nd+"]{0,1}(?:["+nr+"]*["+un+"]){1,2}$","i"),D_=F_+"(?:"+j5()+")?",U_=new RegExp("^"+N_+"$|^"+D_+"$","i");function W_(e){return e.length>=J3&&U_.test(e)}function V_(e){return j_.test(e)}function H_(e){var t=e.number,n=e.ext;if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}var Qp={formatExtension:function(t,n,r){return"".concat(t).concat(r.ext()).concat(n)}};function Z_(e,t,n,r){n?n=K_({},Qp,n):n=Qp;var i=new Wt(r);if(e.country&&e.country!=="001"){if(!i.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));i.selectNumberingPlan(e.country)}else if(e.countryCallingCode)i.selectNumberingPlan(e.countryCallingCode);else return e.phone||"";var a=i.countryCallingCode(),s=n.v2?e.nationalNumber:e.phone,o;switch(t){case"NATIONAL":return s?(o=fl(s,e.carrierCode,"NATIONAL",i,n),Zd(o,e.ext,i,n.formatExtension)):"";case"INTERNATIONAL":return s?(o=fl(s,null,"INTERNATIONAL",i,n),o="+".concat(a," ").concat(o),Zd(o,e.ext,i,n.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(s);case"RFC3966":return H_({number:"+".concat(a).concat(s),ext:e.ext});case"IDD":if(!n.fromCountry)return;var l=z_(s,e.carrierCode,a,n.fromCountry,i);return l?Zd(l,e.ext,i,n.formatExtension):void 0;default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function fl(e,t,n,r,i){var a=B_(r.formats(),e);return a?F5(e,a,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:t,metadata:r}):e}function B_(e,t){return q_(e,function(n){if(n.leadingDigitsPatterns().length>0){var r=n.leadingDigitsPatterns()[n.leadingDigitsPatterns().length-1];if(t.search(r)!==0)return!1}return Vr(t,n.pattern())})}function Zd(e,t,n,r){return t?r(e,t,n):e}function z_(e,t,n,r,i){var a=G3(r,i.metadata);if(a===n){var s=fl(e,t,"NATIONAL",i);return n==="1"?n+" "+s:s}var o=R_(r,void 0,i.metadata);if(o)return"".concat(o," ").concat(n," ").concat(fl(e,null,"INTERNATIONAL",i))}function K_(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}function q_(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function th(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(n),!0).forEach(function(r){G_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G_(e,t,n){return(t=D5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,D5(r.key),r)}}function X_(e,t,n){return t&&J_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function D5(e){var t=Q_(e,"string");return hs(t)=="symbol"?t:t+""}function Q_(e,t){if(hs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var e1=(function(){function e(t,n,r){if(Y_(this,e),!t)throw new TypeError("First argument is required");if(typeof t!="string")throw new TypeError("First argument must be a string");if(t[0]==="+"&&!n)throw new TypeError("`metadata` argument not passed");if(Ui(n)&&Ui(n.countries)){r=n;var i=t;if(!eb.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var a=Q3(i,void 0,void 0,void 0,r),s=a.countryCallingCode,o=a.number;if(n=o,t=s,!n)throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if(typeof n!="string")throw new TypeError("`nationalNumber` argument must be a string");S5(r);var l=g_(t,r),c=l.country,u=l.callingCode;this.country=c,this.countryCallingCode=u,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}return X_(e,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:w_(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return c_(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return f_(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new Wt(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Y3(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,r){return Z_(this,n,r?th(th({},r),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}])})(),eb=/^\+\d+$/;function $u(e){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function tb(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function nb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rb(e,t,n){return t=ys(t),ib(e,t1()?Reflect.construct(t,n||[],ys(e).constructor):t.apply(e,n))}function ib(e,t){if(t&&($u(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ab(e)}function ab(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sb(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fs(e,t)}function Su(e){var t=typeof Map=="function"?new Map:void 0;return Su=function(r){if(r===null||!lb(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return ob(r,arguments,ys(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),fs(i,r)},Su(e)}function ob(e,t,n){if(t1())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&fs(i,n.prototype),i}function t1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t1=function(){return!!e})()}function lb(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function fs(e,t){return fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},fs(e,t)}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ys(e)}var Pr=(function(e){function t(n){var r;return nb(this,t),r=rb(this,t,[n]),Object.setPrototypeOf(r,t.prototype),r.name=r.constructor.name,r}return sb(t,e),tb(t)})(Su(Error)),nh=new RegExp("(?:"+j5()+")$","i");function db(e){var t=e.search(nh);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(nh),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}function cb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=ub(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ub(e,t){if(e){if(typeof e=="string")return rh(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rh(e,t):void 0}}function rh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pb={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function U5(e){return pb[e]}function yl(e){for(var t="",n=cb(e.split("")),r;!(r=n()).done;){var i=r.value,a=U5(i);a&&(t+=a)}return t}function hb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=fb(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fb(e,t){if(e){if(typeof e=="string")return ih(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ih(e,t):void 0}}function ih(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ah(e){for(var t="",n=hb(e.split("")),r;!(r=n()).done;){var i=r.value;t+=yb(i,t)||""}return t}function yb(e,t,n){return e==="+"?t?void 0:"+":U5(e)}var W5="+",mb="[\\-\\.\\(\\)]?",sh="(["+un+"]|"+mb+")",gb="^\\"+W5+sh+"*["+un+"]"+sh+"*$",wb=new RegExp(gb,"g"),Tu=un,vb="["+Tu+"]+((\\-)*["+Tu+"])*",Cb="a-zA-Z",_b="["+Cb+"]+((\\-)*["+Tu+"])*",bb="^("+vb+"\\.)*"+_b+"\\.?$",Lb=new RegExp(bb,"g"),oh="tel:",Iu=";phone-context=",Ab=";isub=";function Eb(e){var t=e.indexOf(Iu);if(t<0)return null;var n=t+Iu.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}function xb(e){return e===null?!0:e.length===0?!1:wb.test(e)||Lb.test(e)}function kb(e,t){var n=t.extractFormattedPhoneNumber,r=Eb(e);if(!xb(r))throw new Pr("NOT_A_NUMBER");var i;if(r===null)i=n(e)||"";else{i="",r.charAt(0)===W5&&(i+=r);var a=e.indexOf(oh),s;a>=0?s=a+oh.length:s=0;var o=e.indexOf(Iu);i+=e.substring(s,o)}var l=i.indexOf(Ab);if(l>0&&(i=i.substring(0,l)),i!=="")return i}var $b=250,Sb=new RegExp("["+nd+un+"]"),Tb=new RegExp("[^"+un+"#]+$");function Ib(e,t,n){t=t||{};var r=new Wt(n);if(t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new Pr("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var i=Pb(e,t.v2,t.extract),a=i.number,s=i.ext,o=i.error;if(!a){if(t.v2)throw o==="TOO_SHORT"?new Pr("TOO_SHORT"):new Pr("NOT_A_NUMBER");return{}}var l=Ob(a,t.defaultCountry,t.defaultCallingCode,r),c=l.country,u=l.nationalNumber,p=l.countryCallingCode,h=l.countryCallingCodeSource,f=l.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new Pr("INVALID_COUNTRY");return{}}if(!u||u.length<J3){if(t.v2)throw new Pr("TOO_SHORT");return{}}if(u.length>C_){if(t.v2)throw new Pr("TOO_LONG");return{}}if(t.v2){var y=new e1(p,u,r.metadata);return c&&(y.country=c),f&&(y.carrierCode=f),s&&(y.ext=s),y.__countryCallingCodeSource=h,y}var m=(t.extended?r.hasSelectedNumberingPlan():c)?Vr(u,r.nationalNumberPattern()):!1;return t.extended?{country:c,countryCallingCode:p,carrierCode:f,valid:m,possible:m?!0:!!(t.extended===!0&&r.possibleLengths()&&I5(u,r)),phone:u,ext:s}:m?Rb(c,u,s):{}}function Mb(e,t,n){if(e){if(e.length>$b){if(n)throw new Pr("TOO_LONG");return}if(t===!1)return e;var r=e.search(Sb);if(!(r<0))return e.slice(r).replace(Tb,"")}}function Pb(e,t,n){var r=kb(e,{extractFormattedPhoneNumber:function(s){return Mb(s,n,t)}});if(!r)return{};if(!W_(r))return V_(r)?{error:"TOO_SHORT"}:{};var i=db(r);return i.ext?i:{number:r}}function Rb(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}function Ob(e,t,n,r){var i=Q3(ah(e),void 0,t,n,r.metadata),a=i.countryCallingCodeSource,s=i.countryCallingCode,o=i.number,l;if(s)r.selectNumberingPlan(s);else if(o&&(t||n))t?(l=t,r.selectNumberingPlan(t),s=r.numberingPlan.callingCode()):(r.selectNumberingPlan(n),s=n);else return{};if(!o)return{countryCallingCodeSource:a,countryCallingCode:s};var c=ku(ah(o),void 0,r),u=c.nationalNumber,p=c.carrierCode,h=X3(s,{nationalNumber:u,metadata:r});return h&&(l=h,h==="001"||r.selectNumberingPlan(l)),{country:l,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:u,carrierCode:p}}function ms(e){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(e)}function lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(n),!0).forEach(function(r){Nb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nb(e,t,n){return(t=Fb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fb(e){var t=jb(e,"string");return ms(t)=="symbol"?t:t+""}function jb(e,t){if(ms(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ms(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Db(e,t,n){return Ib(e,dh(dh({},t),{},{v2:!0}),n)}function gs(e){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(e)}function ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ub(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(n),!0).forEach(function(r){Wb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ch(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wb(e,t,n){return(t=Vb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vb(e){var t=Hb(e,"string");return gs(t)=="symbol"?t:t+""}function Hb(e,t){if(gs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zb(e,t){return qb(e)||Kb(e,t)||zb(e,t)||Bb()}function Bb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zb(e,t){if(e){if(typeof e=="string")return uh(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uh(e,t):void 0}}function uh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Kb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function qb(e){if(Array.isArray(e))return e}function V5(e){var t=Array.prototype.slice.call(e),n=Zb(t,4),r=n[0],i=n[1],a=n[2],s=n[3],o,l,c;if(typeof r=="string")o=r;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")s?(l=a,c=s):(l=void 0,c=a),i&&(l=Ub({defaultCountry:i},l));else if(Ui(i))a?(l=i,c=a):c=i;else throw new Error("Invalid second argument: ".concat(i));return{text:o,options:l,metadata:c}}function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(n),!0).forEach(function(r){Gb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ph(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gb(e,t,n){return(t=Yb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yb(e){var t=Jb(e,"string");return ws(t)=="symbol"?t:t+""}function Jb(e,t){if(ws(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ws(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H5(e,t,n){t&&t.defaultCountry&&!l_(t.defaultCountry,n)&&(t=hh(hh({},t),{},{defaultCountry:void 0}));try{return Db(e,t,n)}catch(r){if(!(r instanceof Pr))throw r}}function Xb(){var e=V5(arguments),t=e.text,n=e.options,r=e.metadata;return H5(t,n,r)}function vs(e){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(e)}function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(n),!0).forEach(function(r){Qb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qb(e,t,n){return(t=eL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eL(e){var t=tL(e,"string");return vs(t)=="symbol"?t:t+""}function tL(e,t){if(vs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nL(){var e=V5(arguments),t=e.text,n=e.options,r=e.metadata;n=yh(yh({},n),{},{extract:!1});var i=H5(t,n,r);return i&&i.isPossible()||!1}function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function rL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sL(r.key),r)}}function aL(e,t,n){return t&&iL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sL(e){var t=oL(e,"string");return Cs(t)=="symbol"?t:t+""}function oL(e,t){if(Cs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lL=(function(){function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;rL(this,e),this.onCountryChange=n,this.onCallingCodeChange=r}return aL(e,[{key:"reset",value:function(n){var r=n.country,i=n.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(r,i)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(n){for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this[a]=n[a]}}},{key:"initCountryAndCallingCode",value:function(n,r){this.setCountry(n),this.setCallingCode(r)}},{key:"setCountry",value:function(n){this.country=n,this.onCountryChange(n)}},{key:"setCallingCode",value:function(n){this.callingCode=n,this.onCallingCodeChange(n,this.country)}},{key:"startInternationalNumber",value:function(n,r){this.international=!0,this.initCountryAndCallingCode(n,r)}},{key:"appendDigits",value:function(n){this.digits+=n}},{key:"appendNationalSignificantNumberDigits",value:function(n){this.nationalSignificantNumber+=n}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])})();function dL(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=cL(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cL(e,t){if(e){if(typeof e=="string")return mh(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mh(e,t):void 0}}function mh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var qn="x",Bd=new RegExp(qn);function Oo(e,t){if(t<1)return"";for(var n="";t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function gh(e,t){return e[t]===")"&&t++,uL(e.slice(0,t))}function uL(e){for(var t=[],n=0;n<e.length;)e[n]==="("?t.push(n):e[n]===")"&&t.pop(),n++;var r=0,i="";t.push(e.length);for(var a=0,s=t;a<s.length;a++){var o=s[a];i+=e.slice(r,o),r=o+1}return i}function pL(e,t,n){for(var r=dL(n.split("")),i;!(i=r()).done;){var a=i.value;if(e.slice(t+1).search(Bd)<0)return;t=e.search(Bd),e=e.replace(Bd,a)}return[e,t]}function hL(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix,s=new RegExp("^(?:".concat(t.pattern(),")$"));if(s.test(e.nationalSignificantNumber))return yL(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:a})}function fL(e,t){return Js(e,void 0,t)==="IS_POSSIBLE"}function yL(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var s=wh(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:r});if(s)return s}return wh(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:r})}function wh(e,t,n){var r=n.metadata,i=n.useNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix,s=F5(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:r});if(i||(e.nationalPrefix?s=e.nationalPrefix+a(t)+s:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(s=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+s)),mL(s,e))return s}function mL(e,t){return yl(e)===t.getNationalDigits()}function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function gL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CL(r.key),r)}}function vL(e,t,n){return t&&wL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CL(e){var t=_L(e,"string");return _s(t)=="symbol"?t:t+""}function _L(e,t){if(_s(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_s(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bL=(function(){function e(){gL(this,e)}return vL(e,[{key:"parse",value:function(n){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(n),this.context.length!==1)throw new Error("Non-finalized contexts left when pattern parse ended");var r=this.context[0],i=r.branches,a=r.instructions;if(i)return{op:"|",args:i.concat([zd(a)])};if(a.length===0)throw new Error("Pattern is required");return a.length===1?a[0]:a}},{key:"startContext",value:function(n){this.context.push(n)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(n){if(!n)throw new Error("Pattern is required");var r=n.match(EL);if(!r){if(AL.test(n))throw new Error("Illegal characters found in a pattern: ".concat(n));this.getContext().instructions=this.getContext().instructions.concat(n.split(""));return}var i=r[1],a=n.slice(0,r.index),s=n.slice(r.index+i.length);switch(i){case"(?:":a&&this.parsePattern(a),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(a&&this.parsePattern(a),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var o=this.getContext(),l=o.branches;l.push(zd(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:l});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(a&&this.parsePattern(a),!this.getContext().branches)if(this.context.length===1)this.getContext().branches=[];else throw new Error('"branches" not found in an "or" group context');this.getContext().branches.push(zd(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":a&&this.parsePattern(a),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:LL(a)});break;default:throw new Error("Unknown operator: ".concat(i))}s&&this.parsePattern(s)}}])})();function LL(e){for(var t=[],n=0;n<e.length;){if(e[n]==="-"){if(n===0||n===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,i=e[n+1].charCodeAt(0)-1,a=r;a<=i;)t.push(String.fromCharCode(a)),a++}else t.push(e[n]);n++}return t}var AL=/[\(\)\[\]\?\:\|]/,EL=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function zd(e){return e.length===1?e[0]:e}function vh(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=xL(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
12
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xL(e,t){if(e){if(typeof e=="string")return Ch(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ch(e,t):void 0}}function Ch(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bs(e){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function kL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TL(r.key),r)}}function SL(e,t,n){return t&&$L(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TL(e){var t=IL(e,"string");return bs(t)=="symbol"?t:t+""}function IL(e,t){if(bs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ML=(function(){function e(t){kL(this,e),this.matchTree=new bL().parse(t)}return SL(e,[{key:"match",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.allowOverflow;if(!n)throw new Error("String is required");var a=Mu(n.split(""),this.matchTree,!0);if(a&&a.match&&delete a.matchedChars,!(a&&a.overflow&&!i))return a}}])})();function Mu(e,t,n){if(typeof t=="string"){var r=e.join("");return t.indexOf(r)===0?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:r.indexOf(t)===0?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var i=e.slice(),a=0;a<t.length;){var s=t[a],o=Mu(i,s,n&&a===t.length-1);if(o){if(o.overflow)return o;if(o.match){if(i=i.slice(o.matchedChars.length),i.length===0)return a===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(o.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
|
|
13
|
+
`.concat(JSON.stringify(o,null,2)))}}else return;a++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case"|":for(var l,c=vh(t.args),u;!(u=c()).done;){var p=u.value,h=Mu(e,p,n);if(h){if(h.overflow)return h;if(h.match)return{match:!0,matchedChars:h.matchedChars};if(h.partialMatch)l=!0;else throw new Error(`Unsupported match result:
|
|
14
|
+
`.concat(JSON.stringify(h,null,2)))}}return l?{partialMatch:!0}:void 0;case"[]":for(var f=vh(t.args),y;!(y=f()).done;){var m=y.value;if(e[0]===m)return e.length===1?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[m]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function Ls(e){"@babel/helpers - typeof";return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function _h(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=PL(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PL(e,t){if(e){if(typeof e=="string")return bh(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bh(e,t):void 0}}function bh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FL(r.key),r)}}function NL(e,t,n){return t&&OL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FL(e){var t=jL(e,"string");return Ls(t)=="symbol"?t:t+""}function jL(e,t){if(Ls(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ls(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pu="9",DL=15,UL=Oo(Pu,DL),WL=/[- ]/,VL=function(){return/\[([^\[\]])*\]/g},HL=function(){return/\d(?=[^,}][^,}])/g},ZL=new RegExp("["+nr+"]*\\$1["+nr+"]*(\\$\\d["+nr+"]*)*$"),Lh=3,BL=(function(){function e(t){t.state;var n=t.metadata;RL(this,e),this.metadata=n,this.resetFormat()}return NL(e,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(n,r){this.resetFormat(),n?(this.isNANP=n.callingCode()==="1",this.matchingFormats=n.formats(),r.nationalSignificantNumber&&this.narrowDownMatchingFormats(r)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(n,r){var i=this;if(fL(r.nationalSignificantNumber,this.metadata))for(var a=_h(this.matchingFormats),s;!(s=a()).done;){var o=s.value,l=hL(r,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return i.shouldTryNationalPrefixFormattingRule(u,{international:r.international,nationalPrefix:r.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return i.getSeparatorAfterNationalPrefix(u)}});if(l)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(l.replace(/\d/g,qn),r),this.populatedNationalNumberTemplate=l,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(qn),l}return this.formatNationalNumberWithNextDigits(n,r)}},{key:"formatNationalNumberWithNextDigits",value:function(n,r){var i=this.chosenFormat,a=this.chooseFormat(r);if(a)return a===i?this.formatNextNationalNumberDigits(n):this.formatNextNationalNumberDigits(r.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(n){var r=this,i=n.nationalSignificantNumber,a=n.nationalPrefix,s=n.international,o=i,l=o.length-Lh;l<0&&(l=0),this.matchingFormats=this.matchingFormats.filter(function(c){return r.formatSuits(c,s,a)&&r.formatMatches(c,o,l)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(n,r,i){return!(i&&!n.usesNationalPrefix()&&!n.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!r&&!i&&n.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(n,r,i){var a=n.leadingDigitsPatterns().length;if(a===0)return!0;i=Math.min(i,a-1);var s=n.leadingDigitsPatterns()[i];if(r.length<Lh)try{return new ML(s).match(r,{allowOverflow:!0})!==void 0}catch(o){return console.error(o),!0}return new RegExp("^(".concat(s,")")).test(r)}},{key:"getFormatFormat",value:function(n,r){return r?n.internationalFormat():n.format()}},{key:"chooseFormat",value:function(n){for(var r=this,i=function(){var c=o.value;return r.chosenFormat===c?0:ZL.test(r.getFormatFormat(c,n.international))?r.createTemplateForFormat(c,n)?(r.chosenFormat=c,0):(r.matchingFormats=r.matchingFormats.filter(function(u){return u!==c}),1):1},a,s=_h(this.matchingFormats.slice()),o;!(o=s()).done&&(a=i(),a!==0););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(n,r){if(!(n.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(n,r);if(i)return this.setNationalNumberTemplate(i,r),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(n){return this.isNANP||n&&n.nationalPrefixFormattingRule()&&WL.test(n.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(n,r){var i=n.IDDPrefix,a=n.missingPlus;return i?r&&r.spacing===!1?i:i+" ":a?"":"+"}},{key:"getTemplate",value:function(n){if(this.template){for(var r=-1,i=0,a=n.international?this.getInternationalPrefixBeforeCountryCallingCode(n,{spacing:!1}):"";i<a.length+n.getDigitsWithoutInternationalPrefix().length;)r=this.template.indexOf(qn,r+1),i++;return gh(this.template,r+1)}}},{key:"setNationalNumberTemplate",value:function(n,r){this.nationalNumberTemplate=n,this.populatedNationalNumberTemplate=n,this.populatedNationalNumberTemplatePosition=-1,r.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g,qn)+Oo(qn,r.callingCode.length)+" "+n:this.template=n}},{key:"getTemplateForFormat",value:function(n,r){var i=r.nationalSignificantNumber,a=r.international,s=r.nationalPrefix,o=r.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,l=n.pattern();l=l.replace(VL(),"\\d").replace(HL(),"\\d");var c=UL.match(l)[0];if(!(i.length>c.length)){var u=new RegExp("^"+l+"$"),p=i.replace(/\d/g,Pu);u.test(p)&&(c=p);var h=this.getFormatFormat(n,a),f;if(this.shouldTryNationalPrefixFormattingRule(n,{international:a,nationalPrefix:s})){var y=h.replace(N5,n.nationalPrefixFormattingRule());if(yl(n.nationalPrefixFormattingRule())===(s||"")+yl("$1")&&(h=y,f=!0,s))for(var m=s.length;m>0;)h=h.replace(/\d/,qn),m--}var w=c.replace(new RegExp(l),h).replace(new RegExp(Pu,"g"),qn);return f||(o?w=Oo(qn,o.length)+" "+w:s&&(w=Oo(qn,s.length)+this.getSeparatorAfterNationalPrefix(n)+w)),a&&(w=O5(w)),w}}},{key:"formatNextNationalNumberDigits",value:function(n){var r=pL(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,n);if(!r){this.resetFormat();return}return this.populatedNationalNumberTemplate=r[0],this.populatedNationalNumberTemplatePosition=r[1],gh(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(n,r){var i=r.international,a=r.nationalPrefix;if(n.nationalPrefixFormattingRule()){var s=n.usesNationalPrefix();if(s&&a||!s&&!i)return!0}}}])})();function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function Z5(e,t){return GL(e)||qL(e,t)||KL(e,t)||zL()}function zL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KL(e,t){if(e){if(typeof e=="string")return Ah(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ah(e,t):void 0}}function Ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function GL(e){if(Array.isArray(e))return e}function YL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QL(r.key),r)}}function XL(e,t,n){return t&&JL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QL(e){var t=eA(e,"string");return As(t)=="symbol"?t:t+""}function eA(e,t){if(As(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(As(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tA="["+nr+un+"]+",nA=new RegExp("^"+tA+"$","i"),rA="(?:["+nd+"]["+nr+un+"]*|["+nr+un+"]+)",iA=new RegExp("[^"+nr+un+"]+.*$"),aA=/[^\d\[\]]/,sA=(function(){function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,i=t.metadata,a=t.onNationalSignificantNumberChange;YL(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a}return XL(e,[{key:"input",value:function(n,r){var i=dA(n),a=Z5(i,2),s=a[0],o=a[1],l=yl(s),c;return o&&(r.digits||(r.startInternationalNumber(void 0,void 0),l||(c=!0))),l&&this.inputDigits(l,r),{digits:l,justLeadingPlus:c}}},{key:"inputDigits",value:function(n,r){var i=r.digits,a=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),a&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(s){return r.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=Q3("+"+n.getDigitsWithoutInternationalPrefix(),n.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,a=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&aA.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=xu(n,this.metadata),a=i.nationalPrefix,s=i.nationalNumber,o=i.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,o,s,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=xu(n,this.metadata),s=a.nationalPrefix,o=a.nationalNumber,l=a.carrierCode;if(o!==r)return this.onExtractedNationalNumber(s,l,o,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,a,s){var o=!1,l,c=a.lastIndexOf(i);if(c<0||c!==a.length-i.length)o=!0;else{var u=a.slice(0,c);u&&u!==n&&(l=u)}s({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberIsModified:o,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,a=n.digits;if(n.nationalSignificantNumber,!(r||i)){var s=M5(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==a)return n.update({IDDPrefix:a.slice(0,a.length-s.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=R5(n.digits,n.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,a=r.callingCode;n.startInternationalNumber(i,a),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}])})();function oA(e){var t=e.search(rA);if(!(t<0)){e=e.slice(t);var n;return e[0]==="+"&&(n=!0,e=e.slice(1)),e=e.replace(iA,""),n&&(e="+"+e),e}}function lA(e){var t=oA(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function dA(e){var t=lA(e),n=Z5(t,2),r=n[0],i=n[1];return nA.test(r)||(r=""),[r,i]}function Es(e){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(e)}function cA(e,t){return fA(e)||hA(e,t)||pA(e,t)||uA()}function uA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pA(e,t){if(e){if(typeof e=="string")return Eh(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Eh(e,t):void 0}}function Eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hA(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function fA(e){if(Array.isArray(e))return e}function yA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wA(r.key),r)}}function gA(e,t,n){return t&&mA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wA(e){var t=vA(e,"string");return Es(t)=="symbol"?t:t+""}function vA(e,t){if(Es(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Es(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B5=(function(){function e(t,n){yA(this,e),this.metadata=new Wt(n);var r=this.getCountryAndCallingCode(t),i=cA(r,2),a=i[0],s=i[1];this.defaultCountry=a,this.defaultCallingCode=s,this.reset()}return gA(e,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(Ui(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,a=r.justLeadingPlus;if(a)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var s;if(this.metadata.hasSelectedNumberingPlan()&&(s=this.formatter.format(i,this.state)),s===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var o=this.state.getNationalDigits();o&&(s=this.formatter.format(o,this.state))}this.formattedOutput=s?this.getFullNumber(s):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new lL({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,a){n.metadata.selectNumberingPlan(a||i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new BL({state:this.state,metadata:this.metadata}),this.parser=new sA({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(o){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!o})+o},a=this.state.callingCode;return i(a?n?"".concat(a," ").concat(n):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,a=n.nationalPrefix,s=r,o=i||a;return o&&(s=o+s),s}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(n?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,qn)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){var n=X3(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata});n!==this.state.country&&(this.state.setCountry(n),n&&this.metadata.selectNumberingPlan(n))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,a=n.country,s=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+s:"+"+r;if(a||i){var o=a?this.metadata.countryCallingCode():i;return"+"+o+s}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,a=n.callingCode;if(r){var s=this._getCountry();if(!(!s&&!a)){if(s&&s===this.defaultCountry){var o=this.metadata.numberingPlan.callingCode(),l=CA(o,r,this.metadata);l&&(s=l)}var c=new e1(s||a,r,this.metadata.metadata);return i&&(c.carrierCode=i),c}}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"validateLength",value:function(){var n=this.state,r=n.digits,i=n.nationalSignificantNumber;if(!r)return"NOT_A_NUMBER";if(!this.metadata.numberingPlan)return"INVALID_COUNTRY";if(!i)return"TOO_SHORT";var a=Js(i,void 0,this.metadata);if(a!=="IS_POSSIBLE")return a}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])})();function CA(e,t,n){var r=n.getCountryCodesForCallingCode(e);if(r.length>1)return P5(t,r,n.metadata)}function _A(e){return new Wt(e).getCountries()}function bA(e,t,n){if(t[e])return new e1(e,t[e],n)}function LA(){return Ys(Xb,arguments)}function AA(){return Ys(nL,arguments)}function xs(e){return B5.call(this,e,$5)}xs.prototype=Object.create(B5.prototype,{});xs.prototype.constructor=xs;function EA(){return Ys(_A,arguments)}function z5(){return Ys(G3,arguments)}function xA(){return Ys(bA,arguments)}var xh=Object.defineProperty,Xs=(e,t)=>{let n={};for(var r in e)xh(n,r,{get:e[r],enumerable:!0});return xh(n,Symbol.toStringTag,{value:"Module"}),n};function kA(e){return{digest:e?.digest??((t,n)=>globalThis.crypto.subtle.digest(t,n)),randomUUID:e?.randomUUID??(()=>globalThis.crypto.randomUUID())}}const ks=e=>/^0x[0-9a-fA-F]*$/.test(e),Ru=e=>Buffer.from(e,"utf8"),ml=e=>`0x${e.toString("hex")}`,gl=Symbol("data-suffix-plugin");function $A(e=[]){return e.find(t=>t.id===gl)}function SA(e){let t=e.startsWith("0x")?e:`0x${e}`;if(!ks(t))throw Error(`[Privy] dataSuffix: Invalid suffix "${e}" is not valid hex`);let n=t.slice(2);return{id:gl,suffix:t,appendDataSuffix:({data:r})=>!r||r==="0x"?t:`${r}${n}`}}var TA=class{_privyInternal;_smartWalletConfig;constructor(t){this._privyInternal=t}getConfig(){return this._privyInternal.config}async getSmartWalletConfig(){return this._smartWalletConfig||=await this._privyInternal.fetch(Yw,{params:{app_id:this.appId}}),this._smartWalletConfig}get appId(){return this._privyInternal.appId}},$i=class K5{static parse(t){try{return new K5(t)}catch{return null}}value;_decoded;constructor(t){this.value=t,this._decoded=gu(t)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}get issuer(){return this._decoded.iss}get audience(){return this._decoded.aud}isExpired(t=0){return Date.now()>=(this.expiration-t)*1e3}},IA=class Ou{_storage;_privyInternal;constructor(t,n){this._privyInternal=t,this._storage=n}static providerAccessTokenStorageKey=t=>`privy:cross-app:${t}`;async updateOnCrossAppAuthentication(t,n){let r=n.access_token,i=Ou.providerAccessTokenStorageKey(t);await this._storage.put(i,r)}async getProviderAccessToken(t){let n=Ou.providerAccessTokenStorageKey(t),r=await this._storage.get(n);if(typeof r!="string")return null;try{if(new $i(r).isExpired())throw Error("JWT is expired");return r}catch{return await this._storage.del(n),null}}async getCrossAppConnections(){return await this._privyInternal.fetch(Jg,{params:{app_id:this._privyInternal.appId}})}},MA=class{_privyInternal;constructor(t){this._privyInternal=t}async revoke(){await this._privyInternal.fetch(vv,{})}},vo=class extends Error{name="PrivyApiError";error;code;status;constructor({error:t,code:n,status:r}){super(t),this.error=t,this.code=n,this.status=r}},se=class extends Error{error;code;constructor({error:t,code:n}){super(t),this.code=n,this.error=t}},PA=class extends Error{error;code;response;constructor({error:t,code:n,response:r}){super(t),this.code=n,this.error=t,this.response=r}};const Jn=e=>!!e.id&&e.recovery_method==="privy-v2",RA=["error","invalid_request_arguments","wallet_not_on_device","invalid_recovery_pin","insufficient_funds","mfa_timeout","missing_or_invalid_mfa","mfa_verification_max_attempts_reached"];(function(e){return e.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",e.INVALID_DATA="invalid_data",e.LINKED_TO_ANOTHER_USER="linked_to_another_user",e.ALLOWLIST_REJECTED="allowlist_rejected",e.OAUTH_USER_DENIED="oauth_user_denied",e.UNKNOWN_AUTH_ERROR="unknown_auth_error",e.USER_EXITED_AUTH_FLOW="exited_auth_flow",e.MUST_BE_AUTHENTICATED="must_be_authenticated",e.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",e.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",e.CLIENT_REQUEST_TIMEOUT="client_request_timeout",e.INVALID_CREDENTIALS="invalid_credentials",e})({});var OA=class extends Error{cause;privyErrorCode;constructor(t,n,r){super(t),n instanceof Error&&(this.cause=n),this.privyErrorCode=r}toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},No=class extends Error{type;constructor(t,n){super(n),this.type=t}},q5=class extends OA{type="connector_error";constructor(t,n,r){super(t,n,r)}},Kd=class extends Error{code;data;constructor(t,n,r){super(t),this.code=n,this.data=r}};const va={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1},E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Unlock your wallet and try again.",retryable:!0},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}};function NA(e){let t=e.type;return typeof t=="string"&&RA.includes(t)}function n1(e){return NA(e)&&e.type==="wallet_not_on_device"}async function Na(e,t){let n;if(t instanceof Uint8Array)n=Mt.base64.fromBytes(t);else{let i=tC(t);if(i===void 0)throw new se({error:"Failed to prepare the payload for signing",code:"invalid_input"});n=Mt.base64.fromBytes(Mt.utf8.toBytes(i))}let{signature:r}=await e({message:n});return{signature:r}}const Fa="privy-request-expiry",r1=1800*1e3;async function Xt(e,t,{wallet_id:n,headers:r,...i}){let a=e.getCompiledPath(Od,{params:{wallet_id:n}}),s=String(Date.now()+r1),{signature:o}=await Na(t,{version:1,url:a,method:Od.method,headers:{"privy-app-id":e.app.appId,[Fa]:s},body:{...i}});if(Date.now()>Number(s))throw new se({error:"Wallet request expired before it could be sent. Please try again.",code:"embedded_wallet_request_expired"});return await e.fetchPrivyRoute(Od,{body:i,params:{wallet_id:n},headers:{"privy-authorization-signature":o,[Fa]:s,...r??{}}})}function G5(e){return Ri(e)?jA(e):FA(e)}function FA(e){return{from:e.from,to:e.to??void 0,nonce:Jt(e.nonce),chain_id:Jt(e.chainId),data:VA(e.data),value:Jt(e.value),type:HA(e.type),gas_limit:Jt(e.gasLimit??e.gas),gas_price:Jt(e.gasPrice),max_fee_per_gas:Jt(e.maxFeePerGas),max_priority_fee_per_gas:Jt(e.maxPriorityFeePerGas)}}function jA(e){return{type:Ql,from:e.from,chain_id:Jt(e.chainId),nonce:Jt(e.nonce),nonce_key:Jt(e.nonceKey),gas_limit:Jt(e.gasLimit),max_fee_per_gas:Jt(e.maxFeePerGas),max_priority_fee_per_gas:Jt(e.maxPriorityFeePerGas),fee_token:e.feeToken,valid_after:Jt(e.validAfter),valid_before:Jt(e.validBefore),fee_payer_signature:UA(e.feePayerSignature),access_list:DA(e.accessList),calls:e.calls.map(t=>({to:t.to,data:t.data,value:Jt(t.value)}))}}function DA(e){if(e)return Array.isArray(e)?e.map(t=>"address"in t?{address:t.address,storage_keys:[...t.storageKeys]}:{address:t[0],storage_keys:[...t[1]]}):Object.entries(e).map(([t,n])=>({address:t,storage_keys:[...n]}))}function UA(e){if(!e)return;let t=WA(e);if(t!==0&&t!==1)throw Error("Tempo fee payer signatures require a valid yParity value");return{r:e.r,s:e.s,y_parity:t}}function WA(e){if(e.yParity!==void 0)return e.yParity;if(e.v!==void 0)return Number(e.v)-27}function VA(e){if(e!==void 0)return typeof e=="string"?ks(e)?e:ml(Ru(e)):ml(Buffer.from(Uint8Array.from(e)))}const Y5=[0,1,2,4];function HA(e){if(e==null)return;let t=Number(e);if(!ZA(t))throw Error(`Invalid transaction type: expected ${Y5.join(", ")} as a number or hex string, got "${e}".`);return t}function ZA(e){return Y5.includes(e)}function Jt(e){if(typeof e=="number"||typeof e=="bigint")return`0x${BigInt(e).toString(16)}`;if(typeof e=="string"){if(ks(e))return e;throw Error(`Invalid quantity string: expected a hex-prefixed value (0x…), got "${e}". Use a number, bigint, or hex string instead.`)}}function BA(e){return typeof e=="string"&&(e=JSON.parse(e)),{types:e.types,primary_type:String(e.primaryType),domain:e.domain,message:e.message}}async function Nu({context:e,account:t,rpcRequest:n}){switch(n.chainType){case"ethereum":return zA({context:e,account:t,rpcRequest:n.request});case"solana":return KA({context:e,account:t,rpcRequest:n.request})}}async function zA({context:e,account:t,rpcRequest:n}){switch(n.method){case"personal_sign":{let[r]=n.params,i=await Xt(e,e.signRequest,{chain_type:"ethereum",method:"personal_sign",wallet_id:t.id,params:r.startsWith("0x")?{message:r.slice(2),encoding:"hex"}:{message:r,encoding:"utf-8"}});if(i.method!=="personal_sign")throw Error("Unable to sign message");return{data:i.data.signature}}case"eth_signTransaction":{let[r]=n.params,i=await Xt(e,e.signRequest,{chain_type:"ethereum",method:"eth_signTransaction",wallet_id:t.id,params:{transaction:G5(r)}});if(i.method!=="eth_signTransaction")throw Error("Unable to sign transaction");return{data:i.data.signed_transaction}}case"eth_signTypedData_v4":{let[,r]=n.params,i=await Xt(e,e.signRequest,{chain_type:"ethereum",method:n.method,wallet_id:t.id,params:{typed_data:BA(r)}});if(i.method!=="eth_signTypedData_v4")throw Error("Unable to sign typed data");return{data:i.data.signature}}case"eth_sign":{let[,r]=n.params,i=await Xt(e,e.signRequest,{chain_type:"ethereum",method:"secp256k1_sign",wallet_id:t.id,params:{hash:ks(r)?r:ml(Ru(r))}});if(i.method!=="secp256k1_sign")throw Error("Unable to sign message");return{data:i.data.signature}}case"secp256k1_sign":{let[r]=n.params,i=await Xt(e,e.signRequest,{chain_type:"ethereum",method:"secp256k1_sign",wallet_id:t.id,params:{hash:ks(r)?r:ml(Ru(r))}});if(i.method!=="secp256k1_sign")throw Error("Unable to sign message");return{data:i.data.signature}}case"csw_signUserOperation":case"eth_sendTransaction":case"eth_populateTransactionRequest":throw Error(`This wallet does not support the method: ${n.method}`)}}async function KA({context:e,account:t,rpcRequest:n}){switch(n.method){case"signMessage":{let{message:r}=n.params,i=await Xt(e,e.signRequest,{chain_type:"solana",method:"signMessage",wallet_id:t.id,params:{message:r,encoding:"base64"}});if(i.method!=="signMessage")throw Error("Unable to sign message");return{data:i.data.signature}}case"signTransaction":{let{transaction:r}=n.params,i=await Xt(e,e.signRequest,{chain_type:"solana",method:"signTransaction",wallet_id:t.id,params:{transaction:r,encoding:"base64"}});if(i.method!=="signTransaction")throw Error("Unable to sign transaction");return{data:i.data.signed_transaction}}}}const kh=(e,t,n,r)=>{let i=Number(e),a=t.find(o=>o.id===i);if(!a)throw new q5(`Unsupported chainId ${e}`,4901);let s=GA(a,n,r.appId);if(i===Di.id||i===us.id){let o=i===Di.id?Di:us;return Ko({transport:ls(s),chain:o})}return Ko({transport:ls(s),chain:a})};function qA(e){return e===Di.id||e===us.id}const GA=(e,t,n)=>{let r=e.id,i=Number(e.id),a;if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])a=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[i])a=t.rpcUrls[i];else if(e.rpcUrls.privy?.http[0]){let s=new URL(e.rpcUrls.privy.http[0]);s.searchParams.append("privyAppId",n),a=s.toString()}else a=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!a)throw new q5(`No RPC url found for ${r}`);return a};function YA({currentRecoveryMethod:e,upgradeToRecoveryMethod:t}){switch(e){case"privy":case"user-passcode":case"recovery-encryption-key":return!0;case"icloud":case"google-drive":if(e===t)throw Error("Cannot upgrade to the existing cloud platform");return!0;default:throw Error("Unknown recovery method")}}const JA=new Set(["eth_sign","personal_sign","eth_signTypedData_v4","csw_signUserOperation","secp256k1_sign"]);var qd=class extends z3{_walletProxy;_privyInternal;_account;_entropyId;_entropyIdVerifier;_chainId;_chains;_onNeedsRecovery;_client;_appApi;_dataSuffixPlugin;constructor({walletProxy:t,privyInternal:n,account:r,entropyId:i,entropyIdVerifier:a,chains:s,onNeedsRecovery:o,chainId:l=s[0].id,appApi:c,dataSuffixPlugin:u}){super(),this._walletProxy=t,this._privyInternal=n,this._account=r,this._entropyId=i,this._entropyIdVerifier=a,this._chainId=l,this._chains=s,this._onNeedsRecovery=o,this._client=kh(l,s,{rpcUrls:[]},{appId:c.appId}),this._appApi=c,this._dataSuffixPlugin=u}async request(t){if(JA.has(t.method))return this.handleIFrameRpc(t);switch(t.method){case"eth_accounts":case"eth_requestAccounts":return this._account.address?[this._account.address]:[];case"eth_chainId":return`0x${this._chainId.toString(16)}`;case"wallet_switchEthereumChain":return this.handleSwitchEthereumChain(t);case"eth_estimateGas":return this.handleEstimateGas(t);case"eth_signTransaction":{let n=this.applyDataSuffix(t.params?.[0]);return this.handleSignTransaction(n)}case"eth_sendTransaction":{let n=this.applyDataSuffix(t.params?.[0]);return this.handleSendTransaction(n)}case"eth_populateTransactionRequest":{let n=t.params?.[0];return this.handlePopulateTransaction(n)}default:return this.handleJsonRpc(t)}}applyDataSuffix(t){if(!this._dataSuffixPlugin||Ri(t))return t;let n=typeof t.data=="string"?t.data:"0x";return{...t,data:this._dataSuffixPlugin.appendDataSuffix({data:n})}}ensureChainId(t){let n={chainId:this._chainId,...t};return this.internalSwitchEthereumChain(n.chainId),n}internalSwitchEthereumChain(t){!t||Number(t)===this._chainId||(this._chainId=Number(t),this._client=kh(this._chainId,this._chains,{rpcUrls:[]},{appId:this._privyInternal.appId}),this.emit("chainChanged",t))}async handlePopulateTransaction(t){let n=this.ensureChainId(t);if(Ri(n)){let s=Rp(n),o=Xv(await this.requireTempoClient().prepareTransactionRequest({account:n.from??this._account.address,...s}),n.gasLimit);return{...n,...o,type:Ql}}let r=nl(n),{gas:i,...a}=await this._client.prepareTransactionRequest({account:n.from??this._account.address,...r});return{...a,gasLimit:i,type:b5[a.type],authorizationList:n.authorizationList}}async handleSignTransaction(t){let n={...t};for(let r of Object.keys(n)){let i=n[r];typeof i=="bigint"&&(n[r]=En(i))}return Ri(n)&&(n.calls=n.calls.map(r=>({...r,value:typeof r.value=="bigint"?En(r.value):r.value}))),await this.handleIFrameRpc({method:"eth_signTransaction",params:[n]})}async handleSendTransaction(t){let n=await this.handlePopulateTransaction(t),r=await this.handleSignTransaction(n);return await this.handleJsonRpc({method:"eth_sendRawTransaction",params:[r]})}async handleEstimateGas(t){if(!t.params||!Array.isArray(t.params))throw Error("Invalid params for eth_estimateGas");let n=t.params?.[0],r=this.ensureChainId(n);if(Ri(r)){let a=Rp(r);return await this.requireTempoClient().estimateGas({account:r.from??this._account.address,...a})}let i=nl(r);return await this._client.estimateGas({account:r.from??this._account.address,...i})}handleSwitchEthereumChain(t){if(!t.params||!Array.isArray(t.params))throw new Kd(`Invalid params for ${t.method}`,4200);let n;if(typeof t.params[0]=="string")n=t.params[0];else if("chainId"in t.params[0]&&typeof t.params[0].chainId=="string")n=t.params[0].chainId;else throw new Kd(`Invalid params for ${t.method}`,4200);this.internalSwitchEthereumChain(n)}async handleIFrameRpc(t){try{let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("Missing privy token. User must be logged in");let r=this._account;if(Jn(r)){let{data:i}=await Nu({context:{app:this._appApi,fetchPrivyRoute:(...a)=>this._privyInternal.fetch(...a),getCompiledPath:(...a)=>this._privyInternal.getPath(...a),signRequest:({message:a})=>this._walletProxy.signWithUserSigner({accessToken:n,message:a})},account:r,rpcRequest:{chainType:"ethereum",request:t}});return i}try{await this._walletProxy.connect({entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier,accessToken:n})}catch(i){let a=n1(i);if(a&&this._account.recovery_method==="privy")await this._walletProxy.recover({entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier,accessToken:n});else if(a&&this._onNeedsRecovery){let s;await new Promise(async(o,l)=>{s=setTimeout(()=>l(new se({code:"embedded_wallet_recovery_error",error:"User-owned recovery timed out"})),12e4),await this._onNeedsRecovery?.({recoveryMethod:this._account.recovery_method,onRecovered:()=>o(!0)})}).finally(()=>clearTimeout(s))}else throw i}return(await this._walletProxy.rpcWallet({accessToken:n,request:t,entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier,hdWalletIndex:this._account.wallet_index,chainType:"ethereum"})).response.data}catch(n){console.error(n);let r=n instanceof Error?n.message:"Unable to make wallet request";throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_rpc_failed",{method:t.method,address:this._account.address,error:r}),new se({code:"embedded_wallet_request_error",error:r})}}async handleJsonRpc(t){return this._client.request(t)}requireTempoClient(){if(!qA(this._chainId))throw new Kd(`Cannot send a Tempo (type 118) transaction on chain ${this._chainId}`,4901);return this._client}toJSON(){return`PrivyEIP1193Provider { address: '${this._account.address}', chainId: ${this._chainId}, request: [Function] }`}};function Fu(e){return"version"in e}function XA(e,t){let n=(Fu(e)?e.message:e.compileMessage()).staticAccountKeys.find(r=>r.toBase58()===t);if(!n)throw Error(`Transaction does not contain public key ${t}`);return n}function QA({transaction:e,address:t}){let{messageBytes:n,signerAddresses:r}=J5(e),i=r.indexOf(t);if(i===-1)throw Error(`Transaction does not require a signature from ${t}`);return{messageBytes:new Uint8Array(n),signerIndex:i}}function eE({transaction:e,signerIndex:t,signature:n}){if(n.length!==64)throw Error("Solana signatures must be 64 bytes");let{signaturesOffset:r,signerAddresses:i}=J5(e);if(!Number.isInteger(t)||t<0||t>=i.length)throw Error(`Invalid signer index ${t}`);let a=new Uint8Array(e);return a.set(n,r+t*64),a}function J5(e){if(e.length===0)throw Error("Cannot decode an empty Solana transaction");return e[0]===129?tE(e):nE(e)}function tE(e){let t=$s(e,1),n=e.length-t*64;if(n<=41)throw Error("Malformed V1 Solana transaction");let r=e.subarray(0,n);if($s(r,41)<t)throw Error("Malformed V1 Solana transaction");return{messageBytes:r,signaturesOffset:n,signerAddresses:X5(r,42,t)}}function nE(e){let[t,n]=$h(e,0),r=n+t*64,i=$s(e,r),a=r;if(i&128){let c=i&-129;if(c!==0)throw Error(`Unsupported Solana transaction version ${c}`);a+=1}let s=$s(e,a);if(s!==t)throw Error("Solana transaction signature count does not match its message header");let[o,l]=$h(e,a+3);if(o<s)throw Error("Malformed Solana transaction");return{messageBytes:e.subarray(r),signaturesOffset:n,signerAddresses:X5(e,l,s)}}function $s(e,t){let n=e[t];if(n===void 0)throw Error("Malformed Solana transaction");return n}function $h(e,t){let n=0;for(let r=0;r<3;r++){let i=$s(e,t+r);if(n|=(i&127)<<7*r,!(i&128))return[n,t+r+1]}throw Error("Malformed Solana transaction")}function X5(e,t,n){if(t+n*32>e.length)throw Error("Malformed Solana transaction");return Array.from({length:n},(r,i)=>qa.encode(e.subarray(t+i*32,t+(i+1)*32)))}var rE=class{_proxy;_privyInternal;_app;_entropyId;_entropyIdVerifier;_account;_onNeedsRecovery;constructor({proxy:t,privyInternal:n,account:r,entropyId:i,entropyIdVerifier:a,onNeedsRecovery:s,app:o}){this._proxy=t,this._privyInternal=n,this._account=r,this._entropyId=i,this._entropyIdVerifier=a,this._onNeedsRecovery=s,this._app=o}async request(t){if(!await this._privyInternal.getAccessTokenInternal())throw new se({error:"Missing access token",code:"attempted_rpc_call_before_logged_in"});switch(t.method){case"signAndSendTransaction":return await this.handleSignAndSendTransaction(t);case"signTransaction":return await this.handleSignTransaction(t);default:return await this.handleIFrameRpc(t)}}get _publicKey(){return this._account.address}async connectAndRecover(t){if(this._account.recovery_method!=="privy-v2")try{await this._proxy.connect({entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier,accessToken:t})}catch(n){let r=n1(n);if(r&&this._account.recovery_method==="privy")await this._proxy.recover({entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier,accessToken:t});else if(r&&this._onNeedsRecovery){let i;await new Promise(async(a,s)=>{i=setTimeout(()=>s(new se({code:"embedded_wallet_recovery_error",error:"User-owned recovery timed out"})),12e4),await this._onNeedsRecovery?.({recoveryMethod:this._account.recovery_method,onRecovered:()=>a(!0)})}).finally(()=>clearTimeout(i))}else throw n}}walletRpcContext(t){return{app:this._app,fetchPrivyRoute:(...n)=>this._privyInternal.fetch(...n),getCompiledPath:(...n)=>this._privyInternal.getPath(...n),signRequest:({message:n})=>this._proxy.signWithUserSigner({accessToken:t,message:n})}}async signMessageRpc(t,n){let r=this._account;if(Jn(r)){let{data:i}=await Nu({context:this.walletRpcContext(n),account:r,rpcRequest:{chainType:"solana",request:t}});return{signature:i}}else return(await this._proxy.rpcWallet({accessToken:n,request:t,chainType:"solana",hdWalletIndex:this._account.wallet_index,entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier})).response.data}async signSerializedTransaction(t,n){let r=this._account;if(Jn(r)){let{data:o}=await Nu({context:this.walletRpcContext(n),account:r,rpcRequest:{chainType:"solana",request:{method:"signTransaction",params:{transaction:Mt.base64.fromBytes(t)}}}});return new Uint8Array(Mt.base64.toBytes(o))}let{messageBytes:i,signerIndex:a}=QA({transaction:t,address:r.address}),{signature:s}=await this.signMessageRpc({method:"signMessage",params:{message:Mt.base64.fromBytes(i)}},n);return eE({transaction:t,signerIndex:a,signature:Mt.base64.toBytes(s)})}async signTransactionObject(t,n){if(Fu(t)&&t.version===1)throw Error("V1 transactions cannot be serialized by web3.js. Pass the serialized transaction as a Uint8Array instead.");let r=XA(t,this._account.address),i=Fu(t)?Buffer.from(t.message.serialize()):t.serializeMessage(),{signature:a}=await this.signMessageRpc({method:"signMessage",params:{message:i.toString("base64")}},n);t.addSignature(r,Buffer.from(a,"base64"))}async handleIFrameRpc(t){try{let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("Missing privy token. User must be logged in");return await this.connectAndRecover(n),await this.signMessageRpc(t,n)}catch(n){console.error(n);let r=n instanceof Error?n.message:"Unable to make wallet request";throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_rpc_failed",{method:t.method,address:this._account.address,error:r}),new se({code:"embedded_wallet_request_error",error:r})}}async handleSignAndSendTransaction(t){try{let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("Missing privy token. User must be logged in");await this.connectAndRecover(n);let{transaction:r,connection:i,options:a}=t.params,s;return r instanceof Uint8Array?s=await this.signSerializedTransaction(r,n):(await this.signTransactionObject(r,n),s=r.serialize()),{signature:await i.sendRawTransaction(s,a)}}catch(n){console.error(n);let r=n instanceof Error?n.message:"Unable to make wallet request";throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_rpc_failed",{method:t.method,address:this._account.address,error:r}),new se({code:"embedded_wallet_request_error",error:r})}}async handleSignTransaction(t){try{let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("Missing privy token. User must be logged in");await this.connectAndRecover(n);let{transaction:r}=t.params;return r instanceof Uint8Array?{signedTransaction:await this.signSerializedTransaction(r,n)}:(await this.signTransactionObject(r,n),{signedTransaction:r})}catch(n){console.error(n);let r=n instanceof Error?n.message:"Unable to make wallet request";throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_rpc_failed",{method:t.method,address:this._account.wallet_index,error:r}),new se({code:"embedded_wallet_request_error",error:r})}}toJSON(){return`PrivyEmbeddedSolanaProvider { address: '${this._account.address}', request: [Function] }`}},iE=class{_proxy;_privyInternal;_account;_entropyId;_entropyIdVerifier;constructor({proxy:t,privyInternal:n,account:r,entropyId:i,entropyIdVerifier:a}){this._proxy=t,this._privyInternal=n,this._account=r,this._entropyId=i,this._entropyIdVerifier=a}async sign({message:t}){return await this.request({method:"sign",params:{message:new TextDecoder("utf8").decode(t)}})}async signTransaction({psbt:t}){return await this.request({method:"signTransaction",params:{psbt:t}})}async request(t){if(Jn(this._account))throw new se({code:"unsupported_wallet_type",error:"Bitcoin wallet providers are only supported for on-device execution and this app uses TEE execution. Use the useSignRawHash hook from @privy-io/expo/extended-chains to sign over a hash with this wallet. Learn more at https://docs.privy.io/recipes/tee-wallet-migration-guide"});if(!await this._privyInternal.getAccessTokenInternal())throw new se({error:"Missing access token",code:"attempted_rpc_call_before_logged_in"});return this.handleIFrameRpc(t)}async handleIFrameRpc(t){try{let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("Missing access token. User must be authenticated.");return(await this._proxy.rpcWallet({accessToken:n,request:t,entropyId:this._entropyId,entropyIdVerifier:this._entropyIdVerifier,hdWalletIndex:this._account.wallet_index,chainType:this._account.chain_type})).response.data}catch(n){console.error(n);let r=n instanceof Error?n.message:"Unable to make wallet request";throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_rpc_failed",{method:t.method,address:this._account.address,error:r}),new se({code:"embedded_wallet_request_error",error:r})}}toJSON(){return`PrivyEmbeddedBitcoinProvider { address: '${this._account.address}', request: [Function] }`}},aE=class{callbacks={};enqueue(t,n){this.callbacks[t]=n}flush(t){let n=Object.values(this.callbacks);this.callbacks={};for(let{reject:r}of n)r(t)}dequeue(t,n){let r=this.callbacks[n];if(!r)return console.warn(`[Privy] No callback found for "${t}" (id: ${n})`),null;switch(delete this.callbacks[n],t){case"privy:iframe:ready":return r;case"privy:wallets:create":return r;case"privy:user-signer:sign":return r;case"privy:wallets:add":return r;case"privy:wallets:set-recovery":return r;case"privy:wallets:connect":return r;case"privy:wallets:recover":return r;case"privy:wallets:rpc":return r;case"privy:wallets:import":return r;case"privy:wallet:create":return r;case"privy:wallet:connect":return r;case"privy:wallet:recover":return r;case"privy:wallet:rpc":return r;case"privy:solana-wallet:create":return r;case"privy:solana-wallet:create-additional":return r;case"privy:solana-wallet:connect":return r;case"privy:solana-wallet:recover":return r;case"privy:solana-wallet:rpc":return r;case"privy:delegated-actions:consent":return r;case"privy:mfa:verify":return r;case"privy:mfa:init-enrollment":return r;case"privy:mfa:submit-enrollment":return r;case"privy:mfa:unenroll":return r;case"privy:mfa:clear":return r;case"privy:auth:unlink-passkey":return r;default:throw Error(`invalid wallet event type ${t}`)}}};async function sE(e,t,n,r,i=!1,a,s){let o=i,l=async u=>o?(u===+!i?r():n.current?.reject(new No("missing_or_invalid_mfa","MFA verification failed, retry.")),await e(await new Promise((p,h)=>{t.current={resolve:p,reject:h},setTimeout(()=>{let f=new No("mfa_timeout","Timed out waiting for MFA code");n.current?.reject(f),h(f)},s)}))):await e(),c=null;for(let u=0;u<a;u++)try{c=await l(u),n.current?.resolve(void 0);break}catch(p){if(p.type==="missing_or_invalid_mfa")o=!0;else throw n.current?.resolve(void 0),p}if(c===null){let u=new No("mfa_verification_max_attempts_reached","Max MFA verification attempts reached");throw n.current?.reject(u),u}return c}function oE(e){return e.error!==void 0}const lE=(function(e){return()=>`id-${e++}`})(0),dE=(e,t)=>typeof t=="bigint"?t.toString():t,cE=(e,t)=>`${e}${JSON.stringify(t,dE)}`,Sr=async(e,{ms:t,msg:n})=>{let r,i=new Promise((a,s)=>{r=setTimeout(()=>{s(Error(n))},t??15e3)});try{return await Promise.race([e,i])}finally{r!==void 0&&clearTimeout(r)}},Gd=new aE;var Sh=class{ready;_waitForReadyPromise=null;cache;_embeddedWalletMessagePoster;mfa;constructor(e,t){this.ready=!1,this.cache=new Map,this._embeddedWalletMessagePoster=e,this.mfa=t}invokeWithMfa(e,t){return Sr(sE(n=>Sr(this.waitForReady().then(()=>e(n)),{msg:t.timeoutMsg,ms:t.timeoutMs}),this.mfa.rootPromise,this.mfa.submitPromise,()=>this.mfa.emit("mfaRequired"),t.mfaAlwaysRequired??!1,4,3e5),{msg:"Operation reached timeout: MFA verification",ms:126e4})}reload(){return this.ready=!1,this._waitForReadyPromise=null,Gd.flush(Error("Embedded wallet WebView was reloaded")),this.cache.clear(),this._embeddedWalletMessagePoster.reload()}onBackground(){this.ready=!1}ping(e=15e3){return Sr(this.invoke("privy:iframe:ready",{}),{msg:"Ping reached timeout",ms:e})}create(e){return Sr(this.waitForReady().then(()=>this.invoke("privy:wallet:create",e)),{msg:"Operation reached timeout: create"})}rpc(e){return this.invokeWithMfa(t=>this.invoke("privy:wallet:rpc",{...t,...e}),{timeoutMsg:"Operation reached timeout: rpc"})}createSolana(e){return this.invokeWithMfa(t=>this.invoke("privy:solana-wallet:create",{...t,...e}),{timeoutMsg:"Operation reached timeout: create",timeoutMs:6e4})}createAdditionalSolana(e){return Sr(this.waitForReady().then(()=>this.invoke("privy:solana-wallet:create-additional",e)),{msg:"Operation reached timeout: create"})}solanaRpc(e){return this.invokeWithMfa(t=>this.invoke("privy:solana-wallet:rpc",{...t,...e}),{timeoutMsg:"Operation reached timeout: solana-rpc"})}delegateWallets(e){return this.invokeWithMfa(t=>this.invoke("privy:delegated-actions:consent",{...t,...e}),{timeoutMsg:"Operation reached timeout: delegated-actions:consent"})}verifyMfa(e){return this.invokeWithMfa(t=>this.invoke("privy:mfa:verify",{...t,...e}),{timeoutMsg:"Operation reached timeout: mfa:verify",mfaAlwaysRequired:!0})}initEnrollMfa(e){return this.invokeWithMfa(t=>this.invoke("privy:mfa:init-enrollment",{...t,...e}),{timeoutMsg:"Operation reached timeout: mfa:init-enrollment"})}submitEnrollMfa(e){return e.method==="passkey"?this.invokeWithMfa(t=>this.invoke("privy:mfa:submit-enrollment",{...t,...e}),{timeoutMsg:"Operation reached timeout: mfa:submit-enrollment"}):Sr(this.waitForReady().then(()=>this.invoke("privy:mfa:submit-enrollment",e)),{msg:"Operation reached timeout: mfa:submit-enrollment"})}unenrollMfa(e){return this.invokeWithMfa(t=>this.invoke("privy:mfa:unenroll",{...t,...e}),{timeoutMsg:"Operation reached timeout: mfa:unenroll",mfaAlwaysRequired:!0})}unlinkPasskey(e){return this.invokeWithMfa(t=>this.invoke("privy:auth:unlink-passkey",{...t,...e}),{timeoutMsg:"Operation reached timeout: auth:unlink-passkey",mfaAlwaysRequired:!0})}clearMfa(e){return Sr(this.waitForReady().then(()=>this.invoke("privy:mfa:clear",e)),{msg:"Operation reached timeout: mfa:clear"})}createWallet(e){return this.invokeWithMfa(t=>this.invoke("privy:wallets:create",{...t,...e}),{timeoutMsg:"Operation reached timeout: create",timeoutMs:6e4})}signWithUserSigner(e){return this.invokeWithMfa(t=>this.invoke("privy:user-signer:sign",{...t,...e}),{timeoutMsg:"Operation reached timeout: user-signer:sign"})}addWallet(e){return Sr(this.waitForReady().then(()=>this.invoke("privy:wallets:add",e)),{msg:"Operation reached timeout: wallets:add"})}importWallet(e){return this.invokeWithMfa(t=>this.invoke("privy:wallets:import",{...t,...e}),{timeoutMsg:"Operation reached timeout: wallets:import",timeoutMs:6e4})}setRecovery(e){return this.invokeWithMfa(t=>this.invoke("privy:wallets:set-recovery",{...t,...e}),{timeoutMsg:"Operation reached timeout: wallets:set-recovery",timeoutMs:6e4})}connect(e){return Sr(this.waitForReady().then(()=>this.invoke("privy:wallets:connect",e)),{msg:"Operation reached timeout: wallets:connect"})}recover(e){return this.invokeWithMfa(t=>this.invoke("privy:wallets:recover",{...t,...e}),{timeoutMsg:"Operation reached timeout: wallets:recover",timeoutMs:6e4})}rpcWallet(e){return this.invokeWithMfa(t=>this.invoke("privy:wallets:rpc",{...t,...e}),{timeoutMsg:"Operation reached timeout: wallets:rpc"})}handleEmbeddedWalletMessages(e){if(!e.event.startsWith("privy:")){console.warn(`Unsupported event type: ${e.event}`);return}let t=Gd.dequeue(e.event,e.id);if(t)return oE(e)?t.reject(new No(e.error.type,e.error.message)):t.resolve(e.data)}waitForReady(){return this.ready?Promise.resolve():(this._waitForReadyPromise||=new Promise((e,t)=>{(async()=>{for(let n=0;n<100&&!this.ready;n++)this.invoke("privy:iframe:ready",{}).then(()=>{this.ready=!0,this._waitForReadyPromise=null,e()}).catch(()=>{}),await new Promise(r=>setTimeout(r,150));this.ready||(this._waitForReadyPromise=null,t(Error("Embedded wallet WebView failed to become ready")))})()}),this._waitForReadyPromise)}invoke(e,t){let n=cE(e,t);if(e==="privy:wallet:create"||e==="privy:solana-wallet:create"){let i=this.cache.get(n);if(i)return i}let r=new Promise((i,a)=>{let s=lE();Gd.enqueue(s,{resolve:i,reject:a}),this._embeddedWalletMessagePoster.postMessage(JSON.stringify({id:s,event:e,data:t}),"*")}).finally(()=>{this.cache.delete(n)});return this.cache.set(n,r),r}};async function Q5(e,{request:t,headers:n}){return await e.fetchPrivyRoute(w5,{body:t,headers:n})}async function Yd({context:e,chainType:t,idempotencyKey:n}){return{wallet:await Q5(e,{request:{chain_type:t,owner_id:void 0},headers:n?{"privy-idempotency-key":n}:void 0})}}var uE=class{_privyInternal;_proxy;_chains=Array.from(Ya);_mfa;_mfaPromises;_appApi;_dataSuffixPlugin;constructor(e,t,n,r,i,a,s){if(this._privyInternal=e,t&&(this._proxy=new Sh(t,i),r.setProxy(this._proxy)),n){let o=_5(n);this._chains=o}this._mfa=r,this._mfaPromises=i,this._appApi=a,this._dataSuffixPlugin=s}setMessagePoster(e){this._proxy=new Sh(e,this._mfaPromises),this._mfa.setProxy(this._proxy)}async signWithUserSigner(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let t=await this._privyInternal.getAccessTokenInternal();if(!t)throw new se({error:"User must be logged in to sign a message with the user signer",code:"user_signer_sign_error"});let{signature:n}=await this._proxy.signWithUserSigner({accessToken:t,message:e.message});return{signature:n}}async add(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(this._privyInternal.config?.embedded_wallet_config.mode==="user-controlled-server-wallets-only")await Yd({context:{app:this._appApi,fetchPrivyRoute:(...n)=>this._privyInternal.fetch(...n),getCompiledPath:(...n)=>this._privyInternal.getPath(...n)},chainType:e.chainType});else{if(!e.entropyId)throw new se({error:"Missing entropy details for wallet creation",code:"embedded_wallet_creation_error"});let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw new se({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});await this._proxy.addWallet({accessToken:n,...e})}let{user:t}=await this._privyInternal.refreshSession();return{user:t}}async getBitcoinProvider({wallet:e,entropyId:t,entropyIdVerifier:n,recoveryPassword:r,recoveryAccessToken:i,recoverySecretOverride:a}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(!await this._privyInternal.getAccessTokenInternal())throw Error("User must be logged in to create an embedded wallet");return Jn(e)||await this._load({entropyId:t,entropyIdVerifier:n,wallet:e,recoveryPassword:r,recoveryAccessToken:i,recoverySecretOverride:a}),new iE({account:e,privyInternal:this._privyInternal,proxy:this._proxy,entropyId:t,entropyIdVerifier:n})}async create({password:e,recoveryMethod:t,recoveryToken:n,recoveryKey:r,recoverySecretOverride:i,iCloudRecordNameOverride:a,solanaAccount:s,skipCallbacks:o,idempotencyKey:l}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(this._privyInternal.config?.embedded_wallet_config.mode==="user-controlled-server-wallets-only"){if(t&&!t.startsWith("privy"))throw new se({error:"User-controlled server wallets do not support custom recovery methods",code:"embedded_wallet_creation_error"});await Yd({context:{app:this._appApi,fetchPrivyRoute:(...c)=>this._privyInternal.fetch(...c),getCompiledPath:(...c)=>this._privyInternal.getPath(...c)},chainType:"ethereum",idempotencyKey:l})}else{let c;if(c=t||(e?"user-passcode":"privy"),e&&typeof e!="string")throw Error("Invalid recovery password, must be a string");if(c==="privy"&&this._privyInternal.config?.embedded_wallet_config.require_user_password_on_create)throw Error("Password not provided yet is required by App configuration");let u=await this._privyInternal.getAccessTokenInternal();if(!u)throw Error("User must be logged in to create an embedded wallet");let{address:p}=await this._proxy.create({accessToken:u,recoveryMethod:c,recoveryKey:r,recoveryPassword:e,recoveryAccessToken:n,recoverySecretOverride:i,iCloudRecordNameOverride:a,solanaAddress:s?.address});if(!p)throw Error("Failed to create wallet")}return await this._privyInternal.refreshSession(o)}async importWallet({privateKey:e,chainType:t,additionalSigners:n}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let r=this._privyInternal.config?.embedded_wallet_config.mode==="user-controlled-server-wallets-only"?"tee":"on-device";if(n&&r==="on-device")throw new se({error:"Specifying additionalSigners is only supported for TEE execution and this app uses on-device execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide",code:"invalid_input"});let i=await this._privyInternal.getAccessTokenInternal();if(!i)throw new se({error:"User must be logged in to import an embedded wallet",code:"embedded_wallet_before_logged_in"});let{address:a}=await this._proxy.importWallet({accessToken:i,privateKey:e,chainType:t,mode:r,additionalSigners:n});if(!a)throw new se({error:"Failed to import wallet",code:"embedded_wallet_creation_error"});let{session_update_action:s,...o}=await this._privyInternal.refreshSession();return{address:a,user:o}}async createSolana(e){if(!this._proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_creation_error"});if(this._privyInternal.config?.embedded_wallet_config.mode==="user-controlled-server-wallets-only")await Yd({context:{app:this._appApi,fetchPrivyRoute:(...t)=>this._privyInternal.fetch(...t),getCompiledPath:(...t)=>this._privyInternal.getPath(...t)},chainType:"solana",idempotencyKey:e?.idempotencyKey});else{let t=await this._privyInternal.getAccessTokenInternal();if(!t)throw new se({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});e?.ethereumAccount&&await this.getProvider(e.ethereumAccount);let{publicKey:n}=await this._proxy.createSolana({accessToken:t,ethereumAddress:e?.ethereumAccount?.address});if(!n)throw new se({error:"Failed to create wallet",code:"embedded_wallet_creation_error"})}return await this._privyInternal.refreshSession()}async delegateWallets({delegatedWallets:e,rootWallet:t}){if(!this._proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_creation_error"});let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw new se({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});await this._proxy.delegateWallets({accessToken:n,delegatedWallets:e,rootWallet:t})}async getProvider(e,t,n,r,i){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return Jn(e)||await this._load({wallet:e,entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier",recoveryPassword:t,recoveryKey:i,recoveryAccessToken:n,recoverySecretOverride:r}),new qd({account:e,entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,appApi:this._appApi,dataSuffixPlugin:this._dataSuffixPlugin})}async getEthereumProvider({wallet:e,entropyId:t,entropyIdVerifier:n,recoveryPassword:r,recoveryAccessToken:i,recoverySecretOverride:a,recoveryKey:s,onNeedsRecovery:o}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(!await this._privyInternal.getAccessTokenInternal())throw Error("User must be logged in to create an embedded wallet");return Jn(e)||(!o||r||i||a||s)&&await this._load({entropyId:t,entropyIdVerifier:n,wallet:e,recoveryPassword:r,recoveryAccessToken:i,recoverySecretOverride:a,recoveryKey:s}),new qd({account:e,entropyId:t,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,onNeedsRecovery:o,appApi:this._appApi,dataSuffixPlugin:this._dataSuffixPlugin})}async getSolanaProvider(e,t,n,r,i,a,s){if(!this._proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});return Jn(e)||(!s||r||i||a)&&await this._load({wallet:e,entropyId:t,entropyIdVerifier:n,recoveryPassword:r,recoveryAccessToken:i,recoverySecretOverride:a}),new rE({account:e,privyInternal:this._privyInternal,proxy:this._proxy,entropyId:t,entropyIdVerifier:n,onNeedsRecovery:s,app:this._appApi})}async setRecovery(e){let{wallet:t,...n}=e;if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(Jn(t))throw new se({error:"This wallet does not support setting recovery methods",code:"unsupported_recovery_method"});YA({currentRecoveryMethod:t.recovery_method,upgradeToRecoveryMethod:n.recoveryMethod==="icloud-native"?"icloud":n.recoveryMethod}),await this._load(t.chain_type==="solana"?{wallet:t,entropyId:t.address,entropyIdVerifier:"solana-address-verifier"}:{wallet:t,entropyId:t.address,entropyIdVerifier:"ethereum-address-verifier"});let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw Error("User must be logged in to interact with embedded wallets");let i=t.recovery_method;this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_started",{address:t.address,target_recovery_method:n.recoveryMethod,existing_recovery_method:i});try{let a;if(n.recoveryMethod==="user-passcode")a={recoveryMethod:"user-passcode",recoveryPassword:n.password};else if(n.recoveryMethod==="google-drive")a={recoveryMethod:"google-drive",recoveryAccessToken:n.recoveryAccessToken};else if(n.recoveryMethod==="icloud")a={recoveryMethod:"icloud",recoveryAccessToken:n.recoveryAccessToken};else if(n.recoveryMethod==="icloud-native")a={recoveryMethod:"icloud-native",iCloudRecordNameOverride:n.iCloudRecordNameOverride,recoverySecretOverride:n.recoverySecretOverride};else if(n.recoveryMethod==="recovery-encryption-key")a={recoveryMethod:"recovery-encryption-key",recoveryKey:n.recoveryKey};else if(n.recoveryMethod==="privy")a={recoveryMethod:"privy"};else throw Error(`Unknown recovery method: ${n.recoveryMethod}`);await this._proxy.setRecovery({accessToken:r,entropyId:t.address,entropyIdVerifier:t.chain_type==="solana"?"solana-address-verifier":"ethereum-address-verifier",...a}),this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_completed",{address:t.address,target_recovery_method:n.recoveryMethod,existing_recovery_method:i});let{user:s}=await this._privyInternal.refreshSession();return{user:s,provider:t.chain_type==="ethereum"?new qd({account:t,entropyId:t.address,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,appApi:this._appApi,dataSuffixPlugin:this._dataSuffixPlugin}):null}}catch(a){throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_failed",{address:t.address,recovery_method:t.recovery_method,error:a instanceof Error?a.message:"Unable to recover wallet"}),a}}getURL(){let e=new URL(`${this._privyInternal.baseUrl}/apps/${this._privyInternal.appId}/embedded-wallets`);return this._privyInternal.caid&&e.searchParams.append("caid",this._privyInternal.caid),this._privyInternal.appClientId&&e.searchParams.append("client_id",this._privyInternal.appClientId),e.href}get chains(){return this._chains}onMessage(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return this._proxy.handleEmbeddedWalletMessages(e)}reload(){if(!this._proxy){this._privyInternal.logger.warn("Attempted to reload proxy before initialized");return}this._proxy.reload()}onBackground(){this._proxy?.onBackground()}async ping(e){try{if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return await this._proxy.ping(e),!0}catch(t){return this._privyInternal.logger.debug(t),!1}}async _load({entropyId:e,entropyIdVerifier:t,wallet:n,recoveryPassword:r,recoveryKey:i,recoveryAccessToken:a,recoverySecretOverride:s}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let o=await this._privyInternal.getAccessTokenInternal();if(!o)throw Error("User must be logged in to interact with embedded wallets");try{return await this._proxy.connect({accessToken:o,entropyId:e,entropyIdVerifier:t}),e}catch(l){if(n1(l)){try{if(n.recovery_method==="privy"){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:n.address,recovery_method:n.recovery_method});let c=await this._proxy.recover({accessToken:o,entropyId:e,entropyIdVerifier:t});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:n.address,recovery_method:n.recovery_method}),c.entropyId}if(n.recovery_method==="user-passcode"&&r){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:n.address,recovery_method:n.recovery_method});let c=await this._proxy.recover({accessToken:o,recoveryPassword:r,entropyId:e,entropyIdVerifier:t});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:n.address,recovery_method:n.recovery_method}),c.entropyId}if(["google-drive","icloud"].includes(n.recovery_method)&&a){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:n.address,recovery_method:n.recovery_method});let c=await this._proxy.recover({accessToken:o,recoveryAccessToken:a,entropyId:e,entropyIdVerifier:t});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:n.address,recovery_method:n.recovery_method}),c.entropyId}if(n.recovery_method==="icloud"&&s){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:n.address,recovery_method:"icloud-native"});let c=await this._proxy.recover({accessToken:o,recoverySecretOverride:s,entropyId:e,entropyIdVerifier:t});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:n.address,recovery_method:"icloud-native"}),c.entropyId}if(n.recovery_method==="recovery-encryption-key"&&i){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:n.address,recovery_method:n.recovery_method});let c=await this._proxy.recover({accessToken:o,recoveryKey:i,entropyId:e,entropyIdVerifier:t});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:n.address,recovery_method:n.recovery_method}),c.entropyId}}catch(c){throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_failed",{address:n.address,recovery_method:n.recovery_method,error:c instanceof Error?c.message:`Unable to recover wallet: ${e}`}),c}throw l}else throw l}}},pE=class extends z3{rootPromise;submitPromise;constructor(){super(),this.rootPromise={current:null},this.submitPromise={current:null}}};const hE=["chrome-extension:","moz-extension:","safari-web-extension:"];let Co=!1;const e4=()=>{if(Co)return!0;try{let e=globalThis,t=e.chrome?.runtime?.id??e.browser?.runtime?.id,n=e.location?.protocol;Co=typeof t=="string"&&t.length>0||typeof n=="string"&&hE.includes(n)}catch{Co=!0}return Co},Lt={get(e){return Vd.get(e)},set(e,t,n){e4()||Vd.set(e,t,n)},remove(e){Vd.remove(e)}},t4=({useServerCookies:e,cookieWriteBehavior:t})=>e||t==="never"?!1:!e4(),_o="privy:active-user",Jd="privy:saved-users",u2=e=>e?`privy:${e}:token`:"privy:token",p2=e=>e?`privy:${e}:pat`:"privy:pat",h2=e=>e?`privy:${e}:refresh_token`:"privy:refresh_token",f2=e=>e?`privy:${e}:id-token`:"privy:id-token",Xd=e=>e?`privy-${e}-token`:"privy-token",Qd=e=>e?`privy-${e}-refresh-token`:"privy-refresh-token",ec=e=>e?`privy-${e}-id-token`:"privy-id-token",y2=e=>e?`privy-${e}-session`:"privy-session",m2=Promise.allSettled.bind(Promise)??(e=>Promise.all(e.map(t=>t.then(n=>({status:"fulfilled",value:n})).catch(n=>({status:"rejected",reason:n}))))),fE=["storage_cleared","token_cleared","refresh_token_cleared","identity_token_cleared","token_stored","refresh_token_stored","identity_token_stored","oauth_tokens_granted","error_storing_tokens"];var yE=class extends z3{static events=fE;_storage;_isUsingServerCookies=!1;_cookieWriteBehavior;GUEST_CREDENTIAL_STORAGE_KEY;_setStoredUsers;_hasEmittedStoredUsers=!1;constructor(e){super(),this._storage=e.storage,this._isUsingServerCookies=e.isUsingServerCookies,this._cookieWriteBehavior=e.cookieWriteBehavior,this.GUEST_CREDENTIAL_STORAGE_KEY=`privy:guest:${e.appId}`,this._setStoredUsers=e.setStoredUsers}set isUsingServerCookies(e){this._isUsingServerCookies=e}shouldWriteCookies(){return t4({useServerCookies:this._isUsingServerCookies,cookieWriteBehavior:this._cookieWriteBehavior})}writeCookie(e,t,n){this.shouldWriteCookies()&&Lt.set(e,t,n)}setStoredUsersCallback(e){this._setStoredUsers=e,this.getSavedUserIds().then(t=>{this._hasEmittedStoredUsers||this._setStoredUsers?.({users:t.map(n=>({id:n}))})})}async getCustomerAccessToken(){let e=await this.getActiveUserId(),t=await this._storage.get(u2(e));try{return typeof t=="string"?new $i(t).value:null}catch(n){return console.error(n),await this.destroyLocalState({reason:"getToken_error"}),null}}async getPrivyAccessToken(){let e=await this.getActiveUserId(),t=await this._storage.get(p2(e));try{return typeof t=="string"?new $i(t).value:null}catch(n){return console.error(n),await this.destroyLocalState({reason:"getToken_error"}),null}}async getRefreshToken(){let e=await this.getActiveUserId(),t=await this._storage.get(h2(e));return typeof t=="string"?t:null}async getIdentityToken(){let e=await this.getActiveUserId(),t=await this._storage.get(f2(e));return typeof t=="string"?t:null}async mightHaveServerCookies(){try{let e=await this.getActiveUserId(),t=Lt.get(y2(e));if(t!==void 0&&t.length>0)return!0;let n=Lt.get(y2(null));return n!==void 0&&n.length>0}catch(e){console.error(e)}return!1}async hasRefreshCredentials(e,t){return await this.mightHaveServerCookies()||typeof e=="string"&&typeof t=="string"}tokenIsActive(e){if(!e)return!1;let t=$i.parse(e);return t!==null&&!t.isExpired(30)}async destroyLocalState(e){let t=await this.getActiveUserId(),n=[this._storage.del(u2(null)),this._storage.del(p2(null)),this._storage.del(h2(null)),this._storage.del(f2(null)),this._storage.del(this.GUEST_CREDENTIAL_STORAGE_KEY),this._storage.del(_o)];t&&n.push(this._storage.del(u2(t)),this._storage.del(p2(t)),this._storage.del(h2(t)),this._storage.del(f2(t)),this.removeSavedUserId(t)),await m2(n),Lt.remove(Xd(null)),Lt.remove(Qd(null)),Lt.remove(ec(null)),Lt.remove(y2(null)),t&&(Lt.remove(Xd(t)),Lt.remove(Qd(t)),Lt.remove(ec(t)),Lt.remove(y2(t))),e?.reason&&this.emit("storage_cleared",{reason:e.reason})}async storeCustomerAccessToken(e){let t=await this.getActiveUserId();await this.storeCustomerAccessTokenForUser(t,e)}async storeCustomerAccessTokenForUser(e,t){let n=u2(e),r=Xd(e);if(typeof t=="string"){let i=await this._storage.get(n);await this._storage.put(n,t);let a=$i.parse(t)?.expiration;this.writeCookie(r,t,{sameSite:"Strict",secure:!0,expires:a?new Date(a*1e3):void 0}),i!==t&&this.emit("token_stored",{cookiesEnabled:this._isUsingServerCookies})}else{let i=await this._storage.get(n);await this._storage.del(n),Lt.remove(r),i!==null&&this.emit("token_cleared",{reason:"set_with_non_string_value"})}}async storePrivyAccessToken(e){let t=await this.getActiveUserId();await this.storePrivyAccessTokenForUser(t,e)}async storePrivyAccessTokenForUser(e,t){let n=p2(e);typeof t=="string"?await this._storage.put(n,t):await this._storage.del(n)}async storeRefreshTokenForUser(e,t){let n=h2(e),r=Qd(e),i=y2(e);typeof t=="string"?(await this._storage.put(n,t),this.writeCookie(i,"t",{sameSite:"Strict",secure:!0,expires:30}),this.writeCookie(r,t,{sameSite:"Strict",secure:!0,expires:30}),this.emit("refresh_token_stored",{cookiesEnabled:this._isUsingServerCookies})):(await this._storage.del(n),Lt.remove(r),Lt.remove(i),this.emit("refresh_token_cleared",{reason:"set_with_non_string_value"}))}async updateWithTokensResponse(e){let t=e.user.id,n=(await m2([this.storeCustomerAccessTokenForUser(t,e.token),this.storePrivyAccessTokenForUser(t,e.privy_access_token),this.storeRefreshTokenForUser(t,e.refresh_token),this.storeIdentityTokenForUser(t,e.identity_token)])).filter(a=>a.status==="rejected");if(n.length>0){this.emit("error_storing_tokens",n.map(a=>String(a.reason)).join(", "));return}let r=(await m2([this.storeCustomerAccessTokenForUser(null,e.token),this.storePrivyAccessTokenForUser(null,e.privy_access_token),this.storeRefreshTokenForUser(null,e.refresh_token),this.storeIdentityTokenForUser(null,e.identity_token)])).filter(a=>a.status==="rejected");if(r.length>0){this.emit("error_storing_tokens",r.map(a=>String(a.reason)).join(", "));return}await this.storeActiveUserId(t);let i=(await m2([this.processOAuthTokens(e.oauth_tokens)])).filter(a=>a.status==="rejected");i.length>0&&this.emit("error_storing_tokens",i.map(a=>String(a.reason)).join(", "))}async backfillLegacySession(){if(await this.getActiveUserId())return;let[e,t,n,r]=await Promise.all([this._storage.get(u2(null)),this._storage.get(p2(null)),this._storage.get(h2(null)),this._storage.get(f2(null))]);if(typeof e!="string"||typeof n!="string")return;let i=$i.parse(e)?.subject;if(typeof i!="string"||i.length===0)return;let a=[this.storeCustomerAccessTokenForUser(i,e),this.storeRefreshTokenForUser(i,n)];typeof t=="string"&&a.push(this.storePrivyAccessTokenForUser(i,t)),typeof r=="string"&&a.push(this.storeIdentityTokenForUser(i,r));let s=(await m2(a)).filter(o=>o.status==="rejected");if(s.length>0){this.emit("error_storing_tokens",s.map(o=>String(o.reason)).join(", "));return}await this.storeActiveUserId(i)}async processOAuthTokens(e){e&&this.emit("oauth_tokens_granted",e)}async storeIdentityToken(e){let t=await this.getActiveUserId();await this.storeIdentityTokenForUser(t,e)}async storeIdentityTokenForUser(e,t){let n=f2(e),r=ec(e);if(typeof t=="string"){let i=await this._storage.get(n);await this._storage.put(n,t);let a=$i.parse(t)?.expiration;this.writeCookie(r,t,{sameSite:"Strict",secure:!0,expires:a?new Date(a*1e3):void 0}),i!==t&&this.emit("identity_token_stored",{cookiesEnabled:this._isUsingServerCookies})}else{let i=await this._storage.get(n);await this._storage.del(n),Lt.remove(r),i!==null&&this.emit("identity_token_cleared",{reason:"set_with_non_string_value"})}}async getOrCreateGuestCredential(){let e=await this._storage.get(this.GUEST_CREDENTIAL_STORAGE_KEY);if(e&&typeof e=="string")return e;let t=Mt.base64urlnopad.fromBytes(crypto.getRandomValues(new Uint8Array(32)));return await this._storage.put(this.GUEST_CREDENTIAL_STORAGE_KEY,t),t}async getActiveUserId(){let e=await this._storage.get(_o);return typeof e=="string"?e:null}async storeActiveUserId(e){let t=await this.getSavedUserIds();await this.storeSavedUserIds([...t,e]),await this._storage.put(_o,e)}async getSavedUserIds(){let e=await this._storage.get(Jd);if(typeof e!="string")return[];try{let t=JSON.parse(e),n=Array.isArray(t)?t.filter(r=>typeof r=="string"):[];return[...new Set(n)]}catch{return[]}}async storeSavedUserIds(e){let t=[...new Set(e)];t.length>0?await this._storage.put(Jd,JSON.stringify(t)):await this._storage.del(Jd),this._setStoredUsers&&(this._hasEmittedStoredUsers=!0,this._setStoredUsers({users:t.map(n=>({id:n}))}))}async removeSavedUserId(e){let t=await this.getSavedUserIds();await this.storeSavedUserIds(t.filter(n=>n!==e))}async switchActiveUserId(e){if(!(await this.getSavedUserIds()).includes(e))throw new se({code:"invalid_input",error:"Cannot switch active user because the user ID is not saved on this device"});await this._storage.put(_o,e)}};const mE=e=>{let t=new AbortController,n=e.filter(i=>!!i),r=()=>{for(let i of n)i.removeEventListener("abort",r);t.abort(n.find(i=>i.aborted)?.reason)};if(n.some(i=>i.aborted))r();else for(let i of n)i.addEventListener("abort",r);return t.signal},Th=e=>{let t=new AbortController;return setTimeout(()=>t.abort(),e),t.signal};function gE(e){let t=new URLSearchParams;for(let n in e)e[n]!=null&&t.append(n,String(e[n]));return Array.from(t).length?"?"+t.toString():""}const bo=()=>{},Jr={NONE:-1/0,ERROR:1,WARN:2,INFO:3,DEBUG:1/0},wE=({level:e,logger:t})=>({get level(){return e},error:Jr[e]>=Jr.ERROR?t.error:bo,warn:Jr[e]>=Jr.WARN?t.warn:bo,info:Jr[e]>=Jr.INFO?t.info:bo,debug:Jr[e]>=Jr.DEBUG?t.debug:bo}),tc="privy:caid";var vE=class{baseUrl;callbacks;appId;appClientId;logger;session;_config;_analyticsId;_storage;_sdkVersion="js-sdk-core:0.78.0";_fetch;nativeAppIdentifier;_crypto;isMultiUserModeEnabled;_cache=new Map;constructor(e){this.logger=wE({level:e.logger?.level??e.logLevel??"ERROR",logger:e.logger??console}),this._storage=e.storage,this._crypto=e.crypto,this._analyticsId=null,this._getOrGenerateClientAnalyticsId(),this.baseUrl=e.baseUrl??"https://auth.privy.io",this.appId=e.appId,this.appClientId=e.appClientId,this._sdkVersion=e.sdkVersion??this._sdkVersion,this.callbacks=e.callbacks,this.nativeAppIdentifier=e.nativeAppIdentifier,this.isMultiUserModeEnabled=e.isMultiUserModeEnabled,this.session=new yE({storage:this._storage,isUsingServerCookies:!1,cookieWriteBehavior:e.cookieWriteBehavior,appId:e.appId,setStoredUsers:e.callbacks?.setStoredUsers}),this._fetch=HC(globalThis.fetch),this.session.on("error_storing_tokens",t=>{this.createAnalyticsEvent("error_updating_tokens_in_storage",{reason:t})})}setCallbacks(e){this.callbacks={...this.callbacks,...e},this.session.setStoredUsersCallback(this.callbacks?.setStoredUsers)}get isReady(){return!!this._config}get config(){return this._config}get caid(){return this._analyticsId}async _initialize(){if(this.isReady){this.callbacks?.setIsReady?.(!0);return}if(!await this.isStorageAccessible())throw new se({code:"storage_error",error:"Unable to access storage"});this._config=await this.getAppConfig(),this._config?.custom_api_url&&(this.baseUrl=this._config.custom_api_url,this.session.isUsingServerCookies=!0),this.isMultiUserModeEnabled&&await this.session.backfillLegacySession(),this.callbacks?.setIsReady?.(!0),this._sdkVersion.startsWith("js-sdk-core:")&&this.createAnalyticsEvent("sdk_initialize",{})}getPath(e,{params:t,query:n}){return`${this.baseUrl}${qw(e.path,t)}${gE(n)}`}async fetchWithoutAuthentication(e,t){if(!this.isMultiUserModeEnabled)throw new se({code:"invalid_input",error:'Unauthenticated requests require sessions.mode to be set to "multi-user"'});return this.fetch(e,{...t,onRequest:this._beforeRequestWithoutAuth.bind(this)})}async fetchForLogin(e,t){return this.isMultiUserModeEnabled?this.fetchWithoutAuthentication(e,t):this.fetch(e,t)}async fetch(e,{body:t,params:n,query:r,headers:i,signal:a,onRequest:s=this._beforeRequest.bind(this)}){let o=new Request(this.getPath(e,{params:n,query:r}),{method:e.method,body:JSON.stringify(t),headers:i}),l=await s(o);a&&(l.signal=mE([a,l.signal]));let c=await this._fetch(o,l),u=await c.json();if(c.status>299)throw new vo({...u,status:c.status});return u}async fetchRaw(e,{body:t,params:n,query:r,headers:i,onRequest:a=this._beforeRequest.bind(this)}){let s=new Request(this.getPath(e,{params:n,query:r}),{method:e.method,body:JSON.stringify(t),headers:i}),o=await a(s),l=await this._fetch(s,o);if(l.status>299)throw new vo({...await l.json().catch(()=>({})),status:l.status});return l}async _beforeRequestWithoutInitialize(e){let t=await this.session.getPrivyAccessToken()??await this.session.getCustomerAccessToken(),n=new Headers(e.headers);n.set("privy-app-id",this.appId),this.appClientId&&n.set("privy-client-id",this.appClientId),n.set("privy-client",this._sdkVersion),t&&n.set("Authorization",`Bearer ${t}`),n.set("Content-Type","application/json"),n.set("Accept","application/json");let r=await this._getOrGenerateClientAnalyticsId();return r&&n.set("privy-ca-id",r),this.nativeAppIdentifier&&n.set("x-native-app-identifier",this.nativeAppIdentifier),{signal:Th(2e4),headers:n,credentials:"include"}}async beforeRequestWithoutRefresh(e){return await this._initialize(),this._beforeRequestWithoutInitialize(e)}async _beforeRequestWithoutAuth(e){await this._initialize();let t=new Headers(e.headers);t.set("privy-app-id",this.appId),this.appClientId&&t.set("privy-client-id",this.appClientId),t.set("privy-client",this._sdkVersion),t.set("Content-Type","application/json"),t.set("Accept","application/json");let n=await this._getOrGenerateClientAnalyticsId();return n&&t.set("privy-ca-id",n),this.nativeAppIdentifier&&t.set("x-native-app-identifier",this.nativeAppIdentifier),{signal:Th(2e4),headers:t}}async _beforeRequest(e){return await this._initialize(),await this.getAccessTokenInternal(),this.beforeRequestWithoutRefresh(e)}async getAppConfig(){return await this.fetch(qg,{params:{app_id:this.appId},onRequest:this._beforeRequestWithoutInitialize.bind(this)})}async _getOrGenerateClientAnalyticsId(){if(this._analyticsId)return this._analyticsId;try{let e=await this._storage.get(tc);if(typeof e=="string"&&e.length>0)return this._analyticsId=e,e}catch(e){this.logger.error("Unable to load clientId",e)}try{this._analyticsId=this._crypto.randomUUID()}catch(e){this.logger.error("Unable to generate uuidv4",e)}if(this._analyticsId){try{await this._storage.put(tc,this._analyticsId)}catch(e){this.logger.error(`Unable to store clientId: ${this._analyticsId}`,e)}return this._analyticsId}}async destroyClientAnalyticsId(){try{return await this._storage.del(tc)}catch(e){this.logger.error("Unable to delete clientId",e)}}async createAnalyticsEvent(e,t){try{await this.fetch(Kg,{body:{event_name:e,client_id:await this._getOrGenerateClientAnalyticsId(),payload:t},onRequest:this.beforeRequestWithoutRefresh.bind(this)})}catch{}}async refreshSession(e=!1){if(!await this.isStorageAccessible())throw new se({code:"storage_error",error:"Unable to access storage"});let t=await this.session.getRefreshToken()??void 0,n=t??"key",r=this._cache.get(n);if(r)return this.logger.debug("[privy:refresh] found in-flight session refresh request, deduping"),await r;let i=this._refreshSession(t,e);this._cache.set(n,i);try{return await i}finally{this._cache.delete(n)}}async _refreshSession(e,t){let n=await this.session.getCustomerAccessToken();if(!await this.session.hasRefreshCredentials(n,e??null))throw this.logger.debug("[privy:refresh] missing tokens, skipping request"),await this._initialize(),new vo({code:Au.MISSING_OR_INVALID_TOKEN,error:"No tokens found in storage",status:401});try{this.logger.debug(`[privy:refresh] fetching: ${Mp.path}`);let r=await this.fetch(Mp,{body:{refresh_token:e},onRequest:this.beforeRequestWithoutRefresh.bind(this)}),i=r.session_update_action;return this.logger.debug(`[privy:refresh] response: ${i}`),i==="set"&&(await this.session.updateWithTokensResponse(r),this.logger.debug("[privy:refresh] tokens stored")),i==="clear"&&(await this.session.destroyLocalState(),this.logger.debug("[privy:refresh] tokens cleared"),!t&&this.callbacks?.setUser?.(null)),i==="ignore"&&(r.token&&(await this.session.storeCustomerAccessToken(r.token),this.logger.debug("[privy:refresh] token stored (CAT)")),r.privy_access_token&&(await this.session.storePrivyAccessToken(r.privy_access_token),this.logger.debug("[privy:refresh] token stored (PAT)")),r.identity_token&&(this.logger.debug("[privy:refresh] token stored (IDT)"),await this.session.storeIdentityToken(r.identity_token))),this.logger.debug("[privy:refresh] returning response"),!t&&this.callbacks?.setUser?.(r.user),r}catch(r){throw this.logger.debug(`[privy:refresh] error: ${r.message??"unknown error"}`),r instanceof vo&&r.code===Au.MISSING_OR_INVALID_TOKEN&&(await this.session.destroyLocalState(),!t&&this.callbacks?.setUser?.(null)),r}}async getAccessToken(){let[e,t]=await Promise.all([this.session.getCustomerAccessToken(),this.session.getRefreshToken()]);if(e&&!this.session.tokenIsActive(e)&&await this.session.hasRefreshCredentials(e,t)){let n=await this.refreshSession(),r=await this.session.getCustomerAccessToken();return n.token||this.logger.debug("[privy:getAccessToken] expected token received null"),n.token===e&&this.logger.debug("[privy:getAccessToken] expected new token in response received existing"),r===e&&this.logger.debug("[privy:getAccessToken] expected new token in storage received existing"),n.token??r}return e&&!this.session.tokenIsActive(e)?(this.logger.debug("[privy:getAccessToken] unable to refresh inactive token"),this.callbacks?.setUser?.(null),await this.session.destroyLocalState(),null):e}async getAccessTokenInternal(){let e=await this.getAccessToken();return await this.session.getPrivyAccessToken()??e}async getIdentityToken(){return await this.session.getIdentityToken()}async isStorageAccessible(){try{let e=`privy:__storage__test-${this._crypto.randomUUID()}`,t="blobby";await this._storage.put(e,t);let n=await this._storage.get(e);return await this._storage.del(e),n===t}catch(e){return this.logger.error(e),!1}}},CE=class{_privyInternal;_embedded;_isMultiUserModeEnabled;constructor(e,t,n){this._privyInternal=e,this._embedded=t,this._isMultiUserModeEnabled=n}async get(){let{user:e}=await this._privyInternal.refreshSession();return{user:e}}async acceptTerms(){return{user:await this._privyInternal.fetch(av,{})}}async refreshUser(){let{user:e,identity_token:t}=await this._privyInternal.fetch(gv,{});return await this._privyInternal.session.storeIdentityToken(t),this._privyInternal.callbacks?.setUser?.(e),{user:e}}async switchActiveUser(e){if(!this._isMultiUserModeEnabled)throw new se({code:"invalid_input",error:'User switching requires sessions.mode to be set to "multi-user"'});await this._privyInternal.session.switchActiveUserId(e.userId);try{this._embedded.reload();let{user:t}=await this._privyInternal.refreshSession(!0);if(t.id!==e.userId)throw new se({code:"invalid_input",error:"Cannot switch active user because the refreshed user did not match the requested user ID"});return this._privyInternal.callbacks?.setUser?.(t),{user:t}}catch(t){throw await this._privyInternal.session.destroyLocalState(),this._privyInternal.callbacks?.setUser?.(null),t}}};const n4=e=>e.type==="wallet"&&e.wallet_client_type==="privy"&&e.connector_type==="embedded",i1=e=>e?e.linked_accounts.filter(n4).filter(t=>t.chain_type==="ethereum").sort((t,n)=>t.wallet_index-n.wallet_index):[],ju=e=>i1(e).find(t=>t.wallet_index===0)??null,a1=e=>e?e.linked_accounts.filter(n4).filter(t=>t.chain_type==="solana").sort((t,n)=>t.wallet_index-n.wallet_index):[],r4=e=>a1(e).find(t=>t.wallet_index===0)??null,_E=(e,t)=>t==="off"||i1(e).length>0?!1:e.linked_accounts.filter(n=>n.type==="wallet"&&n.chain_type==="ethereum").length>0?t==="all-users":!0,bE=(e,t)=>t==="off"||a1(e).length>0?!1:e.linked_accounts.filter(n=>n.type==="wallet"&&n.chain_type==="solana").length>0?t==="all-users":!0,nc=(e,t)=>({...e,is_new_user:t.is_new_user,oauth_tokens:t.oauth_tokens}),Fn=async(e,t,n)=>{let r=_E(t.user,n?.ethereum?.createOnLogin??"off"),i=bE(t.user,n?.solana?.createOnLogin??"off");if(r&&i){let a=await e.create({recoveryMethod:"privy",skipCallbacks:!0}),s=await e.createSolana({ethereumAccount:ju(a.user)??void 0});return nc(s,t)}if(r){let a=await e.create({recoveryMethod:"privy",solanaAccount:r4(t.user)??void 0});return nc(a,t)}if(i){let a=await e.createSolana({ethereumAccount:ju(t.user)??void 0});return nc(a,t)}return t};var LE=class{_privyInternal;_embedded;constructor(e,t){this._privyInternal=e,this._embedded=t}async syncWithToken(e,t,n){let r=await this._privyInternal.fetchForLogin(Xg,{body:{token:e,mode:n}});await this._privyInternal.session.updateWithTokensResponse(r);let i=await Fn(this._embedded,r,t?.embedded);return this._privyInternal.callbacks?.setUser?.(i.user),i}async linkWithToken(e){await this._privyInternal.fetch(Qg,{body:{token:e}});let t=await this._privyInternal.refreshSession();return{user:t.user,identity_token:t.identity_token}}},AE=class{_privyInternal;_embedded;constructor(e,t){this._privyInternal=e,this._embedded=t}async sendCode(e,t){return this._privyInternal.fetch($w,{body:{email:e,token:t}})}async loginWithCode(e,t,n,r){let i=await this._privyInternal.fetchForLogin(kw,{body:{email:e,code:t,mode:n}});await this._privyInternal.session.updateWithTokensResponse(i);let a=await Fn(this._embedded,i,r?.embedded);return this._privyInternal.callbacks?.setUser?.(a.user),a}async linkWithCode(e,t){await this._privyInternal.fetch(Sw,{body:{email:e,code:t}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}async updateEmail({oldEmailAddress:e,newEmailAddress:t,code:n}){await this._privyInternal.fetch(Iw,{body:{oldAddress:e,newAddress:t,code:n}});let r=await this._privyInternal.refreshSession();return{user:r.user,identity_token:r.identity_token}}async unlink(e){await this._privyInternal.fetch(Tw,{body:{address:e}});let t=await this._privyInternal.refreshSession();return{user:t.user,identity_token:t.identity_token}}},EE=class{_privyInternal;_embedded;constructor(e,t){this._privyInternal=e,this._embedded=t}async initializeAuth({relyingParty:e,redirectUrl:t,token:n}){return await this._privyInternal.fetch(ew,{body:{relying_party:e,redirect_url:t,token:n}})}async getFarcasterStatus({channel_token:e}){return await this._privyInternal.fetch(iw,{headers:{"farcaster-channel-token":e}})}async authenticate({channel_token:e,message:t,signature:n,fid:r,mode:i},a){let s=await this._privyInternal.fetchForLogin(tw,{body:{channel_token:e,message:t,signature:n,fid:r,mode:i}});await this._privyInternal.session.updateWithTokensResponse(s);let o=await Fn(this._embedded,s,a?.embedded);return this._privyInternal.callbacks?.setUser?.(o.user),o}async link({channel_token:e,message:t,signature:n,fid:r}){await this._privyInternal.fetch(nw,{body:{channel_token:e,message:t,signature:n,fid:r}});let i=await this._privyInternal.refreshSession();return{user:i.user,identity_token:i.identity_token}}async unlink({fid:e}){await this._privyInternal.fetch(rw,{body:{fid:e}});let t=await this._privyInternal.refreshSession();return{user:t.user,identity_token:t.identity_token}}},xE=class{_privyInternal;_embedded;constructor(e,t){this._privyInternal=e,this._embedded=t}async initializeAuth(){return await this._privyInternal.fetch(aw,{body:{}})}async authenticate({message:e,signature:t,fid:n},r){let i=await this._privyInternal.fetchForLogin(sw,{body:{message:e,signature:t,fid:n}});await this._privyInternal.session.updateWithTokensResponse(i);let a=await Fn(this._embedded,i,r?.embedded);return this._privyInternal.callbacks?.setUser?.(a.user),a}},kE=class{_privyInternal;_embedded;constructor(e,t){this._privyInternal=e,this._embedded=t}async create(e){let t=await this._privyInternal.session.getOrCreateGuestCredential(),n=await this._privyInternal.fetch(ow,{body:{guest_credential:t}});await this._privyInternal.session.updateWithTokensResponse(n);let r=await Fn(this._embedded,n,e?.embedded);return this._privyInternal.callbacks?.setUser?.(r.user),r}};const ri="privy:state_code",ii="privy:code_verifier";async function $E(e,t){let n=await t("SHA-256",new TextEncoder().encode(e));return new Uint8Array(n)}function SE(e){return crypto.getRandomValues(new Uint8Array(e))}function s1(){return Mt.base64urlnopad.fromBytes(SE(36))}function i4(){return s1()}async function a4({codeVerifier:e,method:t="S256",digest:n}){if(t=="S256"){let r=await $E(e,n);return Mt.base64urlnopad.fromBytes(r)}else return e}var TE=class{_privyInternal;_storage;_crypto;_embedded;constructor(e,t,n,r){this._privyInternal=e,this._embedded=t,this._storage=n,this._crypto=r}async generateURL(e,t){let n=s1(),r=i4(),i=await a4({codeVerifier:n,digest:this._crypto.digest});return await Promise.all([this._storage.put(ii,n),this._storage.put(ri,r)]),this._privyInternal.fetchForLogin(ww,{body:{redirect_to:t,provider:e,code_challenge:i,state_code:r}})}async loginWithCode(e,t,n,r,i,a){let[s,o]=await Promise.all([this._storage.get(ii),this._storage.get(ri)]);if(o!==t)throw this._privyInternal.createAnalyticsEvent("possible_phishing_attempt",{flow:"oauth",provider:n,storedStateCode:o??"",returnedStateCode:t??""}),new se({code:"pkce_state_code_mismatch",error:"Unexpected auth flow. This may be a phishing attempt."});let l=await this._privyInternal.fetchForLogin(gw,{body:{authorization_code:e,code_type:r,state_code:o,code_verifier:s,mode:i}});await this._privyInternal.session.updateWithTokensResponse(l);let c=await Fn(this._embedded,l,a?.embedded);return await Promise.all([this._storage.del(ii),this._storage.del(ri)]),this._privyInternal.callbacks?.setUser?.(c.user),c}async linkWithCode(e,t,n,r){let[i,a]=await Promise.all([this._storage.get(ii),this._storage.get(ri)]);if(a!==t)throw this._privyInternal.createAnalyticsEvent("possible_phishing_attempt",{flow:"oauth",provider:n,storedStateCode:a??"",returnedStateCode:t??""}),new se({code:"pkce_state_code_mismatch",error:"Unexpected auth flow. This may be a phishing attempt."});let s=await this._privyInternal.fetch(vw,{body:{authorization_code:e,code_type:r,state_code:a,code_verifier:i}});await this._privyInternal.session.processOAuthTokens(s.oauth_tokens);let o=await this._privyInternal.refreshSession();return await Promise.all([this._storage.del(ii),this._storage.del(ri)]),{user:o.user,identity_token:o.identity_token}}async unlink(e,t){await this._privyInternal.fetch(Cw,{body:{provider:e,subject:t}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}},IE=class{_privyInternal;_embedded;constructor(e,t){this._privyInternal=e,this._embedded=t}async generateRegistrationOptions(e){return await this._privyInternal.fetch(xw,{body:{relying_party:e}})}async generateAuthenticationOptions(e){return await this._privyInternal.fetch(Aw,{body:{relying_party:e}})}async generateSignupOptions(e){return await this._privyInternal.fetch(Ew,{body:{relying_party:e}})}async loginWithPasskey(e,t,n,r){let i=await this._privyInternal.fetchForLogin(bw,{body:{relying_party:n,challenge:t,authenticator_response:this._transformAuthenticationResponseToSnakeCase(e)}});await this._privyInternal.session.updateWithTokensResponse(i);let a=await Fn(this._embedded,i,r?.embedded);return this._privyInternal.callbacks?.setUser?.(a.user),a}async signupWithPasskey(e,t,n){let r=await this._privyInternal.fetchForLogin(Lw,{body:{relying_party:t,authenticator_response:this._transformRegistrationResponseToSnakeCase(e)}});await this._privyInternal.session.updateWithTokensResponse(r);let i=await Fn(this._embedded,r,n?.embedded);return this._privyInternal.callbacks?.setUser?.(i.user),i}async linkWithPasskey(e,t){await this._privyInternal.fetch(_w,{body:{relying_party:t,authenticator_response:this._transformRegistrationResponseToSnakeCase(e)}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}_transformRegistrationResponseToSnakeCase(e){return{type:e.type,id:e.id,raw_id:e.rawId,response:{client_data_json:e.response.clientDataJSON,attestation_object:e.response.attestationObject,authenticator_data:e.response.authenticatorData||void 0,transports:e.response.transports||void 0,public_key:e.response.publicKey||void 0,public_key_algorithm:e.response.publicKeyAlgorithm||void 0},authenticator_attachment:e.authenticatorAttachment||void 0,client_extension_results:{app_id:e.clientExtensionResults.appid||void 0,cred_props:e.clientExtensionResults.credProps||void 0,hmac_create_secret:e.clientExtensionResults.hmacCreateSecret||void 0}}}_transformAuthenticationResponseToSnakeCase(e){return{type:e.type,id:e.id,raw_id:e.rawId,response:{signature:e.response.signature,client_data_json:e.response.clientDataJSON,authenticator_data:e.response.authenticatorData,user_handle:e.response.userHandle||void 0},authenticator_attachment:e.authenticatorAttachment||void 0,client_extension_results:{app_id:e.clientExtensionResults.appid||void 0,cred_props:e.clientExtensionResults.credProps||void 0,hmac_create_secret:e.clientExtensionResults.hmacCreateSecret||void 0}}}},ME=class{_privyInternal;_embedded;constructor(t,n){this._privyInternal=t,this._embedded=n}async sendCode(t,n){return this._privyInternal.fetch(Pw,{body:{phoneNumber:t,token:n}})}async loginWithCode(t,n,r,i){let a=await this._privyInternal.fetchForLogin(Mw,{body:{phoneNumber:t,code:n,mode:r}});await this._privyInternal.session.updateWithTokensResponse(a);let s=await Fn(this._embedded,a,i?.embedded);return this._privyInternal.callbacks?.setUser?.(s.user),s}async linkWithCode(t,n){await this._privyInternal.fetch(Rw,{body:{phoneNumber:t,code:n}});let r=await this._privyInternal.refreshSession();return{user:r.user,identity_token:r.identity_token}}async updatePhone({oldPhoneNumber:t,newPhoneNumber:n,code:r}){await this._privyInternal.fetch(Nw,{body:{old_phone_number:t,new_phone_number:n,code:r}});let i=await this._privyInternal.refreshSession();return{user:i.user,identity_token:i.identity_token}}async unlink(t){await this._privyInternal.fetch(Ow,{body:{phoneNumber:t}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}},PE=class{_privyInternal;_embedded;_wallet=void 0;_preparedMessage;constructor(t,n){this._privyInternal=t,this._embedded=n}async unlinkWallet(t){await this._privyInternal.fetch(ev,{body:{address:t}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}async linkWithSiwe(t,n,r){let i=n||this._wallet,a=r||this._preparedMessage;if(!i)throw Error("A wallet must be provided in the init step or as an argument to linkWithSiwe");if(!a)throw Error("A message must be generated and signed before being used to link a wallet to privy");await this._privyInternal.fetch(Xw,{body:{message:a,signature:t,chainId:i.chainId,walletClientType:i.walletClientType??null,connectorType:i.connectorType??null}});let s=await this._privyInternal.refreshSession();return{user:s.user,identity_token:s.identity_token}}async loginWithSiwe(t,n,r,i,a){let s=n||this._wallet,o=r||this._preparedMessage;if(!s)throw Error("A wallet must be provided in the init step or as an argument to loginWithSiwe");if(!o)throw Error("A message must be generated and signed before being used to login to privy with a wallet");let l=await this._privyInternal.fetchForLogin(Jw,{body:{signature:t,message:o,chainId:s.chainId,walletClientType:s.walletClientType??null,connectorType:s.connectorType??null,mode:i}});await this._privyInternal.session.updateWithTokensResponse(l);let c=await Fn(this._embedded,l,a?.embedded);return this._privyInternal.callbacks?.setUser?.(c.user),c}async init(t,n,r){this._wallet=t;let{nonce:i}=await this._privyInternal.fetch(g5,{body:{address:t.address}}),a=RE({chainId:t.chainId.toString().replace("eip155:",""),address:t.address,issuedAt:new Date().toISOString(),statement:"By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.",domain:n,nonce:i,uri:r});return this._preparedMessage=a,{nonce:i,message:a}}};function RE(e){return`${e.domain} wants you to sign in with your Ethereum account:
|
|
18
|
+
${e.address}
|
|
19
|
+
|
|
20
|
+
${e.statement}
|
|
21
|
+
|
|
22
|
+
URI: ${e.uri}
|
|
23
|
+
Version: 1
|
|
24
|
+
Chain ID: ${e.chainId}
|
|
25
|
+
Nonce: ${e.nonce}
|
|
26
|
+
Issued At: ${e.issuedAt}
|
|
27
|
+
Resources:
|
|
28
|
+
- https://privy.io`}var OE=class{_privyInternal;_embedded;constructor(t,n){this._privyInternal=t,this._embedded=n}async unlink({address:t}){await this._privyInternal.fetch(iv,{body:{address:t}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}async link({message:t,signature:n,walletClientType:r,connectorType:i}){await this._privyInternal.fetch(rv,{body:{message:t,signature:n,walletClientType:r??null,connectorType:i??null}});let a=await this._privyInternal.refreshSession();return{user:a.user,identity_token:a.identity_token}}async login({mode:t,message:n,signature:r,walletClientType:i,connectorType:a,opts:s}){let o=await this._privyInternal.fetchForLogin(nv,{body:{signature:r,message:n,walletClientType:i??null,connectorType:a??null,mode:t}});await this._privyInternal.session.updateWithTokensResponse(o);let l=await Fn(this._embedded,o,s?.embedded);return this._privyInternal.callbacks?.setUser?.(l.user),l}async fetchNonce({address:t}){let{nonce:n}=await this._privyInternal.fetch(tv,{body:{address:t}});return{nonce:n}}},NE=class{_privyInternal;constructor(t){this._privyInternal=t}async link(t,n,r,i){await this._privyInternal.fetch(Qw,{body:{message:t,signature:n,smart_wallet_type:r,smart_wallet_version:i}});let a=await this._privyInternal.refreshSession();return{user:a.user,identity_token:a.identity_token}}async init(t){let{nonce:n}=await this._privyInternal.fetch(g5,{body:{address:t.address}});return{nonce:n,message:FE({chainId:t.chainId.toString().replace("eip155:",""),address:t.address,issuedAt:new Date().toISOString(),statement:"By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.",domain:"privy.io",uri:"https://auth.privy.io",nonce:n})}}};function FE(e){return`${e.domain} wants you to sign in with your Ethereum account:
|
|
29
|
+
${e.address}
|
|
30
|
+
|
|
31
|
+
${e.statement}
|
|
32
|
+
|
|
33
|
+
URI: ${e.uri}
|
|
34
|
+
Version: 1
|
|
35
|
+
Chain ID: ${e.chainId}
|
|
36
|
+
Nonce: ${e.nonce}
|
|
37
|
+
Issued At: ${e.issuedAt}
|
|
38
|
+
Resources:
|
|
39
|
+
- https://privy.io`}var jE=class{_privyInternal;_embedded;constructor(t,n){this._privyInternal=t,this._embedded=n}async authenticate({telegramWebAppData:t,telegramAuthResult:n,captchaToken:r,mode:i="login-or-sign-up"},a){let s=await this._privyInternal.fetchForLogin(sv,{body:{telegram_web_app_data:t,telegram_auth_result:n,captcha_token:r,mode:i}});await this._privyInternal.session.updateWithTokensResponse(s);let o=await Fn(this._embedded,s,a?.embedded);return this._privyInternal.callbacks?.setUser?.(o.user),o}async link({telegramWebAppData:t,telegramAuthResult:n,captchaToken:r}){await this._privyInternal.fetch(ov,{body:{telegram_web_app_data:t,telegram_auth_result:n,captcha_token:r}});let i=await this._privyInternal.refreshSession();return{user:i.user,identity_token:i.identity_token}}async unlink({telegramUserId:t}){await this._privyInternal.fetch(lv,{body:{telegram_user_id:t}});let n=await this._privyInternal.refreshSession();return{user:n.user,identity_token:n.identity_token}}},DE=class{_privyInternal;_mfa;customProvider;phone;email;oauth;siwe;siws;smartWallet;passkey;farcaster;farcasterV2;guest;telegram;constructor(t,n,r,i,a){this._privyInternal=t,this._mfa=a,this.customProvider=new LE(this._privyInternal,n),this.phone=new ME(this._privyInternal,n),this.email=new AE(this._privyInternal,n),this.oauth=new TE(this._privyInternal,n,r,i),this.guest=new kE(this._privyInternal,n),this.siwe=new PE(this._privyInternal,n),this.siws=new OE(this._privyInternal,n),this.smartWallet=new NE(this._privyInternal),this.passkey=new IE(this._privyInternal,n),this.farcaster=new EE(this._privyInternal,n),this.farcasterV2=new xE(this._privyInternal,n),this.telegram=new jE(this._privyInternal,n)}async logout(t){let n=await this._prepareSessionRevocation();await Promise.all([this._privyInternal.session.destroyLocalState({reason:"logout"}),this._privyInternal.destroyClientAnalyticsId(),t?.userId&&this._mfa.clearMfa({userId:t.userId})]),this._privyInternal.callbacks?.setUser?.(null),n&&this._privyInternal.fetch(Gw,{body:{refresh_token:n.refresh_token},onRequest:()=>n.init}).catch(()=>{console.warn("Error destroying session")})}async _prepareSessionRevocation(){try{let t=await this._privyInternal.beforeRequestWithoutRefresh(new Request(this._privyInternal.baseUrl));return{refresh_token:await this._privyInternal.session.getRefreshToken()??void 0,init:t}}catch{console.warn("Error preparing session revocation");return}}},UE=class{_privyInternal;constructor(t){this._privyInternal=t}async initOnRampSession(t){return await this._privyInternal.fetch(Gg,{body:t})}async getStatus(t){return await this._privyInternal.fetch(Yg,{query:{partnerUserId:t}})}};const WE={prod:{url:"https://api.moonpay.com/v1",key:"pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL"},sandbox:{url:"https://api.moonpay.com/v1",key:"pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI"}},VE=new Set([br.id,zr.id,qr.id,Lr.id,Kr.id,V3.id,Ja.id]),HE=new Set([br.id,zr.id,aa.id,qr.id,Lr.id,Kr.id]);function hV(e,t){switch(t){case"native-currency":return VE.has(e);case"USDC":return HE.has(e);default:return console.warn("Unknown asset passed to MoonPay Onramp"),!1}}function fV(e,t){switch(e){case zr.id:return t==="native-currency"?"ETH_ARBITRUM":"USDC_ARBITRUM";case Kr.id:return t==="native-currency"?"AVAX_CCHAIN":"USDC_CCHAIN";case qr.id:return t==="native-currency"?"ETH_BASE":"USDC_BASE";case V3.id:return"CELO_CELO";case Lr.id:return t==="native-currency"?"MATIC_POLYGON":"USDC_POLYGON";case Ja.id:return"MON_MON";case br.id:return t==="native-currency"?"ETH_ETHEREUM":"USDC_ETHEREUM";default:return console.warn(`Chain ${e} not supported by Moonpay, defaulting to Ethereum mainnet`),"ETH_ETHEREUM"}}var ZE=class{_privyInternal;constructor(t){this._privyInternal=t}async sign(t){return await this._privyInternal.fetch(dv,{body:t})}async getTransactionStatus({transactionId:t,useSandbox:n}){let{url:r,key:i}=WE[n?"sandbox":"prod"],a=await qC(fetch,{retries:3,retryDelay:500})(`${r}/transactions/ext/${t}?apiKey=${i}`);if(!a.ok)throw new PA({error:`Failed to fetch transaction status for Transaction ${t}`,code:"failed_to_fetch_moonpay_transaction_status",response:a});let s=await a.json();return Array.isArray(s)?s.at(0):void 0}},BE=class{moonpay;coinbase;constructor(t){this.moonpay=new ZE(t),this.coinbase=new UE(t)}},zE=class{_privyInternal;constructor(t){this._privyInternal=t}async generateAuthenticationOptions(t){return await this._privyInternal.fetch(lw,{body:t})}},KE=class{_privyInternal;constructor(t){this._privyInternal=t}async sendCode(t){return await this._privyInternal.fetch(dw,{body:t})}},qE=class{privyInternal;proxy;sms;passkey;constructor(t,n){this.proxy=n,this.privyInternal=t,this.sms=new KE(t),this.passkey=new zE(t)}setProxy(t){this.proxy=t}async getAccessTokenInternal(){let t=await this.privyInternal.getAccessTokenInternal();if(!t)throw new se({error:"Missing access token",code:"attempted_rpc_call_before_logged_in"});return t}async verifyMfa(){if(!this.proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});return await this.proxy.verifyMfa({accessToken:await this.getAccessTokenInternal()})}async initEnrollMfa(t){if(!this.proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});return await this.proxy.initEnrollMfa({...t,accessToken:await this.getAccessTokenInternal()})}async submitEnrollMfa(t){if(!this.proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});let n=await this.proxy.submitEnrollMfa({...t,accessToken:await this.getAccessTokenInternal()}),r=await this.privyInternal.refreshSession();if(r.user.mfa_methods.length===0)try{await this.proxy.clearMfa({userId:r.user.id})}catch{}return n}async unenrollMfa(t){if(!this.proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});let n=await this.proxy.unenrollMfa({method:t,accessToken:await this.getAccessTokenInternal()}),r=await this.privyInternal.refreshSession();if(r.user.mfa_methods.length===0)try{await this.proxy.clearMfa({userId:r.user.id})}catch{}return n}async unlinkPasskey({credentialId:t,removeAsMfa:n}){if(!this.proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});await this.proxy.unlinkPasskey({credentialId:t,removeAsMfa:n,accessToken:await this.getAccessTokenInternal()});let r=await this.privyInternal.refreshSession();if(r.user.mfa_methods.length===0)try{await this.proxy.clearMfa({userId:r.user.id})}catch{}}async clearMfa(t){if(!this.proxy)throw new se({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});return await this.proxy.clearMfa(t)}},GE=class{_privyInternal;constructor(t){this._privyInternal=t}async init(t){return this._privyInternal.fetch(Uw,{body:{client_type:t}})}async getICloudConfiguration(t){return this._privyInternal.fetch(Ww,{body:{client_type:t}})}},YE=class{_privyInternal;_storage;_crypto;constructor(t,n,r){this._privyInternal=t,this._storage=n,this._crypto=r}async generateURL(t){let n=s1(),r=i4(),i=await a4({codeVerifier:n,digest:this._crypto.digest});return await Promise.all([this._storage.put(ii,n),this._storage.put(ri,r)]),this._privyInternal.fetch(jw,{body:{redirect_to:t,code_challenge:i,state_code:r}})}async authorize(t,n){let[r,i]=await Promise.all([this._storage.get(ii),this._storage.get(ri)]);if(i!==n)throw this._privyInternal.createAnalyticsEvent("possible_phishing_attempt",{flow:"recovery_oauth",storedStateCode:i??"",returnedStateCode:n??""}),new se({code:"pkce_state_code_mismatch",error:"Unexpected auth flow. This may be a phishing attempt."});let a=await this._privyInternal.fetch(Dw,{body:{authorization_code:t,state_code:i,code_verifier:r}});return await Promise.all([this._storage.del(ii),this._storage.del(ri)]),a}},JE=class{_privyInternal;auth;icloudAuth;constructor(t,n,r){this._privyInternal=t,this.auth=new YE(this._privyInternal,n,r),this.icloudAuth=new GE(this._privyInternal)}async getRecoveryKeyMaterial(t,n){return this._privyInternal.fetch(Fw,{body:{chain_type:n},params:{address:t}})}},XE=class{plugins;auth;user;embeddedWallet;recovery;mfa;app;mfaPromises;funding;delegated;crossApp;isMultiUserModeEnabled;_privyInternal;constructor({clientId:t,sessions:n,plugins:r=[],...i}){let a=kA(i.crypto);this.isMultiUserModeEnabled=n?.mode==="multi-user",this.plugins=[...r],this._privyInternal=new vE({...i,appClientId:t,crypto:a,isMultiUserModeEnabled:this.isMultiUserModeEnabled,cookieWriteBehavior:n?.cookieWriteBehavior}),this.mfa=new qE(this._privyInternal),this.mfaPromises=new pE,this.app=new TA(this._privyInternal),this.embeddedWallet=new uE(this._privyInternal,i.embeddedWalletMessagePoster,i.supportedChains,this.mfa,this.mfaPromises,this.app,$A(this.plugins)),this.user=new CE(this._privyInternal,this.embeddedWallet,n?.mode==="multi-user"),this.auth=new DE(this._privyInternal,this.embeddedWallet,i.storage,a,this.mfa),this.recovery=new JE(this._privyInternal,i.storage,a),this.funding=new BE(this._privyInternal),this.delegated=new MA(this._privyInternal),this.crossApp=new IA(this._privyInternal,i.storage)}async initialize(){await this._privyInternal._initialize()}setMessagePoster(t){this.embeddedWallet.setMessagePoster(t)}addOAuthTokensListener(t){return this._privyInternal.session.on("oauth_tokens_granted",t),{unsubscribe:()=>{this._privyInternal.session.removeListener("oauth_tokens_granted",t)}}}setCallbacks(t){this._privyInternal.setCallbacks(t)}getAccessToken(){return this._privyInternal.getAccessToken()}getIdentityToken(){return this._privyInternal.getIdentityToken()}track({name:t,properties:n}){this._privyInternal.createAnalyticsEvent(t,n)}getCompiledPath(t,n){return this._privyInternal.getPath(t,n)}async fetchPrivyRoute(t,n){return this._privyInternal.fetch(t,n)}async fetchPrivyRouteRaw(t,n){return this._privyInternal.fetchRaw(t,n)}get logger(){return this._privyInternal.logger}};const AV=(e,t)=>AA(String(e),t),QE=e=>LA(e,"US")?.format("E.164")??e.replace(/[\s()-]/g,""),EV=(e,t)=>`+${z5(t)} ${e}`,xV=e=>`*${e.replaceAll("-","").slice(-4)}`,kV=e=>new xs(e),$V=EA().map(e=>({code:e,callCode:z5(e)})),SV=e=>{let t=xA(e,GC)?.formatInternational();return t?.substring(t.indexOf(" ")+1)},TV=e=>{let t=new xs;t.input(e);let n=t.getCountry()||"US",r=t.getCallingCode()||"1";return{countryCode:n,phone:e.replace("+"+r,"")}},IV=(e,t=!0)=>e.reduce((n,r)=>({...n,[r]:t}),{}),MV={[br.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[B3.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[aa.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[H3.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[Lr.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[Z3.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[qr.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[W3.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[Kr.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[U3.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[zr.id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[D3.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"};async function PV(e,t){let n=`${e}-auto-${t==="ethereum"?"eth":"sol"}`,r=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(i)).map(a=>a.toString(16).padStart(2,"0")).join("")}const ex=new Set([br.id,qr.id,aa.id,Lr.id,zr.id,Kr.id,Ja.id]),tx=new Set([br.id,qr.id,Lr.id,aa.id,zr.id,Kr.id,Ja.id]),nx={buy:"CARD",send:"CRYPTO_ACCOUNT"},rx={USDC:"2b92315d-eab7-5bef-84fa-089a131333f5",ETH:"d85dce9b-5b73-5c3c-8978-522ce1d1c1b4",BTC:"5b71fc48-3dd3-540c-809b-f8c94d0e68b5",SOL:"4f039497-3af8-5bb3-951c-6df9afa9be1c",POL:"026bcc1e-9163-591c-a709-34dd18b2e7a1",MON:"92aa538f-b005-45cc-a237-71d6466f54d9"};br.id+"",qr.id+"",aa.id+"",Lr.id+"",zr.id+"",Kr.id+"";function ix(e){return e.startsWith(".")?`0${e}`:e}function RV({appId:e,input:t,amount:n,blockchain:r,asset:i,experience:a}){let s=new URL("https://pay.coinbase.com/buy/select-asset");return s.searchParams.set("appId",t.app_id),s.searchParams.set("sessionToken",t.session_token),s.searchParams.set("endPartnerName",`privy:${e}`),s.searchParams.set("defaultExperience",a),s.searchParams.set("presetCryptoAmount",ix(n)),s.searchParams.set("defaultNetwork",r),s.searchParams.set("defaultPaymentMethod",nx[a]),s.searchParams.set("defaultAsset",rx[i]),s.searchParams.set("partnerUserId",t.partner_user_id),{url:s}}const OV=(e,t)=>{switch(t){case"native-currency":return ex.has(e);case"USDC":return tx.has(e);default:return console.warn("Unknown asset passed to Coinbase Onramp"),!1}};function NV(e,t){return e===Lr.id?"POL":e===Ja.id?"MON":"ETH"}const ax="solana offchain",Ih=1232;function sx(e){let t=Mt.utf8.toBytes(e),n=new Uint8Array(32);return n.set(t.slice(0,32)),n}function s4({message:e,signerPublicKey:t,domain:n}){let r=Mt.utf8.toBytes(e);if(t.length!==32)throw Error("Signer public key must be 32 bytes");let i=85+r.length;if(i>Ih)throw Error(`Combined message length (${i}) exceeds maximum (${Ih})`);let a=sx(n),s=new Uint8Array(i),o=0;s[o]=255,o+=1;let l=Mt.utf8.toBytes(ax);return s.set(l,o),o+=l.length,s[o]=0,o+=1,s.set(a,o),o+=32,s[o]=1,o+=1,s[o]=1,o+=1,s.set(t,o),o+=32,s[o]=r.length&255,s[o+1]=r.length>>8&255,o+=2,s.set(r,o),s}const ox=["privy"],lx=["metamask","phantom","brave_wallet","rainbow"],dx=["coinbase_wallet"],cx="metamask.trust.safe.rainbow.uniswap.zerion.argent.spot.omni.cryptocom.blockchain.safepal.bitget_wallet.zengo.1inch.binance.exodus.mew_wallet.alphawallet.keyring_pro.mathwallet.unstoppable.obvious.ambire.internet_money_wallet.coin98.abc_wallet.arculus_wallet.haha.cling_wallet.broearn.copiosa.burrito_wallet.enjin_wallet.plasma_wallet.avacus.bee.pitaka.pltwallet.minerva.kryptogo.prema.slingshot.kriptonio.timeless.secux.bitizen.blocto.safemoon".split("."),ux=["unknown"];[...lx,...dx,...cx,...ox,...ux];function FV(e){return e?`${e.slice(0,5)}…${e.slice(-4)}`:""}function jV({wei:e,precision:t=3}){return parseFloat(Yy(e)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"")}function DV({amount:e,decimals:t}){return km(BigInt(e),t)}const o4=e=>[...i1(e),...a1(e)],px=(e,t)=>e.imported?e:ju(t)??r4(t),hx=e=>async({address:t,chainType:n})=>{let{user:r}=await e.user.get();if(!r)throw new se({code:"delegated_actions_before_logged_in",error:"Must be logged in to delegate wallets"});if(n!=="solana"&&n!=="ethereum")throw new se({code:"unsupported_chain_type",error:"Only Solana and Ethereum embedded wallets are supported for delegation and revocation."});let i=o4(r).find(o=>o.chain_type===n&&o.address===t);if(!i)throw new se({code:"delegated_actions_wallet_not_found",error:"Address to delegate is not associated with current user."});if(Jn(i))throw new se({code:"unsupported_wallet_type",error:"useDelegatedActions is only supported for on-device execution and this app uses TEE execution. Use the useSessionSigners hook to provision server side access on behalf of your users. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide"});if(i.delegated)return{user:r};let a=px(i,r);if(!a)throw new se({code:"delegated_actions_wallet_not_found",error:"Address to delegate is not associated with current user."});await e.embeddedWallet.delegateWallets({rootWallet:{address:a.address,chainType:a.chain_type,imported:a.imported},delegatedWallets:[{address:i.address,chainType:i.chain_type,walletIndex:i.wallet_index}]});let{user:s}=await e.user.get();return{user:s}},fx=e=>async()=>{let{user:t}=await e.user.get();if(!t)throw new se({code:"delegated_actions_before_logged_in",error:"Must be logged in to revoke delegated wallets"});let n=o4(t);if(n.some(Jn))throw new se({code:"unsupported_wallet_type",error:"revokeWallets is only supported for on-device execution and this app uses TEE execution. Use the useSessionSigners hook to manage server side access on behalf of your users. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide"});if(n.every(i=>!i.delegated))throw new se({code:"delegated_actions_no_wallet_to_revoke",error:"User has no delegated wallets to revoke."});await e.delegated.revoke();let{user:r}=await e.user.get();return{user:r}};Xs({delegateWallet:()=>hx,revokeWallets:()=>fx});const yx=({client:e,openAuthSession:t})=>async({providerAppId:n,redirectUrl:r,loginOptions:i})=>{let a=`privy:${n}`,{url:s}=await e.auth.oauth.generateURL(a,r),o=await t(s,r),l=o.privy_oauth_state,c=o.privy_oauth_code;if(!l||!c)throw new se({code:"login_with_oauth_returned_with_invalid_credentials",error:"Auth session oauth returned invalid credentials"});let u=await e.auth.oauth.loginWithCode(c,l,a,void 0,void 0,i),p=u.oauth_tokens;return p&&await e.crossApp.updateOnCrossAppAuthentication(n,p),u},l4=({client:e,openAuthSession:t})=>async({providerAppId:n,redirectUrl:r})=>{let i=`privy:${n}`,{url:a}=await e.auth.oauth.generateURL(i,r),s=await t(a,r),o=s.privy_oauth_state,l=s.privy_oauth_code;if(!o||!l)throw new se({code:"login_with_oauth_returned_with_invalid_credentials",error:"Auth session oauth returned invalid credentials"});let c=e.addOAuthTokensListener(p=>{e.crossApp.updateOnCrossAppAuthentication(n,p)}),{user:u}=await e.auth.oauth.linkWithCode(l,o,i);return c.unsubscribe(),u};function o1(e,t){return e.linked_accounts.filter(n=>n.type==="cross_app").flatMap(n=>n.smart_wallets).some(n=>n.address===t)}const mx=(e,t)=>e.linked_accounts.filter(n=>n.type==="cross_app").find(({embedded_wallets:n,smart_wallets:r})=>[...n,...r].some(i=>i.address===t)),gx=({client:e,openAuthSession:t})=>{let n=l4({client:e,openAuthSession:t});return async({providerAppId:r,redirectUrl:i})=>await e.crossApp.getProviderAccessToken(r)||(await n({providerAppId:r,redirectUrl:i}),await e.crossApp.getProviderAccessToken(r))},l1=({client:e,openAuthSession:t})=>{let n=gx({client:e,openAuthSession:t});return async({user:r,request:i,redirectUrl:a,address:s})=>{let o=mx(r,s);if(!o)throw new se({code:"cross_app_invalid_wallet",error:"Cannot operate with this wallet address"});let l=o.provider_app_id,{connections:c}=await e.crossApp.getCrossAppConnections(),u=c.find(w=>w.provider_app_id===l);if(!u)throw new se({code:"cross_app_invalid_app",error:"Invalid connected app"});if(u.read_only)throw new se({code:"cross_app_read_only",error:"Cannot transact against a read-only provider app"});let p=await n({providerAppId:l,redirectUrl:a});if(!p)throw new se({code:"cross_app_request_error",error:"Wallet operations require a valid token"});let h={content:{request:{request:i}},timestamp:Date.now(),callbackUrl:a},f=new URL(`${u.provider_app_custom_api_url}/oauth/transact`);f.searchParams.set("communicationMode","redirect"),f.searchParams.set("token",p),f.searchParams.set("request",JSON.stringify(h));let{privy_cross_app_type:y,privy_cross_app_payload:m}=await t(f.href,a);if(!y||!m)throw new se({code:"cross_app_request_error",error:"Cross app request returned an invalid result"});if(y==="PRIVY_CROSS_APP_ACTION_ERROR")throw new se({code:"cross_app_request_error",error:m});if(y!=="PRIVY_CROSS_APP_ACTION_RESPONSE")throw new se({code:"cross_app_request_error",error:"Cross app request returned an invalid result"});return{result:m}}};function d1(e){if(!e)throw new se({code:"attempted_cross_app_request_before_logged_in",error:"Must be logged in to sign messages with a cross-app wallet"})}const wx=({client:e,openAuthSession:t})=>{let n=l1({client:e,openAuthSession:t});return async({user:r,address:i,message:a,redirectUrl:s})=>{d1(r);let o={method:o1(r,i)?"privy_signSmartWalletMessage":"personal_sign",params:[a,i]},{result:l}=await n({user:r,request:o,address:i,redirectUrl:s});return{signature:l}}};function vx(e){let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},n=e.types.EIP712Domain??Object.entries(e.domain??{}).map(([i,a])=>{if(a!=null&&typeof i=="string"&&i in t)return{name:i,type:t[i]}}).filter(i=>!!i),r={...e.types};return r.EIP712Domain=n,{...e,types:r}}const Cx=({client:e,openAuthSession:t})=>{let n=l1({client:e,openAuthSession:t});return async({user:r,typedData:i,address:a,redirectUrl:s})=>{d1(r);let o={method:o1(r,a)?"privy_signSmartWalletTypedData":"eth_signTypedData_v4",params:[a,vx(i)]},{result:l}=await n({user:r,request:o,address:a,redirectUrl:s});return{signature:l}}},_x=({client:e,openAuthSession:t})=>{let n=l1({client:e,openAuthSession:t});return async({user:r,transaction:i,address:a,redirectUrl:s})=>{d1(r);let o={method:o1(r,a)?"privy_sendSmartWalletTx":"eth_sendTransaction",params:[i]},{result:l}=await n({user:r,request:o,address:a,redirectUrl:s});return{transactionHash:l}}};var bx=Xs({sendTransaction:()=>_x,signMessage:()=>wx,signTypedData:()=>Cx});Xs({linkWithCrossAppAuth:()=>l4,loginWithCrossAppAuth:()=>yx,wallet:()=>bx});function d4(e){if(e.startsWith("eip155:"))return"ethereum";if(e.startsWith("solana:"))return"solana";if(e.startsWith("bip122:"))return"bitcoin-segwit";if(e.startsWith("tron:"))return"tron"}function Lx(e,t){let n=d4(e);if(!n)return;let r=t.linked_accounts.find(i=>i.type==="wallet"&&i.chain_type===n&&"address"in i&&i.address);return r&&"address"in r?r.address:void 0}async function c4(e){let{user:t}=await e.privy.user.get();if(!t)return{ok:!1,error:"NOT_AUTHENTICATED"};let n=Lx(e.caip2,t);if(n)return{ok:!0,address:n};let r=d4(e.caip2);if(!r)return{ok:!1,error:"UNSUPPORTED_CHAIN"};try{let i=await e.privy.fetchPrivyRoute(w5,{body:{chain_type:r}});return await e.onWalletCreated?.(),{ok:!0,address:i.address}}catch{return{ok:!1,error:"REFUND_WALLET_CREATION_FAILED"}}}async function Ax(e){let{user:t}=await e.privy.user.get();if(!t)throw Error("NOT_AUTHENTICATED");let n=e.refundAddress;if(!n){let i=await c4({privy:e.privy,caip2:e.sourceChain,onWalletCreated:e.onWalletCreated});if(!i.ok)throw Error(i.error);n=i.address}let r=await e.privy.fetchPrivyRoute(Vw,{body:{source_chain:e.sourceChain,source_currency:e.sourceCurrency,destination_chain:e.destinationChain,destination_currency:e.destinationCurrency,destination_address:e.destinationAddress,refund_address:n,...e.slippageBps==null?{}:{slippage_bps:e.slippageBps}}});return e.privy.track({name:"sdk_deposit_address_headless_quote",properties:{sourceChain:e.sourceChain,sourceCurrency:e.sourceCurrency,destinationChain:e.destinationChain,destinationCurrency:e.destinationCurrency,depositAddressId:r.id}}),r}function rc(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}const u4=async({operation:e,until:t,delay:n,interval:r,attempts:i,signal:a})=>{n&&await rc(n);let s=0,o,l;for(;s<i;){if(a?.aborted)return{status:"aborted",result:o,attempts:s,error:l};s++;try{if(l=void 0,o=await e(),t(o))return{status:"success",result:o,attempts:s};s<i&&await rc(r)}catch(c){c instanceof Error&&(l=c),s<i&&await rc(r)}}return{status:"max_attempts",result:o,attempts:s,error:l}},p4=2e3,h4=1800*1e3;function f4(e,t){return Math.ceil(t/e)}function y4(e){return e.status==="success"?e.result?{status:"success",order:e.result}:{status:"timeout"}:e.status==="aborted"?{status:"aborted",error:e.error}:{status:"timeout",error:e.error}}async function Ex(e){return await e.privy.fetchPrivyRoute(j3,{params:{order_id:e.orderId}})}async function xx(e){let t=e.pollIntervalMs??p4,n=e.timeoutMs??h4,r=e.signal??new AbortController().signal;return y4(await u4({operation:async()=>{let i=await e.privy.fetchPrivyRoute(Hw,{params:{deposit_address_id:e.depositAddressId},query:{after:e.quoteCreatedAt}});if(i.order)return await e.privy.fetchPrivyRoute(j3,{params:{order_id:i.order.id}})},until:i=>i!==void 0,delay:t,interval:t,attempts:f4(t,n),signal:r}))}async function kx(e){let t=e.pollIntervalMs??p4,n=e.timeoutMs??h4,r=e.signal??new AbortController().signal;return y4(await u4({operation:()=>e.privy.fetchPrivyRoute(j3,{params:{order_id:e.orderId}}),until:i=>i.status!=="executing",delay:t,interval:t,attempts:f4(t,n),signal:r}))}var UV=Xs({generateDepositAddress:()=>Ax,getConfig:()=>$x,getDeposit:()=>Ex,resolveRefundAddress:()=>c4,waitForCompletion:()=>kx,waitForDeposit:()=>xx});async function $x(e){let t=await e.fetchPrivyRoute(m5,{});return{currencies:t.currencies,chains:t.chains}}function Sx(e){let t=e.depositAddressStrategy===void 0?{}:{deposit_address_strategy:e.depositAddressStrategy};return e.type==="deposit_config"?{type:"deposit_config",deposit_config_id:e.depositConfigId,...t}:{type:"inline_route",source:e.source,destination:e.destination,...t}}async function Tx(e,t,n){let{walletId:r}=n,i=Sx(n),a=e.getCompiledPath(Rd,{params:{wallet_id:r}}),s=String(Date.now()+r1),{signature:o}=await Na(t,{version:1,url:a,method:Rd.method,headers:{"privy-app-id":e.app.appId,[Fa]:s},body:i});if(Date.now()>Number(s))throw new se({error:"Wallet request expired before it could be sent. Please try again.",code:"embedded_wallet_request_expired"});let l=await e.fetchPrivyRoute(Rd,{body:i,params:{wallet_id:r},headers:{"privy-authorization-signature":o,[Fa]:s}});return e.track({name:"sdk_deposit_address_headless_create",properties:{version:"v3",action:"create",walletId:r,type:n.type,...n.type==="inline_route"?{destinationChain:n.destination.chain,destinationCurrency:n.destination.asset}:{depositConfigId:n.depositConfigId}}}),l}async function Ix(e,t){let n=await e.fetchPrivyRoute(Bw,{body:{source:t.source,destination:t.destination,...t.inputAmount==null?{}:{input_amount:t.inputAmount},...t.slippageBps==null?{}:{slippage_bps:t.slippageBps}}});return e.track({name:"sdk_deposit_address_headless_quote",properties:{version:"v3",action:"quote",sourceChain:t.source.chain,sourceCurrency:t.source.asset,destinationChain:t.destination.chain,destinationCurrency:t.destination.asset}}),n}function Mx(e){let t=Number(e.input_amount),n=Number(e.estimated_output_amount);if(!(!Number.isFinite(t)||!Number.isFinite(n)||t===0))return String(n/t)}async function Px(e,t){return e.fetchPrivyRoute(zw,{params:{wallet_id:t.walletId,order_id:t.orderId}})}async function Rx(e,t){return e.fetchPrivyRoute(Kw,{params:{wallet_id:t.walletId},query:{after:t.after}})}const Ox={ethereum:"eip155:1",arbitrum:"eip155:42161",avalanche:"eip155:43114",arc:"eip155:5042",base:"eip155:8453",tempo:"eip155:4217",linea:"eip155:59144",optimism:"eip155:10",polygon:"eip155:137",bsc:"eip155:56",zksync_era:"eip155:324",solana:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",tron:"tron:mainnet",robinhood:"eip155:4663",unichain:"eip155:130",worldchain:"eip155:480",ink:"eip155:57073",soneium:"eip155:1868",megaeth:"eip155:4326",hyperevm:"eip155:999",hypercore:"eip155:1337","tempo_zone:00001":"eip155:421700001","tempo_zone:00002":"eip155:421700002",tempo_testnet:"eip155:42431","tempo_testnet_zone:00003":"eip155:1424310003",hoodi:"eip155:560048",sepolia:"eip155:11155111",arbitrum_sepolia:"eip155:421614",avalanche_fuji:"eip155:43113",base_sepolia:"eip155:84532",linea_testnet:"eip155:59140",optimism_sepolia:"eip155:11155420",polygon_amoy:"eip155:80002",bsc_testnet:"eip155:97",solana_devnet:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",solana_testnet:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",tron_nile:"tron:nile",robinhood_testnet:"eip155:46630",ink_sepolia:"eip155:763373"},Nx=[{id:"eth",symbol:"ETH"},{id:"sol",symbol:"SOL"},{id:"pol",symbol:"POL"},{id:"trx",symbol:"TRX"},{id:"usdc",symbol:"USDC"},{id:"usdc_e",symbol:"USDC.e"},{id:"usdt",symbol:"USDT"},{id:"usdt0",symbol:"USDT0"},{id:"usdb",symbol:"USDB"},{id:"eurc",symbol:"EURC"},{id:"ousd",symbol:"OUSD"},{id:"usdg",symbol:"USDG"},{id:"pathusd",symbol:"PathUSD"}],Fx=new Set(["native","native-token","0x0000000000000000000000000000000000000000","11111111111111111111111111111111"]);function m4(e){return Fx.has(e.toLowerCase())}function jx(e){return e.includes(":")}function Wi(e){return jx(e)?e:Ox[e.toLowerCase()]||(/^\d+$/.test(e)?`eip155:${e}`:e)}function g4(e){return m4(e)}function Dx(e){let t=e.toLowerCase();return Nx.find(n=>n.id===t||n.symbol.toLowerCase()===t)}function Ux({symbol:e,address:t}){return Dx(e)?.id??t}function w4({asset:e,symbol:t,addresses:n}){let r=e.toLowerCase();return t.toLowerCase()===r?!0:g4(e)?n.some(m4):n.some(i=>i.toLowerCase()===r)}function Wx({config:e,chain:t,asset:n}){let r=t?Wi(t):void 0;for(let i of e.currencies){let a=r?i.chains.filter(s=>Wi(s.caip2)===r):i.chains;if(a.length!==0&&w4({asset:n,symbol:i.symbol,addresses:a.map(s=>s.address)}))return i.symbol}return n.toUpperCase()}function Vx(e,t,n){return Mh(e,n)===Mh(t,n)}function Mh(e,t){let n=Wi(e);if(n!==e||e.includes(":"))return n;let r=e.toLowerCase();for(let i of Object.values(t.chains))if(i.caip2===e||i.display_name.toLowerCase()===r||String(i.chain_id)===e)return i.caip2;return n}function Ph(e,t){return w4({asset:t.asset,symbol:e.symbol,addresses:e.chains.map(n=>n.address)})}function Rh({caip2:e,asset:t,config:n}){return!t.chain||Vx(t.chain,e,n)}function Hx({currency:e,source:t,config:n}){switch(t.mode){case"all":return e.chains;case"include":{let r=t.values.filter(i=>Ph(e,i));return r.length===0?[]:e.chains.filter(i=>r.some(a=>Rh({caip2:i.caip2,asset:a,config:n})))}case"exclude":{let r=t.values.filter(i=>Ph(e,i));return r.length===0?e.chains:e.chains.filter(i=>!r.some(a=>Rh({caip2:i.caip2,asset:a,config:n})))}default:return e.chains}}function Zx(e,t){return{currencies:e.currencies.map(n=>({...n,chains:Hx({currency:n,source:t,config:e})})).filter(n=>n.chains.length>0),chains:e.chains}}function Bx(e){return e.startsWith("0x")}function zx(e,t){let n=Bx(e);switch(t){case"evm":case"hypevm":return n;case"svm":case"bvm":case"tron":case"tvm":return!n;default:return n}}function Kx(e,t){let n=Wi(t);switch(e.source.mode){case"all":return!0;case"include":return e.source.values.some(r=>!r.chain||Wi(r.chain)===n);case"exclude":return!e.source.values.some(r=>!r.chain||Wi(r.chain)===n);default:return e.source,!1}}function qx({accounts:e,selectedChain:t}){if(e.length===0)return;let n=e.filter(a=>Kx(a,t.caip2)),r=n.length>0?n:e,i=r.find(a=>zx(a.deposit_address,t.vmType));return i?i.deposit_address:r[0]?.deposit_address}var La=Xs({createCryptoDepositAccount:()=>Tx,filterDepositConfig:()=>Zx,findCatalogSymbol:()=>Wx,getCryptoDepositAccountNextOrder:()=>Rx,getCryptoDepositAccountOrder:()=>Px,getCryptoDepositAccountQuote:()=>Ix,indicativeRateFromQuote:()=>Mx,isNativeAssetAlias:()=>g4,pickDepositAddressForChain:()=>qx,quoteSourceAsset:()=>Ux,resolveChainAlias:()=>Wi});async function Gx(e,{wallet_id:t}){return await e.fetchPrivyRoute(wv,{params:{wallet_id:t}})}async function Yx(e,{wallet_id:t},n,r){let{signature:i}=await Na(n,{version:1,url:e.getCompiledPath(Nd,{params:{wallet_id:t}}),method:Nd.method,headers:{"privy-app-id":e.app.appId},body:r});return await e.fetchPrivyRoute(Nd,{params:{wallet_id:t},body:r,headers:{"privy-authorization-signature":i}})}async function Jx(e,t,{wallet_id:n,...r}){let i=e.getCompiledPath(Fd,{params:{wallet_id:n}}),a=String(Date.now()+r1),{signature:s}=await Na(t,{version:1,url:i,method:Fd.method,headers:{"privy-app-id":e.app.appId,[Fa]:a},body:{...r}});if(Date.now()>Number(a))throw new se({error:"Wallet request expired before it could be sent. Please try again.",code:"embedded_wallet_request_expired"});return await e.fetchPrivyRoute(Fd,{body:r,params:{wallet_id:n},headers:{"privy-authorization-signature":s,[Fa]:a}})}async function Xx(e,{wallet_id:t,action_id:n}){return await e.fetchPrivyRoute(Cv,{params:{wallet_id:t,action_id:n}})}async function Qx(e,{wallet_id:t,...n}){return await e.fetchPrivyRoute(_v,{params:{wallet_id:t},query:{...n.cursor?{cursor:n.cursor}:{},...n.limit===void 0||n.limit===null?{}:{limit:n.limit},...n.type?{type:n.type}:{}}})}var v4=class{#e;#t;get standardWallet(){return this.#e}get address(){return this.#t.address}constructor({wallet:e,account:t}){this.#e=e,this.#t=t}async disconnect(){if(!this.#e.features["standard:disconnect"]?.disconnect)throw Error("Wallet does not support disconnect");await this.#e.features["standard:disconnect"].disconnect()}async signMessage(...e){if(!this.#e.features["solana:signMessage"]?.signMessage)throw Error("Wallet does not support signMessage");let t=await this.#e.features["solana:signMessage"].signMessage(...e.map(n=>({...n,account:this.#t})));return e.length===1?t[0]:[...t]}async signTransaction(...e){if(!this.#e.features["solana:signTransaction"]?.signTransaction)throw Error("Wallet does not support signTransaction");let t=await this.#e.features["solana:signTransaction"].signTransaction(...e.map(n=>({...n,account:this.#t})));return e.length===1?t[0]:[...t]}async signAndSendTransaction(...e){if(!this.#e.features["solana:signAndSendTransaction"]?.signAndSendTransaction)throw Error("Wallet does not support signAndSendTransaction");let t=await this.#e.features["solana:signAndSendTransaction"].signAndSendTransaction(...e.map(n=>({...n,account:this.#t})));return e.length===1?t[0]:[...t]}async signAndSendAllTransactions(e){if(!this.#e.features["solana:signAndSendTransaction"]?.signAndSendTransaction)throw Error("Wallet does not support signAndSendTransaction");return[...await this.#e.features["solana:signAndSendTransaction"].signAndSendTransaction(...e.map(t=>({...t,account:this.#t})))]}},ek=XE;const Xa=(e,t)=>e===t?!0:e.startsWith("0x")&&t.startsWith("0x")&&e.length===42&&t.length===42?mn(e)===mn(t):!1;function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}var tk=/^\s+/,nk=/\s+$/;function ee(e,t){if(e=e||"",t=t||{},e instanceof ee)return e;if(!(this instanceof ee))return new ee(e,t);var n=rk(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ee.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,s,o;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*s+.0722*o},setAlpha:function(t){return this._a=C4(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Nh(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Nh(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=Oh(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Oh(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return Fh(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return ok(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ht(this._r,255)*100)+"%",g:Math.round(ht(this._g,255)*100)+"%",b:Math.round(ht(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ht(this._r,255)*100)+"%, "+Math.round(ht(this._g,255)*100)+"%, "+Math.round(ht(this._b,255)*100)+"%)":"rgba("+Math.round(ht(this._r,255)*100)+"%, "+Math.round(ht(this._g,255)*100)+"%, "+Math.round(ht(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vk[Fh(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+jh(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=ee(t);r="#"+jh(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ee(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(uk,arguments)},brighten:function(){return this._applyModification(pk,arguments)},darken:function(){return this._applyModification(hk,arguments)},desaturate:function(){return this._applyModification(lk,arguments)},saturate:function(){return this._applyModification(dk,arguments)},greyscale:function(){return this._applyModification(ck,arguments)},spin:function(){return this._applyModification(fk,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(gk,arguments)},complement:function(){return this._applyCombination(yk,arguments)},monochromatic:function(){return this._applyCombination(wk,arguments)},splitcomplement:function(){return this._applyCombination(mk,arguments)},triad:function(){return this._applyCombination(Dh,[3])},tetrad:function(){return this._applyCombination(Dh,[4])}};ee.fromRatio=function(e,t){if(wl(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=D2(e[r]));e=n}return ee(e,t)};function rk(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,s=!1,o=!1;return typeof e=="string"&&(e=Lk(e)),wl(e)=="object"&&(Tr(e.r)&&Tr(e.g)&&Tr(e.b)?(t=ik(e.r,e.g,e.b),s=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Tr(e.h)&&Tr(e.s)&&Tr(e.v)?(r=D2(e.s),i=D2(e.v),t=sk(e.h,r,i),s=!0,o="hsv"):Tr(e.h)&&Tr(e.s)&&Tr(e.l)&&(r=D2(e.s),a=D2(e.l),t=ak(e.h,r,a),s=!0,o="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=C4(n),{ok:s,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function ik(e,t,n){return{r:ht(e,255)*255,g:ht(t,255)*255,b:ht(n,255)*255}}function Oh(e,t,n){e=ht(e,255),t=ht(t,255),n=ht(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,s,o=(r+i)/2;if(r==i)a=s=0;else{var l=r-i;switch(s=o>.5?l/(2-r-i):l/(r+i),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s,l:o}}function ak(e,t,n){var r,i,a;e=ht(e,360),t=ht(t,100),n=ht(n,100);function s(c,u,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?c+(u-c)*6*p:p<1/2?u:p<2/3?c+(u-c)*(2/3-p)*6:c}if(t===0)r=i=a=n;else{var o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;r=s(l,o,e+1/3),i=s(l,o,e),a=s(l,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function Nh(e,t,n){e=ht(e,255),t=ht(t,255),n=ht(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,s,o=r,l=r-i;if(s=r===0?0:l/r,r==i)a=0;else{switch(r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s,v:o}}function sk(e,t,n){e=ht(e,360)*6,t=ht(t,100),n=ht(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),s=n*(1-i*t),o=n*(1-(1-i)*t),l=r%6,c=[n,s,a,a,o,n][l],u=[o,n,n,s,a,a][l],p=[a,a,o,n,n,s][l];return{r:c*255,g:u*255,b:p*255}}function Fh(e,t,n,r){var i=[Xn(Math.round(e).toString(16)),Xn(Math.round(t).toString(16)),Xn(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function ok(e,t,n,r,i){var a=[Xn(Math.round(e).toString(16)),Xn(Math.round(t).toString(16)),Xn(Math.round(n).toString(16)),Xn(_4(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function jh(e,t,n,r){var i=[Xn(_4(r)),Xn(Math.round(e).toString(16)),Xn(Math.round(t).toString(16)),Xn(Math.round(n).toString(16))];return i.join("")}ee.equals=function(e,t){return!e||!t?!1:ee(e).toRgbString()==ee(t).toRgbString()};ee.random=function(){return ee.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function lk(e,t){t=t===0?0:t||10;var n=ee(e).toHsl();return n.s-=t/100,n.s=rd(n.s),ee(n)}function dk(e,t){t=t===0?0:t||10;var n=ee(e).toHsl();return n.s+=t/100,n.s=rd(n.s),ee(n)}function ck(e){return ee(e).desaturate(100)}function uk(e,t){t=t===0?0:t||10;var n=ee(e).toHsl();return n.l+=t/100,n.l=rd(n.l),ee(n)}function pk(e,t){t=t===0?0:t||10;var n=ee(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),ee(n)}function hk(e,t){t=t===0?0:t||10;var n=ee(e).toHsl();return n.l-=t/100,n.l=rd(n.l),ee(n)}function fk(e,t){var n=ee(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,ee(n)}function yk(e){var t=ee(e).toHsl();return t.h=(t.h+180)%360,ee(t)}function Dh(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ee(e).toHsl(),r=[ee(e)],i=360/t,a=1;a<t;a++)r.push(ee({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function mk(e){var t=ee(e).toHsl(),n=t.h;return[ee(e),ee({h:(n+72)%360,s:t.s,l:t.l}),ee({h:(n+216)%360,s:t.s,l:t.l})]}function gk(e,t,n){t=t||6,n=n||30;var r=ee(e).toHsl(),i=360/n,a=[ee(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(ee(r));return a}function wk(e,t){t=t||6;for(var n=ee(e).toHsv(),r=n.h,i=n.s,a=n.v,s=[],o=1/t;t--;)s.push(ee({h:r,s:i,v:a})),a=(a+o)%1;return s}ee.mix=function(e,t,n){n=n===0?0:n||50;var r=ee(e).toRgb(),i=ee(t).toRgb(),a=n/100,s={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return ee(s)};ee.readability=function(e,t){var n=ee(e),r=ee(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};ee.isReadable=function(e,t,n){var r=ee.readability(e,t),i,a;switch(a=!1,i=Ak(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};ee.mostReadable=function(e,t,n){var r=null,i=0,a,s,o,l;n=n||{},s=n.includeFallbackColors,o=n.level,l=n.size;for(var c=0;c<t.length;c++)a=ee.readability(e,t[c]),a>i&&(i=a,r=ee(t[c]));return ee.isReadable(e,r,{level:o,size:l})||!s?r:(n.includeFallbackColors=!1,ee.mostReadable(e,["#fff","#000"],n))};var Du=ee.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vk=ee.hexNames=Ck(Du);function Ck(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function C4(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ht(e,t){_k(e)&&(e="100%");var n=bk(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function rd(e){return Math.min(1,Math.max(0,e))}function bn(e){return parseInt(e,16)}function _k(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function bk(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Xn(e){return e.length==1?"0"+e:""+e}function D2(e){return e<=1&&(e=e*100+"%"),e}function _4(e){return Math.round(parseFloat(e)*255).toString(16)}function Uh(e){return bn(e)/255}var Kn=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Tr(e){return!!Kn.CSS_UNIT.exec(e)}function Lk(e){e=e.replace(tk,"").replace(nk,"").toLowerCase();var t=!1;if(Du[e])e=Du[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Kn.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Kn.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Kn.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Kn.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Kn.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Kn.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Kn.hex8.exec(e))?{r:bn(n[1]),g:bn(n[2]),b:bn(n[3]),a:Uh(n[4]),format:t?"name":"hex8"}:(n=Kn.hex6.exec(e))?{r:bn(n[1]),g:bn(n[2]),b:bn(n[3]),format:t?"name":"hex"}:(n=Kn.hex4.exec(e))?{r:bn(n[1]+""+n[1]),g:bn(n[2]+""+n[2]),b:bn(n[3]+""+n[3]),a:Uh(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Kn.hex3.exec(e))?{r:bn(n[1]+""+n[1]),g:bn(n[2]+""+n[2]),b:bn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function Ak(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const D=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},ic=e=>()=>{throw Error(e.trim())},b4=()=>{},id=g.createContext({setAuthenticated:D,setUser:D,setIsNewUser:D,isNewUserThisSession:!1,walletConnectionStatus:null,setWalletConnectionStatus:D,connectors:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,privy:null,appId:"notAdded",hideWalletUIs:{current:!1},nativeTokenSymbolForChainId:D,initializeWalletProxy:D,getAuthMeta:D,getAuthFlow:D,closePrivyModal:D,openPrivyModal:D,connectWallet:D,initLoginWithWallet:D,loginWithWallet:D,initLoginWithFarcaster:D,loginWithFarcaster:D,loginWithCode:D,initLoginWithEmail:D,initLoginWithSms:D,initUpdateEmail:D,initUpdatePhone:D,resendEmailCode:D,resendSmsCode:D,initLoginWithHeadlessOAuth:D,loginWithHeadlessOAuth:D,crossAppAuthFlow:D,initLoginWithOAuth:D,loginWithOAuth:D,passkeyAuthState:{status:"initial"},setPasskeyAuthState:D,initSignupWithPasskey:D,signupWithPasskey:D,initLoginWithPasskey:D,loginWithPasskey:D,initLinkWithPasskey:D,linkWithPasskey:D,refreshSessionAndUser:D,walletProxy:null,createAnalyticsEvent:D,acceptTerms:D,getUsdTokenPrice:D,getUsdPriceForSol:D,getSplTokenMetadata:D,recoverEmbeddedWallet:D,updateWallets:D,fundWallet:D,openModal:D,setReadyToTrue:D,requestFarcasterSignerStatus:D,initLoginWithTelegram:D,loginWithTelegram:D,generateSiweMessage:D,generateSiweMessageForSmartWallet:D,loginWithSiwe:D,linkWithSiwe:D,linkSmartWallet:D,delegateWallet:D,revokeDelegatedWallets:D,connectCoinbaseSmartWallet:D,connectBaseAccount:D,initiateAccountTransfer:D,emailOtpState:{status:"initial"},setEmailOtpState:D,smsOtpState:{status:"initial"},setSmsOtpState:D,siweState:{status:"initial"},setSiweState:D,oAuthState:{status:"initial"},setOAuthState:D,telegramAuthState:{status:"initial"},setTelegramAuthState:D,isHeadlessOAuthLoading:!1,isHeadlessSigning:D,inProgressAuthFlowRef:{current:null},inProgressLoginOrLinkMethodRef:{current:null},baseAccountSdk:void 0,setBaseAccountSdk:D}),Q=()=>g.useContext(id);function Qa(e){return typeof e=="string"&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}const mt=e=>!!e.id&&e.recoveryMethod==="privy-v2";function Pe(e){return e?new Date(1e3*e):null}function zt(e,t){return e.slice().sort(((n,r)=>(n.firstVerifiedAt?.getTime()??0)-(r.firstVerifiedAt?.getTime()??0))).find((n=>n.type===t))}const Uu=e=>e?c1(e).find((t=>t.walletIndex===0))??null:null,c1=e=>e?L4(e,"ethereum"):[],L4=(e,t)=>e.linkedAccounts.filter((n=>n.type==="wallet"&&n.walletClientType==="privy"&&!n.imported&&n.chainType===t)),u1=e=>e?L4(e,"solana"):[],Wu=e=>e?u1(e).find((t=>t.walletIndex===0))??null:null,p1=e=>(e?.linkedAccounts??[]).filter((t=>t.type==="wallet"&&t.walletClientType==="privy"&&t.imported&&t.chainType==="ethereum")),ad=e=>(e?.linkedAccounts??[]).filter((t=>t.type==="wallet"&&t.imported&&t.walletClientType==="privy"&&t.chainType==="solana")),Pn=(e,t)=>e?.linkedAccounts.find((n=>n.type==="wallet"&&n.walletClientType==="privy"&&Xa(n.address,t)))||null,Lo=(e,t)=>e.find((n=>Xa(n.address,t)))||null,Ss=e=>{let t=Uu(e),n=Wu(e);return t&&n&&!mt(n)&&mt(t)?n:Uu(e)??Wu(e)};let Ek=e=>e.reduce(((t,n)=>!t||n.walletIndex<t.walletIndex?n:t),null);const Y2=e=>Ek(c1(e));function Kt(e){if(!e)return null;let t=(function(k){let S=[];for(let b of k){let F=b.type;switch(b.type){case"wallet":let H={id:b.id,address:b.address,type:b.type,imported:b.imported,delegated:b.delegated,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at),chainType:b.chain_type,walletClientType:b.wallet_client_type,connectorType:b.connector_type,recoveryMethod:b.recovery_method,walletIndex:b.wallet_index,publicKey:b.public_key};S.push(H);break;case"smart_wallet":let ae={address:b.address,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at),smartWalletType:b.smart_wallet_type,smartWalletVersion:b.smart_wallet_version};S.push(ae);break;case"cross_app":let G={type:b.type,subject:b.subject,embeddedWallets:b.embedded_wallets,smartWallets:b.smart_wallets,providerApp:{id:b.provider_app_id},firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(G);break;case"email":let he={address:b.address,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(he);break;case"phone":let Be={number:b.phoneNumber,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(Be);break;case"google_oauth":let fe={subject:b.subject,email:b.email,name:b.name,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(fe);break;case"spotify_oauth":let Ie={subject:b.subject,email:b.email,name:b.name,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(Ie);break;case"instagram_oauth":let Ae={subject:b.subject,username:b.username,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(Ae);break;case"twitter_oauth":let N={subject:b.subject,username:b.username,name:b.name,type:b.type,profilePictureUrl:b.profile_picture_url,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(N);break;case"discord_oauth":let xe={subject:b.subject,username:b.username,email:b.email,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(xe);break;case"github_oauth":let ke={subject:b.subject,username:b.username,name:b.name,email:b.email,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(ke);break;case"tiktok_oauth":let be={subject:b.subject,username:b.username,name:b.name,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(be);break;case"line_oauth":let Le={subject:b.subject,name:b.name,email:b.email,profilePictureUrl:b.profile_picture_url,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(Le);break;case"twitch_oauth":let ye={subject:b.subject,username:b.username,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(ye);break;case"linkedin_oauth":let Me={subject:b.subject,name:b.name,email:b.email,vanityName:b.vanity_name,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(Me);break;case"apple_oauth":let we={subject:b.subject,email:b.email,type:b.type,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(we);break;case"custom_auth":S.push({type:b.type,customUserId:b.custom_user_id,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)});break;case"farcaster":let ze={type:b.type,fid:b.fid,ownerAddress:b.owner_address,displayName:b.display_name,username:b.username,bio:b.bio,pfp:b.profile_picture_url,url:b.homepage_url,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at),signerPublicKey:b.signer_public_key};S.push(ze);break;case"passkey":let q={type:b.type,enrolledInMfa:b.enrolled_in_mfa,credentialId:b.credential_id,publicKey:b.public_key,authenticatorName:b.authenticator_name,createdWithDevice:b.created_with_device,createdWithOs:b.created_with_os,createdWithBrowser:b.created_with_browser,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(q);break;case"telegram":let at={type:b.type,telegramUserId:b.telegram_user_id,firstName:b.first_name,lastName:b.last_name,username:b.username,photoUrl:b.photo_url,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(at);break;default:if(Qa(b.type)){let et={type:b.type,subject:b.subject,name:b.name,username:b.username,email:b.email,profilePictureUrl:b.profile_picture_url,firstVerifiedAt:Pe(b.first_verified_at),latestVerifiedAt:Pe(b.latest_verified_at)};S.push(et);break}console.warn(`Unrecognized account type: ${F}. Please consider upgrading the Privy SDK.`)}}return S})(e.linked_accounts),n=zt(t,"wallet"),r=zt(t,"smart_wallet"),i=zt(t,"email"),a=zt(t,"phone"),s=zt(t,"google_oauth"),o=zt(t,"twitter_oauth"),l=zt(t,"discord_oauth"),c=zt(t,"github_oauth"),u=zt(t,"spotify_oauth"),p=zt(t,"instagram_oauth"),h=zt(t,"tiktok_oauth"),f=zt(t,"line_oauth"),y=zt(t,"twitch_oauth"),m=zt(t,"linkedin_oauth"),w=zt(t,"apple_oauth"),E=zt(t,"farcaster"),_=zt(t,"telegram"),C=e.mfa_methods.map((({type:k,verified_at:S})=>({type:k,verifiedAt:Pe(S)})));return{id:e.id,createdAt:Pe(e.created_at),linkedAccounts:t,email:i&&{address:i?.address},phone:a&&{number:a?.number},wallet:n&&{id:n.id,address:n.address,chainType:n.chainType,walletClientType:n.walletClientType,connectorType:n.connectorType,recoveryMethod:n.recoveryMethod,imported:n.imported,delegated:n.delegated,walletIndex:n.walletIndex,publicKey:n.publicKey},smartWallet:r&&{address:r.address,smartWalletType:r.smartWalletType,smartWalletVersion:r.smartWalletVersion},google:s&&{subject:s.subject,email:s.email,name:s.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name,profilePictureUrl:o.profilePictureUrl},discord:l&&{subject:l.subject,username:l.username,email:l.email},github:c&&{subject:c.subject,username:c.username,name:c.name,email:c.email},spotify:u&&{subject:u.subject,email:u.email,name:u.name},instagram:p&&{subject:p.subject,username:p.username},tiktok:h&&{subject:h.subject,username:h.username,name:h.name},line:f&&{subject:f.subject,name:f.name,email:f.email,profilePictureUrl:f.profilePictureUrl},twitch:y&&{subject:y.subject,username:y.username},linkedin:m&&{subject:m.subject,name:m.name,email:m.email,vanityName:m.vanityName},apple:w&&{subject:w.subject,email:w.email},farcaster:E&&{fid:E.fid,ownerAddress:E.ownerAddress,displayName:E.displayName,username:E.username,bio:E.bio,pfp:E.pfp,url:E.url,signerPublicKey:E.signerPublicKey},telegram:_&&{telegramUserId:_.telegramUserId,firstName:_.firstName,lastName:_.lastName,username:_.username,photoUrl:_.photoUrl},delegatedWallets:[],mfaMethods:C.map((k=>k.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}const Vu="https://auth.privy.io",xk=2e4,WV=1400,VV=2500,HV=4e3,A4="3.47.0",Aa="privy:token",Wh="privy-token",ac="privy:refresh_token",kk="privy-refresh-token",Fo="privy:pat",Hu="privy:id_token",Vh="privy-id-token",sc="privy-session",Zu="privy:caid",E4=e=>`privy:guest:${e}`,Ea=e=>`privy:cross-app:${e}`,vl="privy:state_code",U2="privy:code_verifier",Cl="privy:headless_oauth",J2="privy:oauth_disable_signup",oc=e=>`privy:wallet:${e}`,x4="privy:connections",sd=12e4,ZV=1,Hh="0x1",h1=3e4,BV="https://api.moonpay.com/v1",zV="https://api.moonpay.com/v1",KV="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",qV="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",$k="deprecated",Qr={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","robinhood_wallet","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let Sk=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet","robinhood_wallet"]),Zh=e=>Sk.has(e),Bh=(e,t,n)=>n.indexOf(e)===t;const Tk=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Zh).filter(Bh):e?e.filter(Zh).filter(Bh):Qr.appearance.walletList;let Ik=/paymaster\.biconomy\.io\/api/i,Mk={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const Pk=(e,t)=>e&&Ik.test(e)?Mk:t&&t.policy_id?{policyId:t.policy_id}:void 0;function Ao(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return ee({...e.toHsl(),l:n})}function lc(e,t){let n=e.getLuminance(),r=t.getLuminance();return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Rk(e,t){if(!e){let r=t?W2:jo;return{accent:ee(r.background.interactive),accentLight:ee(r.background.interactive),accentHover:ee(r.background["interactive-hover"]),accentDark:ee(r.background["interactive-clicked"]),accentDarkest:ee(r.background["interactive-disabled"])}}let n=ee(e);return{accent:n,accentLight:Ao(n,.15),accentHover:Ao(n,.3),accentDark:Ao(n,-.06),accentDarkest:Ao(n,-.6)}}function Ok({backgroundTheme:e,accentHex:t}){let n,r;e==="light"?n=!1:e==="dark"?n=!0:(n=.5>=ee(e).getLuminance(),r=ee(e).toHslString());let i=n?"dark":"light",a=n?W2:jo,{accent:s,accentLight:o,accentHover:l,accentDark:c,accentDarkest:u}=Rk(t,n),p=(function(y){let m=ee(jo.text.default),w=ee(W2.text.default),E=lc(y,m),_=lc(y,w),C=y.toHsl();return C.h>=220&&C.h<=300&&_>=3?W2.text.default:E>_?jo.text.default:W2.text.default})(s),h=ee(p),f=lc(s,ee(a.background.default))>=3;return{colorScheme:i,background:r||a.background.default,background2:a.background.elevated,background3:a.background.interactive,foreground:a.text.default,foreground2:a.text.muted,foreground3:a.text.placeholder,foreground4:a.border.default,accent:s.toHslString(),accentLight:o.toHslString(),accentHover:l.toHslString(),accentDark:c.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:h.toHslString(),success:a.background.success,successDark:a.text.success,successLight:a.background.success,error:a.text.error,errorLight:a.background.error,warn:a.background.warning,warnLight:a.background.warning,warningDark:a.text.warning,errorDark:a.text.error,successBg:a.background.success,errorBg:a.background.error,errorBgHover:a.background["error-hover"],warnBg:a.background.warning,infoBg:a.background.info,infoBgHover:a.background["info-hover"],borderDefault:a.border.default,borderHover:a.border["default-hover"],borderFocus:a.border.focused,borderError:a.border.error,borderSuccess:a.border.success,borderWarning:a.border.warning,borderInfo:a.border.info,borderInteractive:a.border.interactive,borderInteractiveHover:a.border["interactive-hover"],backgroundHover:a.background["default-hover"],backgroundClicked:a.background["default-clicked"],backgroundDisabled:a.background["default-disabled"],backgroundInteractive:a.background.interactive,backgroundInteractiveHover:a.background["interactive-hover"],backgroundInteractiveClicked:a.background["interactive-clicked"],backgroundInteractiveDisabled:a.background["interactive-disabled"],foregroundHover:a.text.default,foregroundClicked:a.text.default,foregroundDisabled:a.text["default-disabled"],foregroundInteractive:a.text.interactive,foregroundInteractiveHover:a.text["interactive-hover"],accentHasGoodContrast:f?"1":"0",linkNavigationColor:f?s.toHslString():a.text.default,linkNavigationDecoration:f?"none":"underline",iconDefault:a.icon.default,iconMuted:a.icon.muted,iconSubtle:a.icon.subtle,iconInverse:a.icon.inverse,iconSuccess:a.icon.success,iconWarning:a.icon.warning,iconError:a.icon.error,iconInteractive:a.icon.interactive,iconDefaultHover:a.icon["default-hover"],iconMutedHover:a.icon["muted-hover"],iconSubtleHover:a.icon["subtle-hover"],iconDefaultClicked:a.icon["default-clicked"],iconMutedClicked:a.icon["muted-clicked"],iconSubtleClicked:a.icon["subtle-clicked"],iconDefaultDisabled:a.icon["default-disabled"],iconMutedDisabled:a.icon["muted-disabled"],iconSubtleDisabled:a.icon["subtle-disabled"],iconErrorHover:a.icon["error-hover"],iconInteractiveHover:a.icon["interactive-hover"],iconErrorClicked:a.icon["error-clicked"],iconInteractiveClicked:a.icon["interactive-clicked"],iconMutedDisabledAlt:a.icon["muted-disabled"],iconSubtleDisabledAlt:a.icon["subtle-disabled"],shadow:a.shadow.elevation}}const W2={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"},shadow:{elevation:"rgb(55 65 81 / 15%)"}},jo={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"},shadow:{elevation:"rgb(55 65 81 / 15%)"}},Nk=["sms","totp","passkey"],Fk=["metamask","phantom","brave_wallet","rainbow","uniswap_wallet_extension","uniswap_extension","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","crypto.com_wallet_extension","crypto.com_onchain","binance","bitget_wallet","coinbase_wallet","coinbase_smart_wallet","base_account","metamask","trust","safe","rainbow","uniswap","zerion","argent","spot","omni","cryptocom","blockchain","safepal","bitget_wallet","zengo","1inch","binance","exodus","mew_wallet","alphawallet","keyring_pro","mathwallet","unstoppable","obvious","ambire","internet_money_wallet","coin98","abc_wallet","arculus_wallet","haha","cling_wallet","broearn","copiosa","burrito_wallet","enjin_wallet","plasma_wallet","avacus","bee","pitaka","pltwallet","minerva","kryptogo","prema","slingshot","kriptonio","timeless","secux","bitizen","blocto","okx_wallet","safemoon","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","privy","unknown","phantom","solflare","glow","backpack","jupiter","mobile_wallet_adapter"];function k4(e,t,n,r,i){let a,s,o,l,c,u,p,h,f,y,m,w,E,_,C,k,S,b,F=n?console.warn:()=>{},H=[];if(t?.loginMethods)for(let ue of(a=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),l=t.loginMethods.includes("wallet"),c=t.loginMethods.includes("google"),u=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),m=t.loginMethods.includes("spotify"),w=t.loginMethods.includes("instagram"),h=t.loginMethods.includes("tiktok"),f=t.loginMethods.includes("line"),y=t.loginMethods.includes("twitch"),_=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),C=t.loginMethods.includes("apple"),k=t.loginMethods.includes("farcaster"),S=t.loginMethods.includes("telegram"),o=t.loginMethods.includes("passkey"),t.loginMethods))typeof ue=="string"&&ue.startsWith("privy:")&&H.push(ue);else a=e.email_auth,s=e.sms_auth,l=e.wallet_auth||e.solana_wallet_auth,c=e.google_oauth,u=e.twitter_oauth,p=e.discord_oauth,_=e.github_oauth,m=e.spotify_oauth,w=e.instagram_oauth,h=e.tiktok_oauth,f=e.line_oauth,y=e.twitch_oauth,E=e.linkedin_oauth,C=e.apple_oauth,k=e.farcaster_auth,S=e.telegram_auth||e.telegram_oauth,o=e.passkey_auth,b=e.custom_jwt_auth;e.passkey_auth&&(o=!0),typeof window<"u"&&typeof window.PublicKeyCredential!="function"&&(o=!1);let ae=[a,s].filter(Boolean),G=[c,u,p,_,m,w,h,f,y,E,C,k,S].filter(Boolean),he=[l].filter(Boolean),Be=t?.loginMethods?.includes("passkey")??!1,fe=e.passkeys_for_signup_enabled??!1,Ie=[o&&(fe||Be)].filter(Boolean),Ae=[b].filter(Boolean);if(ae.length+G.length+he.length+Ie.length+Ae.length+H.length===0)throw Error("You must enable at least one login method");let N=t?.appearance?.showWalletLoginFirst!==void 0?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;N&&he.length===0?(F("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),N=!1):N||G.length+ae.length!==0||(F("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),N=!0);let xe=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&F("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let ke=Tk({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((ke.includes("wallet_connect_qr")||ke.includes("wallet_connect"))&&ke.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let be=(({input:ue})=>{if(!ue||!ue.primary[0])return;let Y=[ue.primary[0]],ne=[];for(let Rt of(ue.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),ue.primary.slice(1)))Y.includes(Rt)?console.warn(`Duplicated login method: ${Rt}`):Y.push(Rt);for(let Rt of ue.overflow??[])Y.includes(Rt)||ne.includes(Rt)?console.warn(`Duplicated login method: ${Rt}`):ne.push(Rt);return{primary:Y,overflow:ne}})({input:t?.loginMethodsAndOrder}),Le=t?.intl?.defaultCountry??"US",{chains:ye,defaultChain:Me}=(function({supportedChains:ue,defaultChainFromConfig:Y}){let ne;if(ue){if(ue.length===0)throw Error("`supportedChains` must contain at least one chain");ne=_5(ue)}else ne=[...Ya];let Rt=ue?ne[0]:br,$n=Y??Rt;if(!ne.find((Ue=>Ue.id===$n.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:ne,defaultChain:$n}})({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),we=!!t?.defaultChain,ze=t?.customAuth?.getCustomAccessToken&&t?.customAuth?.enabled!==!1,q=ze?"all-users":e.embedded_wallet_config.ethereum.create_on_login,at=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let et=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,U=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,$e=e.smart_wallet_config;return{id:e.id,appClientId:i,name:e.name,legalName:e.legal_name??null,scriptNonce:t?.scriptNonce,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,emailDomain:t?.appearance?.emailDomain,landingHeader:t?.appearance?.landingHeader??Qr.appearance.landingHeader,loginMessage:typeof t?.appearance?.loginMessage=="string"?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Ok({backgroundTheme:t?.appearance?.theme??Qr.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:N?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:ke,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:ue,solanaWalletAuth:Y})=>ue&&Y?"ethereum-and-solana":ue?"ethereum-only":Y?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:l,email:a,sms:s,passkey:o,google:c,twitter:u,discord:p,github:_,spotify:m,instagram:w,tiktok:h,line:f,twitch:y,linkedin:E,apple:C,farcaster:k,telegram:S},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter((ue=>ue.enabled!==!1)),crossAppProviders:H,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:be,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??Qr.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:ye,defaultChain:Me,intl:{defaultCountry:Le,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:we,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:xe},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!ze&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:ze?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??q},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??at},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??r??"https://auth.privy.io"}},mfa:{methods:(e.mfa_methods??[]).filter((ue=>Nk.includes(ue))),noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:ze?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:et,telegramHasHmacCredentials:!!e.telegram_auth,telegramSeamlessAuthEnabled:!!e.telegram_seamless_auth_enabled,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??Qr._render.standalone},fundingConfig:U,fundingMethodConfig:{...t?.fundingMethodConfig??Qr.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??Qr.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??Qr.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:$e?.enabled?{enabled:$e.enabled,smartWalletVersion:$e.smart_wallet_version,smartWalletType:$e.smart_wallet_type,configuredNetworks:$e.configured_networks.map((ue=>({chainId:ue.chain_id,bundlerUrl:ue.bundler_url,paymasterUrl:ue.paymaster_url,paymasterContext:Pk(ue.paymaster_url,ue.paymaster_context)})))}:{enabled:$e?.enabled??!1},connectorsDebugLogs:t?.connectorsDebugLogs??!1}}const $4={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1};let od=g.createContext({appConfig:k4($4,void 0,!1),isServerConfigLoaded:!1,initializationError:null,setInitializationError:()=>{}});const jk=({children:e,client:t,legacyClient:n,clientConfig:r,appClientId:i})=>{let[a,s]=g.useState(null),[o,l]=g.useState(null),c=g.useMemo((()=>k4(a??$4,r,!!a,typeof window<"u"?window.location.origin:void 0,i)),[a,r,i]);return g.useEffect((()=>{if(!a)return;let u=(function(f){if(!f)return{};let{appearance:y,scriptNonce:m,supportedChains:w,defaultChain:E,externalWallets:_,...C}=f;return{...C,...w?{supportedChains:w.map((k=>k.id))}:void 0,...E?{defaultChain:E.id}:void 0,..._?{walletConnect:_.walletConnect?{enabled:_.walletConnect.enabled}:void 0,coinbaseWallet:_.coinbaseWallet,solana:{connectors:_.solana?.connectors?.get().map((k=>k.walletClientType))}}:void 0}})(r),p=(function(f,y=0){let m=3735928559^y,w=1103547991^y;for(let E,_=0;_<f.length;_++)m=Math.imul(m^(E=f.charCodeAt(_)),2654435761),w=Math.imul(w^E,1597334677);return m=Math.imul(m^m>>>16,2246822507)^Math.imul(w^w>>>13,3266489909),4294967296*(2097151&(w=Math.imul(w^w>>>16,2246822507)^Math.imul(m^m>>>13,3266489909)))+(m>>>0)})(JSON.stringify(u)).toString(),h=`privy:sent:${a.id}:${p}`;localStorage.getItem(h)||(n.createAnalyticsEvent({eventName:"sdk_initialize",payload:u}),localStorage.setItem(h,"t"))}),[r,a]),g.useEffect((()=>{a||(async()=>{try{await t.initialize();let u=t.app.getConfig();u.custom_api_url&&n.updateApiUrl(u.custom_api_url),s(u)}catch(u){let p=u instanceof Error?u:Error(String(u));l(p),console.warn("Error generating app config: ",p)}})()}),[]),d.jsx(od.Provider,{value:{appConfig:c,isServerConfigLoaded:!!a,initializationError:o,setInitializationError:l},children:e})},Ct=()=>{let{appConfig:e}=g.useContext(od);return e},f1=()=>{let{isServerConfigLoaded:e}=g.useContext(od);return e},Dk=()=>{let{initializationError:e,setInitializationError:t}=g.useContext(od);return{initializationError:e,setInitializationError:t}},qt=g.createContext({ready:!1,authenticated:!1,user:null,error:null,walletConnectors:null,connectWallet:D,login:D,connectOrCreateWallet:D,linkEmail:D,linkPhone:D,linkFarcaster:D,linkWallet:D,linkGoogle:D,linkTwitter:D,linkTwitch:D,linkDiscord:D,linkGithub:D,linkSpotify:D,linkInstagram:D,linkTelegram:D,linkTiktok:D,linkLine:D,linkLinkedIn:D,linkApple:D,linkPasskey:D,linkOAuth:D,logout:D,getAccessToken:D,signMessage:D,signTypedData:D,enrollInMfa:D,initEnrollmentWithSms:D,initEnrollmentWithTotp:D,initEnrollmentWithPasskey:D,promptMfa:D,init:D,submitEnrollmentWithSms:D,submitEnrollmentWithTotp:D,submitEnrollmentWithPasskey:D,unenroll:D,clear:D,submit:D,cancel:D,sendTransaction:D,signTransaction:D,setWalletPassword:D,setWalletRecovery:D,isModalOpen:!1,mfaMethods:[]}),it=()=>g.useContext(qt);var dc={exports:{}},zh;function Uk(){return zh||(zh=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,p,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,p||l,h),y=n?n+c:c;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],f]:l._events[y].push(f):(l._events[y]=f,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],u,p;if(this._eventsCount===0)return c;for(p in u=this._events)t.call(u,p)&&c.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},o.prototype.listeners=function(c){var u=n?n+c:c,p=this._events[u];if(!p)return[];if(p.fn)return[p.fn];for(var h=0,f=p.length,y=new Array(f);h<f;h++)y[h]=p[h].fn;return y},o.prototype.listenerCount=function(c){var u=n?n+c:c,p=this._events[u];return p?p.fn?1:p.length:0},o.prototype.emit=function(c,u,p,h,f,y){var m=n?n+c:c;if(!this._events[m])return!1;var w=this._events[m],E=arguments.length,_,C;if(w.fn){switch(w.once&&this.removeListener(c,w.fn,void 0,!0),E){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,u),!0;case 3:return w.fn.call(w.context,u,p),!0;case 4:return w.fn.call(w.context,u,p,h),!0;case 5:return w.fn.call(w.context,u,p,h,f),!0;case 6:return w.fn.call(w.context,u,p,h,f,y),!0}for(C=1,_=new Array(E-1);C<E;C++)_[C-1]=arguments[C];w.fn.apply(w.context,_)}else{var k=w.length,S;for(C=0;C<k;C++)switch(w[C].once&&this.removeListener(c,w[C].fn,void 0,!0),E){case 1:w[C].fn.call(w[C].context);break;case 2:w[C].fn.call(w[C].context,u);break;case 3:w[C].fn.call(w[C].context,u,p);break;case 4:w[C].fn.call(w[C].context,u,p,h);break;default:if(!_)for(S=1,_=new Array(E-1);S<E;S++)_[S-1]=arguments[S];w[C].fn.apply(w[C].context,_)}}return!0},o.prototype.on=function(c,u,p){return a(this,c,u,p,!1)},o.prototype.once=function(c,u,p){return a(this,c,u,p,!0)},o.prototype.removeListener=function(c,u,p,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return s(this,f),this;var y=this._events[f];if(y.fn)y.fn===u&&(!h||y.once)&&(!p||y.context===p)&&s(this,f);else{for(var m=0,w=[],E=y.length;m<E;m++)(y[m].fn!==u||h&&!y[m].once||p&&y[m].context!==p)&&w.push(y[m]);w.length?this._events[f]=w.length===1?w[0]:w:s(this,f)}return this},o.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&s(this,u)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(dc)),dc.exports}var Wk=Uk();const ld=Zl(Wk),Kh=e=>{let t;const n=new Set,r=(c,u)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const h=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(f=>f(t,h))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,i,o);return o},Vk=(e=>e?Kh(e):Kh),Hk=e=>e;function Zk(e,t=Hk){const n=de.useSyncExternalStore(e.subscribe,de.useCallback(()=>t(e.getState()),[e,t]),de.useCallback(()=>t(e.getInitialState()),[e,t]));return de.useDebugValue(n),n}const qh=e=>{const t=Vk(e),n=r=>Zk(t,r);return Object.assign(n,t),n},kn=(e=>e?qh(e):qh);var te={},V2={exports:{}},Bk=V2.exports,Gh;function zk(){return Gh||(Gh=1,(function(e,t){(function(n,r){var i="1.0.41",a="",s="?",o="function",l="undefined",c="object",u="string",p="major",h="model",f="name",y="type",m="vendor",w="version",E="architecture",_="console",C="mobile",k="tablet",S="smarttv",b="wearable",F="embedded",H=500,ae="Amazon",G="Apple",he="ASUS",Be="BlackBerry",fe="Browser",Ie="Chrome",Ae="Edge",N="Firefox",xe="Google",ke="Honor",be="Huawei",Le="Lenovo",ye="LG",Me="Microsoft",we="Motorola",ze="Nvidia",q="OnePlus",at="Opera",et="OPPO",U="Samsung",$e="Sharp",ue="Sony",Y="Xiaomi",ne="Zebra",Rt="Facebook",$n="Chromium OS",Ue="Mac OS",Ci=" Browser",da=function(Ne,We){var Ee={};for(var oe in Ne)We[oe]&&We[oe].length%2===0?Ee[oe]=We[oe].concat(Ne[oe]):Ee[oe]=Ne[oe];return Ee},kr=function(Ne){for(var We={},Ee=0;Ee<Ne.length;Ee++)We[Ne[Ee].toUpperCase()]=Ne[Ee];return We},Vn=function(Ne,We){return typeof Ne===u?nn(We).indexOf(nn(Ne))!==-1:!1},nn=function(Ne){return Ne.toLowerCase()},$r=function(Ne){return typeof Ne===u?Ne.replace(/[^\d\.]/g,a).split(".")[0]:r},Hn=function(Ne,We){if(typeof Ne===u)return Ne=Ne.replace(/^\s\s*/,a),typeof We===l?Ne:Ne.substring(0,H)},sr=function(Ne,We){for(var Ee=0,oe,hn,Zt,He,_e,v;Ee<We.length&&!_e;){var L=We[Ee],I=We[Ee+1];for(oe=hn=0;oe<L.length&&!_e&&L[oe];)if(_e=L[oe++].exec(Ne),_e)for(Zt=0;Zt<I.length;Zt++)v=_e[++hn],He=I[Zt],typeof He===c&&He.length>0?He.length===2?typeof He[1]==o?this[He[0]]=He[1].call(this,v):this[He[0]]=He[1]:He.length===3?typeof He[1]===o&&!(He[1].exec&&He[1].test)?this[He[0]]=v?He[1].call(this,v,He[2]):r:this[He[0]]=v?v.replace(He[1],He[2]):r:He.length===4&&(this[He[0]]=v?He[3].call(this,v.replace(He[1],He[2])):r):this[He]=v||r;Ee+=2}},Qe=function(Ne,We){for(var Ee in We)if(typeof We[Ee]===c&&We[Ee].length>0){for(var oe=0;oe<We[Ee].length;oe++)if(Vn(We[Ee][oe],Ne))return Ee===s?r:Ee}else if(Vn(We[Ee],Ne))return Ee===s?r:Ee;return We.hasOwnProperty("*")?We["*"]:Ne},ca={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},or={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},lr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,w],[/opios[\/ ]+([\w\.]+)/i],[w,[f,at+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[f,at+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[f,at]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[f,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[w,[f,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,w],[/quark(?:pc)?\/([-\w\.]+)/i],[w,[f,"Quark"]],[/\bddg\/([\w\.]+)/i],[w,[f,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[f,"UC"+fe]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[f,"Smart Lenovo "+fe]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+fe],w],[/\bfocus\/([\w\.]+)/i],[w,[f,N+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[f,at+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[f,at+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[f,"MIUI"+Ci]],[/fxios\/([\w\.-]+)/i],[w,[f,N]],[/\bqihoobrowser\/?([\w\.]*)/i],[w,[f,"360"]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,"$1Browser"],w],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1"+Ci],w],[/samsungbrowser\/([\w\.]+)/i],[w,[f,U+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[w,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[f,w],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[w,f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,Rt],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[f,Ie+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,Ie+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[f,"Android "+fe]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[w,Qe,ca]],[/(webkit|khtml)\/([\w\.]+)/i],[f,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],w],[/(wolvic|librewolf)\/([\w\.]+)/i],[f,w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[f,N+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[f,[w,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[f,[w,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[E,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[E,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[E,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[E,/ower/,a,nn]],[/ sun4\w[;\)]/i],[[E,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[E,nn]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[h,[m,U],[y,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[h,[m,U],[y,C]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[m,G],[y,C]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[m,G],[y,k]],[/(macintosh);/i],[h,[m,G]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[m,$e],[y,C]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[h,[m,ke],[y,k]],[/honor([-\w ]+)[;\)]/i],[h,[m,ke],[y,C]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[h,[m,be],[y,k]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[m,be],[y,C]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[h,/_/g," "],[m,Y],[y,k]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[h,/_/g," "],[m,Y],[y,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[m,et],[y,C]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[h,[m,Qe,{OnePlus:["304","403","203"],"*":et}],[y,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[m,"Vivo"],[y,C]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[h,[m,"Realme"],[y,C]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[h,[m,we],[y,C]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[m,we],[y,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[m,ye],[y,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[m,ye],[y,C]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[h,[m,Le],[y,k]],[/(nokia) (t[12][01])/i],[m,h,[y,k]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[h,/_/g," "],[y,C],[m,"Nokia"]],[/(pixel (c|tablet))\b/i],[h,[m,xe],[y,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[m,xe],[y,C]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[m,ue],[y,C]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[m,ue],[y,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[m,q],[y,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[m,ae],[y,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[m,ae],[y,C]],[/(playbook);[-\w\),; ]+(rim)/i],[h,m,[y,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[m,Be],[y,C]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[m,he],[y,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[m,he],[y,C]],[/(nexus 9)/i],[h,[m,"HTC"],[y,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[h,/_/g," "],[y,C]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[h,[m,"TCL"],[y,k]],[/(itel) ((\w+))/i],[[m,nn],h,[y,Qe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[m,"Acer"],[y,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[m,"Meizu"],[y,C]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[h,[m,"Ulefone"],[y,C]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[h,[m,"Energizer"],[y,C]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[h,[m,"Cat"],[y,C]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[h,[m,"Smartfren"],[y,C]],[/droid.+; (a(?:015|06[35]|142p?))/i],[h,[m,"Nothing"],[y,C]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[h,[m,"Archos"],[y,k]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[h,[m,"Archos"],[y,C]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,h,[y,k]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,h,[y,C]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,h,[y,k]],[/(surface duo)/i],[h,[m,Me],[y,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[m,"Fairphone"],[y,C]],[/(u304aa)/i],[h,[m,"AT&T"],[y,C]],[/\bsie-(\w*)/i],[h,[m,"Siemens"],[y,C]],[/\b(rct\w+) b/i],[h,[m,"RCA"],[y,k]],[/\b(venue[\d ]{2,7}) b/i],[h,[m,"Dell"],[y,k]],[/\b(q(?:mv|ta)\w+) b/i],[h,[m,"Verizon"],[y,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[m,"Barnes & Noble"],[y,k]],[/\b(tm\d{3}\w+) b/i],[h,[m,"NuVision"],[y,k]],[/\b(k88) b/i],[h,[m,"ZTE"],[y,k]],[/\b(nx\d{3}j) b/i],[h,[m,"ZTE"],[y,C]],[/\b(gen\d{3}) b.+49h/i],[h,[m,"Swiss"],[y,C]],[/\b(zur\d{3}) b/i],[h,[m,"Swiss"],[y,k]],[/\b((zeki)?tb.*\b) b/i],[h,[m,"Zeki"],[y,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],h,[y,k]],[/\b(ns-?\w{0,9}) b/i],[h,[m,"Insignia"],[y,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[m,"NextBook"],[y,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],h,[y,C]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],h,[y,C]],[/\b(ph-1) /i],[h,[m,"Essential"],[y,C]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[m,"Envizen"],[y,k]],[/\b(trio[-\w\. ]+) b/i],[h,[m,"MachSpeed"],[y,k]],[/\btu_(1491) b/i],[h,[m,"Rotor"],[y,k]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[h,[m,ze],[y,k]],[/(sprint) (\w+)/i],[m,h,[y,C]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[m,Me],[y,C]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[m,ne],[y,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[m,ne],[y,C]],[/smart-tv.+(samsung)/i],[m,[y,S]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[m,U],[y,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,ye],[y,S]],[/(apple) ?tv/i],[m,[h,G+" TV"],[y,S]],[/crkey/i],[[h,Ie+"cast"],[m,xe],[y,S]],[/droid.+aft(\w+)( bui|\))/i],[h,[m,ae],[y,S]],[/(shield \w+ tv)/i],[h,[m,ze],[y,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[m,$e],[y,S]],[/(bravia[\w ]+)( bui|\))/i],[h,[m,ue],[y,S]],[/(mi(tv|box)-?\w+) bui/i],[h,[m,Y],[y,S]],[/Hbbtv.*(technisat) (.*);/i],[m,h,[y,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,Hn],[h,Hn],[y,S]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[h,[y,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[y,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,h,[y,_]],[/droid.+; (shield)( bui|\))/i],[h,[m,ze],[y,_]],[/(playstation \w+)/i],[h,[m,ue],[y,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[m,Me],[y,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[h,[m,U],[y,b]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,h,[y,b]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[h,[m,et],[y,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[m,G],[y,b]],[/(opwwe\d{3})/i],[h,[m,q],[y,b]],[/(moto 360)/i],[h,[m,we],[y,b]],[/(smartwatch 3)/i],[h,[m,ue],[y,b]],[/(g watch r)/i],[h,[m,ye],[y,b]],[/droid.+; (wt63?0{2,3})\)/i],[h,[m,ne],[y,b]],[/droid.+; (glass) \d/i],[h,[m,xe],[y,b]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,h,[y,b]],[/; (quest( \d| pro)?)/i],[h,[m,Rt],[y,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[y,F]],[/(aeobc)\b/i],[h,[m,ae],[y,F]],[/(homepod).+mac os/i],[h,[m,G],[y,F]],[/windows iot/i],[[y,F]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[y,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[y,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[y,C]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[h,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[f,Ae+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[f,w],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,w],[/ladybird\//i],[[f,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,w],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[f,[w,Qe,or]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Qe,or],[f,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,Ue],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,f],[/(ubuntu) ([\w\.]+) like android/i],[[f,/(.+)/,"$1 Touch"],w],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[f,w],[/\(bb(10);/i],[w,[f,Be]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[w,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[f,N+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[f,Ie+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,$n],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,w],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,w]]},Ht=function(Ne,We){if(typeof Ne===c&&(We=Ne,Ne=r),!(this instanceof Ht))return new Ht(Ne,We).getResult();var Ee=typeof n!==l&&n.navigator?n.navigator:r,oe=Ne||(Ee&&Ee.userAgent?Ee.userAgent:a),hn=Ee&&Ee.userAgentData?Ee.userAgentData:r,Zt=We?da(lr,We):lr,He=Ee&&Ee.userAgent==oe;return this.getBrowser=function(){var _e={};return _e[f]=r,_e[w]=r,sr.call(_e,oe,Zt.browser),_e[p]=$r(_e[w]),He&&Ee&&Ee.brave&&typeof Ee.brave.isBrave==o&&(_e[f]="Brave"),_e},this.getCPU=function(){var _e={};return _e[E]=r,sr.call(_e,oe,Zt.cpu),_e},this.getDevice=function(){var _e={};return _e[m]=r,_e[h]=r,_e[y]=r,sr.call(_e,oe,Zt.device),He&&!_e[y]&&hn&&hn.mobile&&(_e[y]=C),He&&_e[h]=="Macintosh"&&Ee&&typeof Ee.standalone!==l&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&(_e[h]="iPad",_e[y]=k),_e},this.getEngine=function(){var _e={};return _e[f]=r,_e[w]=r,sr.call(_e,oe,Zt.engine),_e},this.getOS=function(){var _e={};return _e[f]=r,_e[w]=r,sr.call(_e,oe,Zt.os),He&&!_e[f]&&hn&&hn.platform&&hn.platform!="Unknown"&&(_e[f]=hn.platform.replace(/chrome os/i,$n).replace(/macos/i,Ue)),_e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return oe},this.setUA=function(_e){return oe=typeof _e===u&&_e.length>H?Hn(_e,H):_e,this},this.setUA(oe),this};Ht.VERSION=i,Ht.BROWSER=kr([f,w,p]),Ht.CPU=kr([E]),Ht.DEVICE=kr([h,m,y,_,C,S,k,b,F]),Ht.ENGINE=Ht.OS=kr([f,w]),e.exports&&(t=e.exports=Ht),t.UAParser=Ht;var pn=typeof n!==l&&(n.jQuery||n.Zepto);if(pn&&!pn.ua){var lt=new Ht;pn.ua=lt.getResult(),pn.ua.get=function(){return lt.getUA()},pn.ua.set=function(Ne){lt.setUA(Ne);var We=lt.getResult();for(var Ee in We)pn.ua[Ee]=We[Ee]}}})(typeof window=="object"?window:Bk)})(V2,V2.exports)),V2.exports}var Yh;function Kk(){if(Yh)return te;Yh=1,Object.defineProperty(te,"__esModule",{value:!0});function e(P){return P&&typeof P=="object"&&"default"in P?P.default:P}var t=g0(),n=e(t),r=zk(),i=new r,a=i.getBrowser(),s=i.getCPU(),o=i.getDevice(),l=i.getEngine(),c=i.getOS(),u=i.getUA(),p=function(A){return i.setUA(A)},h=function(A){if(!A){console.error("No userAgent string was provided");return}var $=new r(A);return{UA:$,browser:$.getBrowser(),cpu:$.getCPU(),device:$.getDevice(),engine:$.getEngine(),os:$.getOS(),ua:$.getUA(),setUserAgent:function(Z){return $.setUA(Z)}}},f=Object.freeze({ClientUAInstance:i,browser:a,cpu:s,device:o,engine:l,os:c,ua:u,setUa:p,parseUserAgent:h});function y(P,A){var $=Object.keys(P);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(P);A&&(j=j.filter(function(Z){return Object.getOwnPropertyDescriptor(P,Z).enumerable})),$.push.apply($,j)}return $}function m(P){for(var A=1;A<arguments.length;A++){var $=arguments[A]!=null?arguments[A]:{};A%2?y(Object($),!0).forEach(function(j){k(P,j,$[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors($)):y(Object($)).forEach(function(j){Object.defineProperty(P,j,Object.getOwnPropertyDescriptor($,j))})}return P}function w(P){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(A){return typeof A}:w=function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},w(P)}function E(P,A){if(!(P instanceof A))throw new TypeError("Cannot call a class as a function")}function _(P,A){for(var $=0;$<A.length;$++){var j=A[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(P,j.key,j)}}function C(P,A,$){return A&&_(P.prototype,A),P}function k(P,A,$){return A in P?Object.defineProperty(P,A,{value:$,enumerable:!0,configurable:!0,writable:!0}):P[A]=$,P}function S(){return S=Object.assign||function(P){for(var A=1;A<arguments.length;A++){var $=arguments[A];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(P[j]=$[j])}return P},S.apply(this,arguments)}function b(P,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(A&&A.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),A&&H(P,A)}function F(P){return F=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},F(P)}function H(P,A){return H=Object.setPrototypeOf||function(j,Z){return j.__proto__=Z,j},H(P,A)}function ae(P,A){if(P==null)return{};var $={},j=Object.keys(P),Z,Ve;for(Ve=0;Ve<j.length;Ve++)Z=j[Ve],!(A.indexOf(Z)>=0)&&($[Z]=P[Z]);return $}function G(P,A){if(P==null)return{};var $=ae(P,A),j,Z;if(Object.getOwnPropertySymbols){var Ve=Object.getOwnPropertySymbols(P);for(Z=0;Z<Ve.length;Z++)j=Ve[Z],!(A.indexOf(j)>=0)&&Object.prototype.propertyIsEnumerable.call(P,j)&&($[j]=P[j])}return $}function he(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}function Be(P,A){if(A&&(typeof A=="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return he(P)}function fe(P,A){return Ie(P)||Ae(P,A)||N(P,A)||ke()}function Ie(P){if(Array.isArray(P))return P}function Ae(P,A){var $=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if($!=null){var j=[],Z=!0,Ve=!1,xt,yn;try{for($=$.call(P);!(Z=(xt=$.next()).done)&&(j.push(xt.value),!(A&&j.length===A));Z=!0);}catch(po){Ve=!0,yn=po}finally{try{!Z&&$.return!=null&&$.return()}finally{if(Ve)throw yn}}return j}}function N(P,A){if(P){if(typeof P=="string")return xe(P,A);var $=Object.prototype.toString.call(P).slice(8,-1);if($==="Object"&&P.constructor&&($=P.constructor.name),$==="Map"||$==="Set")return Array.from(P);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return xe(P,A)}}function xe(P,A){(A==null||A>P.length)&&(A=P.length);for(var $=0,j=new Array(A);$<A;$++)j[$]=P[$];return j}function ke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var be={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},Le={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ye={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},Me={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},we=function(A){switch(A){case be.Mobile:return{isMobile:!0};case be.Tablet:return{isTablet:!0};case be.SmartTv:return{isSmartTV:!0};case be.Console:return{isConsole:!0};case be.Wearable:return{isWearable:!0};case be.Browser:return{isBrowser:!0};case be.Embedded:return{isEmbedded:!0};default:return Me}},ze=function(A){return p(A)},q=function(A){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return A||$},at=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},et=function(A){var $=at();return $&&$.platform&&($.platform.indexOf(A)!==-1||$.platform==="MacIntel"&&$.maxTouchPoints>1&&!window.MSStream)},U=function(A,$,j,Z,Ve){return{isBrowser:A,browserMajorVersion:q($.major),browserFullVersion:q($.version),browserName:q($.name),engineName:q(j.name),engineVersion:q(j.version),osName:q(Z.name),osVersion:q(Z.version),userAgent:q(Ve)}},$e=function(A,$,j,Z){return m({},A,{vendor:q($.vendor),model:q($.model),os:q(j.name),osVersion:q(j.version),ua:q(Z)})},ue=function(A,$,j,Z){return{isSmartTV:A,engineName:q($.name),engineVersion:q($.version),osName:q(j.name),osVersion:q(j.version),userAgent:q(Z)}},Y=function(A,$,j,Z){return{isConsole:A,engineName:q($.name),engineVersion:q($.version),osName:q(j.name),osVersion:q(j.version),userAgent:q(Z)}},ne=function(A,$,j,Z){return{isWearable:A,engineName:q($.name),engineVersion:q($.version),osName:q(j.name),osVersion:q(j.version),userAgent:q(Z)}},Rt=function(A,$,j,Z,Ve){return{isEmbedded:A,vendor:q($.vendor),model:q($.model),engineName:q(j.name),engineVersion:q(j.version),osName:q(Z.name),osVersion:q(Z.version),userAgent:q(Ve)}};function $n(P){var A=P?h(P):f,$=A.device,j=A.browser,Z=A.engine,Ve=A.os,xt=A.ua,yn=we($.type),po=yn.isBrowser,Ky=yn.isMobile,qy=yn.isTablet,op=yn.isSmartTV,lp=yn.isConsole,dp=yn.isWearable,cp=yn.isEmbedded;if(po)return U(po,j,Z,Ve,xt);if(op)return ue(op,Z,Ve,xt);if(lp)return Y(lp,Z,Ve,xt);if(Ky||qy)return $e(yn,$,Ve,xt);if(dp)return ne(dp,Z,Ve,xt);if(cp)return Rt(cp,$,Z,Ve,xt)}var Ue=function(A){var $=A.type;return $===be.Mobile},Ci=function(A){var $=A.type;return $===be.Tablet},da=function(A){var $=A.type;return $===be.Mobile||$===be.Tablet},kr=function(A){var $=A.type;return $===be.SmartTv},Vn=function(A){var $=A.type;return $===be.Browser},nn=function(A){var $=A.type;return $===be.Wearable},$r=function(A){var $=A.type;return $===be.Console},Hn=function(A){var $=A.type;return $===be.Embedded},sr=function(A){var $=A.vendor;return q($)},Qe=function(A){var $=A.model;return q($)},ca=function(A){var $=A.type;return q($,"browser")},or=function(A){var $=A.name;return $===ye.Android},lr=function(A){var $=A.name;return $===ye.Windows},Ht=function(A){var $=A.name;return $===ye.MAC_OS},pn=function(A){var $=A.name;return $===ye.WindowsPhone},lt=function(A){var $=A.name;return $===ye.IOS},Ne=function(A){var $=A.version;return q($)},We=function(A){var $=A.name;return q($)},Ee=function(A){var $=A.name;return $===Le.Chrome},oe=function(A){var $=A.name;return $===Le.Firefox},hn=function(A){var $=A.name;return $===Le.Chromium},Zt=function(A){var $=A.name;return $===Le.Edge},He=function(A){var $=A.name;return $===Le.Yandex},_e=function(A){var $=A.name;return $===Le.Safari||$===Le.MobileSafari},v=function(A){var $=A.name;return $===Le.MobileSafari},L=function(A){var $=A.name;return $===Le.Opera},I=function(A){var $=A.name;return $===Le.InternetExplorer||$===Le.Ie},T=function(A){var $=A.name;return $===Le.MIUI},M=function(A){var $=A.name;return $===Le.SamsungBrowser},O=function(A){var $=A.version;return q($)},W=function(A){var $=A.major;return q($)},B=function(A){var $=A.name;return q($)},Ce=function(A){var $=A.name;return q($)},De=function(A){var $=A.version;return q($)},st=function(){var A=at(),$=A&&A.userAgent&&A.userAgent.toLowerCase();return typeof $=="string"?/electron/.test($):!1},Je=function(A){return typeof A=="string"&&A.indexOf("Edg/")!==-1},ft=function(){var A=at();return A&&(/iPad|iPhone|iPod/.test(A.platform)||A.platform==="MacIntel"&&A.maxTouchPoints>1)&&!window.MSStream},me=function(){return et("iPad")},tt=function(){return et("iPhone")},Et=function(){return et("iPod")},Bt=function(A){return q(A)};function Sn(P){var A=P||f,$=A.device,j=A.browser,Z=A.os,Ve=A.engine,xt=A.ua;return{isSmartTV:kr($),isConsole:$r($),isWearable:nn($),isEmbedded:Hn($),isMobileSafari:v(j)||me(),isChromium:hn(j),isMobile:da($)||me(),isMobileOnly:Ue($),isTablet:Ci($)||me(),isBrowser:Vn($),isDesktop:Vn($),isAndroid:or(Z),isWinPhone:pn(Z),isIOS:lt(Z)||me(),isChrome:Ee(j),isFirefox:oe(j),isSafari:_e(j),isOpera:L(j),isIE:I(j),osVersion:Ne(Z),osName:We(Z),fullBrowserVersion:O(j),browserVersion:W(j),browserName:B(j),mobileVendor:sr($),mobileModel:Qe($),engineName:Ce(Ve),engineVersion:De(Ve),getUA:Bt(xt),isEdge:Zt(j)||Je(xt),isYandex:He(j),deviceType:ca($),isIOS13:ft(),isIPad13:me(),isIPhone13:tt(),isIPod13:Et(),isElectron:st(),isEdgeChromium:Je(xt),isLegacyEdge:Zt(j)&&!Je(xt),isWindows:lr(Z),isMacOs:Ht(Z),isMIUI:T(j),isSamsungBrowser:M(j)}}var rn=kr(o),Gt=$r(o),dr=nn(o),fn=Hn(o),an=v(a)||me(),l2=hn(a),Gr=da(o)||me(),d2=Ue(o),Ge=Ci(o)||me(),yt=Vn(o),Re=Vn(o),_t=or(c),Yt=pn(c),Zn=lt(c)||me(),Yr=Ee(a),Sd=oe(a),Td=_e(a),sy=L(a),ap=I(a),oy=Ne(c),ly=We(c),dy=O(a),cy=W(a),uy=B(a),py=sr(o),hy=Qe(o),fy=Ce(l),yy=De(l),my=Bt(u),gy=Zt(a)||Je(u),wy=He(a),vy=ca(o),Cy=ft(),_y=me(),by=tt(),Ly=Et(),Ay=st(),Ey=Je(u),xy=Zt(a)&&!Je(u),ky=lr(c),$y=Ht(c),Sy=T(a),Ty=M(a),Iy=function(A){if(!A||typeof A!="string"){console.error("No valid user agent string was provided");return}var $=h(A),j=$.device,Z=$.browser,Ve=$.os,xt=$.engine,yn=$.ua;return Sn({device:j,browser:Z,os:Ve,engine:xt,ua:yn})},My=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return _t?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Py=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return yt?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Ry=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return ap?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Oy=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return Zn?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Ny=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return Gr?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Fy=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return Ge?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},jy=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return Yt?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Dy=function(A){var $=A.renderWithFragment,j=A.children;A.viewClassName,A.style;var Z=G(A,["renderWithFragment","children","viewClassName","style"]);return d2?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Uy=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return rn?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Wy=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return Gt?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Vy=function(A){var $=A.renderWithFragment,j=A.children,Z=G(A,["renderWithFragment","children"]);return dr?$?n.createElement(t.Fragment,null,j):n.createElement("div",Z,j):null},Hy=function(A){var $=A.renderWithFragment,j=A.children;A.viewClassName,A.style;var Z=A.condition,Ve=G(A,["renderWithFragment","children","viewClassName","style","condition"]);return Z?$?n.createElement(t.Fragment,null,j):n.createElement("div",Ve,j):null};function Zy(P){return(function(A){b($,A);function $(j){var Z;return E(this,$),Z=Be(this,F($).call(this,j)),Z.isEventListenerAdded=!1,Z.handleOrientationChange=Z.handleOrientationChange.bind(he(Z)),Z.onOrientationChange=Z.onOrientationChange.bind(he(Z)),Z.onPageLoad=Z.onPageLoad.bind(he(Z)),Z.state={isLandscape:!1,isPortrait:!1},Z}return C($,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var Z=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:Z===0,isLandscape:Z===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":w(window))!==void 0&&Gr&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(P,S({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),$})(n.Component)}function By(){var P=t.useState(function(){var Ve=window.innerWidth>window.innerHeight?90:0;return{isPortrait:Ve===0,isLandscape:Ve===90,orientation:Ve===0?"portrait":"landscape"}}),A=fe(P,2),$=A[0],j=A[1],Z=t.useCallback(function(){var Ve=window.innerWidth>window.innerHeight?90:0,xt={isPortrait:Ve===0,isLandscape:Ve===90,orientation:Ve===0?"portrait":"landscape"};$.orientation!==xt.orientation&&j(xt)},[$.orientation]);return t.useEffect(function(){return(typeof window>"u"?"undefined":w(window))!==void 0&&Gr&&(Z(),window.addEventListener("load",Z,!1),window.addEventListener("resize",Z,!1)),function(){window.removeEventListener("resize",Z,!1),window.removeEventListener("load",Z,!1)}},[Z]),$}function sp(P){var A=P||window.navigator.userAgent;return h(A)}function zy(P){var A=P||window.navigator.userAgent,$=sp(A),j=Sn($);return[j,$]}return te.AndroidView=My,te.BrowserTypes=Le,te.BrowserView=Py,te.ConsoleView=Wy,te.CustomView=Hy,te.IEView=Ry,te.IOSView=Oy,te.MobileOnlyView=Dy,te.MobileView=Ny,te.OsTypes=ye,te.SmartTVView=Uy,te.TabletView=Fy,te.WearableView=Vy,te.WinPhoneView=jy,te.browserName=uy,te.browserVersion=cy,te.deviceDetect=$n,te.deviceType=vy,te.engineName=fy,te.engineVersion=yy,te.fullBrowserVersion=dy,te.getSelectorsByUserAgent=Iy,te.getUA=my,te.isAndroid=_t,te.isBrowser=yt,te.isChrome=Yr,te.isChromium=l2,te.isConsole=Gt,te.isDesktop=Re,te.isEdge=gy,te.isEdgeChromium=Ey,te.isElectron=Ay,te.isEmbedded=fn,te.isFirefox=Sd,te.isIE=ap,te.isIOS=Zn,te.isIOS13=Cy,te.isIPad13=_y,te.isIPhone13=by,te.isIPod13=Ly,te.isLegacyEdge=xy,te.isMIUI=Sy,te.isMacOs=$y,te.isMobile=Gr,te.isMobileOnly=d2,te.isMobileSafari=an,te.isOpera=sy,te.isSafari=Td,te.isSamsungBrowser=Ty,te.isSmartTV=rn,te.isTablet=Ge,te.isWearable=dr,te.isWinPhone=Yt,te.isWindows=ky,te.isYandex=wy,te.mobileModel=hy,te.mobileVendor=py,te.osName=ly,te.osVersion=oy,te.parseUserAgent=h,te.setUserAgent=ze,te.useDeviceData=sp,te.useDeviceSelectors=zy,te.useMobileOrientation=By,te.withOrientationChange=Zy,te}var Hr=Kk();const Ts=kn((()=>({listings:[],loading:!1}))),cc=Ts.setState,GV=e=>Ts.getState().listings.find((({slug:t})=>_l(t)===_l(e))),YV=e=>{let t;try{t=new URL(e).hostname}catch{return}return Ts.getState().listings.find((({homepage:n})=>{let r;try{r=new URL(n).hostname}catch{return!1}return t.includes(r)}))},S4=(e=!0)=>{let t=Ct(),n=Ts((a=>a.listings)),r=Ts((a=>a.loading)),i=!!n.length;return g.useEffect((()=>{e&&!i&&(cc({listings:[],loading:!0}),(async a=>{let s=new URL("v3/wallets","https://explorer-api.walletconnect.com");s.searchParams.append("projectId",a);let o=await fetch(s);return o.ok?Object.values((await o.json()).listings).sort((({slug:l},{slug:c})=>l==="rainbow"&&c==="metamask"?1:l==="metamask"||l==="rainbow"?-1:1)):(console.debug(`Failed to fetch WalletConnect listings: ${await o.text().catch((()=>"No response."))}`),[])})(t.walletConnectCloudProjectId).then((a=>cc({listings:a,loading:!1}))).catch((a=>{console.error(a),cc({listings:[],loading:!1})})))}),[e,i,t.walletConnectCloudProjectId]),{listings:n,loading:r}},JV=e=>{let{listings:t}=S4();return t.find((({slug:n})=>_l(n)===_l(e)))};function _l(e){return e==="cryptocom"?"cryptocom-defi":e==="binance"?"binance-defi":e.replace(/[-_]wallet$/,"")}function Bu(e){return["wallet_connect","backpack","binance","binanceus","bitget_wallet","bybit_wallet","cryptocom","haha_wallet","jupiter","metamask","okx_wallet","phantom","rabby_wallet","rainbow","ronin_wallet","safe","solflare","uniswap","zerion","kraken_wallet","robinhood_wallet"].some((t=>e?.includes(t)))}function ni(e){return e.type==="ethereum"}const qk=({...e}={})=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[d.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#121314"}),d.jsx("g",{transform:"translate(4, 4)",children:d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 318.6 318.6",children:[d.jsx("style",{children:".s1{stroke-linecap:round;stroke-linejoin:round}.s2{fill:#e4761b;stroke:#e4761b}.s3{fill:#f6851b;stroke:#f6851b}"}),d.jsx("path",{fill:"#e2761b",stroke:"#e2761b",className:"s1",d:"m274.1 35.5-99.5 73.9L193 65.8z"}),d.jsx("path",{d:"m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z",className:"s1 s2"}),d.jsx("path",{d:"m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z",className:"s1 s2"}),d.jsx("path",{fill:"#d7c1b3",stroke:"#d7c1b3",className:"s1",d:"m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"}),d.jsx("path",{fill:"#233447",stroke:"#233447",className:"s1",d:"m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"}),d.jsx("path",{fill:"#cd6116",stroke:"#cd6116",className:"s1",d:"m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"}),d.jsx("path",{fill:"#e4751f",stroke:"#e4751f",className:"s1",d:"m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"}),d.jsx("path",{d:"m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z",className:"s3"}),d.jsx("path",{fill:"#c0ad9e",stroke:"#c0ad9e",className:"s1",d:"m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"}),d.jsx("path",{fill:"#161616",stroke:"#161616",className:"s1",d:"m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"}),d.jsx("path",{fill:"#763d16",stroke:"#763d16",className:"s1",d:"m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"}),d.jsx("path",{d:"m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z",className:"s3"})]})})]}),T4=Object.freeze({phantom:{client:"phantom",name:"Phantom",installLink:Hr.isFirefox?"https://addons.mozilla.org/en-US/firefox/addon/phantom-app/":"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa?hl=en",chainTypes:["ethereum","solana"],get isInstalled(){if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom&&e?.phantom?.ethereum?.chainId||e?.phantom?.solana?.isPhantom)return!0}return!1},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=g2({client:this.client,isSolana:t,connectOnly:n});return`${e?"phantom://":"https://phantom.app/ul/"}browse/${r}?ref=${r}`}},solflare:{client:"solflare",name:"Solflare",installLink:Hr.isFirefox?"https://addons.mozilla.org/es/firefox/addon/solflare-wallet/":"https://chromewebstore.google.com/detail/solflare-wallet/bhhhlbepdkbapadjdnnojkbgioiodbic",chainTypes:["solana"],get isInstalled(){return"solflare"in window&&!!window?.solflare?.isSolflare},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=g2({client:this.client,isSolana:t,connectOnly:n});return`${e?"solflare://ul/v1/":"https://solflare.com/ul/v1/"}browse/${r}?ref=${r}`}},jupiter:{client:"jupiter",name:"Jupiter Wallet",installLink:"https://chromewebstore.google.com/detail/jupiter-wallet/iledlaeogohbilgbfhmbgkgmpplbfboh",chainTypes:["solana"],get isInstalled(){return"jupiter"in window&&!!window?.jupiter?.isJupiter},getMobileRedirect({isSolana:e,connectOnly:t}){let n=g2({client:this.client,isSolana:e,connectOnly:t});return`jupjupjup://jup.ag/browse/${n}?ref=${n}`}},backpack:{client:"backpack",name:"Backpack",installLink:"https://chromewebstore.google.com/detail/backpack/aflkmfhebedbjioipglgcbcmnbpgliof",chainTypes:["ethereum","solana"],get isInstalled(){return!(!("backpack"in window)||!window?.backpack?.ethereum?.isBackpack&&!window?.backpack?.solana?.isBackpack)},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=g2({client:this.client,isSolana:t,connectOnly:n});return`${e?"backpack://ul/v1/":"https://backpack.app/ul/v1/"}browse/${r}?ref=${r}`}},okx_wallet:{client:"okx_wallet",name:"OKX Wallet",installLink:"https://chromewebstore.google.com/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",chainTypes:["ethereum","solana"],get isInstalled(){return"okxwallet"in window&&!!window?.okxwallet?.isOkxWallet},getMobileRedirect({isSolana:e,connectOnly:t}){return`okx://wallet/dapp/url?dappUrl=${g2({client:this.client,isSolana:e,connectOnly:t})}`}}});function Gk({connectorType:e,walletClientType:t}){for(let n of Fk)if(e===n||t===n)return T4[n]}function XV({isMobile:e,walletConfig:t}){return!e&&t?.client==="phantom"}function g2({client:e,isSolana:t,connectOnly:n}){let r=new URL(window.location.href);return r.searchParams.set("privy_connector",t?"solana_adapter":"injected"),r.searchParams.set("privy_wallet_client",e),r.searchParams.set("privy_connect_only",String(n)),encodeURIComponent(r.href.replace(/\/$/g,""))}function I4(e){return e.chainType==="solana"}function Yk(e){return e.type==="solana"}const Jk=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Xk=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Qk=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function e$(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){t$(e);return}return t}function t$(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function n$(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Qk.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Jk.test(e)||Xk.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,e$)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}const r$=/#/g,i$=/&/g,a$=/\//g,s$=/=/g,y1=/\+/g,o$=/%5e/gi,l$=/%60/gi,d$=/%7c/gi,c$=/%20/gi;function u$(e){return encodeURI(""+e).replace(d$,"|")}function zu(e){return u$(typeof e=="string"?e:JSON.stringify(e)).replace(y1,"%2B").replace(c$,"+").replace(r$,"%23").replace(i$,"%26").replace(l$,"`").replace(o$,"^").replace(a$,"%2F")}function uc(e){return zu(e).replace(s$,"%3D")}function M4(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function p$(e){return M4(e.replace(y1," "))}function h$(e){return M4(e.replace(y1," "))}function f$(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const n of e.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const i=p$(r[1]);if(i==="__proto__"||i==="constructor")continue;const a=h$(r[2]||"");t[i]===void 0?t[i]=a:Array.isArray(t[i])?t[i].push(a):t[i]=[t[i],a]}return t}function y$(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${uc(e)}=${zu(n)}`).join("&"):`${uc(e)}=${zu(t)}`:uc(e)}function m$(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>y$(t,e[t])).filter(Boolean).join("&")}const g$=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,w$=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,v$=/^([/\\]\s*){2,}[^/\\]/,C$=/^\.?\//;function P4(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?g$.test(e):w$.test(e)||(t.acceptRelative?v$.test(e):!1)}function _$(e="",t){return e.endsWith("/")}function b$(e="",t){return(_$(e)?e.slice(0,-1):e)||"/"}function L$(e="",t){return e.endsWith("/")?e:e+"/"}function A$(e,t){if(x$(t)||P4(e))return e;const n=b$(t);if(e.startsWith(n)){const r=e[n.length];if(!r||r==="/"||r==="?")return e}return $$(n,e)}function E$(e,t){const n=S$(e),r={...f$(n.search),...t};return n.search=m$(r),T$(n)}function x$(e){return!e||e==="/"}function k$(e){return e&&e!=="/"}function $$(e,...t){let n=e||"";for(const r of t.filter(i=>k$(i)))if(n){const i=r.replace(C$,"");n=L$(n)+i}else n=r;return n}const R4=Symbol.for("ufo:protocolRelative");function S$(e="",t){const n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,p,h=""]=n;return{protocol:p.toLowerCase(),pathname:h,href:p+h,auth:"",host:"",search:"",hash:""}}if(!P4(e,{acceptRelative:!0}))return Jh(e);const[,r="",i,a=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,s="",o=""]=a.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(o=o.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:l,search:c,hash:u}=Jh(o);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:s,pathname:l,search:c,hash:u,[R4]:!r}}function Jh(e=""){const[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function T$(e){const t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",r=e.hash||"",i=e.auth?e.auth+"@":"",a=e.host||"";return(e.protocol||e[R4]?(e.protocol||"")+"//":"")+i+a+t+n+r}class O4 extends Error{constructor(t,n){super(t,n),this.name="FetchError",n?.cause&&!this.cause&&(this.cause=n.cause)}}function I$(e){const t=e.error?.message||e.error?.toString()||"",n=e.request?.method||e.options?.method||"GET",r=e.request?.url||String(e.request)||"/",i=`[${n}] ${JSON.stringify(r)}`,a=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",s=`${i}: ${a}${t?` ${t}`:""}`,o=new O4(s,e.error?{cause:e.error}:void 0);for(const l of["request","options","response"])Object.defineProperty(o,l,{get(){return e[l]}});for(const[l,c]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(o,l,{get(){return e.response&&e.response[c]}});return o}const M$=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Xh(e="GET"){return M$.has(e.toUpperCase())}function P$(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const R$=new Set(["image/svg","application/xml","application/xhtml","application/html"]),O$=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function N$(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return O$.test(t)?"json":t==="text/event-stream"?"stream":R$.has(t)||t.startsWith("text/")?"text":"blob"}function F$(e,t,n,r){const i=j$(t?.headers??e?.headers,n?.headers,r);let a;return(n?.query||n?.params||t?.params||t?.query)&&(a={...n?.params,...n?.query,...t?.params,...t?.query}),{...n,...t,query:a,params:a,headers:i}}function j$(e,t,n){if(!t)return new n(e);const r=new n(t);if(e)for(const[i,a]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(i,a);return r}async function Eo(e,t){if(t)if(Array.isArray(t))for(const n of t)await n(e);else await t(e)}const D$=new Set([408,409,425,429,500,502,503,504]),U$=new Set([101,204,205,304]);function N4(e={}){const{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function i(o){const l=o.error&&o.error.name==="AbortError"&&!o.options.timeout||!1;if(o.options.retry!==!1&&!l){let u;typeof o.options.retry=="number"?u=o.options.retry:u=Xh(o.options.method)?0:1;const p=o.response&&o.response.status||500;if(u>0&&(Array.isArray(o.options.retryStatusCodes)?o.options.retryStatusCodes.includes(p):D$.has(p))){const h=typeof o.options.retryDelay=="function"?o.options.retryDelay(o):o.options.retryDelay||0;return h>0&&await new Promise(f=>setTimeout(f,h)),a(o.request,{...o.options,retry:u-1})}}const c=I$(o);throw Error.captureStackTrace&&Error.captureStackTrace(c,a),c}const a=async function(l,c={}){const u={request:l,options:F$(l,c,e.defaults,n),response:void 0,error:void 0};if(u.options.method&&(u.options.method=u.options.method.toUpperCase()),u.options.onRequest&&(await Eo(u,u.options.onRequest),u.options.headers instanceof n||(u.options.headers=new n(u.options.headers||{}))),typeof u.request=="string"&&(u.options.baseURL&&(u.request=A$(u.request,u.options.baseURL)),u.options.query&&(u.request=E$(u.request,u.options.query),delete u.options.query),"query"in u.options&&delete u.options.query,"params"in u.options&&delete u.options.params),u.options.body&&Xh(u.options.method))if(P$(u.options.body)){const f=u.options.headers.get("content-type");typeof u.options.body!="string"&&(u.options.body=f==="application/x-www-form-urlencoded"?new URLSearchParams(u.options.body).toString():JSON.stringify(u.options.body)),f||u.options.headers.set("content-type","application/json"),u.options.headers.has("accept")||u.options.headers.set("accept","application/json")}else("pipeTo"in u.options.body&&typeof u.options.body.pipeTo=="function"||typeof u.options.body.pipe=="function")&&("duplex"in u.options||(u.options.duplex="half"));let p;if(!u.options.signal&&u.options.timeout){const f=new r;p=setTimeout(()=>{const y=new Error("[TimeoutError]: The operation was aborted due to timeout");y.name="TimeoutError",y.code=23,f.abort(y)},u.options.timeout),u.options.signal=f.signal}try{u.response=await t(u.request,u.options)}catch(f){return u.error=f,u.options.onRequestError&&await Eo(u,u.options.onRequestError),await i(u)}finally{p&&clearTimeout(p)}if((u.response.body||u.response._bodyInit)&&!U$.has(u.response.status)&&u.options.method!=="HEAD"){const f=(u.options.parseResponse?"json":u.options.responseType)||N$(u.response.headers.get("content-type")||"");switch(f){case"json":{const y=await u.response.text(),m=u.options.parseResponse||n$;u.response._data=m(y);break}case"stream":{u.response._data=u.response.body||u.response._bodyInit;break}default:u.response._data=await u.response[f]()}}return u.options.onResponse&&await Eo(u,u.options.onResponse),!u.options.ignoreResponseError&&u.response.status>=400&&u.response.status<600?(u.options.onResponseError&&await Eo(u,u.options.onResponseError),await i(u)):u.response},s=async function(l,c){return(await a(l,c))._data};return s.raw=a,s.native=(...o)=>t(...o),s.create=(o={},l={})=>N4({...e,...l,defaults:{...e.defaults,...l.defaults,...o}}),s}const bl=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),W$=bl.fetch?(...e)=>bl.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),V$=bl.Headers,H$=bl.AbortController,Z$=N4({fetch:W$,Headers:V$,AbortController:H$});var ce;let wi=class extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(t,n,r){super(t),n instanceof Error&&(this.cause=n),this.privyErrorCode=r}},Ll=class extends wi{constructor(t,n,r,i,a,s){super(r,i,a),this.type=t,this.status=n,this.data=s}},x=class extends wi{constructor(t,n,r){super(t,n,r),this.type="client_error"}},B$=class extends x{constructor(){super("Request timed out",void 0,"client_request_timeout")}},At=class extends wi{constructor(t,n,r){super(t,n,r),this.type="connector_error"}};const qe=e=>{if(e instanceof wi)return e;if(!(e instanceof O4))return ut(e);if(!e.response)return new Ll("api_error",null,e.message,e);let{type:t,message:n,error:r,code:i}=e.data;return new Ll(t||"ApiError",e.response.status,n||r,e,i,e.data)},ut=e=>e instanceof wi?e:e instanceof Error?new x(e.message,e):new x(`Internal error: ${e}`);var R=((ce={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",ce.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",ce.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",ce.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",ce.INVALID_DATA="invalid_data",ce.INVALID_CAPTCHA="invalid_captcha",ce.LINKED_TO_ANOTHER_USER="linked_to_another_user",ce.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",ce.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",ce.FAILED_TO_UPDATE_ACCOUNT="failed_to_update_account",ce.USER_EXITED_UPDATE_FLOW="exited_update_flow",ce.ALLOWLIST_REJECTED="allowlist_rejected",ce.OAUTH_USER_DENIED="oauth_user_denied",ce.OAUTH_UNEXPECTED="oauth_unexpected",ce.UNKNOWN_AUTH_ERROR="unknown_auth_error",ce.USER_EXITED_AUTH_FLOW="exited_auth_flow",ce.USER_EXITED_LINK_FLOW="exited_link_flow",ce.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",ce.MUST_BE_AUTHENTICATED="must_be_authenticated",ce.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",ce.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",ce.CLIENT_REQUEST_TIMEOUT="client_request_timeout",ce.INVALID_CREDENTIALS="invalid_credentials",ce.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",ce.UNKNOWN_MFA_ERROR="unknown_mfa_error",ce.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",ce.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",ce.EMBEDDED_WALLET_CREATE_ERROR="embedded_wallet_create_error",ce.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",ce.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",ce.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",ce.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",ce.TRANSACTION_FAILURE="transaction_failure",ce.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",ce.NOT_SUPPORTED="not_supported",ce.CAPTCHA_TIMEOUT="captcha_timeout",ce.INVALID_MESSAGE="invalid_message",ce.UNABLE_TO_SIGN="unable_to_sign",ce.CAPTCHA_FAILURE="captcha_failure",ce.CAPTCHA_DISABLED="captcha_disabled",ce.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",ce.TOO_MANY_REQUESTS="too_many_requests",ce.USER_LIMIT_REACHED="max_accounts_reached",ce.DISALLOWED_LOGIN_METHOD="disallowed_login_method",ce.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",ce.PASSKEY_NOT_ALLOWED="passkey_not_allowed",ce.USER_DOES_NOT_EXIST="user_does_not_exist",ce.INSUFFICIENT_BALANCE="insufficient_balance",ce.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED="onramp_minimum_identity_verification_required",ce.ONRAMP_IDENTITY_VERIFICATION_REQUIRED="onramp_identity_verification_required",ce.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED="onramp_document_verification_required",ce.ONRAMP_UNSUPPORTED_INFORMATION="onramp_unsupported_information",ce.ONRAMP_TRANSACTION_LIMIT_REACHED="transaction_limit_reached",ce.ONRAMP_QUOTE_EXPIRED="onramp_quote_expired",ce.ONRAMP_PAYMENT_METHOD_DECLINED="onramp_payment_method_declined",ce.ONRAMP_WALLET_OWNERSHIP_REQUIRED="onramp_wallet_ownership_required",ce.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",ce.BUFFER_NOT_DEFINED="buffer_not_defined",ce.UNSUPPORTED_WALLET_TYPE="unsupported_wallet_type",ce.NO_SOLANA_ACCOUNTS="no_solana_accounts",ce.UNKNOWN_FUNDING_ERROR="unknown_funding_error",ce);let bi=class extends x{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},aH=class extends x{constructor(t="Embedded wallet error",n){super(t,n,"unknown_embedded_wallet_error")}},oH=class extends x{constructor(t="User must be authenticated"){super(t,void 0,"must_be_authenticated")}},dH=class extends x{constructor(t){super("This application is in development mode and must be upgraded to production to log in new users.",t,"max_accounts_reached")}},Qh=class extends At{constructor(){super("No Solana accounts found in wallet",void 0,"no_solana_accounts")}};const Al=(e,t,n,r)=>{let i=Number(e),a=t.find((o=>o.id===i));if(!a)throw new At(`Unsupported chainId ${e}`,4901);let s=m1(a,n,r.appId);if(i===Di.id||i===us.id){let o=i===Di.id?Di:us;return Ko({transport:ls(s),chain:o})}return Ko({transport:ls(s),chain:a})},m1=(e,t,n)=>{let r,i=e.id,a=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])r=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[a])r=t.rpcUrls[a];else if(e.rpcUrls.privy?.http[0]){let s=new URL(e.rpcUrls.privy.http[0]);s.searchParams.append("privyAppId",n),r=s.toString()}else r=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!r)throw new At(`No RPC url found for ${i}`);return r},F4=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom||"isPhantom"in e?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,j4=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||F4(e)!=="MetaMask")return!1;if(e.providers){for(let n of e.providers)if(!j4(n))return!1}return!0},pH=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers){for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0}return!1},hH=(e,t)=>{let n=[],r=[];for(let[i,a]of e.entries())i<t?n.push(a):r.push(a);return[n,r]},fH=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),yH=(e,t)=>{let n=e.slice(0),r=[];for(;n.length;)r.push(n.splice(0,t));return r},z$=(e,t=3,n=4,r="ethereum")=>{if(!e)return"";let i=r==="ethereum"?2:0;return t+n+i+3>=e.length?e:`${e.slice(0,i+t)}...${e.slice(e.length-n,e.length)}`},mH=(e,t=3,n=4)=>z$(e,t,n,"solana"),El=e=>new Promise((t=>setTimeout(t,e)));function e6(e,{interval:t=100,timeout:n=5e3}={}){return new Promise(((r,i)=>{let a,s=0,o=()=>{s>=n?i("Max attempts reached without result"):(a=e(),s+=t,a==null?setTimeout(o,t):r(a))};o()}))}const Ku=(e,t={})=>{let n=t.delayMs||150,r=t.maxAttempts||270;return new Promise((async(i,a)=>{let s=!1,o=0;for(;!s&&o<r;){if(t.abortSignal?.aborted)return;e().then((l=>{s=!0,i(l)}),((...l)=>{s=!0,a(...l)})),o+=1,await El(n)}s||a(Error("Exceeded max attempts before resolving function"))}))},gH=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),xo=e=>typeof e=="string"?e:"0x"+e.toString(16);async function K$({store:e,walletList:t,externalWalletConfig:n,walletChainType:r,timeout:i=3e3}){let a=!1,s=window;return new Promise((o=>{function l(){if(a)return;a=!0,window.removeEventListener("ethereum#initialized",l);let c=e.getProviders();console.debug("Detected injected providers:",c.map((p=>p.info)));let u=[];for(let p of c)t.includes("coinbase_wallet")&&p.info.rdns==="com.coinbase.wallet"||r==="solana-only"&&p.info.rdns==="app.phantom"||u.push({type:p.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:p});if(r!=="solana-only")for(let p of(function(){let h=window,f=h.ethereum;if(!f)return[];let y=[];if(f.providers?.length)for(let m of f.providers)m&&y.push(m);return y.push(h.ethereum),y})()){let h=F4(p);if(!c.some((f=>f.info.name===h))){if(j4(p,!0)&&!u.find((f=>f.type==="metamask"))){u.push({type:"metamask",legacyInjectedProvider:p});continue}if(h==="Phantom"&&!u.find((f=>f.type==="phantom"))){u.push({type:"phantom",legacyInjectedProvider:p});continue}if(h==="Coinbase Wallet"&&!u.find((f=>f.type==="coinbase_wallet"&&n.coinbaseWallet?.config?.preference?.options!=="smartWalletOnly"))){u.push({type:"coinbase_wallet",legacyInjectedProvider:p});continue}u.find((f=>f.type==="unknown_browser_extension"))||u.push({type:"unknown_browser_extension",legacyInjectedProvider:p})}}o(u)}s.ethereum?l():(window.addEventListener("ethereum#initialized",l,{once:!0}),setTimeout((()=>{l()}),i))}))}function X2(e){return`eip155:${String(Number(e))}`}const wH=(e,t,n,r)=>{let i=Number(e),a=t.find((s=>s.id===i));if(!a)throw new At(`Unsupported chainId ${e}`,4901);return m1(a,n,r)},vH=(e,t)=>{let n=Number(e),r=t.find((i=>i.id===n));if(!r)throw new At(`Unsupported chainId ${e}`,4901);return r.blockExplorers?.default.url},xl=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},n=e.types.EIP712Domain??Object.entries(e.domain).map((([r,i])=>{if(i!=null&&typeof r=="string"&&r in t)return{name:r,type:t[r]}})).filter((r=>r!==void 0));return{...e,types:{...e.types,EIP712Domain:n}}};function CH(e,{min:t,max:n}){return Math.min(Math.max(e,t),n)}const D4=e=>e?.map((t=>({signer_id:t.signerId,override_policy_ids:t.policyIds})));let U4=class{get(t){let n=localStorage.getItem(t);return n===null?void 0:JSON.parse(n)}put(t,n){n!==void 0?localStorage.setItem(t,JSON.stringify(n)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map((([t])=>t))}};function qu(){try{let e="privy:__session_storage__test",t=new U4;return t.put(e,"blobby"),t.del(e),!0}catch{return!1}}var le=typeof window<"u"&&window.localStorage?new U4:new class{get(e){return this._cache[e]}put(e,t){t!==void 0?this._cache[e]=t:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};let ko="[Privy:Connectors]";function $o(e){if(!e||Object.keys(e).length===0)return"";let t=Object.entries(e).filter((([,n])=>n!=null)).map((([n,r])=>`${n}=${String(r)}`));return t.length>0?` (${t.join(", ")})`:""}const J=new class{setEnabled(e){this._enabled=e,e&&this.info("Debug logging enabled")}get enabled(){return this._enabled}debug(e,t){this._enabled&&console.debug(`${ko} ${e}${$o(t)}`)}info(e,t){this._enabled&&console.info(`${ko} ${e}${$o(t)}`)}warn(e,t){this._enabled&&console.warn(`${ko} ${e}${$o(t)}`)}error(e,t,n){if(!this._enabled)return;let r=t instanceof Error?t.message:t?String(t):void 0,i=r?{...n,error:r}:n;console.error(`${ko} ${e}${$o(i)}`)}connectionStart(e,t,n){this.info("Connection attempt started",{wallet:e,method:t,...n})}connectionSuccess(e,t){this.info("Connection successful",{wallet:e,...t})}connectionFailed(e,t,n){this.error("Connection failed",t,{wallet:e,...n})}connectorInit(e,t,n){this.debug("Connector initialized",{connector:e,wallet:t,...n})}connectorCreated(e,t,n){this.debug("Connector created",{connector:e,wallet:t,...n})}providerEvent(e,t,n){this.debug(`Provider event: ${e}`,{wallet:t,...n})}rpcRequest(e,t,n){this.debug(`RPC request: ${e}`,{wallet:t,...n})}rpcResponse(e,t,n){this.debug(`RPC response: ${e}`,{wallet:t,...n})}constructor(){this._enabled=!1}};let q$=class extends At{constructor(){super("Wallet timeout"),this.type="wallet_error",J.warn("Wallet request timed out")}};const e2=e=>{if(e instanceof At)return J.debug("Connector error (already formatted)",{error:e.message}),e;if(typeof e?.code=="number"){let n=new ur(e);return J.debug("Provider RPC error",{code:n.code,error:n.message}),n}let t=e instanceof Error?e.message:String(e);return J.debug("Unknown connector error",{error:t}),new At(t||"Unknown connector error",e)};let G$=class extends wi{constructor(t,n,r){super(t),this.type="provider_error",this.code=n,this.data=r}},ur=class extends G${constructor(t){super(t.message,t.code,t.data);let n=Object.values(va).find((r=>r.eipCode===t.code));this.details=n||va.UNKNOWN_ERROR,t.code===-32002&&(t.message?.includes("already pending for origin")?t.message?.includes("wallet_requestPermissions")?this.details=va.E32002_CONNECTION_ALREADY_PENDING:this.details=va.E32002_REQUEST_ALREADY_PENDING:t.message?.includes("Already processing")&&t.message.includes("eth_requestAccounts")&&(this.details=va.E32002_WALLET_LOCKED))}};const EH={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_LIMIT_REACHED:{message:"Unable to link",detail:"You've reached the maximum number of linked wallets.",retryable:!1},...va};let g1=class extends ld{constructor(t){super(),this.walletClientType=t,this.connected=!1,this.initialized=!1}};const w1=()=>{let e=le.get(x4);return e&&Array.isArray(e)&&e.map((t=>(n=>n&&typeof n.address=="string"&&typeof n.connectorType=="string"&&typeof n.walletClientType=="string"&&typeof n.connectedAt=="number")(t))).every(Boolean)?e:[]};let Y$=["phantom","glow","solflare","backpack","okx_wallet","walletconnect","mobile_wallet_adapter","jupiter","tokenpocket"];function J$(e){return e.toLowerCase().split(" ").join("_")}let X$=class extends g1{get isInstalled(){return!0}get wallet(){return this._wallet}buildConnectedWallet(){return this._wallet.accounts.map((t=>({type:"solana",provider:new v4({wallet:this._wallet,account:t}),address:t.address,connectedAt:Date.now(),walletClientType:this._wallet.name,connectorType:this.connectorType,imported:!1,meta:{name:this._wallet.name,id:this._wallet.name,icon:this._wallet.icon},isConnected:async()=>this._wallet.accounts.length>0,disconnect:async()=>{await this.disconnect()}})))}async syncAccounts(){this.wallets=this.buildConnectedWallet(),this.emit("walletsUpdated")}get walletBranding(){return{id:t6(this.wallet)?"walletconnect_solana":this.wallet.name,name:this.wallet.name,icon:this.wallet.icon}}async initialize(){J.debug("Initializing Solana connector",{wallet:this.walletClientType}),this.subscribeListeners(),await this.syncAccounts(),this.shouldAttemptAutoConnect()&&(J.debug("Attempting Solana auto-connect",{wallet:this.walletClientType}),await this.wallet.features["standard:connect"]?.connect({silent:!0}).catch((()=>{})),await this.isConnected()&&(J.debug("Solana auto-connect successful",{wallet:this.walletClientType}),await this.syncAccounts())),this.initialized=!0,this.emit("initialized")}async connect(t){if(J.connectionStart(this.walletClientType,"solana_adapter",{showPrompt:t.showPrompt}),t.showPrompt)try{await this.promptConnection()}catch(r){throw this._wallet.accounts.length===0?(J.warn("Solana wallet connected but has no accounts",{wallet:this.walletClientType}),new Qh):(J.connectionFailed(this.walletClientType,r,{method:"solana_adapter"}),r)}if(!await this.isConnected())throw J.warn("Solana wallet not connected after prompt",{wallet:this.walletClientType}),new Qh;await this.syncAccounts();let n=await this.getConnectedWallet();return n&&J.connectionSuccess(this.walletClientType),n}async getConnectedWallet(){return this.wallets.sort(((t,n)=>n.connectedAt-t.connectedAt))[0]||null}async isConnected(){return this._wallet.accounts.length>0}subscribeListeners(){this._unsubscribeListeners=this.wallet.features["standard:events"]?.on("change",this.onChange)}unsubscribeListeners(){this._unsubscribeListeners?.()}shouldAttemptAutoConnect(){return!(!this.autoConnectEnabled||!Y$.includes(this.walletClientType))&&(this.walletClientType!=="phantom"||w1().some((({walletClientType:t})=>t==="phantom")))}constructor(t,n){super(J$(t6(t)?"walletconnect_solana":t.name)),this.chainType="solana",this.connectorType="solana_adapter",this.disconnect=async()=>{J.debug("Disconnecting Solana wallet",{wallet:this.walletClientType}),await this.wallet.features["standard:disconnect"]?.disconnect().catch((r=>{J.error("Error disconnecting Solana wallet",r,{wallet:this.walletClientType})})),await this.syncAccounts()},this.promptConnection=async()=>{J.debug("Prompting Solana connection",{wallet:this.walletClientType});try{await this.wallet.features["standard:connect"]?.connect()}catch(r){throw J.connectionFailed(this.walletClientType,r,{method:"solana_adapter"}),e2(r)}},this.onChange=()=>{this.syncAccounts()},this._wallet=t,this.autoConnectEnabled=n,this.wallets=[]}};function t6(e){return"isWalletConnectSolana"in e&&e.isWalletConnectSolana}const W4="/api/v1/sessions",V4="/api/v1/sessions/logout",Q$="/api/v1/siwe/init",eS="/api/v1/siwe/authenticate",tS="/api/v1/siwe/link",nS="/api/v1/siwe/link_smart_wallet",rS="/api/v1/siwe/unlink",iS="/api/v1/siwe/transfer",aS="/api/v1/siws/init",sS="/api/v1/siws/authenticate",oS="/api/v1/siws/link",lS="/api/v1/siws/unlink",dS="/api/v1/siws/transfer",cS="/api/v1/farcaster/init",uS="/api/v1/farcaster/authenticate",pS="/api/v1/farcaster/link",hS="/api/v1/farcaster/status",fS="/api/v1/farcaster/unlink",yS="/api/v1/farcaster/transfer",mS="api/v2/farcaster/init",gS="api/v2/farcaster/authenticate",wS="/api/v1/passwordless/init",vS="/api/v1/passwordless/authenticate",CS="/api/v1/passwordless/link",_S="/api/v1/passwordless/unlink",bS="/api/v1/passwordless/update",LS="/api/v1/passwordless/transfer",AS="/api/v1/passwordless_sms/init",ES="/api/v1/passwordless_sms/link",xS="/api/v1/passwordless_sms/unlink",kS="/api/v1/passwordless_sms/authenticate",$S="/api/v1/passwordless_sms/update",SS="/api/v1/passwordless_sms/transfer",H4="/api/v1/oauth/init",Z4="/api/v1/oauth/authenticate",B4="/api/v1/oauth/link",TS="/api/v1/oauth/unlink",IS="/api/v1/oauth/transfer",$H="/api/v1/recovery/oauth/init",SH="/api/v1/recovery/oauth/init_icloud",TH="/api/v1/recovery/oauth/authenticate",MS="/api/v1/passkeys/link/init",PS="/api/v1/passkeys/authenticate/init",RS="/api/v1/passkeys/register/init",OS="/api/v1/passkeys/link",NS="/api/v1/passkeys/authenticate",FS="/api/v1/passkeys/register",jS="/api/v1/telegram/authenticate",DS="/api/v1/telegram/link",US="/api/v1/telegram/unlink",WS="/api/v1/telegram/transfer",VS="/api/v1/mfa/passwordless_sms/init",HS="/api/v1/mfa/passkeys/init",ZS="/api/v1/users/me/accept_terms",z4="/api/v1/analytics_events",BS="/api/v1/custom_jwt_account/authenticate",zS="/api/v1/custom_jwt_account/link",KS="/api/v1/guest/authenticate",qS="/api/v1/plugins/moonpay_on_ramp/sign",GS="/api/v1/funding/coinbase_on_ramp/init",YS="/api/v1/funding/coinbase_on_ramp/status",JS="/api/v1/wallets/revoke",XS="/api/v1/users/me",QS="/api/v1/scan/transaction";let Gu=kn((()=>({})));const eT=({children:e,configPlugins:t})=>(g.useEffect((()=>{if(t&&t.length!==0)return Gu.setState(Object.fromEntries(t.map((n=>[n.id,n])))),()=>{Gu.setState(Object.fromEntries(t.map((n=>[n.id,void 0]))))}}),[t]),d.jsx(d.Fragment,{children:e})),xa=e=>Gu.getState()[e],v1=()=>g.useCallback((e=>xa(e)),[]);function Yu(e){return crypto.getRandomValues(new Uint8Array(e))}function C1(){return Mt.base64urlnopad.fromBytes(Yu(36))}function K4(){return C1()}async function q4(e,t="S256"){if(t!="S256")return e;{let n=await(async function(r){let i=new TextEncoder().encode(r);return new Uint8Array(await crypto.subtle.digest("SHA-256",i))})(e);return Mt.base64urlnopad.fromBytes(n)}}function tT(){let e=le.get(U2);if(!e)throw new x("Authentication error.");return e}let Ii=class G4{static parse(t){try{return new G4(t)}catch{return null}}static throwIfNotWellFormedJwt(t){return gu(t),t}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}get issuer(){return this._decoded.iss}get audience(){return this._decoded.aud}isExpired(t=0){return Date.now()>=1e3*(this.expiration-t)}constructor(t){this.value=t,this._decoded=gu(t)}},nT=class Y4 extends Ii{static parse(t){try{return new Y4(t)}catch{return null}}get appId(){return this._decoded.aid?this._decoded.aid:this.audience}};const IH=({style:e,...t})=>d.jsxs("svg",{viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...e},...t,children:[d.jsx("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),d.jsx("path",{fillRule:"evenodd",clipRule:"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"})]}),MH="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTAyNCAxMDI0JyBmaWxsPSdub25lJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHN0eWxlPSdoZWlnaHQ6MjhweDt3aWR0aDoyOHB4Jz48cmVjdCB3aWR0aD0nMTAyNCcgaGVpZ2h0PScxMDI0JyBmaWxsPScjMDA1MkZGJyByeD0nMTAwJyByeT0nMTAwJz48L3JlY3Q+PHBhdGggZmlsbC1ydWxlPSdldmVub2RkJyBjbGlwLXJ1bGU9J2V2ZW5vZGQnIGQ9J00xNTIgNTEyQzE1MiA3MTAuODIzIDMxMy4xNzcgODcyIDUxMiA4NzJDNzEwLjgyMyA4NzIgODcyIDcxMC44MjMgODcyIDUxMkM4NzIgMzEzLjE3NyA3MTAuODIzIDE1MiA1MTIgMTUyQzMxMy4xNzcgMTUyIDE1MiAzMTMuMTc3IDE1MiA1MTJaTTQyMCAzOTZDNDA2Ljc0NSAzOTYgMzk2IDQwNi43NDUgMzk2IDQyMFY2MDRDMzk2IDYxNy4yNTUgNDA2Ljc0NSA2MjggNDIwIDYyOEg2MDRDNjE3LjI1NSA2MjggNjI4IDYxNy4yNTUgNjI4IDYwNFY0MjBDNjI4IDQwNi43NDUgNjE3LjI1NSAzOTYgNjA0IDM5Nkg0MjBaJyBmaWxsPSd3aGl0ZSc+PC9wYXRoPjwvc3ZnPg==";function J4(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r?.address!==i?.address||r&&i&&ni(r)&&ni(i)&&r?.chainId!==i?.chainId||r?.connectorType!==i?.connectorType||r?.connectedAt!==i?.connectedAt||r?.walletClientType!==i?.walletClientType||r?.isConnected!==i?.isConnected||r?.linked!==i?.linked)return!1}return!0}const X4=(e,t)=>e.rpcTimeouts&&e.rpcTimeouts[t]||sd;let ha;function pc(e){return e.chainType==="ethereum"}function Q4(e){return e.connectorType==="wallet_connect_v2"}class Qs extends g1{buildConnectedWallet(t,n,r,i){let a=async()=>!!this.wallets.find((s=>mn(s.address)===mn(t)));return{type:"ethereum",address:mn(t),chainId:n,meta:r,imported:i,switchChain:async s=>{let o,l;if(!a)throw new At("Wallet is not currently connected.");let c=this.wallets.find((h=>mn(h.address)===mn(t)))?.chainId;if(!c)throw new At("Unable to determine current chainId.");if(typeof s=="number"?(o=`0x${s.toString(16)}`,l=s):(o=s,l=Number(s)),c===X2(o))return;let u=this.chains.find((h=>h.id===l));if(!u)throw new At(`Unsupported chainId: ${s}`);let p=async()=>{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:o}]})};try{return await p()}catch(h){if(((f,y)=>{switch(y){case"coinbase_wallet":case"base_account":return f.message.includes("addEthereumChain");case"rabby_wallet":return f.message.includes("Unrecognized chain ID");default:return f.code===4902||f.message?.includes("4902")}})(h,this.walletClientType))return this.walletClientType==="rabby_wallet"&&await El(300),await this.proxyProvider.request({method:"wallet_addEthereumChain",params:[{chainId:o,chainName:u.name,nativeCurrency:u.nativeCurrency,rpcUrls:[u.rpcUrls.default?.http[0]??""],blockExplorerUrls:[u.blockExplorers?.default.url??""]}]}),p();throw this.walletClientType==="rainbow"&&h.message?.includes("wallet_switchEthereumChain")?new At(`Rainbow does not support the chainId ${n}`):h}},connectedAt:Date.now(),walletClientType:this.walletClientType,connectorType:this.connectorType,isConnected:a,getEthereumProvider:async()=>{if(!await a())throw new At("Wallet is not currently connected.");return this.proxyProvider},sign:async s=>{if(!await a())throw new At("Wallet is not currently connected.");return await this.sign(s)},disconnect:()=>{this.disconnect()}}}async syncAccounts(t){let n;J.debug("Syncing accounts",{wallet:this.walletClientType});let r=t;try{if(r===void 0){J.rpcRequest("eth_accounts",this.walletClientType);let l=await Ku((()=>this.proxyProvider.request({method:"eth_accounts"})),{maxAttempts:10,delayMs:500});J.rpcResponse("eth_accounts",this.walletClientType),Array.isArray(l)&&(r=l)}}catch{J.warn("Wallet did not respond to eth_accounts, using prefetched accounts",{wallet:this.walletClientType})}if(!r||!Array.isArray(r)||r.length<=0||!r[0])return void J.debug("No accounts found",{wallet:this.walletClientType});let i=r[0];if(!Bl(i))return;let a=mn(i),s=[];if(this.walletClientType==="privy"){let l=le.get(oc(a));this.chains.find((c=>c.id===Number(l)))||(le.del(oc(a)),l=null),n=l||`0x${this.defaultChain.id.toString(16)}`;try{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})}catch{J.warn("Unable to switch embedded wallet chain on initialization",{wallet:this.walletClientType,chainId:n})}}else try{J.rpcRequest("eth_chainId",this.walletClientType);let l=await Ku((()=>this.proxyProvider.request({method:"eth_chainId"})),{maxAttempts:10,delayMs:500});if(J.rpcResponse("eth_chainId",this.walletClientType),typeof l=="string")n=l;else{if(typeof l!="number")throw Error("Invalid chainId returned from provider");n=`0x${l.toString(16)}`}}catch{J.warn("Failed to get chainId from provider, using default",{wallet:this.walletClientType,defaultChainId:Hh}),n=Hh}let o=X2(n);if(!s.find((l=>mn(l.address)===a))){let l={name:this.walletBranding.name,icon:this.walletBranding.icon,id:this.walletBranding.id};s.push(this.buildConnectedWallet(mn(i),o,l,this.connectorType==="embedded_imported"))}J4(s,this.wallets)||(J.debug("Wallets updated",{wallet:this.walletClientType,address:a,chainId:o}),this.wallets=s,this.emit("walletsUpdated"))}async getConnectedWallet(){let t=await this.proxyProvider.request({method:"eth_accounts"});return this.wallets.sort(((n,r)=>r.connectedAt-n.connectedAt)).find((n=>t.find((r=>mn(r)===mn(n.address)))))||null}async isConnected(){let t=await this.proxyProvider.request({method:"eth_accounts"});return Array.isArray(t)&&t.length>0}async sign(t){return await this.connect({showPrompt:!1}),this.proxyProvider.request({method:"personal_sign",params:[En(t),this.wallets[0]?.address]})}subscribeListeners(){this.proxyProvider.on("accountsChanged",this.onAccountsChanged),this.proxyProvider.on("chainChanged",this.onChainChanged),this.proxyProvider.on("disconnect",this.onDisconnect),this.proxyProvider.on("connect",this.onConnect)}unsubscribeListeners(){this.proxyProvider.removeListener("accountsChanged",this.onAccountsChanged),this.proxyProvider.removeListener("chainChanged",this.onChainChanged),this.proxyProvider.removeListener("disconnect",this.onDisconnect),this.proxyProvider.removeListener("connect",this.onConnect)}constructor(t,n,r,i){super(t),this.chainType="ethereum",this.onAccountsChanged=a=>{J.providerEvent("accountsChanged",this.walletClientType,{accountsCount:a.length}),a.length===0?this.onDisconnect():this.syncAccounts(a)},this.onChainChanged=a=>{J.providerEvent("chainChanged",this.walletClientType,{chainId:a}),this.wallets.forEach((s=>{s.chainId=X2(a),this.walletClientType==="privy"&&le.put(oc(s.address),a)})),this.emit("walletsUpdated")},this.onDisconnect=()=>{J.providerEvent("disconnect",this.walletClientType),this.connected=!1,this.wallets=[],this.emit("walletsUpdated")},this.onConnect=async()=>{J.providerEvent("connect",this.walletClientType),this.connectorType==="base_account"&&this.connected||(this.connected=!0,this.connectorType==="coinbase_wallet"&&await El(500),this.syncAccounts())},this.wallets=[],this.walletClientType=t,this.chains=n,this.defaultChain=r,this.rpcConfig=i,this.rpcTimeoutDuration=X4(i,t),this.connected=!1,this.initialized=!1}}class eo{on(t,n){if(this.walletProvider)return this.addWalletProviderListener(t,n);this._subscriptions.push({eventName:t,listener:n})}addWalletProviderListener(t,n){if(typeof this.walletProvider?.on=="function")try{return this.walletProvider.on(t,n)}catch{console.warn("Unable to subscribe to wallet provider event")}else console.warn("Wallet provider does not support event subscriptions")}async request(t){if(!this.walletProvider)throw new At(`A wallet request of type ${t.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(t),this.walletTimeout()]).catch((n=>{throw e2(n)}))}constructor(t,n){this.removeListener=(r,i)=>{if(this.walletProvider)try{return this.walletProvider.removeListener(r,i)}catch{console.warn("Unable to remove wallet provider listener")}},this.walletTimeout=(r=new q$,i=this.rpcTimeoutDuration)=>new Promise(((a,s)=>setTimeout((()=>{s(r)}),i))),this.setWalletProvider=r=>{this.walletProvider&&this._subscriptions.forEach((i=>{this.removeListener(i.eventName,i.listener)})),this.walletProvider=r,this._subscriptions.forEach((i=>{this.addWalletProviderListener(i.eventName,i.listener)}))},this.walletProvider=t,this.rpcTimeoutDuration=n||sd,this._subscriptions=[]}}class rT extends Qs{async initialize(){await this.importPromise,await this.syncAccounts(),this.initialized=!0,this.emit("initialized")}async connect(t){return t.showPrompt&&await this.promptConnection(),await this.isConnected()?this.getConnectedWallet():null}disconnect(){this.proxyProvider.walletProvider.disconnect(),this.onDisconnect()}get walletBranding(){return{name:this.displayName,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAALZJREFUaEPtmjEOhDAMBNc/O14GvOzys3CAKK6eAlmaVGl2Zc+kTOU685vkc9/bnD2prZK5/TZY24z9P+g4F5hNh7/GdoG37WlAA5CATwgCxHENYISwQAMQII5rACOEBRqAAHFcAxghLNAABIjjGsAIYYEGIEAc1wBGCAs0AAHiuAYwQligAQgQxzWAEcICDUCAOK4BjBAWaAACxHENYISwQAMQII6fBjr+VHkW3+u+tfyxMpJaDgYzYxb/ALZVAAAAAElFTkSuQmCC",id:"com.coinbase.wallet"}}async promptConnection(){J.debug("Prompting connection via Base Account",{wallet:this.walletClientType});try{await this.importPromise,J.rpcRequest("eth_requestAccounts",this.walletClientType);let t=await this.proxyProvider.request({method:"eth_requestAccounts"});if(J.rpcResponse("eth_requestAccounts",this.walletClientType),!t||t.length===0||!t[0])throw new At("Unable to retrieve accounts");this.connected=!0,await this.syncAccounts([t[0]])}catch(t){throw J.connectionFailed(this.walletClientType,t,{method:"base_account"}),e2(t)}}constructor(t,n,r,i,a){super("base_account",t,n,r),this.connectorType="base_account",this.walletClientType="base_account",this.displayName="Base",this.setBaseAccountSdk=a,this.proxyProvider=new eo(void 0,this.rpcTimeoutDuration),this.subscribeListeners(),this.baseAccountConfig={...i,appChainIds:[n.id].concat(t.map((s=>s.id)))},ha?(this.proxyProvider.setWalletProvider(ha.getProvider()),this.setBaseAccountSdk(ha)):this.importPromise=K(()=>import("./index-B--T-Fmt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url).then((({createBaseAccountSDK:s})=>{ha=s(this.baseAccountConfig),this.proxyProvider.setWalletProvider(ha.getProvider()),this.setBaseAccountSdk(ha)})).catch(console.error)}}let iT=class extends Qs{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the EthereumNullConnector")}disconnect(){throw Error("disconnect called for an uninstalled wallet via the EthereumNullConnector")}promptConnection(t){throw Error(`promptConnection called for an uninstalled wallet via the EthereumNullConnector for ${t}`)}constructor({id:t,name:n,icon:r,walletClientType:i,defaultChain:a}){super(i,[],a,{}),this.connectorType="null",this.proxyProvider=new eo(void 0,sd),this.id=t,this.name=n,this.icon=r}};const aT=({style:e,...t}={})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",style:{...e},...t,children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),sT=({style:e,...t}={})=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"108",height:"108",viewBox:"0 0 108 108",fill:"none",style:{height:"28px",width:"28px",...e},...t,children:[d.jsx("rect",{width:"108",height:"108",rx:"23",fill:"#AB9FF2"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46.5267 69.9229C42.0054 76.8509 34.4292 85.6182 24.348 85.6182C19.5824 85.6182 15 83.6563 15 75.1342C15 53.4305 44.6326 19.8327 72.1268 19.8327C87.768 19.8327 94 30.6846 94 43.0079C94 58.8258 83.7355 76.9122 73.5321 76.9122C70.2939 76.9122 68.7053 75.1342 68.7053 72.314C68.7053 71.5783 68.8275 70.7812 69.0719 69.9229C65.5893 75.8699 58.8685 81.3878 52.5754 81.3878C47.993 81.3878 45.6713 78.5063 45.6713 74.4598C45.6713 72.9884 45.9768 71.4556 46.5267 69.9229ZM83.6761 42.5794C83.6761 46.1704 81.5575 47.9658 79.1875 47.9658C76.7816 47.9658 74.6989 46.1704 74.6989 42.5794C74.6989 38.9885 76.7816 37.1931 79.1875 37.1931C81.5575 37.1931 83.6761 38.9885 83.6761 42.5794ZM70.2103 42.5795C70.2103 46.1704 68.0916 47.9658 65.7216 47.9658C63.3157 47.9658 61.233 46.1704 61.233 42.5795C61.233 38.9885 63.3157 37.1931 65.7216 37.1931C68.0916 37.1931 70.2103 38.9885 70.2103 42.5795Z",fill:"#FFFDF8"})]});function hc(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var oT=0;async function ef(e,t){try{J.rpcRequest("eth_requestAccounts",t);let n=await e.request({method:"eth_requestAccounts"});return J.rpcResponse("eth_requestAccounts",t),n}catch(n){if(n.code===-32002&&n.message?.includes("Already processing")){J.debug("eth_requestAccounts already processing, retrying after delay",{wallet:t}),await new Promise((i=>setTimeout(i,500))),J.rpcRequest("eth_requestAccounts",t);let r=await e.request({method:"eth_requestAccounts"});return J.rpcResponse("eth_requestAccounts",t),r}throw n}}class tf extends Qs{async initialize(){J.debug("Initializing injected connector (EIP-6963)",{wallet:this.walletClientType}),await this.syncAccounts(),this.initialized=!0,this.emit("initialized")}async connect(t){if(J.connectionStart(this.walletClientType,"injected",{showPrompt:t.showPrompt}),t.showPrompt&&await this.promptConnection(),!await this.isConnected())return J.debug("Not connected after prompt",{wallet:this.walletClientType}),null;let n=await this.getConnectedWallet();return n&&J.connectionSuccess(this.walletClientType),n}get walletBranding(){return{name:this.providerDetail.info.name,icon:this.providerDetail.info.icon,id:this.providerDetail.info.rdns}}disconnect(){console.warn(`Programmatic disconnect with ${this.providerDetail.info.name} is not yet supported.`)}async promptConnection(){J.debug("Prompting connection via eth_requestAccounts",{wallet:this.walletClientType});try{let t=await ef(this.proxyProvider,this.walletClientType);if(!t||t.length===0||!t[0])throw new At("Unable to retrieve accounts");await this.syncAccounts([t[0]])}catch(t){throw J.connectionFailed(this.walletClientType,t,{method:"injected"}),e2(t)}}constructor(t,n,r,i,a){super(a||"unknown",t,n,r),this.connectorType="injected",this.proxyProvider=new eo(void 0,this.rpcTimeoutDuration),this.subscribeListeners(),this.providerDetail=i;let s=i.provider;this.proxyProvider.setWalletProvider(s)}}var Li="__private_"+oT+++"__walletBranding";class fc extends Qs{async initialize(){J.debug("Initializing legacy injected connector",{wallet:this.walletClientType}),await this.syncAccounts(),this.initialized=!0,this.emit("initialized")}async connect(t){if(J.connectionStart(this.walletClientType,"injected (legacy)",{showPrompt:t.showPrompt}),t.showPrompt&&await this.promptConnection(),!await this.isConnected())return J.debug("Not connected after prompt",{wallet:this.walletClientType}),null;let n=await this.getConnectedWallet();return n&&J.connectionSuccess(this.walletClientType),n}get walletBranding(){return hc(this,Li)[Li]??{name:"Browser Extension",icon:aT,id:"extension"}}disconnect(){J.debug("Disconnect requested (not supported for legacy injected)",{wallet:this.walletClientType})}async promptConnection(){J.debug("Prompting connection via eth_requestAccounts (legacy)",{wallet:this.walletClientType});try{let t=await ef(this.proxyProvider,this.walletClientType);if(!t||t.length===0||!t[0])throw new At("Unable to retrieve accounts");await this.syncAccounts([t[0]])}catch(t){throw J.connectionFailed(this.walletClientType,t,{method:"injected (legacy)"}),e2(t)}}constructor(t,n,r,i,a){super(a??"unknown",t,n,r),Object.defineProperty(this,Li,{writable:!0,value:void 0}),this.connectorType="injected",this.proxyProvider=new eo(void 0,this.rpcTimeoutDuration),this.subscribeListeners(),this.proxyProvider.setWalletProvider(i),a==="metamask"?hc(this,Li)[Li]={name:"MetaMask",icon:qk,id:"io.metamask"}:a==="phantom"&&(hc(this,Li)[Li]={name:"Phantom",icon:sT,id:"phantom"})}}class lT extends tf{disconnect(){console.warn("MetaMask does not support programmatic disconnect.")}async promptConnection(){J.debug("Prompting connection via MetaMask",{wallet:this.walletClientType});try{Hr.isMobile||(J.rpcRequest("wallet_requestPermissions",this.walletClientType),await this.proxyProvider.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),J.rpcResponse("wallet_requestPermissions",this.walletClientType)),J.rpcRequest("eth_requestAccounts",this.walletClientType);let t=await this.proxyProvider.request({method:"eth_requestAccounts"});if(J.rpcResponse("eth_requestAccounts",this.walletClientType),!t||t.length===0||!t[0])throw new At("Unable to retrieve accounts");await this.syncAccounts([t[0]])}catch(t){throw J.connectionFailed(this.walletClientType,t,{method:"metamask"}),e2(t)}}}class dT extends X${get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the SolanaNullConnector")}constructor({id:t,name:n,icon:r}){super({name:n},!1),this.connectorType="null",this.proxyProvider=new eo(void 0,sd),this.disconnect=async()=>{throw Error("disconnect called for an uninstalled wallet via the SolanaNullConnector")},this.promptConnection=async()=>{throw Error("promptConnection called for an uninstalled wallet via the SolanaNullConnector")},this.id=t,this.name=n,this.icon=r}}let nf=class extends ld{get wallets(){let t=new Set;return this.walletConnectors.flatMap((n=>n.wallets)).sort(((n,r)=>n.connectedAt&&r.connectedAt?r.connectedAt-n.connectedAt:0)).filter((n=>{let r=`${n.address}${n.walletClientType}${n.connectorType}${n.meta.id}`;return!t.has(r)&&(t.add(r),!0)}))}async initialize(t){if(J.info("Starting connector initialization",{reInit:t??!1}),this.initialized&&!t)return;if(t&&this.removeAllConnectors(),this.externalWalletConfig.disableAllExternalWallets)return void J.info("All external wallets disabled, skipping initialization");let n=K$({store:this.store,walletList:this.walletList,externalWalletConfig:this.externalWalletConfig,walletChainType:this.walletChainType}).then((l=>{J.info("Detected injected providers",{count:l.length,wallets:l.map((c=>c.type)).join(", ")}),l.forEach((({type:c,eip6963InjectedProvider:u,legacyInjectedProvider:p})=>{this.createEthereumWalletConnector({connectorType:"injected",walletClientType:c,providers:{eip6963InjectedProvider:u,legacyInjectedProvider:p}})}))}));for(let l of(this.walletList.includes("coinbase_wallet")&&this.createEthereumWalletConnector({connectorType:"coinbase_wallet",walletClientType:"coinbase_wallet"}),this.walletList.includes("base_account")&&this.createEthereumWalletConnector({connectorType:"base_account",walletClientType:"base_account"}),Object.values(T4)))!l.isInstalled&&this.walletList.includes(l.client)&&(["ethereum-only","ethereum-and-solana"].includes(this.walletChainType)&&l.chainTypes.includes("ethereum")&&this.createEthereumWalletConnector({connectorType:"null",walletClientType:l.client,walletConfig:l}),["ethereum-and-solana","solana-only"].includes(this.walletChainType)&&l.chainTypes.includes("solana")&&this.addSolanaWalletConnector(new dT({id:l.client,name:l.name})));let r=this.walletList.includes("wallet_connect_qr_solana")||Bu(this.walletList)&&this.walletChainType!=="ethereum-only",i=this.externalWalletConfig.walletConnect.enabled&&(this.walletList.includes("wallet_connect_qr")||Bu(this.walletList))&&this.walletChainType!=="solana-only",a=this.externalWalletConfig.solana.connectors?.get()||[],s=async l=>{await l.initializeProvider({walletConnectCloudProjectId:this.walletConnectCloudProjectId,privyAppName:this.privyAppName});let c=await l.hideSolanaSessionsFromSignClient();try{this.ethereumWalletConnectInitPromise||(this.ethereumWalletConnectInitPromise=this.initEthereumWalletConnect()),await this.ethereumWalletConnectInitPromise}finally{await l.unhideSolanaSessionsInSignClient(c)}await l.restoreSession()},o=async l=>{let c=l.find((p=>p.walletBranding?.id==="walletconnect_solana")),u=c?.wallet??null;!i||r&&u?r&&!i&&u?await u.initialize({walletConnectCloudProjectId:this.walletConnectCloudProjectId,privyAppName:this.privyAppName}):r&&i&&u&&await s(u):this.ethereumWalletConnectInitPromise||(this.ethereumWalletConnectInitPromise=this.initEthereumWalletConnect())};o(a),a.filter((l=>r||l.walletBranding?.id!=="walletconnect_solana")).forEach(this.addSolanaWalletConnector),this.externalWalletConfig.solana.connectors?._setOnConnectorsUpdated?.((l=>{o(l),l?.filter((c=>r||c.walletBranding?.id!=="walletconnect_solana")).forEach(this.addSolanaWalletConnector)})),await n,this.initialized=!0}findWalletConnector(t,n,r){return t==="wallet_connect_v2"?this.walletConnectors.filter(pc).find((i=>i.connectorType===t&&(!r||i.wallets.some((a=>a.address===r)))))??null:this.walletConnectors.filter(pc).find((i=>i.connectorType===t&&i.walletClientType===n&&(!r||i.wallets.some((a=>a.address===r)))))??null}findSolanaWalletConnector(t){return this.walletConnectors.filter(I4).find((n=>n.walletClientType==="unknown"?n.walletBranding.id===t:n.walletClientType===t))??null}onInitialized(t){J.connectorInit(t.connectorType,t.walletClientType,{walletsCount:t.wallets.length}),t.wallets.forEach((n=>{let r=this.storedConnections.find((i=>i.address===n.address&&i.connectorType===n.connectorType&&(n.type==="solana"&&i.walletClientType==="unknown"&&n.walletClientType==="unknown"?n.meta.id===i.id:i.walletClientType===n.walletClientType)));r&&(n.connectedAt=r.connectedAt)})),this.emit("walletsUpdated"),this.emit("connectorInitialized")}onWalletsUpdated(t){t.initialized&&this.emit("walletsUpdated")}initEthereumWalletConnect(){return this.createEthereumWalletConnector({connectorType:"wallet_connect_v2",walletClientType:"unknown"}).then((t=>{if(t)return new Promise((n=>{if(t.initialized)return void n();let r=setTimeout((()=>n()),5e3);t.once("initialized",(()=>{clearTimeout(r),n()}))}))}))}async createEthereumWalletConnector({connectorType:t,walletClientType:n,providers:r,walletConfig:i}){J.debug("Creating Ethereum wallet connector",{connector:t,wallet:n});let a=this.findWalletConnector(t,n);if(a&&pc(a))return J.debug("Found existing connector, reusing",{connector:t,wallet:n}),Q4(a)&&a.resetConnection(n),a;let s=`${t}:${n}`,o=this.pendingConnectorBuilds.get(s);if(o)return o;let l=(async()=>{if(t!=="injected"){if(t==="coinbase_wallet"){let{CoinbaseWalletConnector:u}=await K(()=>import("./coinbase-DCPC2L_R-2ivYfoMv.js"),__vite__mapDeps([15,2,1,8,16,4,5,6,7,3,17,13,18]),import.meta.url);return new u(this.chains,this.defaultChain,this.rpcConfig,this.externalWalletConfig.coinbaseWallet.config)}{if(t==="base_account")return new rT(this.chains,this.defaultChain,this.rpcConfig,this.externalWalletConfig.baseAccount.config,this.setBaseAccountSdk);if(t==="null")return i?new iT({id:i.client,name:i.name,defaultChain:this.defaultChain,walletClientType:i.client}):null;let{WalletConnectV2WalletConnector:u}=await K(()=>import("./walletconnect-v2-3frQFwbg-CzQk99gS.js").then(p=>p.F),__vite__mapDeps([19,8,2,9,20]),import.meta.url);return new u({walletConnectCloudProjectId:this.walletConnectCloudProjectId,rpcConfig:this.rpcConfig,chains:this.chains,defaultChain:this.defaultChain,shouldEnforceDefaultChainOnConnect:this.shouldEnforceDefaultChainOnConnect,privyAppId:this.privyAppId,privyAppName:this.privyAppName,walletClientType:n})}}return n==="metamask"&&r?.eip6963InjectedProvider?new lT(this.chains,this.defaultChain,this.rpcConfig,r?.eip6963InjectedProvider,"metamask"):n==="metamask"&&r?.legacyInjectedProvider?new fc(this.chains,this.defaultChain,this.rpcConfig,r?.legacyInjectedProvider,"metamask"):n==="phantom"&&r?.legacyInjectedProvider?new fc(this.chains,this.defaultChain,this.rpcConfig,r?.legacyInjectedProvider,"phantom"):r?.legacyInjectedProvider&&n==="unknown_browser_extension"?new fc(this.chains,this.defaultChain,this.rpcConfig,r?.legacyInjectedProvider):r?.eip6963InjectedProvider?new tf(this.chains,this.defaultChain,this.rpcConfig,r?.eip6963InjectedProvider,n):void 0})().then((u=>u??null)).finally((()=>{this.pendingConnectorBuilds.delete(s)}));this.pendingConnectorBuilds.set(s,l);let c=await l;return c?(J.connectorCreated(t,n),this.addWalletConnector(c)):J.debug("No connector created",{connector:t,wallet:n}),c}addWalletConnector(t){J.debug("Adding wallet connector",{connector:t.connectorType,wallet:t.walletClientType}),this.walletConnectors.push(t),t.on("initialized",(()=>this.onInitialized(t))),t.on("walletsUpdated",(()=>this.onWalletsUpdated(t))),t.initialize().catch((n=>{J.error("Failed to initialize connector",n,{connector:t.connectorType,wallet:t.walletClientType})}))}setWalletList(t){this.walletList=t,this.initialized&&this.initialize(!0).catch(console.error)}removeAllConnectors(){for(let t of this.walletConnectors)t.removeAllListeners();this.walletConnectors=[]}constructor(t,n,r,i,a,s,o,l,c,u,p,h,f){super(),this.ethereumWalletConnectInitPromise=null,this.pendingConnectorBuilds=new Map,this.addSolanaWalletConnector=async y=>{let m=this.findSolanaWalletConnector(y.walletClientType);if(!m||m.connectorType==="null"){if(m?.connectorType==="null"){let w=this.walletConnectors.indexOf(m);this.walletConnectors.splice(w,1)}this.addWalletConnector(y)}},J.setEnabled(f??!1),J.info("ConnectorManager initializing",{walletChainType:h||void 0,walletListCount:o.length}),this.privyAppId=t,this.walletConnectCloudProjectId=n,this.rpcConfig=r,this.chains=i,this.defaultChain=a,this.walletConnectors=[],this.initialized=!1,this.store=s,this.walletList=o,this.shouldEnforceDefaultChainOnConnect=l,this.externalWalletConfig=c,this.privyAppName=u,this.walletChainType=h||"ethereum-only",this.setBaseAccountSdk=p,this.storedConnections=w1()}};const kl=kn((()=>({identityToken:null})));function cT(){let{identityToken:e}=kl();return{identityToken:e}}let uT=[W4,V4,z4];class pT{async get(t,n){try{return await this.baseFetch(t,n)}catch(r){throw qe(r)}}async post(t,n,r){try{return await this.baseFetch(t,{method:"POST",...n?{body:n}:{},...r})}catch(i){throw qe(i)}}async delete(t,n){try{return await this.baseFetch(t,{method:"DELETE",...n})}catch(r){throw qe(r)}}constructor({appId:t,appClientId:n,client:r,defaults:i}){this.appId=t,this.appClientId=n,this.clientAnalyticsId=r.clientAnalyticsId,this.sdkVersion=A4,this.client=r,this.defaults=i,this.fallbackApiUrl=r.fallbackApiUrl,this.baseFetch=Z$.create({baseURL:this.defaults.baseURL,timeout:this.defaults.timeout,retry:3,retryDelay:500,retryStatusCodes:[408,409,425,500,502,503,504],credentials:"include",onRequest:async({request:a,options:s})=>{let o=new Headers(s.headers);o.set("privy-app-id",this.appId),this.appClientId&&o.set("privy-client-id",this.appClientId),o.set("privy-ca-id",this.clientAnalyticsId||""),o.set("privy-client",`react-auth:${this.sdkVersion}`);let l=uT.includes(a.toString());if(!o.has("authorization")){let c=await this.client.getAccessToken({disableAutoRefresh:l});c!==null&&o.set("authorization",`Bearer ${c}`)}s.headers=o,s.retryDelay&&typeof s.retryDelay=="number"&&(s.retryDelay=3*s.retryDelay)},onRequestError:({error:a})=>{if(a instanceof DOMException&&a.name==="AbortError")throw new B$}})}}const rf=e=>({rpId:e.rp_id,challenge:e.challenge,allowCredentials:e.allow_credentials?.map((t=>({id:t.id,type:t.type,transports:t.transports})))||[],timeout:e.timeout,extensions:{appid:e.extensions?.app_id,credProps:e.extensions?.cred_props,hmacCreateSecret:e.extensions?.hmac_create_secret},userVerification:e.user_verification}),af=Symbol("cross-tab-user-sync-plugin");class _1{async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(BS,{token:this.meta.token})}catch(t){throw qe(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(zS,{token:this.meta.token})}catch(t){throw qe(t)}}constructor(t){this.meta={token:t}}}function Is(e){return e?{"privy-ui":"t"}:void 0}class Oi{async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new x("Email and email code must be set prior to calling authenticate.");try{return await this.api.post(vS,{email:this.meta.email,code:this.meta.emailCode,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(t){throw qe(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new x("Email and email code must be set prior to calling authenticate.");try{return await this.api.post(CS,{email:this.meta.email,code:this.meta.emailCode})}catch(t){throw qe(t)}}async sendCodeEmail({email:t,captchaToken:n,withPrivyUi:r}){if(!this.api)throw new x("Auth flow has no API instance");if(t&&(this.meta.email=t),n&&(this.meta.captchaToken=n),!this.meta.email)throw new x("Email must be set when initialzing authentication.");let i=Is(r);try{return await this.api.post(wS,{email:this.meta.email,token:this.meta.captchaToken},{headers:{...i}})}catch(a){throw qe(a)}}constructor({email:t,captchaToken:n,disableSignup:r}){this.meta={email:t,captchaToken:n,disableSignup:r??!1}}}class sf extends Oi{async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode||!this.meta.oldAddress)throw new x("Email, email code, and an old email address must be set prior to calling update.");try{return await this.api.post(bS,{oldAddress:this.meta.oldAddress,newAddress:this.meta.email,code:this.meta.emailCode})}catch(t){throw qe(t)}}constructor(t,n,r){super({email:n,captchaToken:r}),this.meta={email:n,captchaToken:r,oldAddress:t,disableSignup:!1}}}class of{getOrCreateGuestCredential(t){let n=E4(t);if(qu()){if(le.get(n))return le.get(n);{let r=Mt.base64urlnopad.fromBytes(Yu(32));return le.put(n,r),r}}return Mt.base64urlnopad.fromBytes(Yu(32))}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(KS,{guest_credential:this.meta.guestCredential})}catch(t){throw qe(t)}}async link(){throw Error("Linking is not supported for the guest flow")}constructor(t){this.meta={guestCredential:this.getOrCreateGuestCredential(t)}}}function b1(){return typeof window<"u"&&window.location.protocol==="chrome-extension:"&&"chrome"in window}function lf(){return b1()?window.chrome?.runtime?.id:void 0}function Ju(){return b1()?typeof window.chrome?.identity?.launchWebAuthFlow=="function":!1}async function n6(e){return new Promise(((t,n)=>{Ju()?window.chrome.identity.launchWebAuthFlow({url:e,interactive:!0},(async r=>{try{let i=(function(){return b1()?window.chrome?.runtime?.lastError?.message:void 0})();if(i||!r){let c=`WebAuthFlow failed: ${i||"Response URI missing"}`;throw Error(c)}let a=new URL(r),s=lf();if(!s)throw Error("Invalid extension context");if(a.protocol==="chrome-extension:"){if(a.hostname!==s)throw Error("Invalid responseUri origin")}else{if(a.protocol!=="https:")throw Error("Invalid responseUri protocol");{let c=a.hostname.split(".");if(c.length!==3||c[1]!=="chromiumapp"||c[2]!=="org"||c[0]!==s)throw Error("Invalid responseUri origin")}}let o=a.searchParams.get("privy_oauth_state"),l=a.searchParams.get("privy_oauth_code");if(!o||!l)throw Error("Invalid responseUri - missing required parameters");t({privyOAuthState:o,privyOAuthCode:l})}catch(i){n(i)}})):n(Error("Chrome identity API not available"))}))}let Ca=class{addCaptchaToken(t){this.meta.captchaToken=t}isActive(){return!!(this.meta.authorizationCode&&this.meta.stateCode&&this.meta.provider)}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new x("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");if(this.meta.authorizationCode==="undefined")throw new x("User denied confirmation during OAuth flow");let t=tT();try{let n=await this.api.post(Z4,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode,code_verifier:t,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"});return le.del(U2),le.del(Cl),le.del(J2),n}catch(n){let r=qe(n);throw r.privyErrorCode?new x(r.message||"Invalid code during OAuth flow.",void 0,r.privyErrorCode):r.message==="User denied confirmation during OAuth flow"?new x("Invalid code during oauth flow.",void 0,R.OAUTH_USER_DENIED):new x("Invalid code during OAuth flow.",void 0,R.UNKNOWN_AUTH_ERROR)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new x("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling link.");if(this.meta.authorizationCode==="undefined")throw new x("User denied confirmation during OAuth flow");let t=le.get(U2);if(!t)throw new x("Authentication error.");try{let n=await this.api.post(B4,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode,code_verifier:t});return le.del(U2),n}catch(n){throw qe(n)}}async getAuthorizationUrl(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.provider)throw new x("Provider must be set when initializing OAuth authentication.");let t=C1();le.put(U2,t);let n=K4();le.put(vl,n);let r=await q4(t);this.meta.withPrivyUi||le.put(Cl,!0),this.meta.disableSignup?le.put(J2,!0):le.del(J2);let i=Is(this.meta.withPrivyUi),a=window.location.href,s=(function(){let o=lf();if(o)return`https://${o}.chromiumapp.org`})();s&&(a=s);try{return await this.api.post(H4,{provider:this.meta.provider,redirect_to:this.meta.customOAuthRedirectUrl||a,token:this.meta.captchaToken,code_challenge:r,state_code:n},{headers:{...i}})}catch(o){throw qe(o)}}constructor(t){this.meta=t}},Qn=class{execute(t){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(t)}finally{this.promise=null}})()),this.promise}constructor(t){this.promise=null,this.fn=t}};const Xu=({address:e,chainId:t,nonce:n})=>`${window.location.host} wants you to sign in with your Ethereum account:
|
|
41
|
+
${e}
|
|
42
|
+
|
|
43
|
+
By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.
|
|
44
|
+
|
|
45
|
+
URI: ${window.location.origin}
|
|
46
|
+
Version: 1
|
|
47
|
+
Chain ID: ${t}
|
|
48
|
+
Nonce: ${n}
|
|
49
|
+
Issued At: ${new Date().toISOString()}
|
|
50
|
+
Resources:
|
|
51
|
+
- https://privy.io`;let Do=class{get meta(){return{connectorType:this.wallet?.connectorType,walletClientType:this.wallet?.walletClientType,chainId:this.wallet?.chainId,address:this.wallet?.address,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new x("SiweFlow has no client instance");try{if(this.preparedMessage&&this.signature)return await this.client.authenticateWithSiweInternal({message:this.preparedMessage,signature:this.signature,chainId:this.wallet?.chainId,walletClientType:this.walletClientType??this.wallet?.walletClientType,connectorType:this.connectorType??this.wallet?.connectorType,mode:this._meta.disableSignup?"no-signup":"login-or-sign-up"});if(!this.wallet)throw new x("SiweFlow has no wallet instance");let{message:t,signature:n}=await this.sign();return await this.client.authenticateWithSiweInternal({message:t,signature:n,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(t){throw qe(t)}}async link(){if(!this.client)throw new x("SiweFlow has no client instance");try{if(!this.wallet)throw new x("SiweFlow has no wallet instance");let{message:t,signature:n}=await this.sign();return await this.client.linkWithSiweInternal({message:t,signature:n,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType})}catch(t){throw qe(t)}}async sign(){if(!this.client)throw new x("SiweFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new x("Could not prepare SIWE message");if(!this.wallet)throw new x("SiweFlow has no wallet instance");let t=await this.wallet.sign(this.preparedMessage);return{message:this.preparedMessage,signature:t}}async _getNonceOnce(){if(!this.client)throw new x("SiweFlow has no client instance");if(!this.wallet)throw new x("UI SiweFlow has no wallet instance");return await this.client.generateSiweNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new x("SiweFlow has no client instance");if(!this.wallet)throw new x("SiweFlow has no wallet instance");let t=this.wallet.address,n=this.wallet.chainId.replace("eip155:","");return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.preparedMessage=Xu({address:t,chainId:n,nonce:this.nonce}),this.preparedMessage}constructor(t,n,r,i=!1,a){this._meta={disableSignup:!1},this.getNonceOnce=new Qn(this._getNonceOnce.bind(this)),this.wallet=n,this.captchaToken=r,this.client=t,this._meta.disableSignup=i,this.preparedMessage=a?.message,this.signature=a?.signature,this.walletClientType=a?.walletClientType,this.connectorType=a?.connectorType}},Ni=class{async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new x("phone number and sms code must be set prior to calling authenticate.");try{return await this.api.post(kS,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(t){throw qe(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new x("phone number and sms code must be set prior to calling authenticate.");try{return await this.api.post(ES,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode})}catch(t){throw qe(t)}}async sendSmsCode({phoneNumber:t,captchaToken:n,withPrivyUi:r}){if(!this.api)throw new x("Auth flow has no API instance");if(t&&(this.meta.phoneNumber=t),n&&(this.meta.captchaToken=n),!this.meta.phoneNumber)throw new x("phone nNumber must be set when initialzing authentication.");let i=Is(r);try{return await this.api.post(AS,{phoneNumber:this.meta.phoneNumber,token:this.meta.captchaToken},{headers:{...i}})}catch(a){throw qe(a)}}constructor({phoneNumber:t,captchaToken:n,disableSignup:r}){this.meta={phoneNumber:t,captchaToken:n,disableSignup:r??!1}}},df=class extends Ni{async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode||!this.meta.oldPhoneNumber)throw new x("Phone number, sms code, and an old phone number must be set prior to calling update.");try{return await this.api.post($S,{old_phone_number:this.meta.oldPhoneNumber,new_phone_number:this.meta.phoneNumber,code:this.meta.smsCode})}catch(t){throw qe(t)}}constructor(t,n,r){super({phoneNumber:n,captchaToken:r}),this.meta={phoneNumber:n,captchaToken:r,oldPhoneNumber:t,disableSignup:!1}}};var yc,Ai=((yc={}).PRIVY="privy_access_token",yc.CUSTOMER="customer_access_token",yc);let hT=class{get token(){return this.privyAccessToken||this.customerAccessToken}getToken(t){return t==="privy_access_token"?this.privyAccessToken:this.customerAccessToken}get customerAccessToken(){return this._getToken(Aa)}get privyAccessToken(){return this._getToken(Fo)}_getToken(t){try{let n=le.get(t);return typeof n=="string"?Ii.throwIfNotWellFormedJwt(n):null}catch(n){return console.error(n),this.destroyLocalState(),null}}get refreshToken(){try{let t=le.get(ac);return typeof t=="string"?t:null}catch(t){return console.error(t),this.destroyLocalState(),null}}getProviderAccessToken(t){try{let n=le.get(Ea(t));if(typeof n!="string")return null;{let r=new Ii(n);return r.isExpired()?(le.del(Ea(t)),null):r.value}}catch(n){return console.error(n),null}}get mightHaveServerCookies(){try{let t=Lt.get(sc);return t!==void 0&&t.length>0}catch(t){console.error(t)}return!1}hasRefreshCredentials(t="privy_access_token"){let n=typeof this.getToken(t)=="string",r=typeof this.refreshToken=="string"&&this.refreshToken!==$k;return this.mightHaveServerCookies||n&&r}hasActiveAccessToken(t){let n=Ii.parse(this.getToken(t));return n!==null&&!n.isExpired(30)}authenticate(t){return this.authenticateOnce.execute(t)}link(t){return this.linkOnce.execute(t)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}storeProviderAccessToken(t,n){typeof n=="string"?le.put(Ea(t),n):le.del(Ea(t))}updateIdentityToken(t){typeof t=="string"?this.storeIdentityToken(t):this.clearIdentityToken()}async _authenticate(t){try{let n=await t.authenticate(),{user:r,is_new_user:i,oauth_tokens:a}=n;this.handleTokenResponse(n);let s=a?{provider:a.provider,accessToken:a.access_token,accessTokenExpiresInSeconds:a.access_token_expires_in_seconds,refreshToken:a.refresh_token,refreshTokenExpiresInSeconds:a.refresh_token_expires_in_seconds,scopes:a.scopes}:void 0;return this._trackAuthenticateEvents(t,i),{user:Kt(r),isNewUser:i,oAuthTokens:s}}catch(n){throw console.warn("Error authenticating session"),ut(n)}}_trackAuthenticateEvents(t,n){let r=(function(i){return i instanceof Oi?"email":i instanceof Ni?"sms":i instanceof Do?"siwe":i instanceof of?"guest":i instanceof _1?"custom_auth":i instanceof Ca?i.meta.provider:null})(t);r&&this.client&&this.client.createAnalyticsEvent({eventName:"sdk_authenticate",payload:{method:r,isNewUser:n}}),r==="siwe"&&this.client&&this.client.createAnalyticsEvent({eventName:"sdk_authenticate_siwe",payload:{connectorType:t.meta.connectorType,walletClientType:t.meta.walletClientType}})}async _link(t){try{let n=await t.link(),r=n.oauth_tokens,i=r?{provider:r.provider,accessToken:r.access_token,accessTokenExpiresInSeconds:r.access_token_expires_in_seconds,refreshToken:r.refresh_token,refreshTokenExpiresInSeconds:r.refresh_token_expires_in_seconds,scopes:r.scopes}:void 0;return{user:Kt(n),oAuthTokens:i}}catch(n){throw console.warn("Error linking account"),ut(n)}}async _refresh(){if(!this.api)throw new x("Session has no API instance");if(!this.client)throw new x("Session has no PrivyClient instance");await this.client.getAccessToken({disableAutoRefresh:!0});let t=this.token,n=this.refreshToken;if(this.client.useServerCookies&&!this.mightHaveServerCookies&&this.token&&window.location.origin===this.client.apiUrl)return this.destroyLocalState(),null;try{let r;if(!(t&&n||this.mightHaveServerCookies))return null;{let i={};t&&(i.authorization=`Bearer ${t}`),r=await this.api.post(W4,n?{refresh_token:n}:{},{headers:i})}return this.handleTokenResponse(r),Kt(r.user)}catch(r){if(r instanceof Ll&&r.privyErrorCode===R.MISSING_OR_INVALID_TOKEN)return console.warn("Unable to refresh tokens - token is missing or no longer valid"),this.destroyLocalState(),null;throw ut(r)}}handleTokenResponse(t){t.session_update_action&&t.session_update_action!=="set"?t.session_update_action==="clear"?this.destroyLocalState():t.session_update_action==="ignore"&&(t.token&&(this.storeCustomerAccessToken(t.token),this.storePrivyAccessToken(t.privy_access_token)),t.identity_token&&this.storeIdentityToken(t.identity_token)):this._storeAllTokens(t)}_storeAllTokens(t){this.storeRefreshToken(t.refresh_token),this.storeCustomerAccessToken(t.token),this.storePrivyAccessToken(t.privy_access_token),t.identity_token&&this.storeIdentityToken(t.identity_token)}async _destroy(){try{await this.api?.post(V4,{refresh_token:this.refreshToken})}catch{console.warn("Error destroying session")}this.destroyLocalState()}destroyLocalState(){this.storeRefreshToken(null),this.storeCustomerAccessToken(null),this.storePrivyAccessToken(null),this.clearIdentityToken()}storeCustomerAccessToken(t){if(typeof t=="string"){let n=le.get(Aa);le.put(Aa,t);let r=Ii.parse(t)?.expiration;this.writeCookie(Wh,t,{expires:r?new Date(1e3*r):void 0}),n!==t&&this.client?.onStoreCustomerAccessToken?.(t)}else le.del(Aa),Lt.remove(Wh),this.client?.onDeleteCustomerAccessToken?.()}storeRefreshToken(t){typeof t=="string"?(le.put(ac,t),this.writeCookie(sc,"t",{expires:30})):(le.del(ac),Lt.remove(kk),Lt.remove(sc))}storePrivyAccessToken(t){typeof t=="string"?le.put(Fo,t):le.del(Fo)}storeIdentityToken(t){if(kl.setState({identityToken:t}),this.client?.useServerCookies)return;le.put(Hu,t);let n=Ii.parse(t)?.expiration;this.writeCookie(Vh,t,{expires:n?new Date(1e3*n):void 0})}writeCookie(t,n,r){t4({useServerCookies:this.client?.useServerCookies,cookieWriteBehavior:this.client?.cookieWriteBehavior})&&Lt.set(t,n,{sameSite:"Strict",secure:!(Hr.isSafari&&window.location.origin.startsWith("http://localhost")),...r})}clearIdentityToken(){le.del(Hu),kl.setState({identityToken:null}),Lt.remove(Vh)}constructor(){this.authenticateOnce=new Qn((async t=>this._authenticate(t))),this.linkOnce=new Qn((async t=>this._link(t))),this.refreshOnce=new Qn(this._refresh.bind(this)),this.destroyOnce=new Qn(this._destroy.bind(this))}},mc,ja;var fT=0,gc="__private_"+fT+++"__getOrGenerateClientAnalyticsId";let cf=class{getAppId(){return this.appId}initializeConnectorManager({walletConnectCloudProjectId:t,rpcConfig:n,chains:r,defaultChain:i,store:a,walletList:s,shouldEnforceDefaultChainOnConnect:o,externalWalletConfig:l,appName:c,walletChainType:u,setBaseAccountSdk:p,connectorsDebugLogs:h}){this.connectors||(this.connectors=new nf(this.appId,t,n,r,i,a,s,o,l,c,p,u,h))}generateApi(){let t=new pT({appId:this.appId,appClientId:this.appClientId,client:this,defaults:{baseURL:this.apiUrl,timeout:this.timeout}});return this.session.api=t,t}updateApiUrl(t){this.apiUrl=t||this.fallbackApiUrl,this.api=this.generateApi(),t&&(this.useServerCookies=!0)}authenticate(){if(!this.authFlow)throw new x("No auth flow in progress.");return this.session.authenticate(this.authFlow)}async link(){if(!this.authFlow)throw new x("No auth flow in progress.");let{oAuthTokens:t}=await this.session.link(this.authFlow);return{user:await this.getAuthenticatedUser(),oAuthTokens:t}}storeProviderAccessToken(t,n){this.session.storeProviderAccessToken(t,n)}getProviderAccessToken(t){return this.session.getProviderAccessToken(t)}async logout(){await this.session.destroy(),this.authFlow=void 0}clearProviderAcccessTokens(t){t.linkedAccounts.filter((n=>n.type==="cross_app")).forEach((n=>{this.storeProviderAccessToken(n.providerApp.id,null)}))}startAuthFlow(t){return t.api=this.api,this.authFlow=t,this.authFlow}async initMfaSmsVerification(){try{await this.api.post(VS,{action:"verify"})}catch(t){throw qe(t)}}async initMfaPasskeyVerification(){try{let t=await this.api.post(HS,{});return rf(t.options)}catch(t){throw qe(t)}}async getCrossAppProviderDetails(t){try{return this._cachedProviderAppDetails[t]||(this._cachedProviderAppDetails[t]=await this.api.get(`/api/v1/apps/${t}/cross-app/details`)),this._cachedProviderAppDetails[t]}catch(n){console.error("Error fetching cross app provider details",n)}}async acceptTerms(){try{let t=await this.api.post(ZS,{});return Kt(t)}catch(t){throw ut(t)}}async unlinkEmail(t){try{let n=await this.api.post(_S,{address:t});return await this.getAuthenticatedUser()??Kt(n)}catch(n){throw ut(n)}}async unlinkPhone(t){try{let n=await this.api.post(xS,{phoneNumber:t});return await this.getAuthenticatedUser()??Kt(n)}catch(n){throw ut(n)}}async unlinkEthereumWallet(t){try{let n=await this.api.post(rS,{address:t});return await this.getAuthenticatedUser()??Kt(n)}catch(n){throw ut(n)}}async unlinkSolanaWallet(t){try{let n=await this.api.post(lS,{address:t});return await this.getAuthenticatedUser()??Kt(n)}catch(n){throw ut(n)}}async unlinkOAuth(t,n){try{let r=await this.api.post(TS,{provider:t,subject:n});return await this.getAuthenticatedUser()??Kt(r)}catch(r){throw ut(r)}}async unlinkFarcaster(t){try{let n=await this.api.post(fS,{fid:t});return await this.getAuthenticatedUser()??Kt(n)}catch(n){throw ut(n)}}async unlinkTelegram(t){try{let n=await this.api.post(US,{telegram_user_id:t});return await this.getAuthenticatedUser()??Kt(n)}catch(n){throw ut(n)}}async revokeDelegatedWallet(){try{await this.api.post(JS,{})}catch(t){throw ut(t)}}async createAnalyticsEvent({eventName:t,payload:n,timestamp:r,options:i}){if(typeof window<"u")try{if(!this.clientAnalyticsId)return void console.warn("No client analytics id set, refusing to send analytics event");await this.api.post(z4,{event_name:t,client_id:this.clientAnalyticsId,payload:{...n||{},clientTimestamp:r?r.toISOString():new Date().toISOString()}},{retry:-1,keepalive:i?.keepAlive??!1})}catch{}}async signMoonpayOnRampUrl(t){try{return this.api.post(qS,t)}catch(n){throw ut(n)}}async initCoinbaseOnRamp(t){try{return this.api.post(GS,t)}catch(n){throw ut(n)}}async getCoinbaseOnRampStatus({partnerUserId:t}){try{return this.api.get(`${YS}?partnerUserId=${t}`)}catch(n){throw ut(n)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(t){if(!t?.disableAutoRefresh&&this.useServerCookies&&this.session.mightHaveServerCookies&&!this.session.getToken(Ai.PRIVY)&&!this.session.getToken(Ai.CUSTOMER)){await this.session.refresh();let n={disableAutoRefresh:!0};return await this.getPrivyAccessToken(n)||await this.getCustomerAccessToken(n)}return await this.getPrivyAccessToken(t)||await this.getCustomerAccessToken(t)}async getCustomerAccessToken(t){return await this._getToken(Ai.CUSTOMER,t)}async getPrivyAccessToken(t){return await this._getToken(Ai.PRIVY,t)}async _getToken(t,n){if(this.session.getToken(t)){if(this.session.hasActiveAccessToken(t))return this.session.hasRefreshCredentials(t)?nT.parse(this.session.getToken(t))?.appId!==this.appId?(await this.logout(),null):this.session.getToken(t):(this.session.destroyLocalState(),null);{if(n?.disableAutoRefresh||!this.session.hasRefreshCredentials(t))return null;let r=xa(af);if(r){let i=async()=>(await this.session.refresh(),this.session.getToken(t));return await r.withRefreshLock({onLeader:i,onFollowerReleased:async()=>this.session.hasActiveAccessToken(t)?this.session.getToken(t):i()})}return await this.session.refresh(),this.session.getToken(t)}}{let r=t===Ai.PRIVY?Ai.CUSTOMER:Ai.PRIVY;return!n?.disableAutoRefresh&&this.useServerCookies&&this.session.mightHaveServerCookies&&!this.session.getToken(r)?(await this.session.refresh(),this.session.getToken(t)):null}}async getUsdTokenPrice(t){try{return(await this.api.get(`/api/v1/token_price?chainId=${t.id}&tokenSymbol=${t.nativeCurrency.symbol}`)).usd}catch{return void console.error(`Unable to fetch token price for chain with id ${t.id}`)}}async getUsdPriceForSol(){try{return(await this.api.get("/api/v1/token_price?chainId=0&tokenSymbol=SOL")).usd}catch{return void console.error("Unable to fetch token price for SOL")}}async getSplTokenMetadata({mintAddress:t,cluster:n}){try{return await this.api.get(`/api/v1/spl_token_info?mint_address=${t}&cluster=${n}`)}catch{return void console.error(`Unable to fetch token metadata for ${n}:${t}`)}}async requestFarcasterSignerStatus(t){try{return await this.api.post("/api/v1/farcaster/signer/status",{ed25519_public_key:t})}catch(n){throw console.error("Unable to fetch Farcaster signer status"),n}}async generateSiweNonce({address:t,captchaToken:n}){try{return(await this.api.post(Q$,{address:t,token:n})).nonce}catch(r){throw ut(r)}}async authenticateWithSiweInternal({message:t,signature:n,chainId:r,walletClientType:i,connectorType:a,mode:s}){return await this.api.post(eS,{message:t,signature:n,chainId:r,walletClientType:i,connectorType:a,mode:s})}async linkWithSiweInternal({message:t,signature:n,chainId:r,walletClientType:i,connectorType:a}){return await this.api.post(tS,{message:t,signature:n,chainId:r,walletClientType:i,connectorType:a})}async linkSmartWallet({message:t,signature:n,smartWalletType:r,smartWalletVersion:i}){try{let a=await this.api.post(nS,{message:t,signature:n,smart_wallet_type:r,smart_wallet_version:i});return Kt(a)}catch(a){throw ut(a)}}async linkWithSiwe({message:t,signature:n,chainId:r,walletClientType:i,connectorType:a}){try{let s=await this.linkWithSiweInternal({message:t,signature:n,chainId:r,walletClientType:i,connectorType:a});return Kt(s)}catch(s){throw ut(s)}}async generateSiwsNonce({address:t,captchaToken:n}){try{return(await this.api.post(aS,{address:t,token:n})).nonce}catch(r){throw ut(r)}}async authenticateWithSiwsInternal({message:t,signature:n,walletClientType:r,connectorType:i,mode:a,messageType:s="plain"}){return await this.api.post(sS,{message:t,signature:n,walletClientType:r,connectorType:i,mode:a,message_type:s})}async authenticateWithSiws({message:t,signature:n,walletClientType:r,connectorType:i,mode:a,messageType:s="plain"}){let o=await this.authenticateWithSiwsInternal({message:t,signature:n,walletClientType:r,connectorType:i,mode:a,messageType:s});this.session.handleTokenResponse(o);let l=Kt(o.user);if(!l)throw Error("Authentication failed - no user returned");return{user:l,isNewUser:o.is_new_user||!1}}async sendAccountTransferRequest({nonce:t,account:n,accountType:r,externalWalletMetadata:i,telegramAuthResult:a,telegramWebAppData:s,farcasterEmbeddedAddress:o,oAuthUserInfo:l}){try{let c,u;switch(r){case"email":c=LS,u={nonce:t,email:n};break;case"sms":c=SS,u={nonce:t,phoneNumber:n};break;case"siwe":if(c=iS,!i)throw Error("Wallet parameters must be defined");u={nonce:t,address:n,...i};break;case"farcaster":c=yS,u={nonce:t,farcaster_id:n,farcaster_embedded_address:o};break;case"telegram":c=WS,u={nonce:t,telegram_auth_result:a,telegram_web_app_data:s};break;case"siws":c=dS,u={nonce:t,address:n,...i};break;case"custom":case"guest":case"passkey":throw Error("Invalid transfer account type");default:c=IS,u={nonce:t,userInfo:l}}let p=await this.api.post(c,u);return await this.getAuthenticatedUser()??Kt(p)}catch(c){throw ut(c)}}async linkWithSiwsInternal({message:t,signature:n,walletClientType:r,connectorType:i,messageType:a="plain"}){return await this.api.post(oS,{message:t,signature:n,walletClientType:r,connectorType:i,message_type:a})}async linkWithSiws({message:t,signature:n,walletClientType:r,connectorType:i,messageType:a="plain"}){try{let s=await this.linkWithSiwsInternal({message:t,signature:n,walletClientType:r,connectorType:i,messageType:a});return Kt(s)}catch(s){throw ut(s)}}async updateUserAndIdToken(){try{let t=await this.api.get(XS);return this.session.updateIdentityToken(t.identity_token),Kt(t.user)}catch(t){throw ut(t)}}async scanTransaction(t){try{return await this.api.post(QS,t)}catch(n){throw ut(n)}}constructor({apiUrl:t=Vu,appId:n,appClientId:r,timeout:i=xk,cookieWriteBehavior:a}){Object.defineProperty(this,gc,{value:yT}),this._cachedProviderAppDetails={},this.apiUrl=t,this.fallbackApiUrl=this.apiUrl,this.useServerCookies=t!==Vu&&t.startsWith("https://privy."),this.cookieWriteBehavior=a,this.timeout=i,this.appId=n,this.appClientId=r,this.clientAnalyticsId=(function(s,o){if(!Object.prototype.hasOwnProperty.call(s,o))throw TypeError("attempted to use private field on non-instance");return s})(this,gc)[gc](),mc||(mc=new hT),this.session=mc,this.api=this.generateApi(),this.session.client=this}};function yT(){if(typeof window>"u")return null;try{let t=le.get(Zu);if(typeof t=="string"&&t.length>0)return t}catch{}let e=crypto.randomUUID();try{return le.put(Zu,e),e}catch{return e}}function L1(){if(!ja)throw new x("No global PrivyClient instance found. Please ensure you have initialized the PrivyProvider.");return ja}async function mT(){return await ja?.updateUserAndIdToken(),ja?.useServerCookies?kl.getState().identityToken:Promise.resolve(le.get(Hu)||null)}function gT(e){ja||(ja=new cf({appId:e.appId,appClientId:e.clientId,apiUrl:e.apiUrl,cookieWriteBehavior:e.config?.sessions?.cookieWriteBehavior}))}async function wt(){let e=L1();return e?e.getAccessToken():Promise.resolve(le.get(Fo)||le.get(Aa)||null)}async function r6(e,t,n,r){let i=nl(e),{chain:a,authorizationList:s,...o}=await(async()=>r?await r():await t.prepareTransactionRequest({...i,account:{address:n,type:"json-rpc"}}))();return{...o,type:b5[o.type],authorizationList:e.authorizationList}}let wT=["calls","feePayer","feePayerSignature","feeToken","keyAuthorization","nonceKey","signature","validBefore","validAfter"];const vT=e=>{if(!e||typeof e!="object")return!1;if(e.type===Ql||typeof e.type=="string"&&e.type.toLowerCase()===L5)return!0;let t=e.account;return!!t?.keyType&&t.keyType!=="secp256k1"||t?.source==="accessKey"||wT.some((n=>e[n]!==void 0))},CT=e=>({type:Ql,from:e.from,chainId:e.chainId,nonce:e.nonce,gasLimit:e.gasLimit??e.gas,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,calls:_T(e),feeToken:bT(e.feeToken),nonceKey:LT(e.nonceKey),validBefore:e.validBefore,validAfter:e.validAfter,feePayerSignature:e.feePayerSignature??void 0,accessList:e.accessList});let _T=e=>{let t=e.calls&&e.calls.length>0?e.calls:e.to?[{to:e.to,data:e.data,value:e.value}]:[];if(t.length===0)throw Error("Tempo transactions require at least one call");return t.map((n=>{if(!n.to)throw Error("Tempo transaction calls require a `to` address");return{to:n.to,data:n.data,value:n.value}}))},bT=e=>{if(e!==void 0)return typeof e=="string"?e:`0x20c0${e.toString(16).padStart(36,"0")}`},LT=e=>{if(e!=="expiring"&&e!=="random")return e};const uf=async({wallet:e,signatureOptions:t})=>{let n=await e.getEthereumProvider();return Om({address:e.address,sign:async({hash:r})=>{if(e.walletClientType!=="privy")throw new se({error:"Unprefixed signing is not supported by external wallets.",code:"unsupported_wallet_type"});return await n.request({method:"secp256k1_sign",params:[r]})},signMessage:async({message:r})=>{let i;if(typeof r=="string")i=r;else{if(typeof r.raw!="string")throw new se({error:"signMessage only supports string messages or {raw: Hex} format",code:"invalid_input"});i=r.raw}return await n.request({method:"personal_sign",params:[i,e.address]})},signTypedData:async r=>{let i;if(t?.type==="erc1271"){let a=r?.domain,s=a?.chainId;i={signatureOptions:t,...s!=null?{caip2:`eip155:${s}`}:{}}}return await n.request({method:"eth_signTypedData_v4",params:[e.address,r,i]})},signTransaction:async r=>await n.request({method:"eth_signTransaction",params:[r]}),signAuthorization:async r=>{if(e.walletClientType!=="privy")throw new se({error:"EIP-7702 authorization signing is not supported by external wallets.",code:"unsupported_wallet_type"});let i={chainId:r.chainId,address:r.contractAddress??r.address,nonce:r.nonce},a=T0(i),s=I0(await n.request({method:"secp256k1_sign",params:[a]}));return{...i,...s}}})};function AT(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function ET(){const e=new Set;let t=[];const n=()=>AT(i=>{t.some(({info:a})=>a.uuid===i.info.uuid)||(t=[...t,i],e.forEach(a=>a(t,{added:[i]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(i=>i([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r?.()},findProvider({rdns:i}){return t.find(a=>a.info.rdns===i)},getProviders(){return t},reset(){this.clear(),r?.(),r=n()},subscribe(i,{emitImmediately:a}={}){return e.add(i),a&&i(t,{added:t}),()=>e.delete(i)}}}function pf(e){return{name:e.metadata?.shortName||e.name||"",universalLink:e.mobile.universal,deepLink:e.mobile.native}}function VH(e,t){let n=pf(t);if(Hr.isMobile&&Hr.isAndroid&&n.universalLink)return $l(n.universalLink,e);if(n.deepLink)return ff(n.deepLink,e);if(n.universalLink)return $l(n.universalLink,e);throw new x(`Unsupported wallet ${t.id}`)}function HH(e,t){let n=pf(t);if(n.universalLink)return $l(n.universalLink,e)}let A1="WALLETCONNECT_DEEPLINK_CHOICE";function ZH(){try{localStorage.removeItem(A1)}catch{}}function BH({href:e,name:t}){try{localStorage.setItem(A1,JSON.stringify({href:e,name:t}))}catch{}}function zH(){try{localStorage.removeItem(A1)}catch{}}function hf(e){return e.startsWith("http://")||e.startsWith("https://")}function ff(e,t){if(hf(e))return $l(e,t);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}}function $l(e,t){if(!hf(e))return ff(e,t);let n=e;return n.endsWith("/")||(n=`${n}/`),{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}}function xT(e,t){window.open(e,t,"noreferrer noopener")}const E1=({address:e,nonce:t})=>`${window.location.host} wants you to sign in with your Solana account:
|
|
52
|
+
${e}
|
|
53
|
+
|
|
54
|
+
${`You are proving you own ${e}.`}
|
|
55
|
+
|
|
56
|
+
URI: ${window.location.origin}
|
|
57
|
+
Version: 1
|
|
58
|
+
Chain ID: mainnet
|
|
59
|
+
Nonce: ${t}
|
|
60
|
+
Issued At: ${new Date().toISOString()}
|
|
61
|
+
Resources:
|
|
62
|
+
- https://privy.io`,yf=({message:e,address:t})=>{let n=e.match(/^URI: (.+)$/m)?.[1];if(!n)throw Error("SIWS message must include a URI");return s4({message:e,signerPublicKey:qa.decode(t),domain:n})},kT=Symbol("solana-funding-plugin"),$T=Symbol("solana-ledger-plugin");var dt="-ms-",Q2="-moz-",Xe="-webkit-",mf="comm",dd="rule",x1="decl",ST="@import",TT="@namespace",gf="@keyframes",IT="@layer",wf=Math.abs,k1=String.fromCharCode,Qu=Object.assign;function MT(e,t){return Nt(e,0)^45?(((t<<2^Nt(e,0))<<2^Nt(e,1))<<2^Nt(e,2))<<2^Nt(e,3):0}function vf(e){return e.trim()}function Mr(e,t){return(e=t.exec(e))?e[0]:e}function je(e,t,n){return e.replace(t,n)}function Uo(e,t,n){return e.indexOf(t,n)}function Nt(e,t){return e.charCodeAt(t)|0}function ea(e,t,n){return e.slice(t,n)}function Yn(e){return e.length}function Cf(e){return e.length}function H2(e,t){return t.push(e),e}function PT(e,t){return e.map(t).join("")}function i6(e,t){return e.filter(function(n){return!Mr(n,t)})}var cd=1,Da=1,_f=0,jn=0,It=0,t2="";function ud(e,t,n,r,i,a,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:cd,column:Da,length:s,return:"",siblings:o}}function ei(e,t){return Qu(ud("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function fa(e){for(;e.root;)e=ei(e.root,{children:[e]});H2(e,e.siblings)}function RT(){return It}function OT(){return It=jn>0?Nt(t2,--jn):0,Da--,It===10&&(Da=1,cd--),It}function rr(){return It=jn<_f?Nt(t2,jn++):0,Da++,It===10&&(Da=1,cd++),It}function si(){return Nt(t2,jn)}function Wo(){return jn}function pd(e,t){return ea(t2,e,t)}function Ms(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function NT(e){return cd=Da=1,_f=Yn(t2=e),jn=0,[]}function FT(e){return t2="",e}function wc(e){return vf(pd(jn-1,e3(e===91?e+2:e===40?e+1:e)))}function jT(e){for(;(It=si())&&It<33;)rr();return Ms(e)>2||Ms(It)>3?"":" "}function DT(e,t){for(;--t&&rr()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return pd(e,Wo()+(t<6&&si()==32&&rr()==32))}function e3(e){for(;rr();)switch(It){case e:return jn;case 34:case 39:e!==34&&e!==39&&e3(It);break;case 40:e===41&&e3(e);break;case 92:rr();break}return jn}function UT(e,t){for(;rr()&&e+It!==57;)if(e+It===84&&si()===47)break;return"/*"+pd(t,jn-1)+"*"+k1(e===47?e:rr())}function WT(e){for(;!Ms(si());)rr();return pd(e,jn)}function VT(e){return FT(Vo("",null,null,null,[""],e=NT(e),0,[0],e))}function Vo(e,t,n,r,i,a,s,o,l){for(var c=0,u=0,p=s,h=0,f=0,y=0,m=1,w=1,E=1,_=0,C="",k=i,S=a,b=r,F=C;w;)switch(y=_,_=rr()){case 40:if(y!=108&&Nt(F,p-1)==58){Uo(F+=je(wc(_),"&","&\f"),"&\f",wf(c?o[c-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:F+=wc(_);break;case 9:case 10:case 13:case 32:F+=jT(y);break;case 92:F+=DT(Wo()-1,7);continue;case 47:switch(si()){case 42:case 47:H2(HT(UT(rr(),Wo()),t,n,l),l),(Ms(y||1)==5||Ms(si()||1)==5)&&Yn(F)&&ea(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*m:o[c++]=Yn(F)*E;case 125*m:case 59:case 0:switch(_){case 0:case 125:w=0;case 59+u:E==-1&&(F=je(F,/\f/g,"")),f>0&&(Yn(F)-p||m===0&&y===47)&&H2(f>32?s6(F+";",r,n,p-1,l):s6(je(F," ","")+";",r,n,p-2,l),l);break;case 59:F+=";";default:if(H2(b=a6(F,t,n,c,u,i,o,C,k=[],S=[],p,a),a),_===123)if(u===0)Vo(F,t,b,b,k,a,p,o,S);else{switch(h){case 99:if(Nt(F,3)===110)break;case 108:if(Nt(F,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Vo(e,b,b,r&&H2(a6(e,b,b,0,0,i,o,C,i,k=[],p,S),S),i,S,p,o,r?k:S):Vo(F,b,b,b,[""],S,0,o,S)}}c=u=f=0,m=E=1,C=F="",p=s;break;case 58:p=1+Yn(F),f=y;default:if(m<1){if(_==123)--m;else if(_==125&&m++==0&&OT()==125)continue}switch(F+=k1(_),_*m){case 38:E=u>0?1:(F+="\f",-1);break;case 44:o[c++]=(Yn(F)-1)*E,E=1;break;case 64:si()===45&&(F+=wc(rr())),h=si(),u=p=Yn(C=F+=WT(Wo())),_++;break;case 45:y===45&&Yn(F)==2&&(m=0)}}return a}function a6(e,t,n,r,i,a,s,o,l,c,u,p){for(var h=i-1,f=i===0?a:[""],y=Cf(f),m=0,w=0,E=0;m<r;++m)for(var _=0,C=ea(e,h+1,h=wf(w=s[m])),k=e;_<y;++_)(k=vf(w>0?f[_]+" "+C:je(C,/&\f/g,f[_])))&&(l[E++]=k);return ud(e,t,n,i===0?dd:o,l,c,u,p)}function HT(e,t,n,r){return ud(e,t,n,mf,k1(RT()),ea(e,2,-2),0,r)}function s6(e,t,n,r,i){return ud(e,t,n,x1,ea(e,0,r),ea(e,r+1,-1),r,i)}function bf(e,t,n){switch(MT(e,t)){case 5103:return Xe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Xe+e+e;case 4855:return Xe+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Q2+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xe+e+Q2+e+dt+e+e;case 5936:switch(Nt(e,t+11)){case 114:return Xe+e+dt+je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xe+e+dt+je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xe+e+dt+je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Xe+e+dt+e+e;case 6165:return Xe+e+dt+"flex-"+e+e;case 5187:return Xe+e+je(e,/(\w+).+(:[^]+)/,Xe+"box-$1$2"+dt+"flex-$1$2")+e;case 5443:return Xe+e+dt+"flex-item-"+je(e,/flex-|-self/g,"")+(Mr(e,/flex-|baseline/)?"":dt+"grid-row-"+je(e,/flex-|-self/g,""))+e;case 4675:return Xe+e+dt+"flex-line-pack"+je(e,/align-content|flex-|-self/g,"")+e;case 5548:return Xe+e+dt+je(e,"shrink","negative")+e;case 5292:return Xe+e+dt+je(e,"basis","preferred-size")+e;case 6060:return Xe+"box-"+je(e,"-grow","")+Xe+e+dt+je(e,"grow","positive")+e;case 4554:return Xe+je(e,/([^-])(transform)/g,"$1"+Xe+"$2")+e;case 6187:return je(je(je(e,/(zoom-|grab)/,Xe+"$1"),/(image-set)/,Xe+"$1"),e,"")+e;case 5495:case 3959:return je(e,/(image-set\([^]*)/,Xe+"$1$`$1");case 4968:return je(je(e,/(.+:)(flex-)?(.*)/,Xe+"box-pack:$3"+dt+"flex-pack:$3"),/space-between/,"justify")+Xe+e+e;case 4200:if(!Mr(e,/flex-|baseline/))return dt+"grid-column-align"+ea(e,t)+e;break;case 2592:case 3360:return dt+je(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,i){return t=i,Mr(r.props,/grid-\w+-end/)})?~Uo(e+(n=n[t].value),"span",0)?e:dt+je(e,"-start","")+e+dt+"grid-row-span:"+(~Uo(n,"span",0)?Mr(n,/\d+/):+Mr(n,/\d+/)-+Mr(e,/\d+/))+";":dt+je(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Mr(r.props,/grid-\w+-start/)})?e:dt+je(je(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return je(e,/(.+)-inline(.+)/,Xe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Yn(e)-1-t>6)switch(Nt(e,t+1)){case 109:if(Nt(e,t+4)!==45)break;case 102:return je(e,/(.+:)(.+)-([^]+)/,"$1"+Xe+"$2-$3$1"+Q2+(Nt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Uo(e,"stretch",0)?bf(je(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return je(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,a,s,o,l,c){return dt+i+":"+a+c+(s?dt+i+"-span:"+(o?l:+l-+a)+c:"")+e});case 4949:if(Nt(e,t+6)===121)return je(e,":",":"+Xe)+e;break;case 6444:switch(Nt(e,Nt(e,14)===45?18:11)){case 120:return je(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Xe+(Nt(e,14)===45?"inline-":"")+"box$3$1"+Xe+"$2$3$1"+dt+"$2box$3")+e;case 100:return je(e,":",":"+dt)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return je(e,"scroll-","scroll-snap-")+e}return e}function Sl(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function ZT(e,t,n,r){switch(e.type){case IT:if(e.children.length)break;case ST:case TT:case x1:return e.return=e.return||e.value;case mf:return"";case gf:return e.return=e.value+"{"+Sl(e.children,r)+"}";case dd:if(!Yn(e.value=e.props.join(",")))return""}return Yn(n=Sl(e.children,r))?e.return=e.value+"{"+n+"}":""}function BT(e){var t=Cf(e);return function(n,r,i,a){for(var s="",o=0;o<t;o++)s+=e[o](n,r,i,a)||"";return s}}function zT(e){return function(t){t.root||(t=t.return)&&e(t)}}function KT(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case x1:e.return=bf(e.value,e.length,n);return;case gf:return Sl([ei(e,{value:je(e.value,"@","@"+Xe)})],r);case dd:if(e.length)return PT(n=e.props,function(i){switch(Mr(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":fa(ei(e,{props:[je(i,/:(read-\w+)/,":"+Q2+"$1")]})),fa(ei(e,{props:[i]})),Qu(e,{props:i6(n,r)});break;case"::placeholder":fa(ei(e,{props:[je(i,/:(plac\w+)/,":"+Xe+"input-$1")]})),fa(ei(e,{props:[je(i,/:(plac\w+)/,":"+Q2+"$1")]})),fa(ei(e,{props:[je(i,/:(plac\w+)/,dt+"input-$1")]})),fa(ei(e,{props:[i]})),Qu(e,{props:i6(n,r)});break}return""})}}var ka={},vc,Cc;const Ua=typeof process<"u"&&ka!==void 0&&(ka.REACT_APP_SC_ATTR||ka.SC_ATTR)||"data-styled",Lf="active",Af="data-styled-version",hd="6.5.3",$1=`/*!sc*/
|
|
63
|
+
`,es=typeof window<"u"&&typeof document<"u";function o6(e){if(typeof process<"u"&&ka!==void 0){const t=ka[e];if(t!==void 0&&t!=="")return t!=="false"}}const qT=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:(Cc=(vc=o6("REACT_APP_SC_DISABLE_SPEEDY"))!==null&&vc!==void 0?vc:o6("SC_DISABLE_SPEEDY"))!==null&&Cc!==void 0?Cc:typeof process<"u"&&ka!==void 0&&!1),Ef="sc-keyframes-",GT={};function to(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let Ho=new Map,Tl=new Map,Zo=1;const Z2=e=>{if(Ho.has(e))return Ho.get(e);for(;Tl.has(Zo);)Zo++;const t=Zo++;return Ho.set(e,t),Tl.set(t,e),t},YT=e=>Tl.get(e),JT=(e,t)=>{Zo=t+1,Ho.set(e,t),Tl.set(t,e)},S1=Object.freeze([]),Wa=Object.freeze({});function xf(e,t,n=Wa){return e.theme!==n.theme&&e.theme||t||n.theme}const XT=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,QT=/(^-|-$)/g;function kf(e){return e.replace(XT,"-").replace(QT,"")}const eI=/(a)(d)/gi,l6=e=>String.fromCharCode(e+(e>25?39:97));function T1(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=l6(t%52)+n;return(l6(t%52)+n).replace(eI,"$1-$2")}const t3=5381,Vi=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},$f=e=>Vi(t3,e);function I1(e){return T1($f(e)>>>0)}function tI(e){return e.displayName||e.name||"Component"}function n3(e){return typeof e=="string"&&!0}function nI(e){return n3(e)?`styled.${e}`:`Styled(${tI(e)})`}const Sf=Symbol.for("react.memo"),rI=Symbol.for("react.forward_ref"),iI={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},aI={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Tf={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sI={[rI]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Sf]:Tf};function d6(e){return("type"in(t=e)&&t.type.$$typeof)===Sf?Tf:"$$typeof"in e?sI[e.$$typeof]:iI;var t}const oI=Object.defineProperty,lI=Object.getOwnPropertyNames,dI=Object.getOwnPropertySymbols,cI=Object.getOwnPropertyDescriptor,uI=Object.getPrototypeOf,pI=Object.prototype;function If(e,t,n){if(typeof t!="string"){const r=uI(t);r&&r!==pI&&If(e,r,n);const i=lI(t).concat(dI(t)),a=d6(e),s=d6(t);for(let o=0;o<i.length;++o){const l=i[o];if(!(l in aI||n&&n[l]||s&&l in s||a&&l in a)){const c=cI(t,l);try{oI(e,l,c)}catch{}}}}return e}function no(e){return typeof e=="function"}const hI=Symbol.for("react.forward_ref");function M1(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&e.$$typeof===hI&&"styledComponentId"in e}function B2(e,t){return e&&t?e+" "+t:e||t||""}function Il(e,t){return e.join("")}function Ps(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function r3(e,t,n=!1){if(!n&&!Ps(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let r=0;r<t.length;r++)e[r]=r3(e[r],t[r]);else if(Ps(t))for(const r in t)e[r]=r3(e[r],t[r]);return e}function P1(e,t){Object.defineProperty(e,"toString",{value:t})}const fI=class{constructor(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t,this._cGroup=0,this._cIndex=0}indexOfGroup(t){if(t===this._cGroup)return this._cIndex;let n=this._cIndex;if(t>this._cGroup)for(let r=this._cGroup;r<t;r++)n+=this.groupSizes[r];else for(let r=this._cGroup-1;r>=t;r--)n-=this.groupSizes[r];return this._cGroup=t,this._cIndex=n,n}insertRules(t,n){if(t>=this.groupSizes.length){const a=this.groupSizes,s=a.length;let o=s;for(;t>=o;)if(o<<=1,o<0)throw to(16,`${t}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(a),this.length=o;for(let l=s;l<o;l++)this.groupSizes[l]=0}let r=this.indexOfGroup(t+1),i=0;for(let a=0,s=n.length;a<s;a++)this.tag.insertRule(r,n[a])&&(this.groupSizes[t]++,r++,i++);i>0&&this._cGroup>t&&(this._cIndex+=i)}clearGroup(t){if(t<this.length){const n=this.groupSizes[t],r=this.indexOfGroup(t),i=r+n;this.groupSizes[t]=0;for(let a=r;a<i;a++)this.tag.deleteRule(r);n>0&&this._cGroup>t&&(this._cIndex-=n)}}getGroup(t){let n="";if(t>=this.length||this.groupSizes[t]===0)return n;const r=this.groupSizes[t],i=this.indexOfGroup(t),a=i+r;for(let s=i;s<a;s++)n+=this.tag.getRule(s)+$1;return n}},yI=`style[${Ua}][${Af}="${hd}"]`,mI=new RegExp(`^${Ua}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),c6=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,i3=e=>{if(!e)return document;if(c6(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(c6(t))return t}return document},gI=(e,t,n)=>{const r=n.split(",");let i;for(let a=0,s=r.length;a<s;a++)(i=r[a])&&e.registerName(t,i)},wI=(e,t)=>{var n;const r=((n=t.textContent)!==null&&n!==void 0?n:"").split($1),i=[];for(let a=0,s=r.length;a<s;a++){const o=r[a].trim();if(!o)continue;const l=o.match(mI);if(l){const c=0|parseInt(l[1],10),u=l[2];c!==0&&(JT(u,c),gI(e,u,l[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(o)}},_c=e=>{const t=i3(e.options.target).querySelectorAll(yI);for(let n=0,r=t.length;n<r;n++){const i=t[n];i&&i.getAttribute(Ua)!==Lf&&(wI(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let w2=!1;function vI(){if(w2!==!1)return w2;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return w2=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return w2=t.getAttribute("content")||void 0}return w2=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const Mf=(e,t)=>{const n=document.head,r=e||n,i=document.createElement("style"),a=(l=>{const c=Array.from(l.querySelectorAll(`style[${Ua}]`));return c[c.length-1]})(r),s=a!==void 0?a.nextSibling:null;i.setAttribute(Ua,Lf),i.setAttribute(Af,hd);const o=t||vI();return o&&i.setAttribute("nonce",o),r.insertBefore(i,s),i},CI=class{constructor(t,n){this.element=Mf(t,n),this.element.appendChild(document.createTextNode("")),this.sheet=(r=>{var i;if(r.sheet)return r.sheet;const a=(i=r.getRootNode().styleSheets)!==null&&i!==void 0?i:document.styleSheets;for(let s=0,o=a.length;s<o;s++){const l=a[s];if(l.ownerNode===r)return l}throw to(17)})(this.element),this.length=0}insertRule(t,n){try{return this.sheet.insertRule(n,t),this.length++,!0}catch{return!1}}deleteRule(t){this.sheet.deleteRule(t),this.length--}getRule(t){const n=this.sheet.cssRules[t];return n&&n.cssText?n.cssText:""}},_I=class{constructor(t,n){this.element=Mf(t,n),this.nodes=this.element.childNodes,this.length=0}insertRule(t,n){if(t<=this.length&&t>=0){const r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1}deleteRule(t){this.element.removeChild(this.nodes[t]),this.length--}getRule(t){return t<this.length?this.nodes[t].textContent:""}};let u6=es;const bI={isServer:!es,useCSSOMInjection:!qT};let R1=class Pf{static registerId(t){return Z2(t)}constructor(t=Wa,n={},r){this.options=Object.assign(Object.assign({},bI),t),this.gs=n,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!t.isServer,!this.server&&es&&u6&&(u6=!1,_c(this)),P1(this,()=>(i=>{const a=i.getTag(),{length:s}=a;let o="";for(let l=0;l<s;l++){const c=YT(l);if(c===void 0)continue;const u=i.names.get(c);if(u===void 0||!u.size)continue;const p=a.getGroup(l);if(p.length===0)continue;const h=Ua+".g"+l+'[id="'+c+'"]';let f="";for(const y of u)y.length>0&&(f+=y+",");o+=p+h+'{content:"'+f+'"}'+$1}return o})(this))}rehydrate(){!this.server&&es&&_c(this)}reconstructWithOptions(t,n=!0){const r=new Pf(Object.assign(Object.assign({},this.options),t),this.gs,n&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&es&&t.target!==this.options.target&&i3(this.options.target)!==i3(t.target)&&_c(r),r}allocateGSInstance(t){return this.gs[t]=(this.gs[t]||0)+1}getTag(){return this.tag||(this.tag=(t=(({useCSSOMInjection:n,target:r,nonce:i})=>n?new CI(r,i):new _I(r,i))(this.options),new fI(t)));var t}hasNameForId(t,n){var r,i;return(i=(r=this.names.get(t))===null||r===void 0?void 0:r.has(n))!==null&&i!==void 0&&i}registerName(t,n){Z2(t),t.startsWith(Ef)&&this.keyframeIds.add(t);const r=this.names.get(t);r?r.add(n):this.names.set(t,new Set([n]))}insertRules(t,n,r){this.registerName(t,n),this.getTag().insertRules(Z2(t),r)}clearNames(t){this.names.has(t)&&this.names.get(t).clear()}clearRules(t){this.getTag().clearGroup(Z2(t)),this.clearNames(t)}clearTag(){this.tag=void 0}};const Rf=new WeakSet,LI={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function AI(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t!="number"||t===0||e in LI||e.startsWith("--")?String(t).trim():t+"px"}const Mi=47;function p6(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const Of=Symbol.for("sc-keyframes");function EI(e){return typeof e=="object"&&e!==null&&Of in e}function Nf(e){return no(e)&&!(e.prototype&&e.prototype.isReactComponent)}const Ff=e=>e==null||e===!1||e==="",xI=Symbol.for("react.client.reference");function h6(e){return e.$$typeof===xI}function jf(e,t){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!Ff(r)&&(Array.isArray(r)&&Rf.has(r)||no(r)?t.push(p6(n)+":",r,";"):Ps(r)?(t.push(n+" {"),jf(r,t),t.push("}")):t.push(p6(n)+": "+AI(n,r)+";"))}}function li(e,t,n,r,i=[]){if(Ff(e))return i;const a=typeof e;if(a==="string")return i.push(e),i;if(a==="function"){if(h6(e))return i;if(Nf(e)&&t){const s=e(t);return li(s,t,n,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let s=0;s<e.length;s++)li(e[s],t,n,r,i);return i}return M1(e)?(i.push(`.${e.styledComponentId}`),i):EI(e)?(n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i):h6(e)?i:Ps(e)?e.toString!==Object.prototype.toString?(i.push(e.toString()),i):(jf(e,i),i):(i.push(e.toString()),i)}const kI=$f(hd);let $I=class{constructor(t,n,r){this.rules=t,this.componentId=n,this.baseHash=Vi(kI,n),this.baseStyle=r,R1.registerId(n)}generateAndInjectStyles(t,n,r){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,n,r):"";{let a="";for(let s=0;s<this.rules.length;s++){const o=this.rules[s];if(typeof o=="string")a+=o;else if(o)if(Nf(o)){const l=o(t);typeof l=="string"?a+=l:l!=null&&l!==!1&&(a+=Il(li(l,t,n,r)))}else a+=Il(li(o,t,n,r))}if(a){this.dynamicNameCache||(this.dynamicNameCache=new Map);const s=r.hash?r.hash+a:a;let o=this.dynamicNameCache.get(s);if(!o){if(o=T1(Vi(Vi(this.baseHash,r.hash),a)>>>0),this.dynamicNameCache.size>=200){const l=this.dynamicNameCache.keys().next().value;l!==void 0&&this.dynamicNameCache.delete(l)}this.dynamicNameCache.set(s,o)}if(!n.hasNameForId(this.componentId,o)){const l=r(a,"."+o,void 0,this.componentId);n.insertRules(this.componentId,o,l)}i=B2(i,o)}}return i}};const SI=/&/g;function Df(e,t){let n=0;for(;--t>=0&&e.charCodeAt(t)===92;)n++;return!(1&~n)}function bc(e){const t=e.length;let n="",r=0,i=0,a=0,s=!1,o=!1;for(let l=0;l<t;l++){const c=e.charCodeAt(l);if(a!==0||s||c!==Mi||e.charCodeAt(l+1)!==42)if(s)c===42&&e.charCodeAt(l+1)===Mi&&(s=!1,l++);else if(c!==34&&c!==39||Df(e,l)){if(a===0)if(c===123)i++;else if(c===125){if(i--,i<0){o=!0;let u=l+1;for(;u<t;){const p=e.charCodeAt(u);if(p===59||p===10)break;u++}u<t&&e.charCodeAt(u)===59&&u++,i=0,l=u-1,r=u;continue}i===0&&(n+=e.substring(r,l+1),r=l+1)}else c===59&&i===0&&(n+=e.substring(r,l+1),r=l+1)}else a===0?a=c:a===c&&(a=0);else s=!0,l++}return o||i!==0||a!==0?(r<t&&i===0&&a===0&&(n+=e.substring(r)),n):e}function Uf(e,t){const n=t+" ",r=","+n;for(let i=0;i<e.length;i++){const a=e[i];if(a.type==="rule"){a.value=(n+a.value).replaceAll(",",r);const s=a.props,o=[];for(let l=0;l<s.length;l++)o[l]=n+s[l];a.props=o}Array.isArray(a.children)&&a.type!=="@keyframes"&&Uf(a.children,t)}return e}function TI({options:e=Wa,plugins:t=S1}=Wa){let n,r,i;const a=(h,f,y)=>y.startsWith(r)&&y.endsWith(r)&&y.replaceAll(r,"").length>0?`.${n}`:h,s=t.slice();s.push(h=>{h.type===dd&&h.value.includes("&")&&(i||(i=new RegExp(`\\${r}\\b`,"g")),h.props[0]=h.props[0].replace(SI,r).replace(i,a))}),e.prefix&&s.push(KT),s.push(ZT);let o=[];const l=BT(s.concat(zT(h=>o.push(h)))),c=(h,f="",y="",m="&")=>{n=m,r=f,i=void 0;const w=(function(_){const C=_.indexOf("//")!==-1,k=_.indexOf("}")!==-1;if(!C&&!k)return _;if(!C)return bc(_);const S=_.length;let b="",F=0,H=0,ae=0,G=0,he=0,Be=!1;for(;H<S;){const fe=_.charCodeAt(H);if(fe!==34&&fe!==39||Df(_,H))if(ae===0)if(fe===Mi&&H+1<S&&_.charCodeAt(H+1)===42){for(H+=2;H+1<S&&(_.charCodeAt(H)!==42||_.charCodeAt(H+1)!==Mi);)H++;H+=2}else if(fe!==40)if(fe!==41)if(G>0)H++;else if(fe===42&&H+1<S&&_.charCodeAt(H+1)===Mi)b+=_.substring(F,H),H+=2,F=H,Be=!0;else if(fe===Mi&&H+1<S&&_.charCodeAt(H+1)===Mi){for(b+=_.substring(F,H);H<S&&_.charCodeAt(H)!==10;)H++;F=H,Be=!0}else fe===123?he++:fe===125&&he--,H++;else G>0&&G--,H++;else G++,H++;else H++;else ae===0?ae=fe:ae===fe&&(ae=0),H++}return Be?(F<S&&(b+=_.substring(F)),he===0?b:bc(b)):he===0?_:bc(_)})(h);let E=VT(y||f?y+" "+f+" { "+w+" }":w);return e.namespace&&(E=Uf(E,e.namespace)),o=[],Sl(E,l),o},u=e;let p=t3;for(let h=0;h<t.length;h++)t[h].name||to(15),p=Vi(p,t[h].name);return u?.namespace&&(p=Vi(p,u.namespace)),u?.prefix&&(p=Vi(p,"p")),c.hash=p!==t3?p.toString():"",c}const II=new R1,a3=TI(),Wf=de.createContext({shouldForwardProp:void 0,styleSheet:II,stylis:a3,stylisPlugins:void 0});Wf.Consumer;function Vf(){return de.useContext(Wf)}const O1=de.createContext(void 0);O1.Consumer;const f6=Object.prototype.hasOwnProperty,Lc={};function MI(e,t){const n=typeof e!="string"?"sc":kf(e);Lc[n]=(Lc[n]||0)+1;const r=n+"-"+I1(hd+n+Lc[n]);return t?t+"-"+r:r}function PI(e,t,n){const r=M1(e),i=e,a=!n3(e),{attrs:s=S1,componentId:o=MI(t.displayName,t.parentComponentId),displayName:l=nI(e)}=t,c=t.displayName&&t.componentId?kf(t.displayName)+"-"+t.componentId:t.componentId||o,u=r&&i.attrs?i.attrs.concat(s).filter(Boolean):s;let{shouldForwardProp:p}=t;if(r&&i.shouldForwardProp){const m=i.shouldForwardProp;if(t.shouldForwardProp){const w=t.shouldForwardProp;p=(E,_)=>m(E,_)&&w(E,_)}else p=m}const h=new $I(n,c,r?i.componentStyle:void 0);function f(m,w){return(function(E,_,C){const{attrs:k,componentStyle:S,defaultProps:b,foldedComponentIds:F,styledComponentId:H,target:ae}=E,G=de.useContext(O1),he=Vf(),Be=E.shouldForwardProp||he.shouldForwardProp,fe=xf(_,G,b)||Wa;let Ie,Ae;{const be=de.useRef(null),Le=be.current;if(Le!==null&&Le[1]===fe&&Le[2]===he.styleSheet&&Le[3]===he.stylis&&Le[7]===S&&(function(ye,Me,we){const ze=ye,q=Me;let at=0;for(const et in q)if(f6.call(q,et)&&(at++,ze[et]!==q[et]))return!1;return at===we})(Le[0],_,Le[4]))Ie=Le[5],Ae=Le[6];else{Ie=(function(Me,we,ze){const q=Object.assign(Object.assign({},we),{className:void 0,theme:ze}),at=Me.length>1;for(let et=0;et<Me.length;et++){const U=Me[et],$e=no(U)?U(at?Object.assign({},q):q):U;for(const ue in $e)ue==="className"?q.className=B2(q.className,$e[ue]):ue==="style"?q.style=Object.assign(Object.assign({},q.style),$e[ue]):ue in we&&we[ue]===void 0||(q[ue]=$e[ue])}return"className"in we&&typeof we.className=="string"&&(q.className=B2(q.className,we.className)),q})(k,_,fe),Ae=S.generateAndInjectStyles(Ie,he.styleSheet,he.stylis);let ye=0;for(const Me in _)f6.call(_,Me)&&ye++;be.current=[_,fe,he.styleSheet,he.stylis,ye,Ie,Ae,S]}}const N=Ie.as||ae,xe=(function(be,Le,ye,Me){const we={};for(const ze in be)be[ze]===void 0||ze[0]==="$"||ze==="as"||ze==="theme"&&be.theme===ye||(ze==="forwardedAs"?we.as=be.forwardedAs:Me&&!Me(ze,Le)||(we[ze]=be[ze]));return we})(Ie,N,fe,Be);let ke=B2(F,H);return Ae&&(ke+=" "+Ae),Ie.className&&(ke+=" "+Ie.className),xe[n3(N)&&N.includes("-")?"class":"className"]=ke,C&&(xe.ref=C),g.createElement(N,xe)})(y,m,w)}f.displayName=l;let y=de.forwardRef(f);return y.attrs=u,y.componentStyle=h,y.displayName=l,y.shouldForwardProp=p,y.foldedComponentIds=r?B2(i.foldedComponentIds,i.styledComponentId):"",y.styledComponentId=c,y.target=r?i.target:e,Object.defineProperty(y,"defaultProps",{get(){return this._foldedDefaultProps},set(m){this._foldedDefaultProps=r?(function(w,...E){for(const _ of E)r3(w,_,!0);return w})({},i.defaultProps,m):m}}),P1(y,()=>`.${y.styledComponentId}`),a&&If(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}var RI=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function y6(e,t){const n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}const m6=e=>(Rf.add(e),e);function n2(e,...t){if(no(e)||Ps(e))return m6(li(y6(S1,[e,...t])));const n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?li(n):m6(li(y6(n,t)))}function s3(e,t,n=Wa){if(!t)throw to(1,t);const r=(i,...a)=>e(t,n,n2(i,...a));return r.attrs=i=>s3(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)})),r.withConfig=i=>s3(e,t,Object.assign(Object.assign({},n),i)),r}const Hf=e=>s3(PI,e),ot=Hf;RI.forEach(e=>{ot[e]=Hf(e)});let OI=class{constructor(t,n){this.instanceRules=new Map,this.rules=t,this.componentId=n,this.isStatic=(function(r){for(let i=0;i<r.length;i+=1){const a=r[i];if(no(a)&&!M1(a))return!1}return!0})(t),R1.registerId(this.componentId)}removeStyles(t,n){this.instanceRules.delete(t),this.rebuildGroup(n)}renderStyles(t,n,r,i){const a=this.componentId;if(this.isStatic){if(r.hasNameForId(a,a+t))this.instanceRules.has(t)||this.computeRules(t,n,r,i);else{const o=this.computeRules(t,n,r,i);r.insertRules(a,o.name,o.rules)}return}const s=this.instanceRules.get(t);if(this.computeRules(t,n,r,i),!r.server&&s){const o=s.rules,l=this.instanceRules.get(t).rules;if(o.length===l.length){let c=!0;for(let u=0;u<o.length;u++)if(o[u]!==l[u]){c=!1;break}if(c)return}}this.rebuildGroup(r)}computeRules(t,n,r,i){const a=Il(li(this.rules,n,r,i)),s={name:this.componentId+t,rules:i(a,"")};return this.instanceRules.set(t,s),s}rebuildGroup(t){const n=this.componentId;t.clearRules(n);for(const r of this.instanceRules.values())t.insertRules(n,r.name,r.rules)}};function NI(e,...t){const n=n2(e,...t),r=`sc-global-${I1(JSON.stringify(n))}`,i=new OI(n,r),a=o=>{const l=Vf(),c=de.useContext(O1);let u;{const p=de.useRef(null);p.current===null&&(p.current=l.styleSheet.allocateGSInstance(r)),u=p.current}l.styleSheet.server&&s(u,o,l.styleSheet,c,l.stylis);{const p=i.isStatic?[u,l.styleSheet,i]:[u,o,l.styleSheet,c,l.stylis,i],h=de.useRef(i);de.useLayoutEffect(()=>{l.styleSheet.server||(h.current!==i&&(l.styleSheet.clearRules(r),h.current=i),s(u,o,l.styleSheet,c,l.stylis))},p),de.useLayoutEffect(()=>()=>{l.styleSheet.server||i.removeStyles(u,l.styleSheet)},[u,l.styleSheet,i])}return l.styleSheet.server&&i.instanceRules.delete(u),null};function s(o,l,c,u,p){if(i.isStatic)i.renderStyles(o,GT,c,p);else{const h=Object.assign(Object.assign({},l),{theme:xf(l,u,a.defaultProps)});i.renderStyles(o,h,c,p)}}return de.memo(a)}var Zf;class FI{constructor(t,n){this[Zf]=!0,this.inject=(r,i=a3)=>{const a=this.getName(i);if(!r.hasNameForId(this.id,a)){const s=i(this.rules,a,"@keyframes");r.insertRules(this.id,a,s)}},this.name=t,this.id=Ef+t,this.rules=n,Z2(this.id),P1(this,()=>{throw to(12,String(this.name))})}getName(t=a3){return t.hash?this.name+T1(+t.hash>>>0):this.name}}function XH(e,...t){const n=Il(n2(e,...t)),r=I1(n);return new FI(r,n)}Zf=Of;function jI({src:e,...t}){return d.jsx("img",{src:e,...t,style:{display:"none"}})}const Bf=g.createContext({currentScreen:null,lastScreen:null,navigate:D,navigateBack:D,resetNavigation:D,setModalData:D,onUserCloseViaDialogOrKeybindRef:void 0}),DI=e=>{let t=Ct(),[n,r]=g.useState(e.initialScreen),i=g.useRef(null);g.useEffect((()=>{e.open||(i.current=null)}),[e.open]),g.useEffect((()=>{i.current=null}),[e.initialScreen]);let a={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:n,navigate:(s,o=!0)=>{e.setInitialScreen(s),o&&r(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(n)},resetNavigation:()=>{e.setInitialScreen(null),r(null)},onUserCloseViaDialogOrKeybindRef:i};return d.jsxs(Bf.Provider,{value:a,children:[(typeof t.appearance.logo=="string"||t.appearance.logo?.type==="img")&&d.jsx(jI,{src:typeof t.appearance.logo=="string"?t.appearance.logo:t.appearance.logo.props.src}),e.children]})},Ft=()=>g.useContext(Bf),Rs=(e,{chainType:t,walletIndex:n}={})=>e?.linkedAccounts.filter((r=>!(r.type!=="wallet"||r.walletClientType!=="privy"||n!==void 0&&r.walletIndex!==n||t!==void 0&&r.chainType!==t)))??[],Dn=kn((()=>({user:null,authenticated:!1,hasResolvedInitialUser:!1}))),nt=e=>Dn.setState({user:e}),zf=e=>Dn.setState({authenticated:e}),UI=e=>Dn.setState({hasResolvedInitialUser:e}),di=kn((()=>({ethereumExternal:[],areExternalConnectorsReady:!1,ethereumEmbedded:[]}))),g6=e=>di.setState({areExternalConnectorsReady:e}),N1=g.createContext(!1),WI=()=>{if(g.useContext(N1))throw new x("Multiple PrivyProvider instances found","Found multiple instances of PrivyProvider, ensure there is only one mounted in your application tree.")};function sa(){let e=g.useContext(N1),t=Q(),n=di((p=>p.ethereumEmbedded)),r=di((p=>p.ethereumExternal)),i=di((p=>p.areExternalConnectorsReady)),a=Dn((p=>p.user)),s=Dn((p=>p.hasResolvedInitialUser)),o=g.useMemo((()=>[...n,...r].sort(((p,h)=>h.connectedAt-p.connectedAt))),[n,r]),l=Rs(a,{chainType:"ethereum"}).length>0,c=n.length>0,u=!!i&&!!s&&!!t.walletProxy&&(!l||c);return e?g.useMemo((()=>({wallets:o,ready:u})),[o,u]):(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1})}const Ml=e=>{if(e.chainType==="ethereum")return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if(e.chainType==="solana")return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")},Rn=(e,t)=>{if(t?.imported||t&&mt(t))return Ml(t);let n=Ss(e);if(!n)throw Error("Failed to find primary wallet");return Ml(n)},VI={login:{onComplete:[],onError:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},connectOrCreateWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},update:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},signTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},fundSolanaWallet:{onUserExited:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},Kf=g.createContext(void 0);let qf=()=>g.useContext(Kf);function Vt(e,t){if(!t)return;let n=qf().current[e];return g.useEffect((()=>{for(let[r,i]of Object.entries(t))Object.prototype.hasOwnProperty.call(n,r)||console.warn(`Invalid event type "${r}" for action "${e}"`),n[r]?.push(i);return()=>{for(let[r,i]of Object.entries(t))Object.prototype.hasOwnProperty.call(n,r)||console.warn(`Invalid event type "${r}" for action "${e}"`),n[r]=n[r]?.filter((a=>a!==i))}}),[t])}function V(e,t,n,...r){for(let i of e.current[t][n])i(...r)}function Ar(){let e=qf();return(t,n,...r)=>V(e,t,n,...r)}function fd(e){return["ethereum","solana"].includes(e.chainType)}function Gf(e){let t=e.replace("eip155:","");if(t)return parseInt(t);throw Error("Chain ID not compatible with CAIP-2 format.")}let HI={method:"wallets",provider:""};const F1=e=>{let t=e.filter((n=>n.method==="wallets"||(n.method==="exchange"?n.provider==="coinbase":n.method==="card"||n.method==="payment-request"?n.provider==="coinbase"||n.provider==="moonpay":(n.method,!1))));return t.some((n=>n.method==="wallets"))||t.push(HI),t},Pl={[br.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[B3.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[aa.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[H3.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[Lr.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[Z3.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[qr.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[W3.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[Kr.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[U3.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[zr.id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[D3.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",[Gv.id]:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",[Ja.id]:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603"},w6=({address:e,appConfig:t,fundWalletConfig:n,methodScreen:r,chainIdOverride:i,comingFromSendTransactionScreen:a=!1,onComplete:s,onError:o})=>{let l,c;if(!t.fundingConfig)throw Error("Wallet funding is not enabled");let u=F1(t.fundingConfig.options);if(u.length<1)throw Error("Wallet funding is not enabled");l=i||(n?.chain?n.chain.id:Gf(t.fundingConfig.defaultRecommendedCurrency.chain));let p=t.chains.find((E=>E.id===l));if(!p)throw new x(`Funding chain ${l} is not in PrivyProvider chains list`);let h=n?.amount??t.fundingConfig.defaultRecommendedAmount,f=!1;function y(){if(!l)return;let E=Pl[l];u.find((_=>_.method==="wallets"))&&!E&&console.warn("Attempting to fund with USDC on chain where USDC address is not known. Funding via external wallet will be disabled."),c=E,f=!0}var m;n&&"asset"in n?n.asset==="USDC"?y():typeof n.asset!="string"&&"erc20"in n.asset&&(m=c=n.asset.erc20,f=m===Pl[p.id]):t.fundingConfig.defaultRecommendedCurrency.asset==="USDC"&&y();let w=n?.defaultFundingMethod;return{chainType:"ethereum",address:e,amount:h,chain:p,erc20Address:c,erc20ContractInfo:f?{symbol:"USDC",decimals:6}:void 0,isUSDC:f,methodScreen:r,supportedOptions:u,comingFromSendTransactionScreen:a,defaultFundingMethod:w,usingDefaultFundingMethod:!!w,preferredCardProvider:n?.card?.preferredProvider,crossChainBridgingEnabled:t.fundingConfig.crossChainBridgingEnabled??!1,solanaChain:"solana:mainnet",uiConfig:n&&"uiConfig"in n?n.uiConfig:void 0,externalSolanaFundingScreen:null,onComplete:s??(()=>{}),onError:o??(()=>{})}};function ZI({address:e,fundWalletConfig:t,appConfig:n,comingFromSendTransactionScreen:r,externalSolanaFundingScreen:i,methodScreen:a}){if(!n.fundingConfig)throw Error("Wallet funding is not enabled");let s=F1(n.fundingConfig.options);if(s.length<1)throw Error("Wallet funding is not enabled");let o=t?.amount??n.fundingConfig.defaultRecommendedAmount,l=t?.defaultFundingMethod;return{chainType:"solana",address:e,supportedOptions:s,amount:o,isUSDC:t?.asset==="USDC",methodScreen:a,comingFromSendTransactionScreen:r,chain:t?.chain||"solana:mainnet",crossChainBridgingEnabled:n.fundingConfig.crossChainBridgingEnabled??!1,defaultFundingMethod:l,preferredCardProvider:t?.card?.preferredProvider,usingDefaultFundingMethod:!!l,uiConfig:t?.uiConfig,externalSolanaFundingScreen:i,onComplete:()=>{},onError:()=>{}}}function Yf(){let{user:e,getAccessToken:t}=it(),{walletProxy:n,openModal:r,client:i}=Q(),{setModalData:a}=Ft(),s=Ct();return g.useMemo((()=>({exportWallet:o=>new Promise((async(l,c)=>{if(!e)return void c(Error("User must be authenticated before exporting their Privy wallet"));o&&"target"in o&&o&&(o=void 0);let u=o?.address?Pn(e,o.address):Y2(e);if(!u)return void c(new x("User must have an embedded wallet."));let p=u.address,{entropyId:h,entropyIdVerifier:f}=Rn(e,u),y=mt(u);if(!p)return void c(Error("User does not have an HD Ethereum wallet. To export an imported wallet, pass the `address` of the wallet to `exportWallet`."));if(!Bl(p))return void c(Error("Must provide a valid Ethereum address."));let m={recoveryMethod:u.recoveryMethod,connectingWalletAddress:u.address,isUnifiedWallet:y,entropyId:h,entropyIdVerifier:f,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:c,shouldForceMFA:!0};await t()&&n?fd(u)?(a({keyExport:{appId:s.id,appClientId:s.appClientId,origin:i.apiUrl,address:u.address,entropyId:h,entropyIdVerifier:f,hdWalletIndex:u.walletIndex,chainType:u.chainType,walletId:u.id,isUnifiedWallet:y,imported:u.imported,onSuccess:l,onFailure:c,showBackButton:o?.showBackButton},connectWallet:m}),r("EmbeddedWalletConnectingScreen")):c(Error(`Export is not supported for ${u.chainType} wallets`)):c(Error("Must have valid access token."))}))})),[e,t,n,r,i,a,s])}const Jf=()=>{let{authenticated:e,user:t}=it(),{openModal:n,inProgressAuthFlowRef:r,inProgressLoginOrLinkMethodRef:i}=Q(),a=Ar();return{update:g.useCallback((()=>{if(!e)throw a("linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:"email"}),new x("User must be authenticated before linking an account.");if(!t?.email)throw new x("User does not have an email linked to their account.");r.current="update",i.current="email",n("UpdateEmailScreen")}),[e,a,r,i,n,t])}},Xf=()=>{let{authenticated:e,user:t}=it(),{openModal:n,inProgressAuthFlowRef:r,inProgressLoginOrLinkMethodRef:i}=Q(),a=Ar();return{update:g.useCallback((()=>{if(!e)throw a("linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:"sms"}),new x("User must be authenticated before linking an account.");if(!t?.phone)throw new x("User does not have a phone number linked to their account.");r.current="update",i.current="sms",n("UpdatePhoneScreen")}),[e,a,r,i,n,t])}},Qf=()=>{let{client:e,setUser:t}=Q();return{unlink:g.useCallback((async({address:n})=>{let r;return t(r=n.startsWith("0x")?await e.unlinkEthereumWallet(n):await e.unlinkSolanaWallet(n)),r}),[e,t])}},BI=e=>{let[t,n]=g.useState("auto");return g.useEffect((()=>{let r=new ResizeObserver((i=>{n(i[0]?.contentRect.height??"auto")}));return e.current&&r.observe(e.current),()=>{e.current&&r.unobserve(e.current)}}),[e.current]),t},QH=ot.div`
|
|
64
|
+
text-align: left;
|
|
65
|
+
flex-grow: 1;
|
|
66
|
+
`,eZ=ot.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
justify-content: flex-end;
|
|
70
|
+
flex-grow: 1;
|
|
71
|
+
`,zI=ot.div`
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
|
|
76
|
+
/* for Internet Explorer, Edge */
|
|
77
|
+
-ms-overflow-style: none;
|
|
78
|
+
|
|
79
|
+
/* for Firefox */
|
|
80
|
+
scrollbar-width: none;
|
|
81
|
+
|
|
82
|
+
/* for Chrome, Safari, and Opera */
|
|
83
|
+
&::-webkit-scrollbar {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
`,tZ=ot(zI)`
|
|
87
|
+
${e=>e.$colorScheme==="light"?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":e.$colorScheme==="dark"?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0}
|
|
88
|
+
|
|
89
|
+
background-repeat: no-repeat;
|
|
90
|
+
background-size:
|
|
91
|
+
100% 32px,
|
|
92
|
+
100% 16px;
|
|
93
|
+
background-attachment: local, scroll;
|
|
94
|
+
max-height: 400px;
|
|
95
|
+
overflow-y: auto;
|
|
96
|
+
scrollbar-width: none;
|
|
97
|
+
padding: 3px;
|
|
98
|
+
`;let e7=n2`
|
|
99
|
+
&& {
|
|
100
|
+
width: 100%;
|
|
101
|
+
font-size: 16px;
|
|
102
|
+
line-height: 24px;
|
|
103
|
+
min-height: 56px;
|
|
104
|
+
|
|
105
|
+
/* Tablet and Up */
|
|
106
|
+
@media (min-width: 440px) {
|
|
107
|
+
font-size: 14px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
display: flex;
|
|
111
|
+
gap: 12px;
|
|
112
|
+
align-items: center;
|
|
113
|
+
color: var(--privy-color-foreground);
|
|
114
|
+
|
|
115
|
+
padding: 10px 12px;
|
|
116
|
+
border: 1px solid var(--privy-color-foreground-4) !important;
|
|
117
|
+
border-radius: var(--privy-border-radius-md);
|
|
118
|
+
transition: background-color 200ms ease;
|
|
119
|
+
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background-color: var(--privy-color-background-2);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:disabled {
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
background-color: var(--privy-color-background-2);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
`;const nZ=ot.div`
|
|
132
|
+
text-align: center;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
margin-bottom: 24px;
|
|
135
|
+
`,rZ=ot.button.attrs({className:"login-method-button"})`
|
|
136
|
+
${e7}
|
|
137
|
+
`;ot.a`
|
|
138
|
+
${e7}
|
|
139
|
+
`;const iZ=ot.div`
|
|
140
|
+
width: 32px;
|
|
141
|
+
height: 32px;
|
|
142
|
+
border-radius: ${e=>e.$fullSize?"0":"4px"};
|
|
143
|
+
background: ${e=>e.$fullSize?"transparent":"var(--privy-color-background-2)"};
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
flex-shrink: 0;
|
|
148
|
+
|
|
149
|
+
svg {
|
|
150
|
+
width: ${e=>e.$fullSize?"32px":"18px"};
|
|
151
|
+
height: ${e=>e.$fullSize?"32px":"18px"};
|
|
152
|
+
color: ${e=>e.$fullSize?"inherit":"var(--privy-color-icon-muted)"};
|
|
153
|
+
}
|
|
154
|
+
`,t7=ot.div`
|
|
155
|
+
width: 100%;
|
|
156
|
+
height: 100%;
|
|
157
|
+
min-height: inherit;
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
${e=>e.$if?"display: none;":""}
|
|
161
|
+
`,aZ=ot.div`
|
|
162
|
+
width: 100%;
|
|
163
|
+
height: 100%;
|
|
164
|
+
padding: ${e=>e.$withPadding?"64px 0px":"0px"};
|
|
165
|
+
`,sZ=ot.div`
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
margin-bottom: 32px;
|
|
171
|
+
gap: 12px;
|
|
172
|
+
& h3 {
|
|
173
|
+
font-size: 18px;
|
|
174
|
+
font-style: normal;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
line-height: 24px;
|
|
177
|
+
}
|
|
178
|
+
& p {
|
|
179
|
+
max-width: 300px;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
font-style: normal;
|
|
182
|
+
font-weight: 400;
|
|
183
|
+
line-height: 20px;
|
|
184
|
+
}
|
|
185
|
+
`;async function KI(e,t,n){if(!t.shouldEnforceDefaultChainOnConnect)return;let r=Number(e.chainId.replace("eip155:",""));if(!t.chains.find((i=>i.id===r))&&(e.connectorType!=="wallet_connect_v2"||e.walletClientType!=="metamask")){n?.();try{await e.switchChain(t.defaultChain.id),e.chainId=X2(En(t.defaultChain.id))}catch{J.warn("Unable to switch to default chain after connect",{chainId:t.defaultChain.id})}}}let n7=g.createContext({});const qI=({children:e})=>{let t=Ct(),[n,r]=g.useState({});return Vt("login",{onComplete:({loginAccount:i})=>{i&&i.type!=="passkey"&&i.type!=="cross_app"&&(i.type!=="wallet"||i.walletClientType!=="privy")&&(le.put(v6(t.id),i.type),i.type==="wallet"?(le.put(Ac(t.id),i.walletClientType),le.put(Ec(t.id),i.chainType),r({accountType:i.type,walletClientType:i.walletClientType,chainType:i.chainType})):(le.del(Ac(t.id)),le.del(Ec(t.id)),r({accountType:i.type})))}}),g.useEffect((()=>{if(!t.id)return;let i=le.get(v6(t.id)),a=le.get(Ac(t.id)),s=le.get(Ec(t.id));i&&r(i==="wallet"?{accountType:i,walletClientType:a,chainType:s}:{accountType:i})}),[t.id]),d.jsx(n7.Provider,{value:n,children:e})};let v6=e=>`privy:${e}:recent-login-method`,Ac=e=>`privy:${e}:recent-login-wallet-client`,Ec=e=>`privy:${e}:recent-login-chain-type`;const oZ=()=>g.useContext(n7),r7=e=>{Vt("fundWallet",e);let{fundWallet:t}=Q();return{fundWallet:({address:n,options:r})=>t(n,r)}};function GI(e){let{login:t}=g.useContext(qt);return Vt("login",e),{login:t}}function YI(e){let{logout:t}=g.useContext(qt);return Vt("logout",e),{logout:t}}const JI=e=>{Vt("update",e);let{update:t}=Jf(),{update:n}=Xf();return{updateEmail:t,updatePhone:n}};function XI(e){let{connectWallet:t}=g.useContext(qt);return Vt("connectWallet",e),{connectWallet:t}}const ts=kn((()=>({isModalOpen:!1,resolvers:null})));let QI=kn((()=>({})));const eM=async()=>{let e,t,n=new Promise(((r,i)=>{e=r,t=i}));return QI.setState({}),ts.setState({isModalOpen:!0,resolvers:{resolve:e,reject:t}}),await n},tM=({address:e,client:t,appId:n})=>{let r=`${t}:${e}`;n&&le.put(o3(n),r),ts.setState({wallet:r})},o3=e=>`privy:${e}:active-wallet-connection`,nM=()=>{let e=Ct(),{wallets:t}=sa(),{connectors:n}=Q(),r=g.useMemo((()=>n.filter(I4).flatMap((o=>o.wallets))),[n]),i=ts((o=>o.wallet));g.useEffect((()=>{if(!e.id)return;let o=le.get(o3(e.id));ts.setState({wallet:o})}),[e.id]);let a=g.useMemo((()=>{if(!i)return;let[,o]=i.split(":");return t.find((l=>l.address===o))||r.find((l=>l.address===o))}),[i,t,r]),s=g.useMemo((()=>a?a.type==="ethereum"?a.chainId:"solana":void 0),[a]);return{connect:async o=>{o?.reset&&(le.del(o3(e.id)),ts.setState({wallet:void 0}));let{wallet:l}=await eM();if(!l)return{};let[,c]=l.split(":"),u=t.find((h=>h.address===c));if(u)return{wallet:u,network:u.chainId};let p=r.find((h=>h.address===c));return p?{wallet:p,network:"solana"}:{}},setActiveWallet:g.useCallback((o=>{tM({address:o.address,client:o.walletClientType,appId:e.id})}),[e.id]),wallet:a,network:s}};var rM=Nm(),iM=Object.defineProperty,aM=(e,t,n)=>t in e?iM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xc=(e,t,n)=>(aM(e,typeof t!="symbol"?t+"":t,n),n);let sM=class{constructor(){xc(this,"current",this.detect()),xc(this,"handoffState","pending"),xc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},mr=new sM;function ro(e){var t;return mr.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function Rl(e){var t,n;return mr.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function j1(e){var t,n;return(n=(t=Rl(e))==null?void 0:t.activeElement)!=null?n:null}function oM(e){return j1(e)===e}function yd(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ar(){let e=[],t={addEventListener(n,r,i,a){return n.addEventListener(r,i,a),t.add(()=>n.removeEventListener(r,i,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return yd(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=ar();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function md(){let[e]=g.useState(ar);return g.useEffect(()=>()=>e.dispose(),[e]),e}let wn=(e,t)=>{mr.isServer?g.useEffect(e,t):g.useLayoutEffect(e,t)};function oa(e){let t=g.useRef(e);return wn(()=>{t.current=e},[e]),t}let rt=function(e){let t=oa(e);return de.useCallback((...n)=>t.current(...n),[t])};function io(e){return g.useMemo(()=>e,Object.values(e))}let lM=g.createContext(void 0);function dM(){return g.useContext(lM)}function l3(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Zr(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zr),r}var Ol=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ol||{}),oi=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(oi||{});function Wn(){let e=uM();return g.useCallback(t=>cM({mergeRefs:e,...t}),[e])}function cM({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:s,mergeRefs:o}){o=o??pM;let l=i7(t,e);if(a)return So(l,n,r,s,o);let c=i??0;if(c&2){let{static:u=!1,...p}=l;if(u)return So(p,n,r,s,o)}if(c&1){let{unmount:u=!0,...p}=l;return Zr(u?0:1,{0(){return null},1(){return So({...p,hidden:!0,style:{display:"none"}},n,r,s,o)}})}return So(l,n,r,s,o)}function So(e,t={},n,r,i){let{as:a=n,children:s,refName:o="ref",...l}=kc(e,["unmount","static"]),c=e.ref!==void 0?{[o]:e.ref}:{},u=typeof s=="function"?s(t):s;u=a7(u),"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let p={};if(t){let h=!1,f=[];for(let[y,m]of Object.entries(t))typeof m=="boolean"&&(h=!0),m===!0&&f.push(y.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(h){p["data-headlessui-state"]=f.join(" ");for(let y of f)p[`data-${y}`]=""}}if(ns(a)&&(Object.keys(Si(l)).length>0||Object.keys(Si(p)).length>0))if(!g.isValidElement(u)||Array.isArray(u)&&u.length>1||fM(u)){if(Object.keys(Si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Si(l)).concat(Object.keys(Si(p))).map(h=>` - ${h}`).join(`
|
|
186
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
|
|
187
|
+
`)].join(`
|
|
188
|
+
`))}else{let h=u.props,f=h?.className,y=typeof f=="function"?(...E)=>l3(f(...E),l.className):l3(f,l.className),m=y?{className:y}:{},w=i7(u.props,Si(kc(l,["ref"])));for(let E in p)E in w&&delete p[E];return g.cloneElement(u,Object.assign({},w,p,c,{ref:i(hM(u),c.ref)},m))}return g.createElement(a,Object.assign({},kc(l,["ref"]),!ns(a)&&c,!ns(a)&&p),u)}function uM(){let e=g.useRef([]),t=g.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function pM(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function i7(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var a;return(a=i?.preventDefault)==null?void 0:a.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...a){let s=n[r];for(let o of s){if((i instanceof Event||i?.nativeEvent instanceof Event)&&i.defaultPrevented)return;o(i,...a)}}});return t}function dZ(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];for(let r in n)Object.assign(t,{[r](...i){let a=n[r];for(let s of a)s?.(...i)}});return t}function vn(e){var t;return Object.assign(g.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function kc(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function hM(e){return de.version.split(".")[0]>="19"?e.props.ref:e.ref}function a7(e){if(e!=null&&e.$$typeof===Symbol.for("react.lazy")){let t=e._payload;if(t!=null&&t.status==="fulfilled")return a7(t.value)}return e}function ns(e){return e===g.Fragment||e===Symbol.for("react.fragment")}function fM(e){return ns(e.type)}let yM="span";var Nl=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Nl||{});function mM(e,t){var n;let{features:r=1,...i}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Wn()({ourProps:a,theirProps:i,slot:{},defaultTag:yM,name:"Hidden"})}let d3=vn(mM);function gM(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Dr(e){return gM(e)&&"tagName"in e}function _r(e){return Dr(e)&&"accessKey"in e}function Fr(e){return Dr(e)&&"tabIndex"in e}function wM(e){return Dr(e)&&"style"in e}function vM(e){return _r(e)&&e.nodeName==="IFRAME"}function CM(e){return _r(e)&&e.nodeName==="INPUT"}function cZ(e){return _r(e)&&e.nodeName==="LABEL"}function uZ(e){return _r(e)&&e.nodeName==="FIELDSET"}function pZ(e){return _r(e)&&e.nodeName==="LEGEND"}function hZ(e){return Dr(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}let s7=Symbol();function _M(e,t=!0){return Object.assign(e,{[s7]:t})}function Er(...e){let t=g.useRef(e);g.useEffect(()=>{t.current=e},[e]);let n=rt(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||r?.[s7])?void 0:n}let D1=g.createContext(null);D1.displayName="DescriptionContext";function o7(){let e=g.useContext(D1);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,o7),t}return e}function bM(){let[e,t]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(n){let r=rt(a=>(t(s=>[...s,a]),()=>t(s=>{let o=s.slice(),l=o.indexOf(a);return l!==-1&&o.splice(l,1),o}))),i=g.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return de.createElement(D1.Provider,{value:i},n.children)},[t])]}let LM="p";function AM(e,t){let n=g.useId(),r=dM(),{id:i=`headlessui-description-${n}`,...a}=e,s=o7(),o=Er(t);wn(()=>s.register(i),[i,s.register]);let l=io({...s.slot,disabled:r||!1}),c={ref:o,...s.props,id:i};return Wn()({ourProps:c,theirProps:a,slot:l,defaultTag:LM,name:s.name||"Description"})}let EM=vn(AM),xM=Object.assign(EM,{});var l7=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(l7||{});let kM=g.createContext(()=>{});function $M({value:e,children:t}){return de.createElement(kM.Provider,{value:e},t)}let d7=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var SM=Object.defineProperty,TM=(e,t,n)=>t in e?SM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IM=(e,t,n)=>(TM(e,t+"",n),n),c7=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Tn=(e,t,n)=>(c7(e,t,"read from private field"),n?n.call(e):t.get(e)),$c=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},C6=(e,t,n,r)=>(c7(e,t,"write to private field"),t.set(e,n),n),pr,z2,K2;let MM=class{constructor(t){$c(this,pr,{}),$c(this,z2,new d7(()=>new Set)),$c(this,K2,new Set),IM(this,"disposables",ar()),C6(this,pr,t),mr.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Tn(this,pr)}subscribe(t,n){if(mr.isServer)return()=>{};let r={selector:t,callback:n,current:t(Tn(this,pr))};return Tn(this,K2).add(r),this.disposables.add(()=>{Tn(this,K2).delete(r)})}on(t,n){return mr.isServer?()=>{}:(Tn(this,z2).get(t).add(n),this.disposables.add(()=>{Tn(this,z2).get(t).delete(n)}))}send(t){let n=this.reduce(Tn(this,pr),t);if(n!==Tn(this,pr)){C6(this,pr,n);for(let r of Tn(this,K2)){let i=r.selector(Tn(this,pr));u7(r.current,i)||(r.current=i,r.callback(i))}for(let r of Tn(this,z2).get(t.type))r(Tn(this,pr),t)}}};pr=new WeakMap,z2=new WeakMap,K2=new WeakMap;function u7(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:Sc(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Sc(e.entries(),t.entries()):_6(e)&&_6(t)?Sc(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Sc(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function _6(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function mZ(e){let[t,n]=e(),r=ar();return(...i)=>{t(...i),r.dispose(),r.microTask(n)}}var PM=Object.defineProperty,RM=(e,t,n)=>t in e?PM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b6=(e,t,n)=>(RM(e,typeof t!="symbol"?t+"":t,n),n),OM=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(OM||{});let NM={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let a=e.stack.slice();return a.splice(i,1),a.push(n),r=a,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},FM=class p7 extends MM{constructor(){super(...arguments),b6(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),b6(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new p7({stack:[]})}reduce(t,n){return Zr(n.type,NM,t,n)}};const h7=new d7(()=>FM.new());var Tc={exports:{}},Ic={};var L6;function jM(){if(L6)return Ic;L6=1;var e=g0();function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,o=e.useDebugValue;return Ic.useSyncExternalStoreWithSelector=function(l,c,u,p,h){var f=i(null);if(f.current===null){var y={hasValue:!1,value:null};f.current=y}else y=f.current;f=s(function(){function w(S){if(!E){if(E=!0,_=S,S=p(S),h!==void 0&&y.hasValue){var b=y.value;if(h(b,S))return C=b}return C=S}if(b=C,n(_,S))return b;var F=p(S);return h!==void 0&&h(b,F)?(_=S,b):(_=S,C=F)}var E=!1,_,C,k=u===void 0?null:u;return[function(){return w(c())},k===null?void 0:function(){return w(k())}]},[c,u,p,h]);var m=r(l,f[0],f[1]);return a(function(){y.hasValue=!0,y.value=m},[m]),o(m),m},Ic}var A6;function DM(){return A6||(A6=1,Tc.exports=jM()),Tc.exports}var UM=DM();function f7(e,t,n=u7){return UM.useSyncExternalStoreWithSelector(rt(r=>e.subscribe(WM,r)),rt(()=>e.state),rt(()=>e.state),rt(t),n)}function WM(e){return e}function ao(e,t){let n=g.useId(),r=h7.get(t),[i,a]=f7(r,g.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return wn(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}let c3=new Map,rs=new Map;function E6(e){var t;let n=(t=rs.get(e))!=null?t:0;return rs.set(e,n+1),n!==0?()=>x6(e):(c3.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>x6(e))}function x6(e){var t;let n=(t=rs.get(e))!=null?t:1;if(n===1?rs.delete(e):rs.set(e,n-1),n!==1)return;let r=c3.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,c3.delete(e))}function VM(e,{allowed:t,disallowed:n}={}){let r=ao(e,"inert-others");wn(()=>{var i,a;if(!r)return;let s=ar();for(let l of(i=n?.())!=null?i:[])l&&s.add(E6(l));let o=(a=t?.())!=null?a:[];for(let l of o){if(!l)continue;let c=ro(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let p of u.children)o.some(h=>p.contains(h))||s.add(E6(p));u=u.parentElement}}return s.dispose},[r,t,n])}function HM(e,t,n){let r=oa(i=>{let a=i.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&n()});g.useEffect(()=>{if(!e)return;let i=t===null?null:_r(t)?t:t.current;if(!i)return;let a=ar();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}return()=>a.dispose()},[t,r,e])}let Fl=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),ZM=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Or=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Or||{}),u3=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(u3||{}),BM=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(BM||{});function y7(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Fl)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function zM(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ZM)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var m7=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(m7||{});function g7(e,t=0){var n;return e===((n=ro(e))==null?void 0:n.body)?!1:Zr(t,{0(){return e.matches(Fl)},1(){let r=e;for(;r!==null;){if(r.matches(Fl))return!0;r=r.parentElement}return!1}})}function gZ(e){ar().nextFrame(()=>{let t=j1(e);t&&Fr(t)&&!g7(t,0)&&gr(e)})}var KM=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(KM||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function gr(e){e?.focus({preventScroll:!0})}let qM=["textarea","input"].join(",");function GM(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,qM))!=null?n:!1}function YM(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function wZ(e,t,n=e===null?document.body:Rl(e)){return $a(y7(n),t,{relativeTo:e})}function $a(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?Rl(e[0]):document:Rl(e),s=Array.isArray(e)?n?YM(e):e:t&64?zM(e):y7(e);i.length>0&&s.length>1&&(s=s.filter(f=>!i.some(y=>y!=null&&"current"in y?y?.current===f:y===f))),r=r??a?.activeElement;let o=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,p=s.length,h;do{if(u>=p||u+p<=0)return 0;let f=l+u;if(t&16)f=(f+p)%p;else{if(f<0)return 3;if(f>=p)return 1}h=s[f],h?.focus(c),u+=o}while(h!==j1(h));return t&6&&GM(h)&&h.select(),2}function w7(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function JM(){return/Android/gi.test(window.navigator.userAgent)}function k6(){return w7()||JM()}function To(e,t,n,r){let i=oa(n);g.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return document.addEventListener(t,a,r),()=>document.removeEventListener(t,a,r)},[e,t,r])}function v7(e,t,n,r){let i=oa(n);g.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return window.addEventListener(t,a,r),()=>window.removeEventListener(t,a,r)},[e,t,r])}const $6=30;function XM(e,t,n){let r=oa(n),i=g.useCallback(function(o,l){if(o.defaultPrevented)return;let c=l(o);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function p(h){return typeof h=="function"?p(h()):Array.isArray(h)||h instanceof Set?h:[h]})(t);for(let p of u)if(p!==null&&(p.contains(c)||o.composed&&o.composedPath().includes(p)))return;return!g7(c,m7.Loose)&&c.tabIndex!==-1&&o.preventDefault(),r.current(o,c)},[r,t]),a=g.useRef(null);To(e,"pointerdown",o=>{var l,c;k6()||(a.current=((c=(l=o.composedPath)==null?void 0:l.call(o))==null?void 0:c[0])||o.target)},!0),To(e,"pointerup",o=>{if(k6()||!a.current)return;let l=a.current;return a.current=null,i(o,()=>l)},!0);let s=g.useRef({x:0,y:0});To(e,"touchstart",o=>{s.current.x=o.touches[0].clientX,s.current.y=o.touches[0].clientY},!0),To(e,"touchend",o=>{let l={x:o.changedTouches[0].clientX,y:o.changedTouches[0].clientY};if(!(Math.abs(l.x-s.current.x)>=$6||Math.abs(l.y-s.current.y)>=$6))return i(o,()=>Fr(o.target)?o.target:null)},!0),v7(e,"blur",o=>i(o,()=>vM(window.document.activeElement)?window.document.activeElement:null),!0)}function U1(...e){return g.useMemo(()=>ro(...e),[...e])}function C7(e,t,n,r){let i=oa(n);g.useEffect(()=>{e=e??window;function a(s){i.current(s)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function QM(e){return g.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function eP(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...a){let s=t[i].call(n,...a);s&&(n=s,r.forEach(o=>o()))}}}function tP(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,"paddingRight",`${a}px`)}}}function nP(){return w7()?{before({doc:e,d:t,meta:n}){function r(i){for(let a of n().containers)for(let s of a())if(s.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let o=ar();o.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>o.dispose()))}let a=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",o=>{if(Fr(o.target))try{let l=o.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);Fr(u)&&!r(u)&&(s=u)}catch{}},!0),t.group(o=>{t.addEventListener(e,"touchstart",l=>{if(o.dispose(),Fr(l.target)&&wM(l.target))if(r(l.target)){let c=l.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;o.style(c,"overscrollBehavior","contain")}else o.style(l.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",o=>{if(Fr(o.target)){if(CM(o.target))return;if(r(o.target)){let l=o.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&o.preventDefault()}else o.preventDefault()}},{passive:!1}),t.add(()=>{var o;let l=(o=window.scrollY)!=null?o:window.pageYOffset;a!==l&&window.scrollTo(0,a),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function rP(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function S6(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Fi=eP(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ar(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=S6(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=S6(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[nP(),tP(),rP()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Fi.subscribe(()=>{let e=Fi.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&Fi.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Fi.dispatch("TEARDOWN",n)}});function iP(e,t,n=()=>({containers:[]})){let r=QM(Fi),i=t?r.get(t):void 0,a=i?i.count>0:!1;return wn(()=>{if(!(!t||!e))return Fi.dispatch("PUSH",t,n),()=>Fi.dispatch("POP",t,n)},[e,t]),a}function aP(e,t,n=()=>[document.body]){let r=ao(e,"scroll-lock");iP(r,t,i=>{var a;return{containers:[...(a=i.containers)!=null?a:[],n]}})}function sP(e=0){let[t,n]=g.useState(e),r=g.useCallback(l=>n(l),[]),i=g.useCallback(l=>n(c=>c|l),[]),a=g.useCallback(l=>(t&l)===l,[t]),s=g.useCallback(l=>n(c=>c&~l),[]),o=g.useCallback(l=>n(c=>c^l),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:o}}var oP={},T6,I6;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((T6=process==null?void 0:oP)==null?void 0:T6.NODE_ENV)==="test"&&typeof((I6=Element?.prototype)==null?void 0:I6.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
189
|
+
`)),[]});var lP=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(lP||{});function dP(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function cP(e,t,n,r){let[i,a]=g.useState(n),{hasFlag:s,addFlag:o,removeFlag:l}=sP(e&&i?3:0),c=g.useRef(!1),u=g.useRef(!1),p=md();return wn(()=>{var h;if(e){if(n&&a(!0),!t){n&&o(3);return}return(h=r?.start)==null||h.call(r,n),uP(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(o(3),l(4)):(o(4),l(2)))},run(){u.current?n?(l(3),o(4)):(l(4),o(3)):n?l(1):o(1)},done(){var f;u.current&&fP(t)||(c.current=!1,l(7),n||a(!1),(f=r?.end)==null||f.call(r,n))}})}},[e,n,t,p]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function uP(e,{prepare:t,run:n,done:r,inFlight:i}){let a=ar();return hP(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(pP(e,r))})}),a.dispose}function pP(e,t){var n,r;let i=ar();if(!e)return i.dispose;let a=!1;i.add(()=>{a=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(o=>o instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(o=>o.finished)).then(()=>{a||t()}),i.dispose)}function hP(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function fP(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function W1(e,t){let n=g.useRef([]),r=rt(e);g.useEffect(()=>{let i=[...n.current];for(let[a,s]of t.entries())if(n.current[a]!==s){let o=r(t,i);return n.current=t,o}},[r,...t])}let gd=g.createContext(null);gd.displayName="OpenClosedContext";var er=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(er||{});function wd(){return g.useContext(gd)}function yP({value:e,children:t}){return de.createElement(gd.Provider,{value:e},t)}function mP({children:e}){return de.createElement(gd.Provider,{value:null},e)}function gP(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let ai=[];gP(()=>{function e(t){if(!Fr(t.target)||t.target===document.body||ai[0]===t.target)return;let n=t.target;n=n.closest(Fl),ai.unshift(n??t.target),ai=ai.filter(r=>r!=null&&r.isConnected),ai.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function _7(e){let t=rt(e),n=g.useRef(!1);g.useEffect(()=>(n.current=!1,()=>{n.current=!0,yd(()=>{n.current&&t()})}),[t])}function wP(){let e=typeof document>"u";return"useSyncExternalStore"in up?(t=>t.useSyncExternalStore)(up)(()=>()=>{},()=>!1,()=>!e):!1}function so(){let e=wP(),[t,n]=g.useState(mr.isHandoffComplete);return t&&mr.isHandoffComplete===!1&&n(!1),g.useEffect(()=>{t!==!0&&n(!0)},[t]),g.useEffect(()=>mr.handoff(),[]),e?!1:t}let b7=g.createContext(!1);function vP(){return g.useContext(b7)}function M6(e){return de.createElement(b7.Provider,{value:e.force},e.children)}function CP(e){let t=vP(),n=g.useContext(A7),[r,i]=g.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(mr.isServer)return null;let s=e?.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let o=e.createElement("div");return o.setAttribute("id","headlessui-portal-root"),e.body.appendChild(o)});return g.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),g.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}let L7=g.Fragment,_P=vn(function(e,t){let{ownerDocument:n=null,...r}=e,i=g.useRef(null),a=Er(_M(f=>{i.current=f}),t),s=U1(i.current),o=n??s,l=CP(o),c=g.useContext(p3),u=md(),p=so(),h=Wn();return _7(()=>{var f;l&&l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l))}),!l||!p?null:rM.createPortal(de.createElement("div",{"data-headlessui-portal":"",ref:f=>{u.dispose(),c&&f&&u.add(c.register(f))}},h({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:L7,name:"Portal"})),l)});function bP(e,t){let n=Er(t),{enabled:r=!0,ownerDocument:i,...a}=e,s=Wn();return r?de.createElement(_P,{...a,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:L7,name:"Portal"})}let LP=g.Fragment,A7=g.createContext(null);function AP(e,t){let{target:n,...r}=e,i={ref:Er(t)},a=Wn();return de.createElement(A7.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:LP,name:"Popover.Group"}))}let p3=g.createContext(null);function EP(){let e=g.useContext(p3),t=g.useRef([]),n=rt(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=rt(a=>{let s=t.current.indexOf(a);s!==-1&&t.current.splice(s,1),e&&e.unregister(a)}),i=g.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,g.useMemo(()=>function({children:a}){return de.createElement(p3.Provider,{value:i},a)},[i])]}let xP=vn(bP),E7=vn(AP),kP=Object.assign(xP,{Group:E7});function $P(e,t=typeof document<"u"?document.defaultView:null,n){let r=ao(e,"escape");C7(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===l7.Escape&&n(i))})}function SP(){var e;let[t]=g.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=g.useState((e=t?.matches)!=null?e:!1);return wn(()=>{if(!t)return;function i(a){r(a.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function TP({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=rt(()=>{var i,a;let s=ro(n),o=[];for(let l of e)l!==null&&(Dr(l)?o.push(l):"current"in l&&Dr(l.current)&&o.push(l.current));if(t!=null&&t.current)for(let l of t.current)o.push(l);for(let l of(i=s?.querySelectorAll("html > *, body > *"))!=null?i:[])l!==document.body&&l!==document.head&&Dr(l)&&l.id!=="headlessui-portal-root"&&(n&&(l.contains(n)||l.contains((a=n?.getRootNode())==null?void 0:a.host))||o.some(c=>l.contains(c))||o.push(l));return o});return{resolveContainers:r,contains:rt(i=>r().some(a=>a.contains(i)))}}let x7=g.createContext(null);function P6({children:e,node:t}){let[n,r]=g.useState(null),i=k7(t??n);return de.createElement(x7.Provider,{value:i},e,i===null&&de.createElement(d3,{features:Nl.Hidden,ref:a=>{var s,o;if(a){for(let l of(o=(s=ro(a))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?o:[])if(l!==document.body&&l!==document.head&&Dr(l)&&l!=null&&l.contains(a)){r(l);break}}}}))}function k7(e=null){var t;return(t=g.useContext(x7))!=null?t:e}function V1(){let e=g.useRef(!1);return wn(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var q2=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(q2||{});function IP(){let e=g.useRef(0);return v7(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function $7(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)Dr(n.current)&&t.add(n.current);return t}let MP="div";var Pi=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Pi||{});function PP(e,t){let n=g.useRef(null),r=Er(n,t),{initialFocus:i,initialFocusFallback:a,containers:s,features:o=15,...l}=e;so()||(o=0);let c=U1(n.current);FP(o,{ownerDocument:c});let u=jP(o,{ownerDocument:c,container:n,initialFocus:i,initialFocusFallback:a});DP(o,{ownerDocument:c,container:n,containers:s,previousActiveElement:u});let p=IP(),h=rt(_=>{if(!_r(n.current))return;let C=n.current;(k=>k())(()=>{Zr(p.current,{[q2.Forwards]:()=>{$a(C,Or.First,{skipElements:[_.relatedTarget,a]})},[q2.Backwards]:()=>{$a(C,Or.Last,{skipElements:[_.relatedTarget,a]})}})})}),f=ao(!!(o&2),"focus-trap#tab-lock"),y=md(),m=g.useRef(!1),w={ref:r,onKeyDown(_){_.key=="Tab"&&(m.current=!0,y.requestAnimationFrame(()=>{m.current=!1}))},onBlur(_){if(!(o&4))return;let C=$7(s);_r(n.current)&&C.add(n.current);let k=_.relatedTarget;Fr(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(S7(C,k)||(m.current?$a(n.current,Zr(p.current,{[q2.Forwards]:()=>Or.Next,[q2.Backwards]:()=>Or.Previous})|Or.WrapAround,{relativeTo:_.target}):Fr(_.target)&&gr(_.target)))}},E=Wn();return de.createElement(de.Fragment,null,f&&de.createElement(d3,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Nl.Focusable}),E({ourProps:w,theirProps:l,defaultTag:MP,name:"FocusTrap"}),f&&de.createElement(d3,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Nl.Focusable}))}let RP=vn(PP),OP=Object.assign(RP,{features:Pi});function NP(e=!0){let t=g.useRef(ai.slice());return W1(([n],[r])=>{r===!0&&n===!1&&yd(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=ai.slice())},[e,ai,t]),rt(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function FP(e,{ownerDocument:t}){let n=!!(e&8),r=NP(n);W1(()=>{n||oM(t?.body)&&gr(r())},[n]),_7(()=>{n&&gr(r())})}function jP(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=g.useRef(null),s=ao(!!(e&1),"focus-trap#initial-focus"),o=V1();return W1(()=>{if(e===0)return;if(!s){i!=null&&i.current&&gr(i.current);return}let l=n.current;l&&yd(()=>{if(!o.current)return;let c=t?.activeElement;if(r!=null&&r.current){if(r?.current===c){a.current=c;return}}else if(l.contains(c)){a.current=c;return}if(r!=null&&r.current)gr(r.current);else{if(e&16){if($a(l,Or.First|Or.AutoFocus)!==u3.Error)return}else if($a(l,Or.First)!==u3.Error)return;if(i!=null&&i.current&&(gr(i.current),t?.activeElement===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=t?.activeElement})},[i,s,e]),a}function DP(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=V1(),s=!!(e&4);C7(t?.defaultView,"focus",o=>{if(!s||!a.current)return;let l=$7(r);_r(n.current)&&l.add(n.current);let c=i.current;if(!c)return;let u=o.target;_r(u)?S7(l,u)?(i.current=u,gr(u)):(o.preventDefault(),o.stopPropagation(),gr(c)):gr(i.current)},!0)}function S7(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function T7(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!ns((t=e.as)!=null?t:M7)||de.Children.count(e.children)===1}let vd=g.createContext(null);vd.displayName="TransitionContext";var UP=(e=>(e.Visible="visible",e.Hidden="hidden",e))(UP||{});function WP(){let e=g.useContext(vd);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function VP(){let e=g.useContext(Cd);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Cd=g.createContext(null);Cd.displayName="NestingContext";function _d(e){return"children"in e?_d(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function I7(e,t){let n=oa(e),r=g.useRef([]),i=V1(),a=md(),s=rt((f,y=oi.Hidden)=>{let m=r.current.findIndex(({el:w})=>w===f);m!==-1&&(Zr(y,{[oi.Unmount](){r.current.splice(m,1)},[oi.Hidden](){r.current[m].state="hidden"}}),a.microTask(()=>{var w;!_d(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),o=rt(f=>{let y=r.current.find(({el:m})=>m===f);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:f,state:"visible"}),()=>s(f,oi.Unmount)}),l=g.useRef([]),c=g.useRef(Promise.resolve()),u=g.useRef({enter:[],leave:[]}),p=rt((f,y,m)=>{l.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([w])=>w!==f)),t?.chains.current[y].push([f,new Promise(w=>{l.current.push(w)})]),t?.chains.current[y].push([f,new Promise(w=>{Promise.all(u.current[y].map(([E,_])=>_)).then(()=>w())})]),y==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>m(y)):m(y)}),h=rt((f,y,m)=>{Promise.all(u.current[y].splice(0).map(([w,E])=>E)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>m(y))});return g.useMemo(()=>({children:r,register:o,unregister:s,onStart:p,onStop:h,wait:c,chains:u}),[o,s,r,p,h,u,c])}let M7=g.Fragment,P7=Ol.RenderStrategy;function HP(e,t){var n,r;let{transition:i=!0,beforeEnter:a,afterEnter:s,beforeLeave:o,afterLeave:l,enter:c,enterFrom:u,enterTo:p,entered:h,leave:f,leaveFrom:y,leaveTo:m,...w}=e,[E,_]=g.useState(null),C=g.useRef(null),k=T7(e),S=Er(...k?[C,t,_]:t===null?[]:[t]),b=(n=w.unmount)==null||n?oi.Unmount:oi.Hidden,{show:F,appear:H,initial:ae}=WP(),[G,he]=g.useState(F?"visible":"hidden"),Be=VP(),{register:fe,unregister:Ie}=Be;wn(()=>fe(C),[fe,C]),wn(()=>{if(b===oi.Hidden&&C.current){if(F&&G!=="visible"){he("visible");return}return Zr(G,{hidden:()=>Ie(C),visible:()=>fe(C)})}},[G,C,fe,Ie,F,b]);let Ae=so();wn(()=>{if(k&&Ae&&G==="visible"&&C.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[C,G,Ae,k]);let N=ae&&!H,xe=H&&F&&ae,ke=g.useRef(!1),be=I7(()=>{ke.current||(he("hidden"),Ie(C))},Be),Le=rt(et=>{ke.current=!0;let U=et?"enter":"leave";be.onStart(C,U,$e=>{$e==="enter"?a?.():$e==="leave"&&o?.()})}),ye=rt(et=>{let U=et?"enter":"leave";ke.current=!1,be.onStop(C,U,$e=>{$e==="enter"?s?.():$e==="leave"&&l?.()}),U==="leave"&&!_d(be)&&(he("hidden"),Ie(C))});g.useEffect(()=>{k&&i||(Le(F),ye(F))},[F,k,i]);let Me=!(!i||!k||!Ae||N),[,we]=cP(Me,E,F,{start:Le,end:ye}),ze=Si({ref:S,className:((r=l3(w.className,xe&&c,xe&&u,we.enter&&c,we.enter&&we.closed&&u,we.enter&&!we.closed&&p,we.leave&&f,we.leave&&!we.closed&&y,we.leave&&we.closed&&m,!we.transition&&F&&h))==null?void 0:r.trim())||void 0,...dP(we)}),q=0;G==="visible"&&(q|=er.Open),G==="hidden"&&(q|=er.Closed),F&&G==="hidden"&&(q|=er.Opening),!F&&G==="visible"&&(q|=er.Closing);let at=Wn();return de.createElement(Cd.Provider,{value:be},de.createElement(yP,{value:q},at({ourProps:ze,theirProps:w,defaultTag:M7,features:P7,visible:G==="visible",name:"Transition.Child"})))}function ZP(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,s=g.useRef(null),o=T7(e),l=Er(...o?[s,t]:t===null?[]:[t]);so();let c=wd();if(n===void 0&&c!==null&&(n=(c&er.Open)===er.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,p]=g.useState(n?"visible":"hidden"),h=I7(()=>{n||p("hidden")}),[f,y]=g.useState(!0),m=g.useRef([n]);wn(()=>{f!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),y(!1))},[m,n]);let w=g.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);wn(()=>{n?p("visible"):!_d(h)&&s.current!==null&&p("hidden")},[n,h]);let E={unmount:i},_=rt(()=>{var S;f&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),C=rt(()=>{var S;f&&y(!1),(S=e.beforeLeave)==null||S.call(e)}),k=Wn();return de.createElement(Cd.Provider,{value:h},de.createElement(vd.Provider,{value:w},k({ourProps:{...E,as:g.Fragment,children:de.createElement(R7,{ref:l,...E,...a,beforeEnter:_,beforeLeave:C})},theirProps:{},defaultTag:g.Fragment,features:P7,visible:u==="visible",name:"Transition"})))}function BP(e,t){let n=g.useContext(vd)!==null,r=wd()!==null;return de.createElement(de.Fragment,null,!n&&r?de.createElement(h3,{ref:t,...e}):de.createElement(R7,{ref:t,...e}))}let h3=vn(ZP),R7=vn(HP),Os=vn(BP),O7=Object.assign(h3,{Child:Os,Root:h3});var zP=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zP||{}),KP=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(KP||{});let qP={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},H1=g.createContext(null);H1.displayName="DialogContext";function bd(e){let t=g.useContext(H1);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,bd),n}return t}function GP(e,t){return Zr(t.type,qP,e,t)}let R6=vn(function(e,t){let n=g.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:s,role:o="dialog",autoFocus:l=!0,__demoMode:c=!1,unmount:u=!1,...p}=e,h=g.useRef(!1);o=(function(){return o==="dialog"||o==="alertdialog"?o:(h.current||(h.current=!0,console.warn(`Invalid role [${o}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let f=wd();i===void 0&&f!==null&&(i=(f&er.Open)===er.Open);let y=g.useRef(null),m=Er(y,t),w=U1(y.current),E=i?0:1,[_,C]=g.useReducer(GP,{titleId:null,descriptionId:null,panelRef:g.createRef()}),k=rt(()=>a(!1)),S=rt(we=>C({type:0,id:we})),b=so()?E===0:!1,[F,H]=EP(),ae={get current(){var we;return(we=_.panelRef.current)!=null?we:y.current}},G=k7(),{resolveContainers:he}=TP({mainTreeNode:G,portals:F,defaultContainers:[ae]}),Be=f!==null?(f&er.Closing)===er.Closing:!1;VM(c||Be?!1:b,{allowed:rt(()=>{var we,ze;return[(ze=(we=y.current)==null?void 0:we.closest("[data-headlessui-portal]"))!=null?ze:null]}),disallowed:rt(()=>{var we;return[(we=G?.closest("body > *:not(#headlessui-portal-root)"))!=null?we:null]})});let fe=h7.get(null);wn(()=>{if(b)return fe.actions.push(r),()=>fe.actions.pop(r)},[fe,r,b]);let Ie=f7(fe,g.useCallback(we=>fe.selectors.isTop(we,r),[fe,r]));XM(Ie,he,we=>{we.preventDefault(),k()}),$P(Ie,w?.defaultView,we=>{we.preventDefault(),we.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),aP(c||Be?!1:b,w,he),HM(b,y,k);let[Ae,N]=bM(),xe=g.useMemo(()=>[{dialogState:E,close:k,setTitleId:S,unmount:u},_],[E,k,S,u,_]),ke=io({open:E===0}),be={ref:m,id:r,role:o,tabIndex:-1,"aria-modal":c?void 0:E===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":Ae,unmount:u},Le=!SP(),ye=Pi.None;b&&!c&&(ye|=Pi.RestoreFocus,ye|=Pi.TabLock,l&&(ye|=Pi.AutoFocus),Le&&(ye|=Pi.InitialFocus));let Me=Wn();return de.createElement(mP,null,de.createElement(M6,{force:!0},de.createElement(kP,null,de.createElement(H1.Provider,{value:xe},de.createElement(E7,{target:y},de.createElement(M6,{force:!1},de.createElement(N,{slot:ke},de.createElement(H,null,de.createElement(OP,{initialFocus:s,initialFocusFallback:y,containers:he,features:ye},de.createElement($M,{value:k},Me({ourProps:be,theirProps:p,slot:ke,defaultTag:YP,features:JP,visible:E===0,name:"Dialog"})))))))))))}),YP="div",JP=Ol.RenderStrategy|Ol.Static;function XP(e,t){let{transition:n=!1,open:r,...i}=e,a=wd(),s=e.hasOwnProperty("open")||a!==null,o=e.hasOwnProperty("onClose");if(!s&&!o)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!o)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?de.createElement(P6,null,de.createElement(O7,{show:r,transition:n,unmount:i.unmount},de.createElement(R6,{ref:t,...i}))):de.createElement(P6,null,de.createElement(R6,{ref:t,open:r,...i}))}let QP="div";function eR(e,t){let n=g.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:s,unmount:o},l]=bd("Dialog.Panel"),c=Er(t,l.panelRef),u=io({open:s===0}),p=rt(w=>{w.stopPropagation()}),h={ref:c,id:r,onClick:p},f=i?Os:g.Fragment,y=i?{unmount:o}:{},m=Wn();return de.createElement(f,{...y},m({ourProps:h,theirProps:a,slot:u,defaultTag:QP,name:"Dialog.Panel"}))}let tR="div";function nR(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=bd("Dialog.Backdrop"),s=io({open:i===0}),o={ref:t,"aria-hidden":!0},l=n?Os:g.Fragment,c=n?{unmount:a}:{},u=Wn();return de.createElement(l,{...c},u({ourProps:o,theirProps:r,slot:s,defaultTag:tR,name:"Dialog.Backdrop"}))}let rR="h2";function iR(e,t){let n=g.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:s}]=bd("Dialog.Title"),o=Er(t);g.useEffect(()=>(s(r),()=>s(null)),[r,s]);let l=io({open:a===0}),c={ref:o,id:r};return Wn()({ourProps:c,theirProps:i,slot:l,defaultTag:rR,name:"Dialog.Title"})}let aR=vn(XP),N7=vn(eR);vn(nR);let sR=vn(iR),oR=Object.assign(aR,{Panel:N7,Title:sR,Description:xM}),lR=n2`
|
|
190
|
+
*,
|
|
191
|
+
::before,
|
|
192
|
+
::after {
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
border-width: 0;
|
|
195
|
+
border-style: solid;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
line-height: 1.15;
|
|
199
|
+
-webkit-text-size-adjust: 100%;
|
|
200
|
+
-moz-tab-size: 4;
|
|
201
|
+
tab-size: 4;
|
|
202
|
+
font-feature-settings: normal;
|
|
203
|
+
|
|
204
|
+
margin: 0;
|
|
205
|
+
font-family:
|
|
206
|
+
system-ui,
|
|
207
|
+
-apple-system,
|
|
208
|
+
'Segoe UI',
|
|
209
|
+
Roboto,
|
|
210
|
+
Helvetica,
|
|
211
|
+
Arial,
|
|
212
|
+
sans-serif,
|
|
213
|
+
'Apple Color Emoji',
|
|
214
|
+
'Segoe UI Emoji';
|
|
215
|
+
|
|
216
|
+
hr {
|
|
217
|
+
height: 0;
|
|
218
|
+
color: inherit;
|
|
219
|
+
border-top-width: 1px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
abbr:where([title]) {
|
|
223
|
+
text-decoration: underline dotted;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
h1,
|
|
227
|
+
h2,
|
|
228
|
+
h3,
|
|
229
|
+
h4,
|
|
230
|
+
h5,
|
|
231
|
+
h6 {
|
|
232
|
+
font-size: inherit;
|
|
233
|
+
font-weight: inherit;
|
|
234
|
+
font-family:
|
|
235
|
+
system-ui,
|
|
236
|
+
-apple-system,
|
|
237
|
+
'Segoe UI',
|
|
238
|
+
Roboto,
|
|
239
|
+
Helvetica,
|
|
240
|
+
Arial,
|
|
241
|
+
sans-serif,
|
|
242
|
+
'Apple Color Emoji',
|
|
243
|
+
'Segoe UI Emoji';
|
|
244
|
+
display: inline;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
a {
|
|
248
|
+
color: inherit;
|
|
249
|
+
text-decoration: inherit;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
b,
|
|
253
|
+
strong {
|
|
254
|
+
font-weight: bolder;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
code,
|
|
258
|
+
kbd,
|
|
259
|
+
samp,
|
|
260
|
+
pre {
|
|
261
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
|
|
262
|
+
font-size: 1em;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
small {
|
|
266
|
+
font-size: 80%;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
sub,
|
|
270
|
+
sup {
|
|
271
|
+
font-size: 75%;
|
|
272
|
+
line-height: 0;
|
|
273
|
+
position: relative;
|
|
274
|
+
vertical-align: baseline;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
sub {
|
|
278
|
+
bottom: -0.25em;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
sup {
|
|
282
|
+
top: -0.5em;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
table {
|
|
286
|
+
text-indent: 0;
|
|
287
|
+
border-color: inherit;
|
|
288
|
+
border-collapse: collapse;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
button,
|
|
292
|
+
input,
|
|
293
|
+
optgroup,
|
|
294
|
+
select,
|
|
295
|
+
textarea {
|
|
296
|
+
font-family: inherit;
|
|
297
|
+
font-size: 100%;
|
|
298
|
+
font-weight: inherit;
|
|
299
|
+
line-height: inherit;
|
|
300
|
+
color: inherit;
|
|
301
|
+
margin: 0;
|
|
302
|
+
padding: 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
button,
|
|
306
|
+
select {
|
|
307
|
+
text-transform: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
button,
|
|
311
|
+
[type='button'],
|
|
312
|
+
[type='reset'],
|
|
313
|
+
[type='submit'] {
|
|
314
|
+
-webkit-appearance: button;
|
|
315
|
+
background-color: transparent;
|
|
316
|
+
background-image: none;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
::-moz-focus-inner {
|
|
320
|
+
border-style: none;
|
|
321
|
+
padding: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
:-moz-focusring {
|
|
325
|
+
outline: 1px dotted ButtonText;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
:-moz-ui-invalid {
|
|
329
|
+
box-shadow: none;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
legend {
|
|
333
|
+
padding: 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
progress {
|
|
337
|
+
vertical-align: baseline;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
::-webkit-inner-spin-button,
|
|
341
|
+
::-webkit-outer-spin-button {
|
|
342
|
+
height: auto;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
[type='search'] {
|
|
346
|
+
-webkit-appearance: textfield;
|
|
347
|
+
outline-offset: -2px;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
::-webkit-search-decoration {
|
|
351
|
+
-webkit-appearance: none;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
::-webkit-file-upload-button {
|
|
355
|
+
-webkit-appearance: button;
|
|
356
|
+
font: inherit;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
summary {
|
|
360
|
+
display: list-item;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
blockquote,
|
|
364
|
+
dl,
|
|
365
|
+
dd,
|
|
366
|
+
h1,
|
|
367
|
+
h2,
|
|
368
|
+
h3,
|
|
369
|
+
h4,
|
|
370
|
+
h5,
|
|
371
|
+
h6,
|
|
372
|
+
hr,
|
|
373
|
+
figure,
|
|
374
|
+
p,
|
|
375
|
+
pre {
|
|
376
|
+
margin: 0;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
fieldset {
|
|
380
|
+
margin: 0;
|
|
381
|
+
padding: 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
legend {
|
|
385
|
+
padding: 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
ol,
|
|
389
|
+
ul,
|
|
390
|
+
menu {
|
|
391
|
+
list-style: none;
|
|
392
|
+
margin: 0;
|
|
393
|
+
padding: 0;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
textarea {
|
|
397
|
+
resize: vertical;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
input::placeholder,
|
|
401
|
+
textarea::placeholder {
|
|
402
|
+
opacity: 1;
|
|
403
|
+
color: #9ca3af;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
button,
|
|
407
|
+
[role='button'] {
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
:disabled {
|
|
412
|
+
cursor: default;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
img,
|
|
416
|
+
svg,
|
|
417
|
+
video,
|
|
418
|
+
canvas,
|
|
419
|
+
audio,
|
|
420
|
+
iframe,
|
|
421
|
+
embed,
|
|
422
|
+
object {
|
|
423
|
+
display: block;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
img,
|
|
427
|
+
video {
|
|
428
|
+
max-width: 100%;
|
|
429
|
+
height: auto;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
[hidden] {
|
|
433
|
+
display: none;
|
|
434
|
+
}
|
|
435
|
+
`;const dR=NI`
|
|
436
|
+
:root {
|
|
437
|
+
${e=>cR(e.palette)}
|
|
438
|
+
};
|
|
439
|
+
`,cR=e=>{let t=(function(n){return{"--privy-color-background":n.background,"--privy-color-background-2":n.background2,"--privy-color-background-3":n.background3,"--privy-color-foreground":n.foreground,"--privy-color-foreground-2":n.foreground2,"--privy-color-foreground-3":n.foreground3,"--privy-color-foreground-4":n.foreground4,"--privy-color-foreground-accent":n.foregroundAccent,"--privy-color-accent":n.accent,"--privy-color-accent-light":n.accentLight,"--privy-color-accent-hover":n.accentHover,"--privy-color-accent-dark":n.accentDark,"--privy-color-accent-darkest":n.accentDarkest,"--privy-color-success":n.success,"--privy-color-success-dark":n.successDark,"--privy-color-success-light":n.successLight,"--privy-color-success-bg":n.successBg,"--privy-color-error":n.error,"--privy-color-error-light":n.errorLight,"--privy-color-error-bg":n.errorBg,"--privy-color-error-bg-hover":n.errorBgHover,"--privy-color-warn":n.warn,"--privy-color-warn-light":n.warnLight,"--privy-color-warn-bg":n.warnBg,"--privy-color-warning-dark":n.warningDark,"--privy-color-error-dark":n.errorDark,"--privy-color-info-bg":n.infoBg,"--privy-color-info-bg-hover":n.infoBgHover,"--privy-color-border-default":n.borderDefault,"--privy-color-border-hover":n.borderHover,"--privy-color-border-focus":n.borderFocus,"--privy-color-border-error":n.borderError,"--privy-color-border-success":n.borderSuccess,"--privy-color-border-warning":n.borderWarning,"--privy-color-border-info":n.borderInfo,"--privy-color-border-interactive":n.borderInteractive,"--privy-color-border-interactive-hover":n.borderInteractiveHover,"--privy-color-background-hover":n.backgroundHover,"--privy-color-background-clicked":n.backgroundClicked,"--privy-color-background-disabled":n.backgroundDisabled,"--privy-color-background-interactive":n.backgroundInteractive,"--privy-color-background-interactive-hover":n.backgroundInteractiveHover,"--privy-color-background-interactive-clicked":n.backgroundInteractiveClicked,"--privy-color-background-interactive-disabled":n.backgroundInteractiveDisabled,"--privy-color-foreground-hover":n.foregroundHover,"--privy-color-foreground-clicked":n.foregroundClicked,"--privy-color-foreground-disabled":n.foregroundDisabled,"--privy-color-foreground-interactive":n.foregroundInteractive,"--privy-color-foreground-interactive-hover":n.foregroundInteractiveHover,"--privy-link-navigation-color":n.linkNavigationColor,"--privy-link-navigation-decoration":n.linkNavigationDecoration,"--privy-accent-has-good-contrast":n.accentHasGoodContrast,"--privy-color-icon-default":n.iconDefault,"--privy-color-icon-muted":n.iconMuted,"--privy-color-icon-subtle":n.iconSubtle,"--privy-color-icon-inverse":n.iconInverse,"--privy-color-icon-success":n.iconSuccess,"--privy-color-icon-warning":n.iconWarning,"--privy-color-icon-error":n.iconError,"--privy-color-icon-interactive":n.iconInteractive,"--privy-color-icon-default-hover":n.iconDefaultHover,"--privy-color-icon-muted-hover":n.iconMutedHover,"--privy-color-icon-subtle-hover":n.iconSubtleHover,"--privy-color-icon-default-clicked":n.iconDefaultClicked,"--privy-color-icon-muted-clicked":n.iconMutedClicked,"--privy-color-icon-subtle-clicked":n.iconSubtleClicked,"--privy-color-icon-default-disabled":n.iconDefaultDisabled,"--privy-color-icon-muted-disabled":n.iconMutedDisabled,"--privy-color-icon-subtle-disabled":n.iconSubtleDisabled,"--privy-color-icon-error-hover":n.iconErrorHover,"--privy-color-icon-interactive-hover":n.iconInteractiveHover,"--privy-color-icon-error-clicked":n.iconErrorClicked,"--privy-color-icon-interactive-clicked":n.iconInteractiveClicked,"--privy-color-icon-muted-disabled-alt":n.iconMutedDisabledAlt,"--privy-color-icon-subtle-disabled-alt":n.iconSubtleDisabledAlt,"--privy-color-shadow-elevation":n.shadow,"--privy-shadow-popover":"0 2px 4px var(--privy-color-shadow-elevation)","--privy-shadow-sheet":"0 0 36px var(--privy-color-shadow-elevation)","--privy-shadow-modal":"0 8px 36px var(--privy-color-shadow-elevation)","--privy-shadow-focus-ring":"0 0 0 3px var(--privy-color-border-focus)","--privy-border-radius-xs":"6px","--privy-border-radius-sm":"8px","--privy-border-radius-md":"12px","--privy-border-radius-mdlg":"16px","--privy-border-radius-lg":"24px","--privy-border-radius-full":"9999px","--privy-height-modal-full":"620px","--privy-height-modal-compact":"480px"}})(e);return n2`
|
|
440
|
+
${Object.entries(t).map((([n,r])=>`${n}: ${r};`)).join(`
|
|
441
|
+
`)}
|
|
442
|
+
`},O6=ot.div`
|
|
443
|
+
/* css normalize only the privy application to avoid conflicts
|
|
444
|
+
with consuming application */
|
|
445
|
+
${lR}
|
|
446
|
+
|
|
447
|
+
/* Privy styles */
|
|
448
|
+
color: var(--privy-color-foreground-2);
|
|
449
|
+
|
|
450
|
+
h3 {
|
|
451
|
+
font-size: 16px;
|
|
452
|
+
line-height: 24px;
|
|
453
|
+
font-weight: 500;
|
|
454
|
+
color: var(--privy-color-foreground-2);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
h4 {
|
|
458
|
+
font-size: 14px;
|
|
459
|
+
line-height: 20px;
|
|
460
|
+
font-weight: 500;
|
|
461
|
+
color: var(--privy-color-foreground);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
p {
|
|
465
|
+
font-size: 13px;
|
|
466
|
+
line-height: 20px;
|
|
467
|
+
color: var(--privy-color-foreground-2);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
button:focus,
|
|
471
|
+
input:focus,
|
|
472
|
+
optgroup:focus,
|
|
473
|
+
select:focus,
|
|
474
|
+
textarea:focus {
|
|
475
|
+
outline: none;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
button:focus-visible,
|
|
479
|
+
input:focus-visible,
|
|
480
|
+
optgroup:focus-visible,
|
|
481
|
+
select:focus-visible,
|
|
482
|
+
textarea:focus-visible {
|
|
483
|
+
outline: none;
|
|
484
|
+
border-color: var(--privy-color-accent-light);
|
|
485
|
+
box-shadow: var(--privy-shadow-focus-ring);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.mobile-only {
|
|
489
|
+
@media (min-width: 441px) {
|
|
490
|
+
display: none;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/* Animations */
|
|
495
|
+
|
|
496
|
+
@keyframes fadein {
|
|
497
|
+
0% {
|
|
498
|
+
opacity: 0;
|
|
499
|
+
}
|
|
500
|
+
100% {
|
|
501
|
+
opacity: 1;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
`,uR=({children:e,open:t,onClick:n,...r})=>d.jsx(O7,{show:t,as:de.Fragment,children:d.jsxs(oR,{onClose:n,...r,as:hR,children:[d.jsx(Os,{as:de.Fragment,enterFrom:"entering",leaveTo:"leaving",children:d.jsx(pR,{id:"privy-dialog-backdrop","aria-hidden":"true"})}),d.jsx(fR,{children:d.jsx(Os,{as:de.Fragment,enterFrom:"entering",leaveTo:"leaving",children:d.jsx(N7,{as:yR,children:e})})})]})});let pR=ot.div`
|
|
505
|
+
position: fixed;
|
|
506
|
+
inset: 0;
|
|
507
|
+
|
|
508
|
+
transition: backdrop-filter 100ms ease;
|
|
509
|
+
backdrop-filter: blur(3px);
|
|
510
|
+
-webkit-backdrop-filter: blur(3px);
|
|
511
|
+
|
|
512
|
+
&.entering,
|
|
513
|
+
&.leaving {
|
|
514
|
+
backdrop-filter: unset;
|
|
515
|
+
-webkit-backdrop-filter: unset;
|
|
516
|
+
}
|
|
517
|
+
`,hR=ot.div`
|
|
518
|
+
position: relative;
|
|
519
|
+
z-index: 999999;
|
|
520
|
+
`,fR=ot.div`
|
|
521
|
+
position: fixed;
|
|
522
|
+
inset: 0;
|
|
523
|
+
display: flex;
|
|
524
|
+
align-items: center;
|
|
525
|
+
justify-content: center;
|
|
526
|
+
width: 100vw;
|
|
527
|
+
min-height: 100dvh;
|
|
528
|
+
/* overflow-y: auto allows the browser to scroll the focused input into view
|
|
529
|
+
when the mobile keyboard opens, preventing the keyboard from covering inputs */
|
|
530
|
+
overflow-y: auto;
|
|
531
|
+
|
|
532
|
+
@media (max-width: 440px) {
|
|
533
|
+
align-items: flex-end;
|
|
534
|
+
}
|
|
535
|
+
`;const yR=ot.div`
|
|
536
|
+
/* reset some default dialog styles */
|
|
537
|
+
padding: 0;
|
|
538
|
+
background: transparent;
|
|
539
|
+
border: none;
|
|
540
|
+
width: 100%;
|
|
541
|
+
pointer-events: auto;
|
|
542
|
+
|
|
543
|
+
outline: none;
|
|
544
|
+
display: block;
|
|
545
|
+
|
|
546
|
+
/*
|
|
547
|
+
* Normally it is bad to mix media queries like this We are doing
|
|
548
|
+
* this here specifically for animations to avoid weird jank.
|
|
549
|
+
*/
|
|
550
|
+
/* Mobile animation is a bottom drawer */
|
|
551
|
+
@media (max-width: 440px) {
|
|
552
|
+
opacity: 1;
|
|
553
|
+
transform: translate3d(0, 0, 0);
|
|
554
|
+
transition: transform 200ms ease-in;
|
|
555
|
+
position: sticky;
|
|
556
|
+
bottom: 0;
|
|
557
|
+
|
|
558
|
+
&.entering,
|
|
559
|
+
&.leaving {
|
|
560
|
+
opacity: 0;
|
|
561
|
+
transform: translate3d(0, 100%, 0);
|
|
562
|
+
transition:
|
|
563
|
+
transform 150ms ease-in 0ms,
|
|
564
|
+
opacity 0ms ease 150ms;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* Tablet/Desktop animation is a fade in */
|
|
569
|
+
@media (min-width: 441px) {
|
|
570
|
+
opacity: 1;
|
|
571
|
+
transition: opacity 100ms ease-in;
|
|
572
|
+
|
|
573
|
+
&.entering,
|
|
574
|
+
&.leaving {
|
|
575
|
+
opacity: 0;
|
|
576
|
+
transition-delay: 5ms;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
margin: auto;
|
|
580
|
+
width: 360px;
|
|
581
|
+
box-shadow: var(--privy-shadow-modal);
|
|
582
|
+
border-radius: var(--privy-border-radius-lg);
|
|
583
|
+
}
|
|
584
|
+
`;function mR(e){let{sendTransaction:t}=g.useContext(qt);return Vt("sendTransaction",e),{sendTransaction:t}}ot.div`
|
|
585
|
+
display: flex;
|
|
586
|
+
flex-direction: column;
|
|
587
|
+
align-items: center;
|
|
588
|
+
justify-content: center;
|
|
589
|
+
height: 100%;
|
|
590
|
+
`;const vZ=({success:e,fail:t})=>d.jsxs(gR,{children:[d.jsx(N6,{children:d.jsx(wR,{className:e?"success":t?"fail":""})}),d.jsx(N6,{children:d.jsx(Ld,{className:e?"success":t?"fail":""})})]});let N6=ot.span`
|
|
591
|
+
&& {
|
|
592
|
+
position: absolute;
|
|
593
|
+
top: 0;
|
|
594
|
+
left: 0;
|
|
595
|
+
z-index: 2;
|
|
596
|
+
}
|
|
597
|
+
`,gR=ot.span`
|
|
598
|
+
position: relative;
|
|
599
|
+
width: 82px;
|
|
600
|
+
height: 82px;
|
|
601
|
+
display: inline-block;
|
|
602
|
+
`;const Ld=ot.span`
|
|
603
|
+
&& {
|
|
604
|
+
width: 82px;
|
|
605
|
+
height: 82px;
|
|
606
|
+
border-width: 4px;
|
|
607
|
+
border-style: solid;
|
|
608
|
+
border-color: ${e=>e.color??"var(--privy-color-icon-subtle)"};
|
|
609
|
+
border-bottom-color: transparent;
|
|
610
|
+
border-radius: 50%;
|
|
611
|
+
display: inline-block;
|
|
612
|
+
box-sizing: border-box;
|
|
613
|
+
animation: rotation 1.2s linear infinite;
|
|
614
|
+
transition: border-color 800ms;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
@keyframes rotation {
|
|
618
|
+
0% {
|
|
619
|
+
transform: rotate(0deg);
|
|
620
|
+
}
|
|
621
|
+
100% {
|
|
622
|
+
transform: rotate(360deg);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
&&&.success {
|
|
627
|
+
border-color: var(--privy-color-icon-success);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
&&&.fail {
|
|
631
|
+
border-color: var(--privy-color-icon-error);
|
|
632
|
+
}
|
|
633
|
+
`,wR=ot(Ld)`
|
|
634
|
+
&& {
|
|
635
|
+
border-color: ${e=>e.color??"var(--privy-color-border-default)"};
|
|
636
|
+
animation: none;
|
|
637
|
+
opacity: 0.5;
|
|
638
|
+
}
|
|
639
|
+
`,CZ=e=>d.jsx(vR,{color:e.color||"var(--privy-color-foreground-3)"});let vR=ot(Ld)`
|
|
640
|
+
&& {
|
|
641
|
+
height: 1rem;
|
|
642
|
+
width: 1rem;
|
|
643
|
+
margin: 2px 0;
|
|
644
|
+
border-width: 1.5px;
|
|
645
|
+
|
|
646
|
+
/* Override default Loader to match button transitions */
|
|
647
|
+
transition: border-color 200ms ease;
|
|
648
|
+
}
|
|
649
|
+
`;const F7=({origin:e,path:t,query:n={},hash:r={}})=>{let i=e.endsWith("/")?e:`${e}/`,a=new URL(t,i);for(let[o,l]of Object.entries(n))l!==void 0&&a.searchParams.set(o,l);let s=Object.entries(r);if(s.length>0){let o=new URLSearchParams;for(let[l,c]of s)c!==void 0&&o.append(l,c);a.hash=o.toString()}return a.href},CR=({w:e,h:t})=>{let n=window.screenLeft===void 0?window.screenX:window.screenLeft,r=window.screenTop===void 0?window.screenY:window.screenTop,i=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,a=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,s=i/window.screen.availWidth,o=a/window.screen.availHeight;return`toolbar=0,location=0,menubar=0,height=${t},width=${e},popup=1,left=${(i-e)/2/s+n},top=${(a-t)/2/o+r}`},j7=e=>window.open(e?.location,void 0,CR({w:440,h:680})),la=()=>{let{walletProxy:e,initializeWalletProxy:t,client:n}=Q();return g.useMemo((()=>({signWithUserSigner:async({message:r,targetAppId:i})=>{let a=e??await t(h1);if(!a)throw Error("Wallet proxy not initialized");let s=await n.getAccessToken();if(!s)throw Error("User must be authenticated");let{signature:o}=await a.signWithUserSigner({accessToken:s,message:r,targetAppId:i});return{signature:o}}})),[e,n])};var _R=10,bR=-32700,LR=-32603,AR=-32602,ER=-32601,xR=-32600,kR=-32015,$R=-32014,SR=-32012,TR=-32010,IR=-32009,MR=-32007,PR=-32006,RR=-32004,F6=-32002,OR=-32001,NR=28e5,FR=2800001,jR=2800003,DR=2800006,UR=2800007,D7=2800008,WR=2800009,_Z=323e4,bZ=32300001,LZ=3230002,AZ=3230004,VR=361e4,HR=3610001,ZR=3610003,BR=3610005,zR=3610006,KR=3610007,qR=3611e3,GR=3704e3,YR=3704001,JR=3704004,XR=4615e3,QR=4615026,EZ=5508e3,eO=5663e3,j6=5663001,tO=5663004,nO=5663005,rO=5663006,iO=5663007,aO=5663008,sO=5663015,oO=5663016,lO=5663017,xZ=5663018,kZ=5663019,U7=5663021,dO=705e4,cO=7050030,uO=7050031,pO=7050035,hO=8078e3,fO=8078001,yO=8078002,mO=8078004,gO=8078005,wO=8078006,vO=8078007,CO=8078008,_O=8078011,jl=8078012,f3=8078013,bO=8078014,LO=8078017,AO=8078018,EO=8078022,$Z=81e5,SZ=8100002,TZ=8100003,IZ=819e4,MZ=8190001,PZ=8190002,RZ=8190003,OZ=8190004,NZ=99e5,FZ=9900001,jZ=9900004;function W7(e){return Array.isArray(e)?"%5B"+e.map(W7).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function xO([e,t]){return`${e}=${W7(t)}`}function kO(e){const t=Object.entries(e).map(xO).join("&");return btoa(t)}function $O(e,t={}){{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${kO(t)}'`),`${n}\``}}function SO(e,t){return e instanceof Error&&e.name==="SolanaError"?t!==void 0?e.context.__code===t:!0:!1}var ve=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,r;t&&Object.entries(Object.getOwnPropertyDescriptors(t)).forEach(([a,s])=>{a==="cause"?r={cause:s.value}:(n===void 0&&(n={__code:e}),Object.defineProperty(n,a,s))});const i=$O(e,n);super(i,r),this.context=Object.freeze(n===void 0?{__code:e}:n),this.name="SolanaError"}};function V7(...e){"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(...e)}function H7({errorCodeBaseOffset:e,getErrorContext:t,orderedErrorNames:n,rpcEnumError:r},i){let a,s;typeof r=="string"?a=r:(a=Object.keys(r)[0],s=r[a]);const o=n.indexOf(a),l=e+o,c=t(l,a,s),u=new ve(l,c);return V7(u,i),u}var TO=["GenericError","InvalidArgument","InvalidInstructionData","InvalidAccountData","AccountDataTooSmall","InsufficientFunds","IncorrectProgramId","MissingRequiredSignature","AccountAlreadyInitialized","UninitializedAccount","UnbalancedInstruction","ModifiedProgramId","ExternalAccountLamportSpend","ExternalAccountDataModified","ReadonlyLamportChange","ReadonlyDataModified","DuplicateAccountIndex","ExecutableModified","RentEpochModified","NotEnoughAccountKeys","AccountDataSizeChanged","AccountNotExecutable","AccountBorrowFailed","AccountBorrowOutstanding","DuplicateAccountOutOfSync","Custom","InvalidError","ExecutableDataModified","ExecutableLamportChange","ExecutableAccountNotRentExempt","UnsupportedProgramId","CallDepth","MissingAccount","ReentrancyNotAllowed","MaxSeedLengthExceeded","InvalidSeeds","InvalidRealloc","ComputationalBudgetExceeded","PrivilegeEscalation","ProgramEnvironmentSetupFailure","ProgramFailedToComplete","ProgramFailedToCompile","Immutable","IncorrectAuthority","BorshIoError","AccountNotRentExempt","InvalidAccountOwner","ArithmeticOverflow","UnsupportedSysvar","IllegalOwner","MaxAccountsDataAllocationsExceeded","MaxAccountsExceeded","MaxInstructionTraceLengthExceeded","BuiltinProgramsMustConsumeComputeUnits"];function Z7(e,t){const n=Number(e);return H7({errorCodeBaseOffset:4615001,getErrorContext(r,i,a){return r===XR?{errorName:i,index:n,...a!==void 0?{instructionErrorContext:a}:null}:r===QR?{code:Number(a),index:n}:{index:n}},orderedErrorNames:TO,rpcEnumError:t},Z7)}var IO=["AccountInUse","AccountLoadedTwice","AccountNotFound","ProgramAccountNotFound","InsufficientFundsForFee","InvalidAccountForFee","AlreadyProcessed","BlockhashNotFound","CallChainTooDeep","MissingSignatureForFee","InvalidAccountIndex","SignatureFailure","InvalidProgramForExecution","SanitizeFailure","ClusterMaintenance","AccountBorrowOutstanding","WouldExceedMaxBlockCostLimit","UnsupportedVersion","InvalidWritableAccount","WouldExceedMaxAccountCostLimit","WouldExceedAccountDataBlockLimit","TooManyAccountLocks","AddressLookupTableNotFound","InvalidAddressLookupTableOwner","InvalidAddressLookupTableData","InvalidAddressLookupTableIndex","InvalidRentPayingAccount","WouldExceedMaxVoteCostLimit","WouldExceedAccountDataTotalLimit","DuplicateInstruction","InsufficientFundsForRent","MaxLoadedAccountsDataSizeExceeded","InvalidLoadedAccountsDataSizeLimit","ResanitizationNeeded","ProgramExecutionTemporarilyRestricted","UnbalancedTransaction"];function B7(e){return typeof e=="object"&&"InstructionError"in e?Z7(...e.InstructionError):H7({errorCodeBaseOffset:7050001,getErrorContext(t,n,r){if(t===dO)return{errorName:n,...r!==void 0?{transactionErrorContext:r}:null};if(t===cO)return{index:Number(r)};if(t===uO||t===pO)return{accountIndex:Number(r.account_index)}},orderedErrorNames:IO,rpcEnumError:e},B7)}function MO(e){let t;if(PO(e)){const{code:n,data:r,message:i}=e,a=Number(n);if(a===F6){const{err:s,...o}=r,l=s?{cause:B7(s)}:null;t=new ve(F6,{...o,...l})}else{let s;switch(a){case LR:case AR:case xR:case ER:case bR:case SR:case OR:case RR:case $R:case TR:case IR:case MR:case PR:case kR:s={__serverMessage:i};break;default:typeof r=="object"&&!Array.isArray(r)&&(s=r)}t=new ve(a,s)}}else{const n=typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"?e.message:"Malformed JSON-RPC error with no message attribute";t=new ve(_R,{error:e,message:n})}return V7(t,MO),t}function PO(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e&&(typeof e.code=="number"||typeof e.code=="bigint")&&typeof e.message=="string"}function RO(e,t){if(e.length>=t)return e;const n=new Uint8Array(t).fill(0);return n.set(e),n}var OO=(e,t)=>RO(e.length<=t?e:e.slice(0,t),t);function NO(e,t,n){const r=n===0&&e.length===t.length?e:e.slice(n,n+t.length);return z7(r,t)}function z7(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function ta(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function Pt(e){return Object.freeze({...e,encode:t=>{const n=new Uint8Array(ta(t,e));return e.write(t,n,0),n}})}function vt(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0]})}function gt(e){return"fixedSize"in e&&typeof e.fixedSize=="number"}function DZ(e){if(!gt(e))throw new ve(yO)}function FO(e){return!gt(e)}function jO(e,t){if(gt(e)!==gt(t))throw new ve(mO);if(gt(e)&>(t)&&e.fixedSize!==t.fixedSize)throw new ve(gO,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!gt(e)&&!gt(t)&&e.maxSize!==t.maxSize)throw new ve(wO,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function DO(e,t,n=0){if(t.length-n<=0)throw new ve(hO,{codecDescription:e})}function Z1(e,t,n,r=0){const i=n.length-r;if(i<t)throw new ve(fO,{bytesLength:i,codecDescription:e,expected:t})}function Dl(e,t,n){if(t<0||t>n)throw new ve(bO,{bytesLength:n,codecDescription:e,offset:t})}function UO(e,t){const n=((s,o,l)=>{const c=e.encode(s);return l=t.write(c.length,o,l),o.set(c,l),l+c.length});if(gt(t)&>(e))return Pt({...e,fixedSize:t.fixedSize+e.fixedSize,write:n});const r=gt(t)?t.fixedSize:t.maxSize??null,i=gt(e)?e.fixedSize:e.maxSize??null,a=r!==null&&i!==null?r+i:null;return Pt({...e,...a!==null?{maxSize:a}:{},getSizeFromValue:s=>{const o=ta(s,e);return ta(o,t)+o},write:n})}function WO(e,t){const n=((s,o)=>{const[l,c]=t.read(s,o),u=Number(l);return o=c,(o>0||s.length>u)&&(s=s.slice(o,o+u)),Z1("addDecoderSizePrefix",u,s),[e.decode(s),o+u]});if(gt(t)&>(e))return vt({...e,fixedSize:t.fixedSize+e.fixedSize,read:n});const r=gt(t)?t.fixedSize:t.maxSize??null,i=gt(e)?e.fixedSize:e.maxSize??null,a=r!==null&&i!==null?r+i:null;return vt({...e,...a!==null?{maxSize:a}:{},read:n})}function Ul(e,t,n){const r=e.byteOffset+(t??0),i=n??e.byteLength;let a;return typeof SharedArrayBuffer>"u"?a=e.buffer:e.buffer instanceof SharedArrayBuffer?(a=new ArrayBuffer(e.length),new Uint8Array(a).set(new Uint8Array(e))):a=e.buffer,(r===0||r===-e.byteLength)&&i===e.byteLength?a:a.slice(r,r+i)}function B1(e,t){return Pt({fixedSize:t,write:(n,r,i)=>{const a=e.encode(n),s=a.length>t?a.slice(0,t):a;return r.set(s,i),i+t}})}function z1(e,t){return vt({fixedSize:t,read:(n,r)=>{Z1("fixCodecSize",t,n,r),(r>0||n.length>t)&&(n=n.slice(r,r+t)),gt(e)&&(n=OO(n,e.fixedSize));const[i]=e.read(n,0);return[i,r+t]}})}function VO(e,t){return Pt({...e,write:(n,r,i)=>{const a=c=>K7(c,r.length),s=t.preOffset?t.preOffset({bytes:r,preOffset:i,wrapBytes:a}):i;Dl("offsetEncoder",s,r.length);const o=e.write(n,r,s),l=t.postOffset?t.postOffset({bytes:r,newPreOffset:s,postOffset:o,preOffset:i,wrapBytes:a}):o;return Dl("offsetEncoder",l,r.length),l}})}function HO(e,t){return vt({...e,read:(n,r)=>{const i=c=>K7(c,n.length),a=t.preOffset?t.preOffset({bytes:n,preOffset:r,wrapBytes:i}):r;Dl("offsetDecoder",a,n.length);const[s,o]=e.read(n,a),l=t.postOffset?t.postOffset({bytes:n,newPreOffset:a,postOffset:o,preOffset:r,wrapBytes:i}):o;return Dl("offsetDecoder",l,n.length),[s,l]}})}function K7(e,t){return t===0?0:(e%t+t)%t}function ZO(e,t){if(gt(e)){const n=t(e.fixedSize);if(n<0)throw new ve(f3,{bytesLength:n,codecDescription:"resizeEncoder"});return Pt({...e,fixedSize:n})}return Pt({...e,getSizeFromValue:n=>{const r=t(e.getSizeFromValue(n));if(r<0)throw new ve(f3,{bytesLength:r,codecDescription:"resizeEncoder"});return r}})}function BO(e,t){if(gt(e)){const n=t(e.fixedSize);if(n<0)throw new ve(f3,{bytesLength:n,codecDescription:"resizeDecoder"});return vt({...e,fixedSize:n})}return e}function UZ(e,t){return VO(ZO(e,n=>n+t),{preOffset:({preOffset:n})=>n+t})}function zO(e,t){return HO(BO(e,n=>n+t),{postOffset:({postOffset:n})=>n+t})}function Ad(e,t){return Pt({...FO(e)?{...e,getSizeFromValue:n=>e.getSizeFromValue(t(n))}:e,write:(n,r,i)=>e.write(t(n),r,i)})}function vi(e,t){return vt({...e,read:(n,r)=>{const[i,a]=e.read(n,r);return[t(i,n,r),a]}})}function KO(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new ve(jl,{alphabet:e,base:e.length,value:n})}var qO=e=>Pt({getSizeFromValue:t=>{const[n,r]=D6(t,e[0]);if(!r)return t.length;const i=U6(r,e);return n.length+Math.ceil(i.toString(16).length/2)},write(t,n,r){if(KO(e,t),t==="")return r;const[i,a]=D6(t,e[0]);if(!a)return n.set(new Uint8Array(i.length).fill(0),r),r+i.length;let s=U6(a,e);const o=[];for(;s>0n;)o.unshift(Number(s%256n)),s/=256n;const l=[...Array(i.length).fill(0),...o];return n.set(l,r),r+l.length}}),GO=e=>vt({read(t,n){const r=n===0?t:t.slice(n);if(r.length===0)return["",0];let i=r.findIndex(l=>l!==0);i=i===-1?r.length:i;const a=e[0].repeat(i);if(i===r.length)return[a,t.length];const s=r.slice(i).reduce((l,c)=>l*256n+BigInt(c),0n),o=YO(s,e);return[a+o,t.length]}});function D6(e,t){const[n,r]=e.split(new RegExp(`((?!${t}).*)`));return[n,r]}function U6(e,t){const n=BigInt(t.length);let r=0n;for(const i of e)r*=n,r+=BigInt(t.indexOf(i));return r}function YO(e,t){const n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}var q7="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",G7=()=>qO(q7),JO=()=>GO(q7),W6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",WZ=()=>Pt({getSizeFromValue:e=>{try{return atob(e).length}catch{throw new ve(jl,{alphabet:W6,base:64,value:e})}},write(e,t,n){try{const r=atob(e).split("").map(i=>i.charCodeAt(0));return t.set(r,n),r.length+n}catch{throw new ve(jl,{alphabet:W6,base:64,value:e})}}}),XO=()=>vt({read(e,t=0){const n=e.slice(t);return[btoa(String.fromCharCode(...n)),e.length]}}),QO=e=>e.replace(/\u0000/g,""),eN=globalThis.TextDecoder,VZ=()=>{let e;return vt({read(t,n){const r=(e||=new eN).decode(t.slice(n));return[QO(r),t.length]}})};function tN(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.getRandomValues!="function")throw new ve(qR)}function Ed(){if(!globalThis.isSecureContext)throw new ve(VR)}function nN(){if(Ed(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.digest!="function")throw new ve(HR)}function Y7(){if(Ed(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.exportKey!="function")throw new ve(ZR)}function rN(){if(Ed(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.sign!="function")throw new ve(BR)}function iN(){if(Ed(),typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.verify!="function")throw new ve(zR)}var Mc,Pc;function K1(){return Mc||(Mc=G7()),Mc}function aN(){return Pc||(Pc=JO()),Pc}function sN(e){if(e.length<32||e.length>44)return!1;const t=K1();try{return t.encode(e).byteLength===32}catch{return!1}}function y3(e){if(e.length<32||e.length>44)throw new ve(FR,{actualLength:e.length});const r=K1().encode(e).byteLength;if(r!==32)throw new ve(NR,{actualLength:r})}function J7(e){return y3(e),e}function q1(){return Ad(B1(K1(),32),e=>J7(e))}function oo(){return z1(aN(),32)}function oN(){return jO(q1(),oo())}function G1(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:!1,localeMatcher:"best fit",numeric:!1,sensitivity:"variant",usage:"sort"}).compare}var lN=37095705934669439343138083508754565189542113879843219016388785533085940283555n,on=57896044618658097711785492504343953926634992332820282019728792003956564819949n,V6=19681161376707505956807079304988542015446066515923890162744021073123829784752n;function Mn(e){const t=e%on;return t>=0n?t:on+t}function cr(e,t){let n=e;for(;t-- >0n;)n*=n,n%=on;return n}function dN(e){const n=e*e%on*e%on,r=cr(n,2n)*n%on,i=cr(r,1n)*e%on,a=cr(i,5n)*i%on,s=cr(a,10n)*a%on,o=cr(s,20n)*s%on,l=cr(o,40n)*o%on,c=cr(l,80n)*l%on,u=cr(c,80n)*l%on,p=cr(u,10n)*a%on;return cr(p,2n)*e%on}function cN(e,t){const n=Mn(t*t*t),r=Mn(n*n*t),i=dN(e*r);let a=Mn(e*n*i);const s=Mn(t*a*a),o=a,l=Mn(a*V6),c=s===e,u=s===Mn(-e),p=s===Mn(-e*V6);return c&&(a=o),(u||p)&&(a=l),(Mn(a)&1n)===1n&&(a=Mn(-a)),!c&&!u?null:a}function uN(e,t){const n=Mn(e*e),r=Mn(n-1n),i=Mn(lN*n+1n),a=cN(r,i);if(a===null)return!1;const s=(t&128)!==0;return!(a===0n&&s)}function pN(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function hN(e){const n=`0x${e.reduce((r,i,a)=>`${pN(a===31?i&-129:i)}${r}`,"")}`;return BigInt(n)}function fN(e){if(e.byteLength!==32)return!1;const t=hN(e);return uN(t,e[31])}var H6=32,Z6=16,yN=[80,114,111,103,114,97,109,68,101,114,105,118,101,100,65,100,100,114,101,115,115];async function mN({programAddress:e,seeds:t}){if(nN(),t.length>Z6)throw new ve(DR,{actual:t.length,maxSeeds:Z6});let n;const r=t.reduce((l,c,u)=>{const p=typeof c=="string"?(n||=new TextEncoder).encode(c):c;if(p.byteLength>H6)throw new ve(UR,{actual:p.byteLength,index:u,maxSeedLength:H6});return l.push(...p),l},[]),i=oN(),a=i.encode(e),s=await crypto.subtle.digest("SHA-256",new Uint8Array([...r,...a,...yN])),o=new Uint8Array(s);if(fN(o))throw new ve(D7);return i.decode(o)}async function HZ({programAddress:e,seeds:t}){let n=255;for(;n>0;)try{return[await mN({programAddress:e,seeds:[...t,new Uint8Array([n])]}),n]}catch(r){if(SO(r,D7))n--;else throw r}throw new ve(WR)}async function gN(e){if(Y7(),e.type!=="public"||e.algorithm.name!=="Ed25519")throw new ve(jR);const t=await crypto.subtle.exportKey("raw",e);return oo().decode(new Uint8Array(t))}function X7(e,t,n,r){if(r<t||r>n)throw new ve(_O,{codecDescription:e,max:n,min:t,value:r})}function Q7(e){return e?.endian!==1}function Y1(e){return Pt({fixedSize:e.size,write(t,n,r){e.range&&X7(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,Q7(e.config)),n.set(new Uint8Array(i),r),r+e.size}})}function r2(e){return vt({fixedSize:e.size,read(t,n=0){DO(e.name,t,n),Z1(e.name,e.size,t,n);const r=new DataView(Ul(t,n,e.size));return[e.get(r,Q7(e.config)),n+e.size]}})}var ZZ=(e={})=>r2({config:e,get:(t,n)=>t.getFloat64(0,n),name:"f64",size:8}),BZ=(e={})=>r2({config:e,get:(t,n)=>t.getInt16(0,n),name:"i16",size:2}),na=()=>Pt({getSizeFromValue:e=>e<=127?1:e<=16383?2:3,maxSize:3,write:(e,t,n)=>{X7("shortU16",0,65535,e);const r=[0];for(let i=0;;i+=1){const a=Number(e)>>i*7;if(a===0)break;const s=127&a;r[i]=s,i>0&&(r[i-1]|=128)}return t.set(r,n),n+r.length}}),yi=()=>vt({maxSize:3,read:(e,t)=>{let n=0,r=0;for(;++r;){const i=r-1,a=e[t+i],s=127&a;if(n|=s<<i*7,(a&128)===0)break}return[n,t+r]}}),zZ=(e={})=>r2({config:e,get:(t,n)=>t.getUint16(0,n),name:"u16",size:2}),wN=(e={})=>Y1({config:e,name:"u32",range:[0,+"0xffffffff"],set:(t,n,r)=>t.setUint32(0,Number(n),r),size:4}),vN=(e={})=>r2({config:e,get:(t,n)=>t.getUint32(0,n),name:"u32",size:4}),KZ=(e={})=>Y1({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,n,r)=>t.setBigUint64(0,BigInt(n),r),size:8}),qZ=(e={})=>r2({config:e,get:(t,n)=>t.getBigUint64(0,n),name:"u64",size:8}),Wl=()=>Y1({name:"u8",range:[0,+"0xff"],set:(e,t)=>e.setUint8(0,Number(t)),size:1}),mi=()=>r2({get:e=>e.getUint8(0),name:"u8",size:1});function CN(e,t,n){if(t!==n)throw new ve(vO,{actual:n,codecDescription:e,expected:t})}function _N(e){return e.reduce((t,n)=>t===null||n===null?null:Math.max(t,n),0)}function Va(e){return e.reduce((t,n)=>t===null||n===null?null:t+n,0)}function lo(e){return gt(e)?e.fixedSize:null}function i2(e){return gt(e)?e.fixedSize:e.maxSize??null}function Ha(e,t={}){const n=t.size??wN(),r=Vl(n,lo(e)),i=Vl(n,i2(e))??void 0;return Pt({...r!==null?{fixedSize:r}:{getSizeFromValue:a=>(typeof n=="object"?ta(a.length,n):0)+[...a].reduce((o,l)=>o+ta(l,e),0),maxSize:i},write:(a,s,o)=>(typeof n=="number"&&CN("array",n,a.length),typeof n=="object"&&(o=n.write(a.length,s,o)),a.forEach(l=>{o=e.write(l,s,o)}),o)})}function gi(e,t={}){const n=t.size??vN(),r=lo(e),i=Vl(n,r),a=Vl(n,i2(e))??void 0;return vt({...i!==null?{fixedSize:i}:{maxSize:a},read:(s,o)=>{const l=[];if(typeof n=="object"&&s.slice(o).length===0)return[l,o];if(n==="remainder"){for(;o<s.length;){const[p,h]=e.read(s,o);o=h,l.push(p)}return[l,o]}const[c,u]=typeof n=="number"?[n,o]:n.read(s,o);o=u;for(let p=0;p<c;p+=1){const[h,f]=e.read(s,o);o=f,l.push(h)}return[l,o]}})}function Vl(e,t){return typeof e!="number"?null:e===0?0:t===null?null:t*e}function GZ(e={}){return vi(e.size??mi(),t=>Number(t)===1)}function J1(){return Pt({getSizeFromValue:e=>e.length,write:(e,t,n)=>(t.set(e,n),n+e.length)})}function m3(){return vt({read:(e,t)=>{const n=e.slice(t);return[n,t+n.length]}})}var bN=()=>vt({read(e,t){return[e.slice(t).reduce((r,i)=>r+i.toString(16).padStart(2,"0"),""),e.length]}});function LN(e){return Pt({fixedSize:e.length,write:(t,n,r)=>(n.set(e,r),r+e.length)})}function YZ(e){return vt({fixedSize:e.length,read:(t,n)=>{const r=bN();if(!NO(t,e,n))throw new ve(AO,{constant:e,data:t,hexConstant:r.decode(e),hexData:r.decode(t),offset:n});return[void 0,n+e.length]}})}function xd(e){const t=Va(e.map(lo)),n=Va(e.map(i2))??void 0;return vt({...t===null?{maxSize:n}:{fixedSize:t},read:(r,i)=>{const a=[];return e.forEach(s=>{const[o,l]=s.read(r,i);a.push(o),i=l}),[a,i]}})}function AN(e,t){const n=e8(e),r=(a,s,o)=>{const l=t(a);return g3(e,l),e[l].write(a,s,o)};if(n!==null)return Pt({fixedSize:n,write:r});const i=t8(e);return Pt({...i!==null?{maxSize:i}:{},getSizeFromValue:a=>{const s=t(a);return g3(e,s),ta(a,e[s])},write:r})}function EN(e,t){const n=e8(e),r=(a,s)=>{const o=t(a,s);return g3(e,o),e[o].read(a,s)};if(n!==null)return vt({fixedSize:n,read:r});const i=t8(e);return vt({...i!==null?{maxSize:i}:{},read:r})}function g3(e,t){if(typeof e[t]>"u")throw new ve(LO,{maxRange:e.length-1,minRange:0,variant:t})}function e8(e){if(e.length===0)return 0;if(!gt(e[0]))return null;const t=e[0].fixedSize;return e.every(r=>gt(r)&&r.fixedSize===t)?t:null}function t8(e){return _N(e.map(t=>i2(t)))}function JZ(e,t={}){const n=t.discriminator??"__kind",r=t.size??mi();return EN(e.map(([i,a])=>vi(xd([r,a]),([,s])=>({[n]:i,...s}))),(i,a)=>Number(r.read(i,a)[0]))}function xN(e){const t=[...new Set(Object.values(e).filter(s=>typeof s=="number"))].sort(),n=Object.fromEntries(Object.entries(e).slice(t.length)),r=Object.keys(n),i=Object.values(n),a=[...new Set([...r,...i.filter(s=>typeof s=="string")])];return{enumKeys:r,enumRecord:n,enumValues:i,numericalValues:t,stringValues:a}}function kN({discriminator:e,enumKeys:t,enumValues:n,useValuesAsDiscriminators:r}){return r?$N(n,i=>i===e):e>=0&&e<t.length?e:-1}function $N(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return n;return-1}function SN(e){if(e.length===0)return"";let t=[e[0],e[0]];const n=[];for(let r=1;r<e.length;r++){const i=e[r];t[1]+1===i?t[1]=i:(n.push(t[0]===t[1]?`${t[0]}`:`${t[0]}-${t[1]}`),t=[i,i])}return n.push(t[0]===t[1]?`${t[0]}`:`${t[0]}-${t[1]}`),n.join(", ")}function XZ(e,t={}){const n=t.size??mi(),r=t.useValuesAsDiscriminators??!1,{enumKeys:i,enumValues:a,numericalValues:s}=xN(e);if(r&&a.some(o=>typeof o=="string"))throw new ve(EO,{stringValues:a.filter(o=>typeof o=="string")});return vi(n,o=>{const l=Number(o),c=kN({discriminator:l,enumKeys:i,enumValues:a,useValuesAsDiscriminators:r});if(c<0){const u=r?s:[...Array(i.length).keys()];throw new ve(CO,{discriminator:l,formattedValidDiscriminators:SN(u),validDiscriminators:u})}return a[c]})}function QZ(e,t){return vi(xd([...t,e]),n=>n[n.length-1])}function eB(e,t,n={}){return vi(gi(xd([e,t]),n),r=>new Map(r))}function tB(){return vt({fixedSize:0,read:(e,t)=>[void 0,t]})}function a2(e){const t=e.map(([,i])=>i),n=Va(t.map(lo)),r=Va(t.map(i2))??void 0;return Pt({...n===null?{getSizeFromValue:i=>e.map(([a,s])=>ta(i[a],s)).reduce((a,s)=>a+s,0),maxSize:r}:{fixedSize:n},write:(i,a,s)=>(e.forEach(([o,l])=>{s=l.write(i[o],a,s)}),s)})}function co(e){const t=e.map(([,i])=>i),n=Va(t.map(lo)),r=Va(t.map(i2))??void 0;return vt({...n===null?{maxSize:r}:{fixedSize:n},read:(i,a)=>{const s={};return e.forEach(([o,l])=>{const[c,u]=l.read(i,a);a=u,s[o]=c}),[s,a]}})}function TN(e,...t){return t.reduce((n,r)=>r(n),e)}var Qt=(e=>(e[e.WRITABLE_SIGNER=3]="WRITABLE_SIGNER",e[e.READONLY_SIGNER=2]="READONLY_SIGNER",e[e.WRITABLE=1]="WRITABLE",e[e.READONLY=0]="READONLY",e))(Qt||{}),IN=2,MN=1;function Za(e){return e>=2}function Ns(e){return(e&MN)!==0}function B6(e,t){return e|t}function nB(e){return e|IN}function PN(e){return sN(e)}function rB(e){return e}function iB(e){return e}function RN(e){return"lifetimeConstraint"in e&&typeof e.lifetimeConstraint.blockhash=="string"&&typeof e.lifetimeConstraint.lastValidBlockHeight=="bigint"&&PN(e.lifetimeConstraint.blockhash)}function ON(e,t){return"lifetimeConstraint"in t&&t.lifetimeConstraint&&"blockhash"in t.lifetimeConstraint&&t.lifetimeConstraint.blockhash===e.blockhash&&t.lifetimeConstraint.lastValidBlockHeight===e.lastValidBlockHeight?t:Object.freeze({...t,lifetimeConstraint:Object.freeze(e)})}function NN(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new ve(jl,{alphabet:e,base:e.length,value:n})}var FN=e=>Pt({getSizeFromValue:t=>{const[n,r]=z6(t,e[0]);if(!r)return t.length;const i=K6(r,e);return n.length+Math.ceil(i.toString(16).length/2)},write(t,n,r){if(NN(e,t),t==="")return r;const[i,a]=z6(t,e[0]);if(!a)return n.set(new Uint8Array(i.length).fill(0),r),r+i.length;let s=K6(a,e);const o=[];for(;s>0n;)o.unshift(Number(s%256n)),s/=256n;const l=[...Array(i.length).fill(0),...o];return n.set(l,r),r+l.length}}),jN=e=>vt({read(t,n){const r=n===0?t:t.slice(n);if(r.length===0)return["",0];let i=r.findIndex(l=>l!==0);i=i===-1?r.length:i;const a=e[0].repeat(i);if(i===r.length)return[a,t.length];const s=r.slice(i).reduce((l,c)=>l*256n+BigInt(c),0n),o=DN(s,e);return[a+o,t.length]}});function z6(e,t){const[n,r]=e.split(new RegExp(`((?!${t}).*)`));return[n,r]}function K6(e,t){const n=BigInt(t.length);let r=0n;for(const i of e)r*=n,r+=BigInt(t.indexOf(i));return r}function DN(e,t){const n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}var n8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",UN=()=>FN(n8),WN=()=>jN(n8),Rc;function VN(){if(!Rc){const e=Ha(Wl(),{size:na()});Rc=a2([["lookupTableAddress",q1()],["writableIndexes",e],["readonlyIndexes",e]])}return Rc}var Oc;function HN(){if(!Oc){const e=gi(mi(),{size:yi()});Oc=co([["lookupTableAddress",oo()],["writableIndexes",e],["readonlyIndexes",e]])}return Oc}var Nc;function Fc(){return Nc||(Nc=Wl()),Nc}var jc;function Dc(){return jc||(jc=mi()),jc}function ZN(){return a2([["numSignerAccounts",Fc()],["numReadonlySignerAccounts",Fc()],["numReadonlyNonSignerAccounts",Fc()]])}function BN(){return co([["numSignerAccounts",Dc()],["numReadonlySignerAccounts",Dc()],["numReadonlyNonSignerAccounts",Dc()]])}var Uc;function zN(){return Uc||(Uc=Ad(a2([["programAddressIndex",Wl()],["accountIndices",Ha(Wl(),{size:na()})],["data",UO(J1(),na())]]),e=>e.accountIndices!==void 0&&e.data!==void 0?e:{...e,accountIndices:e.accountIndices??[],data:e.data??new Uint8Array(0)})),Uc}var Wc;function KN(){return Wc||(Wc=vi(co([["programAddressIndex",mi()],["accountIndices",gi(mi(),{size:yi()})],["data",WO(m3(),yi())]]),e=>{if(e.accountIndices.length&&e.data.byteLength)return e;const{accountIndices:t,data:n,...r}=e;return{...r,...t.length?{accountIndices:t}:null,...n.byteLength?{data:n}:null}})),Wc}var r8=0,w3=128;function qN(){return Pt({getSizeFromValue:e=>e==="legacy"?0:1,maxSize:1,write:(e,t,n)=>{if(e==="legacy")return n;if(e<0||e>127)throw new ve(tO,{actualVersion:e});if(e>r8)throw new ve(U7,{unsupportedVersion:e});return t.set([e|w3],n),n+1}})}function i8(){return vt({maxSize:1,read:(e,t)=>{const n=e[t];if((n&w3)===0)return["legacy",t];{const r=n^w3;if(r>r8)throw new ve(U7,{unsupportedVersion:r});return[r,t+1]}}})}function q6(){return a2(a8())}function G6(){return Ad(a2([...a8(),["addressTableLookups",YN()]]),e=>e.version==="legacy"?e:{...e,addressTableLookups:e.addressTableLookups??[]})}function a8(){const e=AN([LN(new Uint8Array(32)),B1(UN(),32)],t=>t===void 0?0:1);return[["version",qN()],["header",ZN()],["staticAccounts",Ha(q1(),{size:na()})],["lifetimeToken",e],["instructions",Ha(zN(),{size:na()})]]}function GN(){return[["version",i8()],["header",BN()],["staticAccounts",gi(oo(),{size:yi()})],["lifetimeToken",z1(WN(),32)],["instructions",gi(KN(),{size:yi()})],["addressTableLookups",JN()]]}function YN(){return Ha(VN(),{size:na()})}function JN(){return gi(HN(),{size:yi()})}function XN(){return Pt({getSizeFromValue:e=>e.version==="legacy"?q6().getSizeFromValue(e):G6().getSizeFromValue(e),write:(e,t,n)=>e.version==="legacy"?q6().write(e,t,n):G6().write(e,t,n)})}function aB(){return vi(co(GN()),({addressTableLookups:e,...t})=>t.version==="legacy"||!e?.length?t:{...t,addressTableLookups:e})}function Y6(e,t,n){e[t]=n(e[t]??{role:Qt.READONLY})}var St=Symbol("AddressMapTypeProperty");function QN(e,t){const n={[e]:{[St]:0,role:Qt.WRITABLE_SIGNER}},r=new Set;for(const i of t){Y6(n,i.programAddress,s=>{if(r.add(i.programAddress),St in s){if(Ns(s.role))throw s[St]===0?new ve(eO,{programAddress:i.programAddress}):new ve(j6,{programAddress:i.programAddress});if(s[St]===2)return s}return{[St]:2,role:Qt.READONLY}});let a;if(i.accounts)for(const s of i.accounts)Y6(n,s.address,o=>{const{address:l,...c}=s;if(St in o)switch(o[St]){case 0:return o;case 1:{const u=B6(o.role,c.role);if("lookupTableAddress"in c){if(o.lookupTableAddress!==c.lookupTableAddress&&(a||=G1())(c.lookupTableAddress,o.lookupTableAddress)<0)return{[St]:1,...c,role:u}}else if(Za(c.role))return{[St]:2,role:u};return o.role!==u?{...o,role:u}:o}case 2:{const u=B6(o.role,c.role);if(r.has(s.address)){if(Ns(c.role))throw new ve(j6,{programAddress:s.address});return o.role!==u?{...o,role:u}:o}else return"lookupTableAddress"in c&&!Za(o.role)?{...c,[St]:1,role:u}:o.role!==u?{...o,role:u}:o}}return"lookupTableAddress"in c?{...c,[St]:1}:{...c,[St]:2}})}return n}function eF(e){let t;return Object.entries(e).sort(([r,i],[a,s])=>{if(i[St]!==s[St]){if(i[St]===0)return-1;if(s[St]===0)return 1;if(i[St]===2)return-1;if(s[St]===2)return 1}const o=Za(i.role);if(o!==Za(s.role))return o?-1:1;const l=Ns(i.role);return l!==Ns(s.role)?l?-1:1:(t||=G1(),i[St]===1&&s[St]===1&&i.lookupTableAddress!==s.lookupTableAddress?t(i.lookupTableAddress,s.lookupTableAddress):t(r,a))}).map(([r,i])=>({address:r,...i}))}function tF(e){const t={};for(const n of e){if(!("lookupTableAddress"in n))continue;const r=t[n.lookupTableAddress]||={readonlyIndexes:[],writableIndexes:[]};n.role===Qt.WRITABLE?r.writableIndexes.push(n.addressIndex):r.readonlyIndexes.push(n.addressIndex)}return Object.keys(t).sort(G1()).map(n=>({lookupTableAddress:n,...t[n]}))}function nF(e){let t=0,n=0,r=0;for(const i of e){if("lookupTableAddress"in i)break;const a=Ns(i.role);Za(i.role)?(r++,a||n++):a||t++}return{numReadonlyNonSignerAccounts:t,numReadonlySignerAccounts:n,numSignerAccounts:r}}function rF(e){const t={};for(const[n,r]of e.entries())t[r.address]=n;return t}function iF(e,t){const n=rF(t);return e.map(({accounts:r,data:i,programAddress:a})=>({programAddressIndex:n[a],...r?{accountIndices:r.map(({address:s})=>n[s])}:null,...i?{data:i}:null}))}function aF(e){return"nonce"in e?e.nonce:e.blockhash}function sF(e){const t=e.findIndex(r=>"lookupTableAddress"in r);return(t===-1?e:e.slice(0,t)).map(({address:r})=>r)}function oF(e){const t=QN(e.feePayer.address,e.instructions),n=eF(t),r=e.lifetimeConstraint;return{...e.version!=="legacy"?{addressTableLookups:tF(n)}:null,...r?{lifetimeToken:aF(r)}:null,header:nF(n),instructions:iF(e.instructions,n),staticAccounts:sF(n),version:e.version}}function lF(e){return Object.freeze({instructions:Object.freeze([]),version:e.version})}var s8="SysvarRecentB1ockHashes11111111111111111111",o8="11111111111111111111111111111111";function J6(e,t){return{accounts:[{address:e,role:Qt.WRITABLE},{address:s8,role:Qt.READONLY},{address:t,role:Qt.READONLY_SIGNER}],data:new Uint8Array([4,0,0,0]),programAddress:o8}}function X1(e){return e.programAddress===o8&&e.data!=null&&dF(e.data)&&e.accounts?.length===3&&e.accounts[0].address!=null&&e.accounts[0].role===Qt.WRITABLE&&e.accounts[1].address===s8&&e.accounts[1].role===Qt.READONLY&&e.accounts[2].address!=null&&Za(e.accounts[2].role)}function dF(e){return e.byteLength===4&&e[0]===4&&e[1]===0&&e[2]===0&&e[3]===0}function l8(e){return"lifetimeConstraint"in e&&typeof e.lifetimeConstraint.nonce=="string"&&e.instructions[0]!=null&&X1(e.instructions[0])}function cF(e,t,n){return e.accounts[0].address===t&&e.accounts[2].address===n}function uF({nonce:e,nonceAccountAddress:t,nonceAuthorityAddress:n},r){let i;const a=r.instructions[0];if(a&&X1(a))if(cF(a,t,n)){if(l8(r)&&r.lifetimeConstraint.nonce===e)return r;i=[a,...r.instructions.slice(1)]}else i=[Object.freeze(J6(t,n)),...r.instructions.slice(1)];else i=[Object.freeze(J6(t,n)),...r.instructions];return Object.freeze({...r,instructions:Object.freeze(i),lifetimeConstraint:Object.freeze({nonce:e})})}function pF(e,t){if("feePayer"in t&&e===t.feePayer?.address&&hF(t.feePayer))return t;const n={...t,feePayer:Object.freeze({address:e})};return Object.freeze(n),n}function hF(e){return!!e&&"address"in e&&typeof e.address=="string"&&Object.keys(e).length===1}function fF(e,t){return yF([e],t)}function yF(e,t){return Object.freeze({...t,instructions:Object.freeze([...t.instructions,...e])})}function sB(e,t){return mF([e],t)}function mF(e,t){return Object.freeze({...t,instructions:Object.freeze([...e,...t.instructions])})}function gF(e){const{header:t}=e,n=t.numSignerAccounts-t.numReadonlySignerAccounts,r=e.staticAccounts.length-t.numSignerAccounts-t.numReadonlyNonSignerAccounts,i=[];let a=0;for(let s=0;s<n;s++)i.push({address:e.staticAccounts[a],role:Qt.WRITABLE_SIGNER}),a++;for(let s=0;s<t.numReadonlySignerAccounts;s++)i.push({address:e.staticAccounts[a],role:Qt.READONLY_SIGNER}),a++;for(let s=0;s<r;s++)i.push({address:e.staticAccounts[a],role:Qt.WRITABLE}),a++;for(let s=0;s<t.numReadonlyNonSignerAccounts;s++)i.push({address:e.staticAccounts[a],role:Qt.READONLY}),a++;return i}function wF(e,t){const r=e.map(s=>s.lookupTableAddress).filter(s=>t[s]===void 0);if(r.length>0)throw new ve(nO,{lookupTableAddresses:r});const i=[],a=[];for(const s of e){const o=t[s.lookupTableAddress],l=s.readonlyIndexes,c=s.writableIndexes,u=Math.max(...l,...c);if(u>=o.length)throw new ve(rO,{highestKnownIndex:o.length-1,highestRequestedIndex:u,lookupTableAddress:s.lookupTableAddress});const p=l.map(f=>({address:o[f],addressIndex:f,lookupTableAddress:s.lookupTableAddress,role:Qt.READONLY}));i.push(...p);const h=c.map(f=>({address:o[f],addressIndex:f,lookupTableAddress:s.lookupTableAddress,role:Qt.WRITABLE}));a.push(...h)}return[...a,...i]}function vF(e,t){const n=t[e.programAddressIndex]?.address;if(!n)throw new ve(iO,{index:e.programAddressIndex});const r=e.accountIndices?.map(a=>t[a]),{data:i}=e;return Object.freeze({programAddress:n,...r&&r.length?{accounts:Object.freeze(r)}:{},...i&&i.length?{data:i}:{}})}function CF(e,t,n){if(!t||!X1(t))return{blockhash:e,lastValidBlockHeight:2n**64n-1n};{const r=t.accounts[0].address;y3(r);const i=t.accounts[2].address;return y3(i),{nonce:e,nonceAccountAddress:r,nonceAuthorityAddress:i}}}function oB(e,t){const n=e.staticAccounts[0];if(!n)throw new ve(aO);const r=gF(e),i="addressTableLookups"in e&&e.addressTableLookups!==void 0&&e.addressTableLookups.length>0?wF(e.addressTableLookups,{}):[],a=[...r,...i],s=e.instructions.map(c=>vF(c,a)),o=s[0],l=CF(e.lifetimeToken,o);return TN(lF({version:e.version}),c=>pF(n,c),c=>s.reduce((u,p)=>fF(p,u),c),c=>"blockhash"in l?ON(l,c):uF(l,c))}var kd=Object.freeze({name:"Ed25519"});function _F(e){return new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,...e])}async function v3(e,t=!1){const n=e.byteLength;if(n!==32)throw new ve(YR,{actualLength:n});const r=_F(e);return await crypto.subtle.importKey("pkcs8",r,kd,t,["sign"])}async function bF(e,t=!1){if(Y7(),e.extractable===!1)throw new ve(KR,{key:e});const n=await crypto.subtle.exportKey("jwk",e);return await crypto.subtle.importKey("jwk",{crv:"Ed25519",ext:t,key_ops:["verify"],kty:"OKP",x:n.x},"Ed25519",t,["verify"])}async function d8(e,t){rN();const n=await crypto.subtle.sign(kd,e,Ul(t));return new Uint8Array(n)}async function LF(e,t,n){return iN(),await crypto.subtle.verify(kd,e,Ul(t),Ul(n))}async function lB(e,t=!1){if(tN(),e.byteLength!==64)throw new ve(GR,{byteLength:e.byteLength});const[n,r]=await Promise.all([crypto.subtle.importKey("raw",e.slice(32),kd,!0,["verify"]),v3(e.slice(0,32),t)]),i=new Uint8Array(32);crypto.getRandomValues(i);const a=await d8(r,i);if(!await LF(n,a,i))throw new ve(JR);return{privateKey:r,publicKey:n}}async function dB(e,t=!1){const n=v3(e,t),[r,i]=await Promise.all([(t?n:v3(e,!0)).then(async a=>await bF(a,!0)),n]);return{privateKey:i,publicKey:r}}function AF(e){const t=Object.values(e);if(t.length===0)throw new ve(oO);return t.map(n=>n||new Uint8Array(64).fill(0))}function EF(){return Ad(Ha(B1(J1(),64),{size:na()}),AF)}function c8(){return a2([["signatures",EF()],["messageBytes",J1()]])}function xF(){return vi(co([["signatures",gi(z1(m3(),64),{size:yi()})],["messageBytes",m3()]]),kF)}function kF(e){const{messageBytes:t,signatures:n}=e,r=xd([i8(),zO(mi(),2),gi(oo(),{size:yi()})]),[i,a,s]=r.decode(t),o=s.slice(0,a);if(o.length!==n.length)throw new ve(lO,{numRequiredSignatures:a,signaturesLength:n.length,signerAddresses:o});const l={};return o.forEach((c,u)=>{const p=n[u];p.every(h=>h===0)?l[c]=null:l[c]=p}),{messageBytes:t,signatures:Object.freeze(l)}}function cB(e){const t=oF(e),n=XN().encode(t),r=t.staticAccounts.slice(0,t.header.numSignerAccounts),i={};for(const s of r)i[s]=null;let a;return RN(e)?a={blockhash:e.lifetimeConstraint.blockhash,lastValidBlockHeight:e.lifetimeConstraint.lastValidBlockHeight}:l8(e)&&(a={nonce:e.lifetimeConstraint.nonce,nonceAccountAddress:e.instructions[0].accounts[0].address}),Object.freeze({...a?{lifetimeConstraint:a}:void 0,messageBytes:n,signatures:Object.freeze(i)})}async function uB(e,t){let n,r;if(await Promise.all(e.map(async i=>{const a=await gN(i.publicKey),s=t.signatures[a];if(s===void 0){r||=new Set,r.add(a);return}if(r)return;const o=await d8(i.privateKey,t.messageBytes);s!==null&&z7(o,s)||(n||={},n[a]=o)})),r&&r.size>0){const i=Object.keys(t.signatures);throw new ve(sO,{expectedAddresses:i,unexpectedAddresses:[...r]})}return n?Object.freeze({...t,signatures:Object.freeze({...t.signatures,...n})}):t}function pB(e){const t=c8().encode(e);return XO().decode(t)}const u8=["solana:mainnet","solana:devnet","solana:testnet"];class $F{async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(Z4,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode,code_verifier:this.meta.codeVerifier,provider:this.meta.provider,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(t){throw qe(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(B4,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode,code_verifier:this.meta.codeVerifier,provider:this.meta.provider})}catch(t){throw qe(t)}}constructor(t){this.meta=t}}async function p8({api:e,requesterAppId:t,providerAppId:n}){let r=(await e.get(`/api/v1/apps/${t}/cross-app/connections`)).connections.find((i=>i.provider_app_id===n));if(!r)throw new x("Invalid connected app");return{name:r.provider_app_name,logoUrl:r.provider_app_icon_url||void 0,apiUrl:r.provider_app_custom_api_url,readOnly:r.read_only,customAuthAuthorizeUrl:r.provider_app_custom_auth_authorize_url,customAuthTransactUrl:r.provider_app_custom_auth_transact_url}}async function SF({api:e,appId:t}){let n=C1(),r=K4(),i=await q4(n);try{let{url:a}=await e.post(H4,{provider:`privy:${t}`,redirect_to:window.location.href,code_challenge:i,state_code:r});return{url:a,stateCode:r,codeVerifier:n}}catch(a){throw qe(a)}}async function TF({appId:e,stateCode:t,codeVerifier:n,authorizationCode:r,action:i,client:a,disableSignup:s}){if(!r||!t)throw new x("[Cross-App AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if(r==="undefined")throw new x("User denied confirmation during cross-app auth flow");try{let o=new $F({authorizationCode:r,stateCode:t,codeVerifier:n,provider:`privy:${e}`,disableSignup:!!s});a.startAuthFlow(o);let l=i==="link"?await a.link():await a.authenticate(),c=l.oAuthTokens?.accessToken;return console.debug(),c}catch(o){let l=qe(o);throw l.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED?l:l.privyErrorCode?new x(l.message||"Invalid code during cross-app auth flow.",void 0,l.privyErrorCode):l.message==="User denied confirmation during cross-app auth flow"?new x("Invalid code during cross-app auth flow.",void 0,R.OAUTH_USER_DENIED):new x("Invalid code during cross-app auth flow.",void 0,R.UNKNOWN_AUTH_ERROR)}}const h8=async({user:e,accessToken:t,proxy:n,refreshSessionAndUser:r,privy:i,appConfig:a,recoverEmbeddedWallet:s,setUser:o,walletIndex:l,chainType:c,recoveryMethod:u,recoveryPassword:p,recoveryAccessToken:h,idempotencyKey:f,additionalSigners:y})=>{let m;if(a.embeddedWallets.mode==="user-controlled-server-wallets-only")m=(await Q5(i,{request:{chain_type:c,additional_signers:y?D4(y):void 0},headers:l===0&&f?{"privy-idempotency-key":f}:void 0})).id;else if(l===0)if(c==="ethereum"){let _=Wu(e);_&&await s({address:_.address}),await n.create({accessToken:t,solanaAddress:_?.address,recoveryMethod:u,recoveryPassword:p,recoveryAccessToken:h})}else{if(c!=="solana")throw Error("Invalid input to create wallet");{let _=Uu(e);_&&await s({address:_.address}),await n.createSolana({accessToken:t,ethereumAddress:_?.address,recoveryMethod:u,recoveryPassword:p,recoveryAccessToken:h})}}else{let{entropyId:_,entropyIdVerifier:C}=Rn(e);await s(),await n.addWallet({accessToken:t,entropyId:_,entropyIdVerifier:C,chainType:c,hdWalletIndex:l})}let w=await r(),E=Rs(w,{chainType:c}).find((_=>m!==void 0?_.id===m:_.walletIndex===l));if(!w||!E)throw new x("Created wallet was not found in the updated user.",void 0,R.UNKNOWN_EMBEDDED_WALLET_ERROR);return o(w),{user:w,account:E}},Io=async({user:e,address:t,client:n,request:r,requesterAppId:i,reconnect:a})=>{n.createAnalyticsEvent({eventName:"cross_app_request_started",payload:{address:t,method:r.method}});let s=e?.linkedAccounts.find((p=>p.type==="cross_app"&&(p.embeddedWallets.some((h=>h.address===t))||p.smartWallets.some((h=>h.address===t)))));if(!e||!s)throw n.createAnalyticsEvent({eventName:"cross_app_request_error",payload:{error:"Cannot request a signature with this wallet address",address:t}}),new x("Cannot request a signature with this wallet address");let o=n.getProviderAccessToken(s.providerApp.id),l=await p8({api:n.api,requesterAppId:i,providerAppId:s.providerApp.id});if(!o){if(l.readOnly)throw console.error("cannot transact against a read-only provider app"),new x("Cannot transact against a read-only provider app");await a({appId:s.providerApp.id,action:"link"})&&(o=n.getProviderAccessToken(s.providerApp.id))}if(!o)throw n.createAnalyticsEvent({eventName:"cross_app_request_error",payload:{error:"Transactions require a valid token",address:t}}),new x("Transactions require a valid token");let c=new URL(l.customAuthTransactUrl||`${l.apiUrl}/oauth/transact`);c.searchParams.set("token",o||""),c.searchParams.set("request",IF(r));let u=j7({location:c.href});if(!u)throw n.createAnalyticsEvent({eventName:"cross_app_request_error",payload:{error:"Missing token",address:t}}),new x("Failed to initialize signature request");return new Promise(((p,h)=>{let f=setTimeout((()=>{w(),h(new x("Request timeout")),n.createAnalyticsEvent({eventName:"cross_app_request_error",payload:{error:"Request timeout",address:t}})}),12e4),y=setInterval((()=>{u.closed&&(w(),h(new x("User rejected request")),n.createAnalyticsEvent({eventName:"cross_app_request_error",payload:{error:"User rejected request",address:t}}))}),300),m=E=>{E.data&&(E.data.token?.action==="set"&&E.data.token?.value!==void 0?n.storeProviderAccessToken(s.providerApp.id,E.data.token.value):E.data.token?.action==="clear"&&n.storeProviderAccessToken(s.providerApp.id,null),E.data.type==="PRIVY_CROSS_APP_ACTION_RESPONSE"&&E.data.result&&(w(),p(E.data.result),n.createAnalyticsEvent({eventName:"cross_app_request_success",payload:{address:t,method:r.method}})),E.data.type==="PRIVY_CROSS_APP_ACTION_ERROR"&&E.data.error&&(w(),h(E.data.error),n.createAnalyticsEvent({eventName:"cross_app_request_error",payload:{error:E.data.error,address:t}})))};window.addEventListener("message",m);let w=()=>{u.close(),clearInterval(y),clearTimeout(f),window.removeEventListener("message",m)}}))};let IF=e=>JSON.stringify({content:{request:{request:C3(e,En)}},timestamp:Date.now(),callbackUrl:window.origin});const C3=(e,t)=>typeof e=="bigint"?t(e):Array.isArray(e)?e.map((n=>C3(n,t))):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map((([n,r])=>[n,C3(r,t)]))):e,f8=()=>{let{user:e,getAccessToken:t}=it(),{client:n,setUser:r,openModal:i,inProgressAuthFlowRef:a,inProgressLoginOrLinkMethodRef:s}=Q(),o=Ct(),l=Ar(),{setModalData:c}=Ft(),u=g.useCallback((E=>e?.linkedAccounts.some((_=>_.type==="cross_app"&&_.smartWallets.some((C=>C.address===E))))??!1),[e]),p=g.useCallback((async({appId:E,action:_,disableSignup:C})=>{let k=await t();if(_==="link"&&!k)throw l("linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:`privy:${E}`}),new x("User must be authenticated before linking an account.");if(_==="login"&&k)throw l("login","onError",R.UNKNOWN_AUTH_ERROR),new x("Attempted to log in, but user is already logged in. Use a `link` helper instead.");s.current=`privy:${E}`,a.current=_;let S=j7();return n.createAnalyticsEvent({eventName:"cross_app_auth_started",payload:{providerAppId:E}}),new Promise((async(b,F)=>{let{name:H,logoUrl:ae}=await p8({api:n.api,providerAppId:E,requesterAppId:o.id});c({crossAppAuth:{appId:E,name:H,logoUrl:ae,action:_,popup:S,disableSignup:C,onSuccess:b,onError:F}}),i("CrossAppAuthScreen")}))}),[t,l,s,a,n,o.id,c,i]),h=g.useCallback((async({subject:E})=>{let _=e?.linkedAccounts.find((k=>k.type==="cross_app"&&k.subject===E))?.providerApp;if(!_)throw new x("Invalid subject");n.storeProviderAccessToken(_.id,null);let C=await n.unlinkOAuth(`privy:${_.id}`,E);return r(C),C}),[e,n,r]),f=g.useCallback(((E,{address:_,chainId:C})=>Io({user:e,client:n,address:_,requesterAppId:o.id,request:{method:u(_)?"privy_signSmartWalletMessage":"personal_sign",params:[E,_],chainId:C},reconnect:p})),[e,n,o.id,u,p]),y=g.useCallback(((E,{address:_,chainId:C})=>{let k=xl(E);return Io({user:e,client:n,address:_,requesterAppId:o.id,request:{method:u(_)?"privy_signSmartWalletTypedData":"eth_signTypedData_v4",params:[_,k],chainId:C},reconnect:p})}),[e,n,o.id,u,p]),m=g.useCallback(((E,{address:_})=>Io({user:e,client:n,address:_,requesterAppId:o.id,request:{method:u(_)?"privy_sendSmartWalletTx":"eth_sendTransaction",params:[E],chainId:E.chainId},reconnect:p})),[e,n,o.id,u,p]),w=g.useCallback(((E,{address:_})=>Io({user:e,client:n,address:_,requesterAppId:o.id,request:{method:u(_)?"privy_signSmartWalletTx":"eth_signTransaction",params:[E],chainId:E.chainId},reconnect:p})),[e,n,o.id,u,p]);return g.useMemo((()=>({startCrossAppAuthFlow:p,unlinkCrossAppAccount:h,signMessageWithCrossAppWallet:f,signTypedDataWithCrossAppWallet:y,sendTransactionWithCrossAppWallet:m,signTransactionWithCrossAppWallet:w})),[p,h,f,y,m,w])},y8=()=>{let{client:e,setUser:t}=Q();return{unlink:g.useCallback((async({address:n})=>{let r=await e.unlinkEmail(n);return t(r),r}),[e,t])}},m8=()=>{let{client:e,setUser:t}=Q();return{unlink:g.useCallback((async({fid:n})=>{let r=await e.unlinkFarcaster(n);return t(r),r}),[e,t])}},g8=()=>{let{client:e,setUser:t}=Q();return{unlink:g.useCallback((async({provider:n,subject:r})=>{let i=await e.unlinkOAuth(n,r);return t(i),i}),[e,t])}},w8=()=>{let{client:e,setUser:t,walletProxy:n}=Q(),{getAccessToken:r}=it(),i=Ct(),a=i?.passkeys?.shouldUnenrollMfaOnUnlink??!1;return{unlink:g.useCallback((async({credentialId:s})=>{let o=await r();if(!o)throw Error("Must have valid access token to enroll in MFA");if(!n)throw Error("Wallet proxy not initialized.");await n.unlinkPasskeyAccount({credentialId:s,accessToken:o,removeAsMfa:a});let l=await e.getAuthenticatedUser();return t(l),l}),[a,e,r,t,n])}},v8=()=>{let{client:e,setUser:t}=Q();return{unlink:g.useCallback((async({phoneNumber:n})=>{let r=await e.unlinkPhone(n);return t(r),r}),[e,t])}},C8=()=>{let{client:e,setUser:t}=Q();return{unlink:g.useCallback((async({telegramUserId:n})=>{let r=await e.unlinkTelegram(n);return t(r),r}),[e,t])}},MF=e=>e.reduce(((t,n)=>!t||t.walletIndex<n.walletIndex?n:t),null);let X6=async({accessToken:e,appConfig:t,privy:n,emitPrivyEvent:r,proxy:i,refreshSessionAndUser:a,recoverEmbeddedWallet:s,user:o,walletIndex:l,setModalData:c,openModal:u,chainType:p,setUser:h,idempotencyKey:f,additionalSigners:y})=>{if(l<0)throw r("createWallet","onError",R.EMBEDDED_WALLET_CREATE_ERROR),Error(`A negative walletIndex (${l}) is invalid.`);let m=Ss(o),w=Rs(o).some((_=>!_.imported));if(l>0&&!m&&!w)throw r("createWallet","onError",R.EMBEDDED_WALLET_NOT_FOUND),Error("Must have an existing embedded wallet to create an additional wallet.");if(t.embeddedWallets.requireUserOwnedRecoveryOnCreate&&t.embeddedWallets.mode==="user-controlled-server-wallets-only")throw r("createWallet","onError",R.EMBEDDED_WALLET_CREATE_ERROR),Error("User owned recovery not yet supported for this app.");if(!m&&t.embeddedWallets.requireUserOwnedRecoveryOnCreate)return await Q6({emitPrivyEvent:r,setModalData:c,openModal:u,chainType:p});let E=Rs(o,{chainType:p,walletIndex:l})[0];if(E)return{user:o,account:E};if(l===0&&!i)return Q6({emitPrivyEvent:r,setModalData:c,openModal:u,chainType:p});if(!i)throw r("createWallet","onError",R.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");return h8({appConfig:t,walletIndex:l,chainType:p,user:o,accessToken:e,proxy:i,refreshSessionAndUser:a,privy:n,recoverEmbeddedWallet:s,setUser:h,idempotencyKey:f,additionalSigners:y})},Q6=async({emitPrivyEvent:e,setModalData:t,openModal:n,chainType:r})=>new Promise(((i,a)=>{t({createWallet:{onSuccess:({user:s,account:o})=>{e("createWallet","onSuccess",{wallet:o}),i({user:s,account:o})},onFailure:s=>{e("createWallet","onError",R.UNKNOWN_EMBEDDED_WALLET_ERROR),a(s)},callAuthOnSuccessOnClose:!1,shouldCreateEth:r==="ethereum",shouldCreateSol:r==="solana"}}),n("EmbeddedWalletOnAccountCreateScreen")}));const _8=()=>{let e=Ct(),t=Ar(),{setModalData:n}=Ft(),{initializeWalletProxy:r,recoverEmbeddedWallet:i,setUser:a,openModal:s,refreshSessionAndUser:o,privy:l,client:c}=Q();return{create:async({chainType:u,options:p,latestUser:h,idempotencyKey:f})=>{let y=h;if(y||(y=await o()),!y)throw t("createWallet","onError",R.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");return await(async({appConfig:m,getAccessToken:w,initializeWalletProxy:E,user:_,privy:C,emitPrivyEvent:k,recoverEmbeddedWallet:S,setModalData:b,openModal:F,setUser:H,options:ae,timeoutDuration:G,refreshSessionAndUser:he,chainType:Be,idempotencyKey:fe,additionalSigners:Ie})=>{let[Ae,N]=await Promise.all([E(G),w()]);if(!N||!_)throw k("createWallet","onError",R.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");if(!Ae&&m.customAuth?.enabled)throw k("createWallet","onError",R.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");if(Ie&&m.embeddedWallets.mode!=="user-controlled-server-wallets-only")throw new x("Specifying additionalSigners is only supported for TEE execution and this app uses on-device execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");if(ae&&"walletIndex"in ae&&typeof ae.walletIndex=="number"){if(m.embeddedWallets.mode==="user-controlled-server-wallets-only")throw k("createWallet","onError",R.INVALID_DATA),Error("Invalid input, use `createAdditional` instead of `walletIndex` to create additional wallets.");return X6({accessToken:N,appConfig:m,privy:C,emitPrivyEvent:k,openModal:F,proxy:Ae,refreshSessionAndUser:he,recoverEmbeddedWallet:S,setModalData:b,user:_,walletIndex:ae.walletIndex,chainType:Be,setUser:H,additionalSigners:Ie})}let xe=ae&&"createAdditional"in ae&&ae.createAdditional,ke=Rs(_,{chainType:Be});if(ke[0]&&!xe)throw k("createWallet","onError",R.EMBEDDED_WALLET_ALREADY_EXISTS),Error("User already has an embedded wallet.");return X6({accessToken:N,appConfig:m,privy:C,emitPrivyEvent:k,openModal:F,proxy:Ae,recoverEmbeddedWallet:S,setModalData:b,user:_,walletIndex:(MF(ke)?.walletIndex??-1)+1,chainType:Be,refreshSessionAndUser:he,setUser:H,idempotencyKey:fe,additionalSigners:Ie})})({appConfig:e,privy:l,getAccessToken:()=>c.getAccessToken(),refreshSessionAndUser:o,initializeWalletProxy:r,user:y,emitPrivyEvent:t,recoverEmbeddedWallet:i,setModalData:n,openModal:s,setUser:a,options:p,timeoutDuration:h1,chainType:u,idempotencyKey:f,additionalSigners:p?.signers})}}};function b8(e){let{create:t}=_8();return Vt("createWallet",e),{createWallet:async n=>{n&&"target"in n&&n&&(n=void 0);let{account:r}=await t({chainType:"ethereum",options:n});return r}}}const L8=e=>e.embeddedWallets.mode==="user-controlled-server-wallets-only"?"tee":"on-device",A8=async({emitPrivyEvent:e,getAccessToken:t,initializeWalletProxy:n,refreshSessionAndUser:r,user:i,appConfig:a},{chainType:s,additionalSigners:o},l)=>{if(!i)throw e("linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new x("User must be authenticated before linking an account.");let c=L8(a);if(o&&c==="on-device")throw new x("Specifying additionalSigners is only supported for TEE execution and this app uses on-device execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");let[u,p]=await Promise.all([t(),n(15e3)]);if(!p||!u)throw e("linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new x("User must be authenticated before linking an account.");let{address:h}=await l({proxy:p,accessToken:u,mode:c}),f=await r(),y=s==="solana"?ad(f):p1(f),m=y?.find((w=>w.address===h));if(!f||!m)throw e("createWallet","onError",R.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return e("createWallet","onSuccess",{wallet:m}),{user:f,wallet:m}},PF=(e,{privateKey:t,chainType:n,additionalSigners:r})=>(async(...i)=>(await A8(...i)).wallet)(e,{chainType:n,additionalSigners:r},(({proxy:i,accessToken:a,mode:s})=>i.importWallet({privateKey:t,accessToken:a,chainType:n,mode:s,additionalSigners:r}))),E8=()=>{let{user:e}=it(),{client:t,refreshSessionAndUser:n,initializeWalletProxy:r}=Q(),i=Ar(),a=Ct();return{importWallet:g.useCallback((s=>PF({getAccessToken:()=>t.getAccessToken(),user:e,initializeWalletProxy:r,refreshSessionAndUser:n,emitPrivyEvent:i,appConfig:a},{...s,chainType:"ethereum"})),[e,t,n,r,i,a])}},xr=()=>{let e=g.useContext(qt),{importWallet:t}=E8(),{exportWallet:n}=Yf(),{createWallet:r}=b8(),{unlinkCrossAppAccount:i}=f8(),{unlink:a}=Qf(),{unlink:s}=y8(),{unlink:o}=v8(),{unlink:l}=m8(),{unlink:c}=C8(),{unlink:u}=w8(),{unlink:p}=g8(),h=g.useCallback((N=>a({address:N})),[a]),f=g.useCallback((N=>s({address:N})),[s]),y=g.useCallback((N=>o({phoneNumber:N})),[o]),m=g.useCallback((N=>l({fid:N})),[l]),w=g.useCallback((N=>c({telegramUserId:N})),[c]),E=g.useCallback((N=>u({credentialId:N})),[u]),_=g.useCallback((N=>p(N)),[p]),C=g.useCallback((N=>p({provider:"google",subject:N})),[p]),k=g.useCallback((N=>p({provider:"twitter",subject:N})),[p]),S=g.useCallback((N=>p({provider:"twitch",subject:N})),[p]),b=g.useCallback((N=>p({provider:"discord",subject:N})),[p]),F=g.useCallback((N=>p({provider:"github",subject:N})),[p]),H=g.useCallback((N=>p({provider:"spotify",subject:N})),[p]),ae=g.useCallback((N=>p({provider:"instagram",subject:N})),[p]),G=g.useCallback((N=>p({provider:"tiktok",subject:N})),[p]),he=g.useCallback((N=>p({provider:"line",subject:N})),[p]),Be=g.useCallback((N=>p({provider:"linkedin",subject:N})),[p]),fe=g.useCallback((N=>p({provider:"apple",subject:N})),[p]),{update:Ie}=Jf(),{update:Ae}=Xf();return{...e,importWallet:t,createWallet:r,exportWallet:n,unlinkCrossAppAccount:i,unlinkWallet:h,unlinkEmail:f,unlinkPhone:y,unlinkGoogle:C,unlinkTwitter:k,unlinkTwitch:S,unlinkDiscord:b,unlinkGithub:F,unlinkSpotify:H,unlinkInstagram:ae,unlinkTiktok:G,unlinkLine:he,unlinkLinkedIn:Be,unlinkApple:fe,unlinkFarcaster:m,unlinkTelegram:w,unlinkPasskey:E,unlinkOAuth:_,updateEmail:Ie,updatePhone:Ae}};function v2(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var RF=0,Bn="__private_"+RF+++"__implementation";function In(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var OF=0;function s2(e){return"__private_"+OF+++"_"+e}var C2=s2("_address"),_2=s2("_publicKey"),b2=s2("_chains"),L2=s2("_features"),A2=s2("_label"),E2=s2("_icon");class Q1{get address(){return In(this,C2)[C2]}get publicKey(){return In(this,_2)[_2].slice()}get chains(){return In(this,b2)[b2].slice()}get features(){return In(this,L2)[L2].slice()}get label(){return In(this,A2)[A2]}get icon(){return In(this,E2)[E2]}constructor({address:t,publicKey:n,label:r,icon:i}){Object.defineProperty(this,C2,{writable:!0,value:void 0}),Object.defineProperty(this,_2,{writable:!0,value:void 0}),Object.defineProperty(this,b2,{writable:!0,value:void 0}),Object.defineProperty(this,L2,{writable:!0,value:void 0}),Object.defineProperty(this,A2,{writable:!0,value:void 0}),Object.defineProperty(this,E2,{writable:!0,value:void 0}),In(this,C2)[C2]=t,In(this,_2)[_2]=n,In(this,b2)[b2]=u8,In(this,A2)[A2]=r,In(this,E2)[E2]=i,In(this,L2)[L2]=["solana:signAndSendTransaction","solana:signTransaction","solana:signMessage"],new.target===Q1&&Object.freeze(this)}}function Oe(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var NF=0;function tn(e){return"__private_"+NF+++"_"+e}var An=tn("_listeners"),x2=tn("_version"),k2=tn("_name"),$2=tn("_icon"),sn=tn("_injection"),S2=tn("_isPrivyWallet"),Ei=tn("_accounts"),T2=tn("_on"),xi=tn("_emit"),Vc=tn("_off"),ki=tn("_connected"),I2=tn("_connect"),M2=tn("_disconnect"),P2=tn("_signMessage"),R2=tn("_signAndSendTransaction"),O2=tn("_signTransaction");function FF(e,...t){Oe(this,An)[An][e]?.forEach((n=>n.apply(null,t)))}function jF(e,t){Oe(this,An)[An][e]=Oe(this,An)[An][e]?.filter((n=>t!==n))}const is=(...e)=>{if(typeof Buffer>"u")throw new x("Buffer is not defined.",void 0,R.BUFFER_NOT_DEFINED);return Buffer.from(...e)};function x8(e){try{return xF().decode(e)}catch(t){throw e[0]===129?Error("Unable to decode V1 transaction. V1 transactions require @solana/kit v8 or later; check the version your app installs.",{cause:t}):t}}function DF(e,t,n){let r=structuredClone(x8(e)),i=J7(t);return i in r.signatures&&(r.signatures[i]=n),new Uint8Array(c8().encode(r))}function UF(e){return new Uint8Array(x8(e).messageBytes)}function k8(){let{isHeadlessSigning:e,walletProxy:t,initializeWalletProxy:n,recoverEmbeddedWallet:r,openModal:i,privy:a,client:s}=Q(),{user:o}=xr(),{setModalData:l}=Ft(),{signWithUserSigner:c}=la();return{signMessage:({message:u,address:p,options:h})=>new Promise((async(f,y)=>{let m=Pn(o,p);if(m?.walletClientType!=="privy")return void y(new x("Wallet is not a Privy wallet",void 0,R.EMBEDDED_WALLET_NOT_FOUND));let{entropyId:w,entropyIdVerifier:E}=Rn(o,m),_=mt(m),C=is(u).toString("base64");if(C.length<1)return void y(new x("Message must be a non-empty string",void 0,R.INVALID_MESSAGE));let k=async()=>{let S;if(!o)throw Error("User must be authenticated before signing with a Privy wallet");let b=await s.getAccessToken();if(!b)throw Error("User must be authenticated to use their embedded wallet.");let F=t??await n(15e3);if(!F)throw Error("Failed to initialize embedded wallet proxy.");if(!await r({address:m.address}))throw Error("Unable to connect to wallet");if(_){let H=await Xt(a,c,{chain_type:"solana",method:"signMessage",params:{message:C,encoding:"base64"},wallet_id:m.id});if(!H.data||!("signature"in H.data))throw Error("Failed to sign message");S=H.data.signature}else{let{response:H}=await F.rpc({accessToken:b,entropyId:w,entropyIdVerifier:E,chainType:"solana",hdWalletIndex:m.walletIndex??0,requesterAppId:h?.uiOptions?.requesterAppId,request:{method:"signMessage",params:{message:C}}});S=H.data.signature}return S};if(e({showWalletUIs:h?.uiOptions?.showWalletUIs}))try{let S=await k(),b=new Uint8Array(is(S,"base64"));f({signature:b})}catch(S){y(S)}else l({signMessage:{method:"solana_signMessage",data:C,confirmAndSign:k,onSuccess:S=>{f({signature:new Uint8Array(is(S,"base64"))})},onFailure:S=>{y(S)},uiOptions:h?.uiOptions??{}},connectWallet:{recoveryMethod:m.recoveryMethod,connectingWalletAddress:m.address,entropyId:w,entropyIdVerifier:E,isUnifiedWallet:_,onCompleteNavigateTo:"SignRequestScreen",onFailure:S=>{y(new x("Failed to connect to wallet",S,R.UNKNOWN_CONNECT_WALLET_ERROR))}}}),i("EmbeddedWalletConnectingScreen")}))}}function $8(){let{isHeadlessSigning:e,openModal:t,privy:n}=Q(),{setModalData:r}=Ft(),{signMessage:i}=k8(),{signWithUserSigner:a}=la(),{user:s}=xr();return{signTransaction:async({transaction:o,options:l,chain:c="solana:mainnet",address:u})=>{let p=Pn(s,u);if(p?.walletClientType!=="privy")throw new x("Wallet is not a Privy wallet",void 0,R.EMBEDDED_WALLET_NOT_FOUND);let h=mt(p);async function f(y){if(h){let w=await Xt(n,a,{chain_type:"solana",method:"signTransaction",params:{transaction:Mt.base64.fromBytes(y),encoding:"base64"},wallet_id:p.id});if(w.data&&"signed_transaction"in w.data&&w.data.signed_transaction!=null)return{signedTransaction:new Uint8Array(Mt.base64.toBytes(w.data.signed_transaction))};throw Error("Failed to sign transaction")}let{signature:m}=await i({message:UF(y),address:u,options:{...l,uiOptions:{...l?.uiOptions,showWalletUIs:!1}}});return{signedTransaction:DF(y,u,m)}}return e({showWalletUIs:l?.uiOptions?.showWalletUIs})?f(o):new Promise((async(y,m)=>{let{entropyId:w,entropyIdVerifier:E}=Rn(s,p);function _(k){return S=>{m(S instanceof x?S:new x("Failed to connect to wallet",S,k))}}let C={account:p,transaction:new Uint8Array(o),chain:c,signOnly:!0,uiOptions:l?.uiOptions||{},onConfirm:f,onSuccess:y,onFailure:_(R.TRANSACTION_FAILURE)};r({connectWallet:{recoveryMethod:p.recoveryMethod,connectingWalletAddress:p.address,entropyId:w,entropyIdVerifier:E,isUnifiedWallet:h,onCompleteNavigateTo:"StandardSignAndSendTransactionScreen",onFailure:_(R.UNKNOWN_CONNECT_WALLET_ERROR)},standardSignAndSendTransaction:C}),t("EmbeddedWalletConnectingScreen")}))}}}const WF=Symbol("default-solana-rpcs-plugin");async function VF({rpcSubscriptions:e,signature:t,timeout:n}){let r=new AbortController,i=await e.signatureNotifications(t,{commitment:"confirmed"}).subscribe({abortSignal:r.signal}),a=await Promise.race([new Promise((s=>{setTimeout((()=>{r.abort(),s(Error("Transaction confirmation timed out"))}),n)})),new Promise((async s=>{for await(let o of i){if(r.abort(),o.value.err)return s(Error("Transaction confirmation failed"));s(void 0)}}))]);if(a instanceof Error)throw a}function HF({rpc:e,rpcSubscriptions:t,chain:n,blockExplorerUrl:r}){let i=(function({rpc:a,rpcSubscriptions:s}){return async(o,l)=>new Promise((async(c,u)=>{try{let p=await a.sendTransaction(is(o).toString("base64"),{preflightCommitment:"confirmed",encoding:"base64",skipPreflight:l?.skipPreflight??!1}).send();l?.skipConfirmation||await VF({rpcSubscriptions:s,signature:p,timeout:1e4}),c({signature:new Uint8Array(G7().encode(p))})}catch(p){u(p)}}))})({rpc:e,rpcSubscriptions:t});return{rpc:e,rpcSubscriptions:t,chain:n,blockExplorerUrl:r,sendAndConfirmTransaction:i}}function ZF(){let e=Ct(),t=v1(),n=g.useMemo((()=>{let r=t(WF),i=r?.getDefaultRpcs({appId:e.id});return Object.fromEntries(["solana:mainnet","solana:devnet","solana:testnet"].map((a=>{let s=e.solanaRpcs[a]??i?.[a]??null;return[a,s?HF({chain:a,rpc:s.rpc,rpcSubscriptions:s.rpcSubscriptions,blockExplorerUrl:s.blockExplorerUrl??`https://explorer.solana.com?cluster=${a.replace("solana:","")}`}):null]})))}),[e.solanaRpcs,e.id,t]);return g.useCallback((r=>{if(!n[r])throw Error(`No RPC configuration found for chain ${r}`);return n[r]}),[n])}function BF(){let e=Ct(),{isHeadlessSigning:t,openModal:n,privy:r}=Q(),{setModalData:i}=Ft(),{signTransaction:a}=$8(),s=ZF(),{user:o}=xr(),{signWithUserSigner:l}=la();return{signAndSendTransaction:async({transaction:c,address:u,chain:p="solana:mainnet",options:h})=>{let f=Pn(o,u);if(f?.walletClientType!=="privy")throw new x("Wallet is not a Privy wallet",void 0,R.EMBEDDED_WALLET_NOT_FOUND);let y=mt(f);async function m(w){let E=h?.skipSimulation?{"x-privy-skip-simulation":"true"}:void 0;if(h?.sponsor)return await(async k=>{if(!y)throw new x("Sponsoring transactions is only supported for wallets on the TEE stack",R.INVALID_DATA);let S=await Xt(r,l,{chain_type:"solana",method:"signAndSendTransaction",sponsor:!0,params:{transaction:is(k).toString("base64"),encoding:"base64"},caip2:`solana:${(await s(p).rpc.getGenesisHash().send()).substring(0,32)}`,wallet_id:f.id,optimistic_broadcast:h?.optimisticBroadcast??!1,headers:E});if(S.data&&"hash"in S.data)return{signature:qa.decode(S.data.hash)};throw Error("Failed to sign and send transaction")})(w);let{signedTransaction:_}=await a({transaction:w,address:u,chain:p,options:{...h,uiOptions:{...h?.uiOptions,showWalletUIs:!1}}}),{signature:C}=await s(p).sendAndConfirmTransaction(_,{skipPreflight:h?.skipSimulation,skipConfirmation:h?.optimisticBroadcast});return{signature:C}}return t({showWalletUIs:h?.uiOptions?.showWalletUIs})?m(c):new Promise((async(w,E)=>{let _,C,{entropyId:k,entropyIdVerifier:S}=Rn(o,f);function b(ae){return G=>{E(G instanceof x?G:new x("Failed to connect to wallet",G,ae))}}let F={account:f,transaction:new Uint8Array(c),chain:p,signOnly:!1,uiOptions:h?.uiOptions||{},onConfirm:m,onSuccess:w,onFailure:b(R.TRANSACTION_FAILURE),isSponsored:!!h?.sponsor},H={recoveryMethod:f.recoveryMethod,connectingWalletAddress:f.address,entropyId:k,entropyIdVerifier:S,isUnifiedWallet:y,onCompleteNavigateTo:"StandardSignAndSendTransactionScreen",onFailure:b(R.UNKNOWN_CONNECT_WALLET_ERROR)};e.fundingConfig&&(_=ZI({address:u,appConfig:e,methodScreen:"FundingMethodSelectionScreen",fundWalletConfig:{...h,asset:"native-currency",chain:p},externalSolanaFundingScreen:"FundSolWalletWithExternalSolanaWallet"}),C={amount:e.fundingConfig.defaultRecommendedAmount,asset:"SOL",chain:p,destinationAddress:u,afterSuccessScreen:"StandardSignAndSendTransactionScreen",sourceWalletData:void 0}),i({connectWallet:H,standardSignAndSendTransaction:F,funding:_,solanaFundingData:C}),n("EmbeddedWalletConnectingScreen")}))}}}let _3=new class extends ld{setImplementation(e){v2(this,Bn)[Bn]=e}async signMessage(e){return v2(this,Bn)[Bn].signMessage(e)}async signAndSendTransaction(e){return v2(this,Bn)[Bn].signAndSendTransaction(e)}async signTransaction(e){return v2(this,Bn)[Bn].signTransaction(e)}constructor(e){super(),Object.defineProperty(this,Bn,{writable:!0,value:void 0}),v2(this,Bn)[Bn]=e}}({signTransaction:ic("signTransaction was not injected"),signAndSendTransaction:ic("signAndSendTransaction was not injected"),signMessage:ic("signMessage was not injected")}),e0=new class{get version(){return Oe(this,x2)[x2]}get name(){return Oe(this,k2)[k2]}get icon(){return Oe(this,$2)[$2]}get chains(){return u8.slice()}get features(){return{"standard:connect":{version:"1.0.0",connect:Oe(this,I2)[I2]},"standard:disconnect":{version:"1.0.0",disconnect:Oe(this,M2)[M2]},"standard:events":{version:"1.0.0",on:Oe(this,T2)[T2]},"solana:signAndSendTransaction":{version:"1.0.0",supportedTransactionVersions:["legacy",0,1],signAndSendTransaction:Oe(this,R2)[R2]},"solana:signTransaction":{version:"1.0.0",supportedTransactionVersions:["legacy",0,1],signTransaction:Oe(this,O2)[O2]},"solana:signMessage":{version:"1.0.0",signMessage:Oe(this,P2)[P2]},"privy:":{privy:{signMessage:Oe(this,sn)[sn].signMessage,signTransaction:Oe(this,sn)[sn].signTransaction,signAndSendTransaction:Oe(this,sn)[sn].signAndSendTransaction}}}}get accounts(){return Oe(this,Ei)[Ei].slice()}get isPrivyWallet(){return Oe(this,S2)[S2]}constructor({name:e,icon:t,version:n,injection:r,wallets:i}){Object.defineProperty(this,xi,{value:FF}),Object.defineProperty(this,Vc,{value:jF}),Object.defineProperty(this,An,{writable:!0,value:void 0}),Object.defineProperty(this,x2,{writable:!0,value:void 0}),Object.defineProperty(this,k2,{writable:!0,value:void 0}),Object.defineProperty(this,$2,{writable:!0,value:void 0}),Object.defineProperty(this,sn,{writable:!0,value:void 0}),Object.defineProperty(this,S2,{writable:!0,value:void 0}),Object.defineProperty(this,Ei,{writable:!0,value:void 0}),Object.defineProperty(this,T2,{writable:!0,value:void 0}),Object.defineProperty(this,ki,{writable:!0,value:void 0}),Object.defineProperty(this,I2,{writable:!0,value:void 0}),Object.defineProperty(this,M2,{writable:!0,value:void 0}),Object.defineProperty(this,P2,{writable:!0,value:void 0}),Object.defineProperty(this,R2,{writable:!0,value:void 0}),Object.defineProperty(this,O2,{writable:!0,value:void 0}),Oe(this,An)[An]={},Oe(this,T2)[T2]=(a,s)=>(Oe(this,An)[An][a]?.push(s)||(Oe(this,An)[An][a]=[s]),()=>Oe(this,Vc)[Vc](a,s)),Oe(this,ki)[ki]=a=>{a!=null&&(Oe(this,Ei)[Ei]=a.map((({address:s})=>new Q1({address:s,publicKey:qa.decode(s)})))),Oe(this,xi)[xi]("change",{accounts:this.accounts})},Oe(this,I2)[I2]=async()=>(Oe(this,xi)[xi]("change",{accounts:this.accounts}),{accounts:this.accounts}),Oe(this,M2)[M2]=async()=>{Oe(this,xi)[xi]("change",{accounts:this.accounts})},Oe(this,P2)[P2]=async(...a)=>{let s=[];for(let{account:o,...l}of a){let{signature:c}=await Oe(this,sn)[sn].signMessage({...l,address:o.address});s.push({signedMessage:l.message,signature:c})}return s},Oe(this,R2)[R2]=async(...a)=>{let s=[];for(let o of a){let{signature:l}=await Oe(this,sn)[sn].signAndSendTransaction({...o,transaction:o.transaction,address:o.account.address,chain:o.chain||"solana:mainnet",options:o.options});s.push({signature:l})}return s},Oe(this,O2)[O2]=async(...a)=>{let s=[];for(let{transaction:o,account:l,options:c,chain:u}of a){let{signedTransaction:p}=await Oe(this,sn)[sn].signTransaction({transaction:o,address:l.address,chain:u||"solana:mainnet",options:c});s.push({signedTransaction:p})}return s},Oe(this,k2)[k2]=e,Oe(this,$2)[$2]=t,Oe(this,x2)[x2]=n,Oe(this,sn)[sn]=r,Oe(this,Ei)[Ei]=[],Oe(this,S2)[S2]=!0,r.on("accountChanged",Oe(this,ki)[ki],this),Oe(this,ki)[ki](i)}}({name:"Privy",version:"1.0.0",icon:"data:image/png;base64,AAABAAEAFBQAAAAAIABlAQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAUAAAAFAgGAAAAjYkdDQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAQVJREFUeJxiYMANZIC4E4ivAPFPIP4FxDeAuB+IlfDowwBMQFwJxF+B+D8O/AOI66Bq8QJGIF6ExyB0vAqImfEZmEeCYTDcgMswPiB+T4aB34FYApuBsWQYBsP52AycToGBK7EZuJECAw9jM3AVBQbuwWZgIwUGTsZmoDkFBnpiMxAEjpJh2FV8iVsbiD+TYBgoDVrgMgwGnID4HRGGgTKBGyHDYEAaiBdCSxh0g/5AU4Q8sYYhAzEgjoGmABBOgFo2eACowFABYn0oVgViAVINkQTiZUD8DIj/ATF6GILEXgLxCiCWIsZAbiAuBeKtQHwHiEHJ6C8UfwHie0C8E4jLoWpRAAAAAP//rcbhsQAAAAZJREFUAwBYFs3VKJ0cuQAAAABJRU5ErkJggg==",wallets:[],injection:_3});function zF(){let{client:e}=Q(),{ready:t,wallet:n}=(function(){let{ready:o}=sa(),{user:l}=xr(),{signMessage:c}=k8(),{signTransaction:u}=$8(),{signAndSendTransaction:p}=BF(),h=g.useMemo((()=>{let y=[...u1(l).sort(((w,E)=>(w.walletIndex??0)-(E.walletIndex??0)))],m=ad(l);return m.length?[...y,...m]:y}),[l]),f=g.useMemo((()=>({signMessage:async({message:y,address:m,options:w})=>await c({message:y,address:m,options:w}),signTransaction:async({transaction:y,address:m,chain:w,options:E})=>await u({transaction:y,address:m,chain:w,options:E}),async signAndSendTransaction({transaction:y,address:m,chain:w,options:E}){let{signature:_}=await p({transaction:y,address:m,chain:w,options:E});return{signature:_}}})),[c,u,p]);return g.useEffect((()=>{_3?.setImplementation(f)}),[f]),g.useEffect((()=>{var y;!o||(y=e0.accounts).length===h.length&&y.every(((m,w)=>m.address===h[w]?.address))||_3?.emit("accountChanged",h)}),[o,h]),{ready:o,wallet:e0}})(),[r,i]=g.useState([]),[a,s]=g.useState([]);return g.useEffect((()=>{let o=[n,...r.filter((u=>u.chainType==="solana"&&!!u.wallet.features)).map((u=>u.wallet))];s(o);let l=r.flatMap((u=>{let p=()=>s([...o]);return u.on("walletsUpdated",p),{connector:u,off:p}})),c=o.map((u=>u.features["standard:events"]?.on("change",(()=>{s([...o])}))));return()=>{c.forEach((u=>u?.())),l.forEach((({connector:u,off:p})=>u.off("walletsUpdated",p)))}}),[r]),g.useEffect((()=>{i(e.connectors?.walletConnectors.filter((l=>l.chainType==="solana"))??[]);let o=()=>{i(e.connectors?.walletConnectors.filter((l=>l.chainType==="solana"))??[])};return e.connectors?.on("connectorInitialized",o),()=>{e.connectors?.off("connectorInitialized",o)}}),[t,e.connectors]),{ready:t,wallets:a}}function KF(){let{ready:e,wallets:t}=zF();return{ready:e,wallets:g.useMemo((()=>t.flatMap((n=>n.accounts.map((r=>new v4({wallet:n,account:r})))))),[t])}}const Ba=Promise.withResolvers?.bind(Promise)??(()=>{let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}}),qF=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_aed)",children:[d.jsx("path",{d:"M0 0H512V170.7H0V0Z",fill:"#00732F"}),d.jsx("path",{d:"M0 170.7H512V341.3H0V170.7Z",fill:"white"}),d.jsx("path",{d:"M0 341.3H512V512H0V341.3Z",fill:"#000001"}),d.jsx("path",{d:"M0 0H180V512H0V0Z",fill:"#FF0000"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_aed",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),GF=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_ars)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#74ACDF"}),d.jsx("path",{d:"M0 170.7H512V341.4H0V170.7Z",fill:"white"}),d.jsx("path",{d:"M256 284.4C271.685 284.4 284.4 271.684 284.4 256C284.4 240.315 271.685 227.6 256 227.6C240.315 227.6 227.6 240.315 227.6 256C227.6 271.684 240.315 284.4 256 284.4Z",fill:"#F6B40E"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_ars",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),YF=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_aud)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#00008B"}),d.jsx("path",{d:"M256 0V32L161 128L256 221.5V256H222.5L127 162L34 256H0V222L93 128.5L0 37V0H31L127 94L220 0H256Z",fill:"white"}),d.jsx("path",{d:"M0 104V152H256V104H0ZM104 0V256H152V0H104Z",fill:"#FF0000"}),d.jsx("path",{d:"M202 402.8L156.2 408.2L160.8 454.1L128 421.7L95.0001 453.9L99.9001 408L54.1001 402.2L93.0001 377.4L69.0001 338L112.6 353L128.4 309.6L143.9 353.1L187.6 338.4L163.3 377.6L202.1 402.7L202 402.8Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_aud",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),JF=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_bdt)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#006A4E"}),d.jsx("path",{d:"M230 426.7C324.275 426.7 400.7 350.275 400.7 256C400.7 161.725 324.275 85.2998 230 85.2998C135.725 85.2998 59.2998 161.725 59.2998 256C59.2998 350.275 135.725 426.7 230 426.7Z",fill:"#F42A41"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_bdt",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),XF=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_bgn)",children:[d.jsx("path",{d:"M0 0H512V170.7H0V0Z",fill:"white"}),d.jsx("path",{d:"M0 170.7H512V341.3H0V170.7Z",fill:"#00966E"}),d.jsx("path",{d:"M0 341.3H512V512H0V341.3Z",fill:"#D62612"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_bgn",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),QF=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_4989_138102)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#229E45"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M261.4 405.4L491.2 256.2L260 106.6L29.2998 256.6L261.4 405.4Z",fill:"#F8E509"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M361.5 256C361.904 269.02 359.687 281.989 354.98 294.136C350.273 306.283 343.173 317.359 334.1 326.708C325.028 336.056 314.17 343.486 302.17 348.555C290.17 353.624 277.273 356.229 264.246 356.216C251.22 356.202 238.329 353.57 226.339 348.477C214.349 343.383 203.506 335.931 194.453 326.564C185.4 317.197 178.323 306.106 173.641 293.949C168.959 281.793 166.769 268.82 167.2 255.8C168.035 230.574 178.649 206.662 196.798 189.122C214.947 171.582 239.207 161.79 264.447 161.816C289.686 161.842 313.926 171.684 332.039 189.262C350.151 206.839 360.717 230.773 361.5 256Z",fill:"#2B49A3"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M232.3 314.2L229.3 312.4L226.2 314L226.9 310.5L224.5 308L227.9 307.6L229.5 304.4L231 307.7L234.4 308.3L231.8 310.7M297.5 330.7L294.5 328.9L291.3 330.5L292 327L289.6 324.5L293.1 324.1L294.7 320.9L296.1 324.2L299.5 324.8L297 327.2M269.4 304.3L266.8 302.8L264.1 304.1L264.7 301.1L262.7 298.9L265.6 298.6L267 295.9L268.2 298.7L271.2 299.2L269 301.2M335.2 294.8L332.6 293.3L330 294.6L330.6 291.7L328.6 289.6L331.5 289.2L332.8 286.6L334.1 289.3L337 289.8L334.8 291.8M268.2 275.1L265.2 273.3L262.1 274.9L262.8 271.4L260.4 268.9L263.8 268.5L265.4 265.4L266.9 268.6L270.3 269.2L267.7 271.6M188 245L185 243.2L182 244.8L182.6 241.3L180.2 238.8L183.7 238.4L185.3 235.2L186.7 238.5L190.1 239.1L187.6 241.5M197.7 285L194.7 283.3L191.6 284.8L192.3 281.4L189.9 278.8L193.3 278.4L194.9 275.4L196.4 278.5L199.8 279.2L197.2 281.5M297.8 230.2L295.2 228.7L292.4 230L293 227L291 224.7L294 224.4L295.4 221.6L296.7 224.5L299.7 225L297.4 227.1M292.4 256.3L290 255L287.9 256L288.3 253.6L286.7 251.9L289.1 251.6L290.2 249.4L291.2 251.7L293.6 252.1L291.8 253.7M183.4 292.2L181.4 291L179.3 292L179.7 289.7L178.1 288L180.5 287.8L181.5 285.8L182.5 287.8L184.8 288.3L183.1 289.9M335.7 301.4L334 300.6L332.3 301.3L332.7 299.6L331.4 298.3L333.3 298.1L334.2 296.6L334.9 298.2L336.8 298.5L335.4 299.7",fill:"#FFFFEF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M183.5 292.3L181.5 291.1L179.4 292.1L179.9 289.8L178.2 288.1L180.5 287.9L181.6 285.9L182.6 287.9L184.9 288.4L183.2 290",fill:"#FFFFEF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M183.5 292.3L181.5 291.1L179.4 292.1L179.9 289.8L178.2 288.1L180.5 287.9L181.6 285.9L182.6 287.9L184.9 288.4L183.2 290M215.4 292.3L213.4 291.1L211.4 292.1L211.8 289.8L210.2 288.1L212.5 287.9L213.5 285.8L214.5 287.9L216.8 288.4L215.1 290M211.4 303L209.4 301.8L207.4 302.8L207.8 300.5L206.2 298.8L208.5 298.5L209.5 296.5L210.5 298.5L212.8 299L211.1 300.6M277.8 283.6L275.8 282.4L273.7 283.4L274.1 281.1L272.5 279.4L274.8 279.2L275.9 277.1L276.9 279.2L279.1 279.6L277.4 281.2M258.3 283.6L256.3 282.4L254.2 283.4L254.7 281.1L253.1 279.4L255.4 279.2L256.4 277.1L257.4 279.2L259.7 279.6L258 281.2M205.5 276.8L204.3 276.1L203 276.7L203.2 275.2L202.2 274.2L203.7 274L204.4 272.7L204.9 274.1L206.4 274.3L205.4 275.3M333.2 310L331.2 308.9L329.1 309.9L329.6 307.6L328 305.9L330.3 305.6L331.3 303.6L332.3 305.6L334.6 306.1L332.9 307.7M316.9 312.1L315.3 311.1L313.6 312.1L314 310.1L312.6 308.7L314.6 308.5L315.4 306.8L316.2 308.5L318.2 308.9L316.7 310.2M324.7 312L323.1 311L321.5 311.9L321.8 310.1L320.6 308.8L322.4 308.6L323.2 307L323.9 308.6L325.7 308.9L324.4 310.2M346.6 292.8L345.1 291.9L343.5 292.7L343.9 291L342.7 289.7L344.4 289.5L345.2 288L345.9 289.6L347.6 289.9L346.3 291.1M317 322.9L315 321.8L313 322.8L313.5 320.6L311.9 319.1L314.1 318.8L315.2 316.9L316.2 318.9L318.3 319.3L316.7 320.7M317.1 331.6L315.3 330.6L313.5 331.5L313.9 329.3L312.5 327.8L314.5 327.5L315.5 325.6L316.3 327.6L318.3 328L316.8 329.4M302.3 312L300.8 311.1L299.2 311.9L299.6 310.1L298.4 308.9L300.1 308.7L300.9 307.1L301.6 308.7L303.3 309L302 310.2M288.5 312L287 311.1L285.4 311.9L285.8 310.1L284.6 308.9L286.3 308.7L287.1 307.1L287.8 308.7L289.5 309L288.3 310.2M265 291.4L263.5 290.5L261.9 291.3L262.3 289.6L261.1 288.3L262.8 288.1L263.6 286.6L264.3 288.2L266 288.5L264.7 289.6M267.6 333.1L266.3 332.4L265 333.1L265.3 331.6L264.3 330.6L265.7 330.3L266.4 329L267 330.4L268.5 330.6L267.4 331.6M232.2 265.6L229.2 263.9L226.1 265.4L226.8 262L224.4 259.4L227.8 259L229.4 255.9L230.9 259.1L234.3 259.7L231.7 262.1",fill:"#FFFFEF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M355.1 291C356.981 286.097 358.453 281.046 359.5 275.9C307.9 230.5 250.3 207.2 177.5 212C174.892 217.096 172.75 222.418 171.1 227.9C204.497 224.527 238.23 228.41 269.987 239.284C301.745 250.157 330.778 267.765 355.1 290.9V291Z",fill:"white"}),d.jsx("path",{d:"M331.9 265.4L333.7 266.4C333.45 266.965 333.38 267.594 333.5 268.2C333.633 268.667 333.967 269.067 334.5 269.4C335.033 269.733 335.567 269.933 336.1 270C336.5 270 336.833 269.8 337.1 269.4C337.233 269.2 337.267 268.967 337.2 268.7L336.9 267.9L335.7 266.6C335.065 265.949 334.586 265.163 334.3 264.3C334.164 263.65 334.248 262.974 334.537 262.377C334.827 261.78 335.306 261.296 335.9 261C336.435 260.77 337.026 260.7 337.6 260.8C338.325 260.948 339.008 261.256 339.6 261.7C340.467 262.309 341.157 263.137 341.6 264.1C341.721 264.543 341.739 265.007 341.652 265.458C341.566 265.909 341.377 266.334 341.1 266.7L339.3 265.6C339.5 265.067 339.567 264.6 339.5 264.2C339.367 263.867 339.033 263.533 338.5 263.2C337.967 262.867 337.5 262.7 337.1 262.7L336.5 263L336.4 263.7C336.4 264.1 336.8 264.667 337.6 265.4L339.1 267.4C339.373 267.898 339.499 268.463 339.463 269.029C339.428 269.595 339.233 270.14 338.9 270.6C338.555 271.1 338.067 271.483 337.5 271.7C336.905 271.972 336.238 272.042 335.6 271.9C334.841 271.707 334.128 271.367 333.5 270.9C332.577 270.308 331.875 269.43 331.5 268.4C331.167 267.533 331.3 266.533 331.9 265.4ZM323.1 259.7L325.1 260.7C324.889 261.205 324.819 261.758 324.9 262.3C325.033 262.833 325.367 263.267 325.9 263.6C326.433 263.933 326.967 264.067 327.5 264C327.9 264 328.233 263.8 328.5 263.4L328.6 262.8C328.6 262.533 328.467 262.267 328.2 262L327 260.7C326.342 260.088 325.829 259.336 325.5 258.5C325.381 258.101 325.346 257.682 325.397 257.268C325.449 256.855 325.586 256.457 325.8 256.1C326.105 255.667 326.519 255.322 327 255.1C327.535 254.87 328.126 254.8 328.7 254.9C329.3 254.9 329.967 255.167 330.7 255.7C331.767 256.367 332.433 257.133 332.7 258C332.85 258.428 332.9 258.884 332.848 259.334C332.797 259.785 332.643 260.217 332.4 260.6L330.5 259.5C330.767 258.967 330.833 258.533 330.7 258.2C330.567 257.867 330.233 257.533 329.7 257.2C329.497 257.019 329.259 256.881 329.001 256.796C328.744 256.71 328.471 256.677 328.2 256.7L327.6 257.1V257.8C327.6 258.133 328 258.7 328.8 259.5C329.6 260.3 330.133 260.9 330.4 261.3C330.708 261.8 330.863 262.378 330.845 262.965C330.827 263.552 330.638 264.12 330.3 264.6C329.98 265.138 329.499 265.563 328.925 265.814C328.351 266.065 327.713 266.13 327.1 266C326.314 265.85 325.566 265.544 324.9 265.1C323.957 264.551 323.219 263.708 322.8 262.7C322.505 261.699 322.613 260.623 323.1 259.7ZM312.3 256.7L317.9 247.7L324.6 251.7L323.6 253.3L318.8 250.3L317.5 252.3L322.1 255.1L321.1 256.7L316.6 253.9L315.1 256.4L320.1 259.4L319.2 261L312.3 256.7ZM296.5 243.8L297.4 242.2L301.4 244.4L299.5 248.1C297.88 248.477 296.178 248.264 294.7 247.5C293.81 247.028 293.054 246.341 292.5 245.5C291.998 244.724 291.721 243.824 291.7 242.9C291.7 241.9 291.967 240.967 292.5 240.1C292.958 239.174 293.646 238.382 294.5 237.8C295.233 237.2 296.133 236.9 297.2 236.9C297.933 236.9 298.767 237.133 299.7 237.6C300.686 238.063 301.493 238.836 302 239.8C302.4 240.6 302.5 241.5 302.3 242.5L300.2 241.9C300.332 241.393 300.261 240.855 300 240.4C299.709 239.93 299.294 239.549 298.8 239.3C298.443 239.086 298.045 238.949 297.632 238.897C297.218 238.846 296.799 238.881 296.4 239C295.733 239.333 295.067 240 294.4 241C293.926 241.924 293.751 242.972 293.9 244C294.1 244.8 294.633 245.4 295.5 245.8L296.8 246.2H298.1L298.7 245L296.5 243.8ZM227.7 226.8L229.3 216.2L232.5 216.7L233.3 224.2L236.3 217.2L239.4 217.7L237.9 228.3L235.9 228L237.1 219.7L233.8 227.7L231.8 227.4L230.9 218.7L229.7 227.1L227.7 226.8ZM217 225.5L218 214.9L225.8 215.6L225.7 217.4L219.9 216.9L219.7 219.2L225 219.7L224.9 221.5L219.6 221L219.3 224L225.2 224.5L225 226.3L217 225.5Z",fill:"#309E3A"}),d.jsx("path",{d:"M181.4 218.8C181.4 217.733 181.567 216.833 181.9 216.1L182.9 214.7L184.4 213.7C185.14 213.451 185.921 213.349 186.7 213.4C187.394 213.395 188.082 213.535 188.719 213.811C189.356 214.086 189.928 214.491 190.4 215C191.333 216 191.767 217.333 191.7 219C191.7 220.8 191.2 222.133 190.2 223C189.699 223.486 189.103 223.861 188.448 224.102C187.794 224.343 187.096 224.445 186.4 224.4C185.713 224.418 185.031 224.293 184.394 224.035C183.757 223.777 183.181 223.391 182.7 222.9C182.206 222.368 181.834 221.734 181.609 221.043C181.385 220.353 181.313 219.621 181.4 218.9V218.8Z",fill:"#309E3A"}),d.jsx("path",{d:"M183.6 218.8C183.6 220 183.867 220.933 184.4 221.6C184.933 222.267 185.6 222.6 186.4 222.6C186.809 222.608 187.215 222.532 187.593 222.377C187.971 222.222 188.314 221.992 188.6 221.7C189.133 221.1 189.433 220.2 189.5 219C189.5 217.667 189.233 216.733 188.7 216.2C188.187 215.621 187.471 215.263 186.7 215.2C185.7 215.2 184.967 215.5 184.5 216.1C183.9 216.7 183.567 217.6 183.5 218.8H183.6Z",fill:"#F7FFFF"}),d.jsx("path",{d:"M194 224.4L194.1 213.7H198.6C199.8 213.7 200.633 213.833 201.1 214.1C201.767 214.367 202.167 214.7 202.3 215.1C202.567 215.633 202.733 216.2 202.8 216.8C202.8 217.6 202.567 218.267 202.1 218.8C201.633 219.267 200.9 219.6 199.9 219.8C200.433 220 200.833 220.267 201.1 220.6L202.3 222.4L203.6 224.4H201L199.5 222.1L198.3 220.5L197.7 220.1L196.7 219.9H196.2V224.4H194Z",fill:"#309E3A"}),d.jsx("path",{d:"M196.2 218.2H199.8L200.3 217.7C200.5 217.5 200.6 217.233 200.6 216.9C200.6 216.567 200.5 216.267 200.3 216L199.5 215.6H196.3L196.2 218.2Z",fill:"white"}),d.jsx("path",{d:"M206.2 214.2L210.1 214.4L212.1 214.7C212.669 214.915 213.182 215.257 213.6 215.7C214.067 216.253 214.408 216.902 214.6 217.6C214.8 218.267 214.866 219.1 214.8 220.1C214.851 220.868 214.724 221.638 214.429 222.349C214.135 223.06 213.679 223.694 213.1 224.2C212.7 224.533 212.2 224.8 211.6 225H209.6L205.6 224.9L206.2 214.2Z",fill:"#309E3A"}),d.jsx("path",{d:"M208.199 216.1L207.899 223.1L209.499 223.3H210.799L211.699 222.8C211.966 222.6 212.166 222.267 212.299 221.8L212.599 219.8L212.499 218C212.366 217.533 212.166 217.2 211.899 217L210.899 216.4L209.199 216.2L208.199 216.1Z",fill:"white"}),d.jsx("path",{d:"M258.5 233.3L261 222.9L264.3 223.7C265.633 224.033 266.467 224.3 266.8 224.5C267.333 224.767 267.733 225.2 268 225.8C268.267 226.4 268.3 227.133 268.1 228C268.011 228.516 267.789 228.999 267.456 229.403C267.123 229.806 266.69 230.116 266.2 230.3L265.1 230.6L262.9 230.2L261.5 229.9L260.5 233.8L258.5 233.3Z",fill:"#309E3A"}),d.jsx("path",{d:"M262.6 225.2L261.9 228.2L263.1 228.4C263.9 228.6 264.467 228.667 264.8 228.6C265.077 228.572 265.339 228.461 265.553 228.283C265.767 228.105 265.922 227.867 266 227.6L265.9 226.5L265.1 225.8L263.6 225.4L262.6 225.2Z",fill:"white"}),d.jsx("path",{d:"M268.4 236.3L271.9 226.2L276.2 227.7L278.4 228.7C278.8 229.1 279.1 229.6 279.3 230.2C279.6 231.1 279.3 231.3 279.1 231.9C278.9 232.7 278.467 233.233 277.8 233.5C277.456 233.7 277.075 233.83 276.681 233.881C276.286 233.933 275.884 233.905 275.5 233.8L276.3 235L276.9 237L277.4 239.4L275 238.6L274.3 235.9L273.7 234L273.3 233.4L272.3 232.9L271.9 232.8L270.4 237L268.4 236.3Z",fill:"#309E3A"}),d.jsx("path",{d:"M272.4 231.2L273.9 231.7L275.8 232.2C276.067 232.2 276.3 232.133 276.5 232L277 231.3V230.3L276.4 229.7L274.9 229.2L273.3 228.6L272.4 231.2Z",fill:"white"}),d.jsx("path",{d:"M280.9 235.9C281.159 234.987 281.601 234.137 282.2 233.4C282.533 232.933 282.966 232.567 283.5 232.3L285.1 231.8C285.766 231.8 286.533 231.9 287.4 232.1C288.078 232.27 288.714 232.58 289.265 233.011C289.816 233.441 290.271 233.983 290.6 234.6C291.266 235.867 291.3 237.3 290.7 238.9C290.328 240.336 289.437 241.582 288.2 242.4C287.583 242.707 286.909 242.884 286.221 242.918C285.532 242.952 284.844 242.844 284.2 242.6C283.521 242.43 282.886 242.12 282.334 241.69C281.783 241.259 281.329 240.717 281 240.1C280.461 238.758 280.426 237.266 280.9 235.9Z",fill:"#309E3A"}),d.jsx("path",{d:"M283 236.5C282.667 237.567 282.667 238.5 283 239.3C283.333 240.1 283.933 240.633 284.8 240.9C285.6 241.1 286.333 241 287 240.6C287.667 240.2 288.233 239.4 288.7 238.2C288.967 237.067 288.967 236.1 288.7 235.3C288.516 234.942 288.262 234.625 287.952 234.367C287.643 234.109 287.285 233.917 286.9 233.8C286.516 233.695 286.115 233.667 285.72 233.719C285.325 233.77 284.944 233.9 284.6 234.1C283.933 234.5 283.4 235.3 283 236.5Z",fill:"white"}),d.jsx("path",{d:"M301.7 250.8L306.6 241.3L310.6 243.3C311.6 243.9 312.267 244.367 312.6 244.7C313 245.167 313.234 245.667 313.3 246.2C313.434 246.867 313.3 247.433 312.9 247.9C312.634 248.567 312.134 249.067 311.4 249.4C310.734 249.6 309.967 249.567 309.1 249.3C309.367 249.7 309.567 250.133 309.7 250.6L310 252.7L310.2 255.2L307.9 254L307.6 251.2L307.3 249.2L306.9 248.6L306 248L305.6 247.8L303.6 251.8L301.7 250.8Z",fill:"#309E3A"}),d.jsx("path",{d:"M306.4 246.3L307.8 247L309.6 247.8C309.867 247.8 310.1 247.733 310.3 247.6C310.536 247.424 310.729 247.199 310.868 246.939C311.006 246.68 311.085 246.393 311.1 246.1L310.5 245.4L309.2 244.6L307.7 243.9L306.4 246.3Z",fill:"white"}),d.jsx("path",{d:"M341.2 270.3C341.733 269.367 342.4 268.7 343.2 268.3L344.8 267.6H346.4C347.133 267.667 347.867 268 348.6 268.6C349.191 268.961 349.7 269.44 350.096 270.008C350.492 270.577 350.766 271.221 350.9 271.9C351.045 273.355 350.654 274.813 349.8 276C349.001 277.275 347.751 278.203 346.3 278.6C345.623 278.727 344.927 278.712 344.256 278.557C343.585 278.402 342.953 278.111 342.4 277.7C341.809 277.339 341.299 276.86 340.903 276.291C340.507 275.723 340.234 275.079 340.1 274.4C339.926 272.957 340.281 271.5 341.1 270.3H341.2Z",fill:"#309E3A"}),d.jsx("path",{d:"M343 271.4C342.334 272.467 342.067 273.4 342.2 274.2C342.269 274.605 342.419 274.991 342.643 275.335C342.867 275.679 343.158 275.973 343.5 276.2C344.155 276.612 344.943 276.755 345.7 276.6C346.5 276.4 347.267 275.767 348 274.7C348.734 273.633 349 272.733 348.8 272C348.8 271.267 348.4 270.6 347.6 270C346.4 269.1 346.1 269.4 345.3 269.6C344.5 269.8 343.767 270.4 343.1 271.4H343Z",fill:"white"}),d.jsx("path",{d:"M246.4 229L248.1 221.4L253.7 222.7L253.4 224L249.4 223L249 224.7L252.7 225.6L252.4 226.9L248.7 225.9L248.2 228L252.4 229L252.1 230.3L246.4 229Z",fill:"#309E3A"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_4989_138102",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),ej=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_cad)",children:[d.jsx("path",{d:"M81.1001 0H443.4V512H81.1001V0Z",fill:"white"}),d.jsx("path",{d:"M-100 0H81.1V512H-100V0ZM443.4 0H624.5V512H443.4V0Z",fill:"#D52B1E"}),d.jsx("path",{d:"M135.3 247.4L121.3 252.2L186.7 309.7C191.7 324.5 185 328.8 180.7 336.6L251.7 327.6L249.9 399.1L264.7 398.6L261.4 327.7L332.6 336.1C328.2 326.8 324.3 321.9 328.3 307.1L393.7 252.6L382.3 248.5L257.4 101.4L135.3 247.5V247.4Z",fill:"#D52B1E"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_cad",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),tj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_chf)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#FF0000"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M96 208H416V304H96V208Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M208 96H304V416H208V96Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_chf",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),nj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_clp)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M255.805 0H767.486V255.805H255.805V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H255.805V255.805H0V0Z",fill:"#0039A6"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M167.721 191.547L128.011 161.872L88.6616 191.835L103.318 143.1L63.9692 112.993L112.632 112.56L127.794 63.9692L143.173 112.488H191.908L152.631 142.956L167.721 191.547Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 255.805H767.486V511.682H0V255.805Z",fill:"#D52B1E"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_clp",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),rj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_cny)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#EE1C25"}),d.jsx("path",{d:"M204.8 104.96L74.2402 189.44L128 51.2002L174.08 189.44L51.2002 104.96H204.8Z",fill:"#FFFF00"}),d.jsx("path",{d:"M236.577 33.0493L283.098 55.8344L234.403 64.2012L265.969 27.3271L262.929 76.9066L236.577 33.0493Z",fill:"#FFFF00"}),d.jsx("path",{d:"M295.87 78.2082L329.881 117.326L281.736 106.078L325.192 84.3783L303.084 128.897L295.87 78.2082Z",fill:"#FFFF00"}),d.jsx("path",{d:"M306.574 152.531L321.655 202.153L282.279 172.21L330.834 170.145L292.454 201.774L306.574 152.531Z",fill:"#FFFF00"}),d.jsx("path",{d:"M266.01 205.632L260.775 257.178L236.032 214.4L281.575 231.219L234.01 245.568L266.01 205.632Z",fill:"#FFFF00"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_cny",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),ij=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_cop)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#FFE800"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 256H512V512H0V256Z",fill:"#00148E"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 384H512V512H0V384Z",fill:"#DA0010"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_cop",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),aj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_czk)",children:[d.jsx("path",{d:"M0 0H512V256H0V0Z",fill:"white"}),d.jsx("path",{d:"M0 256H512V512H0V256Z",fill:"#D7141A"}),d.jsx("path",{d:"M300 256L0 56V456L300 256Z",fill:"#11457E"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_czk",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),sj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_dkk)",children:[d.jsx("path",{d:"M0 0H512.1V512H0V0Z",fill:"#C8102E"}),d.jsx("path",{d:"M144 0H217.1V512H144V0Z",fill:"white"}),d.jsx("path",{d:"M0 219.4H512.1V292.6H0V219.4Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_dkk",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),oj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_egp)",children:[d.jsx("path",{d:"M0 341.3H512V512H0V341.3Z",fill:"#000001"}),d.jsx("path",{d:"M0 170.7H512V341.3H0V170.7Z",fill:"white"}),d.jsx("path",{d:"M0 0H512V170.7H0V0Z",fill:"#CE1126"}),d.jsx("path",{d:"M256.681 258.047L315.134 312.319L310.953 213.759C310.355 198.826 297.385 202.239 287.913 207.615C278.441 213.759 267.433 213.759 255.998 209.749C244.478 213.759 233.555 213.759 224.084 207.615C214.697 202.239 201.641 198.826 201.044 213.759L196.862 312.319L256.681 258.047Z",fill:"white",stroke:"#C09300",strokeWidth:"1.10933",strokeLinejoin:"round"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_egp",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),lj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_etb)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-237.908 3.54639H799.515V501.338H-238.013L-237.908 3.54639Z",fill:"#FFC621"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-240 342.346H798.887V511.798H-240V342.346Z",fill:"#EF2118"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-237.908 -0.0102539H799.514V179.902H-237.908V-0.0102539Z",fill:"#298C08"}),d.jsx("path",{d:"M261.885 371.676C321.297 371.676 369.461 323.512 369.461 264.099C369.461 204.687 321.297 156.523 261.885 156.523C202.472 156.523 154.308 204.687 154.308 264.099C154.308 323.512 202.472 371.676 261.885 371.676Z",fill:"#006BC6"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_etb",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),dj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_4989_138368)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#003399"}),d.jsx("path",{d:"M255.999 81.4124L248.414 106.696L261.056 109.225L255.999 81.4124Z",fill:"#FFCC00"}),d.jsx("path",{d:"M255.999 81.4124L263.584 106.696L250.942 109.225L255.999 81.4124Z",fill:"#FFCC00"}),d.jsx("path",{d:"M280.046 98.8831L253.656 99.4824L255.158 112.287L280.046 98.8831Z",fill:"#FFCC00"}),d.jsx("path",{d:"M280.046 98.8831L258.343 113.91L252.032 102.668L280.046 98.8831Z",fill:"#FFCC00"}),d.jsx("path",{d:"M270.861 127.151L262.136 102.238L250.422 107.623L270.861 127.151Z",fill:"#FFCC00"}),d.jsx("path",{d:"M270.86 127.151L249.862 111.155L258.604 101.678L270.86 127.151Z",fill:"#FFCC00"}),d.jsx("path",{d:"M231.953 98.8831L258.343 99.4824L256.841 112.287L231.953 98.8831Z",fill:"#FFCC00"}),d.jsx("path",{d:"M231.953 98.8831L253.655 113.91L259.967 102.668L231.953 98.8831Z",fill:"#FFCC00"}),d.jsx("path",{d:"M241.138 127.151L249.863 102.238L261.576 107.623L241.138 127.151Z",fill:"#FFCC00"}),d.jsx("path",{d:"M241.138 127.151L262.136 111.155L253.395 101.678L241.138 127.151Z",fill:"#FFCC00"}),d.jsx("path",{d:"M255.999 384.82L248.414 410.104L261.056 412.632L255.999 384.82Z",fill:"#FFCC00"}),d.jsx("path",{d:"M255.999 384.82L263.584 410.104L250.942 412.632L255.999 384.82Z",fill:"#FFCC00"}),d.jsx("path",{d:"M280.046 402.291L253.656 402.89L255.158 415.694L280.046 402.291Z",fill:"#FFCC00"}),d.jsx("path",{d:"M280.046 402.291L258.343 417.318L252.032 406.076L280.046 402.291Z",fill:"#FFCC00"}),d.jsx("path",{d:"M270.862 430.559L262.137 405.645L250.423 411.031L270.862 430.559Z",fill:"#FFCC00"}),d.jsx("path",{d:"M270.861 430.559L249.863 414.562L258.604 405.086L270.861 430.559Z",fill:"#FFCC00"}),d.jsx("path",{d:"M231.953 402.291L258.343 402.89L256.841 415.694L231.953 402.291Z",fill:"#FFCC00"}),d.jsx("path",{d:"M231.953 402.291L253.655 417.318L259.967 406.076L231.953 402.291Z",fill:"#FFCC00"}),d.jsx("path",{d:"M241.138 430.559L249.863 405.645L261.576 411.031L241.138 430.559Z",fill:"#FFCC00"}),d.jsx("path",{d:"M241.138 430.559L262.136 414.562L253.395 405.086L241.138 430.559Z",fill:"#FFCC00"}),d.jsx("path",{d:"M104.296 233.116L96.7109 258.4L109.353 260.928L104.296 233.116Z",fill:"#FFCC00"}),d.jsx("path",{d:"M104.296 233.116L111.881 258.4L99.2394 260.928L104.296 233.116Z",fill:"#FFCC00"}),d.jsx("path",{d:"M128.342 250.587L101.952 251.186L103.454 263.991L128.342 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M128.343 250.587L106.64 265.614L100.329 254.372L128.343 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M119.157 278.855L110.432 253.942L98.7187 259.327L119.157 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M119.158 278.855L98.1595 262.858L106.901 253.382L119.158 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M80.2498 250.587L106.64 251.186L105.138 263.991L80.2498 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M80.2497 250.587L101.952 265.614L108.263 254.372L80.2497 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M89.4349 278.855L98.1599 253.942L109.874 259.327L89.4349 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M89.4347 278.855L110.433 262.858L101.691 253.382L89.4347 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M167.148 148.621L188.146 132.625L179.404 123.149L167.148 148.621Z",fill:"#FFCC00"}),d.jsx("path",{d:"M167.148 148.622L175.873 123.708L187.586 129.093L167.148 148.622Z",fill:"#FFCC00"}),d.jsx("path",{d:"M157.963 120.353L179.665 135.38L185.976 124.138L157.963 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M157.963 120.353L184.353 120.952L182.851 133.757L157.963 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M182.009 102.882L174.424 128.166L187.066 130.695L182.009 102.882Z",fill:"#FFCC00"}),d.jsx("path",{d:"M182.009 102.882L189.594 128.166L176.952 130.695L182.009 102.882Z",fill:"#FFCC00"}),d.jsx("path",{d:"M196.871 148.621L175.873 132.625L184.614 123.149L196.871 148.621Z",fill:"#FFCC00"}),d.jsx("path",{d:"M196.871 148.622L188.146 123.708L176.432 129.093L196.871 148.622Z",fill:"#FFCC00"}),d.jsx("path",{d:"M206.056 120.353L184.353 135.38L178.042 124.138L206.056 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M206.056 120.353L179.665 120.952L181.167 133.757L206.056 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M140.628 204.864L131.903 179.951L120.189 185.336L140.628 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M140.628 204.864L119.63 188.868L128.371 179.391L140.628 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M110.904 204.864L131.903 188.868L123.161 179.391L110.904 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M110.905 204.864L119.63 179.951L131.343 185.336L110.905 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M101.719 176.596L123.422 191.623L129.733 180.381L101.719 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M101.72 176.596L128.11 177.195L126.608 190L101.72 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M149.813 176.596L128.11 191.623L121.799 180.381L149.813 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M149.813 176.596L123.422 177.195L124.924 190L149.813 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M125.766 159.125L133.352 184.409L120.71 186.938L125.766 159.125Z",fill:"#FFCC00"}),d.jsx("path",{d:"M125.766 159.125L118.181 184.409L130.823 186.938L125.766 159.125Z",fill:"#FFCC00"}),d.jsx("path",{d:"M149.841 328.664L123.45 329.263L124.952 342.067L149.841 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M149.841 328.664L128.138 343.691L121.827 332.449L149.841 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M140.656 356.932L131.931 332.018L120.217 337.403L140.656 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M140.656 356.932L119.658 340.935L128.399 331.459L140.656 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M110.933 356.932L131.931 340.935L123.189 331.459L110.933 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M110.933 356.932L119.658 332.018L131.372 337.404L110.933 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M125.794 311.193L133.379 336.477L120.737 339.005L125.794 311.193Z",fill:"#FFCC00"}),d.jsx("path",{d:"M125.794 311.193L118.209 336.477L130.851 339.005L125.794 311.193Z",fill:"#FFCC00"}),d.jsx("path",{d:"M101.748 328.664L128.138 329.263L126.636 342.067L101.748 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M101.748 328.664L123.45 343.691L129.762 332.449L101.748 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M204.716 379.555L178.325 380.154L179.827 392.958L204.716 379.555Z",fill:"#FFCC00"}),d.jsx("path",{d:"M204.716 379.554L183.013 394.582L176.702 383.34L204.716 379.554Z",fill:"#FFCC00"}),d.jsx("path",{d:"M195.531 407.823L186.806 382.909L175.092 388.294L195.531 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M195.531 407.823L174.533 391.826L183.274 382.35L195.531 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M165.808 407.823L186.806 391.826L178.064 382.35L165.808 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M165.808 407.823L174.533 382.909L186.247 388.294L165.808 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M180.669 362.084L188.254 387.368L175.612 389.896L180.669 362.084Z",fill:"#FFCC00"}),d.jsx("path",{d:"M180.669 362.084L173.084 387.368L185.726 389.896L180.669 362.084Z",fill:"#FFCC00"}),d.jsx("path",{d:"M156.623 379.555L183.013 380.154L181.511 392.958L156.623 379.555Z",fill:"#FFCC00"}),d.jsx("path",{d:"M156.623 379.554L178.325 394.582L184.637 383.34L156.623 379.554Z",fill:"#FFCC00"}),d.jsx("path",{d:"M407.703 233.116L415.288 258.4L402.646 260.928L407.703 233.116Z",fill:"#FFCC00"}),d.jsx("path",{d:"M407.703 233.116L400.118 258.4L412.76 260.928L407.703 233.116Z",fill:"#FFCC00"}),d.jsx("path",{d:"M383.656 250.587L410.046 251.186L408.545 263.991L383.656 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M383.656 250.587L405.359 265.614L411.67 254.372L383.656 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M392.841 278.855L401.566 253.941L413.279 259.327L392.841 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M392.841 278.855L413.839 262.858L405.098 253.382L392.841 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M431.749 250.587L405.359 251.186L406.861 263.991L431.749 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M431.749 250.587L410.046 265.614L403.735 254.372L431.749 250.587Z",fill:"#FFCC00"}),d.jsx("path",{d:"M422.565 278.855L413.84 253.941L402.126 259.327L422.565 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M422.564 278.855L401.566 262.858L410.308 253.382L422.564 278.855Z",fill:"#FFCC00"}),d.jsx("path",{d:"M344.852 148.621L323.854 132.625L332.596 123.149L344.852 148.621Z",fill:"#FFCC00"}),d.jsx("path",{d:"M344.852 148.622L336.127 123.708L324.413 129.093L344.852 148.622Z",fill:"#FFCC00"}),d.jsx("path",{d:"M354.037 120.353L332.334 135.38L326.023 124.138L354.037 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M354.036 120.353L327.646 120.952L329.148 133.757L354.036 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M329.99 102.882L337.575 128.166L324.933 130.695L329.99 102.882Z",fill:"#FFCC00"}),d.jsx("path",{d:"M329.99 102.882L322.405 128.166L335.047 130.695L329.99 102.882Z",fill:"#FFCC00"}),d.jsx("path",{d:"M315.129 148.621L336.127 132.625L327.386 123.148L315.129 148.621Z",fill:"#FFCC00"}),d.jsx("path",{d:"M315.13 148.621L323.855 123.708L335.568 129.093L315.13 148.621Z",fill:"#FFCC00"}),d.jsx("path",{d:"M305.945 120.353L327.647 135.38L333.958 124.138L305.945 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M305.945 120.353L332.336 120.952L330.834 133.757L305.945 120.353Z",fill:"#FFCC00"}),d.jsx("path",{d:"M371.372 204.864L380.097 179.951L391.811 185.336L371.372 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M371.372 204.864L392.37 188.868L383.629 179.391L371.372 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M401.096 204.864L380.097 188.867L388.839 179.391L401.096 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M401.095 204.864L392.37 179.951L380.656 185.336L401.095 204.864Z",fill:"#FFCC00"}),d.jsx("path",{d:"M410.28 176.596L388.578 191.623L382.266 180.381L410.28 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M410.279 176.596L383.889 177.195L385.391 190L410.279 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M362.187 176.596L383.889 191.623L390.2 180.381L362.187 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M362.187 176.596L388.578 177.195L387.076 190L362.187 176.596Z",fill:"#FFCC00"}),d.jsx("path",{d:"M386.234 159.125L378.648 184.409L391.29 186.938L386.234 159.125Z",fill:"#FFCC00"}),d.jsx("path",{d:"M386.233 159.125L393.818 184.409L381.176 186.938L386.233 159.125Z",fill:"#FFCC00"}),d.jsx("path",{d:"M362.159 328.664L388.549 329.263L387.047 342.067L362.159 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M362.159 328.664L383.862 343.691L390.173 332.449L362.159 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M371.344 356.932L380.069 332.018L391.782 337.404L371.344 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M371.344 356.932L392.342 340.935L383.601 331.459L371.344 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M401.066 356.932L380.068 340.935L388.81 331.459L401.066 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M401.066 356.932L392.341 332.018L380.627 337.403L401.066 356.932Z",fill:"#FFCC00"}),d.jsx("path",{d:"M386.205 311.193L378.62 336.477L391.262 339.005L386.205 311.193Z",fill:"#FFCC00"}),d.jsx("path",{d:"M386.205 311.193L393.79 336.477L381.148 339.005L386.205 311.193Z",fill:"#FFCC00"}),d.jsx("path",{d:"M410.252 328.664L383.862 329.263L385.364 342.068L410.252 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M410.252 328.664L388.549 343.691L382.238 332.449L410.252 328.664Z",fill:"#FFCC00"}),d.jsx("path",{d:"M307.284 379.555L333.674 380.154L332.172 392.958L307.284 379.555Z",fill:"#FFCC00"}),d.jsx("path",{d:"M307.284 379.554L328.987 394.582L335.298 383.34L307.284 379.554Z",fill:"#FFCC00"}),d.jsx("path",{d:"M316.469 407.823L325.194 382.909L336.907 388.294L316.469 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M316.469 407.823L337.467 391.826L328.726 382.35L316.469 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M346.191 407.823L325.193 391.826L333.935 382.35L346.191 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M346.191 407.823L337.466 382.909L325.752 388.294L346.191 407.823Z",fill:"#FFCC00"}),d.jsx("path",{d:"M331.33 362.084L323.745 387.368L336.387 389.896L331.33 362.084Z",fill:"#FFCC00"}),d.jsx("path",{d:"M331.33 362.084L338.915 387.368L326.273 389.896L331.33 362.084Z",fill:"#FFCC00"}),d.jsx("path",{d:"M355.377 379.555L328.987 380.154L330.489 392.958L355.377 379.555Z",fill:"#FFCC00"}),d.jsx("path",{d:"M355.377 379.554L333.674 394.582L327.363 383.34L355.377 379.554Z",fill:"#FFCC00"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_4989_138368",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),cj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_4989_138137)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#012169"}),d.jsx("path",{d:"M512 0V64L322 256L512 443V512H445L254 324L68 512H0V444L186 257L0 74V0H62L254 188L440 0H512Z",fill:"white"}),d.jsx("path",{d:"M184 324L195 358L42 512H0V509L184 324ZM308 312L362 320L512 467V512L308 312ZM512 0L320 196L316 152L466 0H512ZM0 1L193 190L134 182L0 49V1Z",fill:"#C8102E"}),d.jsx("path",{d:"M176 0V512H336V0H176ZM0 176V336H512V176H0Z",fill:"white"}),d.jsx("path",{d:"M0 208V304H512V208H0ZM208 0V512H304V0H208Z",fill:"#C8102E"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_4989_138137",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),uj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_hkd)",children:[d.jsx("path",{d:"M0 0H512V512H0",fill:"#EC1B2E"}),d.jsx("path",{d:"M282.3 119.2C203 114 166.6 218 241.6 256.4C215.6 234 221 201 231.5 184L233.4 185C219.6 208.6 222.2 237.8 244.4 256C231.8 243.8 235 217 256.6 207.2C278.2 197.4 280.2 167.9 273 158.1C263.2 141.033 266.3 128.033 282.3 119.1V119.2Z",fill:"white"}),d.jsx("path",{d:"M392.378 248.29C372.818 171.265 262.66 168.784 249.316 251.98C262.585 220.33 295.639 215.268 315.052 220.001L314.688 222.117C287.978 216.285 261.011 227.781 250.562 254.519C258.271 238.766 284.748 233.527 300.743 251.042C316.738 268.556 345.413 261.342 352.508 251.466C365.711 236.872 379.033 235.803 392.473 248.259L392.378 248.29Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_hkd",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),pj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_huf)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M512 512H0V0H512V512Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M512 512H0V341.3H512V512Z",fill:"#388D00"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M512 170.8H0V0.100098H512V170.8Z",fill:"#D43516"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_huf",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),hj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_idr)",children:[d.jsx("path",{d:"M0 0H512V256H0V0Z",fill:"#E70011"}),d.jsx("path",{d:"M0 256H512V512H0V256Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_idr",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),fj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_ils)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M619.4 512H-112V0H619.4V512Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M619.4 115.2H-112V48H619.4V115.2ZM619.4 465.7H-112V398.5H619.4V465.7ZM136.4 190.7L246.5 382.3L359 191.6L136.4 190.7Z",fill:"#0038B8"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M136 320.6L246.2 129L358.6 319.8L136 320.6Z",fill:"#0038B8"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_ils",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),yj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_inr)",children:[d.jsx("path",{d:"M0 0H512V170.7H0V0Z",fill:"#FF9933"}),d.jsx("path",{d:"M0 170.7H512V341.3H0V170.7Z",fill:"white"}),d.jsx("path",{d:"M0 341.3H512V512H0V341.3Z",fill:"#128807"}),d.jsx("path",{d:"M256 324.267C293.703 324.267 324.267 293.703 324.267 256C324.267 218.297 293.703 187.733 256 187.733C218.297 187.733 187.733 218.297 187.733 256C187.733 293.703 218.297 324.267 256 324.267Z",fill:"#000088"}),d.jsx("path",{d:"M255.999 267.947C262.597 267.947 267.946 262.598 267.946 256C267.946 249.402 262.597 244.053 255.999 244.053C249.401 244.053 244.053 249.402 244.053 256C244.053 262.598 249.401 267.947 255.999 267.947Z",fill:"#000088"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_inr",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),mj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_jpy)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-128 0H640.007V512.029H-128V0Z",fill:"white"}),d.jsx("path",{d:"M256.009 415.199C343.904 415.199 415.156 343.947 415.156 256.052C415.156 168.157 343.904 96.9048 256.009 96.9048C168.114 96.9048 96.8618 168.157 96.8618 256.052C96.8618 343.947 168.114 415.199 256.009 415.199Z",fill:"#BC002D"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_jpy",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),gj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_kes)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"white"}),d.jsx("path",{d:"M0 0H512V153.6H0V0Z",fill:"#000001"}),d.jsx("path",{d:"M0 358.4H512V512H0V358.4Z",fill:"#006600"}),d.jsx("path",{d:"M255.8 102.4C236.6 102.4 204.6 153.6 195 179.2H0V332.8H195C204.7 358.4 236.7 409.6 255.9 409.6C275.1 409.6 307.1 358.4 316.7 332.8H512V179.2H316.6C307 153.6 275 102.4 255.8 102.4Z",fill:"#BB0000"}),d.jsx("path",{d:"M255.8 275.2C262.869 275.2 268.6 266.604 268.6 256C268.6 245.396 262.869 236.8 255.8 236.8C248.731 236.8 243 245.396 243 256C243 266.604 248.731 275.2 255.8 275.2Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_kes",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),wj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_krw)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.9756 167.546L84.3956 73.9515L99.9947 84.3549L37.5747 177.95L21.9756 167.546ZM45.3743 183.151L107.794 89.5565L123.393 99.9599L60.9734 193.555L45.3743 183.151ZM68.773 198.756L131.193 105.162L146.792 115.565L84.3721 209.16L68.773 198.756Z",fill:"#000001"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M365.156 396.42L427.576 302.825L443.175 313.228L380.755 406.823L365.156 396.42ZM388.555 412.025L450.975 318.43L466.574 328.833L404.154 422.428L388.555 412.025ZM411.954 427.63L474.374 334.035L489.973 344.438L427.553 438.033L411.954 427.63Z",fill:"#000001"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M388.567 344.42L466.563 396.437Z",fill:"black"}),d.jsx("path",{d:"M388.567 344.42L466.563 396.437",stroke:"white",strokeWidth:"9.375"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M162.38 193.572C178.935 168.749 204.672 151.52 233.931 145.673C263.189 139.827 293.572 145.843 318.395 162.397C343.218 178.952 360.447 204.69 366.294 233.948C372.14 263.207 366.124 293.589 349.57 318.412L162.38 193.572Z",fill:"#CD2E3A"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M162.38 193.572C145.825 218.395 139.809 248.778 145.656 278.036C151.502 307.295 168.732 333.032 193.555 349.587C218.378 366.142 248.76 372.158 278.019 366.311C307.277 360.465 333.015 343.235 349.57 318.412C357.847 306.001 360.855 290.809 357.932 276.18C355.009 261.551 346.394 248.682 333.982 240.405C321.571 232.127 306.379 229.119 291.75 232.043C277.121 234.966 264.252 243.581 255.975 255.992L162.38 193.572Z",fill:"#0047A0"}),d.jsx("path",{d:"M255.975 255.992C273.212 230.147 266.233 195.222 240.387 177.985C214.542 160.748 179.617 167.727 162.38 193.572C145.143 219.418 152.122 254.343 177.967 271.58C203.813 288.816 238.738 281.838 255.975 255.992Z",fill:"#CD2E3A"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M84.4473 438.033L22.0273 344.438L37.6264 334.035L100.046 427.63L84.4473 438.033ZM107.846 422.428L45.426 328.833L61.0251 318.43L123.445 412.025L107.846 422.428ZM131.245 406.823L68.8247 313.228L84.4238 302.825L146.844 396.42L131.245 406.823Z",fill:"#000001"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M427.628 209.16L365.208 115.565L380.807 105.162L443.227 198.757L427.628 209.16ZM451.027 193.555L388.607 99.9601L404.206 89.5567L466.626 183.152L451.027 193.555ZM474.425 177.95L412.005 84.3551L427.604 73.9517L490.024 167.547L474.425 177.95Z",fill:"#000001"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.7363 378.231L96.135 362.626ZM388.619 167.564L415.917 149.358ZM439.316 133.753L462.715 118.148Z",fill:"black"}),d.jsx("path",{d:"M72.7363 378.231L96.135 362.626M388.619 167.564L415.917 149.358M439.316 133.753L462.715 118.148",stroke:"white",strokeWidth:"9.375"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_krw",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),vj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_kwd)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 170.606H1023.95V341.316H0V170.606Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 341.315H1023.95V512.025H0V341.315Z",fill:"#F31830"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H1023.95V170.709H0V0Z",fill:"#00D941"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V511.922L255.445 341.315L255.961 170.503L0 0Z",fill:"#000001"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_kwd",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Cj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_kzt)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#00ABC2"}),d.jsx("path",{d:"M276.699 283.915C314.76 283.915 345.615 253.061 345.615 215C345.615 176.939 314.76 146.085 276.699 146.085C238.639 146.085 207.784 176.939 207.784 215C207.784 253.061 238.639 283.915 276.699 283.915Z",fill:"#FFEC2D"}),d.jsx("path",{d:"M274.309 335.36C272.517 338.585 271.442 342.323 269.189 345.241C262.226 338.944 252.191 339.097 243.385 338.739C236.114 338.329 228.229 337.664 222.597 332.493C216.709 327.629 211.845 321.382 205.292 317.44C199.132 316.117 193.343 313.441 188.345 309.606C178.002 301.158 172.063 288.614 161.925 279.91C160.031 278.067 157.727 276.582 155.577 274.995Z",fill:"#FFEC2D"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_kzt",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),_j=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_mad)",children:[d.jsx("path",{d:"M512 0H0V512H512V0Z",fill:"#C1272D"}),d.jsx("path",{d:"M256 191.4L218 308.2L317.4 236H194.6L293.9 308.2L256 191.4Z",stroke:"#006233",strokeWidth:"12.5"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_mad",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),bj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_4989_137735)",children:[d.jsx("path",{d:"M341.3 0H512V512H341.3V0Z",fill:"#CE1126"}),d.jsx("path",{d:"M170.7 0H341.3V512H170.7V0Z",fill:"white"}),d.jsx("path",{d:"M0 0H170.7V512H0V0Z",fill:"#006847"}),d.jsx("path",{d:"M284.6 295.6L284.8 299.1L286.2 298.2L285.2 295.2L284.6 295.6Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M284.5 295.7C285.108 295.7 285.6 295.208 285.6 294.6C285.6 293.992 285.108 293.5 284.5 293.5C283.893 293.5 283.4 293.992 283.4 294.6C283.4 295.208 283.893 295.7 284.5 295.7Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M289 301.1L286.3 298.6L285.1 299.6L288.7 301.6L289 301.1Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M288.7 302.6C288.3 301.933 288.4 301.367 289 300.9C289.6 300.433 290.133 300.5 290.6 301.1C290.933 301.7 290.833 302.233 290.3 302.7C289.7 303.1 289.167 303.033 288.7 302.5V302.6ZM309 263.7L311.7 266.3L312.1 265L309.6 263.3L309 263.7Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M308.7 264.1C309.307 264.1 309.8 263.608 309.8 263C309.8 262.393 309.307 261.9 308.7 261.9C308.092 261.9 307.6 262.393 307.6 263C307.6 263.608 308.092 264.1 308.7 264.1Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M316.1 265.3L312.1 266.4L312.4 265.1L315.9 264.7L316.1 265.3Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M316.8 265.8C317.408 265.8 317.9 265.307 317.9 264.7C317.9 264.092 317.408 263.6 316.8 263.6C316.193 263.6 315.7 264.092 315.7 264.7C315.7 265.307 316.193 265.8 316.8 265.8Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M302.3 285.5L299.8 281.5L300.2 281.4L303.1 284.7L302.3 285.5Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M299.6 281.9C300.263 281.9 300.8 281.363 300.8 280.7C300.8 280.037 300.263 279.5 299.6 279.5C298.938 279.5 298.4 280.037 298.4 280.7C298.4 281.363 298.938 281.9 299.6 281.9Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M302.5 285.6L305.7 286.2L305.8 285.7L303.1 284.7L302.5 285.6Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M306.6 287.3C307.208 287.3 307.7 286.807 307.7 286.2C307.7 285.592 307.208 285.1 306.6 285.1C305.992 285.1 305.5 285.592 305.5 286.2C305.5 286.807 305.992 287.3 306.6 287.3Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M227.7 294.4C227.633 295.067 227.366 295.4 226.9 295.4C226.233 295.333 225.966 295 226.1 294.4C226.3 293.6 226.566 293.267 226.9 293.4C227.433 293.6 227.7 293.933 227.7 294.4ZM227.7 296.2L228.4 300.2L227.4 299.9L227.1 296.4L227.7 296.2Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M228.6 294.9C229 295.5 228.3 296.4 227.4 296.6C226.6 296.9 225.5 296.5 225.5 295.7C225.5 294.9 226.8 295.3 227.1 295.2C227.6 295 228.1 294.2 228.6 294.9Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M221.6 301.9C222.318 301.9 222.9 301.497 222.9 301C222.9 300.503 222.318 300.1 221.6 300.1C220.882 300.1 220.3 300.503 220.3 301C220.3 301.497 220.882 301.9 221.6 301.9Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M223.7 300.8L227.6 300.6L226.9 299.8L223.7 300.2V300.8Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M224 300.4C224.4 301.4 224.4 302.7 223.3 302.5C222.2 302.3 222.4 301.4 222.3 301C222.2 300.3 221.5 299.7 222.2 299C222.8 298.4 223.7 299.4 224 300.4Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M211.5 280.5C211.942 280.5 212.3 280.008 212.3 279.4C212.3 278.793 211.942 278.3 211.5 278.3C211.058 278.3 210.7 278.793 210.7 279.4C210.7 280.008 211.058 280.5 211.5 280.5Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M211.5 281.9L211.6 285.6L210.6 284.7L210.7 281.7L211.5 281.9Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M213 280.8C213.2 281.6 211.9 282.1 211 281.9C210.067 281.767 209.633 281.3 209.7 280.5C209.7 279.8 210.9 279.9 211.2 280.1C211.6 280.4 212.7 279.5 213 280.8Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M204.9 285.8C205.618 285.8 206.2 285.531 206.2 285.2C206.2 284.869 205.618 284.6 204.9 284.6C204.182 284.6 203.6 284.869 203.6 285.2C203.6 285.531 204.182 285.8 204.9 285.8Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M207.3 285.2L210.2 285L211.4 286L207.2 285.8L207.3 285.2Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M206.2 283.6C207 283.6 207.5 284.5 207.4 285.4C207.4 286.4 206.6 287.1 205.9 287C205.1 286.9 205.2 286.2 205.2 286L205.7 285.2C205.7 284.9 205.5 284.2 205.6 284C205.6 283.733 205.8 283.6 206.2 283.6ZM203.8 260.9C203.5 261.5 202.8 261.9 202.6 261.6C202.333 261.267 202.366 260.8 202.7 260.2C203.033 259.6 203.433 259.4 203.9 259.6C204.166 259.867 204.166 260.3 203.9 260.9H203.8ZM200.6 266.8L202.2 262.9L202 262.7L200.1 265.4L200.6 266.8Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M202 263C201.2 262.333 200.933 261.7 201.2 261.1C201.5 260.6 202.1 260.9 202.1 260.9L202.8 261.6C203 261.7 203.5 261.5 203.8 262C204.066 262.6 204.066 262.933 203.8 263C203.508 263.158 203.181 263.24 202.85 263.24C202.518 263.24 202.192 263.158 201.9 263H202ZM195.1 262.4C195.766 262.867 196 263.3 195.8 263.7C195.6 264.1 195.133 264.1 194.4 263.7C193.4 263.1 193.5 262.9 193.7 262.5C194.033 262.1 194.5 262.1 195.1 262.5V262.4ZM196.8 264.1L199.8 265.9V267.4L196.5 264.6L196.8 264.1Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M196.8 264.5C196.134 265.167 195.534 265.333 195 265C194.4 264.7 194.9 264.1 194.9 264.1L195.5 263.5C195.7 263.2 195.5 262.7 196.1 262.5C196.7 262.233 197.034 262.3 197.1 262.7C197.2 263 197.4 263.9 196.8 264.5Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M285.3 295.8L284.9 296.2L284.7 296.9V295.8L285.1 295.5L285.3 295.8Z",fill:"#AA8C30"}),d.jsx("path",{d:"M285.4 295C285.4 295 285.2 295.5 284.5 295.5C283.833 295.5 283.5 295.267 283.5 294.8L283.6 293.9L283.3 294.3V295L283.8 295.6H284.2L284.6 295.7L285.1 295.5L285.4 295.3V295.1V295ZM288.8 301H288.2L285.5 299.6L288.5 301.6L288.8 301ZM290.7 301.8C290.7 301.8 290.7 302.4 290.1 302.6C289.5 302.867 289.1 302.867 288.9 302.6C288.763 302.477 288.662 302.319 288.609 302.142C288.556 301.966 288.553 301.778 288.6 301.6L288.5 302.1L288.8 302.7L289.4 303H289.9L290.2 302.8L290.6 302.4L290.8 302L290.7 301.8ZM310.1 263.8V264.6L309.4 263.9L309.7 263.5L310.1 263.8ZM309.8 262.8C309.8 263.3 309 264.1 308.5 263.8C307.833 263.533 307.6 263.067 307.8 262.4L307.6 262.7L307.7 263.5L308.3 264H308.9L309.5 263.8L309.8 263.2V262.8ZM317.8 264.2C317.8 264.7 317.3 265.6 316.7 265.5C316.033 265.367 315.733 265 315.8 264.4V265.2L316.1 265.5L316.6 265.8H317.1L317.7 265.4L317.9 264.9V264.6L317.8 264.2Z",fill:"#AA8C30"}),d.jsx("path",{d:"M315 264.9C315 264.9 315 265.1 314.7 265.3L313.7 265.9L315.9 265.3L315.7 264.7L315 264.9ZM301.4 282.8L301.2 283.2V283.8L300 281.8L300.4 281.6L301.4 282.8ZM300.7 280.8C300.4 281.4 299.5 281.8 299.1 281.5C298.7 281.2 298.3 280.3 298.8 279.9L298.5 280.1L298.4 280.7L298.6 281.2L299 281.7L299.4 281.9L300.1 281.7L300.6 281.4C300.6 281.4 300.9 280.4 300.6 280.9L300.7 280.8ZM305.1 285.5C305.1 285.5 305.1 285.7 304.7 285.7H303.5L305.5 286.1L305.7 285.7L305.1 285.5Z",fill:"#AA8C30"}),d.jsx("path",{d:"M307.7 286C307.9 286.7 307.3 287.4 306.5 287.1C305.7 286.8 305.5 286.1 305.7 285.6L305.5 286.2L305.7 286.8L306.2 287.2L306.7 287.4L307.2 287.2L307.7 286.7L307.8 286.1V286H307.7ZM228.5 294.9C228.7 295.1 228.4 296.1 227.5 296.4C226.6 296.7 226.1 296.4 225.9 296.1L225.7 295.5L225.5 295.7L225.7 296.1L226.1 296.5L226.9 296.7L227.5 296.6L228.1 296.3L228.4 296L228.7 295.6V295.1L228.6 294.9H228.5Z",fill:"#AA8C30"}),d.jsx("path",{d:"M227.7 296.9L227.4 297.2L227.2 297.8V296.8L227.6 296.5L227.7 296.9ZM224.7 300.1C224.7 300.1 224.6 300.3 224.8 300.5L225.6 300.7H224.2L224 300.2L224.7 300.1ZM224.2 301.1L224.1 301.6C223.966 302.067 223.7 302.3 223.3 302.3C223.087 302.257 222.893 302.146 222.749 301.984C222.605 301.822 222.517 301.617 222.5 301.4L222.3 300.9V301.4L222.6 302.2L223.2 302.5H223.6L224 302.3L224.2 301.8V301V301.1ZM220.4 300.9C220.4 300.9 220.6 301.6 221.4 301.6L222.4 301.4V301.7L222.1 301.8L221.5 301.9L220.9 301.8L220.6 301.6L220.4 301.2V300.9ZM212.9 280.6V280.9C212.8 281.2 212.3 281.8 211.4 281.8C210.6 281.8 210.133 281.6 210 281.2C209.733 280.8 209.633 280.567 209.7 280.5V281L210 281.5L210.9 281.9H211.7L212.5 281.7L212.9 281.3V280.6ZM211.5 282.4L211 282.6L210.7 282.9V281.9H211.5V282.5V282.4ZM207.7 285.2L208.1 285.5C208.5 285.7 210.6 285.9 210.6 285.9L207.3 285.8L207.5 285.2H207.7ZM207.4 285.2L207.2 285.7C207 286 206.6 286.9 205.9 286.8C205.2 286.7 205.3 286.2 205.3 286.1V285.9L205.2 286.4L205.4 286.7L205.6 286.9H206.2L206.6 286.8L207 286.4L207.2 286L207.4 285.5V285.2ZM205.6 285.3C205.6 285.3 205.6 285.5 205 285.5L203.7 285.3L204 285.6L204.4 285.7H205.4L205.6 285.3ZM203.9 262.3C203.9 262.3 204 262.6 203.7 262.8C203.3 263.067 202.833 263.1 202.3 262.9C201.9 262.7 201.1 261.9 201.1 261.9L201.5 262.5L202 263L202.8 263.2H203.6L203.9 262.8L204 262.6L203.9 262.3Z",fill:"#AA8C30"}),d.jsx("path",{d:"M201.6 263.3V263.7L201.5 264.7L202.1 263.1L201.9 262.9L201.6 263.3ZM197.3 264.5L197.4 264.8C197.6 265.3 199.4 266.9 199.4 266.9L196.6 264.7L196.9 264.2L197.3 264.5ZM196.4 264.7L195.7 265C195.5 265 194.9 265 194.9 264.6V264.1L194.7 264.6L194.8 264.9L195.2 265.1H195.8L196.3 264.9L196.4 264.8V264.7ZM195.4 263.6H194.8C194.3 263.6 193.8 263 193.8 263L194.1 263.6L195 264L195.4 263.6Z",fill:"#AA8C30"}),d.jsx("path",{d:"M319.9 256.1C319.6 259.1 316.6 260.8 315 261.9C314.072 262.609 313.291 263.492 312.7 264.5L312.1 266.3L311.9 267.4V267.8L312.1 269.5L312 272.9L314.1 271.4L315.7 270.8H316.1C316.1 270.8 314.4 272.4 313.8 274.2C313.1 276.1 311.8 280 309.5 281.2C307.2 282.4 305.7 282 304.9 282.7L304.1 283.6L303.1 284.9L302.3 285.9L301.6 286.5L301.1 286.8L300.9 288.2L300.4 290.1L301.4 289.7H302.5L301.9 290.7C301.8 291.2 302 294.4 299 296.3C296 298.2 288.3 297.9 288.3 297.9L286.9 298.5L285.5 299.5L284.3 300.9L284.2 301.2C284.2 301.2 283.2 302.4 282.5 302.8L280.3 304.3L282.1 304.4L284.9 305.6C284.9 305.6 283.1 305.6 281.9 306C280.7 306.4 275.4 309.5 272.9 309.4C270.2 309.4 266.5 305.6 266.5 305.6L264.9 304.4L262.1 303.8L258.6 303.6V303.2L258.7 302.6L261.7 302.7C263.4 302.9 263.9 303.5 265.3 303.7C266.244 303.824 267.204 303.721 268.1 303.4L272.8 299.6L277.5 298L279.3 298.2L280.1 298.4L280.8 298.6L280 299.6L278.8 300.3L279.4 300.8L282.4 300.3L283.4 300.6L283.6 300.7L284 299.7C284.4 299.2 286 297.9 286.8 297.4C287.467 297 287.8 296.733 287.8 296.6C288.1 296.4 289.1 293.9 289.1 293.9L289.2 292.6L292.5 289.5L294.7 287.1L295.7 284.4L295.6 283.9C295.6 283.9 296.3 284.7 296.2 286.4C296 288 295.833 288.733 295.7 288.6C295.5 288.4 297.9 287.1 299.1 286.6C300.1 286.2 300.767 286.067 301.1 286.2C301.738 285.825 302.284 285.312 302.7 284.7C303.4 283.7 303.5 283.5 303.5 283.1L303.6 280.9L303.4 275.2L305.4 271L308.2 268.5L308.7 268.2L308.4 269.2V270.2C308.4 270.2 309.8 268.4 310.5 268L311 267.8L311.6 266.2C311.8 265.2 311.8 263.7 311.8 263.7V261.4L311.4 259.6L310.1 256.1V251.5L309.1 250.2C309.1 250.2 310 250.1 311.1 251.7C311.857 252.922 312.366 254.281 312.6 255.7L315.3 247.6C315.3 247.6 316 248.6 316.5 250.1L317.2 252.8L318.2 250.6L318.3 251.4C318.5 252.1 320.1 253.1 319.9 256.1ZM266.1 308.1C266.1 308.1 265.5 306.9 263 305.6C261.569 304.914 260.057 304.41 258.5 304.1V305.1L262.5 306.8L264.5 308.4L266.1 308.1Z",fill:"#9CA168"}),d.jsx("path",{d:"M284.3 300.5C285.352 299.432 286.527 298.492 287.8 297.7C288.621 297.321 289.5 297.085 290.4 297C291.9 296.7 292.1 297 295.6 295C299.1 293 299.9 290.9 300.6 290.3C301.3 289.8 302.5 289.6 302.5 289.6L299.8 292.8C298.5 294.2 297.1 295.1 295.1 296.4C293.1 297.7 289.1 297.8 289.1 297.8C287.848 298.004 286.693 298.599 285.8 299.5C284.8 300.3 284.2 301.2 284.2 301.2C284.2 301.2 284 300.8 284.2 300.5H284.3ZM294 290.3C290.7 293.3 289.7 296.1 289.7 296.1L294 292.1C295.5 290.7 297.6 290.1 298.5 289.1C299.5 288.3 299.5 287.6 300.1 287.1L301.1 286.2C301.1 286.2 299.7 285.2 294 290.3ZM287.1 297.2C287.1 297.2 288.5 296.6 289.1 295.3C289.4 294.4 289.2 294.2 289.8 293.1C289.8 293.1 293.2 289.9 294.4 288.5C296.5 286 295.6 283.9 295.6 283.9C295.6 283.9 295.8 284.9 294.9 286.1C294 287.1 289.7 290.1 289.1 291.9C288.5 293.7 288.9 293.6 288.7 294.6C288.1 296.6 287.1 297.2 287.1 297.2ZM284.9 305.6C284.9 305.6 283.2 304.5 281.3 304.6C277.4 304.9 274.1 307.2 271.6 307.3C269 307.3 268 306.1 266 304.7C263.9 303.3 258.7 303.5 258.7 303.5V303.6L258.6 303.8C258.6 303.8 262.2 303.8 263.7 304.2C266.7 305.1 268.2 308.2 271.6 307.9C275.9 307.7 279.4 305 281.2 305C284.2 305 284.9 305.6 284.9 305.6ZM265.6 303.6C265.6 303.6 268.6 304.2 271 302.5C273.3 300.8 276.1 298.5 277.6 298.4C279.2 298.3 280.8 298.7 280.8 298.7C280.8 298.7 278.8 297.7 277.3 297.8C275.696 297.75 274.108 298.13 272.7 298.9C271.2 299.8 270.5 301.4 268.9 302.4C267.3 303.4 265.6 303.7 265.6 303.7V303.6ZM265.1 307.7L264.1 307.9C263.9 307.9 263.1 306.9 261.7 306.3C260.3 305.7 258.5 305.2 258.5 305.2C258.5 305.2 258.3 305.2 258.7 305.4L261.7 306.5C262.549 306.943 263.298 307.556 263.9 308.3C263.9 308.4 264.3 308.9 265.1 308.9C265.767 308.767 266.1 308.533 266.1 308.2C265.9 307.867 265.567 307.7 265.1 307.7ZM267.2 304.7C267.2 304.7 268.4 305.5 270.4 305.4C274.6 305.4 277.2 302.4 280 301.4C282.8 300.4 284.2 301.2 284.2 301.2V301C283.279 300.387 282.206 300.041 281.1 300C276.5 300.1 272.1 303 270.2 303.8C268.267 304.533 267.267 304.867 267.2 304.8V304.7ZM312 273C310.5 274.5 308.4 279.2 307.5 280.4C306.5 281.7 305.4 282.1 304.9 282.6L302.4 285.9C302 286.5 301.9 286.3 301.6 286.5C301.267 286.767 301.267 286.833 301.6 286.7C302.1 286.6 302.2 286.3 302.9 285.5C303.6 284.7 303.6 284.3 304.7 283.3C305.8 282.3 307.8 281.2 308.8 280C309.8 278.7 311.8 274 313 272.8C314.1 271.6 316.1 270.8 316.1 270.8C316.1 270.8 314.5 270.4 312 273ZM304.8 281.9C304.8 281.9 304.8 281 305.8 279.8C306.8 278.6 307.2 278.8 308 276.9L309.9 271.4C310.5 269.4 311.7 267.6 311.7 267.6C311.7 267.6 310.6 267.6 309.5 269.2C307.906 271.34 306.627 273.697 305.7 276.2C304.7 278.8 304.7 281.9 304.7 281.9H304.8ZM303.4 283.7C303.4 283.7 303.8 283.4 303.9 281.1C304 278.8 303.8 275.5 304.4 273.8C305.1 272.2 308.7 268.3 308.7 268.3C308.7 268.3 307.2 268.6 305.1 270.3C303.1 272.1 302.167 273.867 302.3 275.6C302.3 277.2 303.3 279 303.3 280.6L303.4 283.6V283.7ZM311.9 267.5L313.1 263.5C313.5 262.8 313.5 262.3 315.3 260.3C316.3 259.2 317.3 258.4 317.8 256.8C318.3 255.2 318.2 250.7 318.2 250.7C318.2 250.7 317.7 251.1 317.4 251.9C317.1 252.7 317.3 255.6 316.6 256.9C315.9 258.3 314.4 261.5 313.6 262.2C313.6 262.2 313.5 259.9 313.7 257.6C313.9 255.3 314.7 254.6 315.1 253.1C315.5 251.6 315.3 247.7 315.3 247.7C315.3 247.7 314 248.9 313.4 250.4C312.8 251.9 312.4 254.4 312.4 256.4C312.4 258.4 312.9 260 313 261.1C313.1 262.2 313.1 262.8 312.7 264L312.2 265.6L311.6 267.6L311.9 267.5ZM309.1 250.3C309.1 250.3 310.1 251.6 310 253.2C309.8 254.7 309.2 256.8 309.8 258.4C310.4 260 311.3 260.1 311.6 261.1C311.8 262 311.8 263.8 311.8 263.8C311.8 263.8 312.3 260.4 312 259.4C311.6 258.4 311.5 258.9 311 257.9C310.5 256.9 311 254.2 310.6 252.6C310.387 251.68 309.856 250.866 309.1 250.3Z",fill:"#717732"}),d.jsx("path",{d:"M245.4 307.9C245.4 307.9 245.7 306.9 247.9 305.9C250.1 304.9 253.3 303.4 253.6 303.6C254 303.8 253.5 304.9 253.5 304.9L251.4 305.6L249.7 306.6L247.7 307.9H245.4Z",fill:"#9CA168"}),d.jsx("path",{d:"M251 302.1C248.1 302.2 246.6 302.9 246 303.1H245.1C244.5 302.9 243.9 302 243.9 302L243.3 301.5L243.2 303.5L239.2 299.9L238.7 302.3L238.2 303.3L234.2 299.5L234.3 302.5H233.3L230.3 300.5L229.5 300.9L230.5 302.6L226.8 302.9L226 303.5L225.3 304.4V304.7H226.7C227 304.5 227.2 304 227.3 304.2C227.4 304.4 227.5 305.2 228 305.2C228.5 305 230.2 303.8 231.4 304.3C232.7 305 229.6 305.9 230 306.8C230.3 307.8 232.5 307.4 233 307.1C233.5 306.8 235.3 304.7 236 305.5C237 306.5 234 307.5 234.5 308.5C235.1 309.6 236.7 309.4 237.5 308.9C238.3 308.4 240.2 305.6 240.6 306.2C241.3 307.2 239 308.3 239.6 309.2C240.2 310.1 241.5 309.2 242.3 308.5C243.1 307.8 243.5 306.5 244.7 305.8C245.8 305.2 245.7 305.5 246.1 305.4C246.4 305.4 247.3 304.5 247.3 304.5L250 303.4H251.4L252.1 303.8L253.5 304L253.6 302.8C253.6 302.8 252 302.1 250.9 302.1H251ZM229 302.1L229.5 301.1L229.2 300.6C229.2 300.6 228.2 300.1 227.3 299.2L225.7 297.9L224 296.8L223.4 294.5L223 293.9L222 294.3L220.6 289.4L220.3 288.5H219.7L218.6 291.5L217.3 289.6L217 285.6L216.2 286.5L215.2 287.5L213.4 283.8C213.4 283.8 213.2 283.8 213.1 284.1C213 284.4 212.9 285.5 213.1 286.2L210.6 284.4C208.933 282.8 208.166 282 208.3 282L207.5 280L208.3 278.3L208.7 276.3L206.9 277L206.6 272.4L206.3 271L204.2 274L203.4 272.8V269.8L202.8 269.7L201.9 271.3C201.9 271.3 201.1 269.6 200.7 269.3C200.8 268.6 200.9 267 200.5 265.7C200 264.1 199.5 263.2 199.6 261.9C199.8 260.5 200.4 260.4 200.3 259.9C200.3 259.2 199.3 260.2 199.7 259.4C200 258.7 202.7 256.9 202.2 256C201.6 255 198.9 257.4 199.5 255.8C200.2 254.2 202.7 254.2 202.9 251.9C202.9 250.6 200.4 252.9 200.2 252.1C200 251.4 201.8 250 201.8 249.1C201.8 248.1 202.1 248.1 201.6 247.6C201.1 247.1 199.6 249.5 199.6 249.5L197.9 248.9L197.3 251.3L196.8 253.3L194.7 252.1L195.2 254.6L195.7 257L193.6 256.4L194.7 258.5L196.2 260L197.2 261.3L197.8 261.6L198.8 262.6L199 263.8L199.5 265.3L199.6 266.8V269.1L199.5 269.9C199.1 269.9 198.5 269.3 198.2 269.7C197.9 270.2 199.4 271.3 199.2 271.7C198.9 271.9 196.6 271.2 196.5 271.9C196.4 272.6 196.7 273.6 198 273.9C199.3 274.2 202.2 274.9 201.7 275.5C201.2 276.1 198 273.7 198.2 275.5C198.225 276.098 198.43 276.675 198.786 277.156C199.143 277.637 199.635 278.001 200.2 278.2C201.1 278.5 204.3 278.2 204.2 278.9C203.9 279.6 201.5 278.6 201.2 279.7C200.9 280.8 203 281 203.4 281C203.8 281 205.1 281 205.7 281.4L209.1 284.6C210.1 285.5 212.2 286.9 212.8 287.3C212.2 287.3 210.9 287.1 210.7 287.6C210.5 288.1 215.6 290 214.1 290.6C212.6 291.2 211.1 289 210.6 290.3C210.1 291.6 211.6 292.7 212.4 293.3C213.2 293.7 217.7 293.3 216.9 294.3C215.9 295.3 212.7 293.6 212.6 294.9C212.5 296.2 214.8 298 216 297.9C217.1 297.9 218.4 296.1 218.9 297.1C219.4 298.1 218 298.5 219.1 298.7C220.2 298.9 221 297.7 222.3 297.9C223.5 298.1 225.5 298.9 226.7 299.9L228.9 302.2L229 302.1Z",fill:"#9CA168"}),d.jsx("path",{d:"M246.7 307.3C247.366 307.433 247.7 307.567 247.7 307.7C247.7 307.7 249.1 306.6 250.4 305.9C251.6 305.2 253.4 304.9 253.4 304.9H253.6C253.6 304.9 251.3 305.6 250.3 306.3L247.8 308C247.733 308.267 247.266 308.433 246.4 308.5C245.733 308.433 245.4 308.233 245.4 307.9C245.4 307.567 245.833 307.367 246.7 307.3ZM253.5 303.9C253.5 303.9 252.8 303.9 252.5 303.6C251.869 303.209 251.142 303.001 250.4 303C249.199 303.067 248.063 303.564 247.2 304.4C247.2 304.4 247 304.9 246.1 305.4C246.433 305.4 246.933 305.133 247.6 304.6C248.482 303.969 249.519 303.589 250.6 303.5C251.4 303.5 251.966 303.7 252.3 304.1C252.7 304.4 253.5 304.3 253.5 304.3V303.9ZM213.1 287.4V286.8C213.1 286.8 212.5 286.6 211.4 285.8C210.1 285.1 207.3 282.9 207.3 282.9L209.6 285L212.8 287.3L213.1 287.4ZM241.6 307.6L242.8 305.8C243.666 304.667 244.166 304.1 244.3 304.1C244.3 303.9 244.133 303.5 243.8 302.9L243.6 301.9C243.6 301.9 243.9 302.7 244.4 303.1L245.4 303.8C245.4 303.8 246.4 303.7 246.4 303.5C246.4 303.3 246.333 303.133 246.2 303H245.3C244.3 302.5 243.9 301 243.3 301C242.7 300.9 243.1 302.6 242.8 302.6C241.8 302.6 241.2 299.1 238.8 299C237.3 298.9 237 299.2 236.9 299.6C236.8 300 238.9 302 238.2 302.3C237.5 302.6 235.4 299 233.8 299C232.2 299 232.1 299.5 232.2 299.9C232.3 300.2 234 300.5 233.6 301.6C233.2 302.7 231.6 299.9 230.2 300.1C228.8 300.3 228.6 300.4 228.5 300.8C228.4 301.2 229 301.8 228.8 301.9C228.6 302 227.8 302 227 302.5C226.3 303 225.3 304.4 225.3 304.4C225.3 304.4 226.2 303 227.5 302.9H231.9L231 302.2C230.5 301.8 230.1 300.9 230.1 300.9L231.5 302.2L233 303.2C233 303.2 234.4 303.2 234.5 303.4C234.633 303.6 234.433 303.967 233.9 304.5L232.5 305.8L234.1 304.6L235.3 303.6C235.3 303.6 236.3 303.8 236.4 303.7C236.533 303.767 236.333 303.333 235.8 302.4L234.5 300.4C234.5 300.4 235.3 301.1 236.1 302.2C237 303.2 236.8 303.8 237.1 303.8L238.3 304C238.633 304 238.533 304.433 238 305.3L237 307.3L238.3 305.7C238.9 305.1 239.3 304.3 239.5 304.3H240.7L240 303C239.6 302 239.5 300.8 239.5 300.8C239.5 300.8 239.9 302 240.5 302.8L241.6 304.4H242.9C242.966 304.667 242.8 305.133 242.4 305.8L241.6 307.6ZM224.4 297.6L225.7 297.9C225.7 297.9 224.4 297.1 224 295.9C223.7 294.9 224 292.5 223.4 292.5C222.8 292.5 222.5 294.3 222 293.9C221.4 293.6 222.2 290.4 221.5 289.1C220.9 287.7 219.5 286.8 219.1 287.3C218.7 287.8 218.9 290.7 218 290.1C217.1 289.5 218 286.9 217.8 285.8C217.6 284.7 216.8 283.8 216.3 284.1C215.8 284.4 216.5 286.5 215.7 286.6C214.8 286.6 215 285.1 214.7 284.9C214.4 284.7 214.1 285.2 214 284.9C213.8 284.6 213.9 283.6 213.4 283.7C213 283.7 213.1 284.7 213.2 285.1L213.8 286.5C213.9 286.8 214.6 287.2 214.5 287.5C214.433 287.767 214.166 287.9 213.7 287.9H212.3L213.7 288.2C214.1 288.2 214.9 288.1 215.1 288.4L216.2 290.1C216.2 290.1 216.5 289.4 216.6 288.2V286.1C216.6 286.1 216.9 287.4 216.9 288.2L216.6 290.6C216.6 290.6 217.5 291.3 217.2 291.6H214.9C213.9 291.6 212.3 291.3 212.3 291.3C212.3 291.3 213.7 291.9 214.7 292.1C215.7 292.3 217.7 292.3 217.7 292.3L219.1 293.9C219.1 293.9 219.8 292.8 219.9 291.6V289L220.3 291.2C220.287 292.22 220.118 293.231 219.8 294.2L218.3 295C217.3 295.3 215.4 295.5 215.4 295.5C215.4 295.5 217.2 295.8 218.4 295.5C219.7 295.2 219.8 294.8 220.2 295L220.9 295.6L221.9 296.4L221.1 296.9L219.9 297.5L221.7 296.9L222.6 296.6L223 296.8L222.9 295.8L222.6 294.4C222.6 294.4 223.1 295 223.2 295.7L223.3 296.9C223.3 296.9 223.4 297.1 224.3 297.5L224.4 297.6ZM199.5 269C199.5 269 199.8 267.6 199.8 266C199.8 264.5 198.8 262.1 198.5 261.9L198.3 261.4L199 260.4L198 261.1L197 260.7L196.4 260L197.4 260.5L197.9 260.6L197.6 259.1L196 258.3C195 257.7 194 256.8 194 256.8L196.2 258L197.5 258.3C197.5 258.3 198.4 258.1 198.8 257.8L200.1 256.9C200.1 256.9 199.3 257.4 198.7 257.5L197.5 257.7L197.2 255.8L196.3 254.9C195.6 253.9 195.1 252.7 195.1 252.7C195.1 252.7 195.8 253.6 196.4 254C197 254.4 197.5 255.2 197.5 255.2L198.8 254.4L201.1 252.8L198.9 253.8L197.6 254.4V253.2L198.2 251.9C198.1 251.5 197.8 251.7 197.7 251.4L198.1 249.3V250.3C198.1 250.7 198.233 250.933 198.5 251C198.9 251.1 201.1 248.9 201.3 248.5C201.6 248.1 202 247 200.9 247.5C199.8 248 200 248.8 199.1 248.8C198.8 248.8 198.5 247.6 198.1 247.8C197.8 248.1 197.1 248.8 196.9 249.8C196.7 250.6 197.1 251.8 196.6 252.2C196.1 252.6 195.6 250.8 194.8 251C193.8 251.3 193.6 252.6 193.8 253C193.9 253.6 195.9 256 195.3 256.2C194.7 256.4 193.1 254.2 192.3 255.8C191.3 257.3 194.9 258.9 195.3 259.3C195.8 259.7 195.3 259.8 196 260.6C196.7 261.4 197.5 261.6 197.9 262.1C198.3 262.6 199.6 265.1 199.6 266.7V269H199.5ZM208.9 282.6C208.9 282.6 208 281.6 208.3 280C208.6 278.4 209.8 275.4 209.3 275C209 274.6 207.7 276.8 207.4 276.3C207.1 275.8 208.1 272.9 207.6 271.7C207.1 270.5 207 269.7 206 269.8C205 269.9 204.5 273.3 204 272.8C203.5 272.1 204.3 270.6 204 269.8C203.733 269 203.4 268.667 203 268.8C202.4 268.9 202.2 270.5 201.8 270.5C201.4 270.5 200.8 268.5 200.1 268.9C199.4 269.1 201.9 272.4 201.9 272.4C201.9 272.4 202.4 272 202.6 271.4L203.1 270.3C203.1 270.3 203.3 271.3 203.1 271.8L202.8 273.2C202.733 273.267 202.166 273.267 201.1 273.2C200.1 273.1 199.2 272.7 199.2 272.7C199.2 272.7 199.9 273.1 201 273.4L203.2 274L203.9 275L204.8 276.1L205.4 274.5L206.4 271.7C206.4 271.7 206.2 273.7 205.9 274.7L205.4 277.2C205.4 277.2 204.4 277.2 203.3 276.9L200.3 276.3L203.3 277.3L205.6 277.9L206.6 279.3L207.4 278.2C207.9 277.5 208.2 276.7 208.2 276.7C208.2 276.7 208 277.8 207.7 278.5L207.1 279.6L205.7 279.8H203.7C204.869 280.17 206.077 280.405 207.3 280.5C207.3 280.5 207.3 280.9 207.8 281.6L208.9 282.6Z",fill:"#717732"}),d.jsx("path",{d:"M251.6 312.7C251.6 312.7 251.1 312.1 250.4 311.7L249.4 311.5H249.1L249.8 309.9L254.2 305.6L254.9 301.3H257.6V307.2L258.4 307.5L263.4 310.5V311.8L262.6 312.1L262 312.4L260.2 312.6L256.9 310.2L255.5 308.8L253.1 311.9L251.5 312.7H251.6Z",fill:"white"}),d.jsx("path",{d:"M255 301.3V302.3C255 302.9 255 306.3 254.8 306.8C254.7 307.3 252.3 308.2 250.8 309.4C249.5 310.6 249.5 311.5 249.5 311.5L248.2 311.9C247.334 312.3 246.9 312.567 246.9 312.7C246.9 312.9 247.4 310.5 249.7 308.6C251.9 306.6 253 306.4 253.2 306.1C253.4 305.8 253.2 302 253.2 301.7C253.334 301.433 253.534 301.333 253.8 301.4H255.1L255 301.3ZM260.7 313.9L261.3 313L262 312.4L261 311.8C259.7 311.3 259 311.4 258.2 310.8L256.5 309.1L255.3 310.1L256.7 311.8C257.3 312.4 258.8 312.6 259.5 313L260.7 314V313.9Z",fill:"#016848"}),d.jsx("path",{d:"M257.2 301.3L258.7 301.4L258.9 301.9C258.9 302 258.9 305.1 258.7 306.1C258.56 306.998 258.218 307.853 257.7 308.6C257.3 308.9 255.3 310.6 254.4 311.6C253.4 312.5 252.5 313.8 252.5 313.8L251.9 313L251.3 312.3C251.956 311.159 252.883 310.197 254 309.5C255.5 308.5 256.9 307.3 257.1 305.6C257.3 303.9 257.2 301.3 257.2 301.3Z",fill:"#CD202A"}),d.jsx("path",{d:"M266 312C266 312 265.7 311.7 264.6 311.6C263.4 311.6 263.4 311.8 263.4 311.8C263.4 311.8 262.7 311 261.8 310.4C260.8 309.7 260 309.8 259 309.1C258 308.4 257.4 307.4 257.4 307.4L258.2 305.8C258.2 305.8 259.1 307.1 260 307.8C260.9 308.5 263 309.1 263.7 309.8C264.4 310.3 266 312 266 312Z",fill:"#CD202A"}),d.jsx("path",{d:"M276 293C276 293 273 292 273.3 291C273.6 290 279.9 288.3 279.9 288.3L280 286.6C280 286.6 279 286.6 277.5 287.1C275.243 287.86 272.881 288.265 270.5 288.3C268.966 288.3 267.966 288.2 267.5 288L244.3 286.6H243.1C240.1 286.3 238.2 281.8 238.2 281.8L236.8 282C236.8 282 237.2 284.3 236.5 284.5C235 284.9 225.4 279.7 225.4 279.7L224.8 281.8C224.8 281.8 230.8 285 230.6 286.1C230.4 287.3 228.6 287.2 228.6 287.2L229.4 288.6C229.7 288.6 239.1 289.1 239.3 291.9C239.3 293.1 237 293.8 237 293.8L237.8 294.8V295.2C237.8 295.2 243 295.2 244.5 296.1C245.9 296.9 246.7 298.1 248.5 299.1C253.697 299.917 258.984 299.984 264.2 299.3C266.3 298.7 267.6 296.3 271.1 295.3C274.6 294.2 275.7 294.1 275.7 294.1L276 293Z",fill:"#30C2DC",stroke:"#0872A7",strokeWidth:"0.4"}),d.jsx("path",{d:"M227.6 290.3C228.539 290.3 229.3 289.539 229.3 288.6C229.3 287.661 228.539 286.9 227.6 286.9C226.662 286.9 225.9 287.661 225.9 288.6C225.9 289.539 226.662 290.3 227.6 290.3Z",fill:"white",stroke:"#0872A7",strokeWidth:"0.8"}),d.jsx("path",{d:"M237.2 282.5C238.139 282.5 238.9 281.739 238.9 280.8C238.9 279.861 238.139 279.1 237.2 279.1C236.261 279.1 235.5 279.861 235.5 280.8C235.5 281.739 236.261 282.5 237.2 282.5Z",fill:"white",stroke:"#0872A7",strokeWidth:"0.8"}),d.jsx("path",{d:"M277.2 294.9C278.139 294.9 278.9 294.139 278.9 293.2C278.9 292.261 278.139 291.5 277.2 291.5C276.261 291.5 275.5 292.261 275.5 293.2C275.5 294.139 276.261 294.9 277.2 294.9Z",fill:"white",stroke:"#0872A7",strokeWidth:"0.8"}),d.jsx("path",{d:"M220.1 278.3C219.6 279.5 221.7 281.9 223.2 282.2C224.733 282.4 225.6 282.1 225.8 281.3C226 280.5 225.9 279.833 225.5 279.3C224.5 278 220.7 277 220.1 278.3Z",fill:"#F8C83C"}),d.jsx("path",{d:"M224.8 280.2C224.8 279.4 223.5 278.7 222.8 278.7C222.1 278.7 221.1 278.7 221.3 279.1C221.5 279.5 223.5 280.1 223.5 280.3C223.5 280.5 222.9 280.8 223.2 281.1C223.6 281.3 223.967 281.267 224.3 281C224.7 280.8 224.867 280.533 224.8 280.2Z",fill:"white"}),d.jsx("path",{d:"M238.2 294.6C238.5 295.7 237.6 296.3 236.5 296.8C235.4 297.3 233.1 297 232.5 296.1C232.1 295.1 233.5 293.7 234.8 293.4C236.2 293.1 237.8 293.6 238.2 294.6Z",fill:"#F8C83C"}),d.jsx("path",{d:"M235.8 295.3C236.3 295.2 236.3 295.9 236.7 295.9C237.1 295.9 237.4 295.2 237.3 294.8C237.1 294.2 236.6 293.867 235.8 293.8C235.2 293.8 233.4 295.4 233.6 295.8C233.8 296.2 234.134 296.267 234.6 296C234.9 295.9 235.4 295.3 235.8 295.3Z",fill:"white"}),d.jsx("path",{d:"M279.4 288.8C280.4 290.2 282.2 288.9 282.7 288.4C283.2 287.9 284.7 287 284.1 286.2C283.5 285.2 282.4 285.3 281.7 285.4C281 285.5 279.7 286.4 279.4 286.9C279 287.433 279 288.1 279.4 288.9V288.8Z",fill:"#F8C83C"}),d.jsx("path",{d:"M279.7 288C279.7 288 279.8 286.5 281.2 286.4C281.9 286.4 282 286.6 282.6 287C283.2 287.4 283.4 286.5 283.4 286.5C283.4 286.5 283.4 287.5 282.4 287.6C281.5 287.6 281.9 287.2 280.9 287C280.1 287 279.7 288 279.7 288Z",fill:"white"}),d.jsx("path",{d:"M257.5 285.1L256.8 284.7H251.8L254.5 292.7L257.8 297.3L259 297.7L261.5 297.6L262 296.3L261 288.7L257.5 285.1Z",fill:"#F9AA51",stroke:"#953220",strokeWidth:"0.4",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M248.5 285.6L248.6 284.7L250.1 284.6L251.8 284.7C251.9 284.7 253.8 287 254.3 288.5C254.9 289.9 255.7 292.3 256.5 293.8L259 297.8H255.8L254.3 297.3L249.7 290.1L248.5 285.6Z",fill:"#F9AA51",stroke:"#953220",strokeWidth:"0.4",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M246.6 284.6L248.6 284.7C248.8 284.8 250.9 286.7 251.7 288.9C252.5 291.1 252.1 291.5 253.2 293.9C254.2 296.2 255.8 297.9 255.8 297.9C255.8 297.9 252.6 297.9 250.8 297.7C249 297.5 248.5 297.4 248.1 296.9L246.7 295.9H244.9L245.4 293.4L244.9 287.9V285L246.6 284.6ZM265.3 286.1L262.3 284.9L256.8 284.6L257.2 287.4C257.4 288.8 258.4 292 259.2 293.6C260.2 295.2 261.1 297.1 261.6 297.6C262.1 298.1 265.2 296.7 265.2 296.7L267.3 296.4L267 294.1L266.7 293.4L267.2 287L266.8 286L265.3 286.1Z",fill:"#F9AA51",stroke:"#953220",strokeWidth:"0.4",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M245.7 286.1C245.7 286.8 246.4 286.9 246.7 286.8C246.8 286.8 247.5 286.5 247.5 285.6C247.5 284.7 246.9 283.9 245.7 283.8C244.6 283.8 243.7 285.2 243.7 286.2C243.7 287.2 244.7 287.7 244.7 288.1C244.7 288.1 243.7 289 243.7 290.6C243.7 292.2 245.1 293.4 245.1 293.4C245.1 293.4 243.7 294.5 243.7 295.6C243.7 296.7 244.7 297.5 245.7 297.5C246.7 297.5 248 296.8 248 296C248 295.2 247.2 294.6 246.6 294.6C246 294.667 245.7 294.9 245.7 295.3M266.2 286.6C266.134 287.2 265.867 287.433 265.4 287.3C264.7 287.1 264.5 287.1 264.5 286.2C264.5 285.3 265.6 284.9 266.4 284.9C267.2 284.9 268.4 285.9 268.4 287.1C268.4 288.3 267.4 289.1 267.4 289.1C267.4 289.1 268 289.4 268 290.9C268 292.4 267 293.5 267 293.5C267 293.5 268.3 294 268.3 295.6C268.3 297.2 267.3 297.7 266.5 297.7C265.7 297.7 264.4 297.2 264.4 296.2C264.4 295.2 265.1 294.7 265.6 294.7C266.1 294.7 266.6 295.3 266.6 295.9",fill:"#F9AA51"}),d.jsx("path",{d:"M245.7 286.1C245.7 286.8 246.4 286.9 246.7 286.8C246.8 286.8 247.5 286.5 247.5 285.6C247.5 284.7 246.9 283.9 245.7 283.8C244.6 283.8 243.7 285.2 243.7 286.2C243.7 287.2 244.7 287.7 244.7 288.1C244.7 288.1 243.7 289 243.7 290.6C243.7 292.2 245.1 293.4 245.1 293.4C245.1 293.4 243.7 294.5 243.7 295.6C243.7 296.7 244.7 297.5 245.7 297.5C246.7 297.5 248 296.8 248 296C248 295.2 247.2 294.6 246.6 294.6C246 294.667 245.7 294.9 245.7 295.3M266.2 286.6C266.134 287.2 265.867 287.433 265.4 287.3C264.7 287.1 264.5 287.1 264.5 286.2C264.5 285.3 265.6 284.9 266.4 284.9C267.2 284.9 268.4 285.9 268.4 287.1C268.4 288.3 267.4 289.1 267.4 289.1C267.4 289.1 268 289.4 268 290.9C268 292.4 267 293.5 267 293.5C267 293.5 268.3 294 268.3 295.6C268.3 297.2 267.3 297.7 266.5 297.7C265.7 297.7 264.4 297.2 264.4 296.2C264.4 295.2 265.1 294.7 265.6 294.7C266.1 294.7 266.6 295.3 266.6 295.9",stroke:"#953220",strokeWidth:"0.4",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M247.6 295L247.9 295.4C248.033 295.8 248.233 296.133 248.5 296.4C249.2 297.1 254.3 297.3 255.9 297.3C257.5 297.3 262.1 297.5 263 297C264 296.4 264 295.6 264.5 295.2L265.2 294.8L264.6 295.4V296.4L264.9 297.1C264.9 297.1 264.9 297.4 264.3 297.7C263.833 298.033 263.233 298.233 262.5 298.3C261.7 298.3 251.9 298.3 250.3 298.1C248.7 297.9 248.8 297.8 248.3 297.5L247.6 296.8L247.9 296.1L247.6 295ZM263.6 285.5L264.4 285.9C264.4 285.9 263.7 286.1 263.1 287.7C262.5 289.2 263.1 289.7 262.6 289.9H258L257.3 288.1L263.6 285.5Z",fill:"#953220"}),d.jsx("path",{d:"M277.1 284.9C277.1 284.9 276.4 284.6 276.1 283.9C275.7 283.4 275.4 282.6 275.7 282.5C276.1 282.433 276.367 282.7 276.5 283.3C276.767 284.3 276.967 284.833 277.1 284.9ZM285.5 282.6L286.2 283.6L287.2 284.1C287.2 284.1 286 284.1 285.6 283.8L284.8 282.6H285.5Z",fill:"#231F20"}),d.jsx("path",{d:"M288 283.3C288 283.3 287.3 283.7 286.7 283.5C286.033 283.233 285.733 282.967 285.8 282.7C286 282.433 286.233 282.5 286.5 282.9C286.9 283.2 288 283.3 288 283.3ZM292.2 279.7C292.2 279.7 291.6 280.3 291.2 280.3C290.8 280.3 290 280.1 290 279.9C290 279.7 291 279.6 291.2 279.6L292.2 279.7ZM285.9 271.4C285.9 271.4 284.9 271.6 284.6 272.1C284.333 272.7 284.4 273.033 284.8 273.1C285.4 273.2 285.3 272.5 285.3 272.4C285.3 272.2 285.9 271.4 285.9 271.4ZM281.7 273.7C281.7 273.7 281 274.1 280.8 274.5C280.6 274.9 280.5 275.7 280.8 275.8C281.3 275.8 281.4 275.1 281.5 274.8L281.7 273.7Z",fill:"#231F20"}),d.jsx("path",{d:"M274.2 278.7L271.9 281.1C271.9 281.1 277.2 284.1 281.3 283.9C285.3 283.9 289.9 280.6 290.3 279.9C290.5 279.3 290.3 276.5 289.8 275.6C289.3 274.7 286.4 272.6 285.4 272.6C284.4 272.7 282.4 274.2 280.7 275.8C279 277.4 279.1 279 276.7 278.8L274.2 278.7Z",fill:"#8CBEBF",stroke:"#04534E",strokeWidth:"0.4"}),d.jsx("path",{d:"M273.6 279.7C273.6 279.7 279.3 280.5 280.9 279.1C282.5 277.6 284.3 274.8 285.4 274.1C286.6 273.567 287.167 273.367 287.1 273.5L288.3 274.5L289.8 275.6L290.2 278.3V279.8L288.5 281.2L285.2 282.7L282.2 283.7L279.5 283.6L274.2 282L272.8 281.1L272.5 280.8L273.6 279.7Z",fill:"#0C8489"}),d.jsx("path",{d:"M282.2 276.4C282.267 276 282.533 275.867 283 276C283.7 276.2 283.9 276 283.9 276.5C283.9 277 283.4 277.7 282.9 277.7C282.6 277.7 282.2 276.9 282.2 276.4ZM284.5 277.8C284.5 277.4 284.767 277.2 285.3 277.2C285.9 277.2 286.3 277.8 286.3 278.2C286.3 278.6 285.9 279 285.4 279C284.9 279 284.5 278.3 284.5 277.8ZM283.7 281.2C283.7 280.733 284 280.533 284.6 280.6C285.5 280.7 285.4 280.8 285.4 281.3C285.4 281.8 285 282.3 284.4 282.3C284 282.233 283.767 281.9 283.7 281.3V281.2ZM280.7 280.2C280.7 279.6 281.3 279.4 281.7 279.4C282.233 279.467 282.533 279.8 282.6 280.4C282.533 281.067 282.267 281.433 281.8 281.5C281.2 281.367 280.867 280.933 280.8 280.2H280.7ZM276 280.8C276 280.495 276.121 280.202 276.337 279.987C276.552 279.771 276.845 279.65 277.15 279.65C277.455 279.65 277.747 279.771 277.963 279.987C278.179 280.202 278.3 280.495 278.3 280.8C278.3 281.105 278.179 281.397 277.963 281.613C277.747 281.829 277.455 281.95 277.15 281.95C276.845 281.95 276.552 281.829 276.337 281.613C276.121 281.397 276 281.105 276 280.8Z",fill:"#04534E"}),d.jsx("path",{d:"M284.5 277.8C284.633 277.4 284.9 277.2 285.3 277.2C285.7 277.2 285.9 277.433 285.9 277.9C285.9 278.367 285.733 278.6 285.4 278.6C284.933 278.533 284.633 278.267 284.5 277.8ZM283.7 281.1C283.767 280.633 284.1 280.4 284.7 280.4C285.167 280.4 285.433 280.633 285.5 281.1C285.5 281.767 285.2 282.033 284.6 281.9C283.7 281.7 283.7 281.5 283.7 281.1ZM280.7 280.1C280.7 279.6 281.6 279.4 281.9 279.4C282.167 279.4 282.267 279.667 282.2 280.2C282.067 280.867 281.867 281.167 281.6 281.1C281.133 281.033 280.867 280.7 280.8 280.1H280.7ZM282.2 276.4C282.2 276 282.4 275.833 282.8 275.9C283.4 276 283.3 276 283.3 276.5C283.3 276.967 283.133 277.233 282.8 277.3C282.333 277.3 282.133 276.967 282.2 276.3V276.4ZM276 280.4C276.067 279.8 276.433 279.467 277.1 279.4C277.9 279.4 278.367 279.633 278.5 280.1C278.5 280.7 277.7 281.6 277 281.6C276.3 281.6 276 280.9 276 280.4Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M278.2 279.5C278.2 279.5 277.4 279.6 277 280C276.6 280.467 276.533 280.8 276.8 281C277.066 281 277.233 280.833 277.3 280.5L278.2 279.5ZM281.9 278.7C281.9 278.7 281.2 279.2 281.1 279.7C281.1 280.3 281.166 280.567 281.3 280.5C281.5 280.3 281.6 279.967 281.6 279.5C281.5 279.3 281.9 278.7 281.9 278.7Z",fill:"#231F20"}),d.jsx("path",{d:"M282.5 279.5C282.5 279.5 282.1 279.5 281.7 279.8C281.3 280.2 281.167 280.433 281.3 280.5C281.567 280.5 281.767 280.4 281.9 280.2C281.9 280 282.5 279.5 282.5 279.5ZM283.3 275.1L282.8 275.6C282.467 275.933 282.4 276.233 282.6 276.5C282.8 276.5 283 276.333 283.2 276C283.4 275.533 283.467 275.233 283.4 275.1H283.3ZM286.2 276.9C286.2 276.9 285.5 277 285.2 277.4C284.933 277.733 284.933 277.933 285.2 278C285.467 278.067 285.633 277.933 285.7 277.6C285.7 277.3 286.2 276.9 286.2 276.9ZM285.7 280.3C285.7 280.3 285.6 280.8 285.1 281C284.767 281.4 284.533 281.467 284.4 281.2C284.267 280.867 284.367 280.667 284.7 280.6L285.7 280.3Z",fill:"#231F20"}),d.jsx("path",{d:"M290.3 278C290.3 278 290.6 279.6 289.3 280.3C287.9 281.1 284.1 283.8 280.5 283.5C276.9 283.1 272.8 281.1 272.8 281.1L272.3 281.4L273.2 281.8L276 282.9L279.1 283.9H281.1L282.8 283.8L286 282.7L288.7 281.3L290.1 280.3L290.4 279.8V278.2L290.3 278Z",fill:"#04534E"}),d.jsx("path",{d:"M219.9 257.8C219.9 257.8 220.7 258.5 220.7 259.1C220.567 259.7 220.367 259.933 220.1 259.8C219.9 259.8 219.9 259.1 219.9 258.8V257.8ZM226.1 263.5C226.1 263.5 225.8 264.5 225.4 264.6C224.934 264.6 224.7 264.433 224.7 264.1C224.8 263.9 225.2 264.1 225.4 263.9L226.1 263.5ZM212.7 264.3C212.7 264.3 213 264.9 213.5 265C214.1 265 214.334 264.833 214.2 264.5H213.6L212.7 264.3ZM215.1 269C215.1 269 215.6 269.6 216.2 269.6C216.424 269.64 216.656 269.603 216.856 269.494C217.056 269.385 217.213 269.21 217.3 269C217.3 268.9 216.5 268.9 216.3 269.1C216 269.3 215.1 269 215.1 269ZM219.3 272.6C219.3 272.6 220.3 272.4 220.6 272.1C220.867 271.7 220.934 271.367 220.8 271.1C220.6 270.7 220.4 271.4 220.3 271.7L219.3 272.6Z",fill:"#231F20"}),d.jsx("path",{d:"M226.1 269.7C226.1 269.7 226.8 264.8 222.9 261.4C219 258 216.4 258.8 215 260.1C213.7 261.3 212.5 265.5 216.7 269.1C220.9 272.7 226 271.6 226 271.6L226.1 269.7Z",fill:"#8CBEBF",stroke:"#04534E",strokeWidth:"0.4"}),d.jsx("path",{d:"M214 264.6C214 264.6 214 261.9 215.3 261.1C215.948 260.756 216.659 260.545 217.389 260.479C218.12 260.414 218.857 260.496 219.556 260.719C220.255 260.943 220.902 261.304 221.459 261.782C222.016 262.259 222.472 262.843 222.8 263.5C224.8 267.5 224.8 269.5 224.3 271.5H222.1L218.7 270.1L215.9 268L214 264.6Z",fill:"#0C8489"}),d.jsx("path",{d:"M225.6 270.4C225.6 270.4 224.9 271.2 223.5 271.1C222 271.1 215.5 269.3 213.8 263.4V264.7L213.9 265.1L214.4 266.3L215.8 268.3L217.5 269.8L219.7 271L221.3 271.4L223.3 271.8H224.5L225.5 270.4H225.6Z",fill:"#04534E"}),d.jsx("path",{d:"M222.1 268.7C222.1 268.3 222.333 268.133 222.8 268.2C223.2 268.2 223.6 268 223.6 268.5C223.6 269 223.3 269.8 222.9 269.8C222.4 269.8 222.1 269.2 222.1 268.8V268.7ZM222.4 265.6C222.4 265.2 222.666 264.967 223.2 264.9C224 264.8 223.9 265.2 223.9 265.6C223.9 265.933 223.666 266.133 223.2 266.2C222.533 266.2 222.266 266 222.4 265.6ZM219.4 269C219.4 268.667 219.7 268.5 220.3 268.5C220.766 268.5 221.033 268.667 221.1 269C221.2 269.5 220.3 269.7 219.8 269.7C219.3 269.7 219.4 269.3 219.4 269ZM219.1 265.3C219.1 264.967 219.333 264.867 219.8 265C220.266 265 220.566 265.2 220.7 265.6C220.9 266.2 220.2 266.7 219.7 266.7C219.4 266.7 219.1 265.8 219.1 265.3ZM216.4 266C216.4 265.6 216.6 265 217.1 265C217.6 265 218.1 265.6 218.1 266C218.1 266.4 217.8 266.633 217.2 266.7C216.3 266.8 216.3 266.3 216.3 266H216.4ZM216.9 262.7C216.9 262.367 217.133 262.233 217.6 262.3C218.266 262.3 218.6 262.5 218.6 262.9C218.466 263.433 218.1 263.767 217.5 263.9C216.9 263.9 216.9 263.1 216.9 262.7ZM219.9 262.4C219.9 262.133 220.166 262.033 220.7 262.1C221.366 262.167 221.633 262.4 221.5 262.8C221.5 263.2 220.9 263.6 220.5 263.6C220.1 263.6 219.9 262.8 219.9 262.4Z",fill:"#04534E"}),d.jsx("path",{d:"M216.9 262.6C216.9 262.267 217.1 262.1 217.5 262.1C218.033 262.033 218.266 262.2 218.2 262.6C218.2 263 217.966 263.233 217.5 263.3C217.033 263.367 216.833 263.133 216.9 262.6ZM216.3 265.8C216.3 265.333 216.5 265.067 216.9 265C217.3 264.933 217.533 265.1 217.6 265.5C217.6 266.1 217.366 266.367 216.9 266.3C216.5 266.367 216.3 266.2 216.3 265.8ZM219.8 262.4C219.8 262.133 220.033 262.033 220.5 262.1C220.9 262.033 221.133 262.167 221.2 262.5C221.133 262.833 220.9 263 220.5 263C220.1 263 219.9 262.8 219.9 262.4H219.8ZM219.2 265.5C219.2 265.967 219.433 266.233 219.9 266.3C220.366 266.233 220.633 265.967 220.7 265.5C220.8 264.8 220.2 264.7 219.9 264.7C219.433 264.767 219.2 265.033 219.2 265.5ZM222.5 265C222.566 265.467 222.833 265.733 223.3 265.8C223.966 265.8 224.233 265.533 224.1 265C224.033 264.6 223.766 264.367 223.3 264.3C222.6 264.2 222.5 264.7 222.5 265ZM219.3 269C219.3 268.6 219.533 268.367 220 268.3C220.466 268.233 220.7 268.433 220.7 268.9C220.566 269.3 220.233 269.567 219.7 269.7C219.433 269.633 219.3 269.4 219.3 269ZM222.2 268.5C222.2 268.167 222.433 268 222.9 268C223.5 267.933 223.733 268.1 223.6 268.5C223.466 269.1 223.2 269.367 222.8 269.3C222.4 269.233 222.166 268.967 222.1 268.5H222.2Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M223 263.6C223 263.6 223.4 264.1 223.5 264.6L223.4 265.5C223.2 265.5 223.033 265.267 222.9 264.8V263.5L223 263.6ZM220.4 260.9C220.4 260.9 220.7 261.3 220.7 261.7C220.7 262.1 220.7 262.5 220.4 262.5C220.266 262.433 220.2 262.2 220.2 261.8L220.4 260.9ZM217.4 261.3C217.4 261.3 217.7 261.7 217.7 262.1C217.7 262.5 217.7 262.9 217.5 262.9C217.3 262.9 217.3 262.5 217.3 262.2L217.4 261.3Z",fill:"#231F20"}),d.jsx("path",{d:"M216.4 261.8L217.1 262.2C217.5 262.533 217.634 262.767 217.5 262.9C217.234 263.033 217.067 262.967 217 262.7L216.4 261.8ZM218.7 264.9C218.7 264.9 219.2 264.9 219.6 265.2C219.934 265.533 220.034 265.8 219.9 266C219.7 266.067 219.434 265.933 219.1 265.6L218.7 264.9ZM215.9 264.9L216.7 265.1C216.967 265.367 217.034 265.6 216.9 265.8C216.767 265.8 216.6 265.7 216.4 265.5L215.9 264.9ZM222.6 266.9L222.7 267.9C222.767 268.5 222.734 268.833 222.6 268.9C222.4 269 222.3 268.3 222.3 267.9L222.6 266.9Z",fill:"#231F20"}),d.jsx("path",{d:"M221.8 268L222.5 268.3C222.7 268.567 222.7 268.733 222.5 268.8L222.2 268.4L221.8 268ZM218.8 268.1L219.6 268.3C219.8 268.633 219.866 268.967 219.8 269.3C219.666 269.367 219.5 269.233 219.3 268.9L218.8 268.1Z",fill:"#231F20"}),d.jsx("path",{d:"M217.7 259C217.7 259 215.1 259.6 214.7 261.3C214.1 263 214.1 264.9 214.1 264.9L213.7 262.7L214.3 261.4L215 260.1L216.2 259.4L217.2 259H217.7ZM225.9 269C225.9 269 226.1 268.4 225.4 266.4C224.6 264.3 223 261.6 223 261.6L224.2 263L225.2 264.6L225.7 266L226.1 267.3V268.6L225.9 269Z",fill:"#04534E"}),d.jsx("path",{d:"M228.5 265.7C228.5 265.7 229.5 266.3 229.5 266.7V267.2C229.1 267.133 228.834 266.967 228.7 266.7L228.5 265.7ZM224.7 276C224.7 276 225.1 275.2 225.7 275C226.367 274.667 226.734 274.6 226.8 274.8C227 275 226.5 275.5 226.1 275.6L224.7 276ZM231.1 278.5C231.1 278.5 231.8 278.2 232.1 277.7C232.5 277.3 232.634 277 232.5 276.8C232.234 276.733 231.9 276.9 231.5 277.3L231.1 278.5ZM230.4 277.9C230.4 277.9 230.6 277.1 230.9 276.8C231.1 276.533 231.334 276.433 231.6 276.5C231.8 276.7 231.8 276.933 231.6 277.2L230.4 277.9Z",fill:"#231F20"}),d.jsx("path",{d:"M241.2 273C241.2 273 237.2 267.2 230.9 266.9C225.9 266.6 224.4 271.1 224.6 272.4C224.7 273.8 226.6 276.7 233.3 277.1C240 277.5 241 274.1 241.3 273.8C241.5 273.7 241.2 273 241.2 273Z",fill:"#8CBEBF",stroke:"#04534E",strokeWidth:"0.4"}),d.jsx("path",{d:"M236.5 269C236.5 269 238.1 270.3 238.8 271.3C239.5 272.3 239.7 273 239.3 273.1C238.9 273.2 235.3 269.9 232.3 269.2C229.3 268.5 226.8 269.2 226.2 270.6C225.6 272 225.8 274.1 227.2 275C228.6 275.9 234.9 277 234.9 277L237.9 276.5L239.7 275.5L240.1 274.5L240.5 273.1L240.7 272.6L239.2 270.9L236.5 269Z",fill:"#0C8489"}),d.jsx("path",{d:"M231.4 269.8C231.333 270.2 231.067 270.4 230.6 270.4C230 270.4 229.767 270.2 229.9 269.8C229.9 269.4 230.133 269.167 230.6 269.1C231.067 269.033 231.333 269.267 231.4 269.8ZM227.7 271.1C227.7 270.833 228 270.733 228.6 270.8C229.5 270.9 229.3 271.1 229.3 271.4C229.3 271.8 228.6 272.4 228.3 272.2C227.833 271.867 227.633 271.533 227.7 271.2V271.1ZM231.7 273.3C231.7 272.767 231.967 272.467 232.5 272.4C233.233 272.4 233.567 272.7 233.5 273.3C233.3 274.1 232.9 274.433 232.3 274.3C231.4 274.1 231.6 273.8 231.6 273.3H231.7Z",fill:"#04534E"}),d.jsx("path",{d:"M228.7 274.2C228.767 273.8 229.034 273.633 229.5 273.7C229.9 273.767 230.167 274.033 230.3 274.5C230.5 275.2 229.8 275.2 229.5 275.2C229.034 275.067 228.767 274.733 228.7 274.2Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M234 275.6C234 275.267 234.167 275.067 234.5 275C234.967 275 235.233 275.167 235.3 275.5C235.3 275.967 235.067 276.2 234.6 276.2L234 275.6ZM236.4 273.8C236.4 273.467 236.6 273.333 237 273.4C237.533 273.4 237.833 273.633 237.9 274.1C237.833 274.5 237.5 274.7 236.9 274.7C236.5 274.633 236.333 274.3 236.4 273.7V273.8Z",fill:"#04534E"}),d.jsx("path",{d:"M231.1 269.5C231.1 269.833 230.967 270 230.7 270C230.234 270 229.967 269.833 229.9 269.5C229.9 269.167 230.067 269 230.4 269C230.867 269 231.1 269.167 231.1 269.5ZM229.2 271C229.134 271.4 228.834 271.6 228.3 271.6C227.5 271.6 227.8 271.4 227.8 271C227.8 270.733 228 270.6 228.4 270.6C228.8 270.533 229.067 270.667 229.2 271ZM230.1 274.1C230.1 274.433 229.934 274.633 229.6 274.7C229.067 274.7 228.767 274.5 228.7 274.1C228.6 273.5 228.9 273.6 229.2 273.6C229.734 273.6 230.034 273.767 230.1 274.1ZM233.2 273.1C233.067 273.5 232.734 273.733 232.2 273.8C231.4 273.9 231.7 273.2 231.7 272.8C231.7 272.467 231.934 272.267 232.4 272.2C232.8 272.267 233.067 272.567 233.2 273.1ZM237.9 274.1C237.767 274.367 237.434 274.467 236.9 274.4C236.634 274.333 236.467 274.067 236.4 273.6C236.4 273.3 236.4 273 237.3 273.1C237.634 273.233 237.834 273.567 237.9 274.1ZM235.1 275.4C235.1 275.8 234.9 276.033 234.5 276.1L233.9 275.5C233.9 275.1 234.1 274.933 234.5 275C234.9 275.067 235.1 275.233 235.1 275.5V275.4Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M235.6 273.5C235.6 273.5 236.2 273.3 236.6 273.4C237.066 273.4 237.266 273.5 237.2 273.7L236.6 273.9L235.6 273.5ZM232.9 275.8L233.8 275.4C234.266 275.4 234.466 275.5 234.4 275.7C234.4 275.967 234.233 276.067 233.9 276L232.9 275.8ZM231.1 271.8C231.1 271.8 232.2 272.3 232.5 272.8C232.766 273.133 232.766 273.333 232.5 273.4C232.3 273.533 232.1 273.433 231.9 273.1L231.1 271.8Z",fill:"#231F20"}),d.jsx("path",{d:"M230.8 273.3L232.1 273C232.5 273 232.666 273.067 232.6 273.2C232.533 273.333 232.4 273.433 232.2 273.5L230.8 273.2V273.3ZM228.1 273.3C228.1 273.3 229.1 273.4 229.3 273.7C229.5 273.9 229.533 274.1 229.4 274.3C229.2 274.367 228.966 274.333 228.7 274.2C228.3 274 228.1 273.3 228.1 273.3Z",fill:"#231F20"}),d.jsx("path",{d:"M228 274.6C228 274.6 228.3 274.1 228.7 274H229.5C229.5 274.333 229.3 274.533 228.9 274.6H228ZM227.3 270.6L228.2 270.8C228.534 271.067 228.634 271.267 228.5 271.4H227.8C227.4 271 227.2 270.733 227.2 270.6H227.3ZM229.3 268.2C229.3 268.2 230.3 268.5 230.5 268.9C230.767 269.3 230.834 269.567 230.7 269.7L229.9 269.3L229.3 268.2Z",fill:"#231F20"}),d.jsx("path",{d:"M240 275C240 275 238.1 276.6 233.8 276.5C229.5 276.4 225.5 274.5 224.6 272.5L225 273.5L226 274.7L229 276.3L232.4 277L235.1 277.2L237.6 276.8L239.6 275.8L239.9 275.3L240.1 275H240ZM240.6 273L238.9 271L233.9 267.6L237.1 269L239.2 270.8L240.7 272.4L240.6 273Z",fill:"#04534E"}),d.jsx("path",{d:"M240.8 269C240.8 269 241.9 269.5 242.1 269.8L242.5 270.3C242.5 270.3 242.2 271 242 270.7L241.4 270L240.8 269ZM244.1 267.3C244.1 267.3 245.1 267.8 245.4 268.3C245.733 268.833 245.8 269.167 245.6 269.3C245.4 269.3 244.7 268.7 244.6 268.5L244.1 267.3Z",fill:"#231F20"}),d.jsx("path",{d:"M245 267.1C245 267.1 246 267.8 246.2 268.1C246.534 268.5 246.6 268.833 246.4 269.1C246 268.967 245.667 268.7 245.4 268.3L245 267.1ZM250.6 268.4C250.6 268.4 251.3 268.7 251.4 269.4V270.4L250.8 269.8V269.3L250.6 268.4ZM252 268.9C252 268.9 252.6 269.5 252.7 269.9C252.767 270.3 252.7 270.533 252.5 270.6C252.167 270.6 252 270.4 252 270V269V268.9ZM242.2 280.9C242.2 280.9 242.7 281.1 243.1 280.9C243.634 280.7 243.867 280.433 243.8 280.1C243.8 279.767 243.6 279.733 243.2 280L242.8 280.6L242.2 280.9ZM247.6 282.4C247.6 282.4 248.3 282.3 248.8 281.7C249.334 281.167 249.467 280.833 249.2 280.7C248.8 280.567 248.5 280.7 248.3 281.1L247.6 282.4ZM252 282.5L253 281.8C253.467 281.467 253.6 281.133 253.4 280.8C253.134 280.667 252.9 280.7 252.7 280.9L252.6 281.5L252 282.5Z",fill:"#231F20"}),d.jsx("path",{d:"M253.4 282.5C253.4 282.5 254 281.8 254.1 281.4C254.234 280.867 254.234 280.6 254.1 280.6C253.767 280.667 253.534 280.867 253.4 281.2V282.5Z",fill:"#231F20"}),d.jsx("path",{d:"M239.9 275.3C239.9 273.3 242.7 268.8 245.9 268.9C247.2 268.9 249.9 269.6 251.9 270.6C253.7 271.4 254.3 272.2 255.4 272.6C256.6 272.8 258.4 272.6 258.4 272.6L262.4 272.1L259.2 276.7L258.2 277.7C258.2 277.7 257.2 279.7 254.2 280.7C251.5 281.8 246.7 281 244.5 280.5C242.3 280 239.8 277.9 239.9 275.3Z",fill:"#8CBEBF",stroke:"#04534E",strokeWidth:"0.4"}),d.jsx("path",{d:"M239.9 275.3H240.1C240.1 274.9 240.267 274.333 240.6 273.6C241.11 272.479 241.822 271.462 242.7 270.6C243.7 269.667 244.734 269.167 245.8 269.1C247.861 269.371 249.878 269.909 251.8 270.7L253.8 271.9C254.72 272.592 255.85 272.945 257 272.9L258.4 272.8L261.9 272.4L259.1 276.6L257.9 277.6C257.055 279.002 255.746 280.063 254.2 280.6C253.2 280.933 252.034 281.1 250.7 281.1C248.4 281.1 245.9 280.6 244.6 280.3C243.474 279.992 242.443 279.408 241.6 278.6C240.727 277.751 240.194 276.614 240.1 275.4V275.3H239.7C239.709 275.977 239.856 276.645 240.131 277.264C240.406 277.883 240.804 278.439 241.3 278.9C242.188 279.774 243.292 280.395 244.5 280.7C245.9 281 248.3 281.5 250.7 281.5C251.959 281.513 253.21 281.31 254.4 280.9C257.3 279.8 258.3 277.9 258.3 277.8L258.1 277.7L258.2 277.9L259.4 276.9L262.8 271.9L258.3 272.4H257L255.5 272.3C254.967 272.167 254.467 271.933 254 271.6C253.6 271.2 252.934 270.8 252 270.4L248.7 269.2C247.567 268.867 246.634 268.7 245.9 268.7C244.967 268.7 244.134 268.967 243.4 269.5C242.343 270.236 241.456 271.191 240.8 272.3C240.207 273.202 239.831 274.228 239.7 275.3H239.9Z",fill:"#04534E"}),d.jsx("path",{d:"M259.2 275.9C258.867 276.167 258.5 276.267 258.1 276.2C257.6 276.2 248.8 270.8 246.1 271C243.3 271.2 240.7 272.4 240.6 275.2C240.5 278 241.2 278.1 241.8 278.9C242.4 279.7 247.8 280.9 247.8 280.9H251L253.7 280.5L256 279.2L257.3 278.2L258.2 277.2L259.2 275.9Z",fill:"#0C8489"}),d.jsx("path",{d:"M245.2 274.5C245.2 275.1 244.933 275.433 244.4 275.5C243.867 275.567 243.567 275.267 243.5 274.6C243.5 274.133 243.767 273.9 244.3 273.9C244.967 273.767 245.267 273.967 245.2 274.5ZM246.2 272C246.2 271.6 246.5 271.4 247.1 271.4C248 271.4 248 271.5 248 272C248 272.5 247.6 272.8 247 272.8C246.4 272.8 246.1 272.5 246.1 272H246.2ZM251.4 273.5C251.467 273.033 251.733 272.767 252.2 272.7C252.867 272.7 253.133 272.967 253 273.5C252.8 274.3 252.6 274.2 252.2 274.2C252.014 274.17 251.841 274.089 251.699 273.965C251.558 273.841 251.454 273.68 251.4 273.5ZM252.4 276.7C252.4 276.1 252.733 275.767 253.4 275.7C253.867 275.7 254.133 275.967 254.2 276.5C254.2 277.233 254 277.567 253.6 277.5C252.933 277.5 252.567 277.233 252.5 276.7H252.4ZM249.9 278.7C249.9 278.3 250.2 278.067 250.8 278C251.7 277.9 251.6 278.3 251.6 278.8C251.6 279.2 251.333 279.433 250.8 279.5C250.333 279.5 250.033 279.267 249.9 278.8V278.7ZM245 277.9C245.067 277.5 245.333 277.267 245.8 277.2C245.921 277.155 246.051 277.14 246.179 277.156C246.307 277.173 246.429 277.22 246.535 277.293C246.641 277.367 246.728 277.465 246.787 277.579C246.847 277.694 246.878 277.821 246.878 277.95C246.878 278.079 246.847 278.206 246.787 278.321C246.728 278.435 246.641 278.533 246.535 278.607C246.429 278.68 246.307 278.727 246.179 278.744C246.051 278.76 245.921 278.745 245.8 278.7C245.601 278.663 245.419 278.567 245.276 278.424C245.133 278.281 245.037 278.099 245 277.9Z",fill:"#04534E"}),d.jsx("path",{d:"M245.2 274.4C245.2 274.867 244.9 275.133 244.3 275.2C244.101 275.163 243.919 275.067 243.776 274.924C243.633 274.781 243.537 274.598 243.5 274.4C243.567 273.933 243.833 273.733 244.3 273.8C244.767 273.867 245.067 274.033 245.2 274.3V274.4ZM247.7 271.9C247.7 272.3 247.533 272.533 247.2 272.6C246.6 272.6 246.267 272.333 246.2 271.8C246.2 271.4 246.433 271.167 246.9 271.1C247.433 271.1 247.7 271.367 247.7 271.9ZM252.9 273.2C252.833 273.6 252.567 273.833 252.1 273.9C251.5 273.9 251.267 273.667 251.4 273.2C251.4 272.867 251.633 272.667 252.1 272.6C252.767 272.6 253.033 272.8 252.9 273.2Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M250.1 275.4C250.1 276.067 249.867 276.4 249.4 276.4C248.734 276.4 248.4 276.1 248.4 275.5C248.4 275.033 248.7 274.8 249.3 274.8C250.2 274.8 250.1 274.8 250.1 275.4Z",fill:"#04534E"}),d.jsx("path",{d:"M246.4 277.8C246.4 278.2 246.133 278.433 245.6 278.5C245.414 278.47 245.241 278.389 245.099 278.265C244.958 278.141 244.854 277.98 244.8 277.8C244.866 277.333 245.2 277.1 245.8 277.1C246.2 277.1 246.4 277.3 246.4 277.7V277.8ZM250 275.3C249.963 275.499 249.867 275.681 249.724 275.824C249.581 275.967 249.398 276.063 249.2 276.1C249.001 276.063 248.819 275.967 248.676 275.824C248.533 275.681 248.437 275.499 248.4 275.3C248.437 275.101 248.533 274.919 248.676 274.776C248.819 274.633 249.001 274.537 249.2 274.5C249.398 274.537 249.581 274.633 249.724 274.776C249.867 274.919 249.963 275.101 250 275.3ZM254.2 276.3C254.2 276.967 253.933 277.3 253.4 277.3C253.135 277.3 252.88 277.195 252.693 277.007C252.505 276.82 252.4 276.565 252.4 276.3C252.4 275.9 252.633 275.7 253.1 275.7C253.766 275.7 254.1 275.933 254.1 276.4L254.2 276.3ZM251.5 278.6C251.5 279 251.233 279.233 250.7 279.3C250.033 279.3 249.733 279.067 249.8 278.6C249.866 278.133 250.166 277.9 250.7 277.9C251.166 277.9 251.433 278.133 251.5 278.6Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M251.8 276C251.8 276 253.1 275.8 253.4 276C253.6 276.333 253.6 276.6 253.4 276.8L252.7 276.7L251.8 276ZM250.5 271.7C250.5 271.7 251.5 272 251.9 272.4C252.233 272.867 252.333 273.167 252.2 273.3C252.067 273.433 251.833 273.367 251.5 273.1L250.5 271.7ZM247.5 273.7C247.5 273.7 248.7 274.4 248.9 274.7C249.233 275.1 249.3 275.4 249.1 275.6C249.1 275.7 248.4 275.6 248.3 275.3L247.5 273.7Z",fill:"#231F20"}),d.jsx("path",{d:"M247 274.6C247 274.6 248.3 274.8 248.6 275.1C249 275.233 249.2 275.367 249.2 275.5C249.2 275.633 249.067 275.767 248.8 275.9L247.8 275.5C247.8 275.3 247 274.7 247 274.7V274.6ZM245.4 270.8C245.4 270.8 246.8 271 247.1 271.2C247.433 271.533 247.433 271.867 247.1 272.2C246.767 272.267 246.5 272.133 246.3 271.8C246.3 271.5 245.4 270.8 245.4 270.8ZM242.5 272.8C242.5 272.8 243.8 273.4 244.2 274C244.533 274.333 244.533 274.533 244.2 274.6C243.8 274.8 243.4 274.1 243.4 274L242.5 272.8Z",fill:"#231F20"}),d.jsx("path",{d:"M242.3 274.4L243.4 274.3C243.933 274.167 244.266 274.2 244.4 274.4C244.266 274.667 244 274.767 243.6 274.7L242.3 274.4ZM249.1 278.9C249.1 278.9 250.1 278.3 250.4 278.4C250.866 278.4 251.066 278.5 251 278.7C250.8 278.9 250.6 278.967 250.4 278.9H249.2H249.1ZM244.3 278.2C244.3 278.2 244.7 277.7 245 277.6L245.6 277.7C245.533 277.967 245.366 278.133 245.1 278.2H244.3Z",fill:"#231F20"}),d.jsx("path",{d:"M258 277.3C258 277.3 256.8 278.9 255 279.7C253 280.5 251.7 280.7 249.1 280.6C247.139 280.565 245.216 280.05 243.5 279.1C242.2 278.477 241.068 277.551 240.2 276.4C239.9 275.8 240.5 277.4 240.5 277.4L242 279.4L244 280.2L246.7 280.9L249.3 281.2H251.3L253.7 280.8L255.3 280.3L256.3 279.6L257.1 279L258 277.3ZM255.6 272.6C255.6 272.6 254.9 272.8 253.3 271.9C251.7 270.9 249.8 269.6 246.3 269.6C242.7 269.6 241.5 272 241.3 272.2L242.9 270.1L244.5 269.1L245.8 269H247L248.6 269.5L250 269.9L251.7 270.5L253.2 271.3L254.9 272.2L255.6 272.6ZM260.4 273.6H257.7C257.234 273.667 257 273.8 257 274L256.8 274.4L256.1 273L259 272.6L260.6 273.2L260.4 273.7V273.6Z",fill:"#04534E"}),d.jsx("path",{d:"M256.6 288.3C256.733 288.767 257 289.033 257.4 289.1H258.8L261.6 288.9L262.6 287.8L263.2 285.2L264 284.2L266.6 282.7L268.9 282.1L270.4 281.9L272.4 281.2L273.9 280.5L274.5 279.5L275.2 278L274.5 276L272.9 274L270.3 272.9H268L265.5 273.8L261.2 274.8C261.2 274.8 258.7 275.8 257.7 277.8C256.7 279.6 256.7 280.1 256.6 282.6C256.5 285.1 256.6 288.3 256.6 288.3Z",fill:"#0C8489",stroke:"#04534E",strokeWidth:"0.4"}),d.jsx("path",{d:"M257.7 287.4C258.6 287.4 257.9 286 258.9 284.4C259.9 282.8 260.9 280.7 261.3 280.7C261.5 280.833 261.733 280.9 262 280.9C262.3 280.8 263 280.2 263 280.1C262.866 279.767 263.1 279.2 263.7 278.4C264.4 277.8 265.5 277 265.9 276.9C266.366 276.767 266.633 276.767 266.7 276.9C266.8 277.1 266.5 277.4 266.8 277.6C267.266 277.667 267.7 277.5 268.1 277.1L268.2 276.4C268.1 276.4 268.7 275.9 269.7 276.1C270.7 276.3 270.7 276.3 270.8 276.6C270.9 277 270.4 277 270.5 277.3V277.7C270.6 277.9 270.8 278.5 271.5 278.5C272.1 278.367 272.366 278.233 272.3 278.1L272.5 277.8C272.5 277.8 272.7 277.4 272.5 277.2C272.233 276.933 272.233 276.867 272.5 277C272.8 277 273.7 278.4 274.1 277.9C274.366 277.167 274.433 276.633 274.3 276.3L272.7 274.1L270.3 273.2L267.1 273.5L263.9 275.3L261 276.8C261 276.8 260.9 279.2 260.4 278.8C259.8 278.3 259.1 277.2 258.9 277.5L257.9 280.5C257.6 281.4 256.7 284 256.9 285C256.9 286 257.4 287.4 257.7 287.4Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M260.6 283.6L260 283.9L259.8 284.7C259.9 285 260.4 285.3 260.4 285.3H260.8L261.5 285.1C261.5 285.1 261.8 284.8 261.8 284.4C261.8 284.067 261.7 283.9 261.5 283.9L260.6 283.6ZM265.6 279.5C265.133 279.433 264.9 279.5 264.9 279.7V280.2C264.9 280.2 264.9 280.8 265.2 280.9C265.5 281 266 281.2 266.2 281C266.4 280.867 266.533 280.633 266.6 280.3C266.6 279.9 266 279.7 266 279.7L265.6 279.5ZM269.6 280.5C269.533 280.3 269.3 280.2 268.9 280.2C268.5 280.2 268.333 280.5 268.4 281.1C268.6 281.567 268.933 281.7 269.4 281.5C269.8 281.5 269.7 280.9 269.7 280.8L269.6 280.4V280.5ZM258 281.2C258.067 281.6 258.4 281.833 259 281.9C259.234 281.905 259.462 281.827 259.645 281.681C259.828 281.535 259.953 281.329 260 281.1C260 280.8 259.7 281.4 259.3 281.5H258.4L258.1 281.2H258Z",fill:"#8CBEBF"}),d.jsx("path",{d:"M261.8 284.4C261.8 284.4 261.8 284.9 261.5 285.2L260.7 285.4C260.433 285.4 260.233 285.333 260.1 285.2L259.8 284.6C259.8 284.6 260.2 285.3 260.8 285.1C261.4 284.9 261.8 284.4 261.8 284.4ZM272.5 277.8C272.5 277.8 272.5 278.3 272.1 278.5C271.7 278.7 271.433 278.767 271.3 278.7C271.033 278.7 270.833 278.6 270.7 278.4C270.2 277.7 270.5 277.2 270.5 277.2C270.5 277.2 270.8 278.5 271.5 278.4C272.2 278.3 272.5 277.8 272.5 277.8ZM263 280C263 280 262.6 281 262 281C261.4 281 261.4 280.9 261.4 280.7H262C262.3 280.7 263 280.1 263 280.1V280ZM264.8 279.9C264.8 279.9 264.8 280.6 265 280.9C265.2 281.1 265.466 281.2 265.8 281.2C266.133 281.2 266.366 281.1 266.5 280.9V280.3L266.4 280.6L265.8 280.9C265.533 280.9 265.3 280.8 265.1 280.6L264.8 279.9ZM268.2 276.4C268.2 276.4 268.4 276.9 268 277.4C267.6 277.9 266.8 277.6 266.8 277.6C266.8 277.6 267.4 277.7 267.8 277.4C268.1 277 268.2 276.4 268.2 276.4Z",fill:"#04534E"}),d.jsx("path",{d:"M257.4 288.9C257.4 288.9 261.6 288.9 261.9 288.2C262.3 287.7 261.6 285.4 264.1 283.6C266.6 281.8 268.6 281.8 270 281.7C271.3 281.7 274.2 280.7 274.8 278.1C275.1 276.5 272.9 276.4 272.1 274.9C271.3 273.4 269.2 274 269.1 274C269.1 274 266.7 274 265.6 275C265 275.7 265.1 276.5 264.7 276.8C264.5 277.2 261.7 276.8 261.4 277.3C261.1 277.8 261.4 278.7 261.2 278.9C261 279.1 260.4 278.3 260.4 278.3L260.6 276L264.1 274L268.1 271.7H270.9L273.7 273.2L275.1 274.8C275.1 274.8 275.4 275.4 275.5 276.6L275.4 278.2C275.002 279.329 274.275 280.314 273.313 281.027C272.351 281.74 271.197 282.148 270 282.2C267.6 282.3 265.4 283.4 264.4 284.2C263.3 285 262.7 288.5 262.7 288.9C262.7 289.3 257.5 289.1 257.5 289.1L257.4 288.9Z",fill:"#04534E"}),d.jsx("path",{d:"M259.1 280.7C258.834 280.9 258.634 280.867 258.5 280.6C258.3 279.9 258.8 278.9 258.8 278.9V280.1L259.2 280.4L259.1 280.7ZM261.8 280.1C261.6 280.1 261.6 279.4 261.8 279.1L263.1 278L262.6 279.2C262.5 279.5 262.1 280.2 261.8 280.2V280.1ZM260.8 284.4C260.6 284.4 260.5 284.133 260.5 283.6C260.5 282.8 261.3 282.3 261.3 282.3L261.1 283.3V284C261.1 284.267 261 284.4 260.8 284.4Z",fill:"#231F20"}),d.jsx("path",{d:"M262.7 283.2L261.9 283.9C261.434 284.233 261.067 284.4 260.8 284.4C260.5 284.4 260.9 283.8 261.1 283.7L262.7 283.2ZM266.3 278.1L265.6 279.1C265.334 279.7 265.334 280.033 265.6 280.1C265.8 280.3 266.1 279.5 266.1 279.3L266.3 278.1Z",fill:"#231F20"}),d.jsx("path",{d:"M267.6 279.9C267.6 279.9 267.3 279.6 266.7 279.4C266.1 279.333 265.767 279.4 265.7 279.6C265.7 279.8 265.3 280 265.5 280.2L266.2 279.9L266.9 279.8H267.7L267.6 279.9ZM266.9 276.4C267.1 276.4 267.367 276.233 267.7 275.9L268.2 274.9L267.4 275.4C267 275.733 266.834 276.067 266.9 276.4ZM272.4 276.2L271.4 276.9C271.134 277.233 271.034 277.5 271.1 277.7C271.367 277.767 271.6 277.633 271.8 277.3L272.4 276.3V276.2ZM270.8 279.9C270.8 279.9 270.6 280.4 270.1 280.7C269.6 281 269.1 281.1 269.1 281C268.967 280.733 269.034 280.533 269.3 280.4L270 280.2L270.8 279.9Z",fill:"#231F20"}),d.jsx("path",{d:"M234.379 271.172C235.634 271.365 236.883 270.016 237.167 268.159C237.451 266.303 236.663 264.643 235.407 264.451C234.152 264.259 232.904 265.607 232.62 267.464C232.335 269.32 233.123 270.98 234.379 271.172Z",fill:"url(#paint0_radial_4989_137735)"}),d.jsx("path",{d:"M236.3 261.5L234.9 265L236 264.8L236.7 261.8L236.3 261.5Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M237 260C236.334 260 236 260.333 236 261C235.934 261.467 236.167 261.8 236.7 262C237.3 262 237.634 261.7 237.7 261.1C237.767 260.5 237.5 260.167 236.9 260.1L237 260ZM295.8 268.6L292.4 271.8L293.8 272.1L296.1 269.1L295.8 268.6Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M297.3 267.3C296.634 267.1 296.067 267.267 295.6 267.8C295.513 267.92 295.453 268.059 295.426 268.205C295.399 268.351 295.405 268.502 295.443 268.645C295.481 268.789 295.551 268.922 295.648 269.036C295.744 269.149 295.865 269.239 296 269.3C296.5 269.6 297.3 269.3 297.6 268.8C297.688 268.68 297.747 268.541 297.774 268.395C297.801 268.249 297.796 268.099 297.757 267.955C297.719 267.811 297.649 267.678 297.553 267.565C297.456 267.451 297.336 267.361 297.2 267.3H297.3ZM210.2 250.4L212 254.3L212.8 253.3L210.8 250.3L210.2 250.4Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M209.5 248.7C209.387 248.787 209.294 248.896 209.227 249.022C209.16 249.147 209.12 249.285 209.111 249.427C209.101 249.569 209.122 249.712 209.172 249.845C209.222 249.978 209.3 250.099 209.4 250.2C209.867 250.733 210.367 250.8 210.9 250.4C211.013 250.313 211.106 250.204 211.174 250.078C211.241 249.953 211.281 249.815 211.29 249.673C211.299 249.531 211.279 249.388 211.229 249.255C211.179 249.122 211.101 249.001 211 248.9C210.922 248.78 210.818 248.678 210.696 248.602C210.575 248.525 210.438 248.476 210.296 248.457C210.154 248.438 210.009 248.45 209.872 248.492C209.734 248.534 209.608 248.605 209.5 248.7Z",fill:"#FCCA3E",stroke:"#AA8C30",strokeWidth:"0.2"}),d.jsx("path",{d:"M237.3 260.2C236.9 260.2 236.1 260.5 236.1 261.1C236.167 261.633 236.434 261.9 236.9 261.9H236.3L236.1 261.5L235.9 261.1L236 260.6L236.3 260.2L236.7 260.1H237L237.3 260.2Z",fill:"#AA8C30"}),d.jsx("path",{d:"M236.5 262.5C236.5 262.5 236.3 262.5 236.1 262.8L235.5 263.6L236.2 261.7L236.7 261.9L236.5 262.5ZM297.5 267.6C297.2 267.3 296.1 267.4 295.8 268C295.6 268.667 295.767 269.1 296.3 269.3C296.8 269.5 296.1 269.3 296.1 269.3L295.6 268.9L295.5 268.5V267.9L295.9 267.5L296.5 267.2H297L297.3 267.4L297.6 267.6H297.5Z",fill:"#AA8C30"}),d.jsx("path",{d:"M295.5 269.8H294.9L293.7 270.5L295.6 268.8L296 269.3L295.5 269.8ZM209.9 248.5C209.6 248.8 209.3 249.7 209.7 250.1C209.881 250.255 210.112 250.34 210.35 250.34C210.589 250.34 210.819 250.255 211 250.1C211.4 249.8 211 250.3 211 250.3L210.4 250.6H210L209.5 250.4L209.2 249.9V249.3L209.3 248.8L209.6 248.6L209.9 248.5Z",fill:"#AA8C30"}),d.jsx("path",{d:"M211.2 251C211.2 251 211 251.2 211.1 251.6L211.3 252.8L210.3 250.6L210.8 250.4L211.2 251Z",fill:"#AA8C30"}),d.jsx("path",{d:"M212.036 258.936C212.967 260.755 214.718 261.72 215.947 261.091C217.176 260.462 217.418 258.477 216.487 256.658C215.556 254.839 213.805 253.874 212.576 254.503C211.347 255.132 211.105 257.117 212.036 258.936Z",fill:"url(#paint1_radial_4989_137735)"}),d.jsx("path",{d:"M210 257C210 257 210.8 257.2 211.2 257C211.6 256.667 211.8 256.433 211.8 256.3L212 255.6L211.2 254.4H210.4C210.4 254.2 210.334 254.033 210.2 253.9C210 253.9 208.9 255.2 209.1 255.4C209.3 255.6 209.4 255.3 209.5 255.4V256.4L210 257Z",fill:"#E92736"}),d.jsx("path",{d:"M211.2 254.5C211.2 254.7 211.7 255.3 211.9 255.3H212.8C212.9 255.3 213.5 254.8 213.5 254.5L213.4 253.9C213.3 253.7 213.4 253.1 213.1 253C212.967 253 212.867 252.933 212.8 252.8L212.6 252.3C212.5 252 210.6 253.1 210.8 253.3L211.2 253.5V254.5Z",fill:"#E92736"}),d.jsx("path",{d:"M215.4 254L215.3 252.6C215.033 252.6 214.833 252.5 214.7 252.3C214.833 252.233 214.933 252.1 215 251.9C215.1 251.6 213 252 213 252.2C213.2 252.5 213.5 252.3 213.5 252.5L213.1 253L213.3 253.9L213.5 254.3L214 254.4H215.1L215.4 254ZM232.9 264.3C232.9 264.3 233.2 264.9 233.6 265H234.3C234.5 265 234.7 264.9 234.9 264.7L235.2 263.6L234.7 263L234.9 262.6C234.9 262.4 233.3 262.6 233.3 262.8C233.3 263 233.5 262.9 233.5 263.1L232.9 263.6V264.3Z",fill:"#E92736"}),d.jsx("path",{d:"M235 263.6V264.6L235.5 265.1H236.4L236.7 264.6L237.1 264L237 263.6C237.133 263.533 237.233 263.4 237.3 263.2C237.4 262.9 235.6 262.4 235.6 262.6L235.7 263C235.7 263 235.1 263.4 235.1 263.6H235Z",fill:"#E92736"}),d.jsx("path",{d:"M237.8 266C238 265.9 238.6 265.3 238.6 265L238.5 264.6L238.9 264.5C238.9 264.4 237.6 263.2 237.6 263.5C237.5 263.7 237.8 263.8 237.6 263.9H237.2L236.7 264.6L236.6 264.9L236.7 265.3L237.4 266H237.8ZM290.7 270.4C290.7 270.4 290.7 271 291 271.4L291.6 271.7H292.2C292.4 271.7 292.9 271 292.9 270.8V270.1L293.1 269.9C293.2 269.7 291.8 269 291.7 269.3V269.6L291 269.8L290.7 270.4Z",fill:"#E92736"}),d.jsx("path",{d:"M292.7 270.8L292.2 271.4V272.1L293.1 272.5L293.5 272.3C293.834 272.3 294.067 272.2 294.2 272V271.7L294.7 271.5C294.8 271.4 293.7 270.2 293.6 270.3V270.6L292.7 270.8Z",fill:"#E92736"}),d.jsx("path",{d:"M293.2 273.8H294.2L294.5 273.4L294.8 273.5C295 273.5 294.8 272 294.7 272.1C294.567 272.167 294.5 272.267 294.5 272.4C294.3 272.4 294.167 272.3 294.1 272.1L293.4 272.2C293.2 272.2 293.067 272.267 293 272.4L292.9 272.7V273.6L293.2 273.8Z",fill:"#E92736"}),d.jsx("path",{d:"M211.3 255.3C211.5 255.5 211.3 256.1 211.1 256.3C211 256.5 210.1 256.3 210.1 256.1V255.4C210.233 255.2 210.466 255.033 210.8 254.9C211.066 254.967 211.233 255.1 211.3 255.3ZM211.6 254.1C211.533 254.433 211.6 254.633 211.8 254.7C211.8 254.9 212.5 255 212.8 254.9C212.8 254.9 213.2 253.8 213 253.6C212.866 253.467 212.666 253.433 212.4 253.5L211.6 254.1ZM213.8 253.1V253.7C213.8 253.7 214.3 254.1 214.6 254.1C214.8 254.1 214.9 253.3 214.9 253.1C214.9 252.9 214.9 253 214.7 252.9L213.8 253.1ZM234.7 264.1C234.7 264.4 234.1 264.6 233.9 264.6C233.7 264.6 233.4 263.9 233.5 263.8C233.5 263.667 233.633 263.567 233.9 263.5H234.6L234.7 264.1ZM235.5 263.6C235.366 263.667 235.3 263.833 235.3 264.1C235.3 264.2 235.5 264.7 235.7 264.8C235.9 264.9 236.7 264.4 236.7 264.2L236.4 263.8L235.5 263.6ZM237.5 264.4C237.3 264.467 237.166 264.6 237.1 264.8L237.3 265.5C237.633 265.5 237.9 265.4 238.1 265.2V264.9L237.5 264.4ZM292.3 271H291.5C291.3 271 291.3 270.1 291.5 270.1L291.9 270C292.1 270 292.266 270.133 292.4 270.4L292.3 271ZM293.1 271L292.6 271.2V272C292.7 272.1 293.6 272.2 293.6 272C293.8 272 293.7 271.6 293.7 271.6L293.1 271ZM294 272.6H293.5L293.2 273.2C293.2 273.4 293.7 273.5 293.8 273.5C293.933 273.5 294.033 273.433 294.1 273.3L294 272.6Z",fill:"#F7E204"}),d.jsx("path",{d:"M287.658 276.891C288.324 277.629 290.06 277.146 291.535 275.813C293.011 274.48 293.666 272.802 293 272.064C292.333 271.326 290.597 271.809 289.122 273.142C287.647 274.475 286.991 276.154 287.658 276.891Z",fill:"url(#paint2_radial_4989_137735)"}),d.jsx("path",{d:"M228.6 223.4C228.6 223.4 225.6 223.7 223.4 223.4C221.4 223 221.8 217.5 221.7 217.4C221.7 217.2 220.4 215.9 220.7 214.7C220.9 213.5 224.7 210.3 225.3 210.1C225.7 210 226.5 210.3 226.5 210.3C226.5 210.3 227.5 209.3 227.8 209.3C228.1 209.3 228.5 209.9 228.4 210.1C228.2 210.4 226.9 211.1 226.8 211.8C226.8 212.4 226.667 213 226.4 213.6C226 214.2 225.3 215 225.2 215.5C225 216.1 225 216.467 225.2 216.6C225.6 216.8 226.9 216.6 228 216.1L229.7 215.1C229.9 215.1 229.1 216.4 227.9 216.9C226.7 217.4 225.9 218 225.2 217.9C225.2 217.9 224.6 219.5 226.6 219.6C228.7 219.7 229.9 219.2 229.9 219.2L228.6 223.4ZM216.6 236.2C216.6 236.2 218.3 236.8 218.3 238.6C218.3 240.4 216.5 241.9 216.6 245.1C216.6 248.3 217.1 248.3 221.3 251.7C221.4 251.7 222.3 252.7 222.5 253.7C222.8 254.7 223.5 260.7 227.5 260.7C231.5 260.7 232.1 258.2 232.1 258.2L230.4 255.7C230.4 255.7 229 256.1 228.2 255.9C227.797 255.761 227.427 255.538 227.117 255.244C226.806 254.951 226.562 254.595 226.4 254.2C225.9 253.2 225.8 250.9 225.1 249.9C223.4 247.4 220.4 246.9 220.4 244.3C220.4 241.6 222.3 241.3 221.7 238.2C221.1 235.1 217.4 233.5 217.4 233.5L215.9 232.9L215.4 236L216.6 236.2Z",fill:"#A8AC71"}),d.jsx("path",{d:"M227.8 214.1C229.1 213.8 228.3 210.3 228.3 210.3L227.4 211C227.4 211 228 211.8 228 212.6C228 213.4 227.8 214.1 227.8 214.1Z",fill:"#F1A720"}),d.jsx("path",{d:"M230.2 249.2L229.5 248.6C229.1 248.3 226.9 246.6 227.3 241.6C227.7 235.8 236 232.8 236.5 230.5C237.2 227.9 239.1 226.8 232.4 221.6L230.8 223.5L233.6 225.5C233.6 225.5 234.2 225.2 234.2 226C234.2 226.7 233.5 227.4 233.2 228C233.2 228.5 229 231.4 228.7 231.7L226.3 233.7C226.3 233.7 225.2 234.7 224.2 236.9C223.2 239.1 223.7 241.9 223.7 241.9C223.7 241.9 223.7 248.1 230.2 249.2Z",fill:"#A8AC71"}),d.jsx("path",{d:"M226.2 252.4L226.6 254.6L225.3 255.1H224.7L224.3 255.2L223.3 256.2H223L222.8 255.5L222.7 254.4L223.9 254.9H224.4L224.7 254.8L225.2 253.6L226.2 252.4ZM222.2 252.8L221.7 252L220.9 251.3L221.9 250.8H222.9L222.7 252L222.2 252.8ZM224.5 249.3C224.5 249.3 225.1 249.6 225.3 250.1L225.8 251.1L224.2 251L223.1 250.6L223.8 249.6L224.5 249.3ZM223.9 258.9C223.9 258.9 223.6 258.7 223.4 258.2L223.1 256.9L224.1 256.7L225.3 257.2H225.6L225.3 257.8L224.2 258.8L223.9 258.9ZM227.9 255.6C227.9 255.6 227.1 255.3 226.9 254.9L226.7 254.5L226.4 255.7L226 256.9L226.1 257.1L227.1 256.8L227.7 256.1L227.9 255.6ZM224.2 259.4L225.2 260L226.2 260.4L226.8 259.9L227.2 258.9L227.3 258.8L224.8 259L224.2 259.4ZM227.7 258.4L229.8 257.2L229.9 256.1L229.5 255.8H228.3L228 257.2L227.7 258.5V258.4ZM226.2 260.4C226.2 260.4 227.7 261.1 230.2 260.2C231.267 259.6 231.734 259.267 231.6 259.2L230.6 258.8L229.6 259.6L226.2 260.4ZM224.2 244.2L223.9 243.2L223.8 242.2L224.5 242.6L225.6 243.4L224.9 244L224.2 244.2ZM226 247.2L225.3 246.4L224.8 245.4L225.6 245.6L226.5 246.1L226.1 247.2H226Z",fill:"#78732E"}),d.jsx("path",{d:"M221.3 213.7C221.1 214.2 220.9 215.1 221.6 215.3C222 215.3 223.6 215.3 225.3 213.3C226.1 212.3 226.1 211.3 226.1 211.3L226.5 210.3C226.5 210.3 225.8 209.8 224.7 210.5L221.3 213.7Z",fill:"#C6C7A6"}),d.jsx("path",{d:"M226 211.2C226.166 211.2 226.3 211.066 226.3 210.9C226.3 210.734 226.166 210.6 226 210.6C225.835 210.6 225.7 210.734 225.7 210.9C225.7 211.066 225.835 211.2 226 211.2Z",fill:"#1C242F"}),d.jsx("path",{d:"M223.8 211.2C223 211.8 222.4 212.5 222.4 212.5C222.4 212.5 223.5 212.2 224.4 211.4C225.026 210.918 225.817 210.703 226.6 210.8C226.734 210.733 226.734 210.6 226.6 210.4C226.3 210.2 225.5 210.1 225.3 210.2C225.3 210.2 224.5 210.6 223.8 211.2Z",fill:"#A8AC71"}),d.jsx("path",{d:"M227.3 243.6V241.8L226.6 242.4L225.9 243.4L226.9 243.7L227.3 243.6ZM223.7 241.6V239.7C223.7 238.8 224.1 237.2 224.1 237.2L224.5 238.3L225.8 240.3L226.2 240.6L225.2 241.3L224 241.7L223.7 241.6ZM227.3 241L227.5 240.2L227.9 239.2L226.8 240.2L226.3 240.6L226.9 241.1L227.3 241ZM224.3 236.3C224.3 236.3 224.5 235.7 225 235L226.1 233.5L226.6 235.5L226.9 237.1V237.4L226.4 237.6C226.3 237.6 225.1 237.6 224.9 237.3L224.3 236.3ZM228.1 238.5L228.8 237.8L229.6 237L227 237.5L227.4 238.3L228.1 238.5ZM226.6 233.2L227.5 232.4C228.2 231.7 228.5 231.8 228.5 231.8L228.8 234.6L227.5 234.2L226.6 233.2ZM229.8 237L231.4 235.4L228.8 234.6L229.3 236.4L229.8 237ZM230.9 232.8L231.1 230.1L229.9 230.9L228.9 231.7L229.2 232.1L230.2 232.7L230.9 232.8ZM233.2 230.2V228.2L232.3 229.1L231.7 229.7L232.4 230.1L233.2 230.2ZM234.2 233L235.4 232L236.6 230.7L233.3 230.4L233.4 231.8L234.2 233ZM226.4 222V223.5H229.1L228.4 222.5L227.6 222L226.8 221.2L226.4 222ZM231.8 235L233 234L234 233.2L231.3 232.9L231.4 234.7L231.8 235ZM236.8 230.2C236.8 230.2 237.1 229.2 237.1 228.2L236.9 226.7L234.9 228L235.2 229L236 229.9L236.8 230.2Z",fill:"#78732E"}),d.jsx("path",{d:"M233.4 227.8C233.4 227.8 234 227.1 234.1 226.7V226.4H235.7L236.6 226.5L236.7 226.6L236 227.4L235 228L233.8 228.1L233.4 227.8ZM236.6 226.3L235.6 224.6L235 223.8L234.2 226V226.3H236.6Z",fill:"#78732E"}),d.jsx("path",{d:"M217.3 241.8L217 242.4C217 242.4 218 241.8 218.9 241.9C219.8 242 220.6 242.9 220.6 242.9L220.8 242.2C220.8 242.2 219.7 241.2 219 241.1C218.3 241.1 217.3 241.8 217.3 241.8ZM217.8 237.1L218.1 237.4C218.1 237.5 218.1 236.7 219.2 236.2C220.2 235.8 220.9 236.2 220.9 236.2C220.9 236.2 220.7 235.5 220.2 235.4C219.666 235.267 219.166 235.4 218.7 235.8C218.1 236.2 217.8 237.1 217.8 237.1ZM221.4 240.6C221.4 240.6 220.9 239.6 220 239.3C219.2 239.1 218.1 239.8 218.1 239.8L217.9 240.3C217.9 240.3 219.1 239.7 219.9 240C220.8 240.4 221.2 241.4 221.2 241.4L221.4 240.6ZM217.4 236.6L217.7 236.9C217.7 236.9 217.5 235.9 218.1 235.2L219 234.4L218.5 234.2C218.5 234.2 217.8 234.7 217.5 235.2C217.3 235.8 217.266 236.233 217.4 236.5V236.6ZM216.9 234.6C217.2 234.1 217.9 233.9 217.9 233.9L217.6 233.7H217.3C217.3 233.7 216.9 233.9 216.6 234.5C216.3 235.1 216.3 236.1 216.3 236.1L216.8 236.3C216.8 236.3 216.7 235.3 216.9 234.7V234.6ZM223.2 219.4C223.933 219.133 224.333 219.033 224.4 219.1C224.5 219.2 223.4 220.1 223.9 221.4C223.3 222.4 223.1 223.3 223.1 223.3H223.7L224 221.8C224.363 222.474 224.876 223.056 225.5 223.5H226.3C226.3 223.5 226.3 222.5 226.8 221.5C227.223 222.029 227.773 222.442 228.4 222.7V222.4C228.4 222.4 227.5 221.9 227 221.2V221.1C227.6 220.1 228.4 219.8 228.4 219.8L229 220.2L229.1 220.1L228.7 219.5H228.2L226.8 220.9L226.2 219.6H225.8C225.8 219.6 225 219.6 224.2 220.9C224.1 219.9 225.2 218.9 225.2 218.9L225.1 218.6L223.1 219C222.4 219.3 221.9 220 221.9 220V220.6C221.9 220.6 222.6 219.8 223.2 219.4ZM224.4 221.1C224.9 220.4 225.9 219.9 225.9 219.9C225.9 219.9 225.9 220.5 226.6 221.2C226.2 222 226 223.1 226 223.1C226 223.1 225.1 222.5 224.4 221.5L224.3 221.2V221.1H224.4ZM218.4 238V238.6C218.4 238.6 219 237.9 219.9 237.9C220.8 237.9 221.7 238.6 221.7 238.6V237.7C221.5 237.7 220.7 237.2 220 237.2C219.2 237.2 218.3 238 218.3 238H218.4ZM235.4 229L235.1 228.2L235.5 228L236.9 226.7L236.6 226.3H235.3L234.2 226.2L234.6 224.8L235 223.7L234.6 223.3C234.6 223.3 234.7 223.7 233.9 223.8L231.7 223.1V223.5L233.7 224L234.7 223.8L234.2 224.8L234 225.6L234.2 225.7L234.1 226.4L235.2 226.5L236.6 226.6C236.6 226.6 235.9 227.4 235.2 227.7L234.9 227.8L234.1 226.6V227L234.6 228L233.4 227.8L233.1 228.1V230.1L231.7 229.7L231.4 229.9L231.1 230.1C231.1 230.1 230.8 231.3 230.8 232.7C229.6 232.4 228.9 231.7 228.9 231.7L228.6 231.9C228.6 231.9 228.4 233.1 228.7 234.5C227.948 234.263 227.263 233.852 226.7 233.3L226.3 233.7L226.7 237.2L226.8 237.5H226.2C225.2 237.5 224.4 236.4 224.4 236.4L224.1 237.2C224.1 237.2 224.5 239.4 225.7 240.4L226 240.6C225 241.4 223.7 241.6 223.7 241.6L223.8 242.2L225.5 243.5L224.2 244.2L224.4 244.6L225.8 243.6L227.3 244V243.6L226.1 243.4V243.3C226.6 242.9 227.3 241.8 227.3 241.8V241C227.3 241 226.9 241 226.4 240.6C227.9 239.6 227.9 239.1 227.9 239.1L228.2 238.6C228.2 238.6 227.7 238.4 227.3 237.6L229.7 237.1L229.9 236.9C229.9 236.9 229.3 236 229 234.9L231.4 235.4L231.8 235C231.8 235 231.5 234.1 231.4 233L233.9 233.3L234.2 233C234.2 233 233.4 231.5 233.4 230.7V230.6H236.6L236.8 230.2C236.8 230.2 235.8 229.5 235.4 229ZM227 241.4C227 241.4 226.7 242.2 226 243L225.7 243.2L225.3 243C224.566 242.4 224.233 242.067 224.3 242L226.3 240.7L227 241.4ZM227.7 238.9L226.2 240.4L225.9 240C225.2 239.1 224.3 238.4 224.4 237C224.4 237 224.9 238 226.1 237.9L226.9 237.7C227.3 238.5 227.566 238.9 227.7 238.9ZM229.3 236.9L227.3 237.4L227.1 237.1C226.7 235.8 226.7 233.9 226.7 233.9C226.7 233.9 227.6 234.5 228.7 234.8L229.3 236.9ZM229 234.5C228.8 233.4 229 232.2 229 232.2C229 232.2 229.7 232.8 230.9 233L231.1 234.7L229 234.5ZM233.6 232.7C233.6 232.7 232.9 233 231.4 232.8V230L233.2 230.5V230.6L233.6 232.7ZM233.6 230.2H233.4V228.1C233.4 228.1 234.2 228.3 234.8 228.2C234.8 228.467 234.933 228.8 235.2 229.2C235.5 229.8 236.1 230.2 236.1 230.2C236.1 230.2 234.2 230.4 233.5 230.2H233.6ZM227.6 245.2L227.4 244.7C227.4 244.7 226.7 245.2 226.4 245.8H226.2L224.6 245.1L224.8 245.4L226.3 246L226 247.2L226.2 247.5C226.2 247.5 226.2 246.7 226.6 246.1H227.6L227.4 246.8L227.1 248L227.4 248.2H229.1L228.8 247.9H227.3L227.6 246.9L227.8 246.3L227.6 245.7L226.7 245.8L227.5 245.1L227.6 245.2ZM218.5 244.1C219.161 244.129 219.793 244.375 220.3 244.8V244.3C220.3 244.3 219.5 243.3 218.6 243.3C217.6 243.3 216.6 244.2 216.6 244.2V245.2C216.6 245.2 217.5 244.1 218.5 244.1ZM229.1 259.6C228.1 260.1 226.9 260.1 226.9 260.1L227.6 258.8C229.6 258.3 230 256.9 230 256.9L229.9 256.4C229.9 256.4 229.4 257.7 227.7 258.4L228.3 255.8L227.8 255.6C227.8 255.6 227 256.6 226.2 256.9C226.539 256.212 226.742 255.465 226.8 254.7L226.6 254.3C226.6 254.3 226 254.8 225.2 254.9H224.7C225.2 254.3 226.1 252.4 226.1 252.4L226 252C226 252 225.3 253.7 224.6 254.5L224.3 254.8L222.6 254V254.3C222.6 254.3 223.3 254.8 224.1 255.1L223.1 256.1V256.9L225.5 257.2C225.083 257.866 224.539 258.444 223.9 258.9L224.2 259.4C224.2 259.4 225.3 259.4 227.2 258.9L226.2 260.4C226.1 260.4 228 260.5 229.2 259.9C230.4 259.3 230.8 258.7 230.8 258.7L230.4 258.3C230.4 258.3 230.2 259.2 229.1 259.6ZM223.6 256.3L224.6 255.2C225.8 255.5 226.2 255.1 226.2 255.1C226.2 255.1 226.4 255.8 225.7 256.9L223.6 256.3ZM224.7 258.8L225.7 257.5L226 257.2C227.2 257.2 227.9 256.2 227.9 256.2C227.9 256.2 228 257.2 227.5 258.4C225.9 259 224.7 258.8 224.7 258.8ZM223.2 250.9C224.4 251 225.8 251.5 225.8 251.5L225.7 250.9L223.4 250.5C223.8 249.6 224.6 249.2 224.6 249.2L224.2 249C224.2 249 223.8 249 223.2 250.2L223 250.4H222.7C221.7 250.4 220.8 251 220.8 251L221 251.3C221 251.3 221.9 250.9 222.8 250.9L222.2 252.9L222.4 253.4L223.2 250.9ZM220.8 246L220.6 245.4C220.6 245.4 219.3 245 218.4 245.4C217.5 245.8 216.8 246.9 216.8 246.9L217.2 247.7C217.2 247.7 217.8 246.5 218.7 246.2C219.6 245.9 220.8 246 220.8 246ZM223.2 247.9L222.4 247.5C222.4 247.5 221.1 247.8 220.6 248.3C220.1 248.8 219.7 250 219.9 250.3C220.1 250.7 220.266 250.9 220.4 250.9C220.6 250.9 220.6 249.6 221.3 249C222 248.4 223.2 247.9 223.2 247.9ZM220.2 247.5C220.6 247 221.6 246.8 221.6 246.8L221.1 246.3C221.1 246.3 219.9 246.5 219.3 247L217.9 248.7L218.6 249.4L220.1 247.5H220.2ZM224.2 211.7C224.9 210.9 225.5 210.9 225.7 210.9H226.3L225.6 212.9C225.4 213.7 225.1 213.9 224.8 214.4C224.333 215.067 224 215.833 223.8 216.7C223.8 217.5 223.966 217.933 224.3 218C224.566 217.867 224.733 217.7 224.8 217.5C224.8 217.2 224.6 217.5 224.4 217.5C224.2 217.5 224.4 217.2 224.2 216.7C224.2 216.2 224.8 214.9 225 214.5C225.4 214.1 225.7 213.567 225.9 212.9C225.9 212.2 226.4 210.9 226.4 210.9C226.4 210.767 226.066 210.7 225.4 210.7C225.098 210.727 224.806 210.821 224.546 210.977C224.286 211.133 224.065 211.346 223.9 211.6C223.5 212.1 222.5 212.5 222.5 212.5C222.5 212.5 223.6 212.5 224.2 211.7Z",fill:"white"}),d.jsx("path",{d:"M228.2 219.6H226.2L226.7 221.1L228.2 219.6ZM225.8 219.6L225.4 219.2L225.1 218.9L224.4 219.4L224 220.9L224.2 221.1L225.8 219.5V219.6ZM225.5 223.6L224.1 221.4L223.3 223.1L223.7 223.3L224.7 223.4L225.5 223.5V223.6ZM231.5 259.3H231.4C230.276 260.06 228.956 260.477 227.6 260.5C226.733 260.5 225.833 260.267 224.9 259.8C224.346 259.445 223.925 258.918 223.7 258.3C223.3 257.367 223.033 256.333 222.9 255.2C222.746 254.149 222.408 253.133 221.9 252.2C221.233 251.267 220.233 250.4 218.9 249.6C218.267 249.086 217.746 248.449 217.368 247.727C216.989 247.004 216.762 246.213 216.7 245.4V244.8C216.747 243.551 217.053 242.324 217.6 241.2C218.133 240.133 218.433 239.2 218.5 238.4V238C218.233 237.4 217.833 236.9 217.3 236.5L216.3 235.9L215.5 235.6V235.9L216.2 236.1L217.2 236.8C217.733 237.2 218.067 237.633 218.2 238.1V238.4C218.2 239.067 217.9 239.967 217.3 241.1C216.74 242.255 216.433 243.517 216.4 244.8C216.368 245.765 216.57 246.724 216.988 247.594C217.405 248.464 218.027 249.221 218.8 249.8C220 250.8 221.2 251.4 221.8 252.4C222.267 253.467 222.6 254.8 222.8 256.4L223.4 258.4C223.667 259.067 224.133 259.6 224.8 260C225.653 260.493 226.615 260.767 227.6 260.8C229.9 260.8 231.6 259.5 231.6 259.5L231.5 259.3Z",fill:"#78732E"}),d.jsx("path",{d:"M229.7 255.4L228.7 255.6C228.172 255.593 227.669 255.377 227.3 255C226.767 254.467 226.467 253.867 226.4 253.2C226.333 252.533 226.1 251.633 225.7 250.5C225.033 249.433 224.067 248.467 222.8 247.6C221.8 246.7 220.7 245.8 220.5 244.9V244.4C220.5 243.6 220.7 242.733 221.1 241.8C221.5 240.867 221.767 239.8 221.9 238.6V238C221.7 236.4 220.4 235.2 219.3 234.4L217 233.3V233.5H217.1C217.5 233.7 218.6 234.2 219.6 235C220.667 235.667 221.333 236.667 221.6 238V238.6C221.6 239.8 221.367 240.833 220.9 241.7C220.433 242.567 220.2 243.467 220.2 244.4V244.9C220.667 245.967 221.5 246.933 222.7 247.8C223.8 248.7 225 249.6 225.4 250.6C225.8 251.733 226.033 252.6 226.1 253.2C226.236 253.948 226.583 254.642 227.1 255.2C227.7 255.667 228.233 255.9 228.7 255.9L229.9 255.6L229.7 255.4Z",fill:"#78732E"}),d.jsx("path",{d:"M237 249.3C237 249.3 238.5 249.6 238.4 250.7C238.4 251.9 237.8 253.4 237.8 253.4L235.8 251.7L236.9 250.7L237.3 250.2L237.1 249.2L237 249.3Z",fill:"#A8AC71"}),d.jsx("path",{d:"M213.1 235.6C213.1 235.6 211.7 236.1 211.4 235.5C211.267 234.9 211.233 234.5 211.3 234.3C211.3 234.2 210.4 234.1 210.5 233.3C210.6 232.5 211.5 232.6 211.8 232.6C212 232.6 212.1 231.4 212.8 231.4C213.5 231.4 213.8 232.3 213.8 232.3L213.1 235.6Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M214.6 236C214.6 236 213.5 236.6 213.1 236C212.7 235.4 213.1 234.7 213 234.6C212.8 234.5 212.1 234.2 212.3 233.6C212.3 232.8 213.1 233.1 213.3 232.9C213.6 232.8 213.8 231.8 214.6 231.9C215.3 232.1 215.4 232.7 215.4 232.7L214.6 236Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M216.6 236.3C216.6 236.3 216.3 237 215.4 236.8C214.5 236.6 214.9 235.5 214.7 235.3C214.5 235.1 214 234.9 214.1 234.1C214.2 233.3 215 233.5 215.3 233.4C215.6 233.3 215.8 232.1 216.3 232.3C216.8 232.5 217.5 233.1 217.3 233.4C217.3 233.4 216.2 233.8 216 234.6C215.8 235.4 216.6 236.3 216.6 236.3Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M235 249L233.2 246.9L231.4 244.7L229.6 243.8L228.4 241.9V239.7L228.8 238.4L229.5 237.4C229.5 237.4 225.8 238.8 227.7 245.9C228.5 248.9 230.5 249.3 230.5 249.3L233.9 249.1L234.9 249H235Z",fill:"#AF7029"}),d.jsx("path",{d:"M233.3 225.4C233.633 225.4 233.833 225.467 233.9 225.6L234 226.2V226.4L234.1 226.5C232.8 229.2 230.2 230.5 227.9 232.1C226.705 232.925 225.685 233.979 224.9 235.2C223.912 236.86 223.425 238.77 223.5 240.7C223.6 244.7 225.1 247 226.8 248.1C228.051 248.917 229.506 249.367 231 249.4H231.3L232.5 249.3L234.9 249.1L236.3 249.2C236.7 249.2 236.933 249.3 237 249.5L237.2 249.9C237.2 250.233 237.033 250.567 236.7 250.9L236 251.4V251.7L236.9 251.1C237.233 250.767 237.4 250.367 237.4 249.9L237.2 249.4C237 249.2 236.7 249.067 236.3 249L234.9 248.9L231.3 249.1H231.1C230.4 249.1 228.6 249.1 227 247.9C225.4 246.9 223.9 244.7 223.8 240.7V240.4C223.8 238.267 224.2 236.6 225 235.4C226.2 233.4 228 232.4 229.8 231.1C231.6 229.8 233.3 228.7 234.2 226.6C235.1 224.5 234.2 226.4 234.2 226.2L234.1 225.5C233.966 225.3 233.7 225.167 233.3 225.1V225.4Z",fill:"#816C2A"}),d.jsx("path",{d:"M238.3 250.1C238.3 250.1 237.3 251.7 237.1 251.8C236.9 251.9 237.9 252 238.1 252.4L237.9 252.8C237.9 252.8 236.9 252.1 236.4 252.1L236.3 251.5C236.3 251.5 236.8 251.3 237.2 250.9C237.5 250.6 237.9 249.8 237.9 249.6L238.3 250.1Z",fill:"white"}),d.jsx("path",{d:"M241.7 251.2L239.5 251.8L238.4 251.1C238.4 251.1 238.4 250.2 238 249.8C237.534 249.467 237.1 249.233 236.7 249.1C236.3 248.9 234.7 248.9 234.7 248.9L230.7 244.6L232.2 244.8L234.6 244.5L236.7 244.3L237.9 244.5L239.1 244.8L239.7 245.4L240.4 246L241.1 247L241.5 248.3L241.7 249.6V251.2Z",fill:"#FCCA3D"}),d.jsx("path",{d:"M241.8 251C241.8 251 241 251.3 240 251.3C239 251.3 238.4 251.1 238.4 251.1L238.2 251.8L237.8 252.8V255.4L239.9 255.8L241 255.4L241.6 252.6L241.7 251.1L241.8 251Z",fill:"#AF7029"}),d.jsx("path",{d:"M241.2 250V251H241.7V250.2L241.2 250ZM239.2 226L239 224.3L238.3 223.1L237.4 221.9L236.5 220.9L236 220.4L235.8 220.1L233.5 220.2L232.3 221.6C232.3 221.6 235.3 223.8 236.6 226.2C237.666 226.6 238.4 227.067 238.8 227.6L238.9 227.4L239.2 226Z",fill:"#FCCA3D"}),d.jsx("path",{d:"M237 228C237 229.667 236.8 230.667 236.4 231L237.8 229.4L238.8 227.6C238.179 226.978 237.428 226.5 236.6 226.2C236.867 226.8 237 227.4 237 228Z",fill:"#AF7029"}),d.jsx("path",{d:"M240.2 254.3L239.1 253L238.1 252.3L237.9 252.5H238L239 253.2L240 254.5L240.2 254.3Z",fill:"#816C2A"}),d.jsx("path",{d:"M241.6 252.4C241.6 252.4 241.4 253.2 240.6 253.9C239.8 254.6 238.8 255 238.8 255L241 255.9L242.5 254.5L241.5 252.4H241.6Z",fill:"#6F5B24"}),d.jsx("path",{d:"M241.9 254.3L241.7 254.5L241.3 254.9L241 255.3L241.6 252.9L242 253.6V254L241.9 254.3Z",fill:"#404118"}),d.jsx("path",{d:"M228.6 223.4C228.6 223.4 225.6 223.7 223.4 223.4C221.4 223 221.8 217.5 221.7 217.4C221.7 217.2 220.4 215.9 220.7 214.7C220.9 213.5 224.7 210.3 225.3 210.1C225.7 210 226.5 210.3 226.5 210.3C226.5 210.3 227.5 209.3 227.8 209.3C228.1 209.3 228.5 209.9 228.4 210.1C228.2 210.4 226.9 211.1 226.8 211.8C226.8 212.4 226.667 213 226.4 213.6C226 214.2 225.3 215 225.2 215.5C225 216.1 225 216.467 225.2 216.6C225.6 216.8 226.9 216.6 228 216.1L229.7 215.1C229.9 215.1 229.1 216.4 227.9 216.9C226.7 217.4 225.9 218 225.2 217.9C225.2 217.9 224.6 219.5 226.6 219.6C228.7 219.7 229.9 219.2 229.9 219.2L228.6 223.4Z",stroke:"#78732E",strokeWidth:"0.2"}),d.jsx("path",{d:"M255 200.5C255 200.5 249.3 199.5 249.4 204.1C249.4 205.433 249.9 206.2 250.9 206.4C252.1 206.7 254.5 206.9 256.5 208.7C258.5 210.5 258.7 211.8 258.7 212.9C258.7 213.9 258.2 214.9 258.2 214.9L259.5 221.1L260.7 225.7L264.5 223.5L266.8 216.7L263.9 204.5L255 200.5Z",fill:"#AB6D29",stroke:"#4D2A15",strokeWidth:"0.3"}),d.jsx("path",{d:"M260.5 224C260.5 224 262.5 223.2 263 221.6C263 221.2 261 219.3 261 219.3L262.5 220.3C263.1 220.833 263.434 221.033 263.5 220.9C263.8 220.9 264.7 218.8 264.3 218.3C263.9 217.8 263.4 216.8 262.6 216.3C261.8 215.8 260.7 215.8 260.7 215.8C260.7 215.8 262.2 215.3 263 215.8C263.7 216.1 263.8 216.6 263.9 216.4C263.905 215.379 263.736 214.364 263.4 213.4C263.134 212.733 262.6 212.367 261.8 212.3C260.8 212.1 259.9 212.2 259.9 212.2C259.9 212.2 261.2 211.4 262.2 211.7C263.2 211.9 263.2 212.4 263.2 212.3L262.5 210C262.056 209.376 261.474 208.863 260.8 208.5L259.4 208.3H258.9C258.9 208.3 259.6 207.8 260.6 207.9C261.6 208 261.6 208.3 261.7 208.3C261.9 208.3 261.667 208.1 261 207.7L257.6 206.1H255.1C255.1 206.1 255.1 205.4 255.8 205.3C256.467 205.3 256.767 205.267 256.7 205.2C256.7 205 254.5 204.5 254.5 204.5H252.8L250.4 204.8L250.9 204.1C251.3 203.833 251.667 203.667 252 203.6C252.9 203.4 251.6 202.7 251.6 202.7L252.2 201.7L255.4 201.9L261.9 205.8L265 208.4L267 213.4L266.4 222L262 225.6L260 225.8L260.5 224Z",fill:"#4D2A15"}),d.jsx("path",{d:"M254.8 202.7C254.8 202.7 254.6 202.1 254.6 201.3V200.6C254.6 200.6 252.6 200.3 251.1 201.5C249.5 202.7 250.4 204.8 250.4 204.8C250.4 204.8 251.1 204.2 251.9 203.8C252.8 203.5 254.3 203.6 254.3 203.6C254.5 203.4 254 202.8 253.4 202.7L251.7 202.6C251.7 202.6 252.4 202.1 253.5 202.2C254.5 202.4 254.933 202.567 254.8 202.7Z",fill:"#D2A567"}),d.jsx("path",{d:"M261.3 224.7L259.9 225.2L260.8 231.2L266.5 240.9L269.5 240.4L270.5 238.6L271.2 238.9C271.6 239.3 272.7 241.2 273.6 241.6C274.6 241.9 275 241.8 275.9 242.5C276.8 243.2 279.8 247.7 279.9 247.8C280.1 248 279.7 245.9 279.7 245.9L278.8 243.2L277.7 241.3L277.5 240.8H279L280 241.4L281.5 242.7L282.3 243.6L282.7 244.6L282.9 245.4L283.3 246.7L284.1 248.4L285.1 250.1L285.4 249.5L284.9 247.5L283.4 242.6L282.4 241L284 242C284.4 242 285.5 243.8 285.5 243.8L286.2 245.5L286.7 247.1L287.1 248.5L287.6 250L288.5 249.5L288.3 248.4L287.5 245L287.2 241.4C287.2 241.4 287.6 241.4 288.2 242C288.8 242.6 289.2 243.9 289.2 243.9L289.5 247.1L290 250.1L291 253.1L292 255.1L292.7 256.1V254.6L291.5 241.8L291.6 241.3C291.6 241.3 291.8 241.2 292.2 241.8L293.1 243.3L293.4 245.3L293.6 246.7L293.9 249.3L294.2 252.1L295.5 255.1L296.2 256.8L296.6 254.8L296 241.2L296.3 240.8L297.3 241.8L297.9 242.6L298.4 245.6L298.7 254.3L299 256.5L301.6 233.9L303.1 233.6L303.3 233.1L302.2 232.3L299.6 228.3L297.9 224.4L294.9 218.8L289.6 212.4L285.5 209L284 208L284.2 207.1L285.1 205.7H284.3L282.5 206L280.7 205.4L277.2 203L273.5 201.2L271.3 200.4L266 199.1L260.7 198.4H258.4L256.2 198.7C256.2 198.7 255.2 199.2 254.8 199.9C254.466 200.367 254.366 201.067 254.5 202C254.5 202.867 255.233 203.567 256.7 204.1C258.2 204.7 261.7 207.1 261.7 207.1L263.3 208.7L263.9 209.5L264 210.1L265.2 219.1L262.9 223.9L261.3 224.7Z",fill:"#8F4620"}),d.jsx("path",{d:"M267 238.6C267 238.6 268 240.2 269.3 238.9C270.7 237.7 268.7 234.1 268.8 233.9C268.9 233.7 269.4 233.6 269.4 233.6L270.4 235.5C270.4 235.5 271 236.5 270.7 238C270.5 239.6 269 241 269 241L267.3 240.5L267 238.6Z",fill:"#AB6D29"}),d.jsx("path",{d:"M300.2 259.4L299 255.8L298.6 253L298.3 245.5C298.2 244.5 298.3 243.2 298.1 243L296.8 241.2L296.3 240.7L296.6 240.4C296.6 240.4 297.1 240.9 297.2 240.7C297.334 240.367 297.167 239.167 296.7 237.1C296 234 293.7 230.4 293.7 230.4L293.9 230.7L294.6 231.4L296.1 232.6L299.4 233.8L301.1 234.1L302.3 236.4C302.3 236.4 303.1 240.3 303 242.3C303 244.3 302.9 245.9 302.1 247.9C301.3 249.9 301.1 256.1 301.1 257.1L300.6 259.1L300.2 259.4Z",fill:"#4D2A15"}),d.jsx("path",{d:"M300.2 249C300.2 249 300.9 248.1 301.2 247C301.5 246 301.6 237.1 300.6 236C299.658 235.146 298.527 234.529 297.3 234.2L298.1 237.1L298.8 238.1L299.3 239.6C299.3 240.3 300 242.1 300.1 244.4L300.2 249Z",fill:"#8F4620"}),d.jsx("path",{d:"M295.4 254.4C295.4 254.4 295.9 250.3 295.7 247.3C295.5 244.3 295.2 243.9 294.9 243.3C294.062 241.707 293.392 240.031 292.9 238.3C292.234 235.633 291.7 233.967 291.3 233.3C290.8 232.8 289.9 231.7 289.7 232C289.5 232.3 289.5 232.9 289.5 232.9L288.2 232.6L287.9 231.8L288.3 230.5V229.9L288.1 229L289.7 230.3L293 232.5L294.7 239.5L296.2 243.7L296.4 250.9L296.3 257.3L295.4 254.4ZM297.4 234.7L298.7 235.7C299.2 236.1 300.2 236.7 300 236.7L298.4 236.1L297.4 235.4V234.7Z",fill:"#4D2A15"}),d.jsx("path",{d:"M291 252.8C291 252.8 291.6 251.4 291.5 249.5C291.4 247.6 290.5 243.2 290.2 242.7C289.9 242.2 288.6 241.3 287.5 238.7C286.3 236.3 286.4 235.7 285.6 234.9L284 232.9L284.3 230.2L287.1 231.7L288.4 232.3L289.8 239.3L291.1 241.3L291.7 244L292.4 250.5L292.7 255.7L292.5 256.2L291 252.8ZM287.6 249.8C287.6 249.8 287.6 247.8 287.2 246C286.733 244.067 286.233 242.8 285.7 242.2C284.479 240.972 283.374 239.633 282.4 238.2L279.3 234.2V231.5L281 232.7L282.8 233.7L283.6 236.7L284.6 238.8L286 240.8L287 241.6L287.5 244.8L287.8 246.6L288.6 249.2L288.3 250.5L287.6 249.8ZM285.2 249.8L284.4 249.1C284.4 249.1 284.9 248.6 284.7 247.6L283.7 244.6C283.1 243.1 283.1 243 282.8 242.7L279.3 239.5L276.3 236.9C275.433 236.433 274.967 236.233 274.9 236.3L274.5 233.1C274.5 233.1 275.5 234.5 276.2 234.7L277.8 235.3L280.1 239.3L280.9 240.3L282.9 242L283.8 243.7L284.4 245.7L285.2 248.4L285.4 250.1L285.2 249.8ZM280.8 249C280.8 249 279.5 247.5 279.2 246.5C279 245.5 279.4 245.5 279 244.4C278.313 242.943 277.283 241.674 276 240.7C274.9 239.7 273.3 238.4 273.4 237.7C273.467 237.033 273.567 236.767 273.7 236.9L274.4 237.5L277.9 241.3L279 243.3L279.9 245.8L280.4 246.9L280.9 248.4L280.8 249ZM293.6 230.4C293.6 230.4 296.1 233.4 296.7 230.6C297 229.4 295.9 227 295.9 227L292.9 222L288.2 216.2L285.4 214.9L286.4 216.5C286.4 216.5 288.4 218.5 291.1 223.2C293.8 227.8 293.2 230.2 293.2 230.2L293.6 230.4ZM279.4 212C279.4 212 284.3 216.2 287.4 220.7C290.5 225.2 291.8 228.2 291.1 228.7C290.4 229.4 288.4 228.4 287.6 227.2C286.8 225.9 286.1 223.7 283.2 220.3C280.3 216.9 278.8 216.4 278.8 216.4L276.6 213L279.4 212ZM276.8 222C276.8 222 279.8 224.4 281.5 226.3L284.3 229.7L285.4 230.8C285.4 230.8 284.8 229.6 285.2 229.2C285.6 228.8 286 229 286 229L276.8 219.3V222ZM276.2 222.2C276.2 222.2 277.2 224 278.7 225.5L281.9 228.6L282.6 231C282.6 231 278.4 227.8 278.4 228.6C278.581 229.455 278.92 230.269 279.4 231L278.1 230.3L276.3 227.8L275.3 225.5L274.1 222.5L276.2 222.2Z",fill:"#4D2A15"}),d.jsx("path",{d:"M263.6 232.2C263.6 232.2 265.8 234.2 267 232.2C268.2 230.3 267.2 228.2 267.2 228.2C267.2 228.2 270.3 232.7 271.2 228.4C271.3 227.6 269.3 224.7 269.3 224.7L270 224L271.6 226.6C271.6 226.6 273.1 226 273.1 224.2C273.1 222.4 271.5 220 271.5 220L273 221.6C273 221.6 275.8 221.6 275.9 219.9C275.9 218.2 273.5 216.4 273.5 216.4C273.5 216.4 275.5 216.5 275.5 215.4C275.4 214.2 272.8 213.4 272.7 212.7C272.6 212 273.5 210.8 274.7 211.5C275.9 212.2 277.5 212.7 278.2 211.4C278.9 210.1 278.2 209.8 278.2 209.8L276.5 209.4L273.7 208L271.6 207.2L269.4 206.9L270.2 208.6L270.8 213.1V215.2L271.2 219.8L270.2 223.6L269.5 224.3L269.1 224.8L268.1 226.8L266.9 228.3L265.2 230.5L263.6 232.2Z",fill:"#4D2A15"}),d.jsx("path",{d:"M279 240.7C279 240.7 278.5 239.4 277.3 238.4C276.1 237.4 274.3 237.4 274.3 237.4L277.5 240.8L279 240.7ZM283.5 241.5C283.5 241.5 282.5 239.5 281.3 238.2C280.1 236.9 279.3 235.2 278.9 235.2L278.4 235.3L278.7 237.9L280.9 240.1C280.9 240.1 282.9 241.6 283.5 241.5ZM287.2 241.3C287.2 241.3 286.7 238.9 285.5 236.6C284.3 234.3 282.9 233.3 282.9 233.3L283.2 235.8L284.2 238.2L285.9 240.6L287.2 241.3ZM290.2 240C290.2 240 291.1 235 290.3 233.7C289.793 232.888 289.013 232.285 288.1 232L287.6 232.7L288.1 236.3L289.2 239L290.2 240ZM293.2 231.7C293.2 231.7 293.9 232.1 294.8 233.7C295.7 235.3 296.9 240.4 296.9 240.7C296.9 241 296.4 240.8 296.3 240.7L293.3 236L292.7 231.7H293.2Z",fill:"#AB6D29"}),d.jsx("path",{d:"M272.3 237.5C272.3 237.5 273.9 237.1 273.9 236.5C273.9 235.9 271.9 234.9 272.1 234C272.2 233.6 273.7 234.1 273.8 233.8C274 233.5 272.3 230.8 272.8 230.2C273.3 229.6 274.8 233.1 274.8 233.1C274.8 233.1 275.6 234.7 275.3 235.6C274.3 238.6 272.3 237.5 272.3 237.5ZM276 233.9C276 233.7 278.5 234.2 278.5 234C278.6 233.5 276.3 231.7 276.3 231.7C276.3 231.7 275.8 230.7 276 230.6C276.1 230.4 277.6 230.7 277.7 230.6C277.7 230.3 276 228 276 227.6C276 227.2 276.5 227.6 276.5 227.6C276.5 227.6 277.8 229 278.5 230.1C279.3 231.3 280 232.2 279.7 234.1C279.5 236.1 275.7 234.5 276 233.9ZM287 230.3C287 230.3 286.5 228.6 286.8 228.4L287.6 228C287.6 228 286.3 227.2 285.7 227.2C285.167 227.067 284.9 227.067 284.9 227.2C284.7 227.5 285.9 229.2 285.9 229.2L287 230.3Z",fill:"#D2A567"}),d.jsx("path",{d:"M279.6 231.5C279.6 231.5 283.3 232.5 283.4 232.2C283.6 231.9 280.4 229 280.4 229V228.3C280.4 228.1 281.7 228.1 282.1 228.4C282.5 228.7 282.1 229.4 282.1 229.6C282.3 229.8 283.5 231.6 283.7 231.3C283.9 231 283.5 228.8 283.6 228.7C283.6 228.5 285 229.9 285.3 230.2C285.7 230.4 287.8 232 288 231.2C288.2 230.5 288.3 230.4 288.3 229.9C288.2 229.5 288.9 232 288 232.3C287 232.7 285.9 232 285.9 232L285 231.3L284.5 230.8C284.5 230.8 285.1 232.8 284.5 233C283.9 233.2 283 233.1 283 233.1L281.5 232.9L279.5 231.5H279.6ZM288.1 229C288.1 229 292.1 231.4 292.4 231C292.8 230.5 291.4 225 291.6 224.4C291.8 223.8 294.8 230.7 293.4 231.6C292.2 232.3 291.7 231.8 291.7 231.8L289.7 230.8L288.1 229ZM299.1 239L300 239.4L300.5 239.6L299.4 239.8L299.1 239ZM295.3 225.9L295.9 226.2L296.4 226.4L295.9 226.6L295.6 226.5L295.3 225.9ZM294.1 223.9C294.1 223.9 294.5 224.1 295.1 223.8C295.7 223.5 295.6 223.1 295.6 223L294.4 222.6L294.2 222.1H293L294.1 223.9ZM297.6 235.5L299.2 236.2C299.5 236.2 300.1 236.6 300 236.7C299.9 236.8 299 236.9 298.6 236.7L298 236.5L297.6 235.5ZM291.1 217.4H292.1C292.3 217.6 292.1 218.4 291.8 218.7L291 219.1L289.7 217.3L291.1 217.4ZM285.4 212.4L286.6 212.3C287.067 212.367 287.467 212.533 287.8 212.8C288.2 213 288.5 215.4 288.3 215.8C288.1 216.3 285.5 214.3 285.4 214.1C285.4 213.9 284.2 212.1 284.2 212.1L285.4 212.4ZM282.9 211.2C282.9 211.2 284.9 211.4 284.7 210.2C284.612 209.465 284.256 208.788 283.7 208.3L281.3 210L282.9 211.2ZM277.7 209C277.7 209 278.2 209.2 278.8 209C279.4 208.8 280.9 206.8 282 206.6C283 206.333 283.533 206.333 283.6 206.6C283.8 206.8 283.6 208 283.4 208.3C283.2 208.6 279.9 210 279.9 210L278.7 209.8L277.7 209.5V209ZM277.1 205.4C276.6 204.2 275.7 203.8 275.4 203.8C275.1 203.9 276.5 205.1 276.7 206.6L276.9 209.4H277.6V208.9L277.8 208.4V208L277.7 207.2L277.5 206.6L277.4 206.1L277.1 205.4ZM272.5 203.7C271.276 202.383 269.773 201.358 268.1 200.7C267.9 200.7 271.3 202.7 272.1 204.1C272.8 205.3 272.8 207.1 273.1 207.3C273.4 207.5 273.8 207.3 273.8 207.2C273.933 207.067 274 206.9 274 206.7L273.8 205.8L273.3 205L273 204.4L272.5 203.7ZM268.1 201.9C265.782 200.206 262.969 199.327 260.1 199.4C257.2 199.4 255.8 199.6 256.2 201.2C256.6 202.667 257.933 203.367 260.2 203.3C262.6 203.3 263.2 203.1 264.4 203.5C265.733 203.967 266.7 204.5 267.3 205.1C267.7 205.5 266.3 203.9 265.2 203.1L263.2 201.6C263.2 201.6 263 201.1 264.6 201.4C266.2 201.7 268.4 202.6 268.9 204C269.5 205.3 269.4 206 269.4 206.4C269.4 206.6 270 206.2 270 206.2L270.2 205.5C270.2 205.5 270.3 205 270 204.5C269.7 203.8 269.6 203.6 268.9 202.8L268.1 201.9ZM260.4 224.7C261.6 224.7 264.2 222.5 264.6 219.3C264.587 215.836 263.908 212.407 262.6 209.2C262.1 208.5 263.3 208.9 264 209.5C264.7 210.1 266 214.7 266 218C266 221.3 265.2 222.3 263.5 224C261.7 225.6 260.3 225.5 260.3 225.5L260.4 224.7ZM264.5 234C264.5 234 265.1 234.7 265.7 234.5C266.9 234 268.8 233.1 268.8 231.5C268.8 230.3 267.4 229.3 267.3 228.9V228.1L268.6 228.4L268.9 230.2C268.9 230.2 269.4 230.7 269.9 230.5C270.4 230.3 271.9 229.2 271.8 228.1C271.7 227 270.1 225.8 270 225.3V224.3L271.2 224.5L271.6 226C271.6 226 271.9 226.6 272.6 226.4C273.3 226.2 274.6 225 274.3 224.4L273 222.3V221.6L273.5 221.9C273.5 221.9 273.9 222.1 274.9 221.8C275.9 221.5 276.7 220.8 276.7 220.2C276.7 219.6 276 219 275.9 218.6V218.1L276.5 218.2L277.3 219.2L277.5 220.2L277.2 221.2L276.1 222.5L274.9 222.9H274.6L275.3 224.1L275.1 225.7L274.1 226.7L272.7 227.4V228.9L271.9 230.5L270.2 231.5H269.7L269.5 232.5L268.5 234L266.5 235.3L265.2 235.5L264.4 234.4L264.5 234Z",fill:"#D2A567"}),d.jsx("path",{d:"M274.7 217.1C274.7 217.1 277.8 218.1 277.7 216.1C277.7 214.9 274.7 212.4 274.5 212C274.366 211.4 274.333 211.067 274.4 211L275.9 212.4C275.9 212.4 277.9 212.9 278.5 211.7C279 210.6 278.5 209.9 278.5 209.8H278.9L279.9 209.9L279.7 211.7L278.7 216.1C278.7 216.1 279 217.8 277.7 218C276.3 218 274.7 217.1 274.7 217.1ZM277.7 240.7C277.7 240.7 277.7 239.8 277 239.2C276.3 238.6 275 238 274.8 237.8L277 240.6L277.7 240.7ZM282.2 240.8L280.2 238.3C280 237.6 279.2 236.2 278.5 236.1C277.9 236.1 279.1 238.5 279.1 238.5L281.6 240.8H282.2ZM286.5 240.8L284.8 237.5C284.5 236.8 283.8 234.8 283 234.2C282.2 233.6 283 235.2 283 235.2L284 237.8L285.4 240.1L286.4 240.8H286.5ZM289.6 239C289.6 239 289.5 236.8 289.2 235.3C288.997 234.264 288.472 233.319 287.7 232.6L287.8 235.3L289.6 239ZM296.1 240.6L294.6 236.8L292.9 233.5L293.2 235.8L294.6 239.6L296.1 240.6ZM301.7 233.8C301.7 233.8 300.7 232.8 298.6 231.9C297.218 231.391 295.769 231.087 294.3 231L294.5 231.3L295.5 232.1L297.7 233.3L300.7 234L301.7 233.8Z",fill:"#D2A567"}),d.jsx("path",{d:"M278.6 235C278.6 235 278.6 237 279.6 238.1L283.3 241.8C283.7 242.2 284.1 244.5 284.8 246.4L285.9 250.4C286.2 251 286.8 251.9 286.4 251.8C285.866 251.733 285.466 251.3 285.2 250.5C284.9 249.8 285 249.8 285.1 248.8C285.1 247.8 283.6 242.9 282.9 242.4C282.2 241.9 279 239.2 277.8 237.4C276.6 235.5 276.8 235.1 276.8 235.1L278.6 235Z",fill:"#202020"}),d.jsx("path",{d:"M283.7 247.5C283.1 246.033 282.767 244.867 282.7 244C281.779 242.639 280.588 241.482 279.2 240.6C278.7 240.4 277.7 240.7 277.2 240.4L274.3 237.2C274.3 237.2 274 237.6 274.1 237.7C274.2 237.8 276.8 240.7 277.8 241.5C278.8 242.5 279.3 244.5 280 246.1C280.6 247.7 280.4 247.3 280.4 248.1C280.6 248.9 280.934 249.3 281.4 249.3C282.067 249.3 282.234 249.2 281.9 249C281.147 248.194 280.568 247.241 280.2 246.2C279.6 244.8 279 242.2 278.2 241.3L277.9 241.1L278.9 241C279.6 241 282.3 243.4 282.5 244.1C282.7 244.8 282.5 245.1 283.5 247.5C284.7 249.9 285.2 250.5 285.2 250.5H285.4L283.7 247.5ZM279.6 231.5L282 232.9L283 233.1C283 233.1 283.3 236.6 284.7 238.6C286.1 240.6 287.3 241.3 287.3 241.3C287.3 241.3 287.3 245.1 288.3 247.7C289.114 249.695 289.456 251.851 289.3 254C289.1 254.5 288.3 252.5 287.7 250.7L286.2 245.7C285.791 244.374 285.11 243.148 284.2 242.1C283.5 241.6 284 241.7 284.4 242.1C285.323 243.1 286.007 244.297 286.4 245.6C287 247.6 287.3 249.6 287.6 249.6C288 249.6 288.2 249.367 288.2 248.9L287.5 245.6C287.1 243.6 286.767 242.367 286.5 241.9C286.2 241.3 285.7 241.3 284.5 239.1C283.633 237.805 282.959 236.39 282.5 234.9V233.9C282.2 233.7 282.1 233.9 281.1 233.4C280.1 232.9 279.6 231.5 279.6 231.5Z",fill:"#202020"}),d.jsx("path",{d:"M284.5 230.8C284.5 230.8 285.7 231.8 286.4 232C287 232.3 288 232.3 288 232.3C288 232.3 287.7 235.7 289 237.8C290.3 240 291.7 241.2 291.7 241.2C291.7 241.2 291.9 242 292.3 246.7L292.9 253.3C292.9 255.1 293 261.7 292.8 261.5C291.8 260.7 292.6 257.2 292.1 255.7C291.6 254.2 290.8 254 289.8 249.7C288.8 245.7 289.5 244.7 288.8 243.1C288.1 241.5 287.2 241.4 287.2 241.4C287.2 241.4 288.5 241.6 289 243C289.5 244.3 289.6 247.8 290 249.5C291 253.5 292.4 255.5 292.4 255.5C292.4 255.5 292.1 250.5 291.7 247.7C291.3 244.9 291.4 242.6 290.8 241.5C290.3 240.5 289.2 239.5 288.5 238.2C287.8 236.7 287.6 233.9 287.3 233.2C287 232.5 286.8 232.7 286.3 232.5C284.8 231.9 284.5 230.8 284.5 230.8Z",fill:"#202020"}),d.jsx("path",{d:"M288 229C288 229 289.1 230.2 290.6 231C292 231.9 292.8 231.6 293 231.8C293.2 232 292.7 234.9 294.2 237.6C295.7 240.4 296.2 240.4 296.3 240.8L296.8 251.8C297 254.6 297.2 263.8 296.1 263.8C295 263.8 296 257 295.4 255.4L294.4 253C293.9 251.7 293.8 246.8 293 243.8C292.3 241.6 291.7 241.2 291.7 241.2C291.7 241.2 292.7 241.8 293.3 243.7C293.8 245.5 293.9 251.7 294.5 252.6C295.233 253.733 295.767 254.733 296.1 255.6C296.3 256.6 296.1 244.1 295.7 243.3C295.5 242.5 293 238 292.7 235.5C292.6 233 292.5 232.7 292.3 232.5C292.1 232.3 291.3 232.5 290.1 231.4C288.9 230.3 288.1 229 288.1 229H288Z",fill:"#202020"}),d.jsx("path",{d:"M293.8 230.4C293.8 230.2 294.6 231.8 296.8 232.7C299 233.6 301.3 233.4 301.6 233.7C302.788 236.231 303.37 239.005 303.3 241.8C303.3 246.3 302.5 245.9 301.8 249.8C301.1 253.7 301.1 261.6 300.7 262.8C300.5 263.3 300.2 263.5 300 264.3C299.7 265 300.2 266.5 299.5 266.5C298.8 266.5 298.7 265.4 298.7 264.8C298.7 264.2 299.4 262 299.4 259.8C299.4 257.6 299 257.4 298.6 254.8C298.3 252.3 298.3 244.1 298 243.3C297.7 242.5 296.3 240.8 296.3 240.8C296.3 240.8 297.8 241.8 298.2 242.8C298.6 244 298.6 253.1 299 254.9C299.4 256.8 299.3 254.5 299.4 253.4C299.6 252.4 300.1 247.9 300.1 245.5C300 243.1 299 237.9 298.1 237.1L299.1 238.7L299.7 239.2L300.5 239.6L299.7 239.4L299.2 239.1C299.897 241.16 300.236 243.325 300.2 245.5C300.3 249.5 299.7 258.5 300.3 258.7C301 258.7 300.8 253.7 301.5 249.7C302.2 245.7 303.1 245.1 302.8 241.7C302.5 238.5 301.6 234.9 300.9 234.4C300.2 233.9 298.3 234.1 296.5 233C294.7 231.9 293.7 230.7 293.8 230.4ZM265.2 235C265.2 235 265.8 235.3 266.6 235C267.3 234.6 269.3 233 269.3 232.3V231C269.3 231 269.3 231.3 270 231.4C270.5 231.4 272.2 230.2 272.3 229.4V227C272 226.8 272.7 227.3 273.1 227C273.4 226.7 275 225.7 275 224.6C275 223.5 274 222.6 274 222.6H275.3C275.8 222.5 277.3 221.6 277.3 220.6C277.3 219.6 276.7 218.2 275.5 218.1C275.5 218.1 276.4 218.3 277.3 218.1C278.167 217.7 278.567 217.033 278.5 216.1C278.4 214.7 276.7 213.1 276.4 212.9C276.1 212.7 278.3 213.5 278.9 212.6C279.367 211.667 279.5 211 279.3 210.6C279.2 210.1 278.7 209.9 278.7 209.9C278.7 209.9 279.7 210.2 281 209.5C282.3 208.8 283.4 208 284 208C284.6 208 282.1 209.4 282 210.1C282 210.367 282.6 210.933 283.8 211.8L284 211.9C284.5 212.2 286.5 212.3 286.6 212.4C286.7 212.5 284.7 212.4 284.9 212.6C286.596 213.849 288.14 215.292 289.5 216.9C289.5 216.9 289.8 217.2 290.2 217.3L291.2 217.5H290L292.6 221.3C292.6 221.3 293 221.8 293.3 221.9L294.3 222.1C294.3 222.3 293.1 222.1 293.3 222.3L295.9 227.1C295.9 227.1 293.4 222.8 290.4 219.5C287.4 216.1 286.8 215.7 286.6 216C286.4 216.3 288.8 219.3 290.1 221.3C291.4 223.4 292.5 226 292.5 226C292.5 226 289.5 219.8 285.3 216C281.1 212.1 280.7 211.5 280.3 211.7C279.7 211.8 279.3 214.7 279.7 215.2C280 215.8 283 218.2 285.7 221.2C288.3 224.2 291.6 229.6 291.6 229.6C291.6 229.6 289.2 225.8 285.2 221.6C281.2 217.4 279.7 216.3 279.4 216.3C279.1 216.3 279 217.1 278.6 217.8C278.2 218.5 277.1 218.3 277.1 218.6C277.1 218.9 280.5 222 281.1 222.4C281.7 222.8 282.2 222.6 282.7 222.9L283.8 223.6L282.6 223.2C282 223 281.667 223 281.6 223.2C281.5 223.5 284.3 226.7 284.8 226.9L286.1 227.3C286.7 227.5 287.6 228.1 287.6 228.1L286 227.4C285.334 227.4 285 227.467 285 227.6C285 227.8 287.1 230.5 287 230.6C287 230.6 283.8 226.8 281.2 224.5C278.5 222.1 277.3 221.6 277.2 221.7C277.1 221.8 277.2 222.5 276.5 222.7C275.834 222.9 275.434 223.1 275.3 223.3C275.3 223.5 277.6 225.8 279.3 227.6L282.5 231.3L278.9 227.8C277.034 226.067 276.034 225.267 275.9 225.4C275.7 225.5 275.7 226.4 275.9 226.7C276 226.9 279.5 231 279.4 231.1C279.3 231.2 275.3 226.2 275 226.2C274.8 226.333 274.6 226.667 274.4 227.2C274.1 227.4 273 227.4 273 227.8C273 228.2 278.6 233.8 278.4 233.8C278.4 233.8 273.8 229.8 273.6 230.1C273.5 230.3 275.6 234.1 275.5 234.2C275.4 234.3 272.7 230.2 272.5 230.2C272.3 230.2 272.3 230.7 271.6 231.3C270.9 231.9 270.1 231.7 270.1 231.9C270.1 232.2 273.9 236.5 273.8 236.6C273.8 236.6 269.8 232.5 269.8 232.7C269.667 232.7 269.6 232.9 269.6 233.3C269.9 234.3 270.8 236.2 270.6 236.3C270.6 236.3 269.4 233.8 269.1 233.9C268.8 233.9 268.8 234.5 268.1 234.9C267.6 235.2 267.1 235.1 267.1 235.4C267.1 235.7 267.8 236.1 268.1 236.7C268.4 237.3 268.7 238.7 268.7 238.7C268.7 238.7 268.3 237.5 267.7 236.8C267.167 236.067 266.7 235.667 266.3 235.6C265.9 235.733 265.667 235.867 265.6 236L265.2 235Z",fill:"#202020"}),d.jsx("path",{d:"M301.6 233.7C301.6 233.7 302.8 233.6 303 233.3C303.2 233 302.5 233.3 301.4 232C300.2 230.8 297.4 222.3 294.1 218C288.9 211.1 284.1 208 284.1 208C284.1 208 289.8 211.3 294.3 217.9C298.9 224.5 300 229.8 301.3 231.1C302.6 232.5 303.8 232.7 303.7 233.1C303.7 233.5 303.467 233.767 303 233.9L301.3 234L301.5 233.7H301.6ZM263.2 231.8L263.4 231.9C263.7 231.9 265.3 230.4 265.2 229.9C265.067 229.9 264.634 229.633 263.9 229.1C263.3 228.5 263.2 227.6 263.2 227.6C263.2 227.6 263.7 228.6 264.2 228.9C264.734 229.233 265.2 229.333 265.6 229.2C265.8 228.9 268.1 227.2 268 226.6C267.867 226.667 267.4 226.5 266.6 226.1C265.4 225.5 265.8 224.5 265.8 224.5C265.8 224.5 266.2 225.4 266.9 225.7C267.7 225.967 268.234 225.967 268.5 225.7C268.7 225.4 270.2 223.3 270 222.7C269.867 222.767 269.4 222.633 268.6 222.3C267.9 221.8 267.5 220.6 267.5 220.6C267.5 220.6 268 221.6 268.9 221.8C269.834 221.867 270.4 221.533 270.6 220.8C270.8 220.2 271.3 217.8 270.6 217.2C270.6 217.2 269.4 217.6 268.6 217.2C267.8 216.8 267.5 215.7 267.5 215.7C267.5 215.7 268.1 216.7 269.1 216.7C270 216.9 270.4 216.4 270.5 216C270.7 215.7 270.7 214.3 270.5 213.6C270.3 212.9 269.6 212.9 269.5 211.8C269.567 211.933 269.067 212.067 268 212.2C266.4 212.4 266.2 210.9 266.2 210.9C266.2 210.9 267.2 211.8 268.1 211.7C269 211.6 269.3 210.9 269.4 210.3C269.267 209.7 269 209.1 268.6 208.5C268.4 207.9 268.3 207.2 268.2 207.3C268 207.3 267.8 207.9 266.6 207.7C265.4 207.5 265.1 206.7 265.1 206.7C265.1 206.7 266 207.3 266.6 207.3C267.334 207.3 267.734 207 267.8 206.4C267.8 206 267.5 205.1 266 203.8L263.2 201.6C263.2 201.6 265.2 202.7 266.5 203.8C267.8 204.8 268.5 205.9 268.5 205.9C268.5 205.9 269.9 206.4 270 205.9C270.267 205.5 270.167 204.833 269.7 203.9C269.3 203.2 268.1 201.9 268.1 201.9C268.1 201.9 269.3 202.9 269.9 204C270.5 205.1 270.3 205.9 270.3 206.1C270.3 206.3 273 207.4 273.6 207.1C274.067 206.633 274 205.967 273.4 205.1L272.4 203.7C272.4 203.7 273.1 204.4 273.6 205.2C274.134 206 274.334 206.567 274.2 206.9L273.7 207.6L275.5 208.6C276.4 209.1 277.4 209.6 277.5 209.3C277.7 209.033 277.767 208.433 277.7 207.5C277.6 206.7 277.1 205.4 277.1 205.4C277.1 205.4 277.7 206.6 277.8 207.5V209.5C278.1 209.7 278.8 209.8 278.8 209.8C278.8 209.8 278.2 210.2 277.1 209.8C275.9 209.5 270.9 207 270.7 207.2C270.5 207.5 273 209 274.2 210.2C275.4 211.2 275.9 212.4 275.9 212.4C275.9 212.4 275 211.6 274.1 211.1C273.2 210.6 270.6 209.3 270.4 209.5C270.3 209.7 271.4 209.9 271.5 210.1C271.6 210.3 270.7 211.1 270.7 211.5C270.7 211.9 274.5 214.5 274.4 214.7C274.2 215 273.4 215.7 273.2 215.7C273 215.7 271.2 214.2 271.2 214.4C271.2 214.7 272.2 215.6 272.2 215.8C272.2 216 271.6 216.4 271.7 216.8C271.8 217.2 273.8 218.9 273.7 219.5C273.7 220 272.7 220.5 272.9 220.9L274.1 222.5L272.6 221.4C272.3 221 271.6 220.2 271.5 220.3L270.7 222.3C270.7 222.7 271.7 223.2 271.8 224.1C271.9 225 271.7 226.1 271.6 226.1C271.6 226.1 270.3 224.4 270.1 224.4C269.767 224.333 269.5 224.5 269.3 224.9C269.1 225.3 268.3 226.6 268.5 226.9C268.5 227 269.8 227.3 269.8 228.3C269.8 229.3 269 230.2 268.9 230.2L267.3 228.2C267.1 228.2 265.5 230.1 265.5 230.2C265.5 230.5 266.5 231.3 266.4 231.6C266.2 232 265.4 231.6 264.9 231.8L263.6 232.3C263.4 232.3 263.2 231.8 263.2 231.8Z",fill:"#202020"}),d.jsx("path",{d:"M284 208C284 208 284.1 207.5 284.4 207.2C284.6 207 285.6 205.9 285.2 205.6C284.9 205.4 283.6 205.8 282.8 205.8C282 205.7 281.5 205.8 279.1 203.9C279.1 203.9 271.7 198.8 260.2 198.1C256.6 197.9 255 199.1 254.8 199.9C254.8 200 255.8 198.4 259.4 198.4C266.18 198.641 272.787 200.603 278.6 204.1C278.9 204.4 280.9 206.3 282.7 206.1C284.6 205.8 285 205.6 284.9 205.9L284.2 207.1L284 208ZM264 209.5C263.421 208.514 262.676 207.634 261.8 206.9C259.812 205.512 257.663 204.371 255.4 203.5C255.2 203.5 260.2 205.8 261.6 207.2L264 209.5Z",fill:"#202020"}),d.jsx("path",{d:"M264 217.8C264 217.8 263.6 217.3 262.6 216.6L260.6 215.7L263 216.3C263.6 216.9 264 217.8 264 217.8ZM263.3 213.5C263.3 213.5 263 213 261.6 212.5C260.334 212.167 259.767 212.067 259.9 212.2C260.1 212.4 261.2 211.6 262.2 212.2C262.487 212.31 262.744 212.485 262.952 212.71C263.16 212.935 263.313 213.206 263.4 213.5H263.3ZM262.5 209.9C262.5 209.9 262.2 209.3 261 208.9C259.667 208.433 258.967 208.233 258.9 208.3C258.8 208.4 260.2 208 261.4 208.5C262.7 209 262.5 209.9 262.5 209.9ZM261 207.7C261 207.7 260.7 207.2 258.3 206.7L255.1 206.1C255.2 206.2 258.4 205.8 259.3 206.1C260.2 206.5 261 207.7 261 207.7ZM256.7 205.2C256.7 205.2 255.3 204.8 253.9 204.7L250.4 204.8C250.4 204.8 254.4 204.2 255.4 204.4C256.4 204.8 256.834 205.067 256.7 205.2Z",fill:"#D2A567"}),d.jsx("path",{d:"M243.6 254.7C243.6 254.7 244.3 256 245.6 256C247.1 256 248.2 258 248.2 258L246.7 259.6L243 259.8L241.8 257.8L243.6 254.8V254.7ZM243.6 253.5C243.8 253.2 242.6 250.8 241.7 250.5C240.9 250 242 251.2 241.8 251.7C241.6 252.233 241.533 252.633 241.6 252.9C241.6 252.9 242.3 253.9 241.9 254.4C241.5 254.9 243.7 253.4 243.7 253.4L243.6 253.5Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M243 257.1C243 257.1 243.7 257.4 244.2 257.3C244.8 256.967 245.134 256.733 245.2 256.6M242.3 256.2C242.3 256.2 244.4 254.7 244.3 253.9C244.034 253.233 243.7 253 243.3 253.2L241.7 254.5L242.3 256.2Z",fill:"#F8C83C"}),d.jsx("path",{d:"M243 257.1C243 257.1 243.7 257.4 244.2 257.3C244.8 256.967 245.134 256.733 245.2 256.6M242.3 256.2C242.3 256.2 244.4 254.7 244.3 253.9C244.034 253.233 243.7 253 243.3 253.2L241.7 254.5L242.3 256.2Z",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M240.9 257.2C240.9 257.2 241.2 258.2 241.9 258.2C242.6 258.2 243.6 257.7 243.6 257.2C243.6 256.9 242.9 256.2 242.5 255.9C242 255.7 241 256.2 241 256.2L240.9 257.2Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M242.8 255.8C242.6 256.1 241.3 256.8 240.9 256.8C240.5 256.8 239.6 255.8 239.9 255.6L241.1 255.3C241.4 255.1 241.5 254.6 241.7 254.6C241.967 254.6 242.267 254.767 242.6 255.1C243.1 255.6 242.9 255.5 242.8 255.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M241.4 256.7C241.4 256.7 239.4 259.5 238.5 259.3C237.6 259.1 238.9 255.4 238.9 255.4L239.9 255.8C240.567 256 241.067 256.333 241.4 256.8V256.7Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M237.8 254.8C237.8 254.8 240.4 255.2 240.5 255.6C240.6 256 239.3 256.6 238.5 256.6C237.8 256.6 237.8 254.7 237.8 254.7V254.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M231.2 258.7C231.2 258.7 231.6 260 232.7 260.1C233.8 260.2 234.9 258.9 234.9 258.9L232.2 257.9L231.2 258.7Z",fill:"#202220"}),d.jsx("path",{d:"M231.2 258.7L231.5 259.4C231.767 259.8 232.167 260.033 232.7 260.1H232.8C233.9 260.1 235 258.9 235 258.9L232.2 257.7L231.2 258.7ZM231.2 258.7L232.2 257.9L234.9 258.9L234.7 259C234.4 259.4 233.6 260 232.8 260C232.2 260 231.8 259.767 231.6 259.3L231.4 258.9L231.3 258.8L231.2 258.7Z",fill:"#4B4139"}),d.jsx("path",{d:"M232 258.4C232 258.4 232.4 259.4 234 259.4C235.4 259.4 236.6 258.2 236.6 258.2L234.2 256.3L232 258.4Z",fill:"#202220"}),d.jsx("path",{d:"M232 258.4C232 258.4 232.4 259.4 234 259.4C234.985 259.334 235.912 258.907 236.6 258.2L234.2 256.2L231.9 258.4H232ZM232 258.4L234.2 256.4L236.6 258.2H236.5C235.822 258.849 234.937 259.238 234 259.3C233.713 259.337 233.422 259.312 233.145 259.226C232.869 259.139 232.615 258.994 232.4 258.8L232.1 258.5L232 258.4Z",fill:"#4B4139"}),d.jsx("path",{d:"M232.2 258.6C232.2 258.6 232.8 259.1 233.6 259.2L235.4 259L234.4 259.3H233.2L232.7 259.1L232.3 258.8L232.2 258.6Z",fill:"#4B4139"}),d.jsx("path",{d:"M234 257.3C234 257.3 234.6 258.9 236 258.7C237.3 258.6 237.4 257.7 237.4 257.7L235.8 255.5L234 257.3Z",fill:"#202220"}),d.jsx("path",{d:"M234 257.3L234.4 258.1C234.734 258.5 235.234 258.733 235.9 258.8H236.1C236.767 258.667 237.167 258.467 237.3 258.2L237.5 257.8L235.9 255.4L233.9 257.3H234ZM234 257.3L236 255.6L237.4 257.8C237.4 257.9 237.3 258.5 236.1 258.7H235.9C235.367 258.633 234.9 258.4 234.5 258L234.2 257.5V257.3H234Z",fill:"#4B4139"}),d.jsx("path",{d:"M234.1 257.6C234.1 257.6 235 258.6 235.7 258.6C236.433 258.533 236.833 258.433 236.9 258.3V258.4L236.5 258.6L235.9 258.7H235.2L234.6 258.3L234.1 257.6ZM231.5 259.2C231.5 259.2 232.1 259.9 232.7 259.9C233.3 259.9 234.2 259.4 234.2 259.4H234.3L234.2 259.5L233.6 259.9L232.8 260.1L232.2 260L231.8 259.7L231.5 259.4V259.2Z",fill:"#4B4139"}),d.jsx("path",{d:"M237.6 254.6C238.2 254.6 239.6 256.3 239.6 257.2C239.6 258.1 239.2 259.4 238.6 259.3C237.9 259.3 236.4 258 236.1 257.3C235.633 256.633 235.5 256.167 235.7 255.9C235.9 255.5 237.7 254.6 237.7 254.6H237.6ZM231.2 254.8C231.2 254.8 230.2 254 229.7 254.4C229.2 254.8 229.4 256.2 229.7 256.4C230 256.8 231.2 255.8 231.2 255.8V254.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M231 255.8C231 255.8 229.6 255.8 229.6 256.5C229.6 257.2 230.3 257.8 230.4 258C230.5 258.2 231.8 257.4 231.8 257.4L231 255.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M231.6 256.9C231.6 256.9 230.1 257.3 230.1 257.9C230.1 258.3 230.8 259.2 231.2 259.2C231.6 259.2 232 258.3 232.2 258.2C232.4 258 231.6 256.9 231.6 256.9ZM232.3 252.8C232.3 252.8 232 252.4 231.4 252.6C230.8 252.8 230.1 253.5 230.3 254.4C230.433 255.467 230.566 256 230.7 256L232.8 255.3L232.3 252.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M232.4 254.4C232.4 254.4 230.6 255 230.5 255.7C230.5 256.567 230.833 257.1 231.5 257.3C231.9 257.4 233.5 255.9 233.5 255.9L232.4 254.4Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M234 257.4C234 257.4 232.2 258.6 232 258.6C231.7 258.6 231 257.6 231.2 257C231.4 256.4 232.6 255.9 233.1 255.7C233.6 255.5 234.1 257.4 234.1 257.4H234ZM235.6 250.8C235.6 250.8 235 250.4 233.9 250.4C232.9 250.5 232 251.9 231.9 252.7C231.8 253.5 231.9 254.7 232.3 254.9C232.7 255.1 235 253.3 235 253.3L235.6 250.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M233.4 256.2C232.6 256.2 232 255.1 232.1 254.4C232.2 253.7 233.7 252.6 234.5 252.8C235.3 252.8 235.1 254.8 235.1 254.8C235.1 254.8 234.1 256.3 233.4 256.2Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M235.8 256C235.8 256 235.4 257 234.7 257.3C233.9 257.633 233.334 257.467 233 256.8C232.5 256.1 233.2 255.8 233.5 255.5C233.9 255.2 234.9 255 234.9 255L235.8 256Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M234.6 253.8C234.6 253.8 233.7 254.4 234.2 255.2C234.667 255.867 235.167 256.267 235.7 256.4C236.233 256.533 236.733 256.3 237.2 255.7C237.9 254.8 238.4 254.8 238.3 254.1C238.3 253.367 238.033 252.867 237.5 252.6C237.1 252.4 235.8 252.6 234.5 253.7L234.6 253.8Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M237 250.4C237 250.4 236.1 250 235.4 250.4C234.733 250.867 234.366 251.533 234.3 252.4L234.4 254.1C234.4 254.1 235.4 253.9 235.9 253.4C236.4 252.9 236.7 252.7 236.6 252.4C236.466 252.4 236.366 252.1 236.3 251.5C236.3 250.5 237 250.4 237 250.4Z",fill:"#202220"}),d.jsx("path",{d:"M237 250.4C237 250.4 236 250.2 235.5 250.5C234.966 250.833 234.6 251.333 234.4 252C234.333 252.667 234.333 252.933 234.4 252.8C234.5 252.6 234.2 252.3 234.4 251.7C234.666 251.033 235.066 250.567 235.6 250.3L237 250.4Z",fill:"#4B4139"}),d.jsx("path",{d:"M263 269.6L264.3 269L265.9 268L266.2 269.8L264.8 270.8H263.6L262.9 270.3L263.1 269.6H263Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M261.1 269.7H262L263 269.6C263.2 269.6 263.5 270.6 263.5 270.6L263.1 271.1L261.9 271.8L260.9 271.2L260.8 269.8L261.1 269.7ZM270.8 269.2L270.1 268.3L268.4 266.8V270.8H270.2L271 269.5L270.8 269.2Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M261.1 269.7C261.1 269.7 260.8 269.3 260.1 269.4C259.167 269.6 258.6 270.033 258.4 270.7C258.4 271.2 258.4 272.7 258.8 273C259.2 273.333 259.8 273.433 260.6 273.3C261.4 273 265.6 270.4 265.6 270.4L264.6 270.7L263.4 270.5C263.4 270.5 262.9 271.2 262.2 271.3C261.6 271.3 261.267 271.1 261.2 270.7L261.1 269.7Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M264 271.1L263 271.5L262 272L262.3 273.3L264.1 273.7L265.2 272.7V271.5L264 271.1ZM272.3 270.2L271.7 269.6C271.3 269.2 271 269.067 270.8 269.2L269.8 270.3V271.2L270.8 271.7L271.5 271.8L272.5 271.2L272.3 270.2Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M266.1 269.6L264.9 270.3L263.9 271.1L264.9 272.1L265.8 272.3L267.8 270.9L267.6 269.6H266.1ZM273.7 271.2L273.3 270.6C272.9 270.333 272.567 270.2 272.3 270.2C272.1 270.2 271.3 271.4 271.3 271.4L271.2 271.7L271.9 272.5L273.2 272.8L274.1 272L273.7 271.2Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M270.4 272.6L271.4 272.8C271.4 272.8 271.3 273 271.6 273.2H271.9C271.9 273.1 271.9 274.2 272.9 274.9C272.9 274.9 274.1 275.3 274.6 274.9C275.2 274.6 275.1 275 275.1 275L276.7 273C276.7 273 276.7 272.6 276.3 272.6C276.3 272.6 276.6 271.4 275.6 271.1C274.6 270.8 273.7 271.2 273.7 271.2C273.7 271.2 272.9 272.7 272.5 272.5L271.9 272.1L271.3 271.4L270.6 271.2C270.2 271 269.9 270.3 269.9 270.3C269.9 270.3 269.3 270.3 269.1 270L268.6 269.4L267.1 270.4C267.1 270.4 267.1 270.9 266.2 271.5C265.334 272.1 264.867 272.333 264.8 272.2C264.7 272 264.6 273.5 263.6 273.2C262.6 273.1 262 272 262 272C262 272 261.3 271.9 260.9 272.5C260.5 273.1 260.2 273.3 260.2 273.9C260.267 274.567 260.5 275.133 260.9 275.6C261.2 275.9 262.2 276.6 263.3 276C264.5 275.4 264.1 274.5 264.1 274.5L264.7 274.1C265.434 273.433 266.1 272.967 266.7 272.7",fill:"#F8C83C"}),d.jsx("path",{d:"M270.4 272.6L271.4 272.8C271.4 272.8 271.3 273 271.6 273.2H271.9C271.9 273.1 271.9 274.2 272.9 274.9C272.9 274.9 274.1 275.3 274.6 274.9C275.2 274.6 275.1 275 275.1 275L276.7 273C276.7 273 276.7 272.6 276.3 272.6C276.3 272.6 276.6 271.4 275.6 271.1C274.6 270.8 273.7 271.2 273.7 271.2C273.7 271.2 272.9 272.7 272.5 272.5L271.9 272.1L271.3 271.4L270.6 271.2C270.2 271 269.9 270.3 269.9 270.3C269.9 270.3 269.3 270.3 269.1 270L268.6 269.4L267.1 270.4C267.1 270.4 267.1 270.9 266.2 271.5C265.334 272.1 264.867 272.333 264.8 272.2C264.7 272 264.6 273.5 263.6 273.2C262.6 273.1 262 272 262 272C262 272 261.3 271.9 260.9 272.5C260.5 273.1 260.2 273.3 260.2 273.9C260.267 274.567 260.5 275.133 260.9 275.6C261.2 275.9 262.2 276.6 263.3 276C264.5 275.4 264.1 274.5 264.1 274.5L264.7 274.1C265.434 273.433 266.1 272.967 266.7 272.7",stroke:"#977C2E",strokeWidth:"0.2",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M268.6 264.7V267.2C268.6 267.2 269 269.5 268.5 270.2C268 270.9 266.2 270.8 265.9 270.2C265.7 269.5 265.8 267.6 265.8 267.6L268.6 264.6V264.7Z",fill:"#F8C83C",stroke:"#977C2E",strokeWidth:"0.2"}),d.jsx("path",{d:"M266.6 272.4C266.6 272.4 266.2 273.1 267.4 273.2L268.1 272.9C268.367 272.567 268.467 272.367 268.4 272.3C268.3 272.2 268.3 273.2 269.4 273.3C270.5 273.4 270.4 272.2 270.4 272.2",fill:"#F8C83C"}),d.jsx("path",{d:"M266.6 272.4C266.6 272.4 266.2 273.1 267.4 273.2L268.1 272.9C268.367 272.567 268.467 272.367 268.4 272.3C268.3 272.2 268.3 273.2 269.4 273.3C270.5 273.4 270.4 272.2 270.4 272.2",stroke:"#977C2E",strokeWidth:"0.2",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M257 274.5C257 274.5 256.3 273.4 257 273C257.8 272.6 258.3 273 258.7 273C259.2 273 259 271.8 258.9 271.6C258.833 271.2 258.667 270.867 258.4 270.6C258.2 270.6 255.6 270.8 255.7 272.5C255.8 274.2 257 274.5 257 274.5ZM261 278.6C261 278.6 260.2 277.4 260.6 276.7C261 276 261.4 276.5 261.6 276.4C261.867 276.4 261.867 275.967 261.6 275.1C261.2 273.8 260.7 274 260.4 273.9C260.1 273.8 258.6 275 258.9 276.5C259.3 278.3 260.9 278.6 260.9 278.6H261ZM275.5 277.2C275.5 277.2 278.3 278.4 278.5 275.5C278.6 274 277.2 273 276.8 273C276.6 273 276.267 273.267 275.8 273.8C275.2 274.4 274.967 274.8 275.1 275C275.3 275.3 276.1 274.8 276.5 275.7C277.1 277.2 275.5 277.2 275.5 277.2Z",fill:"#202220"}),d.jsx("path",{d:"M261 278.6C261 278.6 258.8 278.1 258.8 276C258.8 274.6 260.4 274 260.4 274C260.4 274 259 274.7 258.9 276C258.9 278.1 260.9 278.6 260.9 278.6H261ZM257 274.5C257 274.5 255.7 274.2 255.6 272.4C255.4 270.6 258.4 270.7 258.4 270.7C258.4 270.7 255.6 270.7 255.7 272.5C255.9 274.3 257 274.5 257 274.5ZM275.5 277.2C275.5 277.2 276.1 277.5 276.7 277.4C277.5 277.467 278.067 277.067 278.4 276.2C278.7 275.1 278.5 274.6 277.8 273.7C277.2 273.1 276.867 272.867 276.8 273C276.7 273.2 277.4 273.1 277.8 273.7C278.2 274.3 278.7 275 278.3 276.2C277.9 277.4 276.8 277.4 276.3 277.4L275.5 277.2Z",fill:"#4B4139"}),d.jsx("path",{d:"M242.1 217.9L241.6 217.8L242 216.9L243.4 216.4L244.9 216.3H246.4L247.1 216.7L247.9 218.6L245 220.3L244.5 220.5L244.4 219.7L243.9 218.6L242.1 217.9Z",fill:"#904720"}),d.jsx("path",{d:"M269.5 260.4L269.4 256L257.4 259.6L262.2 264L269.5 260.4Z",fill:"#202020"}),d.jsx("path",{d:"M247.6 252.7L246.6 251.9L245.5 251.3H244.5L244.4 251.5L244.5 251.9L245.6 253.2L247.4 254.2L248.1 254.7L248.5 254.9L247.6 252.7ZM247.3 254.6H248L248.6 255.5L249.1 256.3L249.6 257.3L249.8 258L248.5 257.7L244.6 256.5L245 255.6L245.6 255L246.2 254.8L247 254.6H247.3Z",fill:"#D2A567"}),d.jsx("path",{d:"M249.8 257.8L250.4 257.7L250.8 257.3L250.6 255.9L250.9 251.3L247.8 247.6L247.1 249.7L248.1 253.5L248.7 255.7L249.8 257.8Z",fill:"#D2A567"}),d.jsx("path",{d:"M247.5 249.3C247.5 249.3 247.3 249.7 247.6 250.9C247.9 252.1 248.3 254.9 249.4 256.7C250.4 258.5 248.4 255.2 248.4 255.2C248.4 255.2 246.7 251.5 246.9 248.7C247.2 245.8 247.5 249.3 247.5 249.3Z",fill:"#AB6D29"}),d.jsx("path",{d:"M249.8 251.7C249.8 251.7 249.1 252.5 249 253.2V254.9C249 254.9 249 254.1 249.7 253.9C250.4 253.7 250.3 255.8 250.3 256L250.7 252.2L249.8 251.7ZM250.2 259.4L246.7 258.6C244.834 257.8 243.9 257.133 243.9 256.6C243.9 256.2 247.1 256.8 247.6 256.9C248.1 257 249.5 257.7 249.5 257.7H250.3L251.8 257.1L252 258.7L250.2 259.4ZM244.2 258.7C244.2 258.7 245.2 259.3 244.7 259.6C244.2 259.9 243.2 259.9 242.9 259.8L246.3 260.6L246.9 260L244.3 258.7H244.2Z",fill:"#AB6D29"}),d.jsx("path",{d:"M243.4 257.8C243.4 257.6 243.6 258.3 244.8 258.4C246 258.6 246.6 258.2 246.6 258.2L247.1 258.6L247.7 258.7L247.2 259.6L244.9 258.9L243.7 258.3L243.4 257.8Z",fill:"#D2A567"}),d.jsx("path",{d:"M251.3 256.2L251.9 257.1L252.3 255.1V253.1L251 252.3L251.3 256.2Z",fill:"#AB6D29"}),d.jsx("path",{d:"M247.8 253L246.8 251.2L245.4 248.7L246.2 247.3L247.2 248.7C247.2 248.7 246.9 249.7 247.2 250.7C247.2 251.7 247.8 252.9 247.8 252.9V253Z",fill:"#4D2A15"}),d.jsx("path",{d:"M240.6 259.2C240.6 259.2 241.1 258.5 242.1 258.4L244.1 258.5L246.1 259.7L246.6 260.4L242.6 259.8L240.6 259.2Z",fill:"#D2A567"}),d.jsx("path",{d:"M251.2 252L251.3 255.3C251.4 256 251.9 256.8 251.8 257.1C251.8 257.367 251.533 257.567 251 257.7C250.5 257.9 249.5 257.7 249.5 257.7C249.5 257.7 250.5 257.6 250.5 257.4L250.2 255.4C250.2 254.6 250.2 253.7 250 253.7C249.666 253.767 249.433 253.9 249.3 254.1C249.3 254.2 249.6 251.1 249.9 250.8C250.3 250.4 251.2 252.1 251.2 252.1V252Z",fill:"#8F4620"}),d.jsx("path",{d:"M243.8 258.4C243.8 258.4 243.4 258.1 243.4 257.8C243.4 257.5 243.8 259.1 246.1 259C248.3 258.9 248.1 258.8 248.1 258.8H249.2C249.2 258.8 249 259.8 248.8 259.9C248.6 259.9 247.1 261 247 261.1L246.5 261.4V261.2L246.2 259.5L244.3 258.8L243.8 258.4Z",fill:"#AB6D29"}),d.jsx("path",{d:"M247.8 253C247.8 253 245.2 250.2 244.3 248.5C243.4 246.8 244 244.3 244 244.3L246.4 247.5C246.4 247.5 246.1 248.1 246.2 249.1C246.3 250.1 247.8 252.9 247.8 252.9V253Z",fill:"#8F4620"}),d.jsx("path",{d:"M246.1 262.6C246.1 262.4 245.9 261.8 246.4 261.2C247.945 259.729 249.786 258.603 251.8 257.9V260.3L246.8 262.7L246.1 262.6Z",fill:"#AB6D29"}),d.jsx("path",{d:"M246.4 260.8L247.5 259.8C247.5 259.533 246.933 259.333 245.8 259.2L243.8 258.4C243.8 258.4 245.1 259.5 245.7 259.7C246.1 259.9 246.233 260.1 246.1 260.3L246.4 260.8ZM253 261.4L252 259.7L251.8 257.9L251 258.5L249.5 259C249.5 259 251.1 259 251.1 259.5C251.1 260 248.7 260.3 248.7 260.4C248.7 260.5 250.6 260 250.5 260.4C250.3 260.9 249.5 260.9 248.5 261.4L246.1 262.6C246.1 262.6 246.5 262.9 247.3 262.8L249.6 262.4L252.6 261.2L253 261.4Z",fill:"#8F4620"}),d.jsx("path",{d:"M253 261.4C253 261.4 252.2 261.1 251.6 257.5C251 253.9 251.1 253 251.1 253L252.6 254L253.9 256.3L253 261.4Z",fill:"#AB6D29"}),d.jsx("path",{d:"M253.5 255.4C253.5 255.4 252.8 257.4 252.8 258.6C252.8 259.733 252.866 260.667 253 261.4L254.5 263.2L255 262.7L255.3 261.1V258.4L253.5 255.4Z",fill:"#8F4620"}),d.jsx("path",{d:"M255.5 258.2C255.5 258.2 255.9 263.2 254.5 263.3C254 263.4 253.1 261.4 253 261.3C253 261.3 254.1 263.3 254.6 263C255.4 262.7 255.1 257.8 255.1 257.8L255.5 258.2ZM253 261.4L252.5 260.7C252.1 260.1 252.5 261.2 249.7 262.2C246.9 263.2 246.1 262.6 246.1 262.6C246.1 262.6 247 263.3 249.7 262.5C252.4 261.7 252.2 261.5 252.5 261.5L253 261.4Z",fill:"#202020"}),d.jsx("path",{d:"M248 255C248 255 248.5 255.3 249 256.3L249.8 258L249.9 257.9L249.1 256.2L247.4 253.6L248 255Z",fill:"#AB6D29"}),d.jsx("path",{d:"M246.4 261.2C246.4 261.2 246.7 260.2 246.4 260.1L244 259.9L240.6 259.2C240.6 259.2 241.9 260 243.1 260.3L245.8 261H246.3L246.4 261.2Z",fill:"#8F4620"}),d.jsx("path",{d:"M246.4 261.2L246.2 260.8C246 260.6 245.7 260.8 243.4 260.3L240.6 259.3C240.6 259.3 241.4 259.9 243.4 260.4L246.4 261.2Z",fill:"#202020"}),d.jsx("path",{d:"M247.4 254.6C247.4 254.6 245.7 254.6 245.2 255.1L243.9 256.7L245 256.8C245 256.8 244.9 255.8 245.4 255.3C245.9 254.8 246.7 254.7 247.4 254.6Z",fill:"#AB6D29"}),d.jsx("path",{d:"M244.2 251.4C244.2 251.4 244.9 252.3 245.6 252.6C246.4 252.867 246.967 253.2 247.3 253.6C247.7 253.9 248 255 248 255C248 255 245.6 253.9 245.2 253.4C244.7 252.8 244.2 251.4 244.2 251.4Z",fill:"#8F4620"}),d.jsx("path",{d:"M246.6 252C246.6 252 246.3 251.6 245.6 251.3C245 251.033 244.566 251 244.3 251.2V251.4L245.1 252.7L245.6 252.6C245.6 252.6 244.3 251.8 244.6 251.6C245.2 251 246.6 251.9 246.6 251.9V252Z",fill:"#8F4620"}),d.jsx("path",{d:"M253 248.9L266.6 241.9L273 250.9L261.3 253.9L255.1 254.5L252.1 252.3L253 248.9Z",fill:"#202020"}),d.jsx("path",{d:"M271.2 252.7L288 267.3L286.2 268.6L282.2 267.5L274 259.4L271 256.3L271.2 252.7Z",fill:"#4D2A15"}),d.jsx("path",{d:"M292.8 264.4L283.1 257.1L271 248L271.3 252.3L285.2 265.1L289.8 267.3L292.1 266.6L293.3 265.4L292.8 264.4Z",fill:"#4D2A15"}),d.jsx("path",{d:"M271.1 254.1C271.1 254.1 276 259.6 279.7 262.4C283.4 265.2 286.9 268.2 287.7 267.8C288.5 267.4 288.1 266.9 288.1 266.9L271.1 253V254.1Z",fill:"#803F1D"}),d.jsx("path",{d:"M283 268.1L281.4 269.4L279.4 268.6L269 258L269.5 256L271 256.3L283 268.1Z",fill:"#4D2A15"}),d.jsx("path",{d:"M292.8 264.4C292.8 264.4 291.5 267.4 288.8 266.7C286.1 266 271.2 251.9 271.2 251.9V253.4C271.2 253.4 286.2 267.2 289.2 267.7C292.1 268.3 294.5 265.7 294.2 265.5L292.8 264.5V264.4Z",fill:"#202020"}),d.jsx("path",{d:"M269.5 256.3C269.5 256.3 274.3 262.5 276.8 264.7C279.4 267 281.6 268.8 282.6 268.6C283.6 268.4 282 267.2 282 267.2L274.7 260.1L271 256.3C271 256.3 269.5 255.7 269.5 256.3Z",fill:"#803F1D"}),d.jsx("path",{d:"M270.7 256.3C270.7 256.3 282.9 268.7 283.8 269C285.8 269.6 288.8 267.5 288.8 267.5L287.8 266.9L287.6 267.3C287.6 267.3 287.1 268.5 284.4 268C279.537 264.466 275.077 260.409 271.1 255.9L270.7 256.3Z",fill:"#202020"}),d.jsx("path",{d:"M275.3 268.2L270.8 263.1L269.8 261.4L269.6 259.2L278.4 268.2L277.2 269L276.1 268.6L275.3 268.2Z",fill:"#4D2A15"}),d.jsx("path",{d:"M283.3 268.4C283.3 268.4 282.3 270 280.8 269.7C279.894 269.513 279.082 269.018 278.5 268.3L270 260L269.8 258.7C269.8 258.7 279.1 268.6 280.8 269C282 269.3 282.8 267.8 282.8 267.8L283.3 268.4Z",fill:"#202020"}),d.jsx("path",{d:"M278.6 268.1C278.6 268.1 278.2 269.3 276.9 269.1C275.6 268.9 275.3 268.5 275.3 268.5L270.1 262.3L270 260.7C270 260.7 275.4 268.1 276.6 268.6C277.9 269 278.2 267.7 278.2 267.7L278.6 268.1Z",fill:"#202020"}),d.jsx("path",{d:"M273 251.9C273 251.9 278 256.2 278.5 256.4C279 256.6 280.7 256.7 280.8 257C280.9 257.3 279.6 257 279.5 257.2C279.5 257.5 282.1 259.6 282.5 259.7C282.9 259.7 285 259.7 285 260C285 260.3 283.5 260 283.5 260.3C283.5 260.6 285.7 262.5 286.2 262.5C286.6 262.6 289.2 262.6 289.2 262.9C289.2 263.2 287.1 262.9 287.2 263.3C287.2 263.7 290.8 266 290.7 266.3C290.6 266.6 286.3 263.5 286.2 263.6L285.7 265C285.4 265.1 285.7 263.6 285.5 263C285.3 262.4 282.8 260.5 282.5 260.7C282.2 260.9 282.5 262.1 282.3 262.1C282.1 262.1 282.3 260.7 282.1 260.2C281.9 259.7 279.5 257.8 279.2 257.8C278.9 257.8 279.1 258.8 278.9 259C278.7 259.2 278.7 257.8 278.4 257.4C278.1 257 272.8 252.2 273 251.9Z",fill:"#B07229"}),d.jsx("path",{d:"M264.4 265.9C264.4 265.9 264.4 267.8 263.6 268.1C262.8 268.4 261.1 264.6 261.1 264.6L260.7 261L263.2 263.4L264.4 265.9ZM271.1 264.9V263.9L270.9 262.7L270.7 260.7L270.3 259.5L269.9 258.6H269.3L268 259.6L267.6 260.9L268.3 263.3L268.9 265.4L269.9 265.8L271.1 264.9Z",fill:"#4D2A15"}),d.jsx("path",{d:"M269.4 268.3C269.7 268.1 269.1 265.5 269.1 265.5L267.6 261.7L267.1 260.3L265.9 259.8L265.1 260.8L265.2 262.3L267.1 265.8C267.6 266.6 268.9 268.4 269.4 268.2V268.3Z",fill:"#4D2A15"}),d.jsx("path",{d:"M268 260C268.5 260.4 269 261.4 269.1 262.1C269.1 262.1 270.1 265 270 265.2C269.9 265.4 269.2 265.5 269.2 265.5C269.2 265.5 270.6 267 271 266.8C271.4 266.6 271.3 265.2 271.1 264.9C270.9 264.6 270.6 264.9 270.4 264.5C270.2 264.2 269.7 262.3 269.7 261.2V259C269.9 258.7 270.9 261.3 270.9 262.7L271.4 263.3L270.9 260.7L270.4 258.9L270.6 257.7V256.9L271.3 257.3C271.567 257.367 271.767 256.833 271.9 255.7C272.1 254 271.8 250.9 271.8 250.9L266.4 258L268 260Z",fill:"#202020"}),d.jsx("path",{d:"M268 259.4C268 259.4 267.8 261.4 268.5 263.4C269.2 265.3 269.4 265.4 269.5 265.6C269.7 265.9 269.7 268 269.5 268.2C269.5 268.2 268 264.7 267.5 263C267 261.3 267 260.6 266.7 260.4L266.1 260.3L268 259.4Z",fill:"#202020"}),d.jsx("path",{d:"M267.5 269.6C267.6 269.6 267.5 268.8 267.5 268.8L267.3 267L265.4 263L263.4 261.2L262.3 259.5L262.1 262.7C262.1 262.7 263.6 265.9 264.6 266.9C265.6 267.9 267.2 269.7 267.5 269.6Z",fill:"#4D2A15"}),d.jsx("path",{d:"M259.7 260.9C259.7 260.9 260.1 261.7 260.1 262.3V263.3L261.5 266.1C262.2 267.4 262.9 268.6 263.5 268.4C264 268.1 264.2 267.2 264.3 267.1C264.3 267 263.6 268.1 263.3 267.9C263 267.7 261.3 262.7 261.4 262.6L260.6 262L259.7 260.9ZM265.4 265.2L264 262.7C263.467 261.833 263.1 261.367 262.9 261.3C262.7 261.3 262.5 259.8 262.5 259.8C262.5 259.8 263 260.8 263.8 261.2C264.467 261.6 264.967 261.767 265.3 261.7L265.5 263.3L265.4 265.3V265.2Z",fill:"#202020"}),d.jsx("path",{d:"M262 262.6C262 262.6 262.3 263.7 263 264.8L264.9 267.1C264.9 267.1 263.6 265.9 262.9 264.9C262.2 263.9 261.8 262.6 261.8 262.6H261.9H262Z",fill:"#5C3A1D"}),d.jsx("path",{d:"M265.6 261.3C265.6 261.3 266 260.3 266.3 260.3L267.2 260.1C267.2 260.1 266.7 260 266.2 259.5L265.2 258.5L265.5 260L265.6 261.3ZM265.3 261.6L267.3 266C267.6 267.2 267.6 268.8 267.6 268.8L267 266.7C266.7 265.7 265.3 263 265.2 262.7C265.1 262.4 265.2 261.7 265.2 261.7L265.3 261.6Z",fill:"#202020"}),d.jsx("path",{d:"M267.4 259.5L267.8 254.7L267.4 252.9L265.2 248.1C265.2 248.1 265.1 248.8 264.5 248.8C263.572 248.542 262.738 248.021 262.1 247.3C261.664 248.555 261.595 249.907 261.9 251.2L266.2 259.1L267.4 259.5Z",fill:"#4D2A15"}),d.jsx("path",{d:"M259 262.7C259 262.7 259.7 263.5 260 263.4C260.3 263.3 260.3 261.8 259.8 260.9C259.3 260 254.2 253.2 253.4 252.8C252.7 252.4 259 262.7 259 262.7Z",fill:"#8B441F"}),d.jsx("path",{d:"M262.5 259.9C262.6 260.2 263 262.4 262.1 262.6C260.9 262.8 255.2 255.1 254.4 254C254.4 254 250.8 251.8 250.8 251.2C250.8 250.6 254.6 252 254.6 252L262.1 259.2L262.5 259.9Z",fill:"#8B441F"}),d.jsx("path",{d:"M259 262.7C259 262.7 258.4 261.6 258.3 260.7C258.233 260.033 258.133 259.567 258 259.3L253.4 252.7L251.6 251.6L251.8 253.5C251.8 253.5 253.1 255.9 255 258.1L259 262.7Z",fill:"#202020"}),d.jsx("path",{d:"M265.3 261.6C265.8 261.3 265.6 259.4 265.3 258.8C265.2 258.2 261.8 251.2 261.8 251.2L260.8 251.6L258.9 250.1L257.9 249L258.2 251.5V252.8L260.8 257.4L265.3 261.6ZM269.1 257.4L269.9 256.4L269.4 252.9L267.2 245.3C267.2 245.3 266.7 245.5 266.2 245.1L265 244.1L265.5 248.6L267.8 255L268 256.9L269.1 257.4Z",fill:"#4D2A15"}),d.jsx("path",{d:"M262.1 259.2C262.1 259.2 259.9 256.8 259.1 255.6L257.8 253.2C257.8 253.2 257.2 253.5 256.4 253.2C255.7 252.8 254.6 251.7 254.6 251.7C254.6 251.7 254 252.9 257.2 256.2C260.9 259.9 262.2 259.2 262.2 259.2H262.1Z",fill:"#202020"}),d.jsx("path",{d:"M267.5 260C268.5 259.6 268.5 255.7 267.5 253C266.6 250.4 265.2 248 265.2 248C265.2 248 267 252.4 267.4 254C267.8 255.8 267.4 257 267.1 257C266.8 256.9 266.8 256 266.1 254.3C265.3 252.6 264.8 252.2 264.8 252.2C264.8 252.2 267.4 259.2 266.7 259.1C266 258.9 262.4 251.1 262.2 250.9C262.1 250.7 262 251.2 262 251.2C262 251.2 265.2 261 267.5 260Z",fill:"#8B441F"}),d.jsx("path",{d:"M269.6 241L271.2 244.4L271.7 247.9L271.8 250.9C271.8 250.9 271.9 256.9 271.2 256.9C270.5 257.1 270.1 256.4 270.1 256.2L268.7 249.6L267.3 242.8L267.8 242.4L268 241.4L269 241.3L269.6 241Z",fill:"#4D2A15"}),d.jsx("path",{d:"M265.3 261.6C265.9 261.6 265.3 260 265.3 260C265.3 260 264.8 260.7 264.3 260.2C263.8 259.7 263.3 257.7 263.3 257.7L262.9 256.5C262.9 256.5 262.4 257.8 261.9 257.8C261.2 257.8 258.2 252.7 258.2 252.7L257.8 253.2C257.8 253.2 262.1 262.1 265.3 261.6Z",fill:"#8B441F"}),d.jsx("path",{d:"M263.3 257.7C263.3 257.7 263.8 256.5 263.6 255.3C263.129 253.912 262.526 252.573 261.8 251.3L260.8 251.2L258.9 250.2C259.995 252.9 261.477 255.427 263.3 257.7ZM265.8 255.9C265.8 255.9 265.4 253.2 264.1 250.7C263.611 249.472 262.936 248.325 262.1 247.3V250.1C262.1 250.1 263.3 250.6 264.1 252.1L265.8 255.9ZM269.2 251.3C269.2 251.3 269 248.3 268.5 246.6L267.5 242.6L267.8 242.4H268.3C269 242.5 269.3 244.1 269.3 244.1L269.1 241.6L268.9 241.2H267.8C267.8 241.2 268 241.9 267.7 242.2C267.4 242.5 267.2 242.1 267.1 242L267 242.3L267.2 243.9V245.3C267.2 245.3 267.6 247 268.2 248.1L269.2 251.3ZM271.8 250.9C271.8 250.9 272.3 246.7 271.4 243.9C271.052 242.65 270.438 241.49 269.6 240.5L269.1 241.1C269.1 241.1 270.6 243.4 271.1 245.5C271.5 247.8 271.8 250.9 271.8 250.9ZM267.5 253.1C267.5 253.1 267.1 249.7 266.5 247.6L265.7 244.6L264.8 243.9C264.8 243.9 265.3 246.1 265.3 246.8L265.2 247.8C265.2 247.8 265.6 249 266.2 250C266.8 251 267.5 253 267.5 253V253.1Z",fill:"#202020"}),d.jsx("path",{d:"M269.8 258.3C270.6 258.3 269.8 253.5 269.5 252.3L267.2 245.3C267.2 245.3 269.6 253.5 269.4 253.9C269.1 254.5 268.2 251.4 268 251.5C267.8 251.5 269.8 257 269 257.1C268.4 257.1 268 255.9 268 255.9V257.1C268 257.1 268.5 258.3 269.8 258.3Z",fill:"#904720"}),d.jsx("path",{d:"M270.8 255.9C271.4 255.9 270.6 251.4 270.2 249.3L268.7 243.3C268.7 243.3 269.8 246.1 270.5 249.3C271.2 252.5 271.5 256.6 271 256.7C270.3 256.7 270 256.1 270 256.1V255.4C270 255.4 270.2 255.9 270.8 255.9Z",fill:"#904720"}),d.jsx("path",{d:"M263 261.2C263 261.5 263 263.1 262.2 263C261.4 262.9 259.9 261.5 259.6 260.5C259.6 260.5 261.4 262.5 262 262.5C262.6 262.5 262.6 260.5 262.5 259.9C262.5 259.4 263 261.2 263 261.2Z",fill:"#312317"}),d.jsx("path",{d:"M267.3 239.6C267.3 239.6 268.3 240.3 269.3 239.8C269.691 239.531 270.013 239.174 270.239 238.756C270.465 238.339 270.588 237.874 270.6 237.4C270.666 236.8 270.5 236.167 270.1 235.5C269.5 234.8 270.9 236.1 270.9 237.4C270.9 238.7 270.9 240.8 268.9 241.3C266.9 241.8 267.8 241.2 267.8 241.2L267.3 239.6Z",fill:"#D2A567"}),d.jsx("path",{d:"M265.7 235.8C265.7 235.8 267 237.8 267.5 239.8C267.967 241.533 267.967 242.4 267.5 242.4C267.234 242.4 267.1 242.167 267.1 241.7L265.7 235.8Z",fill:"#8F4620"}),d.jsx("path",{d:"M243.3 238.3L251.7 250.6L262.4 238.6L255.7 231.8L243.3 238.3Z",fill:"#1E2121"}),d.jsx("path",{d:"M254 230.8L253.5 232.8L254.5 236L256.3 237.8L258.3 239.2L258.8 237.7L259.3 235.9L259.8 235.7L261.1 236.2L262 234.9L263.4 232.5L263.1 231.5L262.7 230.8L260.6 227.1L259.9 228.5L259.2 228.9L258 228.2L256.5 230.2L254.6 229.3L254 230.8Z",fill:"#4D2A15"}),d.jsx("path",{d:"M258.4 239.2C258.4 239.2 258.7 238.9 258.9 238C259 237 259.1 234 258.8 232.8C258.5 231.6 257.8 229.3 257.6 229.5C257.4 229.6 258.8 232 258.6 235C258.4 237.9 258.6 238.7 257.9 239C257.2 239.3 258.4 239.2 258.4 239.2Z",fill:"#5C3818"}),d.jsx("path",{d:"M258.8 234.3C258.8 234.3 260.2 236.3 260.9 235.5C261.6 234.8 261.2 232.3 260.9 231.3L259.9 228.8L260.3 228.4L261 231.1C261.3 232.2 262 235.3 261.1 235.9C260.2 236.5 258.9 234.7 258.9 234.7V234.3H258.8Z",fill:"#5C3818"}),d.jsx("path",{d:"M254.3 235.6C254.3 235.6 254.8 234.9 255.4 234.9C256.066 234.967 256.333 235.033 256.2 235.1L256.8 236.7L257.7 238.4L258.5 239.3L258.1 239.8H257.4L255.4 238.8L254.8 238L254.3 235.6Z",fill:"#8F4620"}),d.jsx("path",{d:"M257.6 253C257 253.4 255.5 252.7 254.6 251.9L249.2 246.5L248.6 244L250.4 244.4L253.4 243.1L254 242.1L257.7 240.1L259.7 239.1L264.2 238.9L265.2 236.8C265.2 236.8 266.8 239.4 267 240.4C267.2 241.4 267.2 244.7 266.8 244.9C266.4 245.1 265 243.9 264.8 243.9C264.5 243.9 265.8 248.5 264.8 248.7C263.7 248.8 261.8 246.9 261.8 246.9C261.8 246.9 262.6 251.1 261.8 251.1C260.8 251.1 258.6 250.1 257.7 249.1C257.7 249.1 258.7 252.5 257.7 253.1L257.6 253Z",fill:"#D2A567"}),d.jsx("path",{d:"M256.8 247.7L257.7 249.1C257.9 249.4 257.7 251.4 257.5 251.7C257.2 252.5 256.2 250.8 255.7 249.4L253.9 246.4C253.9 246 256.8 247.7 256.8 247.7ZM265.5 237.4C265.5 237.4 267 243.9 266.3 244.1C265.5 244.3 263.3 242.1 263.1 241.7L259.8 236.6L259.2 235.9L259.4 235.6L260.7 236.1L265.5 237.4Z",fill:"#8F4620"}),d.jsx("path",{d:"M254.3 249.8C254 250.1 253.3 249 253 248.8L250.6 246.1C249.466 245.033 248.866 244.367 248.8 244.1C248.8 243.8 248.1 243.1 248.1 243.1L248.7 242.5L249.4 242.4C249.4 242.4 253.7 245.8 254 246.4C254.3 246.9 254.5 249.7 254.3 249.9V249.8ZM260.8 249.9C260.6 250.1 257.8 248 256.5 246.3C255.2 244.6 254.1 243.1 253.8 242.3L253.3 240.8L254.1 241C254.1 241 261.1 249.6 260.8 249.9ZM261.8 246.9C261.6 247.1 260.4 246.2 259.6 245.2C258.9 244.2 259.3 242.9 259.3 242.9C259.3 242.9 261.9 246.7 261.8 246.9ZM263.4 246.5C263 246.7 261.4 244.7 260 242.5C259 240.9 258.7 240.6 258.5 240.5L257.5 240.2L257.3 240L258 239.8L258.6 239.1L259.4 238.1L262.8 244.9C262.8 244.9 263.6 246.4 263.4 246.5Z",fill:"#8F4620"}),d.jsx("path",{d:"M254.6 251.9C254.6 252.2 254.6 252.4 253.6 252.3C252.8 252.3 247.9 249.6 245.8 246.1L243.3 242.1L244.3 241L251.9 249.7L254.6 251.9Z",fill:"#AB6D29"}),d.jsx("path",{d:"M254.6 251.9C254.6 252.3 254.334 252.433 253.8 252.3C253.2 252.2 251.3 251.5 248.3 248.1C245.3 244.7 244 242.2 244 242.1L243.9 240.7L244.8 240.3L250 248.3L254.6 251.9Z",fill:"#8F4620"}),d.jsx("path",{d:"M259.7 248.5C259.7 248.5 258.1 247.3 257.1 246.1C256.1 244.9 254.1 242.1 254.1 241.5C254.1 240.9 255.1 241 255.1 241L255 239.5L255.2 239.1L256.7 239.7L258.6 242L259.3 243C259.3 243 260.5 245.8 260.3 246C260 246.4 258.3 244.5 258.1 244.7C257.9 244.9 260.1 248.2 259.7 248.5ZM256.7 247.7C256.7 247.7 257.3 248.5 257 249C256.7 249.5 256.6 249.9 255.8 248.7C255 247.5 254.1 246.2 254 246.3C254 246.4 254.1 248.1 253.7 248.1C253.3 248.1 252.1 246.7 251.3 245.5L249.3 242.5C249.3 242.5 249.5 242 249.4 240.7L249.3 238.7C249.3 238.7 249.3 239.1 249.5 239.4L249.9 240L252.7 243.3L253.5 242.8L255.2 246.1L256.7 247.7ZM245.9 242.7C245.9 242.7 248.1 246.7 250.2 248.8C251.452 250.108 252.947 251.161 254.6 251.9L248 244L246 242.8L245.9 242.7ZM262.9 245.1C262.8 245.1 261.4 243.7 260.5 242.4C259.722 241.197 259.242 239.826 259.1 238.4L259.3 235.6C259.3 235.6 261.6 238 262.1 239.1C262.5 240.1 263.4 241.7 263.2 241.9C263 242.1 261.5 240.9 261.3 241.1C261.1 241.4 263.1 244.9 262.9 245.1ZM265.5 242.6C265.2 242.7 264 241.4 263.7 240.6C263.4 239.6 263.3 238 263.3 238L262.3 235.6L262.4 233L263.4 232.8L264.9 234.9C264.9 234.9 265.5 236.2 265.5 237.9C265.5 239.8 265.8 242.4 265.5 242.6ZM247.5 249.1C245.5 246.6 244.2 244.1 244.2 244.1L243.5 241.9L243.9 242.2C243.9 242.2 244.5 244.8 247.6 247.9C250.8 251 251.5 251.3 251.5 251.3C251.5 251.3 252.1 253 251.8 253.6C251.8 253.6 249.5 251.6 247.5 249.1Z",fill:"#4D2A15"}),d.jsx("path",{d:"M250.9 252.7C250.9 252.7 248.2 250.3 246 247.7C243.9 244.9 242.5 242.3 242.5 242.3L243.5 241.4C243.5 241.4 245.3 245.6 246.5 247.3L250.9 252.7ZM254.6 251.9L250 247C249.03 245.937 248.19 244.762 247.5 243.5L248.8 244C248.8 244 249.3 245.4 250.5 246.8L254.6 251.9ZM254 246.3C254 246.3 252.3 244.3 251.5 242.9L249.8 239.9C249.8 239.9 252.1 242.6 252.8 242.7H253.5C253.3 242.6 253.2 243.7 253.5 244.5C253.6 245.3 254 246.3 254 246.3ZM254.7 237.9C254.7 237.9 255 239.3 254.8 240.2C254.6 241.1 254.1 241 254.1 241L255.6 242.8C256.1 243.4 257.4 244.3 257.4 244.3L255.9 242.1C255.5 241.4 254.9 240.5 255.2 239.8C255.4 239.1 256.8 240.3 257.2 240.6L259.2 242.9C259.2 242.9 258.7 240.9 257.8 240.2L254.8 237.9H254.7Z",fill:"#202020"}),d.jsx("path",{d:"M261.6 242.3L260.2 238.8L258.9 234.8V237C258.9 238 258.5 239.4 258.1 239.6C257.7 239.8 257.6 239.8 256.8 239.6C256.1 239.4 257.4 240 257.4 240C257.4 240 258.2 240 258.4 239.6C258.8 239.2 258.9 238.4 259.3 238.5C259.6 238.6 260 239.8 260.3 240.4L261.6 242.3Z",fill:"#202020"}),d.jsx("path",{d:"M259 234.7C259 234.7 260.6 236.6 261.3 235.7C262 234.8 261.6 232.6 261.6 232.6C261.6 232.6 262.6 232.9 262.9 232.6C263.2 232.3 263.1 231.6 263.1 231.6C263.1 231.6 264.9 234.1 265.7 235.8C266.6 237.4 267 240.4 267 240.4C267 240.4 265.5 238 264.8 235.8C264.1 233.6 263.1 232.8 262.9 233C262.7 233.2 262.5 234.6 262.7 235.4L263.9 238.1C264.4 239.2 264.9 240.9 264.9 240.9L263.5 238.9C262.967 238.233 262.5 237.8 262.1 237.6C261.8 237.3 261.3 236.6 260.8 236.5C260.3 236.4 259.3 235.8 259.3 236.2L259.1 235.4L259 234.7Z",fill:"#202020"}),d.jsx("path",{d:"M253.4 242.6L255 245.4L256.8 247.7C256.8 247.7 255.2 246.3 254.6 245.4C254 244.4 253.4 242.6 253.4 242.6Z",fill:"#171717"}),d.jsx("path",{d:"M264.1 243C263.9 243.2 263.1 242.9 263.1 243.2C263 243.5 263.5 244.5 264.1 245.1C264.566 245.633 264.866 245.8 265 245.6L264.8 244.5V243C264.7 242.8 264.1 243 264.1 243Z",fill:"#8F4620"}),d.jsx("path",{d:"M244.7 231.5L243.7 232.1L242.7 234.4L243 238.7L244.7 241.1C245.3 242.1 247.5 244.5 248 244.3C248.5 244.1 249.2 242.5 249.2 241.6L249.4 239C249.4 239 249.9 240 250.8 240.9C251.7 241.9 252.5 242.8 252.8 242.7C253.3 242.7 254.5 240.2 254.6 239.8C254.6 239.5 251.4 231.8 251.4 231.8L250 231.1L244.7 231.5Z",fill:"#D2A567"}),d.jsx("path",{d:"M251.8 238L252.7 240.9C253 241.9 252.7 242.7 252.9 242.7C253 242.7 254.7 240.5 254.7 239.5C254.7 238.5 254.7 237.5 254.3 234.5C253.8 231.4 254.4 230.5 254.4 230.5L253.4 229.7L251.9 233L251.8 238ZM246.3 236.2L246.8 240.2C247 241.2 247.6 242.8 247.9 242.7C248.2 242.7 249.2 240.1 249.3 239.2C249.3 239.2 248.6 237.9 248.6 234.8C248.6 231.7 248.3 231.3 248.3 231.3L246.3 236.2Z",fill:"#AB6D29"}),d.jsx("path",{d:"M242 230C242 230 239.5 233.6 239.6 235.6C239.6 237.6 239.9 237.2 240.6 239C241.1 240.8 241.4 243.4 241.4 243.6C241.533 243.8 241.7 243.7 241.9 243.3L242 230Z",fill:"#45392D"}),d.jsx("path",{d:"M242 230.5C242 230.5 239.8 233.8 240 235.7C240.1 237.6 240.4 237.5 241 239.2C241.6 240.9 241.7 243.6 241.7 243.6C241.7 243.6 242.4 243.4 243.2 242.8L244.7 241.1L243.9 239.4L243.3 237.9L242.7 236.9L242.9 233.8L243.5 231.4V230.6L242 230.5Z",fill:"#AB6D29"}),d.jsx("path",{d:"M253.8 236.3L252.2 235.8C251.8 235.5 251.6 234.8 251.6 234.8L251.9 234.2L253.8 236.3Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M242.4 230.8C242.4 230.8 240.9 234.2 241 236.6C241.253 238.452 241.828 240.246 242.7 241.9V234.2L243.4 231.9V230.7L242.4 230.8Z",fill:"#D2A567"}),d.jsx("path",{d:"M246.3 231.6V233C246.2 233.5 245.3 234 245 234.6L244.2 236.9C244.2 236.9 244.5 235.9 245.1 235.4C245.6 234.9 245.8 234.4 245.9 234.8C246 235.1 246.2 236.4 246.1 236.7C245.9 236.833 245.634 237.367 245.3 238.3C245.094 238.917 245.094 239.583 245.3 240.2L245.7 238.4C245.9 237.933 246.067 237.7 246.2 237.7L247.2 239.5V238C247.4 237.3 248.2 236.4 248.3 236.4C248.6 236.4 248.9 236.2 248.1 235.8C247.8 235.6 248 232.4 248.1 232.2C248.4 232.1 249.6 232.1 249.5 231.6L248.2 229.9L246.2 231.6H246.3Z",fill:"#8F4620"}),d.jsx("path",{d:"M253.6 238.5L252.4 238.3L252 237.8V237.3L253 237.8L253.6 238.5Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M243.6 238.9L243.1 240.1L242.8 241.3L242.5 238.7L242.2 236.8L241.7 237.3C241.7 237.3 241.7 236.1 241.9 235.5C242.234 234.767 242.3 234.233 242.1 233.9C241.834 233.9 241.567 234.1 241.3 234.5L240.7 235.5L241.2 234C241.5 233.6 242.6 232.3 242.9 231.7L243.1 230.7L243.9 230.6C243.9 230.6 244.8 231.3 244.8 231.9C244.8 232.2 243.9 232.5 243.9 232.6C243.9 232.7 243.2 232.6 243.1 235.2C242.9 237.9 243.6 237.7 243.6 238.9ZM251 231.9C251 231.9 251.2 233.4 251 233.9C250.867 234.3 250.6 234.733 250.2 235.2C249.8 235.8 249.9 237.2 249.9 237.2L250.3 236.2L250.8 235.3C251 235.3 251.234 235.733 251.5 236.6L252.1 238.6C252.1 238.6 251.9 237.6 252.1 237.6C252.3 237.6 252.5 237.6 252.9 237.9L253.6 238.5C253.6 238.5 253.6 238.1 253.1 237.5C252.6 236.9 252.3 237.1 252.1 236.4C251.967 235.6 251.934 235.033 252 234.7C252.067 234.5 252.3 234.667 252.7 235.2L253.9 236.3L253.4 235.5V233.2C253.4 232.333 253.467 231.733 253.6 231.4C253.9 231.2 254 230.2 253.8 230C253.8 229.8 251 232 251 232V231.9Z",fill:"#8F4620"}),d.jsx("path",{d:"M259.7 228.9C259.7 228.9 259.7 230.5 260 231.5L260.9 234.5C260.9 234.5 260 233 259.6 231.7C259.2 230.3 258.9 228.9 258.6 228.7C258.2 228.7 257.8 229.4 257.8 230C257.865 231.171 258.136 232.322 258.6 233.4C259.1 234.1 257.9 232.4 257.6 231.5L257 229.8C257 229.8 256.7 230.5 256.8 231.4C257 232.3 257.7 233.5 257.7 233.5L256.9 232.7L256.4 232.2C256.4 232.2 256.4 233.4 256.7 233.9L257.7 235.2L256.7 234.3L256.3 233.8C256.3 233.8 256.4 235.5 256.8 236.4L258 238.7C258 238.7 257 238 256.4 236.5C255.795 234.388 255.525 232.195 255.6 230L256.6 228.5C257 227.8 257.6 224.7 257.6 224.7C257.6 224.7 258.2 227.6 258.7 228.2L259.7 228.9ZM252.8 228L253.4 229.1L253.9 229.9C253.9 229.9 253 230.9 252.1 231.6C251.2 232.3 249.9 233.1 249.6 232.7C249.333 232.233 249.233 231.967 249.3 231.9L251.2 230.4C251.751 229.934 252.194 229.354 252.5 228.7L252.8 228ZM244.1 230.9C244.1 230.9 244.2 232.7 245 232.6C245.8 232.6 248 230.3 248.1 230.2C248.3 230.2 248.4 229.6 248.4 229.4V228.8C248.4 228.8 245.9 231.2 245.1 231.3C244.912 231.336 244.719 231.317 244.541 231.246C244.364 231.175 244.211 231.055 244.1 230.9ZM244.1 228.5L243.9 230.1L244.1 230.8C244.2 230.9 242.4 231.4 242.1 230.8C241.8 230.2 242 229.6 242 229.6L243.2 229.5C243.6 229.4 244.2 228.5 244.2 228.5H244.1ZM260.4 226C260.4 226 261.1 227.8 261.6 228.6L262.7 230.8L261.2 229.2L260.2 228.4L260.4 227.5V226Z",fill:"#1E2121"}),d.jsx("path",{d:"M241.7 229.6H242.7L243.4 229.5L244 228.5C244 228.5 243.7 229.6 244 230.5C244.267 231.167 244.533 231.467 244.8 231.4C245.499 231.289 246.137 230.935 246.6 230.4L248.3 229C248.3 229 248.1 230 248.5 231C248.833 232 249.433 232.167 250.3 231.5C251.1 230.8 251.9 229.7 252.3 229.2L252.9 228.4L253.8 227.7L254.6 223.3L254.1 222.7L253.1 223.3L251.7 222.7L251.3 222.2L250.5 223.5L249.7 224H249.3L248.3 224.3L247.9 223.4L247.7 222.8L247.2 222.6L245.2 224.6L244.2 224.5L243.1 226.2L242.3 227.2L241.5 229.2L241.7 229.6Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M251.1 225.2C251.1 225.2 251.3 226.2 250.7 228.1C250.1 230 249.4 231.1 249.4 231.1C249.4 231.1 251.4 230 252.3 227.9C253.3 225.7 253 223.3 253 223.3L251.1 225.2ZM253.5 223.2C253.5 223.2 253.7 223.5 253.5 225.2L252.9 228.4L253.4 229.3C253.6 229.8 254.3 230.7 254.8 230.6C255.334 230.467 255.9 229.867 256.5 228.8L257.5 226.5C257.767 226.367 257.9 226.433 257.9 226.7C257.9 226.7 258.1 227.7 258.6 228.1C259.1 228.5 259.6 229.1 260 228.9C260.334 228.633 260.5 228.3 260.5 227.9L259.5 224.7L258.2 221.5L257.4 220.3L255.1 220.5L253.5 223.2Z",fill:"#8F4620"}),d.jsx("path",{d:"M257.4 220.3C257.4 220.3 258 221.6 258.1 223.1C258.2 224.6 257.8 226.1 257.8 226.1V223.1C257.7 221.9 257.2 221.4 257.2 221.1L257.4 220.3Z",fill:"#AB6D29"}),d.jsx("path",{d:"M260.5 226V228C260.3 228.5 259.5 227.5 258.9 225.5C258.4 223.5 258.5 223.1 258.1 222.1L257.4 220.3L258.5 220.1L260.5 226ZM254.9 229.8C254.9 229.8 257.1 228.5 257.4 224.8C257.4 223.1 256.4 220.3 256.4 220.3C256.4 220.3 256.4 223.3 255.6 225.3L254.1 228.4L254.9 227.9L255.5 227V228.3L254.9 229.8ZM253 223.3C253 223.3 253 224.1 252 224.8C251.1 225.6 249.5 226.4 249.5 226.4C249.5 226.4 250.7 225.3 251.1 224.3C251.5 223.3 251.2 222.7 251.2 222.7C251.2 222.7 251.1 223.2 250.6 223.7C250.1 224.2 249.3 224.1 249.3 224.1C249.3 224.1 249.3 223.6 249.8 223.1L250 222.5C250.2 221.7 250.9 220.6 250.9 220.6C250.9 220.6 251.4 221.8 251.9 222.3L253 223.3Z",fill:"#4D2A15"}),d.jsx("path",{d:"M259.8 218.9C259.8 218.9 260.3 220.2 260.5 222.1C260.7 223.9 260.5 226.1 260.5 226.1L259.1 223.6L258.6 221.3L257.7 220.5L256.9 220.4C256.9 220.4 257.6 220.1 257.6 219.5V218.7C258.3 218.972 259.062 219.041 259.8 218.9ZM254.9 226.7C254.9 226.7 256.1 225.1 256.4 223C256.7 221 256.4 220.3 256.4 220.3C256.4 220.3 255.9 220.2 255.4 219.8C254.9 219.4 254.4 218.4 254.4 218.4C254.4 218.4 254.6 219.4 254.4 220.8C254.2 222.2 253 223.3 253 223.3C253 223.3 253.6 223.5 254.2 223.2C255.4 222.5 255.2 221.2 255.2 221.2C255.2 221.2 255.5 221.4 255.5 223C255.5 224.6 254.9 226.7 254.9 226.7Z",fill:"#1E2121"}),d.jsx("path",{d:"M241 229.5C240.7 229.5 241.7 227.9 242.4 226.8L244.1 224.1C244.1 224.1 244.3 224.3 244.7 224.3C245.105 224.232 245.491 224.081 245.835 223.857C246.179 223.634 246.473 223.342 246.7 223L247.4 221C247.4 220.7 247.4 222.4 248.2 223.3C249 224.3 248.9 224.2 249.2 224.1C249.2 224.1 249.2 225.3 248.9 226.3L248.3 229C248.3 229 248.4 227 248.1 226.4C247.8 225.8 247.6 226.4 247.3 227.2C247 227.9 246.4 228.4 246.4 228.4L247.2 226.6C247.5 225.6 247.3 225.6 247.2 225.6L246.7 225.9C246.3 226.3 246.067 226.467 246 226.4C245.9 226.3 246.4 226.1 246.6 225.6C246.6 225.1 247.1 224.4 247.3 224.2L247.7 223.4C247.7 223.133 247.633 222.933 247.5 222.8C247.367 222.667 247 223 246.4 223.8C245.6 224.5 245.4 224.5 245.4 224.8L244.7 226.8L243.8 229.1L243.4 229.5L244 227.5C244.4 226.5 245 225 244.8 224.8C244.667 224.6 244.5 224.6 244.3 224.8C244.2 225 243.3 225.9 242.6 227C241.9 228.1 241.9 229.5 241.7 229.6L241 229.5Z",fill:"#8F4620"}),d.jsx("path",{d:"M260.5 217.7C260.5 217.8 260.6 218.7 259.8 218.9C259.141 219.097 258.435 219.061 257.8 218.8V217.6L260.5 217.7Z",fill:"#874F20"}),d.jsx("path",{d:"M244.8 220.3L244.2 222C243.7 223 243 223.7 243.1 223.8C243.2 223.9 243.6 224.4 244.3 224.3C245 224.2 245.1 220.5 245.1 220.5V220.3H244.8Z",fill:"#B27129"}),d.jsx("path",{d:"M254.8 218.2C254.8 218.2 254.4 223.2 253 223.2C251.6 223.2 251 220.7 251 220.7C251 220.7 250.8 224.2 249 224.2C248.1 224.2 247.3 221.5 247.4 221C247.4 221 247.1 222.8 246.2 223.5C244.5 224.9 243.4 224.2 243.4 224C243.3 223.8 244.8 222.3 245 220.3C245 220.433 245.234 220.267 245.7 219.8C246.1 219.133 246.434 218.767 246.7 218.7C247.2 218.7 249.3 217.8 249.3 217.8L250.3 216.5C250.3 216.5 250.5 216.9 251.3 216.4C251.763 216.041 252.111 215.554 252.3 215L254.5 216.8L254.7 218.2H254.8Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M249.1 213.3L251.3 216.3L251.8 215.9C252.066 216.3 252.166 216.633 252.1 216.9C251.8 217.6 251.1 218.7 251.6 219.9C251.533 219.833 251.6 219.333 251.8 218.4C252.066 217.6 252.3 217.267 252.5 217.4C252.7 217.4 253 222 253.3 222C253.6 222 254 219.9 254 218.4C254 216.9 254.3 218.1 254.5 218.4C254.6 218.7 255.9 220.8 257 220.4C258 220.2 258 218.2 257.9 217.8L257.1 214.8L252.2 211.8L251.8 213C251.5 213.8 249.1 213.3 249.1 213.3Z",fill:"#B27129"}),d.jsx("path",{d:"M256 212.8C256 212.8 256.3 213.1 256.8 214.3C257.3 215.5 257.3 219.4 256.8 219.4C256.1 219.4 254.8 218.7 254.6 218.1C254.4 217.6 254.7 215.7 254.3 215.1C253.841 214.43 253.503 213.686 253.3 212.9L253.4 211.4L254.5 211L256.1 212.8H256Z",fill:"#8F4620"}),d.jsx("path",{d:"M255.7 211.6L257.7 214.7L259.7 217.3L260.5 217.7C260.194 218.045 259.777 218.273 259.322 218.346C258.866 218.419 258.399 218.332 258 218.1C257.3 217.7 257.7 216.5 256.8 214.5C256.199 213.297 255.305 212.266 254.2 211.5L254.8 211L255.8 211.6H255.7Z",fill:"#4D2A15"}),d.jsx("path",{d:"M254.6 210C254.6 210 256.4 211.1 257.1 212.5L258.9 215.9C259.7 217.2 260.6 217.6 260.5 217.7C260.433 217.833 260.1 217.833 259.5 217.7L258.5 216.4L256.5 213C255.959 212.393 255.316 211.886 254.6 211.5L255.9 213.2C256.383 213.956 256.691 214.81 256.8 215.7L255.8 214.1C255.2 212.9 253.7 211.4 253.6 211.6L254.8 214L255.8 216.6L254.4 214.3C253.6 213 253.4 213.2 253.1 212.8L252 211.4C252 211.4 252.7 211.6 253.5 211.1C254.2 210.6 254.5 209.9 254.5 209.9L254.6 210Z",fill:"#1E2121"}),d.jsx("path",{d:"M249.8 213.3C249.8 213.3 251 213.6 251.7 213.5H252.6C252.6 213.5 253 214 253 214.6C253 215.2 252.5 216.3 252.4 216.4C252.2 216.4 252.2 215.4 251.9 215L249.9 213.3H249.8Z",fill:"#8F4620"}),d.jsx("path",{d:"M250.5 216.5C250.5 216.5 250.9 217.8 250.5 219.5C250.3 221.4 249.2 223.2 249 223.2C248.7 223.2 248.8 221.2 248.7 220.2V219.8L248.2 221C248.2 220.9 248.6 219.1 248.5 219V218.3L249.8 216.7L250.5 216.5Z",fill:"#B27129"}),d.jsx("path",{d:"M248.2 217.8C247.8 218.3 247.2 218.1 246.8 218.3C246.3 218.4 246.1 219.2 246.1 219.2C246.1 219.2 246.5 218.9 246.7 219C246.9 219.1 247.1 219 246.7 220C246.3 220.8 244.9 222.3 245 222.4C245 222.4 246.6 221.1 247 220.4C247.6 219.6 247.5 219.2 247.6 218.9C247.7 218.6 248.3 218.3 248.5 218.3C248.634 218.167 248.8 218.367 249 218.9L249.4 220.9L250.1 218.9L250.2 216.6L249.7 216.5L248.5 215.8C248.5 215.8 248.7 217.2 248.2 217.8Z",fill:"#8F4620"}),d.jsx("path",{d:"M254.6 208.6C254.6 208.6 255.1 209.9 254.1 210.7C253.833 210.967 253.467 211.133 253 211.2C252.4 211.2 251.6 210.7 251.6 210.7L248.5 209.4L246.8 208.9L246 208.7L246.1 207.8L248.6 207.9L251 208.9L252 209.2L253 209.3H253.6L254.2 209.2L254.5 208.9L254.6 208.6Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M254.6 208.6C254.7 208.8 254.4 209.6 254.2 209.6C254 209.8 253.467 209.833 252.6 209.7C251.6 209.5 250.7 208.9 249.6 208.7C248.667 208.3 247.833 208.1 247.1 208.1C246 208.1 246.6 207.7 246.6 207.7C246.6 207.7 248.5 207.5 250.1 208.1C251.7 208.7 252.4 209.1 253.2 209.1C254.4 209.1 254.6 208.6 254.6 208.6Z",fill:"#AB6D29"}),d.jsx("path",{d:"M246.1 207.7H246.8L247.3 207.5L247.2 208H246.2L246.1 207.7Z",fill:"#4D2A15"}),d.jsx("path",{d:"M252.2 211.5C252.2 211.5 253.3 212.5 253 213.5L251 212.5L247.5 211.1L245.7 210.5L245.4 210.2L246 209.6V209L248.3 209.3L250.7 210L252.2 211.5Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M249.9 213C249.9 213 251.9 215.5 251.4 216.4L246.9 213.4L245.2 216.1L241.5 214.3C241.5 214.3 244.5 212 244.9 211.5L245.2 210.9L246.9 211.3L249.6 212.1L249.9 213Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M248.8 209.3C248.8 209.3 250.4 209.7 251.5 210.3C252.5 210.7 253.9 210.9 253.9 210.9C253.9 210.9 253.3 211.5 252.2 211.5C251.733 211.367 251.2 211.033 250.6 210.5C249.7 209.7 248.6 209.7 248.6 209.7L248.8 209.3Z",fill:"#AB6D29"}),d.jsx("path",{d:"M246 208.4L247.9 209C248.6 209.3 248.6 209.2 248.9 209.2L249 209C249 209 249.2 209.7 248.6 209.7C248 209.7 247.9 209.5 247.2 209.2C246.5 208.9 246 209.2 246 209.2V208.4Z",fill:"#4D2A15"}),d.jsx("path",{d:"M252.3 212.9C252.3 212.9 253.2 213.4 253 213.5C252.867 213.633 252.434 213.733 251.7 213.8C251.1 213.8 250.6 213.733 250.2 213.6C249.6 213.4 249.4 212.5 248.2 212L245.9 211.2L244.9 211L245.7 210.7L248.3 211.2L250.5 211.9L251.8 212.5L252.3 212.9ZM248 214.4L248.5 216.4L248.2 217.7L247.5 218.1L246.9 217.9L246.7 217.5C246.7 217.5 247 217 246.7 216.6C246.4 216.2 245.1 215.6 245.1 215.6C245.1 215.6 245.6 214.6 246.1 214.4C246.8 214.2 246.5 213.4 246.5 213.4L248 214.4Z",fill:"#AB6D29"}),d.jsx("path",{d:"M245.4 210.2C245.4 210.2 245.8 210.6 246.7 210.7L248.4 211C248.6 211.1 249.2 210.8 249.3 210.8L248.8 211.1L250.8 211.8C251.7 212.2 252.4 212.8 252.4 212.8L250.8 212.1L248.4 211.4C246.8 211.1 245.3 211.2 244.9 211.1C244.5 211 245.1 211 245.2 210.8C245.4 210.533 245.466 210.333 245.4 210.2Z",fill:"#4D2A15"}),d.jsx("path",{d:"M251.2 215.8C251.2 215.8 251.7 216.4 251.2 216.6C250.7 216.8 249.2 216.7 248.6 216L248.2 215C247.9 214.7 246.9 214 246.2 213.7C245.7 213.3 246.5 213.2 246.5 213.2L249.4 214.5C250.2 214.9 251.2 215.8 251.2 215.8Z",fill:"#AB6D29"}),d.jsx("path",{d:"M251.3 215.9C251.3 215.9 250.3 214.5 247.3 213.3L248.2 213.1H246.7L246 212.8C244.4 212.4 244.3 212.4 244.2 212.2C244.134 212.067 244 212.167 243.8 212.5L243.2 213.3C243.848 213.098 244.536 213.063 245.2 213.2C246 213.4 246.267 213.7 246 214.1C246 214.4 244.9 215.7 245 215.7C245.1 215.7 245.7 214.5 246.5 214.7C247.234 214.967 247.567 215.167 247.5 215.3L247.4 214.6C247.2 214.4 246.4 213.6 246.6 213.6C246.8 213.6 247.8 213.9 249.2 214.6C250.6 215.3 250.8 215.5 251.2 215.9H251.3Z",fill:"#4D2A15"}),d.jsx("path",{d:"M246.5 213.6C246.5 213.6 248.7 214.3 248.6 216.6C248.6 219 246.8 218.6 246.6 217.7C246.4 216.8 246.9 218.1 247.5 218C248.167 217.867 248.433 217.3 248.3 216.3C248.3 215.5 248.033 214.9 247.5 214.5L246.5 213.6Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M236.8 208C236.8 208 237.1 208 236.4 209.8C236.01 211.023 235.362 212.148 234.5 213.1C232.7 215.1 231.9 215.1 232.1 215.9C232.3 216.8 233 216.6 233.1 216.6C233.3 216.6 236.6 211.8 236.6 211.8L237.3 209L237.1 208.2L236.9 207.9L236.8 208Z",fill:"#6C3F18"}),d.jsx("path",{d:"M244.9 204.5C244.9 204.5 245.9 205.9 245.5 208.5C245.2 211.2 241.7 213.5 241.7 213.5L236.7 217.1L234.5 216.9H233.9L233.2 216.5C233 216.5 232.8 215.5 232.8 215.5L233.4 214.7L235.3 212.9L236.4 211.2C236.4 211.2 237 210.2 237 209.3L236.9 207.9L237.3 208.6L237.5 210L237.3 211.6L238.7 210.6L240.4 209.9C240.4 209.9 240.9 209.8 241.3 208.9C241.6 207.9 241.9 206.4 241.9 205.7V204.3H242.1C242.1 204.4 242.6 205.3 242.6 205.7L242.9 207.9L243.8 207.1L244.5 205.9L244.9 204.5Z",fill:"#DBAD6C"}),d.jsx("path",{d:"M245.5 217.8C245.5 217.8 245.8 218 245.7 219C245.6 220 244.7 220.5 244.4 220.5V219.2L243.3 218.2L242.1 217.9L242.3 217.7C242.4 217.5 243.7 217 243.7 217L245.5 217.8Z",fill:"#904720"}),d.jsx("path",{d:"M244.6 217.8C244.6 217.8 244.9 218.1 245.5 218C246.1 217.9 246.3 217 246 216.6C245.7 216.2 245.8 217.4 245.5 217.6C245.1 217.6 244.7 216.6 244.2 216.6C243.7 216.4 242.9 216.8 242.7 217.1C242.5 217.4 243.5 217.1 243.5 217.1L244.1 217.3L244.5 217.4L244.6 217.8Z",fill:"#AB6D29"}),d.jsx("path",{d:"M237.2 214.1C237.2 214.1 237.9 214.3 238.6 214.2C239.3 214.1 241.1 213.4 241.1 213.4L242.5 212.4C243.1 211.7 245 210.6 245.2 208.2C245.4 205.9 244.9 204.5 244.9 204.5C244.9 204.5 247.7 207.5 245.2 211C243.6 213.3 242.2 214 242.2 214C242.2 214 245 213.2 245.2 213.9C245.4 214.5 245.1 215.5 245 215.7C245 215.7 246.5 216 246.8 216.8C246.9 217.3 245 216.3 243.6 216.6C242.829 216.792 242.132 217.21 241.6 217.8C241.6 217.8 241.3 217.4 240.1 217.4C238.8 217.4 238.2 218 237.5 217.9C236.8 217.8 234.5 217.4 234.1 216.8L235.6 215.1C236.3 213.8 237.2 214.1 237.2 214.1Z",fill:"#904720"}),d.jsx("path",{d:"M243 207.8C243 207.8 244.1 206.8 244.5 205.9L244.9 204.5C244.9 204.5 245 205.3 244.4 206.3L243 207.8Z",fill:"#AB6D29"}),d.jsx("path",{d:"M242.7 205.4C242.7 205.4 243.7 208.8 242.7 210.3C241.7 211.7 237.6 213.5 237.6 213.5C237.6 213.5 240.7 211.8 241.6 209.9C242.6 207.9 242.6 206.3 242.6 206.3L242.7 205.4Z",fill:"#904720"}),d.jsx("path",{d:"M238.6 214.2C238.6 214.2 239.9 214.2 240.6 213.7C241.4 213.3 242.5 212.3 242.5 212.3C242.5 212.3 241.5 213.2 241.2 213.2C240.866 213.067 240.733 212.8 240.8 212.4C240.8 212.4 240.6 213.1 240 213.5L238.6 214.2ZM241.6 209.9C241.6 209.9 242.8 208.7 242.8 206.3C242.8 203.9 241.8 204.3 241.8 204.3C241.8 204.3 242.6 204.9 242.4 206.7C242.3 208.6 241.7 209.9 241.7 209.9H241.6ZM243 210.1C243 210.1 244.3 209.8 244.7 209.1C245.2 208.3 245.2 206.9 245.2 206.9C245.2 206.9 245 208.2 244.7 208.7C244.3 209.2 243 210.1 243 210.1ZM242.3 217.7C242.3 217.7 242.9 216.5 243.7 216.7C244.6 217.1 244.6 217.7 244.6 217.7C244.6 217.7 244.3 217.3 243.6 217.2L242.3 217.7ZM239.9 215.5L242.9 214.7L245.2 213.9C245.2 213.9 244.3 214.9 243 215.8C241.466 216.467 240.633 216.733 240.5 216.6C240.3 216.4 243 215.5 243.2 215C243.2 215 240.8 215.7 239.9 215.5Z",fill:"#1E2121"}),d.jsx("path",{d:"M237 212.7C237.464 213.018 237.782 213.508 237.886 214.061C237.989 214.614 237.868 215.186 237.55 215.65C237.231 216.114 236.742 216.433 236.189 216.536C235.635 216.639 235.064 216.518 234.6 216.2",fill:"white"}),d.jsx("path",{d:"M236.9 212.9C237.192 213.225 237.364 213.64 237.385 214.076C237.407 214.512 237.278 214.942 237.02 215.295C236.762 215.647 236.39 215.899 235.968 216.009C235.545 216.12 235.098 216.081 234.7 215.9",fill:"#F16E16"}),d.jsx("path",{d:"M236 214C236.152 213.986 236.305 214.016 236.44 214.086C236.576 214.156 236.689 214.263 236.765 214.395C236.842 214.527 236.879 214.678 236.873 214.83C236.866 214.983 236.816 215.13 236.729 215.255C236.641 215.38 236.52 215.478 236.379 215.536C236.238 215.594 236.083 215.611 235.933 215.584C235.783 215.557 235.643 215.488 235.531 215.385C235.419 215.281 235.339 215.148 235.3 215",fill:"black"}),d.jsx("path",{d:"M236.2 214.9C236.187 214.966 236.148 215.025 236.092 215.062C236.035 215.1 235.967 215.113 235.9 215.1C235.834 215.087 235.776 215.048 235.738 214.991C235.701 214.935 235.687 214.866 235.7 214.8C235.695 214.763 235.7 214.725 235.716 214.69C235.731 214.656 235.756 214.627 235.787 214.606C235.819 214.585 235.855 214.573 235.893 214.572C235.931 214.571 235.968 214.581 236 214.6C236 214.6 236.2 214.7 236.2 214.9Z",fill:"#D5D3CA"}),d.jsx("path",{d:"M237.5 211.3C237.5 211.3 238.7 210.1 239 208.5V206L239.7 206.7L240 207.9L239.6 209.9L240.9 209.3C241.66 207.748 242.005 206.025 241.9 204.3C241.9 204.3 242.2 205 241.7 207.3C241.2 209.6 240.8 209.9 239.1 210.9C237.808 211.693 236.767 212.838 236.1 214.2L234.2 216.7C234.2 216.7 235.1 215.5 235.5 214.5C236.3 213.1 236.767 212.367 236.9 212.3L237.5 211.3Z",fill:"#AB6D29"}),d.jsx("path",{d:"M236.9 212.3C236.9 212.3 237.4 210.7 237.4 209.8C237.4 208.9 236.8 207.9 236.8 207.9C236.8 207.9 237.6 207.9 237.7 209.7C237.7 211.7 237.4 211.7 236.9 212.3Z",fill:"#904720"}),d.jsx("path",{d:"M239.3 210.3C239.3 210.3 239.9 208.8 239.9 207.9C239.9 206.9 239.1 206 239.1 206C239.1 206 240.1 206.2 240.1 208C240.1 209.7 239.9 209.7 239.3 210.3Z",fill:"#4D2A15"}),d.jsx("path",{d:"M233.7 216.8C233.7 216.8 233.2 216.2 233.3 215.8C233.4 215.4 233.3 215.2 234.4 214C235.21 213.293 235.888 212.446 236.4 211.5C236.7 210.9 237.6 209.2 236.9 207.9C236.9 207.9 237.4 209.9 236.3 211.3C235.561 212.434 234.65 213.447 233.6 214.3C232.6 215 232.6 215.3 232.6 215.7C232.6 216.1 232.7 216.367 232.9 216.5L233.7 216.8Z",fill:"#AB6D29"}),d.jsx("path",{d:"M244.4 220.5C244.4 220.5 244.6 220.5 244.8 220.2C244.933 219.933 244.833 219.533 244.5 219C244.168 218.552 243.717 218.206 243.2 218L241.6 217.8C241.6 217.8 241.9 218.4 242.6 218.8C243 219 243.6 218.8 244 219.1C244.3 219.5 244.4 220.5 244.4 220.5Z",fill:"#6C4119"}),d.jsx("path",{d:"M244.4 220.5C244.4 220.5 245.6 220.1 245.7 218.9L245.6 217.9C245.6 217.9 245.8 218.3 246.3 218.5L246.7 218.3C246.7 218.3 246 220.6 244.4 220.5Z",fill:"#6C4119"}),d.jsx("path",{d:"M235.8 220.3L236.5 220.9L237.2 221.6L240.2 220.8L241.2 219.9L240.3 218.6H238.2L235.8 220.3Z",fill:"#BF802D"}),d.jsx("path",{d:"M243 219.3L242.5 218.5C242.5 218.5 242.3 218.2 241.9 218C241.5 217.8 239.7 217.8 239.7 217.8L238.4 218C238.4 218 238 218.4 237.4 218.2L235.2 217.5L233.8 216.8C233.8 216.8 232.7 216.4 232.4 216.5C232.2 216.5 231.4 217.5 231.4 217.5C231.4 217.5 231.1 218.1 231.5 218.1C231.8 218.1 231 218.3 231 218.3C231 218.3 228.7 219.5 228.4 221.7C228.1 223.9 232.1 227.2 233.6 225.5C233.6 225.5 231.4 223.9 231.8 222.5C232.2 221.167 233.266 220.4 235 220.2C236.7 220.2 236.8 219.9 237.6 219.4C238.3 218.8 239.7 218.5 240.8 219.6C241.8 220.7 236.8 221.7 236.8 221.7L237.4 222.5C237.4 222.5 243.5 220.4 243 219.3Z",fill:"#F9C83A",stroke:"#8F4620",strokeWidth:"0.3"}),d.jsx("path",{d:"M231.5 224.5C231.5 224.5 229 223.9 229.2 221.6C229.31 220.869 229.621 220.183 230.098 219.619C230.574 219.054 231.198 218.632 231.9 218.4C232.3 218.3 232.2 217.1 232.6 217C233 216.9 233.8 217 234.2 217.3C234.5 217.7 235.3 218 235.3 218C235.3 218 230.9 220 230.8 222.5C230.8 224.2 231.5 224.5 231.5 224.5Z",fill:"#FCF3D8"}),d.jsx("path",{d:"M243 219C243 219 242.7 219.2 242.6 219C242.2 218.2 241.1 218 240.2 218C239.1 218 238.3 218.4 237.5 218.4L236.1 218.2C235.1 218.2 233.3 216.8 232.8 216.9C232.4 217.167 232.233 217.5 232.3 217.9C232.3 218.1 231.5 218.2 231.3 217.9C231.1 217.6 232 216.5 232.8 216.5C234.9 216.5 236.5 217.9 237.5 217.9C238.5 217.9 238.8 217.4 240.2 217.4C241.6 217.4 243 218 243 219Z",fill:"#FDEAAF"}),d.jsx("path",{d:"M236.2 220.7L237.9 220.1L239.7 219.5L238.1 220.5L236.4 220.9L236.2 220.7Z",fill:"#513625"}),d.jsx("path",{d:"M232.6 225.8C232.466 226 231.666 225.7 230.2 224.9C228 223.7 228.4 222.4 228.4 222.4C228.4 222.4 228.1 220.9 229.6 219.4C231 217.8 231.2 218.3 231.3 218.4V218.5L230 219.5L229.3 220.6L228.8 221.6V222.6L229.5 223.8L231.5 225.1L232.6 225.8Z",fill:"#F9C83A"}),d.jsx("path",{d:"M231.9 217.2V217L231.7 217.1L231.9 217.2ZM231.9 217.2H231.7V217.3L231.9 217.2ZM231.9 217.2H231.7L231.3 217.7L231.1 218.2C231.1 218.4 231.2 218.567 231.4 218.7H232.6V218.4L232.4 218.3H231.6V218L231.9 217.6V217.2ZM231.9 217.2V217L231.8 216.8C231.762 216.795 231.724 216.8 231.69 216.816C231.655 216.831 231.626 216.856 231.605 216.887C231.584 216.919 231.573 216.955 231.572 216.993C231.571 217.03 231.58 217.068 231.6 217.1L231.9 217.2Z",fill:"#8B5122"}),d.jsx("path",{d:"M236.1 219.3L233.1 220.2C232.8 220.4 234 220.2 234.9 220.2H236.7C237.9 219.7 240.3 218.8 240.5 219.8C240.7 220.8 237.2 221.5 237.2 221.5V221.8L240 221.1L241.4 220.4L241.9 219.6L240.5 218.6H238.5L237.5 218.9L236.1 219.3Z",fill:"#F9C83A"}),d.jsx("path",{d:"M231.8 223.6C232 224.2 232.5 225.1 233 225.4C233 225.667 232.567 225.733 231.7 225.6C230.7 225.3 229.3 224.9 228.4 222.3V222.8L228.9 223.8L229.9 224.8L231.3 225.8L232.3 226L233.2 225.8L233.6 225.5L232.7 224.7L231.7 222.9V223.6H231.8Z",fill:"#8F4620"}),d.jsx("path",{d:"M241.7 250.1V251.1H241.1L241.2 249.8L241.7 250.1ZM237.9 222.6L236.9 221.5H236.3L237.3 222.9L237.9 222.6Z",fill:"#FCCA3D"}),d.jsx("path",{d:"M241.6 252.4L240.3 251.6L238.3 251.1V251.4H238.5L240.2 251.9L241.5 252.6L241.6 252.4ZM241.6 249.9H239.4C238.6 250.167 238.2 250.367 238.2 250.5L238.3 250.7C238.899 250.243 239.649 250.029 240.4 250.1H241.5L241.6 249.9ZM241.3 247.8L239.3 248.8L237.9 249.8L238.1 250L238.5 249.7L239.4 249.1L241.4 248.1L241.3 247.8ZM239.9 245.6L239.7 246.6L239.2 247.2L237.9 248.6L237.2 249.3L237.3 249.5L238.5 248.3L239.4 247.3L239.9 246.7C240.166 246.1 240.266 245.767 240.2 245.7H239.9V245.6ZM238.2 244.6C238.352 245.196 238.317 245.824 238.1 246.4L237.3 248.1L236.9 248.9L236.8 249.2H237C237 249.2 238 247.5 238.3 246.5L238.5 245.3V244.6H238.2ZM236.5 244.4V245.4L236.4 246.7L235.9 248.2L235.6 249H235.8L236.6 246.8C236.8 246.333 236.866 245.833 236.8 245.3V244.4H236.5ZM235.2 244.4V245.4L235.1 246.9L234.7 248.9H234.9L235 248.3L235.3 247C235.5 246.1 235.5 244.4 235.5 244.4H235.2ZM233.9 244.7V246.9C233.6 247.7 233.5 248.9 233.5 248.9H233.8L234.1 247V244.6L233.9 244.7ZM232.8 244.7V244.9L232.5 246.7L232.1 248.2L231.9 249L232.1 249.1L232.8 246.8L233 244.9V244.8H232.8V244.7ZM231.5 244.8V245.3C231.5 245.833 231.4 246.4 231.2 247C230.933 247.533 230.6 247.933 230.2 248.2L229.5 248.7H229.4L229.5 248.9C229.5 248.9 230.9 248.1 231.5 247.1C231.779 246.367 231.881 245.58 231.8 244.8H231.5ZM230.8 244.6V244.7L230 246.2L229 247.2L228.5 247.4L228.3 247.5L228.4 247.8C228.4 247.8 229.6 247.1 230.2 246.4C230.7 245.7 231 244.6 231 244.6H230.8ZM229.6 244V244.1L229.2 244.6C229.2 244.8 229.1 244.967 228.9 245.1L228.1 245.6L227.6 245.9L227.7 246.1L228.2 245.8L229 245.3L229.6 244.6L229.8 244.1L229.6 244ZM229 243.2L228.8 243.5L228.1 244.2L227.7 244.6L227.4 244.8V245L228 244.7L229.2 243.4L229 243.2ZM228.8 242.7L228.6 242.9L227.9 243.3L227.2 243.6V243.9C227.4 243.9 227.566 243.833 227.7 243.7L228.9 242.9L228.8 242.7ZM228.5 242.2L227.9 242.5L227.5 242.7L227.1 242.9V243.1L227.6 243L228.6 242.4L228.5 242.2ZM228.3 241.1L227.8 241.5L227.1 241.8V242C227.5 242 227.833 241.867 228.1 241.6L228.5 241.3L228.3 241.1ZM228.3 239.3L227.9 239.7L227.3 240.5L227.2 240.6V240.9L227.4 240.8L227.5 240.6C227.5 240.4 227.7 240.167 228.1 239.9L228.4 239.7L228.5 239.5L228.3 239.3ZM236.9 229.1H238.2V229L238.1 229.1V229H238V228.9H238.1H236.9V229.1ZM236.9 228.3L237.5 228.2L238.3 227.7L238.6 227.4H238.9V227.1L238.4 227.3L237.6 227.8L236.9 228.1V228.3ZM236.9 227.1L237.4 226.9L238.4 226.3L239.1 226V225.7L238.6 225.9L237.6 226.5L236.8 226.9V227.1H236.9ZM236.4 226.1L237.6 225.1L238.9 224.2L238.8 224L237.5 225L236.3 225.8L236.4 226.1ZM235.6 224.8L238.2 222.9L238 222.7L235.4 224.6L235.6 224.8ZM234.4 223.5L235.9 222.5L237.1 221.7L237 221.5L235.8 222.3L234.3 223.3L234.4 223.5ZM233.6 222.8L235.7 221.3L236.3 220.9V220.7L235.6 221L233.4 222.6L233.6 222.8Z",fill:"#816C2A"}),d.jsx("path",{d:"M235.6 220.3L237.6 222.3C238.467 223.367 238.933 224.467 239 225.6V226C238.727 227.496 238.033 228.884 237 230C235.5 231.9 233.2 233.5 231.4 235.1C230.5 235.831 229.693 236.67 229 237.6C228.39 238.41 228.042 239.387 228 240.4V240.5C228 241.567 228.333 242.467 229 243.2C229.597 244.034 230.492 244.607 231.5 244.8H232.1C233.5 244.8 235.1 244.3 236.6 244.3C237.8 244.233 238.967 244.733 240.1 245.8C241.1 246.9 241.4 248.7 241.4 250.4L241.1 253.7L240.8 255.2H241C241 255.2 241.7 252.9 241.7 250.4C241.7 248.7 241.3 246.8 240.3 245.6C239.819 245.109 239.243 244.723 238.606 244.465C237.97 244.207 237.287 244.082 236.6 244.1C235 244.1 233.5 244.5 232.1 244.5H231.5C231.034 244.462 230.583 244.316 230.184 244.073C229.785 243.829 229.448 243.496 229.2 243.1C228.663 242.335 228.351 241.434 228.3 240.5V240.4C228.3 239.133 228.833 237.967 229.9 236.9C231.3 235.3 233.5 233.7 235.4 231.9C237.4 230.3 239 228.4 239.3 225.9V225.6C239.3 224.2 238.3 222.8 237.4 221.7L235.6 220V220.3Z",fill:"#78732E"}),d.jsx("path",{d:"M233.7 222.8L233.4 222.5L233.1 222.6L233.6 223L233.7 222.8ZM234.5 223.5L234.3 223.3H234.1L234.3 223.6L234.5 223.5Z",fill:"#A8AC71"}),d.jsx("path",{d:"M235.6 224.8L235.4 224.5L235.3 224.7L235.6 224.8ZM236.4 226V225.8H236.1L236.4 226.1V226ZM236.9 227.2V226.9H236.8L236.9 227.2ZM227.2 241L227.3 240.4C227.4 240.1 227.1 240.5 227.1 240.5V240.9H227.2V241Z",fill:"#78732E"}),d.jsx("path",{d:"M227.1 241.7V242.1H227.2L227.1 241.7Z",fill:"white"}),d.jsx("path",{d:"M227.2 243.1V242.8H227V243.3L227.2 243.1Z",fill:"#78732E"}),d.jsx("path",{d:"M227.3 243.9V243.6H227.1V243.9H227.3ZM227.8 246.2L227.6 245.8V246.2H227.8Z",fill:"white"}),d.jsx("path",{d:"M228.5 247.8L228.4 247.5H228.2L228.5 247.8ZM229.7 248.9L229.3 248.6C229.1 248.4 229.2 248.8 229.2 248.8L229.5 249L229.7 248.9ZM237.5 249.5L237.2 249.3L237.4 249.6V249.5H237.5Z",fill:"#A8AC71"}),d.jsx("path",{d:"M238.2 250L237.9 249.8V250H238.1H238.2Z",fill:"white"}),d.jsx("path",{d:"M238.3 250.3L238.1 250.5L238.4 250.7L238.3 250.3Z",fill:"#A8AC71"}),d.jsx("path",{d:"M238 252.6V252.3L237.8 252.6H238ZM226 210.9C226 210.9 226.5 210.8 226.1 211.3L226.4 210.9L226.2 210.8L226 210.9Z",fill:"white"}),d.jsx("path",{d:"M235.7 220L236 220.3L235.6 220.2L235.7 220Z",fill:"#F9C83A"}),d.jsx("path",{d:"M236 220.3H235.4L235.6 220.2L236 220.3Z",fill:"#8F4620"}),d.jsx("path",{d:"M240.7 255.3C240.7 255.3 241.1 255.3 241.2 255C241.4 254.8 241.2 255.3 241.2 255.3L240.9 255.4L240.7 255.3Z",fill:"#977C2E"})]}),d.jsxs("defs",{children:[d.jsxs("radialGradient",{id:"paint0_radial_4989_137735",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(2.78573 1.17983 -1.15213 2.79993 234.885 267.814)",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"white"}),d.jsx("stop",{offset:"1",stopColor:"#F15770"})]}),d.jsxs("radialGradient",{id:"paint1_radial_4989_137735",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(-0.27566 -2.98743 2.7721 -0.263226 214.229 257.819)",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"white"}),d.jsx("stop",{offset:"1",stopColor:"#F15770"})]}),d.jsxs("radialGradient",{id:"paint2_radial_4989_137735",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(1.00364 1.19767 -2.32347 2.00377 290.391 274.461)",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"white"}),d.jsx("stop",{offset:"1",stopColor:"#F15770"})]}),d.jsx("clipPath",{id:"clip0_4989_137735",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})]})]}),Lj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_myr)",children:[d.jsx("path",{d:"M0 0H512V36.6H0V0Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 36.6001H512V73.0001H0V36.6001Z",fill:"white"}),d.jsx("path",{d:"M0 73.1001H512V109.7H0V73.1001Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 109.7H512V146.3H0V109.7Z",fill:"white"}),d.jsx("path",{d:"M0 146.3H512V182.9H0V146.3Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 182.9H512V219.4H0V182.9Z",fill:"white"}),d.jsx("path",{d:"M0 219.4H512V256H0V219.4Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 256H512V292.6H0V256Z",fill:"white"}),d.jsx("path",{d:"M0 292.6H512V329H0V292.6Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 329.1H512V365.7H0V329.1Z",fill:"white"}),d.jsx("path",{d:"M0 365.7H512V402.3H0V365.7Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 402.3H512V438.9H0V402.3Z",fill:"white"}),d.jsx("path",{d:"M0 438.9H512V475.4H0V438.9Z",fill:"#CC0000"}),d.jsx("path",{d:"M0 475.4H512V512H0V475.4Z",fill:"white"}),d.jsx("path",{d:"M0 0H256V292.6H0V0Z",fill:"#000066"}),d.jsx("path",{d:"M166 93.0001L170.8 125.5L189.2 98.3001L179.2 129.6L207.7 113L185.2 137L218 134.4L187.3 146.3L218 158L185.2 155.5L207.7 179.5L179.3 162.8L189.1 194.3L170.7 167L165.9 199.5L161.2 167L142.8 194.2L152.7 162.8L124.3 179.5L146.7 155.5L113.9 158L144.6 146.2L114 134.3L146.8 136.9L124.3 112.9L152.7 129.5L142.7 98.1001L161.2 125.4L166 92.8001V93.0001Z",fill:"#FFCC00"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_myr",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Aj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_ngn)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M341.3 0H512V512H341.3V0ZM0 0H170.7V512H0V0Z",fill:"#008753"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_ngn",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Ej=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_nok)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#ED2939"}),d.jsx("path",{d:"M128 0H256V512H128V0Z",fill:"white"}),d.jsx("path",{d:"M0 192H512V320H0V192Z",fill:"white"}),d.jsx("path",{d:"M160 0H224V512H160V0Z",fill:"#002664"}),d.jsx("path",{d:"M0 224H512V288H0V224Z",fill:"#002664"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_nok",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),xj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_npr)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 505.5H385.3L137.4 254.1L394.7 254.4L6.6 6.5V505.5H6.5Z",fill:"#CE0000",stroke:"#000063",strokeWidth:"13"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M180.7 371.8L153.7 380.8L174.9 400.6L146.4 398.8L158.1 425L132.6 412.7L133.1 441.3L114.3 420.4L103.6 447L94.4 420.7L74.1 441.3L75.9 413.6L49 425L61.6 400L32.3 400.6L53.8 382.3L26.5 371.8L53.5 362.8L32.2 343L60.6 344.8L49 318.6L74.6 330.9L74.1 302.3L92.9 323.2L103.6 296.6L112.7 322.9L133.1 302.3L131.2 330L158.2 318.6L145.5 343.6L174.9 343L153.4 361.3L180.7 371.8Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_npr",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),kj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_nzd)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#00247D"}),d.jsx("path",{d:"M396.394 157.728V166.813L414.564 157.728H396.394Z",fill:"#CC142B"}),d.jsx("path",{d:"M468.428 221.214L468.428 228.785L483.569 221.214L468.428 221.214Z",fill:"#CC142B"}),d.jsx("path",{d:"M312.462 242.252L312.462 251.337L330.632 242.252L312.462 242.252Z",fill:"#CC142B"}),d.jsx("path",{d:"M396.394 374.857V385.456L417.592 374.857H396.394Z",fill:"#CC142B"}),d.jsx("path",{d:"M0 0H256V256H0V0Z",fill:"#012169"}),d.jsx("path",{d:"M256 0V32L161 128L256 221.5V256H222.5L127 162L34 256H0V222L93 128.5L0 37V0H31L127 94L220 0H256Z",fill:"white"}),d.jsx("path",{d:"M0 104V152H256V104H0ZM104 0V256H152V0H104Z",fill:"#C8102E"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_nzd",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),$j=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_php)",children:[d.jsx("path",{d:"M0 0H512V256H0V0Z",fill:"#0038A8"}),d.jsx("path",{d:"M0 256H512V512H0V256Z",fill:"#CE1126"}),d.jsx("path",{d:"M443.4 256L0 512V0",fill:"white"}),d.jsx("path",{d:"M158.9 148L152.3 154.6L155.5 204.9L152.2 205.2L146.2 159.3L140.7 164.7L148.9 205.7C142.32 207.03 136.067 209.647 130.5 213.4L107.2 178.6H99.5L127.7 215.4L125.2 217.5L91.9 179.5H82.5V189L120.5 222.3L118.3 224.8L81.5 196.6V204.3L116.3 227.6C112.583 233.174 110 239.427 108.7 246L67.7 237.8L62.2 243.3L108.2 249.3L107.8 252.7L57.5 249.4L50.8 256L57.5 262.6L107.8 259.4L108.1 262.7L62.2 268.7L67.6 274.2L108.6 266C109.931 272.58 112.547 278.833 116.3 284.4L81.5 307.7V315.4L118.3 287.2L120.4 289.7L82.4 323V332.4H92L125.3 294.4L127.8 296.6L99.6 333.4H107.3L130.6 298.6C136.175 302.317 142.427 304.9 149 306.2L140.8 347.2L146.3 352.7L152.3 306.7L155.6 307.1L152.4 357.4L159 364.1L165.6 357.4L162.4 307.1L165.7 306.8L171.7 352.7L177.2 347.3L169 306.3C175.58 304.969 181.833 302.353 187.4 298.6L210.7 333.4H218.4L190 296.6L192.5 294.5L225.8 332.5H235.2V323L197.2 289.7L199.4 287.2L236.2 315.4V307.7L201.4 284.4C205.117 278.825 207.7 272.573 209 266L250 274.2L255.5 268.7L209.5 262.7L209.9 259.4L260.2 262.6L266.9 256L260.2 249.4L209.9 252.7C209.9 251.5 209.8 250.367 209.6 249.3L255.5 243.3L250.1 237.8L209.1 246C207.769 239.42 205.153 233.167 201.4 227.6L236.2 204.3V196.6L199.4 224.8L197.3 222.3L235.3 189V179.6H225.8L192.5 217.6L190 215.4L218.2 178.6H210.5L187.2 213.4C181.625 209.682 175.373 207.1 168.8 205.8L177 164.8L171.5 159.3L165.5 205.3L162.2 204.9L165.4 154.6L158.9 148Z",fill:"#FCD116"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_php",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Sj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_pkr)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-95 0H673V512H-95V0Z",fill:"#0C590B"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-95 0H97.5V512H-95V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M403.7 225.4L372.5 218.8L356.1 246.1L352.7 214.5L321.7 207.3L350.7 194.3L348 162.6L369.4 186.2L398.7 173.8L382.8 201.4L403.8 225.4H403.7Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M415.4 306C408.766 320.54 399.318 333.622 387.6 344.49C375.882 355.358 362.128 363.797 347.131 369.32C332.133 374.842 316.191 377.339 300.223 376.667C284.256 375.994 268.579 372.165 254.1 365.4C239.541 358.674 226.45 349.142 215.578 337.352C204.706 325.561 196.265 311.743 190.739 296.687C185.213 281.631 182.709 265.634 183.372 249.609C184.034 233.585 187.85 217.848 194.6 203.3C201.378 188.208 211.228 174.695 223.522 163.623C235.815 152.552 250.283 144.166 266 139C261.882 142.428 257.943 146.066 254.2 149.9C234.69 171.507 224.333 199.846 225.313 228.941C226.293 258.036 238.533 285.614 259.453 305.859C280.372 326.104 308.336 337.435 337.448 337.461C366.56 337.487 394.544 326.207 415.5 306H415.4Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_pkr",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Tj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_pln)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M512 512H0V0H512V512Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M512 512H0V256H512V512Z",fill:"#DC143C"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_pln",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Ij=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_qar)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#8D1B3D"}),d.jsx("path",{d:"M0 0V512H113L217.2 483.6L113 455L217.2 426.6L113 398.2L217.2 369.8L113 341.3L217.2 313L113 284.4L217.2 256L113 227.6L217.2 199L113 170.7L217.2 142.2L113 113.8L217.2 85.3L113 57L217.2 28.6L113 0H0Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_qar",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Mj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_ron)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H170.7V512H0V0Z",fill:"#00319C"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M170.7 0H341.3V512H170.7V0Z",fill:"#FFDE00"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M341.3 0H512V512H341.3V0Z",fill:"#DE2110"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_ron",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Pj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_sar)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-128 0H639.882V511.922H-128V0Z",fill:"#165D31"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M65.519 145.113C64.6933 157.086 63.558 178.14 73.7758 180.308C86.0578 181.443 79.2459 159.459 83.684 155.537C84.6129 153.473 86.161 153.473 86.2642 156.053V174.631C86.161 180.824 90.083 182.475 93.1793 183.817C96.482 183.507 98.5462 183.611 99.8879 186.707L101.333 219.012C101.333 219.012 108.867 221.076 109.177 200.847C109.59 188.977 106.803 178.966 108.454 176.695C108.454 174.425 111.344 174.322 113.408 175.354C116.608 177.624 118.053 180.514 123.007 179.276C130.645 177.212 135.186 173.496 135.392 167.716",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M354.197 362.577C363.383 362.886 369.369 362.99 377.522 363.919L387.018 362.886C397.648 361.854 398.164 378.058 398.164 378.058C398.061 387.554 394.346 387.966 389.701 388.999C387.018 389.411 385.573 387.45 384.231 385.386C382.511 386.074 380.137 386.212 377.11 385.799L365.756 385.283C361.628 384.973 359.461 385.799 355.435 385.386C354.507 386.728 353.371 388.482 350.997 387.966C348.933 387.76 346.456 381.877 347.179 377.542C348.624 374.343 348.211 375.375 348.107 373.93Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_sar",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Rj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_sek)",children:[d.jsx("path",{d:"M0 0H512V512H0V0Z",fill:"#005293"}),d.jsx("path",{d:"M134 0V204.8H0V307.2H134V512H236.4V307.2H512V204.8H236.4V0H134Z",fill:"#FECB00"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_sek",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Oj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_sgd)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-20 0H748.007V512.029H-20V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-20 0H748.007V255.978H-20V0Z",fill:"#DF0000"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M157.155 42.916C136.944 47.2463 118.839 58.3997 105.881 74.5026C92.9228 90.6056 85.9005 110.677 85.9937 131.346C86.087 152.015 93.29 172.023 106.393 188.008C119.496 203.994 137.701 214.983 157.949 219.131C144.316 223.121 129.941 223.888 115.96 221.373C101.979 218.857 88.7741 213.126 77.3866 204.634C65.9991 196.141 56.7408 185.119 50.342 172.436C43.9433 159.753 40.5792 145.757 40.5151 131.551C40.451 117.346 43.6888 103.32 49.9728 90.58C56.2569 77.8399 65.4155 66.7344 76.7259 58.1394C88.0364 49.5445 101.189 43.6954 115.147 41.0535C129.105 38.4116 143.486 39.0492 157.155 42.916Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M125.943 117.332L112.288 107.362L129.267 107.218L134.469 91.106L139.887 107.218H156.793L143.211 117.332L148.413 133.444L134.613 123.546L120.886 133.516L125.943 117.332Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_sgd",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Nj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_thb)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#F4F5F8"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 173.4H512V344H0V173.4Z",fill:"#2D2A4A"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V88H0V0ZM0 426.7H512V512H0V426.7Z",fill:"#A51931"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_thb",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Fj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_try)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#E30A17"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M348.8 264C348.8 334.6 290.5 391.9 218.7 391.9C146.9 391.9 88.6001 334.6 88.6001 263.9C88.6001 193.2 146.8 136.1 218.6 136.1C290.4 136.1 348.9 193.3 348.9 264H348.8Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M355.3 264C355.3 320.5 308.7 366.3 251.2 366.3C193.7 366.3 147.2 320.5 147.2 264C147.2 207.5 193.7 161.7 251.2 161.7C308.7 161.7 355.2 207.5 355.2 264H355.3Z",fill:"#E30A17"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M374.1 204.2L373.1 251.5L328.9 263.5L372.4 279L371.4 322.3L399.7 288.5L442.6 303.3L417.8 267L448 230.9L401.6 243.7L374.1 204.2Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_try",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),jj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_twd)",children:[d.jsx("path",{d:"M0 0H768V512H0V0Z",fill:"#FF0000"}),d.jsx("path",{d:"M0 0H384V256H0V0Z",fill:"#000095"}),d.jsx("path",{d:"M214.3 115.1L204.9 105.7L192 102.3L179.1 105.7L169.7 115.1L166.3 128L169.7 140.9L179.1 150.3L192 153.7L204.9 150.3L214.3 140.9L217.7 128L214.3 115.1Z",fill:"white"}),d.jsx("path",{d:"M192 182.4C222.044 182.4 246.4 158.044 246.4 128C246.4 97.9557 222.044 73.6 192 73.6C161.956 73.6 137.6 97.9557 137.6 128C137.6 158.044 161.956 182.4 192 182.4Z",fill:"#000095"}),d.jsx("path",{d:"M192 176C218.51 176 240 154.51 240 128C240 101.49 218.51 80 192 80C165.49 80 144 101.49 144 128C144 154.51 165.49 176 192 176Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_twd",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Dj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_uah)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V512H0V0Z",fill:"#FFD700"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H512V256H0V0Z",fill:"#0057B8"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_uah",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Uj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_vnd)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-128 0H640.007V512.029H-128V0Z",fill:"#DA251D"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M349.566 381.113L259.977 314.211L170.894 381.764L204.056 271.945L115.045 204.176L225.153 203.236L259.254 93.7792L294.151 203.02L404.258 203.164L315.753 271.584L349.566 381.113Z",fill:"#FFFF00"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_vnd",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Wj=e=>d.jsxs("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsxs("g",{clipPath:"url(#clip0_zar)",children:[d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M82.23 512.093L335.766 341.463H696.085V512.093H82.23Z",fill:"#000C8A"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M65.9358 0H696.188V170.732H335.663C335.663 170.732 69.3176 -1.63968 65.9358 0Z",fill:"#E1392D"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-71.8999 64.05V104.325L153.966 255.995L-71.8999 407.665V448.043L212.585 255.995L-71.8999 64.05Z",fill:"#FFB915"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-71.8999 64.05V0H22.9966L324.288 203.935H696.085V308.157H324.288L22.9966 511.99H-71.8999V448.043L212.585 255.995L-71.8999 64.05Z",fill:"#007847"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.9966 0H82.23L335.766 170.732H696.085V203.935H324.288L22.9966 0ZM22.9966 512.093H82.23L335.766 341.463H696.085V308.26H324.288L22.9966 512.093Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-71.8999 407.768V104.427L153.966 255.995L-71.8999 407.768Z",fill:"#000001"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_zar",children:d.jsx("rect",{width:"512",height:"512",rx:"256",fill:"white"})})})]}),Vj={US:"usd",MX:"mxn",BR:"brl",GB:"gbp",AT:"eur",BE:"eur",HR:"eur",CY:"eur",EE:"eur",FI:"eur",FR:"eur",DE:"eur",GR:"eur",IE:"eur",IT:"eur",LV:"eur",LT:"eur",LU:"eur",MT:"eur",NL:"eur",PT:"eur",SK:"eur",SI:"eur",ES:"eur",AD:"eur",MC:"eur",SM:"eur",VA:"eur",XK:"eur",ME:"eur",CN:"cny",JP:"jpy",IN:"inr",CA:"cad",KR:"krw",AU:"aud",ID:"idr",SA:"sar",TR:"try",CH:"chf",TW:"twd",SE:"sek",NG:"ngn",PL:"pln",AR:"ars",AE:"aed",TH:"thb",ZA:"zar",DK:"dkk",EG:"egp",MY:"myr",SG:"sgd",CO:"cop",PH:"php",CL:"clp",BD:"bdt",VN:"vnd",CZ:"czk",IL:"ils",HK:"hkd",NZ:"nzd",PK:"pkr",RO:"ron",KZ:"kzt",NO:"nok",HU:"huf",UA:"uah",KW:"kwd",QA:"qar",ET:"etb",MA:"mad",BG:"bgn",KE:"kes",NP:"npr"},Hj={usd:{symbol:"$",name:"US Dollar",icon:d.jsx((e=>d.jsxs("svg",{width:"256",height:"256",viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("g",{clipPath:"url(#clip0_4989_137730)",children:d.jsxs("g",{clipPath:"url(#clip1_4989_137730)",children:[d.jsx("path",{d:"M-65.3379 -3.625H434.837V259.625H-65.3379",fill:"#B31942"}),d.jsx("path",{d:"M-65.3379 26.75H434.837ZM434.837 67.25H-65.3379ZM-65.3379 107.75H434.837ZM434.837 148.25H-65.3379ZM-65.3379 188.75H434.837ZM434.837 229.25H-65.3379Z",fill:"black"}),d.jsx("path",{d:"M-65.3379 26.75H434.837M434.837 67.25H-65.3379M-65.3379 107.75H434.837M434.837 148.25H-65.3379M-65.3379 188.75H434.837M434.837 229.25H-65.3379",stroke:"white",strokeWidth:"20.25"}),d.jsx("path",{d:"M-65.3379 -3.625H134.732V138.125H-65.3379",fill:"#0A3161"}),d.jsx("path",{d:"M1.352 16.625L6.11306 31.278L-6.35156 22.2219H9.05555L-3.40906 31.278L1.352 16.625Z",fill:"white"}),d.jsx("path",{d:"M1.352 44.975L6.11306 59.628L-6.35156 50.5719H9.05555L-3.40906 59.628L1.352 44.975Z",fill:"white"}),d.jsx("path",{d:"M1.352 73.325L6.11306 87.978L-6.35156 78.9219H9.05555L-3.40906 87.978L1.352 73.325Z",fill:"white"}),d.jsx("path",{d:"M1.352 101.675L6.11306 116.328L-6.35156 107.272H9.05555L-3.40906 116.328L1.352 101.675Z",fill:"white"}),d.jsx("path",{d:"M18.0248 2.44998L22.7859 17.103L10.3213 8.04694H25.7284L13.2638 17.103L18.0248 2.44998Z",fill:"white"}),d.jsx("path",{d:"M18.0248 30.8L22.7859 45.453L10.3213 36.3969H25.7284L13.2638 45.453L18.0248 30.8Z",fill:"white"}),d.jsx("path",{d:"M18.0248 59.15L22.7859 73.803L10.3213 64.7469H25.7284L13.2638 73.803L18.0248 59.15Z",fill:"white"}),d.jsx("path",{d:"M18.0248 87.5L22.7859 102.153L10.3213 93.0969H25.7284L13.2638 102.153L18.0248 87.5Z",fill:"white"}),d.jsx("path",{d:"M18.0248 115.85L22.7859 130.503L10.3213 121.447H25.7284L13.2638 130.503L18.0248 115.85Z",fill:"white"}),d.jsx("path",{d:"M34.6977 16.625L39.4588 31.278L26.9941 22.2219H42.4013L29.9366 31.278L34.6977 16.625Z",fill:"white"}),d.jsx("path",{d:"M34.6977 44.975L39.4588 59.628L26.9941 50.5719H42.4013L29.9366 59.628L34.6977 44.975Z",fill:"white"}),d.jsx("path",{d:"M34.6977 73.325L39.4588 87.978L26.9941 78.9219H42.4013L29.9366 87.978L34.6977 73.325Z",fill:"white"}),d.jsx("path",{d:"M34.6977 101.675L39.4588 116.328L26.9941 107.272H42.4013L29.9366 116.328L34.6977 101.675Z",fill:"white"}),d.jsx("path",{d:"M51.3696 2.44992L56.1306 17.103L43.666 8.04688H59.0731L46.6085 17.103L51.3696 2.44992Z",fill:"white"}),d.jsx("path",{d:"M51.3696 30.7999L56.1306 45.453L43.666 36.3969H59.0731L46.6085 45.453L51.3696 30.7999Z",fill:"white"}),d.jsx("path",{d:"M51.3696 59.1499L56.1306 73.803L43.666 64.7469H59.0731L46.6085 73.803L51.3696 59.1499Z",fill:"white"}),d.jsx("path",{d:"M51.3696 87.4999L56.1306 102.153L43.666 93.0969H59.0731L46.6085 102.153L51.3696 87.4999Z",fill:"white"}),d.jsx("path",{d:"M51.3696 115.85L56.1306 130.503L43.666 121.447H59.0731L46.6085 130.503L51.3696 115.85Z",fill:"white"}),d.jsx("path",{d:"M68.0424 16.625L72.8035 31.278L60.3389 22.2219H75.746L63.2814 31.278L68.0424 16.625Z",fill:"white"}),d.jsx("path",{d:"M68.0424 44.9749L72.8035 59.628L60.3389 50.5719H75.746L63.2814 59.628L68.0424 44.9749Z",fill:"white"}),d.jsx("path",{d:"M68.0424 73.325L72.8035 87.978L60.3389 78.9219H75.746L63.2814 87.978L68.0424 73.325Z",fill:"white"}),d.jsx("path",{d:"M68.0424 101.675L72.8035 116.328L60.3389 107.272H75.746L63.2814 116.328L68.0424 101.675Z",fill:"white"}),d.jsx("path",{d:"M84.7143 2.44998L89.4754 17.103L77.0107 8.04694H92.4179L79.9532 17.103L84.7143 2.44998Z",fill:"white"}),d.jsx("path",{d:"M84.7143 30.8L89.4754 45.453L77.0107 36.3969H92.4179L79.9532 45.453L84.7143 30.8Z",fill:"white"}),d.jsx("path",{d:"M84.7143 59.15L89.4754 73.803L77.0107 64.7469H92.4179L79.9532 73.803L84.7143 59.15Z",fill:"white"}),d.jsx("path",{d:"M84.7143 87.5L89.4754 102.153L77.0107 93.0969H92.4179L79.9532 102.153L84.7143 87.5Z",fill:"white"}),d.jsx("path",{d:"M84.7143 115.85L89.4754 130.503L77.0107 121.447H92.4179L79.9532 130.503L84.7143 115.85Z",fill:"white"}),d.jsx("path",{d:"M101.387 16.625L106.148 31.278L93.6836 22.2219H109.091L96.6261 31.278L101.387 16.625Z",fill:"white"}),d.jsx("path",{d:"M101.387 44.975L106.148 59.628L93.6836 50.5719H109.091L96.6261 59.628L101.387 44.975Z",fill:"white"}),d.jsx("path",{d:"M101.387 73.325L106.148 87.978L93.6836 78.9219H109.091L96.6261 87.978L101.387 73.325Z",fill:"white"}),d.jsx("path",{d:"M101.387 101.675L106.148 116.328L93.6836 107.272H109.091L96.6261 116.328L101.387 101.675Z",fill:"white"}),d.jsx("path",{d:"M118.06 2.44995L122.821 17.103L110.356 8.04691H125.764L113.299 17.103L118.06 2.44995Z",fill:"white"}),d.jsx("path",{d:"M118.06 30.8L122.821 45.453L110.356 36.3969H125.764L113.299 45.453L118.06 30.8Z",fill:"white"}),d.jsx("path",{d:"M118.06 59.15L122.821 73.803L110.356 64.7469H125.764L113.299 73.803L118.06 59.15Z",fill:"white"}),d.jsx("path",{d:"M118.06 87.4999L122.821 102.153L110.356 93.0969H125.764L113.299 102.153L118.06 87.4999Z",fill:"white"}),d.jsx("path",{d:"M118.06 115.85L122.821 130.503L110.356 121.447H125.764L113.299 130.503L118.06 115.85Z",fill:"white"})]})}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"clip0_4989_137730",children:d.jsx("rect",{width:"256",height:"256",rx:"128",fill:"white"})}),d.jsx("clipPath",{id:"clip1_4989_137730",children:d.jsx("rect",{width:"500.175",height:"263.25",fill:"white",transform:"translate(-65.3379 -3.625)"})})]})]})),{})},eur:{symbol:"€",name:"Euro",icon:d.jsx(dj,{})},gbp:{symbol:"£",name:"British Pound",icon:d.jsx(cj,{})},mxn:{symbol:"$",name:"Mexican Peso",icon:d.jsx(bj,{})},brl:{symbol:"R$",name:"Brazilian Real",icon:d.jsx(QF,{})},cny:{symbol:"¥",name:"Chinese Yuan",icon:d.jsx(rj,{})},jpy:{symbol:"¥",name:"Japanese Yen",icon:d.jsx(mj,{})},inr:{symbol:"₹",name:"Indian Rupee",icon:d.jsx(yj,{})},cad:{symbol:"$",name:"Canadian Dollar",icon:d.jsx(ej,{})},krw:{symbol:"₩",name:"South Korean Won",icon:d.jsx(wj,{})},aud:{symbol:"$",name:"Australian Dollar",icon:d.jsx(YF,{})},idr:{symbol:"Rp",name:"Indonesian Rupiah",icon:d.jsx(hj,{})},sar:{symbol:"﷼",name:"Saudi Riyal",icon:d.jsx(Pj,{})},try:{symbol:"₺",name:"Turkish Lira",icon:d.jsx(Fj,{})},chf:{symbol:"CHF",name:"Swiss Franc",icon:d.jsx(tj,{})},twd:{symbol:"NT$",name:"New Taiwan Dollar",icon:d.jsx(jj,{})},sek:{symbol:"kr",name:"Swedish Krona",icon:d.jsx(Rj,{})},ngn:{symbol:"₦",name:"Nigerian Naira",icon:d.jsx(Aj,{})},pln:{symbol:"zł",name:"Polish Zloty",icon:d.jsx(Tj,{})},ars:{symbol:"$",name:"Argentine Peso",icon:d.jsx(GF,{})},aed:{symbol:"د.إ",name:"UAE Dirham",icon:d.jsx(qF,{})},thb:{symbol:"฿",name:"Thai Baht",icon:d.jsx(Nj,{})},zar:{symbol:"R",name:"South African Rand",icon:d.jsx(Wj,{})},dkk:{symbol:"kr",name:"Danish Krone",icon:d.jsx(sj,{})},egp:{symbol:"E£",name:"Egyptian Pound",icon:d.jsx(oj,{})},myr:{symbol:"RM",name:"Malaysian Ringgit",icon:d.jsx(Lj,{})},sgd:{symbol:"$",name:"Singapore Dollar",icon:d.jsx(Oj,{})},cop:{symbol:"$",name:"Colombian Peso",icon:d.jsx(ij,{})},php:{symbol:"₱",name:"Philippine Peso",icon:d.jsx($j,{})},clp:{symbol:"$",name:"Chilean Peso",icon:d.jsx(nj,{})},bdt:{symbol:"৳",name:"Bangladeshi Taka",icon:d.jsx(JF,{})},vnd:{symbol:"₫",name:"Vietnamese Dong",icon:d.jsx(Uj,{})},czk:{symbol:"Kč",name:"Czech Koruna",icon:d.jsx(aj,{})},ils:{symbol:"₪",name:"Israeli Shekel",icon:d.jsx(fj,{})},hkd:{symbol:"$",name:"Hong Kong Dollar",icon:d.jsx(uj,{})},nzd:{symbol:"$",name:"New Zealand Dollar",icon:d.jsx(kj,{})},pkr:{symbol:"₨",name:"Pakistani Rupee",icon:d.jsx(Sj,{})},ron:{symbol:"lei",name:"Romanian Leu",icon:d.jsx(Mj,{})},kzt:{symbol:"₸",name:"Kazakhstani Tenge",icon:d.jsx(Cj,{})},nok:{symbol:"kr",name:"Norwegian Krone",icon:d.jsx(Ej,{})},huf:{symbol:"Ft",name:"Hungarian Forint",icon:d.jsx(pj,{})},uah:{symbol:"₴",name:"Ukrainian Hryvnia",icon:d.jsx(Dj,{})},kwd:{symbol:"د.ك",name:"Kuwaiti Dinar",icon:d.jsx(vj,{})},qar:{symbol:"﷼",name:"Qatari Riyal",icon:d.jsx(Ij,{})},etb:{symbol:"Br",name:"Ethiopian Birr",icon:d.jsx(lj,{})},mad:{symbol:"د.م.",name:"Moroccan Dirham",icon:d.jsx(_j,{})},bgn:{symbol:"лв",name:"Bulgarian Lev",icon:d.jsx(XF,{})},kes:{symbol:"KSh",name:"Kenyan Shilling",icon:d.jsx(gj,{})},npr:{symbol:"₨",name:"Nepalese Rupee",icon:d.jsx(xj,{})}},hB={usd:[["asset","Currency"],["bank_beneficiary_name","Beneficiary name"],["bank_beneficiary_address","Beneficiary address"],["bank_account_number","Account number"],["bank_routing_number","Routing number"],["bank_name","Bank name"],["bank_address","Bank address"]],eur:[["asset","Currency"],["account_holder_name","Account holder"],["iban","IBAN"],["bic","BIC / SWIFT"],["bank_name","Bank name"],["bank_address","Bank address"]],mxn:[["asset","Currency"],["account_holder_name","Account holder"],["clabe","CLABE"],["bank_name","Bank name"],["bank_address","Bank address"]],brl:[["asset","Currency"],["account_holder_name","Account holder"],["br_code","PIX code"],["bank_name","Bank name"],["bank_address","Bank address"]],gbp:[["asset","Currency"],["account_holder_name","Account holder"],["account_number","Account number"],["sort_code","Sort code"],["bank_name","Bank name"],["bank_address","Bank address"]]},S8=e=>{let[,t]=navigator.language.toUpperCase().split("-");if(!t)return;let n=Vj[t];return e.find((r=>r===n))};class za extends Error{constructor(){super("Back navigation"),this.name="BackNavigationError"}}const T8=()=>{let{openModal:e,closePrivyModal:t,privy:n}=Q(),{setModalData:r,navigate:i}=Ft();return g.useMemo((()=>({fund:a=>{if(a.source.assets.length<1)throw Error("Invalid input: expected non-empty source.assets");let s=a.source.defaultAsset??S8(a.source.assets)??a.source.assets[0],o={...a,source:{...a.source,selectedAsset:s}};return new Promise(((l,c)=>{r({FundWithBankDepositScreen:{onSuccess:async()=>{await t({shouldCallAuthOnSuccess:!1,isSuccess:!0}),l({})},onFailure:async u=>{await t({shouldCallAuthOnSuccess:!1,isSuccess:!1}),c(u)},getCustomer:async({kycRedirectUrl:u})=>{let p={provider:o.provider};return u&&(p.kyc_redirect_url=u),await n.fetchPrivyRoute(cv,{query:p})},createOrUpdateCustomer:async({hasAcceptedTerms:u,kycRedirectUrl:p})=>await n.fetchPrivyRoute(uv,{body:{provider:o.provider,has_accepted_terms:u,kyc_redirect_url:p}}),getOrCreateVirtualAccount:async u=>await n.fetchPrivyRoute(pv,{body:u}),onBack:a.showBackButton?()=>{c(new za)}:void 0,opts:o}}),a.showBackButton?i("FundWithBankDepositScreen"):e("FundWithBankDepositScreen")}))}})),[t,i,e,n])},I8=(e,t)=>e.length>0?null:3>parseFloat(t)?"amount_too_low":"provider_errors";let Zj=new Set(["BANK","BANK_TRANSFER","SEPA"]),Bj=new Set(["coinbase","coinbase-sandbox","moonpay","moonpay-sandbox"]),zj=e=>{let t=e.payment_method_category??e.payment_method;return Zj.has(t)};const M8=(e,t)=>{if(e.length===0)return null;if(!t)return e[0]??null;if(t==="BANK"){let n=e.filter(zj);return n.find((r=>Bj.has(r.provider)))??n[0]??e[0]??null}return e.find((n=>(n.payment_method_category??n.payment_method)===t))??e[0]??null},hr=kn((()=>null)),as=e=>{hr.getState()!==null?hr.setState(e):console.warn("[FiatOnramp] setState skipped — no active flow")},uo=()=>{let e=hr.getState();if(!e)throw Error("Unexpected call to getFiatOnrampFlowState");return e},fB=()=>{let e=uo();return e.localQuotes??e.initialQuotes},Kj=e=>e.localSelectedQuote??(e.localQuotes===null?e.initialSelectedQuote:null),yB=()=>Kj(uo()),[mB,qj]=((e,t=750)=>{let n;return[(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{e(...r)}),t)},()=>{n&&clearTimeout(n)}]})((async(e,t)=>{let{getQuotes:n,flowId:r}=uo();as({isLoading:!0});try{let i=await n({source:{asset:t.source.selectedAsset.toUpperCase(),amount:e},destination:{asset:t.destination.asset,chain:t.destination.chain,address:t.destination.address},environment:t.environment});if(hr.getState()?.flowId!==r)return;let a=i.quotes??[],s=i.provider_errors,o=I8(a,e);as({localQuotes:a,localSelectedQuote:M8(a,t.paymentMethod),isLoading:!1,quotesWarning:o,quotesErrors:s??null,destinationCurrencySymbol:i.destination_currency_symbol??null,destinationCurrencyIconUrl:i.destination_currency_icon_url??null,destinationNetworkIconUrl:i.destination_network_icon_url??null})}catch{if(hr.getState()?.flowId!==r)return;as({localQuotes:[],localSelectedQuote:null,quotesWarning:"provider_errors",quotesErrors:null})}})),Gj=()=>{let{stripeSession:e,controller:t}=uo();e&&(t.current?.abort(),e.onramp.destroy(),as({stripeSession:null}))};let Yj=["arbitrum","base","ethereum","polygon","solana","tempo","worldchain"];const Jj=e=>Yj.includes(e);class P8 extends x{constructor(t){super(t,void 0,R.ONRAMP_WALLET_OWNERSHIP_REQUIRED),this.name="WalletOwnershipUnavailableError"}}const gB=async({onramp:e,walletAddress:t,network:n,signMessage:r})=>{if(!Jj(n))throw new P8("This network does not yet support wallet ownership verification. Try a different network.");let i=await e.getWalletOwnershipChallenge({walletAddress:t,network:n}),a=await r(i.message);return await e.submitWalletOwnershipSignature({challengeId:i.challengeId,signature:a})},ep=()=>{let{openModal:e,closePrivyModal:t,privy:n}=Q(),{navigate:r}=Ft(),{user:i}=it(),{wallets:a}=sa(),{wallets:s}=KF(),o=g.useRef(null),l=g.useRef({ethereum:a,solana:s});return l.current={ethereum:a,solana:s},g.useMemo((()=>({fund:async c=>{let{reject:u,resolve:p,promise:h}=Ba(),f=c.source.assets??Object.keys(Hj);if(f.length<1)return u(Error("Invalid input: expected non-empty source.assets")),await h;if(hr.getState())return u(Error("Existing fiat onramp flow in progress")),await h;let y=c.source.defaultAsset??S8(f)??f[0],m={...c,environment:c.environment??"production",source:{...c.source,assets:f,selectedAsset:y}},w=async F=>await n.fetchPrivyRoute(hv,{body:F}),E=async()=>{o.current?.abort(),e(null),await t({shouldCallAuthOnSuccess:!1,isSuccess:!0}),setTimeout((()=>{hr.setState(null)}),0)},_=c.showBackButton?()=>(function({controller:F,reject:H}){qj(),Gj(),F.current?.abort(),hr.setState(null),H(new za)})({controller:o,reject:u}):void 0,C=Symbol("fiat-onramp-flow");hr.setState({onSuccess:async F=>{await E(),p(F)},onFailure:async F=>{await E(),u(F)},onBack:_,getQuotes:w,getProviderUrl:async F=>await n.fetchPrivyRoute(fv,{body:F}),getStatus:async F=>await n.fetchPrivyRoute(yv,{query:{...F}}),controller:o,flowId:C,opts:m,amount:m.defaultAmount??"0",state:{status:"select-amount"},error:null,isLoading:!0,quotesWarning:null,quotesErrors:null,initialQuotes:null,initialSelectedQuote:null,localQuotes:null,localSelectedQuote:null,destinationCurrencyIconUrl:null,destinationCurrencySymbol:null,destinationNetworkIconUrl:null,stripeElement:null,stripeSession:null,stripeConfirmCheckoutDetails:null,email:i?.email?.address??null,phone:i?.phone?.number?QE(i.phone.number):null,signWalletOwnershipMessage:async F=>{let{destination:H}=uo().opts,ae=Xj({chain:H.chain,address:H.address,ethereumWallets:l.current.ethereum,solanaWallets:l.current.solana});if(!ae)throw new P8("Connect the destination wallet to verify ownership, then try again.");return await ae(F)},privy:n}),c.showBackButton?r("FiatOnrampScreen"):e("FiatOnrampScreen");let k=await w({source:{asset:m.source.selectedAsset.toUpperCase(),amount:m.defaultAmount??"0"},destination:{asset:m.destination.asset,chain:m.destination.chain,address:m.destination.address},environment:m.environment}).catch((()=>({quotes:[]})));if(hr.getState()?.flowId!==C)return await h;let S=k.quotes,b=k.provider_errors;return as({initialQuotes:S,initialSelectedQuote:M8(S,m.paymentMethod),quotesWarning:I8(S,m.defaultAmount??"0"),quotesErrors:b??null,isLoading:!1,destinationCurrencySymbol:k.destination_currency_symbol??null,destinationCurrencyIconUrl:k.destination_currency_icon_url??null,destinationNetworkIconUrl:k.destination_network_icon_url??null}),await h}})),[e,t,n,r,i])};let Xj=({chain:e,address:t,ethereumWallets:n,solanaWallets:r})=>{if(e.startsWith("eip155:")){let i=n.find((a=>Xa(a.address,t)));return i?async a=>await i.sign(a):null}if(e.startsWith("solana:")){let i=r.find((a=>a.address===t));return i?async a=>{let{signature:s}=await i.signMessage({message:Mt.utf8.toBytes(a)});return qa.encode(s)}:null}return null};const Hi=kn((()=>null)),Nr=()=>Hi.setState(null);function Qj(e){switch(e.step){case"complete":return{outcome:"completed",step:"complete"};case"failed":return{outcome:"failed",step:"failed",errorCode:"DEPOSIT_FAILED"};case"refunded":return{outcome:"refunded",step:"refunded",errorCode:"DEPOSIT_REFUNDED"};default:return null}}function eD(e){switch(e.step){case"complete":case"failed":case"refunded":return null;case"error":return{outcome:"failed",step:"error",errorCode:e.code};default:return{outcome:"abandoned",step:e.step}}}function tp(e,t){return n=>{e({eventName:n.eventName,payload:{...n.payload,flowId:t}})}}const ra=kn((()=>null)),ss=e=>{ra.getState()!==null&&ra.setState(e)},Hc=()=>ra.setState(null);async function R8(e,t){let n=await e.fetchPrivyRoute(m5,{}),r={config:{status:"ready",data:{currencies:n.currencies,chains:n.chains}}};t?.aborted||ss(r)}function tD(){let e=ra(),{closePrivyModal:t,privy:n,createAnalyticsEvent:r}=Q(),i=e?.flowId,a=g.useMemo((()=>i?tp(r,i):()=>{}),[r,i]),s=e?.params??null,o=e?.config??{status:"loading"},l=g.useCallback((p=>{let h=t0(i);if(!h||(ss({modalState:p}),h.modalState.step===p.step))return;a({eventName:"sdk_deposit_address_step_viewed",payload:{step:p.step,...p.step==="error"?{errorCode:p.code}:{}}});let f=Qj(p);f&&a({eventName:"sdk_deposit_address_concluded",payload:f})}),[a,i]),c=g.useCallback((async()=>{let p=e?.controller;if(s&&p&&!p.signal.aborted){ss({config:{status:"loading"}});try{await R8(n,p.signal)}catch(h){if(p.signal.aborted)return;throw ss({config:{status:"error",error:h instanceof Error?h:Error("Failed to load deposit config")}}),h}}}),[s,n,e?.controller]),u=g.useCallback((()=>{let p=t0(i);if(!p)return;let{modalState:h}=p;a({eventName:"sdk_deposit_address_exited",payload:{step:h.step,...h.step==="error"?{errorCode:h.code}:{}}});let f=eD(h);f&&a({eventName:"sdk_deposit_address_concluded",payload:f}),h.step==="complete"?p.onComplete():h.step==="failed"?p.onError(Error("DEPOSIT_FAILED")):h.step==="error"?p.onError(Error(h.code)):h.step==="refunded"?p.onError(Error("DEPOSIT_REFUNDED")):p.onError(Error("USER_EXITED")),t({shouldCallAuthOnSuccess:!1})}),[i,t,a]);return{modalState:e?.modalState??{step:"intro"},setModalState:l,config:o,retryConfig:c,params:s,close:u,onBack:e?.onBack,createDepositAddressEvent:a}}function t0(e){let t=ra.getState();return t&&t.flowId===e?t:null}function wB(e){let{modalState:t,config:n,params:r,...i}=tD();if((function(a,s){if(a.step!==s)throw Error("UNEXPECTED_STATE")})(t,e),!r||n.status!=="ready")throw Error("UNEXPECTED_STATE");return{state:t,configData:n.data,params:r,...i}}const O8=()=>{let{openModal:e,privy:t,createAnalyticsEvent:n}=Q(),{navigate:r}=Ft();return g.useMemo((()=>({createDepositAddress:async i=>{let{resolve:a,reject:s,promise:o}=Ba();if(!Dn.getState().user)throw Error("User must be authenticated to create a deposit address");if(!i.destinationChain)throw Error("Invalid input: expected destinationChain");if(!i.destinationCurrency)throw Error("Invalid input: expected destinationCurrency");if(!i.destinationAddress)throw Error("Invalid input: expected destinationAddress");if(ra.getState())return s(Error("Existing deposit address flow in progress")),await o;let l={entrySource:i.entrySource??"direct",flowId:i.flowId??crypto.randomUUID()},c=tp(n,l.flowId),u=new AbortController;ra.setState({controller:u,...l,onComplete:()=>{Hc(),a()},onError:p=>{Hc(),s(p)},onBack:i.showBackButton?()=>{c({eventName:"sdk_deposit_address_exited",payload:{step:"intro"}}),c({eventName:"sdk_deposit_address_concluded",payload:{outcome:"abandoned",step:"intro"}}),u.abort(),Hc(),s(new za)}:void 0,params:{destinationChain:i.destinationChain,destinationCurrency:i.destinationCurrency,destinationAddress:i.destinationAddress,refundAddress:i.refundAddress,slippageBps:i.slippageBps},config:{status:"loading"},modalState:{step:"intro"}}),c({eventName:"sdk_deposit_address_started",payload:{destinationChain:i.destinationChain,destinationCurrency:i.destinationCurrency,backNavigationEnabled:!!i.showBackButton,entrySource:l.entrySource}}),c({eventName:"sdk_deposit_address_step_viewed",payload:{step:"intro"}}),i.showBackButton?r("DepositAddressScreen"):e("DepositAddressScreen");try{await R8(t,u.signal)}catch(p){if(u.signal.aborted)return await o;ss({config:{status:"error",error:p instanceof Error?p:Error("Failed to load deposit config")},modalState:{step:"error",code:"ROUTE_UNAVAILABLE"}}),c({eventName:"sdk_deposit_address_step_viewed",payload:{step:"error",errorCode:"ROUTE_UNAVAILABLE"}})}return await o}})),[e,r,t,n])},Fs=kn((()=>null)),N8=(e,t)=>{let n=Fs.getState();n===null||n.controller.signal.aborted||t!=null&&n.flowId!==t||Fs.setState(e)},Zc=()=>Fs.setState(null);async function nD(e,t,n){let r=await e.fetchPrivyRoute(Zw,{}),i={config:{status:"ready",data:{currencies:r.currencies,chains:r.chains}}};t?.aborted||N8(i,n)}let n0=["usd","eur","mxn","brl","gbp"],rD={mode:"all"},r0=e=>e.type==="wallet"&&(e.walletClientType==="privy"||e.walletClientType==="privy-v2"),iD=({destinationWallet:e,chain:t,user:n})=>{if(e){let i=((a,s)=>{let o=a.linkedAccounts.filter(r0);return o.find((l=>l.id===s))??o.find((l=>Xa(l.address,s)))??null})(n,e);return i?{walletId:i.id??null,address:i.address}:Bl(e,{strict:!1})?{walletId:null,address:e}:{walletId:null,address:null}}let r=((i,a)=>{let s=La.resolveChainAlias(a).startsWith("solana:")?"solana":"ethereum";return i.linkedAccounts.find((o=>r0(o)&&!o.imported&&o.chainType===s&&o.walletIndex===0))??null})(n,t);return r?{walletId:r.id??null,address:r.address}:{walletId:null,address:null}},aD=e=>e?n0.filter((t=>e.includes(t))):[...n0],sD=(e,t)=>{if(e.toLowerCase()!=="usdc")return e;let n=Number(t.split(":")[1]);return(Number.isFinite(n)?Pl[n]:void 0)??e};const oD=()=>{let{fund:e}=ep(),{fund:t}=T8(),{openCryptoDeposit:n}=(()=>{let{openModal:l,privy:c,createAnalyticsEvent:u}=Q(),{navigate:p}=Ft();return g.useMemo((()=>({openCryptoDeposit:async h=>{let{resolve:f,reject:y,promise:m}=Ba();if(!Dn.getState().user)throw Error("User must be authenticated to create a deposit address");if(!h.walletId)throw Error("Invalid input: expected walletId");if(h.type!=="inline_route")throw Error('Invalid input: expected type "inline_route"');if(!h.source)throw Error("Invalid input: expected source");if(!h.destination?.asset)throw Error("Invalid input: expected destination.asset");if(!h.destination.chain)throw Error("Invalid input: expected destination.chain");if(Fs.getState())return y(Error("Existing deposit address flow in progress")),await m;let w={entrySource:h.entrySource??"direct",flowId:h.flowId??crypto.randomUUID()},E=tp(u,w.flowId),_=new AbortController;Fs.setState({controller:_,...w,onComplete:C=>{_.abort(),Zc(),f(C)},onError:C=>{_.abort(),Zc(),y(C)},onBack:h.showBackButton?()=>{E({eventName:"sdk_deposit_address_exited",payload:{step:"intro"}}),E({eventName:"sdk_deposit_address_concluded",payload:{outcome:"abandoned",step:"intro"}}),_.abort(),Zc(),y(new za)}:void 0,params:{walletId:h.walletId,type:"inline_route",source:h.source,destination:h.destination,slippageBps:h.slippageBps,depositAddressStrategy:h.depositAddressStrategy},config:{status:"loading"},depositAccounts:{status:"idle"},modalState:{step:"intro"}}),E({eventName:"sdk_deposit_address_started",payload:{destinationChain:h.destination.chain,destinationCurrency:h.destination.asset,backNavigationEnabled:!!h.showBackButton,entrySource:w.entrySource}}),E({eventName:"sdk_deposit_address_step_viewed",payload:{step:"intro"}}),h.showBackButton?p("DepositAddressV3Screen"):l("DepositAddressV3Screen");try{await nD(c,_.signal,w.flowId)}catch(C){if(_.signal.aborted)return await m;N8({config:{status:"error",error:C instanceof Error?C:Error("Failed to load deposit config")},modalState:{step:"error",code:"ROUTE_UNAVAILABLE"}},w.flowId),E({eventName:"sdk_deposit_address_step_viewed",payload:{step:"error",errorCode:"ROUTE_UNAVAILABLE"}})}return await m}})),[l,p,c,u])})(),{openModal:r,closePrivyModal:i,createAnalyticsEvent:a,privy:s}=Q(),{navigate:o}=Ft();return g.useMemo((()=>({depositFunds:async l=>{let c,u;if(!l.destination?.chain)throw Error("Invalid input: expected destination.chain");if(!l.destination?.asset)throw Error("Invalid input: expected destination.asset");let p=Dn.getState().user;if(!p)throw Error("User must be authenticated to deposit funds");if(Hi.getState())throw Error("Existing funding flow in progress");if(l.fiat?.source?.assets?.length===0)throw Error("Invalid input: expected non-empty fiat.source.assets");let{resolve:h,reject:f,promise:y}=Ba(),m=crypto.randomUUID(),w=(function(N,xe){return ke=>{N({eventName:ke.eventName,payload:{...ke.payload,flowId:xe}})}})(a,m),E=!1,_=()=>c??{};w({eventName:"sdk_deposit_funds_started",payload:{hasFiat:!!l.fiat,hasCrypto:!!l.crypto}});let C=N=>{w({eventName:"sdk_deposit_funds_concluded",payload:{outcome:"completed",method:N.method,..._()}}),Nr(),h(N)};if(!l.fiat&&!l.crypto){let N=Error("At least one of fiat or crypto config must be provided");return Hi.setState({error:N.message,onCancel:async()=>{w({eventName:"sdk_deposit_funds_concluded",payload:{outcome:"error"}}),Nr(),r(null),await i({shouldCallAuthOnSuccess:!1,isSuccess:!1}),f(N)}}),r("AddFundsSelectionScreen"),await y}let k=La.resolveChainAlias(l.destination.chain),{walletId:S,address:b}=iD({destinationWallet:l.destination.wallet,chain:l.destination.chain,user:p});if(l.fiat&&!b)throw Error("Invalid input: expected destination.wallet or a destination address");if(l.crypto&&!S)throw Error("Invalid input: expected destination.wallet to be a Privy wallet");let F=(l.fiat?.environment??"production")==="sandbox"?"bridge-sandbox":"bridge",H=b?{asset:sD(l.destination.asset,k),chain:k,address:b}:null,ae=H?(N=>{if(!N.chain.includes(":"))return null;let xe=N.chain;if(N.asset.toLowerCase()==="usdc")return{asset:"usdc",chain:xe,address:N.address};let ke=Number(xe.split(":")[1]),be=Number.isFinite(ke)?Pl[ke]:void 0;return be&&Bl(N.asset)&&Xa(N.asset,be)?{asset:"usdc",chain:xe,address:N.address}:null})(H):null,G=aD(l.fiat?.source?.assets),he=()=>l.fiat&&ae&&G.length!==0?u??=(async()=>{try{return(await s.fetchPrivyRoute(mv,{query:{provider:F}})).enabled}catch{return!1}})():Promise.resolve(!1),Be=async N=>{if(!l.fiat||!H)return;w({eventName:"sdk_deposit_funds_action",payload:{action:"method_selected",method:N??"CREDIT_DEBIT_CARD",..._()}});let xe=l.fiat.source?.defaultAsset;if(N==="BANK"&&await he()&&ae)try{await t({source:{assets:G,defaultAsset:xe&&G.includes(xe)?xe:void 0},destination:ae,provider:F,showBackButton:!0}),C({method:"fiat",status:"submitted"})}catch(ke){Ae(ke)}else try{let ke=await e({source:l.fiat.source??{},destination:H,environment:l.fiat.environment,defaultAmount:l.fiat.defaultAmount,showBackButton:!0,paymentMethod:N});C({method:"fiat",status:ke.status})}catch(ke){Ae(ke)}},fe=async(N="splash")=>{if(l.crypto&&S){N==="splash"&&w({eventName:"sdk_deposit_funds_action",payload:{action:"method_selected",method:"crypto",..._()}});try{let xe={walletId:S,type:"inline_route",source:l.crypto.source??rD,destination:{asset:l.destination.asset,chain:l.destination.chain},slippageBps:l.crypto.slippageBps,depositAddressStrategy:l.crypto.depositAddressStrategy,showBackButton:!!l.fiat,entrySource:"unified_funding",flowId:m},ke=await n(xe);C({method:"crypto",status:ke})}catch(xe){Ae(xe)}}},Ie=()=>{Hi.setState({startFiat:l.fiat?Be:void 0,startCrypto:l.crypto?fe:void 0,recordRowsViewed:N=>{c=N,E||(E=!0,w({eventName:"sdk_deposit_funds_step_viewed",payload:{step:"pay_with",..._()}}))},onCancel:async()=>{w({eventName:"sdk_deposit_funds_exited",payload:{step:"pay_with",..._()}}),w({eventName:"sdk_deposit_funds_concluded",payload:{outcome:"abandoned",step:"pay_with",..._()}}),Nr(),r(null),await i({shouldCallAuthOnSuccess:!1,isSuccess:!1}),f(Error("User cancelled funding"))}})},Ae=N=>{if((xe=>xe instanceof za)(N))return Ie(),void o("AddFundsSelectionScreen");(xe=>{w({eventName:"sdk_deposit_funds_concluded",payload:{outcome:"error",..._()}}),Nr(),f(xe)})(N)};return l.crypto&&!l.fiat?fe("auto"):(Ie(),he(),r("AddFundsSelectionScreen")),await y}})),[i,a,e,t,o,n,r,s])},lD=()=>{let{privy:e}=Q(),{signWithUserSigner:t}=la();return g.useMemo((()=>({createCryptoDepositAccount:n=>La.createCryptoDepositAccount(e,t,n),getQuote:n=>La.getCryptoDepositAccountQuote(e,n),getOrder:n=>La.getCryptoDepositAccountOrder(e,n),getNextOrder:n=>La.getCryptoDepositAccountNextOrder(e,n)})),[e,t])};let i0=class{async init(){if(!this.api)throw new x("Auth flow has no API instance");let{nonce:t,expires_at:n}=await this.api.post(mS,{});return{nonce:t,expiresAt:n}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new x("Auth flow has no message, signature, or fid");if(!this.api)throw new x("Auth flow has no API instance");try{let t=await this.api.post(gS,{message:this.message,signature:this.signature,fid:this.fid});if(!t)throw new x("No response from authentication");return t}catch(t){throw qe(t)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:n,fid:r}){this.message=t,this.signature=n,this.fid=r}constructor(){this.meta={}}};function dD(e){return e.find((t=>t.walletClientType==="privy"&&t.connectorType==="embedded"&&!t.imported))??null}function js(){let e=new URLSearchParams(window.location.search),t=e.get("privy_oauth_code"),n=e.get("privy_oauth_state"),r=e.get("privy_oauth_provider");if(!t||!n||!r)return{inProgress:!1};let i=!1;try{i=!!window.opener.location.origin}catch{}return{inProgress:!0,authorizationCode:t,stateCode:n,provider:r,withPrivyUi:!le.get(Cl),popupFlow:window.opener!==null&&i,disableSignup:!!le.get(J2)}}function F8(){let e=new URL(window.location.href);e.searchParams.delete("privy_oauth_code"),e.searchParams.delete("privy_oauth_provider"),e.searchParams.delete("privy_oauth_state"),le.del(vl),window.history.replaceState({},"",e)}class a0{get meta(){return this._meta}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.channelToken)throw new x("Auth flow must be initialized first");try{let t=await this.api.post(uS,{channel_token:this.meta.channelToken,message:this.message,signature:this.signature,fid:this.fid,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"});if(!t)throw new x("No response from authentication");return t}catch(t){throw qe(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(pS,{channel_token:this.meta.channelToken,message:this.message,signature:this.signature,fid:this.fid})}catch(t){throw qe(t)}}async _startChannelOnce(){if(!this.api)throw new x("Auth flow has no API instance");let t=await this.api.post(cS,{token:this.captchaToken});Hr.isMobile&&!Hr.isIOS&&t.connect_uri&&xT(t.connect_uri,"_blank"),this._meta={...this._meta,connectUri:t.connect_uri,channelToken:t.channel_token}}async initializeFarcasterConnect(){if(!this.api)throw new x("Auth flow has no API instance");await this.startChannelOnce.execute()}async _pollForReady(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.channelToken)throw new x("Auth flow must be initialized first");let t=await this.api.get(hS,{headers:{"farcaster-channel-token":this.meta.channelToken}});return t.state==="completed"&&(this.message=t.message,this.signature=t.signature,this.fid=t.fid,!0)}constructor(t,n=!1){this._meta={disableSignup:!1},this.captchaToken=t,this.startChannelOnce=new Qn(this._startChannelOnce.bind(this)),this.pollForReady=new Qn(this._pollForReady.bind(this)),this._meta.disableSignup=n}}class ya{async initRegisterFlow(t){if(!this.api)throw new x("Auth flow has no API instance");this.authenticateForRegistration=!0,this.meta.initRegisterResponse=await this.initRegisterOnce.execute(t)}async initAuthenticationFlow(t){if(!this.api)throw new x("Auth flow has no API instance");this.authenticateForRegistration=!1,this.meta.initAuthenticateResponse=await this.initAuthenticateOnce.execute(t)}async initLinkFlow(){if(!this.api)throw new x("Auth flow has no API instance");this.meta.initLinkResponse=await this.initLinkOnce.execute()}async register(){let t=await K(()=>import("./index-BDkarAkX.js"),[],import.meta.url);if(!this.api)throw new x("Auth flow has no API instance");if(!t.browserSupportsWebAuthn())throw new x("WebAuthn is not supported in this browser");this.meta.initRegisterResponse||(this.meta.initRegisterResponse=await this.initRegisterOnce.execute());try{let n=this.meta.initRegisterResponse.options,r=await t.startRegistration({optionsJSON:this._transformInitLinkOptionsToCamelCase(n)});return this.meta.setPasskeyAuthState?.({status:"submitting-response"}),await this.api.post(FS,{relying_party:this.meta.initRegisterResponse.relying_party,authenticator_response:this._transformRegistrationResponseToSnakeCase(r)})}catch(n){throw n.name==="NotAllowedError"?new x("Passkey request timed out or rejected by user.",void 0,R.PASSKEY_NOT_ALLOWED):qe(n)}}async authenticate(){if(this.authenticateForRegistration)return this.register();let t=await K(()=>import("./index-BDkarAkX.js"),[],import.meta.url);if(!this.api)throw new x("Auth flow has no API instance");if(!t.browserSupportsWebAuthn())throw new x("WebAuthn is not supported in this browser");this.meta.initAuthenticateResponse||(this.meta.initAuthenticateResponse=await this.initAuthenticateOnce.execute());let n=this.meta.allowedCredentialsIds?.map((r=>({type:"public-key",id:r})))??this.meta.initAuthenticateResponse.options.allow_credentials;try{let r=await t.startAuthentication({optionsJSON:this._transformInitAuthenticateOptionsToCamelCase({...this.meta.initAuthenticateResponse.options,allow_credentials:n})});return this.meta.setPasskeyAuthState?.({status:"submitting-response"}),await this.api.post(NS,{relying_party:this.meta.initAuthenticateResponse.relying_party,challenge:this.meta.initAuthenticateResponse.options.challenge,authenticator_response:this._transformAuthenticationResponseToSnakeCase(r)})}catch(r){throw r.name==="NotAllowedError"?new x("Passkey request timed out or rejected by user.",void 0,R.PASSKEY_NOT_ALLOWED):qe(r)}}async link(){let t=await K(()=>import("./index-BDkarAkX.js"),[],import.meta.url);if(!this.api)throw new x("Auth flow has no API instance");if(!t.browserSupportsWebAuthn())throw new x("WebAuthn is not supported in this browser");this.meta.initLinkResponse||(this.meta.initLinkResponse=await this.initLinkOnce.execute());try{let n=this.meta.initLinkResponse.options,r=await t.startRegistration({optionsJSON:this._transformInitLinkOptionsToCamelCase(n)});return this.meta.setPasskeyAuthState?.({status:"submitting-response"}),await this.api.post(OS,{relying_party:this.meta.initLinkResponse.relying_party,authenticator_response:this._transformRegistrationResponseToSnakeCase(r)})}catch(n){throw n.name==="NotAllowedError"?new x("Passkey request timed out or rejected by user.",void 0,R.PASSKEY_NOT_ALLOWED):qe(n)}}async _initRegisterOnce(t){if(!this.api)throw new x("Auth flow has no API instance");let n=Is(t);return await this.api.post(RS,{token:this.meta.captchaToken},{headers:{...n}})}async _initAuthenticateOnce(t){if(!this.api)throw new x("Auth flow has no API instance");let n=Is(t);return await this.api.post(PS,{token:this.meta.captchaToken},{headers:{...n}})}async _initLinkOnce(){if(!this.api)throw new x("Auth flow has no API instance");return await this.api.post(MS,{})}_transformInitLinkOptionsToCamelCase(t){let n=this.meta.name?.trim()||void 0;return{rp:t.rp,user:{id:t.user.id,name:n??t.user.name,displayName:n??t.user.display_name},challenge:t.challenge,pubKeyCredParams:t.pub_key_cred_params.map((r=>({type:r.type,alg:r.alg}))),timeout:t.timeout,excludeCredentials:t.exclude_credentials?.map((r=>({id:r.id,type:r.type,transports:r.transports}))),authenticatorSelection:{authenticatorAttachment:t.authenticator_selection?.authenticator_attachment,requireResidentKey:t.authenticator_selection?.require_resident_key,residentKey:t.authenticator_selection?.resident_key,userVerification:t.authenticator_selection?.user_verification},attestation:t.attestation,extensions:{appid:t.extensions?.app_id,credProps:t.extensions?.cred_props?.rk,hmacCreateSecret:t.extensions?.hmac_create_secret},hints:this.meta.hints}}_transformRegistrationResponseToSnakeCase(t){return{id:t.id,raw_id:t.rawId,response:{client_data_json:t.response.clientDataJSON,attestation_object:t.response.attestationObject,authenticator_data:t.response.authenticatorData},authenticator_attachment:t.authenticatorAttachment,client_extension_results:{app_id:t.clientExtensionResults.appid,cred_props:t.clientExtensionResults.credProps,hmac_create_secret:t.clientExtensionResults.hmacCreateSecret},type:t.type}}_transformInitAuthenticateOptionsToCamelCase(t){return{rpId:t.rp_id,challenge:t.challenge,allowCredentials:t.allow_credentials?.map((n=>({id:n.id,type:n.type,transports:n.transports})))||[],timeout:t.timeout,extensions:{appid:t.extensions?.app_id,credProps:t.extensions?.cred_props,hmacCreateSecret:t.extensions?.hmac_create_secret},userVerification:t.user_verification}}_transformAuthenticationResponseToSnakeCase(t){return{id:t.id,raw_id:t.rawId,response:{client_data_json:t.response.clientDataJSON,authenticator_data:t.response.authenticatorData,signature:t.response.signature,user_handle:t.response.userHandle},authenticator_attachment:t.authenticatorAttachment,client_extension_results:{app_id:t.clientExtensionResults.appid,cred_props:t.clientExtensionResults.credProps,hmac_create_secret:t.clientExtensionResults.hmacCreateSecret},type:t.type}}constructor({captchaToken:t,setPasskeyAuthState:n,hints:r}){this.authenticateForRegistration=!1,this.initRegisterOnce=new Qn(this._initRegisterOnce.bind(this)),this.initAuthenticateOnce=new Qn(this._initAuthenticateOnce.bind(this)),this.initLinkOnce=new Qn(this._initLinkOnce.bind(this)),this.meta={captchaToken:t,setPasskeyAuthState:n,hints:r}}}class s0{get meta(){return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,disableSignup:this._meta.disableSignup,messageType:this._meta.messageType,address:this.wallet?.address}}set messageType(t){this._meta.messageType=t}async authenticate(){if(!this.client)throw new x("SiwsFlow has no client instance");try{let{message:t,signature:n}=await this.sign();return await this.client.authenticateWithSiwsInternal({message:t,signature:n,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up",messageType:this.meta.messageType})}catch(t){throw qe(t)}}async link(){if(!this.client)throw new x("SiwsFlow has no client instance");try{let{message:t,signature:n}=await this.sign();return await this.client.linkWithSiwsInternal({message:t,signature:n,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,messageType:this.meta.messageType})}catch(t){throw qe(t)}}async sign(){let t,n;if(!this.client)throw new x("SiwsFlow has no client instance");await this.buildMessage();let r=this.meta.messageType==="transaction",i=this.meta.messageType==="offchain-message";if(!this.preparedMessage)throw new x("Could not prepare SIWS message");if(!r&&!this.wallet.provider.signMessage||r&&!this.wallet.provider.signTransaction)throw new x("Wallet does not support the necessary signing methods");if(i){let a=s4({message:this.preparedMessage,signerPublicKey:qa.decode(this.wallet.address),domain:window.location.origin}),s=await this.wallet.provider.signMessage({message:a});t=this.preparedMessage,n=ba.encode(s.signature)}else if(r&&this._plugin){let a=await this.wallet.provider.signTransaction({transaction:ba.decode(this.preparedMessage)});t=ba.encode(a.signedTransaction),n=this._plugin.getSignatureFromTransaction(a.signedTransaction,this.wallet.address)}else{t=this.preparedMessage;let a=await this.wallet.provider.signMessage({message:new TextEncoder().encode(this.preparedMessage)});n=ba.encode(a.signature)}return{message:t,signature:n}}async _getNonceOnce(){if(!this.client)throw new x("SiwsFlow has no client instance");return await this.client.generateSiwsNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new x("SiwsFlow has no client instance");let t=this.wallet.address;return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.meta.messageType==="transaction"&&this._plugin?this.preparedMessage=this._plugin.createSiwsMemoTransaction({address:t,nonce:this.nonce}):this.preparedMessage=E1({address:t,nonce:this.nonce}),this.preparedMessage}constructor(t,n,r,i=!1,a="plain",s){this._meta={disableSignup:!1,messageType:"plain"},this.getNonceOnce=new Qn(this._getNonceOnce.bind(this)),this.wallet=t,this.captchaToken=r,this.client=n,this._meta.disableSignup=i,this._meta.messageType=a,this._plugin=s}}const j8=g.createContext({enabled:!1,siteKey:"",provider:void 0,appId:void 0,token:void 0,error:void 0,status:"disabled",setToken:D,setError:D,setExecuting:D,waitForResult:()=>Promise.resolve(""),ref:{current:null},remove:b4,reset:D,execute:D});class ia extends wi{constructor(t,n,r){super(t||"Captcha failed"),this.type="Captcha",n instanceof Error&&(this.cause=n),this.privyErrorCode=r}}const cD=({children:e,appId:t,captchaSiteKey:n,enabledCaptchaProvider:r})=>{let i=g.useRef(null),a=g.useRef(null),[s,o]=g.useState(),[l,c]=g.useState(),[u,p]=g.useState(!1),h=g.useMemo((()=>r?u||s||l?!u||s||l?s&&!l?{status:"success",token:s}:l?{status:"error",error:l}:{status:"ready"}:{status:"loading"}:{status:"ready"}:{status:"disabled"}),[r,s,l,u]),f=g.useMemo((()=>r?r==="turnstile"?{remove:()=>{i.current?.remove(),p(!1),c(void 0),o(void 0)},reset:()=>{i.current?.reset(),p(!1),c(void 0),o(void 0)},execute:()=>{p(!0),i.current?.execute()},waitForResult:async()=>{try{return await e6((()=>i.current?.getResponse()),{interval:200,timeout:2e4})}catch{throw new ia("Captcha failed",null,R.CAPTCHA_TIMEOUT)}}}:{remove:()=>{a.current?.removeCaptcha(),p(!1),c(void 0),o(void 0)},reset:()=>{a.current?.resetCaptcha(),p(!1),c(void 0),o(void 0)},execute:()=>{p(!0),a.current?.execute()},waitForResult:async()=>{try{return await e6((()=>{let m=a.current?.getResponse();if(m)return m}),{interval:200,timeout:2e4})}catch{throw new ia("Captcha failed",null,R.CAPTCHA_TIMEOUT)}}}:null),[r]),y=g.useMemo((()=>{if(!r||!f)return{...h,enabled:!1,siteKey:"",appId:t,setToken:D,setError:D,setExecuting:D,waitForResult:()=>Promise.resolve(void 0),remove:b4,reset:D,execute:D,provider:void 0,ref:{current:null}};let m={...h,enabled:!0,appId:t,setToken:o,setError:c,setExecuting:p};return r==="turnstile"?{...m,provider:"turnstile",ref:i,siteKey:n.split("t:")[1]??"",...f}:{...m,provider:"hcaptcha",ref:a,siteKey:n.split("h:")[1]??"",...f}}),[h,r,f,t,n]);return d.jsx(j8.Provider,{value:y,children:e})},Cn=()=>g.useContext(j8);async function Nn(e){if(e.enabled){if(e.status==="error")throw new ia(e.error,null,R.CAPTCHA_FAILURE);return e.status==="success"?e.token:(e.execute(),await e.waitForResult())}}class ma{async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(jS,{captcha_token:this.meta.captchaToken,telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(t){throw qe(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");try{return await this.api.post(DS,{telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData})}catch(t){throw qe(t)}}constructor(t,n=!1){this.meta={disableSignup:!1},this.meta={captchaToken:t,disableSignup:!1},this.meta.disableSignup=n}}function CB(e){let t={detail:"",retryable:!1};return e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER&&(t.detail="This account has already been linked to another user."),e?.privyErrorCode===R.DISALLOWED_LOGIN_METHOD&&(t.detail="Login with Telegram not allowed."),e?.privyErrorCode===R.INVALID_DATA&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===R.INVALID_CREDENTIALS&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===R.TOO_MANY_REQUESTS&&(t.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===R.TOO_MANY_REQUESTS&&e.message.includes("rate limit")&&(t.detail="Request limit reached for Telegram. Please wait a moment and try again."),e instanceof ia&&(t.retryable=!0,t.detail="Something went wrong. Try again."),t}function o0(e){return Object.fromEntries(decodeURIComponent(e).split("&").map((t=>t.split("=").map(decodeURIComponent))))}function l0(){let e=new URL(window.location.href);e.searchParams.delete("id"),e.searchParams.delete("hash"),e.searchParams.delete("auth_date"),e.searchParams.delete("first_name"),e.searchParams.delete("last_name"),e.searchParams.delete("username"),e.searchParams.delete("photo_url"),e.hash="",window.history.replaceState({},"",e)}let uD=g.lazy((()=>K(()=>import("./TurnstileWrapper-B7sNddys-Dgr80Gih.js"),__vite__mapDeps([21,16,2,8,4,5,6,7,3,17,13,18]),import.meta.url))),pD=g.lazy((()=>K(()=>import("./HCaptchaWrapper-CUi9LJsp-DgSjCjQI.js"),__vite__mapDeps([22,16,2,8,4,5,6,7,3,17,13,18]),import.meta.url)));const D8=e=>{let t=Cn();return g.useEffect((()=>t.remove),[t.remove]),t.enabled&&t.provider?d.jsx(g.Suspense,{fallback:null,children:d.jsxs("div",{className:"hidden h-0 w-0",children:[t.provider==="turnstile"&&d.jsx(uD,{...e,captchaContext:t}),t.provider==="hcaptcha"&&d.jsx(pD,{...e,captchaContext:t})]})}):null};var $d=Object.freeze({__proto__:null,AccountNotFoundScreen:()=>K(()=>import("./AccountNotFoundScreen-C4njXc69-RUyAWRzV.js"),__vite__mapDeps([23,24,25,16,2,26,27,28,8,4,5,6,7,3,17,13,18]),import.meta.url),AddFundsSelectionScreen:()=>K(()=>import("./AddFundsSelectionScreen-RAoCn7ej-ZV-LlYBe.js"),__vite__mapDeps([29,16,2,27,30,31,32,33,24,25,26,34,28,35,8,4,5,6,7,3,17,13,18]),import.meta.url),AffirmativeConsentScreen:()=>K(()=>import("./AffirmativeConsentScreen-BG0MJxku-CKn2JLwq.js"),__vite__mapDeps([36,16,2,25,37,24,26,27,28,38,8,4,5,6,7,3,17,13,18]),import.meta.url),AllowlistRejectionScreen:()=>K(()=>import("./AllowlistRejectionScreen-Cae6e1Od-9oIP9fma.js"),__vite__mapDeps([39,16,2,40,24,25,26,27,41,28,8,4,5,6,7,3,17,13,18]),import.meta.url),AuthenticateWithWalletScreen:()=>K(()=>import("./AuthenticateWithWalletScreen-CU6hIcFT-D1wLlSJs.js"),__vite__mapDeps([42,16,2,43,25,44,45,28,46,47,48,49,50,51,52,53,20,32,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),AwaitingEvmToSolBridgingScreen:()=>K(()=>import("./AwaitingEvmToSolBridgingScreen-D0e_sZMS-CSBbHTyz.js"),__vite__mapDeps([54,55,16,2,56,25,57,58,27,59,60,61,62,63,64,65,66,67,5,4,6,7,3,8,68,69,51,70,71,72,73,74,75,76,45,28,46,77,78,79,80,81,82,83,84,85,24,26,86,87,17,13,18,88,89,90]),import.meta.url),AwaitingExternalEthereumTransferScreen:()=>K(()=>import("./AwaitingExternalEthereumTransferScreen-ur5HL4R7-BsRq-xBt.js"),__vite__mapDeps([91,55,16,2,56,25,57,58,27,59,60,92,80,81,4,61,62,66,67,5,6,7,3,8,68,69,51,70,71,72,63,73,74,75,76,45,28,46,77,78,79,82,83,84,85,24,26,86,87,17,13,18,88,89,93,90]),import.meta.url),AwaitingPasswordlessCodeScreen:()=>K(()=>import("./AwaitingPasswordlessCodeScreen-DRHz76mM-BPdhsKvN.js"),__vite__mapDeps([94,16,2,95,96,56,47,37,24,25,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),AwaitingSolToEvmBridgingScreen:()=>K(()=>import("./AwaitingSolToEvmBridgingScreen-CdLRrGD2-CEGNdrkr.js"),__vite__mapDeps([97,55,16,2,56,25,57,58,27,61,62,74,75,72,68,69,76,45,28,46,77,93,4,8,5,6,7,3,17,13,18]),import.meta.url),CaptchaScreen:()=>K(()=>import("./CaptchaScreen-DbpvkIGx-BecgMnD_.js"),__vite__mapDeps([98,16,2,24,25,26,27,86,28,99,8,4,5,6,7,3,17,13,18]),import.meta.url),CoinbaseOnrampStatusScreen:()=>K(()=>import("./CoinbaseOnrampStatusScreen-BbyCJDXL-CFvcSiDs.js"),__vite__mapDeps([100,101,16,2,102,25,56,61,8,4,5,6,7,3,17,13,18]),import.meta.url),ConnectLedgerScreen:()=>K(()=>import("./ConnectLedgerScreen-DWHABGot-DaCnbBzh.js"),__vite__mapDeps([103,24,25,16,2,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),ConnectOnlyLandingScreen:()=>K(()=>import("./ConnectOnlyLandingScreen-CZYx9Bmp-DUkCLkxD.js"),__vite__mapDeps([104,16,2,43,25,44,45,28,46,47,48,49,50,51,52,53,20,32,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),ConnectOnlyStatusScreen:()=>K(()=>import("./ConnectOnlyStatusScreen-DCRzjxHx-Dv_5nMkZ.js"),__vite__mapDeps([105,16,2,24,25,26,27,106,47,52,37,4,8,5,6,7,3,17,13,18]),import.meta.url),ConnectOrCreateScreen:()=>K(()=>import("./ConnectOrCreateScreen-CUUYUO07-DSGEeB3Y.js"),__vite__mapDeps([107,108,16,2,25,43,44,45,28,46,47,48,49,50,51,52,53,20,32,26,27,109,73,69,110,111,112,113,114,115,116,35,24,117,8,4,5,6,7,3,17,13,18]),import.meta.url),ConnectionStatusScreen:()=>K(()=>import("./ConnectionStatusScreen-fUfROm9m-DSoAuMFZ.js"),__vite__mapDeps([106,16,2,47,52,37,24,25,26,27,4,8,5,6,7,3,17,13,18]),import.meta.url),CrossAppAuthScreen:()=>K(()=>import("./CrossAppAuthScreen-CLw7ymZq-DW4nRGfz.js"),__vite__mapDeps([118,16,2,37,24,25,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),DelegatedActionsConsentScreen:()=>K(()=>import("./DelegatedActionsConsentScreen-DYF2U4y5-gfUS_uV5.js"),__vite__mapDeps([119,16,2,120,25,51,121,76,45,28,46,78,24,26,27,122,86,8,4,5,6,7,3,17,13,18]),import.meta.url),DelegatedActionsRevokeScreen:()=>K(()=>import("./DelegatedActionsRevokeScreen-bPp6Uwyh-DZj9HTHc.js"),__vite__mapDeps([123,16,2,24,25,26,27,122,28,86,8,4,5,6,7,3,17,13,18]),import.meta.url),DepositAddressScreen:()=>K(()=>import("./DepositAddressScreen-DBLRs7aI-DK_XVgVk.js"),__vite__mapDeps([124,16,2,125,33,24,25,26,27,48,49,88,89,44,45,28,46,126,127,128,32,8,4,5,6,7,3,17,13,18]),import.meta.url),DepositAddressV3Screen:()=>K(()=>import("./DepositAddressV3Screen-CDqIEMQw-6gRZzhLe.js"),__vite__mapDeps([129,16,2,125,33,24,25,26,27,48,49,88,89,44,45,28,46,126,127,128,32,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletConnectingScreen:()=>K(()=>import("./EmbeddedWalletConnectingScreen-D4T7DUzs-BZu2ae0k.js"),__vite__mapDeps([130,16,2,24,25,26,27,99,28,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletCreatedScreen:()=>K(()=>import("./EmbeddedWalletCreatedScreen-D7WhW5ve-86pviemJ.js"),__vite__mapDeps([131,16,2,24,25,26,27,86,28,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletKeyExportScreen:()=>K(()=>import("./EmbeddedWalletKeyExportScreen-CqV4NYQ3-vDcvT53Y.js"),__vite__mapDeps([132,16,2,133,134,120,25,51,121,76,45,28,46,78,24,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletOnAccountCreateScreen:()=>K(()=>import("./EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-rNJAtSJc.js"),__vite__mapDeps([135,16,2,24,25,26,27,99,28,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletPasswordCreateScreen:()=>K(()=>import("./RecoveryPasswordCreateScreen-Be-qJ-LU-C9c0x-yq.js"),__vite__mapDeps([136,16,2,137,134,56,25,138,139,102,57,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletPasswordUpdateScreen:()=>K(()=>import("./EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-I8Q95280.js"),__vite__mapDeps([140,16,2,137,134,56,25,138,139,102,57,8,4,5,6,7,3,17,13,18]),import.meta.url),EmbeddedWalletPasswordUpdateSplashScreen:()=>K(()=>import("./EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-Coi7OxoI.js"),__vite__mapDeps([141,24,25,16,2,26,27,41,28,8,4,5,6,7,3,17,13,18]),import.meta.url),ErrorScreen:()=>K(()=>import("./ErrorScreen-DipdTWzE-DnKGxH1Z.js"),__vite__mapDeps([142,62,16,2,40,24,25,26,27,128,28,41,8,4,5,6,7,3,17,13,18]),import.meta.url),FarcasterConnectStatusScreen:()=>K(()=>import("./FarcasterConnectStatusScreen-51tjUxqq-4pi7jooW.js"),__vite__mapDeps([143,16,2,144,48,49,25,121,37,24,26,27,111,45,28,46,8,4,5,6,7,3,17,13,18]),import.meta.url),FarcasterSignerStatusScreen:()=>K(()=>import("./FarcasterSignerStatusScreen-6x-Uh95G-z2XCMaLL.js"),__vite__mapDeps([145,16,2,146,144,48,49,24,25,26,27,111,8,4,5,6,7,3,17,13,18]),import.meta.url),FiatOnrampScreen:()=>K(()=>import("./FiatOnrampScreen-BAhYeiTI-CBVA9v1-.js"),__vite__mapDeps([147,8,148,16,2,24,25,26,27,127,28,133,134,113,73,69,44,45,46,149,30,99,34,85,41,35,117,89,4,5,6,7,3,17,13,18]),import.meta.url),FundSolWalletWithExternalSolanaWallet:()=>K(()=>import("./FundSolWalletWithExternalSolanaWallet-WtLwYaOl-DwAwc6Ny.js"),__vite__mapDeps([150,55,16,2,25,56,57,58,75,72,27,68,69,59,60,61,151,65,152,153,63,8,4,5,6,7,3,17,13,18]),import.meta.url),FundWithBankDepositScreen:()=>K(()=>import("./FundWithBankDepositScreen-DajkHxBD-DfX6nvFQ.js"),__vite__mapDeps([154,16,2,44,45,28,46,24,25,26,27,149,148,127,126,99,8,4,5,6,7,3,17,13,18]),import.meta.url),FundingAmountEditScreen:()=>K(()=>import("./FundingEditAmountScreen-CpvpiO4M-CDS_sk_t.js"),__vite__mapDeps([155,16,2,25,56,58,27,71,59,60,81,4,82,83,84,85,28,45,24,26,86,87,8,5,6,7,3,17,13,18]),import.meta.url),FundingMethodSelectionScreen:()=>K(()=>import("./FundingMethodSelectionScreen-Db7vhRlE-CPfNQemT.js"),__vite__mapDeps([156,16,2,101,25,58,157,158,149,30,31,53,159,5,4,6,7,3,8,160,61,82,83,84,85,28,45,24,26,27,86,87,17,13,18]),import.meta.url),InAppBrowserLoginNotPossible:()=>K(()=>import("./InAppBrowserLoginNotPossible-BMR9br1T-DO4wICml.js"),__vite__mapDeps([161,24,25,16,2,26,27,38,28,8,4,5,6,7,3,17,13,18]),import.meta.url),InstallWalletScreen:()=>K(()=>import("./InstallWalletScreen-DTA8dwLv-DGpewEch.js"),__vite__mapDeps([162,47,84,16,2,85,28,45,24,25,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),LandingScreen:()=>K(()=>import("./LandingScreen-CGWUoSUG-CUOCWUXd.js"),__vite__mapDeps([163,108,16,2,25,43,44,45,28,46,47,48,49,50,51,52,53,20,32,26,27,109,73,69,110,111,112,113,114,115,116,35,24,117,8,4,5,6,7,3,17,13,18]),import.meta.url),LinkConflictScreen:()=>K(()=>import("./LinkConflictScreen-C3ZEPsgl-Tb6cAepT.js"),__vite__mapDeps([164,134,16,2,72,25,165,76,45,28,46,166,158,8,4,5,6,7,3,17,13,18]),import.meta.url),LinkEmailScreen:()=>K(()=>import("./LinkEmailScreen-dKo9frwc-pq0NF2JO.js"),__vite__mapDeps([167,95,16,2,109,25,73,69,50,51,110,28,56,24,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),LinkPasskeyScreen:()=>K(()=>import("./LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js"),__vite__mapDeps([83,16,2,84,85,28,45,24,25,26,27,86,87,8,4,5,6,7,3,17,13,18]),import.meta.url),LinkPhoneScreen:()=>K(()=>import("./LinkPhoneScreen-oIUpfj0w-B80UJqAZ.js"),__vite__mapDeps([168,96,16,2,113,25,73,69,24,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),LoginFailedScreen:()=>K(()=>import("./LoginFailedScreen-CN0dJV6U-DlnOM-Kh.js"),__vite__mapDeps([169,24,25,16,2,26,27,99,28,8,4,5,6,7,3,17,13,18]),import.meta.url),ManualTransferScreen:()=>K(()=>import("./ManualTransferScreen-CHqcuqbs-DSShupq9.js"),__vite__mapDeps([170,16,2,25,56,48,49,58,149,70,71,120,51,121,76,45,28,46,78,171,5,4,6,7,3,8,61,63,152,65,64,67,17,13,18]),import.meta.url),MfaAuthEnrollmentFlowScreen:()=>K(()=>import("./MfaAuthEnrollmentFlowScreen-Dj7gPTRC-DUPV_SLA.js"),__vite__mapDeps([172,25,16,2,173,174,175,112,96,73,69,142,62,40,24,26,27,128,28,41,8,4,5,6,7,3,17,13,18,83,84,85,45,86,87,146,56,121,70,71,78,48,49]),import.meta.url),MfaAuthVerifyFlowScreen:()=>K(()=>import("./MfaAuthVerifyFlowScreen-DbFpyWMy-D96GpzXX.js"),__vite__mapDeps([176,16,2,177,175,112,96,173,25,24,26,27,134,165,59,60,178,179,81,4,65,64,5,6,7,3,8,56,79,17,13,18]),import.meta.url),MfaEnrollmentFlowScreen:()=>K(()=>import("./MfaEnrollmentFlowScreen-DhLnGgnr-CYQDa4ND.js"),__vite__mapDeps([180,25,16,2,173,174,175,112,96,73,69,142,62,40,24,26,27,128,28,41,8,4,5,6,7,3,17,13,18,83,84,85,45,86,87,146,56,121,70,71,78,48,49,55,113]),import.meta.url),MoonpayStatusScreen:()=>K(()=>import("./MoonpayStatusScreen-CzTUtokc-Bx5aHy-z.js"),__vite__mapDeps([181,101,16,2,102,25,56,160,61,8,4,5,6,7,3,17,13,18]),import.meta.url),OAuthStatusScreen:()=>K(()=>import("./OAuthStatusScreen-ufbOa-da-CS6988X2.js"),__vite__mapDeps([182,16,2,114,77,115,37,24,25,26,27,166,8,4,5,6,7,3,17,13,18]),import.meta.url),PasskeySelectSignupOrLogin:()=>K(()=>import("./PasskeySelectSignupOrLogin-xh2ScC_l-BY4eK5Jh.js"),__vite__mapDeps([183,24,25,16,2,26,27,87,28,8,4,5,6,7,3,17,13,18]),import.meta.url),PasskeyStatusScreen:()=>K(()=>import("./PasskeyStatusScreen-Bla8MaOk-LXys76u9.js"),__vite__mapDeps([184,16,2,37,24,25,26,27,87,28,8,4,5,6,7,3,17,13,18]),import.meta.url),PasswordRecoveryScreen:()=>K(()=>import("./PasswordRecoveryScreen-awGXZkQk-RczvLvmo.js"),__vite__mapDeps([185,173,16,2,25,56,138,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),RecoveryOAuthScreen:()=>K(()=>import("./RecoveryOAuthStatusScreen-CsgtTI2x-C79jd345.js"),__vite__mapDeps([186,16,2,25,57,187,8,4,5,6,7,3,17,13,18]),import.meta.url),RecoverySelectionScreen:()=>K(()=>import("./RecoverySelectionScreen-D1iGtpmi-PNqHb6CI.js"),__vite__mapDeps([188,189,16,2,25,57,187,8,4,5,6,7,3,17,13,18]),import.meta.url),SendTransactionScreen:()=>K(()=>import("./index-DvMddJcd-D7AEQrzj.js"),__vite__mapDeps([190,16,2,76,25,45,28,46,59,60,171,5,4,6,7,3,8,159,80,81,142,62,40,24,26,27,128,41,17,13,18,191,192,68,69,51,121,70,71,120,78,139,157,158,133,134,79,56,57,178,179,65,64,92]),import.meta.url),SetAutomaticRecoveryScreen:()=>K(()=>import("./SetAutomaticRecoveryScreen-BO_OEqAZ-CUpQZ9wq.js"),__vite__mapDeps([193,134,16,2,189,25,70,71,8,4,5,6,7,3,17,13,18]),import.meta.url),SignRequestScreen:()=>K(()=>import("./SignRequestScreen-BHKv32KR-0qGeNipB.js"),__vite__mapDeps([194,16,2,146,56,191,24,25,26,27,28,4,8,5,6,7,3,17,13,18]),import.meta.url),StandardSignAndSendTransactionScreen:()=>K(()=>import("./StandardSignAndSendTransactionScreen-CfhIXVtd-C3lgJb68.js"),__vite__mapDeps([195,16,2,60,142,62,40,24,25,26,27,128,28,41,8,4,5,6,7,3,17,13,18,55,56,57,68,69,179,81,65,64,165,192,51,121,70,71,76,45,46,120,78,139,157,158,133,134,79,196,153]),import.meta.url),TelegramAuthScreen:()=>K(()=>import("./TelegramAuthScreen-UL9zLfO8-l35_C2DG.js"),__vite__mapDeps([197,16,2,37,24,25,26,27,115,8,4,5,6,7,3,17,13,18]),import.meta.url),TransferFromWalletScreen:()=>K(()=>import("./TransferFromWalletScreen-Qvn1Yuno-BWCH7-Si.js"),__vite__mapDeps([198,16,2,25,57,58,75,72,73,69,70,116,35,28,82,83,84,85,45,24,26,27,86,87,8,4,5,6,7,3,17,13,18]),import.meta.url),UpdateEmailScreen:()=>K(()=>import("./UpdateEmailScreen-DVOhPV0H-Clk4zk-8.js"),__vite__mapDeps([199,95,16,2,56,25,50,51,24,26,27,110,28,8,4,5,6,7,3,17,13,18]),import.meta.url),UpdatePhoneScreen:()=>K(()=>import("./UpdatePhoneScreen-CXRswTNZ-BgRsoR3B.js"),__vite__mapDeps([200,96,16,2,113,25,73,69,24,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),UserLimitReachedScreen:()=>K(()=>import("./UserLimitReachedScreen-5we2DHn8-D-SU-vAz.js"),__vite__mapDeps([201,24,25,16,2,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url),WalletInterstitialScreen:()=>K(()=>import("./WalletInterstitialScreen-Sh7LfsAh-CbrFb0ON.js"),__vite__mapDeps([202,16,2,24,25,26,27,8,4,5,6,7,3,17,13,18]),import.meta.url)});function U8(e){Vt("configureMfa",e)}const ci=kn((()=>({inProgressMfaFlow:void 0}))),hD=()=>{let{ready:e}=it(),{currentScreen:t}=Ft(),[n,r]=g.useState(null),[i,a]=g.useState(!1),s=(function(o){let[l,c]=g.useState(!1),u=g.useRef(null),p=g.useRef(null),h=g.useRef(null);return g.useEffect((()=>{if(u.current&&(clearTimeout(u.current),u.current=null),p.current&&(clearTimeout(p.current),p.current=null),o)h.current=Date.now(),u.current=setTimeout((()=>{c(!0)}),150);else if(h.current!==null){let f=Date.now()-h.current;if(f>=150){let y=Math.max(0,400-(f-150));p.current=setTimeout((()=>{c(!1),h.current=null}),y)}else u.current&&(clearTimeout(u.current),u.current=null),c(!1),h.current=null}return()=>{u.current&&clearTimeout(u.current),p.current&&clearTimeout(p.current)}}),[o]),l})(i);return g.useEffect((()=>{if(!t)return r(null),void a(!1);a(!0),$d[t]().then((o=>{(!t||e||o.default.isShownBeforeReady)&&(r((()=>o.default.component)),a(!1))})).catch((()=>{r(null),a(!1)}))}),[t,e]),{component:n,isLoading:s}};let d0=g.lazy((()=>K(()=>import("./MfaVerifyFlowScreen-C_XPjMRP-CJtSAXGN.js"),__vite__mapDeps([203,16,2,177,175,112,96,173,25,24,26,27,134,165,59,60,178,179,81,4,65,64,5,6,7,3,8,56,79,17,13,18]),import.meta.url))),fD=g.lazy((()=>(e=>$d[e]().then((t=>({default:t.default.component}))))("MfaAuthVerifyFlowScreen"))),yD=()=>d.jsx(wD,{children:d.jsx(Ld,{})}),W8=()=>{let{currentScreen:e}=Ft(),t=ci((a=>a.inProgressMfaFlow)),n=()=>ci.setState({inProgressMfaFlow:void 0}),{component:r,isLoading:i}=hD();return(function(){let{isModalOpen:a}=it(),{headless:s}=Ct(),{currentScreen:o}=Ft(),{status:l,execute:c,reset:u,enabled:p}=Cn(),[h,f]=g.useState(!1);g.useEffect((()=>{!a&&p&&u()}),[a,p,u]),g.useEffect((()=>{o?$d[o]().then((y=>{f(!!y.default.isCaptchaRequired)})).catch((()=>{f(!1)})):f(!1)}),[o]),g.useEffect((()=>{a&&h&&!s&&l==="ready"&&p&&c()}),[a,h,s,l,p,c])})(),e||t!=="txn"?i?d.jsx(yD,{}):r?d.jsxs(d.Fragment,{children:[d.jsx(t7,{$if:!!t,children:d.jsx(g.Suspense,{children:d.jsx(r,{})})}),d.jsxs(g.Suspense,{children:[t==="txn"&&d.jsx(d0,{onClose:n}),t==="auth"&&d.jsx(fD,{})]})]}):null:d.jsx(g.Suspense,{children:d.jsx(d0,{onClose:n})})},mD=()=>{let e=g.useRef(null);return d.jsx(gD,{style:{height:BI(e)},id:"privy-modal-content",children:d.jsx("div",{ref:e,children:d.jsx(W8,{})})})};const np=({open:e})=>{let t=Ct(),{gracefulClosePrivyModal:n}=(()=>{let{closePrivyModal:i}=Q(),{onUserCloseViaDialogOrKeybindRef:a}=Ft();return{gracefulClosePrivyModal:g.useCallback((()=>{if(!a?.current)return i({shouldCallAuthOnSuccess:!1});a.current()}),[i,a])}})(),r=ci((i=>i.inProgressMfaFlow));return U8({onMfaRequired:()=>{t.mfa.noPromptOnMfaRequired||ci.setState({inProgressMfaFlow:"txn"})}}),t.render.standalone?d.jsx(O6,{children:d.jsx(V8,{id:"privy-modal-content",children:d.jsx(W8,{})})}):d.jsx(uR,{open:!(!e&&!r),id:"privy-dialog","aria-label":"log in or sign up","aria-labelledby":"privy-dialog-title",onClick:()=>n(),children:d.jsx(O6,{children:d.jsx(mD,{})})})};let V8=ot.div`
|
|
650
|
+
display: flex;
|
|
651
|
+
flex-direction: column;
|
|
652
|
+
text-align: center;
|
|
653
|
+
font-size: 14px;
|
|
654
|
+
line-height: 20px;
|
|
655
|
+
width: 100%;
|
|
656
|
+
background: var(--privy-color-background);
|
|
657
|
+
padding: 0 16px;
|
|
658
|
+
`,gD=ot(V8)`
|
|
659
|
+
transition: height 150ms ease-out;
|
|
660
|
+
overflow: hidden auto;
|
|
661
|
+
scrollbar-width: none;
|
|
662
|
+
|
|
663
|
+
/* Ensure the modal gets pinned to the top if it ever gets too tall */
|
|
664
|
+
max-height: calc(100svh - 32px);
|
|
665
|
+
|
|
666
|
+
border-radius: var(--privy-border-radius-lg) var(--privy-border-radius-lg) 0 0;
|
|
667
|
+
box-shadow: var(--privy-shadow-sheet);
|
|
668
|
+
|
|
669
|
+
@media (min-width: 441px) {
|
|
670
|
+
box-shadow: var(--privy-shadow-modal);
|
|
671
|
+
border-radius: var(--privy-border-radius-lg);
|
|
672
|
+
}
|
|
673
|
+
`,wD=ot.div`
|
|
674
|
+
display: flex;
|
|
675
|
+
align-items: center;
|
|
676
|
+
justify-content: center;
|
|
677
|
+
min-height: 300px;
|
|
678
|
+
padding: 2rem;
|
|
679
|
+
`;function vD(e){let t=g.useRef(null),n=g.useRef(null);return g.useEffect((()=>{n.current?.remove(),n.current=(function({botUsername:r,scriptHost:i}){let a=document.createElement("script"),{origin:s}=new URL(i);return a.async=!0,a.src=`${s}/js/telegram-login.js`,a.setAttribute("data-telegram-login",r),a.setAttribute("data-request-access","write"),a.setAttribute("data-lang","en"),a})(e),t.current?.after(n.current)}),[e]),d.jsx("div",{ref:t,hidden:!0})}const CD=()=>{let{ready:e,wallets:t}=sa();return g.useEffect((()=>{if(!e)return;let n=t.map((r=>({address:r.address,connectorType:r.connectorType,walletClientType:r.walletClientType,connectedAt:r.connectedAt,id:r.meta.id})));le.put(x4,n)}),[e,t]),null},_D=(e,t,n)=>{let{promise:r,reject:i}=Ba(),a=setTimeout((()=>i(Error(`Timed out after ${t}ms`))),t);return n&&n.addEventListener("abort",(()=>clearTimeout(a)),{once:!0}),Promise.race([e,r]).finally((()=>clearTimeout(a)))},bD=["error","invalid_request_arguments","wallet_not_on_device","invalid_recovery_pin","insufficient_funds","missing_or_invalid_mfa","mfa_verification_max_attempts_reached","mfa_timeout","twilio_verification_failed"];class ct extends Error{constructor(t,n){super(n),this.type=t}}function o2(e){let t=e.type;return typeof t=="string"&&bD.includes(t)}function Hl(e){return o2(e)&&e.type==="wallet_not_on_device"}function _B(e){return o2(e)&&(e.type==="invalid_recovery_pin"||e.type==="invalid_request_arguments")}function LD(e){return!!o2(e)&&e.type==="mfa_timeout"}function AD(e){return!!o2(e)&&e.type==="missing_or_invalid_mfa"}function ED(e){return!!o2(e)&&e.type==="mfa_verification_max_attempts_reached"}function bB(e){return!(!o2(e)||!e.message.includes("code 429"))}function LB(e){return!!(function(t){let n=t.type;return typeof n=="string"&&n==="client_error"})(e)&&e.message==="MFA canceled"}async function _n(e,t,n,r,i,a=!1){let s=a,o=async c=>{if(s&&t&&t.length>0){c===(a?0:1)?i("configureMfa","onMfaRequired",{mfaMethods:t}):r.current?.reject(new ct("missing_or_invalid_mfa","MFA verification failed, retry."));let u=await new Promise(((p,h)=>{n.current={resolve:p,reject:h},setTimeout((()=>{let f=new ct("mfa_timeout","Timed out waiting for MFA code");r.current?.reject(f),h(f)}),3e5)}));return await e(u)}return await e()},l=null;for(let c=0;c<4;c++)try{l=await o(c),r.current?.resolve(void 0);break}catch(u){if(u.type!=="missing_or_invalid_mfa")throw r.current?.resolve(void 0),u;s=!0}if(l===null){let c=new ct("mfa_verification_max_attempts_reached","Max MFA verification attempts reached");throw r.current?.reject(c),c}return l}var c0;let xD=(c0=0,()=>"id-"+c0++);function kt(e){return e.error!==void 0}let bt=new class{enqueue(e,t){this.callbacks[e]=t}dequeue(e,t){let n=this.callbacks[t];if(!n)throw Error(`cannot dequeue ${e} event: no event found for id ${t}`);switch(delete this.callbacks[t],e){case"privy:iframe:ready":case"privy:user-signer:sign":case"privy:wallets:add":case"privy:wallets:import":case"privy:wallets:import-seed-phrase":case"privy:wallets:set-recovery":case"privy:wallets:connect":case"privy:wallets:recover":case"privy:wallets:rpc":case"privy:wallet:create":case"privy:mfa:verify":case"privy:mfa:init-enrollment":case"privy:mfa:submit-enrollment":case"privy:mfa:unenroll":case"privy:mfa:clear":case"privy:auth:unlink-passkey":case"privy:farcaster:init-signer":case"privy:farcaster:sign":case"privy:solana-wallet:create":case"privy:delegated-actions:consent":return n;default:throw Error(`invalid wallet event type ${e}`)}}constructor(){this.callbacks={}}},Bc=new Map,kD=(e,t)=>typeof t=="bigint"?t.toString():t;function $t(e,t,n,r){let i=n.contentWindow;if(!i)throw Error("iframe not initialized");let a=((o,l)=>`${o}${JSON.stringify(l,kD)}`)(e,t);if(e==="privy:wallet:create"||e==="privy:wallets:add"||e==="privy:solana-wallet:create"){let o=Bc.get(a);if(o)return o}let s=new Promise(((o,l)=>{let c=xD();bt.enqueue(c,{resolve:o,reject:l}),i.postMessage({id:c,event:e,data:t},r)})).finally((()=>{Bc.delete(a)}));return Bc.set(a,s),s}function $D(e){let t=f1(),n=g.useRef(null),r=g.useRef(e.mfaMethods),i=Ar(),[a,s]=g.useState(!1);return r.current=e.mfaMethods,g.useEffect((()=>{if(!a)return;let o=n.current;if(!o)return;function l(p){var h;p&&p.origin===e.origin&&typeof(h=p.data).event=="string"&&/^privy:.+/.test(h.event)&&(function(f){switch(f.event){case"privy:iframe:ready":let y=bt.dequeue(f.event,f.id);return kt(f)?y.reject(new ct(f.error.type,f.error.message)):y.resolve(f.data);case"privy:user-signer:sign":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:wallets:add":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:wallets:set-recovery":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:wallets:connect":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:wallets:recover":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:wallets:rpc":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:wallet:create":let m=bt.dequeue(f.event,f.id);return kt(f)?m.reject(new ct(f.error.type,f.error.message)):m.resolve(f.data);case"privy:wallets:import":let w=bt.dequeue(f.event,f.id);return kt(f)?w.reject(new ct(f.error.type,f.error.message)):w.resolve(f.data);case"privy:wallets:import-seed-phrase":let E=bt.dequeue(f.event,f.id);return kt(f)?E.reject(new ct(f.error.type,f.error.message)):E.resolve(f.data);case"privy:mfa:verify":let _=bt.dequeue(f.event,f.id);return kt(f)?_.reject(new ct(f.error.type,f.error.message)):_.resolve(f.data);case"privy:mfa:init-enrollment":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:mfa:submit-enrollment":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:mfa:unenroll":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:mfa:clear":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:auth:unlink-passkey":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:solana-wallet:create":let C=bt.dequeue(f.event,f.id);return kt(f)?C.reject(new ct(f.error.type,f.error.message)):C.resolve(f.data);case"privy:farcaster:init-signer":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:farcaster:sign":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}case"privy:delegated-actions:consent":{let k=bt.dequeue(f.event,f.id);return kt(f)?k.reject(new ct(f.error.type,f.error.message)):k.resolve(f.data)}default:console.warn("Unsupported wallet proxy method:",f)}})(p.data)}let c={signWithUserSigner:p=>_n((h=>$t("privy:user-signer:sign",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),addWallet:p=>_n((h=>$t("privy:wallets:add",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),setRecovery:p=>_n((h=>$t("privy:wallets:set-recovery",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),connect:p=>_n((h=>$t("privy:wallets:connect",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),recover:p=>_n((h=>$t("privy:wallets:recover",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i,!p.recoveryAccessToken&&!p.recoveryPassword&&!p.recoverySecretOverride),rpc:p=>_n((h=>$t("privy:wallets:rpc",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),create:p=>$t("privy:wallet:create",p,o,e.origin),importWallet:p=>$t("privy:wallets:import",p,o,e.origin),importSeedPhrase:p=>$t("privy:wallets:import-seed-phrase",p,o,e.origin),createSolana:p=>_n((h=>$t("privy:solana-wallet:create",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),createDelegatedAction:p=>_n((h=>$t("privy:delegated-actions:consent",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),verifyMfa:p=>_n((h=>$t("privy:mfa:verify",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i,!0),initEnrollMfa:p=>_n((h=>$t("privy:mfa:init-enrollment",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),submitEnrollMfa:p=>_n((h=>$t("privy:mfa:submit-enrollment",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),unenrollMfa:p=>_n((h=>$t("privy:mfa:unenroll",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),clearMfa:p=>_D($t("privy:mfa:clear",p,o,e.origin),15e3).catch((h=>{throw h instanceof Error&&h.message.includes("Timed out")?new ct("mfa_timeout","MFA operation timed out"):h})),unlinkPasskeyAccount:p=>_n((h=>$t("privy:auth:unlink-passkey",{...p,...h},o,e.origin)),r.current,e.mfaPromise,e.mfaSubmitPromise,i),initFarcasterSigner:p=>$t("privy:farcaster:init-signer",p,o,e.origin),signFarcasterMessage:p=>$t("privy:farcaster:sign",p,o,e.origin)};window.addEventListener("message",l);let u=new AbortController;return Ku((()=>$t("privy:iframe:ready",{},o,e.origin)),{abortSignal:u.signal}).then((()=>e.onLoad(c)),((...p)=>{console.warn("Privy iframe failed to load: ",...p),e.onLoadFailed()})),()=>{window.removeEventListener("message",l),u.abort()}}),[a]),t?d.jsx("iframe",{ref:n,width:"0",height:"0",style:{display:"none",height:"0px",width:"0px"},onLoad:()=>s(!0),src:F7({origin:e.origin,path:`/apps/${e.appId}/embedded-wallets`,query:{caid:e.clientAnalyticsId,client_id:e.appClientId}})}):null}const H8=({address:e,user:t})=>{let n=t.linkedAccounts.find((r=>r.type==="wallet"&&r.walletClientType==="privy"&&r.address===e));if(!n)throw new x("Address to delegate is not associated with current user.");if(!fd(n))throw new x(`useDelegatedActions is not supported for ${n.chainType} wallets. Use the useSessionSigners hook to provision server side access on behalf of your users.`);return{address:n.address,chainType:n.chainType,walletIndex:n.walletIndex??0}},Z8=({address:e,user:t})=>{let n=t.linkedAccounts.find((i=>i.type==="wallet"&&i.walletClientType==="privy"&&i.address===e));if(!n)throw new x("Address to delegate is not associated with current user.");let r=n.imported?n:Ss(t);if(!r)throw new x("Unable to determine root address for delegated address.");if(!fd(r))throw new x(`useDelegatedActions is not supported for ${r.chainType} wallets. Use the useSessionSigners hook to provision server side access on behalf of your users.`);return{address:r.address,chainType:r.chainType,imported:r.imported}},u0=e=>e.linkedAccounts.filter((t=>t.type==="wallet"&&t.walletClientType==="privy"&&t.delegated)),p0="popup-privy-oauth",h0="PRIVY_OAUTH_USE_BROADCAST_CHANNEL";function SD({isCreatingWallet:e,skipSplashScreen:t}){return e?"EmbeddedWalletPasswordCreateScreen":t?"EmbeddedWalletPasswordUpdateScreen":"EmbeddedWalletPasswordUpdateSplashScreen"}function TD({walletAction:e,availableRecoveryMethods:t,legacySetWalletPasswordFlow:n,isResettingPassword:r,showAutomaticRecovery:i}){return i?"SetAutomaticRecoveryScreen":n||t.length===1?SD({isCreatingWallet:e==="create",skipSplashScreen:r}):"RecoverySelectionScreen"}function ID(e){switch(e){case"user-passcode":return"PasswordRecoveryScreen";case"google-drive":case"icloud":return"RecoveryOAuthScreen";default:throw Error("Recovery method not supported")}}let MD=["warpcast.com","farcaster.xyz"],PD=["farcaster","fid"];async function RD(){if(globalThis.window!==void 0&&(function(){if(globalThis.window===void 0)return!1;try{if(globalThis.document===void 0)return!1;let e=globalThis.window,t=globalThis.document,n=!1;if(t.referrer){let s=t.referrer.toLowerCase();n=MD.some((o=>s.includes(o)))}let r=!!e.farcaster,i=new URLSearchParams(e.location.search),a=PD.some((s=>i.has(s)));return n||r||a}catch{return!1}})())try{await K(()=>import("./react-auth_false-DedQs79w.js"),[],import.meta.url),console.debug("[Privy] Farcaster Solana wallet registered")}catch(e){console.debug("[Privy] Farcaster Solana wallet not available (package may not be installed)"),(function(){try{return typeof process<"u"&&!1}catch{return!1}})()&&e&&console.debug("[Privy] Farcaster Solana init error:",e)}}function f0(e,t){if(e.onComplete)switch(t){case"external":e.fundingResult?e.onComplete({...e.fundingResult,fundingMethod:t}):e.onComplete({status:"cancelled",address:e.address,fundingMethod:t,amount:e.amount});break;case null:e.onComplete({status:"cancelled",address:e.address,fundingMethod:void 0,amount:e.amount});break;default:e.onComplete({status:"completed",address:e.address,fundingMethod:t,amount:e.amount})}}function AB(e,t,n,r,i,a,s){return{...e,funding:e?.funding?{...e.funding,fundingResult:{status:t,address:e.funding.address,fundingMethod:void 0,transactionHash:n,amount:e.funding.amount,assetType:i?a?.symbol||"ETH":s.nativeCurrency.symbol||"ETH",metadata:{walletClientType:r}}}:void 0,solanaFundingData:e?.solanaFundingData,sendTransaction:e?.sendTransaction}}const zc=new Map([["FundingMethodSelectionScreen",null],["TransferFromWalletScreen","external"],["FundingAmountEditScreen","external"],["ConnectOnlyLandingScreen","external"],["ConnectOnlyStatusScreen","external"],["AwaitingExternalEthereumTransferScreen","external"],["AwaitingEvmToSolBridgingScreen","external"],["AwaitingSolToEvmBridgingScreen","external"],["ManualTransferScreen","manual"],["MoonpayStatusScreen","moonpay"],["CoinbaseOnrampStatusScreen","coinbase-onramp"]]);function y0(e){let t=e.toLowerCase();return!!window?.webkit?.messageHandlers?.ReactNativeWebView||!!window?.ReactNativeWebView||["fbav","fban","instagram","snapchat","linkedinapp"].some((n=>t.includes(n)))}async function OD({rpc:e,address:t}){return(await e.getBalance(t,{commitment:"confirmed"}).send()).value??0n}function ND(){return(function(){if(typeof window<"u")return window.Telegram})()?.WebApp?.initData||void 0}let FD={apple_oauth:"apple",custom_auth:"custom",discord_oauth:"discord",email:"email",farcaster:"farcaster",github_oauth:"github",google_oauth:"google",instagram_oauth:"instagram",linkedin_oauth:"linkedin",passkey:"passkey",phone:"sms",spotify_oauth:"spotify",telegram:"telegram",tiktok_oauth:"tiktok",line_oauth:"line",twitch_oauth:"twitch",twitter_oauth:"twitter",wallet:"siwe",smart_wallet:"siwe",cross_app:"privy:"};const jD=e=>{if(Qa(e))return{displayName:e.replace("custom:",""),loginMethod:"custom"};let t=FD[e];return e==="wallet"||e==="phone"?{displayName:e,loginMethod:t}:{displayName:t,loginMethod:t}},B8=()=>{let e=Ct(),{user:t}=it(),{client:n,refreshSessionAndUser:r,walletProxy:i}=Q();return{migrate:g.useCallback((async()=>{if(e.embeddedWallets.mode==="legacy-embedded-wallets-only")return{success:!0,migrated:!1};if(!t)throw new x("User must be authenticated before migrating wallets",R.MUST_BE_AUTHENTICATED);if(!i)throw new x("Cannot connect to wallet proxy");let a=await n.getAccessToken();if(!a)throw new x("User must be authenticated before migrating wallets",R.MUST_BE_AUTHENTICATED);let s=t.linkedAccounts.filter((c=>c.type==="wallet"&&c.walletClientType==="privy"&&fd(c)&&!mt(c)));if(s.length===0)return{success:!0,migrated:!1};let o=s.filter((c=>c.imported)),l=s.filter((c=>!c.imported));if(l.length>0){let c=l.find((h=>h.chainType==="ethereum"&&h.walletIndex===0))??l.find((h=>h.chainType==="solana"&&h.walletIndex===0))??null;if(!c)throw new x("Primary wallet not found");let{entropyId:u,entropyIdVerifier:p}=Ml(c);try{await i.connect({accessToken:a,entropyId:u,entropyIdVerifier:p})}catch(h){if(!Hl(h)||c.recoveryMethod!=="privy")throw h;await i.recover({accessToken:a,entropyId:u,entropyIdVerifier:p})}await i.createDelegatedAction({accessToken:a,rootWallet:{address:c.address,chainType:c.chainType,imported:!1},delegatedWallets:l.map((h=>({address:h.address,chainType:h.chainType,walletIndex:h.walletIndex??0})))})}for(let c of o){let{entropyId:u,entropyIdVerifier:p}=Ml(c);try{await i.connect({accessToken:a,entropyId:u,entropyIdVerifier:p})}catch(h){if(!Hl(h)||c.recoveryMethod!=="privy")throw h;await i.recover({accessToken:a,entropyId:u,entropyIdVerifier:p})}await i.createDelegatedAction({accessToken:a,rootWallet:{address:c.address,chainType:c.chainType,imported:!0},delegatedWallets:[{address:c.address,chainType:c.chainType,walletIndex:c.walletIndex??0}]})}return await r(),{success:!0,migrated:!0}}),[e.embeddedWallets.mode,t,i,n,r])}},DD=({disabled:e})=>{let{migrate:t}=B8(),{user:n}=it(),{walletProxy:r}=Q(),i=g.useRef(!1),a=g.useRef(0);return g.useEffect((()=>{e||a.current>2||i.current||!n||!r||(i.current=!0,a.current++,t().catch((s=>{console.debug("Unable to migrate wallets: ",s)})).finally((()=>{i.current=!1})))}),[n,r,e,t]),null},z8=e=>({id:e.id,raw_id:e.rawId,response:{client_data_json:e.response.clientDataJSON,authenticator_data:e.response.authenticatorData,signature:e.response.signature,user_handle:e.response.userHandle},authenticator_attachment:e.authenticatorAttachment,client_extension_results:{app_id:e.clientExtensionResults.appid,cred_props:e.clientExtensionResults.credProps,hmac_create_secret:e.clientExtensionResults.hmacCreateSecret},type:e.type}),N2=()=>{let{ethereumEmbedded:e,ethereumExternal:t}=di.getState();return[...e,...t]},K8=(e,t,n)=>!(c1(e).length>0||p1(e).length>0||n===!1||t!=="all-users"&&(t!=="users-without-wallets"||UD(e).length));let UD=e=>e.linkedAccounts.filter((t=>t.type==="wallet"&&t.chainType==="ethereum"));const q8=(e,t,n)=>!(u1(e).length>0||ad(e).length>0||n===!1||t!=="all-users"&&(t!=="users-without-wallets"||WD(e).length));let WD=e=>e.linkedAccounts.filter((t=>t.type==="wallet"&&t.chainType==="solana"));const rp=Symbol("wallet-creation-on-login-plugin");function VD(e){return{id:rp,shouldCreateWallet:e.shouldCreateWallet}}const HD=()=>{let{walletProxy:e,recoverEmbeddedWallet:t,setUser:n,refreshSessionAndUser:r,privy:i,client:a}=Q(),s=Ct();return{create:async({walletIndex:o,chainType:l,latestUser:c,recoveryMethod:u,recoveryPassword:p,recoveryAccessToken:h,idempotencyKey:f})=>{let y=c;y||(y=await r());let m=await a.getAccessToken();if(!y||!m||!e)throw Error("User must be authenticated before creating a Privy wallet");return await h8({appConfig:s,user:y,refreshSessionAndUser:r,privy:i,accessToken:m,proxy:e,recoverEmbeddedWallet:t,setUser:n,walletIndex:o,chainType:l,recoveryMethod:u,recoveryPassword:p,recoveryAccessToken:h,idempotencyKey:f})}}};function ip({subscribe:e,getExternalJwt:t,enabled:n=!0,onAuthenticated:r,onUnauthenticated:i,onError:a}){let{client:s,setAuthenticated:o,setUser:l,setIsNewUser:c}=Q(),{logout:u,authenticated:p,ready:h}=xr(),f=v1(),{create:y}=HD(),m=Ct();if(!s)throw new x("`useSyncJwtBasedAuthState` must be used within a `PrivyProvider`");let[w,E]=g.useState({status:"initial"}),_=g.useRef(void 0),C=g.useRef(!1),k=g.useRef(t);g.useEffect((()=>{k.current=t}),[t]);let S=g.useRef(r);g.useEffect((()=>{S.current=r}),[r]);let b=g.useRef(i);g.useEffect((()=>{b.current=i}),[i]);let F=g.useRef(a);g.useEffect((()=>{F.current=a}),[a]);let H=g.useRef(y);g.useEffect((()=>{H.current=y}),[y]);let ae=g.useRef(m.embeddedWallets.ethereum.createOnLogin);g.useEffect((()=>{ae.current=m.embeddedWallets.ethereum.createOnLogin}),[m.embeddedWallets.ethereum.createOnLogin]);let G=g.useRef(m.embeddedWallets.solana.createOnLogin);g.useEffect((()=>{G.current=m.embeddedWallets.solana.createOnLogin}),[m.embeddedWallets.solana.createOnLogin]);let he=g.useRef(l);g.useEffect((()=>{he.current=l}),[l]);let Be=g.useRef(c);g.useEffect((()=>{Be.current=c}),[c]);let fe=g.useRef(o);return g.useEffect((()=>{fe.current=o}),[o]),g.useEffect((()=>{if(!n||!h)return;let Ie=async()=>{if(!C.current){C.current=!0;try{E({status:"loading"});let Ae=await k.current();if(_.current!==void 0&&_.current===Ae)return void E({status:"done"});if(!Ae)return p&&(await u(),b.current?.()),_.current=Ae,void E({status:"done"});s.startAuthFlow(new _1(Ae));let{user:N,isNewUser:xe=!1}=await s.authenticate();if(!N)throw new x("Failed to sync with custom auth provider");S.current?.({user:N,isNewUser:xe}),he.current(N),Be.current(xe),fe.current(!0);let ke=f(rp)?.shouldCreateWallet({user:N}),be=K8(N,ae.current,ke),Le=q8(N,G.current,ke);if(be&&Le){let ye=await H.current({chainType:"ethereum",walletIndex:0,latestUser:N});await H.current({chainType:"solana",walletIndex:0,latestUser:ye.user})}else Le?await H.current({chainType:"solana",walletIndex:0,latestUser:N}):be&&await H.current({chainType:"ethereum",walletIndex:0,latestUser:N});_.current=Ae,E({status:"done"})}catch(Ae){if(console.warn(Ae),await u().catch((()=>{})),b.current?.(),Ae instanceof Ll&&Ae.privyErrorCode===R.LINKED_TO_ANOTHER_USER)return E({status:"initial"}),void setTimeout((()=>{Ie()}),0);F.current?.(Ae),E({status:"error",error:Ae})}finally{C.current=!1}}};return Ie(),e(Ie)}),[e,s,p,u,n,h,f]),n?{state:w}:{state:{status:"not-enabled"}}}let G8=kn((()=>({jwtAuthFlowState:{status:"not-enabled"}})));function ZD({customAuth:e}){let{jwtAuthFlowState:t}=(function({customAuth:n}){let r=Ar(),i=g.useRef(void 0),a=g.useCallback((l=>(i.current=l,()=>{i.current=void 0})),[]),s=n?.getCustomAccessToken??(()=>Promise.resolve(void 0)),{state:o}=ip({enabled:n?.enabled===!0,subscribe:a,getExternalJwt:s,onAuthenticated:({user:l,isNewUser:c})=>{r("login","onComplete",{user:l,isNewUser:c,wasAlreadyAuthenticated:!1,loginMethod:"custom",loginAccount:null}),r("customAuth","onAuthenticated",{user:l})},onUnauthenticated:()=>{r("customAuth","onUnauthenticated")},onError:l=>{r("login","onError",l.privyErrorCode||R.UNKNOWN_AUTH_ERROR)}});return g.useEffect((()=>{(async()=>n&&!n.isLoading&&i.current?.())()}),[n?.enabled,n?.getCustomAccessToken,n?.isLoading]),{jwtAuthFlowState:o}})({customAuth:e});return g.useEffect((()=>{G8.setState({jwtAuthFlowState:t})}),[t]),null}const BD=["eth_sign","eth_populateTransactionRequest","eth_signTransaction","personal_sign","eth_signTypedData_v4","csw_signUserOperation","secp256k1_sign"];class jt extends Error{constructor(t,n,r){super(t),this.code=n,this.data=r}}class zD extends ld{async handleSendTransaction(t){if(!t.params||!Array.isArray(t.params))throw new jt(`Invalid params for ${t.method}`,4200);let n=t.params[0];if(Ri(n))throw new jt("Tempo (type 118) transactions are not supported via the EIP-1193 provider. Use useSendTransaction from @privy-io/react-auth/tempo instead.",4200);if(!await wt()||!this.address)throw new jt("Disconnected",4900);let r={...n,chainId:n.chainId??xo(this.chainId)},{hash:i}=await tU(r,{address:this.address});return i}async handleSignTransaction(t){if(!t.params||!Array.isArray(t.params))throw new jt(`Invalid params for ${t.method}`,4200);let n=t.params[0];if(vT(n))return this.handleSignTempoTransaction(n);if(!await wt()||!this.address)throw new jt("Disconnected",4900);let r={...n,chainId:n.chainId??xo(this.chainId)},{signature:i}=await eU(r,{address:this.address});return i}async handleSignTempoTransaction(t){let n,r=await wt();if(!r||!this.address)throw new jt("Disconnected",4900);let i=this.walletAccount;if(!i||!mt(i))throw new jt("Tempo (type 118) transactions are only supported on Unified embedded wallets",4200);let a=this.privyClient;if(!a)throw new jt("Disconnected",4900);try{n=G5(CT(t))}catch(o){throw new jt(o instanceof Error?o.message:"Invalid Tempo transaction",4200)}let s=await Xt(a,(async({message:o})=>this.walletProxy.signWithUserSigner({accessToken:r,message:o})),{chain_type:"ethereum",method:"eth_signTransaction",wallet_id:i.id,params:{transaction:n}});if(s.method!=="eth_signTransaction"||!("signed_transaction"in s.data))throw new jt("Unable to sign transaction",4200);return s.data.signed_transaction}handleSwitchEthereumChain(t){let n;if(!t.params||!Array.isArray(t.params))throw new jt(`Invalid params for ${t.method}`,4200);if(typeof t.params[0]=="string")n=t.params[0];else{if(!("chainId"in t.params[0])||typeof t.params[0].chainId!="string")throw new jt(`Invalid params for ${t.method}`,4200);n=t.params[0].chainId}this.chainId=Number(n),this.publicClient=Al(this.chainId,this.chains,this.rpcConfig,{appId:this.appId}),this.emit("chainChanged",n)}async handlePersonalSign(t){if(!t.params||!Array.isArray(t.params))throw Error("Invalid params for personal_sign");let n=t.params[0],r=t.params[1],{signature:i}=await XD({message:n},{address:r});return i}async handleSignedTypedData(t){if(!t.params||!Array.isArray(t.params))throw Error("Invalid params for eth_signTypedData_v4");let n=t.params[0],r=typeof t.params[1]=="string"?JSON.parse(t.params[1]):t.params[1],i=t.params[2],{signature:a}=await QD(xl(r),{address:n,signatureOptions:i?.signatureOptions,caip2:i?.caip2});return a}async handleEstimateGas(t){if(!t.params||!Array.isArray(t.params))throw Error("Invalid params for eth_estimateGas");if(delete t.params[0].gasPrice,delete t.params[0].maxFeePerGas,delete t.params[0].maxPriorityFeePerGas,Ri(t.params[0]))throw new jt("Tempo (type 118) transactions are not supported via the EIP-1193 provider. Use useSendTransaction from @privy-io/react-auth/tempo instead.",4200);let n={...t.params[0],chainId:xo(this.chainId)};return await this.publicClient.estimateGas({account:n.from??this.address,...nl(n)})}async request(t){switch(console.debug("Embedded1193Provider.request() called with args",t),t.method){case"eth_accounts":case"eth_requestAccounts":return this.address?[this.address]:[];case"eth_chainId":return xo(this.chainId);case"eth_estimateGas":return this.handleEstimateGas(t);case"eth_sendTransaction":return this.handleSendTransaction(t);case"eth_signTransaction":return this.handleSignTransaction(t);case"wallet_switchEthereumChain":return this.handleSwitchEthereumChain(t);case"personal_sign":return this.handlePersonalSign(t);case"eth_signTypedData_v4":return this.handleSignedTypedData(t)}if(!(n=>BD.includes(n))(t.method))return this.publicClient.request({method:t.method,params:t.params});{let n=await wt();if(await nU({address:this.address}),!n||!this.address)throw new jt("Disconnected",4900);try{let r={method:t.method,params:t.params},i=this.walletAccount;return i&&mt(i)?this.handleWalletApiRequest(r,i,n):(await this.walletProxy.rpc({accessToken:n,entropyId:this.entropyId,entropyIdVerifier:this.entropyIdVerifier,chainType:"ethereum",hdWalletIndex:this.walletIndex,request:r})).response.data}catch(r){throw console.error(r),new jt("Disconnected",4900)}}}async handleWalletApiRequest(t,n,r){let i=this.privyClient;if(!i)throw new jt("Disconnected",4900);if(t.method==="secp256k1_sign"){let a=await Xt(i,(async({message:s})=>this.walletProxy.signWithUserSigner({accessToken:r,message:s})),{chain_type:"ethereum",method:"secp256k1_sign",wallet_id:n.id,params:{hash:t.params[0]}});if(a.method!=="secp256k1_sign")throw new jt(`Invalid params for ${t.method}`,4200);return a.data.signature}throw new jt(`Method not supported: ${t.method}`,4200)}constructor({walletProxy:t,address:n,entropyId:r,entropyIdVerifier:i,rpcConfig:a,chains:s,appId:o,chainId:l=1,walletIndex:c,privyClient:u,walletAccount:p}){super(),this.walletProxy=t,this.address=n,this.entropyId=r,this.entropyIdVerifier=i,this.chainId=l,this.rpcConfig=a,this.chains=s,this.publicClient=Al(l,this.chains,a,{appId:o}),this.rpcTimeoutDuration=X4(a,"privy"),this.appId=o,this.walletIndex=c,this.privyClient=u,this.walletAccount=p}}const KD=({...e}={})=>d.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:e.color||"var(--privy-color-foreground-3)"})});let qD=[],GD={};const YD=()=>((()=>{let e=Ct(),{user:t}=it(),{walletProxy:n,privy:r}=Q(),{fundWallet:i}=r7(),[a,s]=g.useState(GD),o=g.useRef(i);g.useEffect((()=>{o.current=i}),[i]);let l=g.useMemo((()=>t&&n?t.linkedAccounts.filter((c=>c.type==="wallet"&&c.chainType==="ethereum"&&c.walletIndex!==null&&c.walletClientType==="privy")):qD),[t,n]);g.useEffect((()=>{if(l.length<1)return void di.setState({ethereumEmbedded:[]});let c=w1(),u=l.map((p=>{let h=a[p.address]??e.defaultChain.id,f=()=>{if(!t||!n)throw new x("User not ready");let{entropyId:m,entropyIdVerifier:w}=Rn(t,p);return new zD({walletProxy:n,address:p.address,entropyId:m,entropyIdVerifier:w,rpcConfig:e.rpcConfig,chains:e.chains,appId:e.id,chainId:h,walletIndex:p.walletIndex,privyClient:r,walletAccount:p})},y=c.find((m=>m.address===p.address&&m.connectorType===p.connectorType&&m.walletClientType===p.walletClientType))?.connectedAt??p.firstVerifiedAt?.getTime()??Date.now();return{fund:async m=>{await o.current({address:p.address,options:m})},type:"ethereum",chainId:`eip155:${h}`,switchChain:async m=>{s((w=>({...w,[p.address]:Number(m)})))},getEthereumProvider:async()=>f(),sign:async m=>await f().request({method:"personal_sign",params:[En(m),p.address]}),address:p.address,connectedAt:y,walletClientType:"privy",connectorType:p.imported?"embedded_imported":"embedded",imported:p.imported,meta:{name:"Privy Wallet",icon:KD,id:"io.privy.wallet"},isConnected:async()=>!0,disconnect:()=>{},linked:!0,loginOrLink:async()=>{throw new x("Cannot link or login with embedded wallet")},unlink:async()=>{throw new x("Cannot unlink with embedded wallet")},walletIndex:p.walletIndex}}));di.setState((p=>p.ethereumEmbedded.length===u.length&&p.ethereumEmbedded.every(((h,f)=>{let y=u[f];return h.address===y.address&&h.chainId===y.chainId&&h.connectorType===y.connectorType&&h.connectedAt===y.connectedAt}))?{}:{ethereumEmbedded:u}))}),[l,e.chains,e.defaultChain.id,e.id,e.rpcConfig,a,r,t,n])})(),null);let Y8,J8,X8,Q8,ey;const JD=e=>{let t=e.client,n=e.privy,r=Ct();S4(Bu(r?.appearance.walletList??[]));let[i,a]=g.useState(!1),s=ci((v=>v.inProgressMfaFlow)),[o,l]=g.useState(!1),c=Dn((v=>v.user)),[u,p]=g.useState(void 0),[h,f]=g.useState(!1),[y,m]=g.useState(null),[w,E]=g.useState(!1),[_,C]=g.useState({status:"disconnected",connectedWallet:null,connectError:null,connector:null,connectRetry:D}),[k,S]=g.useState({status:"initial"}),[b,F]=g.useState({status:"initial"}),[H,ae]=g.useState({status:"initial"}),[G,he]=g.useState({status:"initial"}),[Be,fe]=g.useState({status:"initial"}),[Ie,Ae]=g.useState({status:"initial"}),[N,xe]=g.useState(null),ke=f1(),{initializationError:be,setInitializationError:Le}=Dk(),[ye,Me]=g.useState({}),[we,ze]=g.useState(null),q=g.useRef(null),at=g.useRef(null),et=g.useRef(null),U=g.useRef(VI),$e=Dn((v=>v.authenticated)),ue=g.useCallback((v=>{zf(v),!v&&y&&$d[y]().then((L=>{L.default.isUnauthenticatedScreem&&m(null)}))}),[y]);t.onStoreCustomerAccessToken=v=>{v&&V(U,"accessToken","onAccessTokenGranted",{accessToken:v})},t.onDeleteCustomerAccessToken=()=>{nt(null),ue(!1),V(U,"accessToken","onAccessTokenRemoved")};let Y=g.useRef(null),ne=g.useRef(null),Rt=g.useRef(!1),$n=({showWalletUIs:v})=>Rt.current?Rt.current:v!==void 0?!v:!r.embeddedWallets.showWalletUIs,Ue=v=>{m(v),setTimeout((()=>{a(!!v)}),15)};g.useEffect((()=>{N&&q.current?.(N)}),[N]),g.useEffect((()=>{if(r.externalWallets.solana.connectors)return r.externalWallets.solana.connectors.onMount(),()=>r.externalWallets.solana.connectors?.onUnmount()}),[r.externalWallets.solana.connectors]),g.useEffect((()=>{RD()}),[]),g.useEffect((()=>{!o&&ke&&(async function(){let v,L=Ci(),I=da(),T=ET();t.initializeConnectorManager({walletConnectCloudProjectId:r.walletConnectCloudProjectId,rpcConfig:r.rpcConfig,chains:r.chains,defaultChain:r.defaultChain,store:T,walletList:r.appearance.walletList,shouldEnforceDefaultChainOnConnect:r.shouldEnforceDefaultChainOnConnect,externalWalletConfig:r.externalWallets,appName:r.name??"Privy",walletChainType:r.appearance.walletChainType,setBaseAccountSdk:p,connectorsDebugLogs:r.connectorsDebugLogs}),t.connectors?.on("connectorInitialized",(()=>{v&&clearTimeout(v);let W=t.connectors.walletConnectors.length,B=t.connectors.walletConnectors.reduce(((Ce,De)=>Ce+(De.initialized?1:0)),0);B===W?g6(!0):v=setTimeout((()=>{console.debug({message:"Unable to initialize all expected connectors before timeout",initialized:B,expected:W}),g6(!0)}),1500)})),t.connectors?.initialize().then((()=>{sr()}));let M=await t.getAuthenticatedUser();if(UI(!0),I&&M){let W,B=t.authFlow;if(B.meta.telegramWebAppData?.user)try{W=String(JSON.parse(B.meta.telegramWebAppData.user).id)}catch{}let Ce=M.telegram?.telegramUserId;W&&Ce!==W&&(await t.logout(),t.startAuthFlow(B),M=null)}let O=!!M;return r.legal.requireUsersAcceptTerms&&M&&!M.hasAcceptedTerms?(await t.logout(),oe.setReadyToTrue(!0),void V(U,"logout","onSuccess")):(r.customAuth?.enabled||(ue(!!M),M&&V(U,"login","onComplete",{user:M,isNewUser:!1,wasAlreadyAuthenticated:!0,loginMethod:null,loginAccount:null}),nt(M)),L?void(ne.current=O?"link":"login"):I&&!O||kr(!!M)&&!O?(ne.current="login",Y.current="telegram",Me({telegramAuthModalData:{seamlessAuth:!0}}),void Ue("TelegramAuthScreen")):void oe.setReadyToTrue(!!M))})().catch((v=>{let L=v instanceof Error?v:Error(String(v));Le(L),console.warn("Error initializing Privy provider: ",L)}))}),[t,we,o,ke,Le]),g.useEffect((()=>{t.connectors?.setWalletList(r.appearance.walletList)}),[r.appearance.walletList.join()]);let Ci=()=>{let v=js();return v.inProgress&&v.popupFlow?window.opener.location.origin!==window.location.origin?void window.opener.postMessage({type:"PRIVY_OAUTH_ERROR",error:"Origins between parent and child windows do not match."}):v.authorizationCode==="error"?void window.opener.postMessage({type:"PRIVY_OAUTH_ERROR",error:"Something went wrong. Try again."}):void window.opener.postMessage({type:"PRIVY_OAUTH_RESPONSE",stateCode:v.stateCode,authorizationCode:v.authorizationCode}):(v.inProgress&&v.provider.startsWith("privy:")&&!v.popupFlow&&(new BroadcastChannel(p0).postMessage({type:"PRIVY_OAUTH_RESPONSE",stateCode:v.stateCode,authorizationCode:v.authorizationCode}),window.close()),!!v.inProgress&&!!v.withPrivyUi&&(t.startAuthFlow(new Ca({...v,customOAuthRedirectUrl:r.customOAuthRedirectUrl})),Ue("OAuthStatusScreen"),!0))},da=()=>{if(!r.loginConfig.telegramHasHmacCredentials)return;let v=(function(){let I;return(I=(function(){let T=new URLSearchParams(window.location.search),M=Number(T.get("id")||""),O=T.get("hash"),W=Number(T.get("auth_date")||""),B=T.get("first_name");if(M&&B&&W&&O)return Object.fromEntries(T.entries())})())?(l0(),{flowType:"login-url",authData:I}):(I=(function(){let T=window.location.hash;if(!T||!T.startsWith("#tgWebAppData"))return;let M=o0(T.replace("#tgWebAppData=","")),{user:O,auth_date:W,hash:B}=M;return O&&W&&B?M:void 0})())?(l0(),{flowType:"web-app",authData:I}):void 0})();if(!v||!r.loginMethods.telegram||!r.loginConfig.telegramAuthConfiguration?.seamlessAuthEnabled)return;let L=new ma;return t.startAuthFlow(L),v.flowType==="login-url"&&(L.meta.telegramWebAppData=void 0,L.meta.telegramAuthResult=v.authData),v.flowType==="web-app"&&(L.meta.telegramAuthResult=void 0,L.meta.telegramWebAppData=v.authData),!0},kr=v=>{if(!r.loginMethods.telegram||r.loginConfig.telegramHasHmacCredentials||!r.loginConfig.telegramSeamlessAuthEnabled||v)return!1;let L=ND();if(!L)return!1;let I=(function(M){try{let O=M.split("&").filter((B=>B.length>0)).map((B=>{let Ce=B.indexOf("=");return Ce===-1?[decodeURIComponent(B),""]:[decodeURIComponent(B.slice(0,Ce)),decodeURIComponent(B.slice(Ce+1))]})),W=Object.fromEntries(O);return W.signature?W:null}catch{return null}})(L);if(!I)return!1;let T=new ma;return t.startAuthFlow(T),T.meta.telegramAuthResult=void 0,T.meta.telegramWebAppData=I,!0},Vn=async(v,L,I,T)=>{if(v!=="solana_adapter")nn(await t.connectors?.createEthereumWalletConnector({connectorType:v,walletClientType:L})||null,L,I,T);else{let M=t.connectors?.findSolanaWalletConnector(L);if(!M)return;nn(M,L,I,T)}};async function nn(v,L,I,T){if(!v)return C({status:"disconnected",connectedWallet:null,connectError:new At("Unable to connect to wallet."),connector:null,connectRetry:D}),T?.(null,I);C({status:"disconnected",connectedWallet:null,connectError:null,connector:v,connectRetry:D}),v&&Q4(v)&&L&&await v.resetConnection(L),C({connector:v,status:"connecting",connectedWallet:null,connectError:null,connectRetry:()=>nn(v,L,I,T)});try{let M=await v.connect({showPrompt:!0});return M&&ni(M)&&await KI(M,r,(()=>{C((O=>({...O,connector:v,status:"switching_to_supported_chain",connectedWallet:null,connectError:null,connectRetry:D})))})),C((O=>({...O,status:"connected",connectedWallet:M,connectError:null,connectRetry:D}))),M&&V(U,"connectWallet","onSuccess",{wallet:M}),T?.(M,I)}catch(M){return M instanceof wi?(console.warn(M.cause?M.cause:M.message),V(U,"connectWallet","onError",M.privyErrorCode||R.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(M),V(U,"connectWallet","onError",R.UNKNOWN_CONNECT_WALLET_ERROR)),C((O=>({...O,status:"disconnected",connectedWallet:null,connectError:M}))),T?.(null,I)}}let $r=async(v,L,I)=>{if(v===null||!ni(v))return;let T=new Do(t,v,L,I);t.startAuthFlow(T)},Hn=async(v,L,I,T="plain")=>{let M=xa($T);if(T==="transaction"&&!M)throw new x("useSolanaLedger plugin hook must be mounted");if(v===null||!Yk(v))return;let O=new s0(v,t,L,I,T,M);t.startAuthFlow(O)},sr=async()=>{let v=new URLSearchParams(window.location.search),L=v.get("privy_connector"),I=v.get("privy_wallet_client"),T=v.get("privy_connect_only")==="true";if(!L||!I)return;J.debug("Mobile wallet return detected",{connectorType:L,wallet:I,connectOnly:T});let M=Gk({connectorType:L,walletClientType:I});if(!M||!M.isInstalled)return J.warn("Wallet not installed on mobile return",{wallet:I,hasConfig:!!M,isInstalled:M?.isInstalled}),Ue("LoginFailedScreen");if(!t.connectors)throw new x("Connector not initialized");await Ue(T?"ConnectOnlyStatusScreen":"ConnectionStatusScreen");let O=new URL(window.location.href);O.searchParams.delete("privy_connector"),O.searchParams.delete("privy_wallet_client"),O.searchParams.delete("privy_connect_only"),window.history.pushState({},"",O),J.debug("Launching connection flow from mobile return",{wallet:I,connectorType:L,connectOnly:T}),Vn(L,I,void 0,T?void 0:L==="solana_adapter"?Hn:$r)};g.useEffect((()=>{o&&$e&&c===null&&t.getAuthenticatedUser().then(nt)}),[o,$e,c,t]);let Qe=v=>{if(!$e)throw V(U,"linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:v}),new x("User must be authenticated before linking an account.")},ca=v=>{if(!$e||!c)return!1;if(v.walletClientType==="privy")return!0;for(let L of c.linkedAccounts)if(L.type==="wallet"&&L.address===v.address&&L.walletClientType!=="privy")return!0;return!1},or=()=>{di.setState((v=>{let L=t.connectors?.wallets.filter(ni).map((I=>({...I,linked:ca(I),loginOrLink:async()=>{if(!await I.isConnected())throw new x("Wallet is not connected");if(I.connectorType==="embedded"&&I.walletClientType==="privy")throw new x("Cannot link or login with embedded wallet");(async T=>{let M;if(!t.connectors)throw new x("Connector not initialized");M=T.type==="ethereum"?t.connectors.findWalletConnector(T.connectorType,T.walletClientType)||null:t.connectors.findSolanaWalletConnector(T.walletClientType)||null,C((O=>({...O,connector:M,status:"connected",connectedWallet:T,connectError:null,connectRetry:D}))),r.captcha.enabledProvider&&!$e?(Me({captchaModalData:{callback:O=>ni(T)?$r(T,O):Hn(T,O),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),await Ue("CaptchaScreen")):(ni(T)?await $r(T):await Hn(T),await Ue("ConnectionStatusScreen"))})(I)},fund:async T=>{await oe.fundWallet(I.address,T)},unlink:async()=>{if(!$e)throw new x("User is not authenticated.");if(I.connectorType==="embedded"&&I.walletClientType==="privy")throw new x("Cannot unlink an embedded wallet");nt(await t.unlinkEthereumWallet(I.address))}})))||[];return J4(v.ethereumExternal,L)?{}:{ethereumExternal:L}}))};g.useEffect((()=>{or()}),[c?.linkedAccounts,$e,o]),g.useEffect((()=>{if(o){if(!t.connectors)throw new x("Connector not initialized");or(),t.connectors.on("walletsUpdated",or)}}),[o]),g.useEffect((()=>{[...r.loginMethodsAndOrder?.primary??[],...r.loginMethodsAndOrder?.overflow??[]].filter((v=>v.startsWith("privy:"))).forEach((v=>t.getCrossAppProviderDetails(v.replace("privy:",""))))}),[!!t]);let lr=({transaction:v,sponsor:L,uiOptions:I,fundWalletConfig:T,address:M,signOnly:O})=>new Promise((async(W,B)=>{let{requesterAppId:Ce}=I||{},De=O?"signTransaction":"sendTransaction",st=M?Pn(c,M):Y2(c);if(!st&&M){let Ge=Lo(N2(),M);if(Ge){if(L)return B(new x("Cannot sponsor transactions for externally connected wallet.")),void V(U,De,"onError",R.TRANSACTION_FAILURE);try{let yt=await Ge.getEthereumProvider(),Re=v.data,_t=xa(gl);_t&&(Re=_t.appendDataSuffix({data:Re}));let Yt={...v,from:M,chainId:v.chainId||Number(Ge.chainId.replace("eip155:","")),value:v.value!==void 0?En(v.value):void 0,data:Re},Zn=await yt.request({method:De==="sendTransaction"?"eth_sendTransaction":"eth_signTransaction",params:[Yt]});return V(U,De,"onSuccess",{hash:Zn}),void W({hash:Zn})}catch(yt){return V(U,De,"onError",R.TRANSACTION_FAILURE),void B(yt??new ur("Unable to "+De+yt))}}}if(!st)return V(U,De,"onError",R.EMBEDDED_WALLET_NOT_FOUND),void B(new x("No embedded or connected wallet found for address."));if(!$e||!c)return V(U,De,"onError",R.MUST_BE_AUTHENTICATED),void B(Error("User must be authenticated before signing with a Privy wallet"));let Je=st.address,ft=st.walletIndex??0,{entropyId:me,entropyIdVerifier:tt}=Rn(c,st),Et=Lo(N2(),Je);if(!Et)return V(U,De,"onError",R.EMBEDDED_WALLET_NOT_FOUND),void B(Error("Must have a Privy wallet before signing"));let Bt=await Et.getEthereumProvider(),Sn=await Bt.request({method:"eth_chainId"}),rn=v.chainId?Number(v.chainId):Gf(Sn);(Ge=>{if(!r.chains.map((yt=>yt.id)).includes(Ge))throw new At(`Chain ID ${Ge} is not supported. It must be added to the config.supportedChains property of the PrivyProvider.`,R.UNSUPPORTED_CHAIN_ID)})(rn);let Gt=xa(gl),dr=v.data;Gt&&!L&&(dr=Gt.appendDataSuffix({data:dr}));let fn={...v,from:v.from??Je,chainId:rn,data:dr},an=await wt();if(!an||!N)return V(U,De,"onError",R.EMBEDDED_WALLET_NOT_FOUND),void B(Error("Must have valid access token and Privy wallet to send transaction"));let l2=Al(fn.chainId,r.chains,r.rpcConfig,{appId:e.appId}),Gr=mt(st),d2=async({transactionRequest:Ge})=>{try{let yt;if(!await oe.recoverEmbeddedWallet({address:Je}))throw V(U,De,"onError",R.UNKNOWN_CONNECT_WALLET_ERROR),B(Error("Unable to connect to wallet")),Error("Unable to connect to wallet");if(L){let Re=await(async({transactionRequest:_t})=>{if(!Gr)throw new x("Sponsoring is only supported for wallets on the TEE stack");if(O)throw new x("Cannot sponsor a sign transaction request");let Yt=Yr=>Yr==null?void 0:En(Yr),Zn=await Xt(n,(async({message:Yr})=>await N.signWithUserSigner({accessToken:an,requesterAppId:Ce,message:Yr})),{chain_type:"ethereum",method:"eth_sendTransaction",caip2:X2(En(_t.chainId)),sponsor:!0,...Gt?{experimental_data_suffix:Gt.suffix}:{},params:{transaction:{from:_t.from,to:_t.to,chain_id:Yt(_t.chainId),data:F2(_t.data)?_t.data?_t.data:En(Uint8Array.from(_t.data)):void 0,value:Yt(_t.value)}},wallet_id:st.id});if(Zn.data&&"hash"in Zn.data)return Zn.data.hash;throw new ur("Unable to sign transaction")})({transactionRequest:Ge});return V(U,"sendTransaction","onSuccess",{hash:Re}),Re}if(Gr){let Re=Yt=>{if(Yt!=null)return F2(Yt)?Yt:En(Yt)},_t=await Xt(n,(async({message:Yt})=>await N.signWithUserSigner({accessToken:an,requesterAppId:Ce,message:Yt})),{chain_type:"ethereum",method:"eth_signTransaction",params:{transaction:{from:Ge.from,to:Ge.to,nonce:Re(Ge.nonce),chain_id:Re(Ge.chainId),data:F2(Ge.data)?Ge.data?Ge.data:En(Uint8Array.from(Ge.data)):void 0,value:Re(Ge.value),type:Ge.type,gas_limit:Re(Ge.gasLimit??Ge.gas),gas_price:Re(Ge.gasPrice??Ge.gas),max_fee_per_gas:Re(Ge.maxFeePerGas),max_priority_fee_per_gas:Re(Ge.maxPriorityFeePerGas)}},wallet_id:st.id});if(!_t.data||!("signed_transaction"in _t.data))throw new ur("Unable to sign transaction");yt=_t.data.signed_transaction}else yt=await(async function({accessToken:Re,entropyId:_t,entropyIdVerifier:Yt,transactingWalletIndex:Zn,walletProxy:Yr,transactionRequest:Sd,requesterAppId:Td}){return(await Yr.rpc({entropyId:_t,entropyIdVerifier:Yt,hdWalletIndex:Zn??0,chainType:"ethereum",accessToken:Re,requesterAppId:Td,request:{method:"eth_signTransaction",params:[Sd]}})).response.data})({accessToken:an,entropyId:me,entropyIdVerifier:tt,transactingWalletIndex:ft,walletProxy:N,transactionRequest:Ge,requesterAppId:Ce});if(O)return V(U,"signTransaction","onSuccess",{signature:yt}),yt;{let Re=await l2.sendRawTransaction({serializedTransaction:yt});return V(U,"sendTransaction","onSuccess",{hash:Re}),Re}}catch(yt){throw V(U,De,"onError",R.TRANSACTION_FAILURE),yt}};if($n({showWalletUIs:I?.showWalletUIs}))try{let Ge=O||L?fn:await r6(fn,l2,fn.from),yt=await d2({transactionRequest:Ge});O?V(U,"signTransaction","onSuccess",{signature:yt}):V(U,"sendTransaction","onSuccess",{hash:yt}),W({hash:yt})}catch(Ge){V(U,De,"onError",R.TRANSACTION_FAILURE),B(Ge)}else{let Ge={connectingWalletAddress:Je,recoveryMethod:st.recoveryMethod,entropyId:me,entropyIdVerifier:tt,onCompleteNavigateTo:"SendTransactionScreen",isUnifiedWallet:Gr,onFailure:Re=>{V(U,De,"onError",R.UNKNOWN_CONNECT_WALLET_ERROR),B(Re)}},yt=(Re=>!!Re.fundingConfig&&F1(Re.fundingConfig.options).length>=1)(r)?w6({address:Je,appConfig:r,fundWalletConfig:T,methodScreen:"FundingMethodSelectionScreen",chainIdOverride:fn.chainId,comingFromSendTransactionScreen:!0}):void 0;Me({connectWallet:Ge,sendTransaction:{transactionRequest:fn,transactingWalletIndex:ft,transactingWalletAddress:Je,entropyId:me,entropyIdVerifier:tt,signOnly:O,scanTransaction:async()=>{let Re=await r6(fn,l2,fn.from);return await t.scanTransaction({metadata:{domain:r.embeddedWallets.transactionScanning.domain},chain_id:Re.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:Re.from,to:Re.to,value:Re.value?.toString(),gas:Re.gas?.toString(),gasPrice:Re.gasPrice?.toString(),nonce:Re.nonce?.toString(),data:Re.data}]}})},getIsSponsored:async()=>!!L,onConfirm:({transactionRequest:Re})=>d2({transactionRequest:Re}),onSuccess:Re=>{O?V(U,"signTransaction","onSuccess",{signature:Re.hash}):V(U,"sendTransaction","onSuccess",{hash:Re.hash}),W(Re)},onFailure:Re=>{V(U,De,"onError",R.TRANSACTION_FAILURE),B(Re)},uiOptions:I||{},fundWalletConfig:T,requesterAppId:Ce},funding:yt}),Ue("EmbeddedWalletConnectingScreen")}}));function Ht(){return new Promise((async(v,L)=>{if(!c||c.mfaMethods.length===0)return v();let I=await wt();if(!I||!N)throw Error("Must have valid access token to enroll in MFA");try{await N.verifyMfa({accessToken:I}),v()}catch(T){L(T)}}))}let pn=v=>v?.linkedAccounts.filter((L=>L.latestVerifiedAt!==null&&!(L.type==="wallet"&&L.walletClientType==="privy"))).sort(((L,I)=>I.latestVerifiedAt.getTime()-L.latestVerifiedAt.getTime()))[0],lt=v=>{let L=c?.linkedAccounts.filter((M=>M.type===v)).length??0,{displayName:I,loginMethod:T}=jD(v);if(v==="passkey"&&L>=5||v!=="passkey"&&L>=1)throw V(U,"linkAccount","onError",R.CANNOT_LINK_MORE_OF_TYPE,{linkMethod:T}),new x(`User already has an account of type ${I} linked.`)};async function Ne({showAutomaticRecovery:v=!1,legacySetWalletPasswordFlow:L=!1}){m(null);let I=L?"setWalletPassword":"setWalletRecovery";if(!$e||!c)throw V(U,I,"onError",R.MUST_BE_AUTHENTICATED),Error("User must be authenticated before adding recovery method to Privy wallet");let T=Ss(c);if(!T||!N)throw V(U,I,"onError",R.EMBEDDED_WALLET_NOT_FOUND),Error("Must have a Privy wallet to add a recovery method");let M=mt(T);if(M)throw V(U,I,"onError",R.UNSUPPORTED_WALLET_TYPE),new x("User owned wallet recovery is only supported for on-device execution and this app uses TEE execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");try{await Ht()}catch(O){throw V(U,I,"onError",R.MISSING_MFA_CREDENTIALS),O}return new Promise(((O,W)=>{let B=T.recoveryMethod==="user-passcode",Ce=TD({walletAction:"update",availableRecoveryMethods:r.embeddedWallets.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:L,isResettingPassword:B,showAutomaticRecovery:v}),{entropyId:De,entropyIdVerifier:st}=Rn(c),Je={recoveryMethod:T.recoveryMethod,connectingWalletAddress:T.address,onCompleteNavigateTo:Ce,shouldForceMFA:!1,entropyId:De,isUnifiedWallet:M,entropyIdVerifier:st,onFailure:ft=>{V(U,I,"onError",R.UNKNOWN_CONNECT_WALLET_ERROR),W(ft)}};Me({setWalletPassword:{onSuccess:ft=>{V(U,I,"onSuccess",{method:"user-passcode",wallet:ft}),O(ft)},onFailure:ft=>{V(U,I,"onError",R.USER_EXITED_SET_PASSWORD_FLOW),W(ft)},callAuthOnSuccessOnClose:!1},recoverWallet:{entropyId:De,entropyIdVerifier:st,onFailure:W},connectWallet:Je,recoverySelection:{isInAccountCreateFlow:!1,isResettingPassword:B,shouldCreateEth:!1,shouldCreateSol:!1}}),Ue("EmbeddedWalletConnectingScreen")}))}let We={ready:o,authenticated:$e,user:c,error:be,walletConnectors:t.connectors||null,connectWallet:v=>{v&&"target"in v&&v&&(v=void 0),Me({externalConnectWallet:{walletList:v?.walletList&&v?.walletList.length>0?v.walletList:void 0,walletChainType:v?.walletChainType,description:v?.description,hideHeader:v?.hideHeader}}),Ue("ConnectOnlyLandingScreen")},linkWallet:v=>(v&&"target"in v&&v&&(v=void 0),Qe("siwe"),Y.current="siwe",ne.current="link",Me({...ye,externalConnectWallet:{...ye.externalConnectWallet,walletList:v?.walletList,walletChainType:v?.walletChainType,description:v?.description||`Link a wallet to your ${r?.name} account`}}),Ue("AuthenticateWithWalletScreen")),linkEmail:()=>{Qe("email"),lt("email"),Y.current="email",ne.current="link",Ue("LinkEmailScreen")},linkPhone:()=>{Qe("sms"),lt("phone"),Y.current="sms",ne.current="link",Ue("LinkPhoneScreen")},linkGoogle:async()=>{Qe("google"),lt("google_oauth"),ne.current="link",await oe.initLoginWithOAuth("google")},linkTwitter:async()=>{Qe("twitter"),lt("twitter_oauth"),ne.current="link",await oe.initLoginWithOAuth("twitter")},linkTwitch:async()=>{Qe("twitch"),lt("twitch_oauth"),ne.current="link",await oe.initLoginWithOAuth("twitch")},linkDiscord:async()=>{Qe("discord"),lt("discord_oauth"),ne.current="link",await oe.initLoginWithOAuth("discord")},linkGithub:async()=>{Qe("github"),lt("github_oauth"),ne.current="link",await oe.initLoginWithOAuth("github")},linkSpotify:async()=>{Qe("spotify"),lt("spotify_oauth"),ne.current="link",await oe.initLoginWithOAuth("spotify")},linkInstagram:async()=>{Qe("instagram"),lt("instagram_oauth"),ne.current="link",await oe.initLoginWithOAuth("instagram")},linkTiktok:async()=>{Qe("tiktok"),lt("tiktok_oauth"),ne.current="link",await oe.initLoginWithOAuth("tiktok")},linkLine:async()=>{Qe("line"),lt("line_oauth"),ne.current="link",await oe.initLoginWithOAuth("line")},linkLinkedIn:async()=>{Qe("linkedin"),lt("linkedin_oauth"),ne.current="link",await oe.initLoginWithOAuth("linkedin")},linkApple:async()=>{Qe("apple"),lt("apple_oauth"),ne.current="link",await oe.initLoginWithOAuth("apple")},linkOAuth:async({provider:v})=>{Qe(v),lt(Qa(v)?v:`${v}_oauth`),ne.current="link",await oe.initLoginWithOAuth(v)},linkPasskey:async v=>{Qe("passkey"),lt("passkey"),await oe.initLinkWithPasskey(),Me({passkeyAuthModalData:{passkeySignupFlow:!1,name:v?.name}}),Ue("LinkPasskeyScreen")},linkTelegram:async v=>{if(Qe("telegram"),lt("telegram"),!r.loginConfig.telegramHasHmacCredentials)throw new x('linkTelegram requires HMAC bot credentials. Use linkWithOAuth("telegram") for OIDC-configured apps.');if(ne.current="link",Y.current="telegram",v?.launchParams)if(v.launchParams.initDataRaw){let L=new ma;t.startAuthFlow(L),L.meta.telegramAuthResult=void 0,L.meta.telegramWebAppData=o0(v.launchParams.initDataRaw),Me({telegramAuthModalData:{seamlessAuth:!0}}),Ue("TelegramAuthScreen")}else V(U,"linkAccount","onError",R.INVALID_DATA,{linkMethod:"telegram"});else await oe.initLoginWithTelegram();Ue("TelegramAuthScreen")},linkFarcaster:async()=>{Qe("farcaster"),lt("farcaster"),await oe.initLoginWithFarcaster(),ne.current="link",Y.current="farcaster",Ue("FarcasterConnectStatusScreen")},login:async v=>{v&&"target"in v&&v&&(v=void 0);let L="Attempted to log in, but user is already logged in. Use a `link` helper instead.";if(!o){let I=await new Promise((T=>{ze((M=>T.bind(M)))}));if(ze(null),I)return void console.warn(L)}!c||c.isGuest?(ne.current="login",Me({login:v}),Ue("LandingScreen")):console.warn(L)},connectOrCreateWallet:async()=>{o||(await new Promise((v=>{ze((()=>v))})),ze(null)),$e?console.warn("User must be unauthenticated to `connectOrCreateWallet`"):(ne.current="connect-or-create",Ue("ConnectOrCreateScreen"))},logout:async()=>{if(ne.current=null,Y.current=null,c&&t.clearProviderAcccessTokens(c),m(null),await t.logout(),c&&N)try{await N.clearMfa({userId:c.id})}catch{}nt(null),ue(!1),f(!1),F({status:"initial"}),ae({status:"initial"}),S({status:"initial"}),he({status:"initial"}),fe({status:"initial"}),Ae({status:"initial"}),V(U,"logout","onSuccess"),a(!1),le.del(Zu),le.del(E4(r.id))},getAccessToken:g.useCallback((async()=>{let v=await t.getCustomerAccessToken();return v&&!$e&&ue(!0),v}),[t,$e]),setWalletRecovery:async v=>Ne({legacySetWalletPasswordFlow:!1,showAutomaticRecovery:v?.showAutomaticRecovery??!1}),setWalletPassword:async()=>Ne({legacySetWalletPasswordFlow:!0,showAutomaticRecovery:!1}),signMessage:(v,L)=>new Promise((async(I,T)=>{let{requesterAppId:M}=L?.uiOptions||{},O=v.message,W=L?.address?Pn(c,L.address):Y2(c);if(!W&&L?.address!==void 0){let me=Lo(N2(),L.address);if(me)try{let tt=await me.getEthereumProvider(),Et=await tt.request({method:"personal_sign",params:[O,me.address]});return V(U,"signMessage","onSuccess",{signature:Et}),void I({signature:Et})}catch(tt){return V(U,"signMessage","onError",R.UNABLE_TO_SIGN),void T(tt??new ur("Unable to sign message"))}}if(!W)throw new x("No embedded or connected wallet found for address.");if(!$e||!c)return V(U,"signMessage","onError",R.MUST_BE_AUTHENTICATED),void T(Error("User must be authenticated before signing with a Privy wallet"));let B=W.address,Ce=W.walletIndex??0,{entropyId:De,entropyIdVerifier:st}=Rn(c,W),Je=mt(W);if(typeof O!="string"||O.length<1)return V(U,"signMessage","onError",R.INVALID_MESSAGE),void T(Error("Message must be a non-empty string"));let ft=async()=>{let me;if(!$e)throw Error("User must be authenticated before signing with a Privy wallet");let tt=await wt();if(!N||!tt||!await oe.recoverEmbeddedWallet({address:B}))throw Error("Unable to connect to wallet");if(t.createAnalyticsEvent({eventName:"embedded_wallet_sign_message_started",payload:{walletAddress:B,requesterAppId:M}}),Je){let Et=F2(v.message,{strict:!0}),Bt=await Xt(n,(async({message:Sn})=>await N.signWithUserSigner({accessToken:tt,requesterAppId:M,message:Sn})),{chain_type:"ethereum",method:"personal_sign",params:Et?{message:O.slice(2),encoding:"hex"}:{message:O,encoding:"utf-8"},wallet_id:W.id});if(!Bt.data||!("signature"in Bt.data))throw new ur("Unable to sign message");me=Bt.data.signature}else{let{response:Et}=await N.rpc({accessToken:tt,entropyId:De,entropyIdVerifier:st,chainType:"ethereum",hdWalletIndex:Ce,requesterAppId:M,request:{method:"personal_sign",params:[O,B]}});me=Et.data}return t.createAnalyticsEvent({eventName:"embedded_wallet_sign_message_completed",payload:{walletAddress:B,requesterAppId:M}}),me};if($n({showWalletUIs:L?.uiOptions?.showWalletUIs}))try{let me=await ft();V(U,"signMessage","onSuccess",{signature:me}),I({signature:me})}catch(me){V(U,"signMessage","onError",R.UNABLE_TO_SIGN),T(me??new ur("Unable to sign message"))}else Me({signMessage:{method:"personal_sign",data:O,confirmAndSign:ft,onSuccess:me=>{V(U,"signMessage","onSuccess",{signature:me}),I({signature:me})},onFailure:me=>{V(U,"signMessage","onError",R.UNABLE_TO_SIGN),T(me)},uiOptions:L?.uiOptions||{}},connectWallet:{recoveryMethod:W.recoveryMethod,connectingWalletAddress:B,entropyId:De,entropyIdVerifier:st,onCompleteNavigateTo:"SignRequestScreen",isUnifiedWallet:Je,onFailure:me=>{V(U,"signMessage","onError",R.UNKNOWN_CONNECT_WALLET_ERROR),T(me)}}}),Ue("EmbeddedWalletConnectingScreen")})),signTypedData:(v,L)=>new Promise((async(I,T)=>{let{requesterAppId:M}=L?.uiOptions||{},O=L?.address?Pn(c,L.address):Y2(c);if(!O&&L?.address){let me=Lo(N2(),L.address);if(me)try{let tt=await me.getEthereumProvider(),Et=xl(v),Bt=await tt.request({method:"eth_signTypedData_v4",params:[me.address,JSON.stringify(Et,((Sn,rn)=>typeof rn=="bigint"?rn.toString():rn))]});return V(U,"signTypedData","onSuccess",{signature:Bt}),void I({signature:Bt})}catch(tt){return V(U,"signTypedData","onError",R.UNABLE_TO_SIGN),void T(tt??new ur("Unable to sign typed data "+tt))}}if(!O)throw new x("No embedded or connected wallet found for address.");if(!$e||!c)return V(U,"signTypedData","onError",R.MUST_BE_AUTHENTICATED),void T(Error("User must be authenticated before signing with a Privy wallet"));let W=O.address,B=O.walletIndex??0,{entropyId:Ce,entropyIdVerifier:De}=Rn(c,O),st=mt(O),Je=xl(v),ft=async()=>{let me;if(!$e)throw Error("User must be authenticated before signing with a Privy wallet");let tt=await wt();if(!N||!tt||!await oe.recoverEmbeddedWallet({address:W}))throw Error("Unable to connect to wallet");if(t.createAnalyticsEvent({eventName:"embedded_wallet_sign_typed_data_started",payload:{walletAddress:W,requesterAppId:M}}),st){let{domain:Et,types:Bt,primaryType:Sn,message:rn}=Je,Gt=await Xt(n,(async({message:dr})=>await N.signWithUserSigner({accessToken:tt,requesterAppId:M,message:dr})),{chain_type:"ethereum",method:"eth_signTypedData_v4",params:{typed_data:{domain:Et,types:Bt,primary_type:Sn,message:rn}},wallet_id:O.id,...L?.signatureOptions?{signature_options:L.signatureOptions}:{},...L?.caip2?{caip2:L.caip2}:{}});if(!Gt.data||!("signature"in Gt.data))throw new ur("Unable to sign message");me=Gt.data.signature}else{let{response:Et}=await N.rpc({accessToken:tt,entropyId:Ce,entropyIdVerifier:De,chainType:"ethereum",hdWalletIndex:B,requesterAppId:M,request:{method:"eth_signTypedData_v4",params:[W,Je]}});me=Et.data}return t.createAnalyticsEvent({eventName:"embedded_wallet_sign_typed_data_completed",payload:{walletAddress:W,requesterAppId:M}}),me};if($n({showWalletUIs:L?.uiOptions?.showWalletUIs}))try{let me=await ft();V(U,"signTypedData","onSuccess",{signature:me}),I({signature:me})}catch(me){V(U,"signTypedData","onError",R.UNABLE_TO_SIGN),T(me??new ur("Unable to sign message"))}else Me({signMessage:{method:"eth_signTypedData_v4",data:Je,confirmAndSign:ft,onSuccess:me=>{V(U,"signTypedData","onSuccess",{signature:me}),I({signature:me})},onFailure:me=>{V(U,"signTypedData","onError",R.UNABLE_TO_SIGN),T(me)},uiOptions:L?.uiOptions||{}},connectWallet:{recoveryMethod:O.recoveryMethod,connectingWalletAddress:O.address,entropyId:Ce,isUnifiedWallet:st,entropyIdVerifier:De,onCompleteNavigateTo:"SignRequestScreen",onFailure:me=>{V(U,"signMessage","onError",R.UNKNOWN_CONNECT_WALLET_ERROR),T(me)}}}),Ue("EmbeddedWalletConnectingScreen")})),sendTransaction:async(v,L)=>await lr({transaction:v,sponsor:L?.sponsor,uiOptions:L?.uiOptions,fundWalletConfig:L?.fundWalletConfig,address:L?.address,signOnly:!1}),signTransaction:async(v,L)=>({signature:(await lr({transaction:v,uiOptions:L?.uiOptions,address:L?.address,signOnly:!0})).hash}),promptMfa:Ht,async init(v){switch(v){case"sms":return void await t.initMfaSmsVerification();case"passkey":return await t.initMfaPasskeyVerification();case"totp":return;default:throw Error(`Unsupported MFA method: ${v}`)}},async submit(v,L){switch(v){case"totp":case"sms":if(typeof L!="string")throw new x("Invalid MFA code");at.current?.resolve({mfaMethod:v,mfaCode:L,relyingParty:window.origin}),await new Promise(((M,O)=>{et.current={resolve:M,reject:O}}));break;case"passkey":if(typeof L=="string")throw new x("Invalid authenticator response");let I=await K(()=>import("./index-BDkarAkX.js"),[],import.meta.url),T=z8(await I.startAuthentication({optionsJSON:L}));at.current?.resolve({mfaMethod:v,mfaCode:T,relyingParty:window.origin}),await new Promise(((M,O)=>{et.current={resolve:M,reject:O}}));break;default:throw at.current?.reject(new x("Unsupported MFA method")),new x(`Unsupported MFA method: ${v}`)}},cancel(){at.current?.reject(new x("MFA canceled"))},async clear(){if(!c||!N)throw Error("Must be authenticated to clear MFA");await N.clearMfa({userId:c.id})},async initEnrollmentWithSms(v){let L=await wt();if(!L||!N)throw Error("Must have valid access token to enroll in MFA");await N.initEnrollMfa({method:"sms",accessToken:L,phoneNumber:v.phoneNumber})},enrollInMfa:v=>new Promise(((L,I)=>{if(!v)return oe.closePrivyModal(),void L();r.mfa.noPromptOnMfaRequired&&console.warn("[Privy Warning] Triggering the 'showMfaEnrollmentModal' function when 'noPromptOnMfaRequired' is set to true is unexpected. If this is intentional, ensure that you are building custom UIs for MFA verification."),Me({mfaEnrollmentFlow:{mfaMethods:r.mfa.methods,shouldUnlinkOnUnenrollMfa:r.passkeys.shouldUnlinkOnUnenrollMfa,onSuccess:L,onFailure:I}}),Ue("MfaEnrollmentFlowScreen")})),async initEnrollmentWithTotp(){let v=await wt();if(!v||!N)throw Error("Must have valid access token to enroll in MFA");let L=await N.initEnrollMfa({method:"totp",accessToken:v});return{secret:L.secret,authUrl:L.authUrl}},async submitEnrollmentWithSms(v){let L=await wt();if(!L||!N)throw Error("Must have valid access token to enroll in MFA");await N.submitEnrollMfa({method:"sms",accessToken:L,phoneNumber:v.phoneNumber,code:v.mfaCode}),nt(await t.getAuthenticatedUser())},async submitEnrollmentWithTotp(v){let L=await wt();if(!L||!N)throw Error("Must have valid access token to enroll in MFA");await N.submitEnrollMfa({method:"totp",accessToken:L,code:v.mfaCode}),nt(await t.getAuthenticatedUser())},async initEnrollmentWithPasskey(){},async submitEnrollmentWithPasskey({credentialIds:v},L={}){let I=await wt();if(!I||!N)throw Error("Must have valid access token to enroll in MFA");await N.submitEnrollMfa({method:"passkey",accessToken:I,credentialIds:v,removeForLogin:L.removeForLogin}),nt(await t.getAuthenticatedUser())},async unenroll(v,L={}){let I=await wt();if(!I||!N)throw Error("Must have valid access token to remove MFA");v==="passkey"?await N.submitEnrollMfa({method:"passkey",accessToken:I,credentialIds:[],removeForLogin:L.removeForLogin}):await N.unenrollMfa({method:v,accessToken:I});let T=await t.getAuthenticatedUser();if(nt(T),T&&T.mfaMethods.length===0)try{await N.clearMfa({userId:T.id})}catch{}},isModalOpen:i||!!s,mfaMethods:r.mfa.methods};Y8=We.signMessage,J8=We.signTypedData,Q8=async(v,L)=>await lr({transaction:v,...L,signOnly:!1}),X8=async(v,L)=>({signature:(await lr({transaction:v,...L,signOnly:!0})).hash});let Ee=async v=>{let L,I,T;E(!0),fe({status:"loading"}),t.startAuthFlow(new Ca({...v,customOAuthRedirectUrl:r.customOAuthRedirectUrl}));let M=le.get(vl),O=v.stateCode;if(M!==O)throw t.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:v.provider,storedStateCode:M??"",returnedStateCode:O??""}}),E(!1),new x("Unexpected auth flow. This may be a phishing attempt.",void 0,R.OAUTH_UNEXPECTED);if(await t.getAccessToken()!==null)try{({user:L,oAuthTokens:T}=await t.link()),Y.current=v.provider;let W=pn(L);L&&W&&V(U,"linkAccount","onSuccess",{user:L,linkMethod:Y.current,linkedAccount:W})}catch(W){throw E(!1),V(U,"linkAccount","onError",W.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:v.provider}),W}else try{({user:L,isNewUser:I,oAuthTokens:T}=await t.authenticate()),Y.current=v.provider;let W=pn(L);L&&W&&I!==void 0&&V(U,"login","onComplete",{user:L,isNewUser:I,wasAlreadyAuthenticated:!1,loginMethod:Y.current,loginAccount:W})}catch(W){throw E(!1),fe({status:"error",error:W}),V(U,"login","onError",W.privyErrorCode||R.UNKNOWN_AUTH_ERROR),W}return nt(L),f(I||!1),ue(!0),E(!1),fe({status:"done"}),T&&L&&V(U,"oAuthAuthorization","onOAuthTokenGrant",{oAuthTokens:T,user:L}),L??void 0},oe={privy:n,setAuthenticated:ue,setUser:nt,setIsNewUser:f,isNewUserThisSession:h,pendingTransaction:null,walletConnectionStatus:_,setWalletConnectionStatus:C,connectors:t.connectors?.walletConnectors??[],rpcConfig:r.rpcConfig,chains:r.chains,appId:e.appId,showFiatPrices:r.embeddedWallets.priceDisplay.primary!=="native-token",clientAnalyticsId:t.clientAnalyticsId,hideWalletUIs:Rt,isHeadlessSigning:g.useCallback($n,[r.embeddedWallets.showWalletUIs]),emailOtpState:b,setEmailOtpState:F,smsOtpState:H,setSmsOtpState:ae,oAuthState:Be,setOAuthState:fe,telegramAuthState:Ie,setTelegramAuthState:Ae,siweState:G,setSiweState:he,isHeadlessOAuthLoading:w,baseAccountSdk:u,setBaseAccountSdk:p,nativeTokenSymbolForChainId:v=>r.chains.find((L=>L.id===Number(v)))?.nativeCurrency.symbol,initializeWalletProxy:async v=>{if(N)return N;let L=new Promise((M=>{q.current=M})),I=new Promise((M=>setTimeout((()=>M(null)),v))),T=await Promise.race([L,I]);return q.current=null,T},getAuthFlow:()=>t.authFlow,getAuthMeta:()=>t.authFlow?.meta,client:t,closePrivyModal:async(v={shouldCallAuthOnSuccess:!0,isSuccess:!1})=>{let L,I=o&&$e&&c;if(I&&Y.current&&(L=pn(c)),ne.current==="login")v.shouldCallAuthOnSuccess&&I&&Y.current?V(U,"login","onComplete",{user:c,isNewUser:h,wasAlreadyAuthenticated:!1,loginMethod:Y.current,loginAccount:L??null}):V(U,"login","onError",R.USER_EXITED_AUTH_FLOW);else if(ne.current==="link"&&L)v.isSuccess&&I&&Y.current?V(U,"linkAccount","onSuccess",{user:c,linkMethod:Y.current,linkedAccount:L}):Y.current&&V(U,"linkAccount","onError",R.USER_EXITED_LINK_FLOW,{linkMethod:Y.current});else if(ne.current==="update"&&L)v.isSuccess&&I&&Y.current?V(U,"update","onSuccess",{user:c,updateMethod:Y.current,updatedAccount:L}):Y.current&&V(U,"update","onError",R.USER_EXITED_UPDATE_FLOW,{linkMethod:Y.current});else if(ne.current==="connect-or-create"){let O=N2();O[0]?V(U,"connectOrCreateWallet","onSuccess",{wallet:O[0]}):V(U,"connectOrCreateWallet","onError",R.USER_EXITED_AUTH_FLOW)}let T=y&&zc.has(y),M=y==="ErrorScreen"&&ye.errorModalData&&zc.has(ye.errorModalData.previousScreen);if((T||M)&&ye.funding){let O,W=zc.get(y)??null;if(M&&ye.funding?.onError){let B=ye.errorModalData?.error,Ce=B?.privyErrorCode||R.UNKNOWN_FUNDING_ERROR,De=new x(B?.message||"Funding failed",B,Ce);ye.funding?.onError?.(De)}if(ye.funding.chainType==="solana"){let B=r.solanaRpcs[ye.funding.chain];if(!B)return console.warn("Unable to load solana rpc, skipping balance"),V(U,"fundSolanaWallet","onUserExited",{address:ye.funding.address,fundingMethod:W,chain:ye.funding.chain,balance:O}),a(!1),void f0(ye.funding,W);if(xa(kT))try{O=await OD({rpc:B.rpc,address:ye.funding.address})}catch{console.error("Unable to pull wallet balance")}else console.warn("Unable to load solana plugin, skipping balance");V(U,"fundSolanaWallet","onUserExited",{address:ye.funding.address,fundingMethod:W,chain:ye.funding.chain,balance:O})}else{let B=Al(ye.funding.chain.id,r.chains,r.rpcConfig,{appId:e.appId});try{O=await B.getBalance({address:ye.funding.address})}catch{console.error("Unable to pull wallet balance")}V(U,"fundWallet","onUserExited",{address:ye.funding.address,chain:ye.funding.chain,fundingMethod:W,balance:O}),f0(ye.funding,W)}}Me((O=>({...O,externalConnectWallet:{}}))),ne.current=null,Y.current=null,f(!1),a(!1),C({status:"disconnected",connectedWallet:null,connector:null,connectError:null,connectRetry:()=>{}}),setTimeout((()=>{t.authFlow=void 0}),200)},openPrivyModal:Ue,connectWallet:nn,initLoginWithWallet:async(v,L,I,T)=>{ni(v)?(Y.current="siwe",$r(v,L,I)):(Y.current="siws",Hn(v,L,I,T))},loginWithWallet:async()=>{let v,L,I;if(!o)throw new bi;if(t.authFlow instanceof Do?v="siwe":t.authFlow instanceof s0&&(v="siws"),!v)throw new x("Must initialize SIWE/SIWS flow first.");if(await t.getAccessToken()!==null)try{({user:L}=await t.link()),Y.current=v}catch(T){throw V(U,"linkAccount","onError",T.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:v}),T}else try{({user:L,isNewUser:I}=await t.authenticate()),Y.current=v}catch(T){throw V(U,"login","onError",T.privyErrorCode||R.GENERIC_CONNECT_WALLET_ERROR),T}nt(L||c||null),f(I||!1),ue(!0)},delegateWallet:async({address:v,chainType:L,showDelegationUIs:I})=>new Promise((async(T,M)=>{let O=await wt();if(!$e||!c||!O)throw new x("User must be authenticated and have an embedded wallet to delegate actions.");if(L!=="solana"&&L!=="ethereum")throw new x("Only Solana and Ethereum embedded wallets are supported for delegation and revocation.");let W=oe.walletProxy??await oe.initializeWalletProxy(15e3);if(!W)throw new x("Wallet proxy not initialized.");if((({address:Je,user:ft})=>!!u0(ft).find((me=>me.address===Je)))({address:v,user:c}))return T();let B=Pn(c,v);if(!B)throw new x("Address to delegate is not associated with current user.");if(mt(B))throw new x("useDelegatedActions is only supported for on-device execution and this app uses TEE execution. Use the useSessionSigners hook to provision server side access on behalf of your users. Learn more at https://docs.privy.io/recipes/tee-wallet-migration-guide");let Ce=H8({address:v,user:c}),De=Z8({address:v,user:c}),st=async()=>{await W.createDelegatedAction({accessToken:O,rootWallet:De,delegatedWallets:[Ce]}),await oe.refreshSessionAndUser()};if(await oe.recoverEmbeddedWallet({address:v}),I)Me({delegatedActions:{consent:{address:v,onDelegate:st,onSuccess:async()=>{T()},onError:async Je=>{M(Je)}}}}),Ue("DelegatedActionsConsentScreen");else try{await st(),T()}catch(Je){M(Je)}})),revokeDelegatedWallets:async({showDelegationUIs:v})=>new Promise((async(L,I)=>{if(!$e||!c)throw new x("User must be authenticated and have an embedded wallet to revoke a delegated wallet.");let T=u0(c);if(T.length===0)throw new x("User has no delegated wallets to revoke.");if(T.some(mt))throw new x("useDelegatedActions is only supported for on-device execution and this app uses TEE execution. Use the useSessionSigners hook to provision server side access on behalf of your users. Learn more at https://docs.privy.io/recipes/tee-wallet-migration-guide");let M=async()=>{await t.revokeDelegatedWallet(),await oe.refreshSessionAndUser()};if(v)Me({delegatedActions:{revoke:{onRevoke:M,onSuccess:async()=>{L()},onError:async O=>{I(O)}}}}),Ue("DelegatedActionsRevokeScreen");else try{await M(),L()}catch(O){I(O)}})),initLoginWithFarcaster:async(v,L)=>{let I=new a0(v,L);t.startAuthFlow(I);try{Y.current="farcaster",await I.initializeFarcasterConnect()}catch(T){throw ne.current==="login"?V(U,"login","onError",T.privyErrorCode||R.UNKNOWN_AUTH_ERROR):ne.current==="link"&&V(U,"linkAccount","onError",T.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"farcaster"}),T}},loginWithFarcaster:async()=>{let v,L;if(!o)throw new bi;if(!(t.authFlow instanceof a0))throw new x("Must initialize Farcaster flow first.");if(await t.getAccessToken()!==null)try{({user:v}=await t.link()),Y.current="farcaster"}catch(I){throw V(U,"linkAccount","onError",I.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"farcaster"}),I}else try{({user:v,isNewUser:L}=await t.authenticate()),Y.current="farcaster"}catch(I){throw V(U,"login","onError",I.privyErrorCode||R.UNKNOWN_AUTH_ERROR),I}nt(v||null),f(L||!1),ue(!0)},async crossAppAuthFlow({appId:v,popup:L,action:I,disableSignup:T}){let M=`privy:${v}`;Y.current=M;let{url:O,stateCode:W,codeVerifier:B}=await SF({api:t.api,appId:v});if(!O)throw t.createAnalyticsEvent({eventName:"cross_app_auth_error",payload:{error:"Unable to open cross-app auth popup",appId:v}}),new x("No authorization URL returned for cross-app auth.");try{let Ce=await(async function({url:me,popup:tt}){return tt.location=me,new Promise(((Et,Bt)=>{let Sn,rn=setTimeout((()=>{Bt(new x("Authorization request timed out after 2 minutes.")),Gt()}),12e4);function Gt(){tt?.close(),window.removeEventListener("message",fn)}let dr=setInterval((()=>{tt?.closed&&!Sn&&(Gt(),clearInterval(dr),clearTimeout(rn),Bt(new x("User rejected request")))}),300);function fn(an){an.data&&(an.data.type==="PRIVY_OAUTH_RESPONSE"&&an.data.stateCode&&an.data.authorizationCode&&(clearTimeout(rn),Et(an.data),Gt()),an.data.type==="PRIVY_OAUTH_ERROR"&&(clearTimeout(rn),Bt(new x(an.data.error)),Gt()),an.data.type===h0&&((Sn=new BroadcastChannel(p0)).onmessage=fn))}window.addEventListener("message",fn)}))})({url:O,popup:L,provider:M}),De=Ce.stateCode,st=Ce.authorizationCode;if(De!==W)throw t.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:M,storedStateCode:W??"",returnedStateCode:De??""}}),new x("Unexpected auth flow. This may be a phishing attempt.",void 0,R.OAUTH_UNEXPECTED);let Je=await TF({appId:v,codeVerifier:B,stateCode:De,authorizationCode:st,action:I,client:t,disableSignup:T});Je&&t.storeProviderAccessToken(v,Je);let ft=await oe.refreshSessionAndUser();if(!ft)throw new x("Unable to update user");return t.createAnalyticsEvent({eventName:"cross_app_auth_completed",payload:{providerAppId:v}}),ft}catch(Ce){throw t.createAnalyticsEvent({eventName:"cross_app_auth_error",payload:{error:Ce.toString(),provider:M}}),Ce}},async initLoginWithOAuth(v,L,I){if(Y.current=v,!qu()||v==="google"&&!r.allowOAuthInEmbeddedBrowsers&&y0(window.navigator.userAgent))return void Ue("InAppBrowserLoginNotPossible");v==="twitter"&&window.opener&&window.opener.postMessage({type:h0},"*"),le.del(Cl),le.del(J2);let T=new Ca({provider:v,disableSignup:!!I,withPrivyUi:!0,customOAuthRedirectUrl:r.customOAuthRedirectUrl});L&&T.addCaptchaToken(L),t.startAuthFlow(T);let M=await t.authFlow.getAuthorizationUrl();if(M&&M.url)if(v==="twitter"&&Hr.isAndroid&&(M.url=M.url.replace("x.com","twitter.com")),window.location.protocol==="chrome-extension:"&&Ju())try{let{privyOAuthCode:O,privyOAuthState:W}=await n6(M.url);Ue("OAuthStatusScreen"),T.meta.stateCode=W,T.meta.authorizationCode=O}catch(O){throw console.error("OAuth in chrome extension flow failed:",O),O}else window.location.assign(M.url)},async initLoginWithTelegram(v,L){if(!o)throw new bi;Y.current="telegram";let I=new ma(v,L);t.startAuthFlow(I),Ae({status:"loading"}),I.meta.telegramWebAppData=void 0,I.meta.telegramAuthResult=await new Promise(((T,M)=>r.loginConfig.telegramAuthConfiguration?window.Telegram?void window.Telegram.Login.auth({bot_id:r.loginConfig.telegramAuthConfiguration.botId,request_access:!0},(O=>O?T(O):(ne.current==="link"?V(U,"linkAccount","onError",R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"telegram"}):ne.current==="login"?V(U,"login","onError",R.INVALID_CREDENTIALS):ne.current==="update"&&V(U,"login","onError",R.FAILED_TO_UPDATE_ACCOUNT),M(new x("Telegram auth failed or was canceled by the client"))))):M(new x("Telegram was not initialized")):M(new x("Telegram Auth configuration is not loaded"))))},async loginWithTelegram(v){let L,I;if(!(t.authFlow instanceof ma))throw new x("Must initialize Telegram flow before calling loginWithTelegram");t.authFlow.meta.captchaToken||=v?.captchaToken;let T=await wt(),M=v?.intent||ne.current;if(M==="login")try{let W=await t.authenticate();L=W.user,I=W.isNewUser,Y.current="telegram"}catch(W){throw V(U,"login","onError",W.privyErrorCode||R.UNKNOWN_AUTH_ERROR),W}else{if(M!=="link")throw new x("Unknown auth intent");try{L=(await t.link()).user,Y.current="telegram"}catch(W){throw V(U,"linkAccount","onError",W.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"telegram"}),W}}nt(L),f(I||!1),ue(!0),Ae({status:"done"});let O=L?.linkedAccounts.find((({type:W})=>W==="telegram"))||null;return{user:L,isNewUser:I||!1,wasAlreadyAuthenticated:!!T,loginAccount:O}},async loginWithOAuth(v){let L,I,T;if(!(t.authFlow instanceof Ca))throw new x("Must initialize OAuth flow before calling loginWithOAuth");let M=le.get(vl),O=t.authFlow.meta.stateCode;if(M!==O)throw t.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:v,storedStateCode:M??"",returnedStateCode:O??""}}),new x("Unexpected auth flow. This may be a phishing attempt.",void 0,R.OAUTH_UNEXPECTED);if(await t.getAccessToken()!==null)try{let W=await t.link();L=W.user,I=!1,T=W.oAuthTokens,Y.current=v}catch(W){throw V(U,"linkAccount","onError",W.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:v}),W}else try{let W=await t.authenticate();L=W.user,I=W.isNewUser,T=W.oAuthTokens,Y.current=v}catch(W){throw ne.current==="login"?V(U,"login","onError",W.privyErrorCode||R.UNKNOWN_AUTH_ERROR):ne.current==="link"&&V(U,"linkAccount","onError",W.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:v}),W}return nt(L),f(I||!1),ue(!0),T&&L&&V(U,"oAuthAuthorization","onOAuthTokenGrant",{oAuthTokens:T,user:L}),T},passkeyAuthState:k,setPasskeyAuthState:S,async initSignupWithPasskey({captchaToken:v,withPrivyUi:L}){let I=new ya({captchaToken:v,setPasskeyAuthState:S,hints:r.passkeys.registration?.hints});t.startAuthFlow(I),ne.current="login";try{Y.current="passkey",S({status:"generating-challenge"}),await I.initRegisterFlow(L),S({status:"awaiting-passkey"})}catch(T){throw S({status:"error",error:T}),V(U,"login","onError",T.privyErrorCode||R.UNKNOWN_AUTH_ERROR),T}},async signupWithPasskey(){let v,L;if(!o)throw new bi;if(!(t.authFlow instanceof ya))throw new x("Must initialize Passkey flow first.");if(Y.current!=="passkey"){let M=new x("Must init login with Passkey flow first.");throw S({status:"error",error:M}),M}let I=await wt();try{Y.current="passkey",S({status:"awaiting-passkey"}),{user:v,isNewUser:L}=await t.authenticate()}catch(M){throw S({status:"error",error:M}),V(U,"login","onError",M.privyErrorCode||R.UNKNOWN_AUTH_ERROR),M}nt(v),f(L||!1),ue(!0),S({status:"done"});let T=v?.linkedAccounts.find((({type:M})=>M==="passkey"))||null;return{user:v,isNewUser:L||!1,wasAlreadyAuthenticated:!!I,loginAccount:T}},async initLoginWithPasskey({captchaToken:v,withPrivyUi:L}){let I=new ya({captchaToken:v,setPasskeyAuthState:S,hints:void 0});t.startAuthFlow(I),ne.current="login";try{Y.current="passkey",S({status:"generating-challenge"}),await I.initAuthenticationFlow(L),S({status:"awaiting-passkey"})}catch(T){throw S({status:"error",error:T}),V(U,"login","onError",T.privyErrorCode||R.UNKNOWN_AUTH_ERROR),T}},async loginWithPasskey(v){let L,I;if(!o)throw new bi;if(!(t.authFlow instanceof ya))throw new x("Must initialize Passkey flow first.");if(v?.credentialIds&&(t.authFlow.meta.allowedCredentialsIds=v.credentialIds),Y.current!=="passkey"){let O=new x("Must init login with Passkey flow first.");throw S({status:"error",error:O}),O}let T=await wt();try{Y.current="passkey",S({status:"awaiting-passkey"}),{user:L,isNewUser:I}=await t.authenticate()}catch(O){throw S({status:"error",error:O}),V(U,"login","onError",O.privyErrorCode||R.UNKNOWN_AUTH_ERROR),O}nt(L),f(I||!1),ue(!0),S({status:"done"});let M=L?.linkedAccounts.find((({type:O})=>O==="passkey"))||null;return{user:L,isNewUser:I||!1,wasAlreadyAuthenticated:!!T,loginAccount:M}},async initLinkWithPasskey(v){let L=new ya({captchaToken:v,hints:r.passkeys.registration?.hints});t.startAuthFlow(L),ne.current="link",Y.current="passkey",S({status:"generating-challenge"});try{await L.initLinkFlow(),S({status:"awaiting-passkey"})}catch(I){throw V(U,"linkAccount","onError",I.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"passkey"}),S({status:"error",error:I}),I}},async linkWithPasskey(v){let L;if(!o)throw new bi;if(!(t.authFlow instanceof ya))throw new x("Must initialize Passkey flow first.");if(Y.current!=="passkey")throw new x("Must init login with Passkey flow first.");try{Y.current="passkey",t.authFlow.meta.name=v?.name,{user:L}=await t.link()}catch(I){throw V(U,"linkAccount","onError",I.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"passkey"}),I}return nt(L||c||null),S({status:"done"}),L},async initLoginWithHeadlessOAuth(v,L,I){if(!qu()||v==="google"&&!r.allowOAuthInEmbeddedBrowsers&&y0(window.navigator.userAgent))throw Error("It looks like you're using an in-app browser. To log in, please try again using an external browser.");let T=new Ca({provider:v,withPrivyUi:!1,disableSignup:I??!1,customOAuthRedirectUrl:r.customOAuthRedirectUrl});L&&T.addCaptchaToken(L),fe({status:"loading"});let M=await t.startAuthFlow(T).getAuthorizationUrl();if(M?.url)if(window.location.protocol==="chrome-extension:"&&Ju())try{let{privyOAuthCode:O,privyOAuthState:W}=await n6(M.url);T.meta.stateCode=W,T.meta.authorizationCode=O,await Ee(T.meta)}catch(O){throw fe({status:"error",error:O}),O}else window.location.assign(M.url)},loginWithHeadlessOAuth:Ee,initLoginWithEmail:async({email:v,captchaToken:L,disableSignup:I,withPrivyUi:T})=>{let M=new Oi({email:v,captchaToken:L,disableSignup:I});t.startAuthFlow(M);try{Y.current="email",F({status:"sending-code"});let O=await M.sendCodeEmail({withPrivyUi:T});if(O?.ssoRedirectUrl)return window.location.href=O.ssoRedirectUrl,void await El(1e4);F({status:"awaiting-code-input"})}catch(O){throw F({status:"error",error:O}),ne.current==="login"?V(U,"login","onError",O.privyErrorCode||R.UNKNOWN_AUTH_ERROR):ne.current==="link"&&V(U,"linkAccount","onError",O.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"email"}),O}},initUpdateEmail:async({oldAddress:v,newAddress:L,captchaToken:I})=>{let T=new sf(v,L,I);t.startAuthFlow(T);try{await T.sendCodeEmail({withPrivyUi:!0})}catch(M){throw V(U,"update","onError",M.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:Y.current}),M}},initUpdatePhone:async(v,L,I)=>{let T=new df(v,L,I);t.startAuthFlow(T);try{await T.sendSmsCode({withPrivyUi:!0})}catch(M){V(U,"update","onError",M.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:Y.current})}},initLoginWithSms:async({phoneNumber:v,captchaToken:L,disableSignup:I,withPrivyUi:T})=>{ae({status:"sending-code"});let M=new Ni({phoneNumber:v,captchaToken:L,disableSignup:I});t.startAuthFlow(M);try{Y.current="sms",await M.sendSmsCode({withPrivyUi:T}),ae({status:"awaiting-code-input"})}catch(O){throw ae({status:"error",error:O}),ne.current==="login"?V(U,"login","onError",O.privyErrorCode||R.UNKNOWN_AUTH_ERROR):ne.current==="link"&&V(U,"linkAccount","onError",O.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"sms"}),O}},resendEmailCode:async()=>{await t.authFlow?.sendCodeEmail({withPrivyUi:!0})},resendSmsCode:async()=>{await t.authFlow?.sendSmsCode({withPrivyUi:!0})},loginWithCode:async v=>{let L,I;function T(B){t.authFlow instanceof Oi?F(B):t.authFlow instanceof Ni&&ae(B)}if(T({status:"submitting-code"}),!o){let B=new bi;throw T({status:"error",error:B}),B}if(t.authFlow instanceof Oi)t.authFlow.meta.emailCode=v.trim();else{if(!(t.authFlow instanceof Ni)){let B=new x("Must initialize a passwordless code flow first");throw T({status:"error",error:B}),B}t.authFlow.meta.smsCode=v.trim()}let M=await wt();if(ne.current==="link")try{({user:L}=await t.link())}catch(B){throw T({status:"error",error:B}),V(U,"linkAccount","onError",B.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:Y.current}),B}else if(ne.current==="update")try{({user:L}=await t.link())}catch(B){throw T({status:"error",error:B}),V(U,"update","onError",B.privyErrorCode||R.FAILED_TO_UPDATE_ACCOUNT,{linkMethod:Y.current}),B}else try{({user:L,isNewUser:I}=await t.authenticate())}catch(B){throw T({status:"error",error:B}),V(U,"login","onError",B.privyErrorCode||R.UNKNOWN_AUTH_ERROR),B}let O=L||c;nt(O||null),f(I||!1),ue(!0),T({status:"done"});let W=null;return t.authFlow instanceof Oi?W=O?.linkedAccounts.find((({type:B})=>B==="email"))||null:t.authFlow instanceof Ni&&(W=O?.linkedAccounts.find((({type:B})=>B==="phone"))||null),{user:O,isNewUser:I||!1,wasAlreadyAuthenticated:!!M,linkedAccount:W}},generateSiweMessage:async({address:v,chainId:L,captchaToken:I})=>{ne.current=$e?"link":"login",Y.current="siwe",he({status:"generating-message"});let T=await t.generateSiweNonce({address:v,captchaToken:I});return he({status:"awaiting-signature"}),Xu({address:v,chainId:L.replace("eip155:",""),nonce:T})},generateSiweMessageForSmartWallet:async({address:v,chainId:L})=>{let I=await t.generateSiweNonce({address:v});return Xu({address:v,chainId:L.replace("eip155:",""),nonce:I})},linkSmartWallet:async({message:v,signature:L,smartWalletType:I,smartWalletVersion:T})=>{let M;M=await t.linkSmartWallet({message:v,signature:L,smartWalletType:I,smartWalletVersion:T}),nt((M=await oe.refreshSessionAndUser()??M)||c||null)},loginWithSiwe:async({message:v,signature:L,captchaToken:I,disableSignup:T,walletClientType:M,connectorType:O})=>{let W,B=null;try{if(c)throw Error("User already authenticated");let Ce=new Do(t,void 0,I,T,{message:v,signature:L,walletClientType:M,connectorType:O});if(t.startAuthFlow(Ce),Y.current="siwe",ne.current="login",he({status:"submitting-signature"}),{user:B,isNewUser:W}=await t.authenticate(),!B)throw Error("Authentication failed - no user returned")}catch(Ce){throw V(U,"login","onError",Ce.privyErrorCode||R.UNKNOWN_AUTH_ERROR),he({status:"error",error:Ce}),Ce}return nt(B),f(W||!1),ue(!0),he({status:"done"}),ne.current=null,Y.current=null,{user:B,isNewUser:W||!1}},linkWithSiwe:async({message:v,signature:L,chainId:I,walletClientType:T,connectorType:M})=>{let O;Qe("siwe");let W=null;try{he({status:"submitting-signature"}),O=await t.linkWithSiwe({message:v,signature:L,chainId:I,walletClientType:T,connectorType:M}),O=await oe.refreshSessionAndUser()??O,he({status:"done"}),(W=pn(O)||null)&&V(U,"linkAccount","onSuccess",{user:O,linkMethod:"siwe",linkedAccount:W})}catch(Ce){throw V(U,"linkAccount","onError",Ce.privyErrorCode||R.FAILED_TO_LINK_ACCOUNT,{linkMethod:"siwe"}),ne.current=null,Y.current=null,he({status:"error",error:Ce}),Ce}let B=O||c;return nt(B||null),ne.current=null,Y.current=null,{user:B,linkedAccount:W}},refreshSessionAndUser:async()=>{let v=await t.getAuthenticatedUser();return ue(!!v),nt(v),v},walletProxy:N,createAnalyticsEvent:({eventName:v,payload:L,timestamp:I})=>t.createAnalyticsEvent({eventName:v,payload:L,timestamp:I}),acceptTerms:async()=>{let v=await t.acceptTerms();return nt(v),v},getUsdTokenPrice:v=>t.getUsdTokenPrice(v),getUsdPriceForSol:()=>t.getUsdPriceForSol(),getSplTokenMetadata:v=>t.getSplTokenMetadata(v),recoverEmbeddedWallet:async v=>new Promise((async(L,I)=>{if(!c)return void L(!0);let T=v?.address?Pn(c,v.address):Ss(c)||p1(c).at(0)||ad(c).at(0);if(!T||mt(T))return void L(!0);let M=await wt();if(!M||!N||!T)return void I(Error("Must have valid access token and Privy wallet to recover wallet"));let{entropyId:O,entropyIdVerifier:W}=Rn(c,T);try{await N.connect({accessToken:M,entropyId:O,entropyIdVerifier:W}),L(!0)}catch(B){if(Hl(B)&&T.recoveryMethod==="privy"){let Ce;t.createAnalyticsEvent({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:T.address}});try{Ce=await N.recover({entropyId:O,entropyIdVerifier:W,accessToken:M})}catch(De){return void I(De)}Ce.entropyId||I(Error("Unable to recover wallet")),t.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:T.address}}),L(!0)}else Hl(B)&&T.recoveryMethod!=="privy"&&T.recoveryMethod!=="privy-v2"?(Me((Ce=>({...Ce,recoverWallet:{entropyId:O,entropyIdVerifier:W,onFailure:I,onSuccess:()=>{L(!0)},onCompleteNavigateTo:Ce.createWallet?"EmbeddedWalletOnAccountCreateScreen":void 0},recoveryOAuthStatus:{provider:T.recoveryMethod,action:"recover",shouldCreateEth:!1,shouldCreateSol:!1,isInAccountCreateFlow:!!Ce.createWallet}}))),Ue(ID(T.recoveryMethod))):I(B)}})),setReadyToTrue:v=>{l(!0),we?.(v)},updateWallets:()=>or(),fundWallet:async(v,L)=>{let I="FundingMethodSelectionScreen";return new Promise(((T,M)=>{Me({funding:{...w6({address:v,appConfig:r,fundWalletConfig:L,methodScreen:I,onComplete:T,onError:M})}}),Ue(I)}))},openModal:Ue,requestFarcasterSignerStatus:async v=>{let L=await wt(),I=c?.linkedAccounts.find((M=>M.type==="wallet"&&M.walletClientType==="privy"));if(!L)throw Error("Must have valid access token to connect with Farcaster");if(!N||!I)throw Error("Must have an embedded wallet to use Farcaster signers");if(!c?.farcaster?.fid)throw Error("Must have Farcaster account to use Farcaster signers");let T=await t.requestFarcasterSignerStatus(v);return T.status==="approved"&&nt(await t.getAuthenticatedUser()||c||null),T},connectCoinbaseSmartWallet:async()=>{r.externalWallets.coinbaseWallet.config.preference={...r.externalWallets.coinbaseWallet.config.preference,options:"smartWalletOnly"};let v=t.connectors?.findWalletConnector("coinbase_wallet","coinbase_smart_wallet")||t.connectors?.findWalletConnector("coinbase_wallet","coinbase_wallet");if(v)return v.updateConnectionPreference("smartWalletOnly"),nn(v);await Vn("coinbase_wallet","coinbase_smart_wallet")},connectBaseAccount:async()=>{let v=t.connectors?.findWalletConnector("base_account","base_account");if(v)return nn(v);await Vn("base_account","base_account")},initiateAccountTransfer:async({nonce:v,account:L,accountType:I,externalWalletMetadata:T,telegramAuthResult:M,telegramWebAppData:O,farcasterEmbeddedAddress:W,oAuthUserInfo:B})=>{let Ce=await t.sendAccountTransferRequest({nonce:v,account:L,accountType:I,externalWalletMetadata:T,telegramAuthResult:M,telegramWebAppData:O,farcasterEmbeddedAddress:W,oAuthUserInfo:B});return nt(Ce),Ce},inProgressAuthFlowRef:ne,inProgressLoginOrLinkMethodRef:Y};ey=oe.recoverEmbeddedWallet,oe.recoverEmbeddedWallet;let hn=t.authFlow instanceof ma,{siteKey:Zt,enabledProvider:He}=r.captcha,_e=!r.headless&&He&&!$e&&(o||hn);return d.jsx(N1.Provider,{value:!0,children:d.jsx(qt.Provider,{value:We,children:d.jsx(Kf.Provider,{value:U,children:d.jsx(cD,{appId:r.id,captchaSiteKey:Zt,enabledCaptchaProvider:He,children:d.jsxs(id.Provider,{value:oe,children:[d.jsx(qI,{children:d.jsxs(DI,{data:ye,setModalData:Me,setInitialScreen:m,initialScreen:y,authenticated:$e,open:i,children:[e.children,d.jsx(ZD,{customAuth:r.customAuth}),_e&&d.jsx(D8,{delayedExecution:!1}),d.jsx(CD,{}),d.jsx(YD,{}),d.jsx(DD,{disabled:r.embeddedWallets.disableAutomaticMigration}),d.jsx(dR,{palette:r.appearance.palette||{}}),!r.render.standalone&&d.jsx(np,{open:i})]})}),d.jsx($D,{appId:e.appId,appClientId:e.clientId,clientAnalyticsId:t.clientAnalyticsId,origin:t.apiUrl,mfaMethods:c?.mfaMethods,mfaPromise:at,mfaSubmitPromise:et,onLoad:xe,onLoadFailed:()=>null}),r.loginConfig.telegramHasHmacCredentials&&r.loginConfig.telegramAuthConfiguration&&d.jsx(t7,{$if:!0,children:d.jsx(vD,{scriptHost:e.apiUrl||Vu,botUsername:r.loginConfig.telegramAuthConfiguration.botName})})]})})})})})},XD=(e,t)=>Y8(e,t),QD=(e,t)=>J8(e,t),eU=(e,t)=>X8(e,t),tU=(e,t)=>Q8(e,t),nU=e=>ey(e),rU=({config:e,...t})=>{WI(),(function(){if(typeof window>"u")return;let a=["localhost","127.0.0.1"].includes(window.location.hostname),s=window.location.protocol==="https:"||window.location.protocol==="chrome-extension:";if(!a&&!s)throw new x("Embedded wallet is only available over HTTPS")})(),(function(a){if(typeof a!="string"||a.length!==25)throw new x("Cannot initialize the Privy provider with an invalid Privy app ID")})(t.appId),gT(t);let n=g.useMemo((()=>new ek({appId:t.appId,clientId:t.clientId,storage:le,baseUrl:t.apiUrl,sdkVersion:"react-auth:3.47.0"})),[]),r=L1(),i=Object.assign({},e);return d.jsx(jk,{client:n,legacyClient:r,appClientId:t.clientId,clientConfig:i,children:d.jsx(eT,{configPlugins:e?.plugins,children:d.jsx(JD,{...t,client:r,privy:n})})})};function Mo(e,t=Date.now()){return e.expiresAt>t}function iU(e){let t=crypto.randomUUID(),n=`PRIVY_CROSS_TAB_REFRESH_LOCK:${e}`;function r(){try{let a=localStorage.getItem(n);if(!a)return null;let s=JSON.parse(a);return typeof s=="object"&&s!==null&&typeof s.ownerTabId=="string"&&typeof s.requestId=="string"&&typeof s.startedAt=="number"&&typeof s.expiresAt=="number"&&(function(o){let l=o.expiresAt-o.startedAt;return Number.isFinite(l)&&l>=0&&l<=1e4})(s)?s:null}catch{return"unavailable"}}async function i(a){return typeof window>"u"?"timed_out":await new Promise((s=>{let o=!1,l=h=>{o||(o=!0,window.removeEventListener("storage",c),window.clearTimeout(p),s(h))},c=h=>{h.key===n&&(()=>{let f=r();f!=="unavailable"?f?f.ownerTabId===a.ownerTabId&&f.requestId===a.requestId||l(Mo(f)?"timed_out":"released"):l("released"):l("unavailable")})()},u=Math.min(1e4,Math.max(0,a.expiresAt-Date.now())),p=window.setTimeout((()=>{let h=r();l(h!=="unavailable"?h&&(h.ownerTabId===a.ownerTabId&&h.requestId===a.requestId||Mo(h))?"timed_out":"released":"unavailable")}),u);window.addEventListener("storage",c)}))}return{async withRefreshLock({onLeader:a,onFollowerReleased:s}){if(typeof window>"u")return await a();for(;;){let o=(function(){let u=r();if(u==="unavailable")return"unavailable";if(u&&Mo(u))return null;let p={ownerTabId:t,requestId:crypto.randomUUID(),startedAt:Date.now(),expiresAt:Date.now()+1e4};try{localStorage.setItem(n,JSON.stringify(p))}catch{return"unavailable"}let h=r();return h==="unavailable"?"unavailable":h?.ownerTabId===p.ownerTabId&&h.requestId===p.requestId?p:null})();if(o==="unavailable")return await a();if(o)try{return await a()}finally{(function(u){let p=r();if(p!=="unavailable"&&p?.ownerTabId===u.ownerTabId&&p.requestId===u.requestId)try{localStorage.removeItem(n)}catch{}})(o)}let l=r();if(l==="unavailable")return await a();if(!l||!Mo(l))continue;let c=await i(l);if(c==="unavailable")return await a();if(c==="released")return await s()}}}}let Kc=null,qc=null,Gc=!1;function aU(e){if(!e.channelId)throw Error("[Privy] Cross-tab sync plugin requires a channelId.");let t=iU(e.channelId);return typeof BroadcastChannel>"u"||Kc||((Kc=new BroadcastChannel(`PRIVY_CROSS_TAB_CHANNEL:${e.channelId}`)).onmessage=n=>{n.data.eventId!==qc&&(qc=n.data.eventId,Gc=!0,nt(n.data.user),zf(!!n.data.user),Gc=!1)},Dn.subscribe(((n,r)=>{if(n.user===r.user||Gc)return;let i=crypto.randomUUID();qc=i,Kc?.postMessage({user:n.user,eventId:i})}))),{id:af,withRefreshLock:t.withRefreshLock}}const sU=()=>{let{privy:e}=g.useContext(id);return e},oU=()=>{let{user:e}=it(),{walletProxy:t}=Q();return{recover:g.useCallback((async n=>{if(!t)throw Error("Wallet proxy is not ready");let r=await wt();if(!e||!r)throw new x("User must be logged in before attempting to modify the recovery method.");let{entropyId:i,entropyIdVerifier:a}=Rn(e);try{await t.recover({entropyId:i,entropyIdVerifier:a,accessToken:r,...n})}catch{throw new x("Unable to recover wallets")}}),[t,e])}};function lU(){let{promptMfa:e,init:t,submit:n,cancel:r,clear:i,mfaMethods:a}=g.useContext(qt);return{promptMfa:e,init:t,submit:n,cancel:r,clear:i,mfaMethods:a}}function dU(){let{initEnrollmentWithSms:e,initEnrollmentWithTotp:t,initEnrollmentWithPasskey:n,submitEnrollmentWithSms:r,submitEnrollmentWithTotp:i,submitEnrollmentWithPasskey:a,unenroll:s,enrollInMfa:o}=g.useContext(qt);return{initEnrollmentWithSms:e,initEnrollmentWithTotp:t,initEnrollmentWithPasskey:n,submitEnrollmentWithSms:r,submitEnrollmentWithTotp:i,submitEnrollmentWithPasskey:a,unenrollWithSms:()=>s("sms"),unenrollWithTotp:()=>s("totp"),unenrollWithPasskey:l=>s("passkey",l),showMfaEnrollmentModal:()=>o(!0),closeMfaEnrollmentModal:()=>o(!1)}}function cU(){let e=L1();return e?e.getCustomerAccessToken():Promise.resolve(le.get(Aa)||null)}const uU=()=>{let{client:e,setAuthenticated:t,setUser:n}=Q();return g.useMemo((()=>({init:async()=>{if(!e)throw new x("Must initialize Privy client first.");let r=new i0;return e.startAuthFlow(r),await r.init()},login:async({fid:r,message:i,signature:a})=>{if(!e)throw new x("Must initialize Privy client first.");if(!(e.authFlow instanceof i0))throw new x("Must initialize Farcaster Mini App flow first.");e.authFlow.setAuthData({message:i,signature:a,fid:r});let{user:s}=await e.authenticate();if(!s)throw new x("Failed to login with Farcaster V2");return n(s),t(!0),{user:s}}})),[e,n,t])};function pU(){let{acceptTerms:e}=Q();return{acceptTerms:async()=>({user:await e()})}}const hU=()=>g.useMemo((()=>({getAccessTokenForProvider:({appId:e})=>{try{let t=le.get(Ea(e));if(typeof t!="string")return{token:null};{let n=new Ii(t);return n.isExpired()?(le.del(Ea(e)),{token:null}):{token:n.value}}}catch(t){return console.error(t),{token:null}}}})),[]),fU=e=>{Vt("login",e);let t=Cn(),n=f1(),{ready:r,user:i}=it(),{initLoginWithHeadlessOAuth:a,loginWithHeadlessOAuth:s,oAuthState:o,setOAuthState:l,isHeadlessOAuthLoading:c}=Q(),u=g.useCallback((async h=>{try{if(t.enabled&&t.status!=="success")throw new ia(t.error,null,R.CAPTCHA_FAILURE);return await a(h.provider,t.token,h.disableSignup)}catch(f){throw l({status:"error",error:f}),f}}),[a,t]),p=g.useCallback((async()=>{let h=js();try{if(!h.inProgress)throw Error("Cannot login with OAuth because no OAuth flow is in progress");let f=h.provider;if(Qa(f)){if(i&&i.linkedAccounts.some((y=>y.type===f)))return console.warn("User is already logged in with this OAuth provider"),i}else if(i&&f in i&&i[f])return console.warn("User is already logged in with this OAuth provider"),i;if(h.popupFlow)return}catch(f){throw l({status:"error",error:f}),f}try{return await s(h)}catch(f){throw l({status:"error",error:f}),f}finally{F8()}}),[s]);return g.useEffect((()=>{let h=js();r&&n&&h.inProgress&&!h.withPrivyUi&&!h.popupFlow&&p().catch((()=>{}))}),[r,n]),{initOAuth:u,loading:c,state:o}};let m0=e=>Qa(e)?e:`${e}_oauth`;const yU=()=>{let{ready:e,authenticated:t,user:n}=it(),{initLoginWithHeadlessOAuth:r,loginWithHeadlessOAuth:i,oAuthState:a,setOAuthState:s,isHeadlessOAuthLoading:o}=Q(),l=g.useCallback((async({provider:u})=>{try{if(!t)throw new x("User must be authenticated before linking an OAuth account.",void 0,R.MUST_BE_AUTHENTICATED);let p=m0(u);if(n?.linkedAccounts.some((h=>h.type===p)))throw new x("User already has an account for this OAuth provider linked.",void 0,R.CANNOT_LINK_MORE_OF_TYPE);return await r(u)}catch(p){throw s({status:"error",error:p}),p}}),[t,r,s,n]),c=g.useCallback((async()=>{let u=js();try{if(!u.inProgress)throw Error("Cannot login with OAuth because no OAuth flow is in progress");let p=u.provider;if(Qa(p)){if(n&&n.linkedAccounts.some((h=>h.type===p)))return console.warn("User is already logged in with this OAuth provider"),n}else{let h=m0(p);if(n&&n.linkedAccounts.some((f=>f.type===h)))return console.warn("User is already logged in with this OAuth provider"),n}if(u.popupFlow)return}catch(p){throw s({status:"error",error:p}),p}try{return await i(u)}catch(p){throw s({status:"error",error:p}),p}finally{F8()}}),[i]);return g.useEffect((()=>{let u=js();e&&t&&u.inProgress&&!u.withPrivyUi&&!u.popupFlow&&c().catch((()=>{}))}),[e]),{initOAuth:l,loading:o,state:a}},mU=e=>{let t=Cn(),{emailOtpState:n,setEmailOtpState:r,initLoginWithEmail:i,loginWithCode:a}=Q();return{sendCode:g.useCallback((async({email:s,disableSignup:o})=>{try{if(!s)throw Error("Email required to send OTP code");let l=await Nn(t);return await i({email:s,captchaToken:l,disableSignup:o,withPrivyUi:!1})}catch(l){throw r({status:"error",error:l}),e?.onError?.(l.privyErrorCode||R.UNKNOWN_AUTH_ERROR),l}}),[i,t]),loginWithCode:g.useCallback((async({code:s})=>{try{let{user:o,isNewUser:l,wasAlreadyAuthenticated:c,linkedAccount:u}=await a(s);e?.onComplete?.({user:o,isNewUser:l,wasAlreadyAuthenticated:c,loginMethod:"email",loginAccount:u})}catch(o){throw r({status:"error",error:o}),e?.onError?.(o.privyErrorCode||R.UNKNOWN_AUTH_ERROR),o}}),[a]),state:n}},gU=()=>{let e=Cn(),{user:t}=xr(),{client:n,loginWithCode:r,emailOtpState:i,setEmailOtpState:a,inProgressAuthFlowRef:s,inProgressLoginOrLinkMethodRef:o}=Q();return{sendCode:g.useCallback((async({email:l})=>{try{if(!t)throw new x("User must be authenticated before linking an account.",void 0,R.MUST_BE_AUTHENTICATED);if(t?.linkedAccounts.some((p=>p.type==="email")))throw new x("User already has an email account linked.",void 0,R.CANNOT_LINK_MORE_OF_TYPE);if(!l)throw Error("Email required to send OTP code");let c=await Nn(e);s.current="link",o.current="email",a({status:"sending-code"});let u=new Oi({email:l,captchaToken:c});n.startAuthFlow(u),await u.sendCodeEmail({email:l,captchaToken:c,withPrivyUi:!1}),a({status:"awaiting-code-input"})}catch(c){throw a({status:"error",error:c}),c}}),[t,e,n,s,o,a]),linkWithCode:g.useCallback((async({code:l})=>{let{user:c}=await r(l);return{user:c}}),[r]),state:i}},wU=e=>{let t=Cn(),{initSignupWithPasskey:n,signupWithPasskey:r,passkeyAuthState:i,setPasskeyAuthState:a}=Q();return{signupWithPasskey:g.useCallback((async()=>{try{let s=await Nn(t);await n({captchaToken:s,withPrivyUi:!1});let{user:o,isNewUser:l,wasAlreadyAuthenticated:c,loginAccount:u}=await r();e?.onComplete?.({user:o,isNewUser:l,wasAlreadyAuthenticated:c,loginMethod:"passkey",loginAccount:u})}catch(s){throw a({status:"error",error:s}),e?.onError?.(s.privyErrorCode||R.UNKNOWN_AUTH_ERROR),s}}),[r,t]),state:i}},vU=e=>{let t=Cn(),{initLoginWithPasskey:n,loginWithPasskey:r,passkeyAuthState:i,setPasskeyAuthState:a}=Q();return{loginWithPasskey:g.useCallback((async s=>{try{let o=await Nn(t);await n({captchaToken:o,withPrivyUi:!1});let{user:l,isNewUser:c,wasAlreadyAuthenticated:u,loginAccount:p}=await r(s);e?.onComplete?.({user:l,isNewUser:c,wasAlreadyAuthenticated:u,loginMethod:"passkey",loginAccount:p})}catch(o){throw a({status:"error",error:o}),e?.onError?.(o.privyErrorCode||R.UNKNOWN_AUTH_ERROR),o}}),[r,t]),state:i}},CU=e=>{let{initLinkWithPasskey:t,linkWithPasskey:n,passkeyAuthState:r,setPasskeyAuthState:i}=Q();return{linkWithPasskey:g.useCallback((async a=>{try{await t();let s=await n(a);if(!s)throw Error("Error, user not found");let o=s.linkedAccounts.filter((l=>l.type==="passkey")).sort(((l,c)=>c.latestVerifiedAt.getTime()-l.latestVerifiedAt.getTime()))[0];e?.onSuccess?.({user:s,linkMethod:"passkey",linkedAccount:o})}catch(s){throw i({status:"error",error:s}),e?.onError?.(s.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"passkey"}),s}}),[n]),state:r}},_U=e=>{let t=Cn(),{smsOtpState:n,setSmsOtpState:r,initLoginWithSms:i,loginWithCode:a}=Q();return{sendCode:g.useCallback((async({phoneNumber:s,disableSignup:o})=>{try{if(!s)throw Error("SMS required to send OTP code");let l=await Nn(t);return await i({phoneNumber:s,captchaToken:l,disableSignup:o,withPrivyUi:!1})}catch(l){throw r({status:"error",error:l}),e?.onError?.(l.privyErrorCode||R.UNKNOWN_AUTH_ERROR),l}}),[i,t]),loginWithCode:g.useCallback((async({code:s})=>{try{let{user:o,isNewUser:l,wasAlreadyAuthenticated:c,linkedAccount:u}=await a(s);e?.onComplete?.({user:o,isNewUser:l,wasAlreadyAuthenticated:c,loginMethod:"sms",loginAccount:u})}catch(o){throw r({status:"error",error:o}),e?.onError?.(o.privyErrorCode||R.UNKNOWN_AUTH_ERROR),o}}),[a]),state:n}},bU=()=>{let e=Cn(),{user:t}=xr(),{client:n,loginWithCode:r,smsOtpState:i,setSmsOtpState:a,inProgressAuthFlowRef:s,inProgressLoginOrLinkMethodRef:o}=Q();return{sendCode:g.useCallback((async({phoneNumber:l})=>{try{if(!t)throw new x("User must be authenticated before linking an account.",void 0,R.MUST_BE_AUTHENTICATED);if(t?.linkedAccounts.some((p=>p.type==="phone")))throw new x("User already has a phone account linked.",void 0,R.CANNOT_LINK_MORE_OF_TYPE);if(!l)throw Error("Phone number required to send OTP code");let c=await Nn(e);s.current="link",o.current="sms",a({status:"sending-code"});let u=new Ni({phoneNumber:l,captchaToken:c});n.startAuthFlow(u),await u.sendSmsCode({phoneNumber:l,captchaToken:c,withPrivyUi:!1}),a({status:"awaiting-code-input"})}catch(c){throw a({status:"error",error:c}),c}}),[t,e,n,s,o,a]),linkWithCode:g.useCallback((async({code:l})=>{let{user:c}=await r(l);return{user:c}}),[r]),state:i}},LU=e=>{let{connectOrCreateWallet:t}=it();return Vt("connectOrCreateWallet",e),{connectOrCreateWallet:t}},AU=e=>{let t=Cn(),{siweState:n,setSiweState:r,linkWithSiwe:i,generateSiweMessage:a}=Q();return{generateSiweMessage:g.useCallback((async({address:s,chainId:o})=>{try{if(!s||!o)throw Error("wallet address and chainId required to generate nonce");return await a({address:s,chainId:o}).then((l=>l))}catch(l){throw r({status:"error",error:l}),e?.onError?.(l.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"siwe"}),l}}),[a]),linkWithSiwe:g.useCallback((async({signature:s,message:o,chainId:l,walletClientType:c,connectorType:u})=>{try{if(t.enabled&&t.status!=="success")throw new ia(t.error,null,R.CAPTCHA_FAILURE);let{user:p,linkedAccount:h}=await i({message:o,signature:s,chainId:l,walletClientType:c,connectorType:u});h&&e?.onSuccess?.({user:p,linkMethod:"siwe",linkedAccount:h})}catch(p){throw r({status:"error",error:p}),e?.onError?.(p.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"siwe"}),p}}),[i,t.status]),state:n}},EU=e=>{let t=Cn(),{siweState:n,setSiweState:r,client:i,generateSiweMessage:a,loginWithSiwe:s}=Q();return{generateSiweNonce:g.useCallback((async o=>{try{let l=await Nn(t);r({status:"generating-message"});let c=await i.generateSiweNonce({address:o?.address,captchaToken:l});return r({status:"awaiting-signature"}),c}catch(l){throw r({status:"error",error:l}),e?.onError?.(l.privyErrorCode||R.UNKNOWN_AUTH_ERROR),l}}),[i,t]),generateSiweMessage:g.useCallback((async({address:o,chainId:l})=>{try{let c=await Nn(t);return await a({address:o,chainId:l,captchaToken:c})}catch(c){throw r({status:"error",error:c}),e?.onError?.(c.privyErrorCode||R.UNKNOWN_AUTH_ERROR),c}}),[a,t]),loginWithSiwe:g.useCallback((async({message:o,signature:l,disableSignup:c,walletClientType:u,connectorType:p})=>{try{let h=await Nn(t),{user:f,isNewUser:y}=await s({message:o,signature:l,captchaToken:h,disableSignup:c,walletClientType:u,connectorType:p});return e?.onComplete?.({user:f,isNewUser:y,wasAlreadyAuthenticated:!1,loginMethod:"siwe",loginAccount:null}),f}catch(h){throw r({status:"error",error:h}),e?.onError?.(h.privyErrorCode||R.UNKNOWN_AUTH_ERROR),h}}),[s,t]),state:n}},xU=()=>{let e=Cn(),{client:t,setAuthenticated:n,setUser:r,setIsNewUser:i}=Q(),{authenticated:a}=xr();return{generateSiwsMessage:g.useCallback((async({address:s})=>{let o=await Nn(e),l=await t.generateSiwsNonce({address:s,captchaToken:o});return E1({address:s,nonce:l})}),[e,t]),generateSiwsOffchainMessage:g.useCallback((({message:s,address:o})=>yf({message:s,address:o})),[]),loginWithSiws:g.useCallback((async({message:s,signature:o,disableSignup:l,walletClientType:c,connectorType:u,messageType:p="plain"})=>{if(a)throw Error("User already authenticated");let{user:h,isNewUser:f}=await t.authenticateWithSiws({message:s,signature:o,walletClientType:c,connectorType:u,mode:l?"no-signup":"login-or-sign-up",messageType:p});if(!h)throw Error("Authentication failed - no user returned");return r(h),i(f||!1),n(!0),h}),[a,t,n,r,i])}},kU=()=>{let e=Cn(),{client:t,setUser:n,refreshSessionAndUser:r}=Q(),{authenticated:i}=xr();return{generateSiwsMessage:g.useCallback((async({address:a})=>{let s=await Nn(e),o=await t.generateSiwsNonce({address:a,captchaToken:s});return E1({address:a,nonce:o})}),[e,t]),generateSiwsOffchainMessage:g.useCallback((({message:a,address:s})=>yf({message:a,address:s})),[]),linkWithSiws:g.useCallback((async({signature:a,message:s,walletClientType:o,connectorType:l,messageType:c="plain"})=>{if(!i)throw Error("User must be authenticated before linking");await Nn(e);let u=await t.linkWithSiws({message:s,signature:a,walletClientType:o,connectorType:l,messageType:c}),p=(h=>{if(!h)return;let f=h.linkedAccounts;return f&&f.length!==0?f[f.length-1]:void 0})(u=await r()??u)||null;return n(u||null),{user:u,linkedAccount:p}}),[i,e,t,r,n])}};function $U(){let{signTransaction:e}=g.useContext(qt);return{signTransaction:e}}function SU(e){let{linkEmail:t,linkPhone:n,linkWallet:r,linkGoogle:i,linkApple:a,linkTwitter:s,linkTwitch:o,linkDiscord:l,linkGithub:c,linkLinkedIn:u,linkTiktok:p,linkLine:h,linkSpotify:f,linkInstagram:y,linkTelegram:m,linkFarcaster:w,linkPasskey:E,linkOAuth:_}=g.useContext(qt);return Vt("linkAccount",e),{linkEmail:t,linkPhone:n,linkWallet:r,linkGoogle:i,linkApple:a,linkTwitter:s,linkTwitch:o,linkDiscord:l,linkGithub:c,linkLinkedIn:u,linkTiktok:p,linkLine:h,linkSpotify:f,linkInstagram:y,linkFarcaster:w,linkTelegram:m,linkPasskey:E,linkOAuth:_}}const TU=e=>{let{user:t}=it(),{loginWithCode:n,emailOtpState:r,setEmailOtpState:i,client:a,inProgressAuthFlowRef:s,inProgressLoginOrLinkMethodRef:o}=Q();return{state:r,sendCode:g.useCallback((async({newEmailAddress:l})=>{try{if(!t?.email)throw Error("User is required to have an email address to update it.");let c=new sf(t.email.address,l);a.startAuthFlow(c),await c.sendCodeEmail({withPrivyUi:!1})}catch(c){i({status:"error",error:c}),e?.onError?.(c.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"email"})}}),[t?.email]),verifyCode:g.useCallback((async({code:l})=>{try{if(!t?.email)throw Error("User is required to have an email address to update it.");s.current="update",o.current="email";let{user:c,linkedAccount:u}=await n(l);return e?.onSuccess?.({user:c,updateMethod:"email",updatedAccount:u}),{user:c}}catch(c){i({status:"error",error:c}),e?.onError?.(c.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"email"})}}),[t?.email])}},IU=()=>{let{user:e}=it(),{loginWithCode:t,smsOtpState:n,setSmsOtpState:r,client:i,inProgressAuthFlowRef:a,inProgressLoginOrLinkMethodRef:s}=Q();return{state:n,sendCode:g.useCallback((async({newPhoneNumber:o})=>{try{if(!e?.phone)throw Error("User is required to have a phone number to update it.");r({status:"sending-code"});let l=new df(e.phone.number,o);i.startAuthFlow(l),await l.sendSmsCode({withPrivyUi:!1}),r({status:"awaiting-code-input"})}catch(l){throw r({status:"error",error:l}),l}}),[i,r,e?.phone]),verifyCode:g.useCallback((async({code:o})=>{try{if(!e?.phone)throw Error("User is required to have a phone number to update it.");a.current="update",s.current="sms";let{user:l}=await t(o);return{user:l}}catch(l){throw r({status:"error",error:l}),l}}),[a,s,t,r,e?.phone])}},MU=()=>{let{fund:e}=ep(),{createDepositAddress:t}=O8(),{openModal:n,closePrivyModal:r}=Q(),{navigate:i}=Ft();return g.useMemo((()=>({addFunds:async a=>{if(!a.destination?.address)throw Error("Invalid input: expected destination.address");if(!a.destination?.chain)throw Error("Invalid input: expected destination.chain");if(!a.destination?.asset)throw Error("Invalid input: expected destination.asset");if(!Dn.getState().user)throw Error("User must be authenticated to add funds");if(Hi.getState())throw Error("Existing funding flow in progress");if(a.fiat?.source?.assets?.length===0)throw Error("Invalid input: expected non-empty fiat.source.assets");let{resolve:s,reject:o,promise:l}=Ba();if(!a.fiat&&!a.crypto){let f=Error("At least one of fiat or crypto config must be provided");return Hi.setState({error:f.message,onCancel:async()=>{Nr(),n(null),await r({shouldCallAuthOnSuccess:!1,isSuccess:!1}),o(f)}}),n("AddFundsSelectionScreen"),await l}let c=async f=>{try{let y=await e({source:a.fiat?.source??{},destination:a.destination,environment:a.fiat?.environment,defaultAmount:a.fiat?.defaultAmount,showBackButton:!(!a.fiat||!a.crypto),paymentMethod:f});Nr(),s({method:"fiat",status:y.status})}catch(y){h(y)}},u=async()=>{try{let f={destinationChain:a.destination.chain,destinationCurrency:a.destination.asset,destinationAddress:a.destination.address,refundAddress:a.crypto?.refundAddress,slippageBps:a.crypto?.slippageBps,showBackButton:!(!a.fiat||!a.crypto),entrySource:"unified_funding"};await t(f),Nr(),s({method:"crypto",status:"completed"})}catch(f){h(f)}},p=()=>{Hi.setState({startFiat:c,startCrypto:u,onCancel:async()=>{Nr(),n(null),await r({shouldCallAuthOnSuccess:!1,isSuccess:!1}),o(Error("User cancelled funding"))}})},h=f=>{if((y=>y instanceof za)(f))return p(),void i("AddFundsSelectionScreen");Nr(),o(f)};return a.fiat&&!a.crypto?c():a.crypto&&!a.fiat?u():(p(),n("AddFundsSelectionScreen")),await l}})),[r,t,e,i,n])},PU=()=>{let{connectCoinbaseSmartWallet:e}=Q();return{connectCoinbaseSmartWallet:e}},RU=()=>{let{connectBaseAccount:e}=Q();return{connectBaseAccount:e}},OU=()=>{let{baseAccountSdk:e}=Q();return{baseAccountSdk:e}},ty=()=>{let{setModalData:e}=Ft(),{openModal:t,privy:n,closePrivyModal:r}=Q(),{user:i}=it();return g.useMemo((()=>({verify:async({standalone:a=!0}={standalone:!0})=>new Promise(((s,o)=>i?i.mfaMethods.length===0?s():(e((l=>({...l,mfaVerify:{onSuccess:async()=>{a?await r({shouldCallAuthOnSuccess:!1,isSuccess:!0}):ci.setState({inProgressMfaFlow:void 0}),s()},onFailure:async c=>{a?await r({shouldCallAuthOnSuccess:!1,isSuccess:!1}):ci.setState({inProgressMfaFlow:void 0}),o(c)},sendSmsCode:async()=>{throw Error("Not enabled")},verifySmsCode:async()=>{throw Error("Not enabled")},verifyTotpCode:async c=>{await n.fetchPrivyRoute(fw,{body:{code:c}})},generateOptions:async()=>rf((await n.fetchPrivyRoute(cw,{body:{}})).options),verifyPasskey:async c=>{let u=await K(()=>import("./index-BDkarAkX.js"),[],import.meta.url),p=await u.startAuthentication({optionsJSON:c});await n.fetchPrivyRoute(uw,{body:{authenticator_response:z8(p)}})}}}))),void(a?t("MfaAuthVerifyFlowScreen"):ci.setState({inProgressMfaFlow:"auth"}))):o(Error("Must be logged in to verify MFA"))))})),[n,e,t,r])},NU=()=>{let e=Ct(),{setModalData:t}=Ft(),{verify:n}=ty(),{openModal:r,privy:i,closePrivyModal:a,refreshSessionAndUser:s,setUser:o}=Q();return g.useMemo((()=>({enroll:async l=>new Promise(((c,u)=>{t({mfaEnroll:{onSuccess:async p=>{await a({shouldCallAuthOnSuccess:!1,isSuccess:!0}),c(p)},onFailure:async p=>{await a({shouldCallAuthOnSuccess:!1,isSuccess:!1}),u(p)},onBack:l?.onBack?async()=>{await a({shouldCallAuthOnSuccess:!1,isSuccess:!1}),u(Error("User canceled MFA enrollment flow.")),l.onBack?.()}:void 0,verify:()=>n({standalone:!1}),shouldUnlinkOnUnenrollMfa:!0,mfaMethods:e.mfa.methods,sendSmsCode:async()=>{throw Error("Not enabled")},enrollSms:async()=>{throw Error("Not enabled")},unenrollSms:async()=>{throw Error("Not enabled")},generateTotpSecret:async()=>await i.fetchPrivyRoute(yw,{body:{}}),enrollTotp:async p=>{await i.fetchPrivyRoute(hw,{body:{code:p}});let h=await s();return o(h),h},unenrollTotp:async()=>{await i.fetchPrivyRoute(mw,{body:{}});let p=await s();return o(p),p},enrollPasskey:async p=>{await i.fetchPrivyRoute(pw,{body:{credential_ids:p,remove_for_login:!0}});let h=await s();return o(h),h}}}),r("MfaAuthEnrollmentFlowScreen")}))})),[i,t,r,a])},FU=()=>{let{user:e}=it(),{client:t,refreshSessionAndUser:n,initializeWalletProxy:r}=Q(),i=Ar(),a=Ct();return{importSeedPhrase:g.useCallback((s=>((o,{mnemonic:l,chainType:c,additionalSigners:u})=>{if(L8(o.appConfig)==="on-device")throw new x("Seed phrase imports require TEE wallet execution mode");return A8(o,{chainType:c,additionalSigners:u},(({proxy:p,accessToken:h})=>p.importSeedPhrase({mnemonic:l,accessToken:h,chainType:c,additionalSigners:u})))})({getAccessToken:()=>t.getAccessToken(),user:e,initializeWalletProxy:r,refreshSessionAndUser:n,emitPrivyEvent:i,appConfig:a},s)),[e,t,n,r,i,a])}},jU=()=>{let{startCrossAppAuthFlow:e,unlinkCrossAppAccount:t,signMessageWithCrossAppWallet:n,signTypedDataWithCrossAppWallet:r,sendTransactionWithCrossAppWallet:i,signTransactionWithCrossAppWallet:a}=f8();return{loginWithCrossAppAccount:({appId:s})=>e({appId:s,action:"login"}),linkCrossAppAccount:({appId:s})=>e({appId:s,action:"link"}),unlinkCrossAppAccount:t,signMessage:n,signTypedData:r,sendTransaction:i,signTransaction:a}};function DU(){let e=Ct(),t=Ar(),n=v1(),{client:r,setUser:i,setAuthenticated:a,setIsNewUser:s,initializeWalletProxy:o}=Q(),{create:l}=_8();return{createGuestAccount:async()=>{if(!e.id||!r)throw Error("SDK not yet ready");r.startAuthFlow(new of(e.id));try{let c=await r.authenticate(),u=c.user,p=c.isNewUser??!1;if(!u)throw new x("Unable to authenticate guest account");let h=await r.getAccessToken(),f=await o(h1);if(h&&f)try{let y=n(rp)?.shouldCreateWallet({user:u}),m=K8(u,e.embeddedWallets.ethereum.createOnLogin,y),w=q8(u,e.embeddedWallets.solana.createOnLogin,y);m&&w?(u=(await l({chainType:"ethereum",latestUser:u})).user,u=(await l({chainType:"solana",latestUser:u})).user):w?u=(await l({chainType:"solana",latestUser:u})).user:m?u=(await l({chainType:"ethereum",latestUser:u})).user:i(u)}catch{i(u),console.warn("Unable to create embedded wallet for guest account")}return s(p),a(!0),t("login","onComplete",{user:u,isNewUser:p,wasAlreadyAuthenticated:!1,loginMethod:"guest",loginAccount:null}),u}catch(c){throw t("login","onError",c.privyErrorCode||R.UNKNOWN_AUTH_ERROR),c}}}}function UU(e){let{setWalletRecovery:t}=g.useContext(qt);return Vt("setWalletRecovery",e),{setWalletRecovery:t}}function WU(e){let{signMessage:t}=g.useContext(qt);return Vt("signMessage",e),{signMessage:t}}const VU=()=>{let{ready:e,wallets:t}=sa(),{user:n}=it(),{rpcConfig:r,chains:i,appId:a}=Q();return{signAuthorization:g.useCallback((async(s,o)=>{let l;if(!n)throw Error("User must be authenticated before signing with a Privy wallet");if(!e)throw Error("Wallets are not ready");let c=o?.address??Y2(n)?.address??$m,u=t.find((y=>mn(y.address)===mn(c)));if(!u)throw Error("Signing wallet not found.");let p=s.chainId??Number(u.chainId.split(":")[1]);if(p===0)l={chainId:0,address:s.contractAddress,nonce:s.nonce??0};else{let y=i.find((w=>w.id===p));if(!y)throw Error("Error, chain not configured in PrivyProvider config");l=await Sm({account:c,chain:y,transport:ls(m1(y,r,a))}).prepareAuthorization({...s})}let h=await u.getEthereumProvider(),f=await h.request({method:"secp256k1_sign",params:[T0(l)]});return{...l,...I0(f)}}),[e,t,n,i])}};function HU(e){let{signTypedData:t}=g.useContext(qt);return Vt("signTypedData",e),{signTypedData:t}}let ZU={base:["0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"],"base-sepolia":["0x036cbd53842c5426634e7929541ec2318f3dcf7e"],avalanche:["0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e"],"avalanche-fuji":["0x5425890298aed601595a70ab815c96711a31bc65"],polygon:["0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"],"polygon-amoy":["0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582"],abstract:["0x84a71ccd554cc1b02749b35d22f684cc8ec987e1"],"abstract-testnet":["0xe4c7fbb0a626ed208021ccaba6be1566905e2dfc"],sei:["0xe15fc38f6d8c56af07bbcbe3baf5708a2bf42392"],solana:["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"],"solana-devnet":["4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"]};const BU=()=>{let{wallets:e}=sa();return g.useMemo((()=>({wrapFetchWithPayment:({walletAddress:t,fetch:n,maxValue:r=BigInt(1e5),allowedAssets:i,paymentRequirementsSelector:a,config:s,signatureOptions:o})=>{let l=t||e[0]?.address;if(!l)throw new go("No wallet available for payment");let c=e.find((u=>Xa(u.address,l)));if(!c)throw new go(`Wallet ${l} not found in connected wallets`);return async(u,p)=>{let h=await n(u,p);if(h.status!==402)return h;if(p?.__is402Retry)throw Error("Payment already attempted for this request");let{createPaymentHeader:f,selectPaymentRequirements:y}=await K(async()=>{const{createPaymentHeader:S,selectPaymentRequirements:b}=await import("./index-DdxtHe81.js");return{createPaymentHeader:S,selectPaymentRequirements:b}},__vite__mapDeps([204,151,196,3,4,205,8,5,6,7,206,17,12,16,2,13,18]),import.meta.url),{x402Version:m,accepts:w}=await h.json(),E=(a??y)(w,void 0,"exact");if(i!==null){let S=E.asset,b=E.network;if(!(function(F,H,ae){let G=(ae??ZU)[H];return!!G&&typeof F=="string"&&G.some((he=>he.toLowerCase()===F.toLowerCase()))})(S,b,i))throw new go(`Payment asset ${S} on ${b} is not in the allowed assets list`)}if(BigInt(E.maxAmountRequired)>r)throw new go("Payment amount exceeds maximum allowed");let _=await uf({wallet:c,signatureOptions:o}),C=await f(_,m,E,s),k={...p,headers:{...p?.headers||{},"X-PAYMENT":C,"Access-Control-Expose-Headers":"X-PAYMENT-RESPONSE"},__is402Retry:!0};return await n(u,k)}}})),[e])},zU=()=>{let{isModalOpen:e}=g.useContext(qt);return{isOpen:e}};function KU(e){let{getAccessToken:t}=g.useContext(qt);return Vt("accessToken",e),{getAccessToken:t}}function qU(e){let{authenticated:t,user:n}=it(),{initLoginWithOAuth:r}=Q(),i=Ar();return Vt("oAuthAuthorization",e),{reauthorize:a=>GU(t,n,r,i,a.provider)}}let GU=async(e,t,n,r,i)=>{if(!e)throw r("linkAccount","onError",R.MUST_BE_AUTHENTICATED,{linkMethod:i}),new x("User must be authenticated before linking an account.");if(!t?.linkedAccounts.some((a=>a.type.includes(i))))throw new x(`OAuth account of type ${i} not linked to the account.`);await n(i)};function YU(e){let{client:t}=Q(),[n,r]=g.useState({status:"initial"});return{linkWithCustomJwt:g.useCallback((async i=>{try{r({status:"initial"}),t.startAuthFlow(new _1(i)),r({status:"loading"});let{user:a}=await t.link();if(!a)throw Error("Error, user not found");let s=a.linkedAccounts.filter((o=>o.type==="custom_auth")).sort(((o,l)=>l.latestVerifiedAt.getTime()-o.latestVerifiedAt.getTime())).at(0);return r({status:"done"}),e?.onSuccess?.({user:a,linkMethod:"custom",linkedAccount:s}),{user:a}}catch(a){throw r({status:"error",error:a}),e?.onError?.(a.privyErrorCode||R.UNKNOWN_AUTH_ERROR,{linkMethod:"custom"}),a}}),[t.startAuthFlow,t.link]),state:n}}const JU=e=>{let t=G8((n=>n.jwtAuthFlowState));return Vt("customAuth",e),{status:t}};function XU({isAuthenticated:e,isLoading:t,...n}){let r=g.useRef(void 0);g.useEffect((()=>{t||r.current?.()}),[e,t]);let i=g.useCallback((a=>(r.current=a,()=>{r.current=void 0})),[]);return ip({...n,subscribe:i})}const ny=()=>{let{user:e,getAccessToken:t}=it(),n=Q(),{walletProxy:r}=n;return{getFarcasterSignerPublicKey:g.useCallback((async()=>{let i,a=await t(),s=e?.linkedAccounts.find((o=>o.type==="wallet"&&o.walletClientType==="privy"));if(!a)throw Error("Must have valid access token to connect with Farcaster");if(!r||!s)throw Error("Must have an embedded wallet to use Farcaster signers");if(mt(s))throw new x("Farcaster signers are only supported for on-device execution and this app uses TEE execution. Learn more at https://docs.privy.io/recipes/tee-wallet-migration-guide");if(!e?.farcaster?.fid)throw Error("Must have Farcaster account to use Farcaster signers");if(!await n.recoverEmbeddedWallet({address:s.address}))throw Error("Unable to connect to wallet");if(!e.farcaster?.signerPublicKey)throw Error("Must have a Farcaster signer public key to sign");return i=e.farcaster.signerPublicKey.slice(2),Uint8Array.from(i.match(/.{1,2}/g).map((o=>parseInt(o,16))))}),[t,e,r,n])}},ry=()=>{let{user:e,getAccessToken:t}=it(),n=Q(),{client:r,setUser:i,walletProxy:a,openModal:s}=n,{setModalData:o}=Ft();return{requestFarcasterSignerFromWarpcast:g.useCallback((async()=>{let l=await t(),c=e?.linkedAccounts.find((p=>p.type==="wallet"&&p.walletClientType==="privy"));if(!l)throw Error("Must have valid access token to connect with Farcaster");if(!a||!c)throw Error("Must have an embedded wallet to use Farcaster signers");if(mt(c))throw new x("Farcaster signers are only supported for on-device execution and this app uses TEE execution. Learn more at https://docs.privy.io/recipes/tee-wallet-migration-guide");if(!e?.farcaster?.fid)throw Error("Must have Farcaster account to use Farcaster signers");if(!await n.recoverEmbeddedWallet({address:c.address}))throw Error("Unable to connect to wallet");let u=await a.initFarcasterSigner({address:c.address,hdWalletIndex:null,accessToken:l,mfaCode:null,mfaMethod:null,relyingParty:window.origin});u.status==="approved"&&i(await r.getAuthenticatedUser()||e||null),o({farcasterSigner:u}),s("FarcasterSignerStatusScreen")}),[t,e,a,n,r,i,o,s])}},iy=()=>{let{user:e,getAccessToken:t}=it(),n=Q(),{walletProxy:r}=n;return{signFarcasterMessage:g.useCallback((async i=>{let a=await t(),s=e?.linkedAccounts.find((c=>c.type==="wallet"&&c.walletClientType==="privy"));if(!a)throw Error("Must have valid access token to connect with Farcaster");if(!r||!s)throw Error("Must have an embedded wallet to use Farcaster signers");if(mt(s))throw new x("Farcaster signers are only supported for on-device execution and this app uses TEE execution. Learn more at https://docs.privy.io/recipes/tee-wallet-migration-guide");if(!e?.farcaster?.fid)throw Error("Must have Farcaster account to use Farcaster signers");if(!await n.recoverEmbeddedWallet({address:s.address}))throw Error("Unable to connect to wallet");if(!e.farcaster?.signerPublicKey)throw Error("Must have a Farcaster signer public key to sign");let o=await K(()=>import("./index-BDkarAkX.js"),[],import.meta.url),l=await r.signFarcasterMessage({address:s.address,hdWalletIndex:null,accessToken:a,mfaCode:null,mfaMethod:null,payload:{hash:o.bufferToBase64URLString(new Uint8Array(i).buffer)},fid:BigInt(e.farcaster.fid),relyingParty:window.origin});return new Uint8Array(o.base64URLStringToBuffer(l.signature))}),[t,e,r,n])}},QU=()=>{let{requestFarcasterSignerFromWarpcast:e}=ry(),{getFarcasterSignerPublicKey:t}=ny(),{signFarcasterMessage:n}=iy();return{getFarcasterSignerPublicKey:t,signFarcasterMessage:n,requestFarcasterSignerFromWarpcast:e}},eW=()=>{let{revokeDelegatedWallets:e,delegateWallet:t}=Q();return{delegateWallet:async({address:n,chainType:r})=>await t({address:n,chainType:r,showDelegationUIs:!0}),revokeWallets:async()=>await e({showDelegationUIs:!0})}},ay=()=>{let{user:e}=it(),t=Q(),{signWithUserSigner:n}=la(),r=async({wallet:i,additional_signers:a})=>{let s=await t.client.getAccessToken();if(!e||!s)throw new x("User must be authenticated and have an embedded wallet to delegate actions.");if(!i.id)throw new x("Wallet to add signers to must have ID on server");if(!t.walletProxy)throw new x("Wallet proxy not initialized.");await Yx(t.privy,{wallet_id:i.id},n,{additional_signers:a})};return{addSessionSignersInternal:async({address:i,signers:a})=>{let s=await t.client.getAccessToken();if(!e||!s)throw new x("User must be authenticated and have an embedded wallet to add a session signer.");let o=t.walletProxy??await t.initializeWalletProxy(15e3);if(!o)throw new x("Wallet proxy not initialized.");let l=Pn(e,i);if(!l)throw new x("Address to add signers too is not associated with current user.");if(mt(l)){if(a.length===0)throw new x("Must specify at least one signer to add.");let u=[...(await Gx(t.privy,{wallet_id:l.id})).additional_signers,...D4(a)];await r({wallet:l,additional_signers:u})}else{if(l.delegated)return{user:e};if(a.length>0)throw new x("Specifying signers in addSessionSigners is only supported for TEE execution and this app uses On-device execution. Pass an empty array for signers instead. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");let u=H8({address:i,user:e}),p=Z8({address:i,user:e});await t.recoverEmbeddedWallet({address:i}),await o.createDelegatedAction({accessToken:s,rootWallet:p,delegatedWallets:[u]})}let c=await t.refreshSessionAndUser();if(!c)throw Error("Could not refresh user");return{user:c}},removeSessionSignersInternal:async({address:i})=>{let a=await t.client.getAccessToken();if(!e||!a)throw new x("User must be authenticated and have an embedded wallet to delegate actions.");if(!(t.walletProxy??await t.initializeWalletProxy(15e3)))throw new x("Wallet proxy not initialized.");let s=Pn(e,i);if(!s)throw new x("Address to remove signers from is not associated with current user.");mt(s)?await r({wallet:s,additional_signers:[]}):await t.client.revokeDelegatedWallet();let o=await t.refreshSessionAndUser();if(!o)throw Error("Could not refresh user");return{user:o}}}},tW=()=>{let{addSessionSignersInternal:e,removeSessionSignersInternal:t}=ay();return{addSessionSigners:async({address:n,signers:r})=>e({address:n,signers:r}),removeSessionSigners:async({address:n})=>t({address:n})}},nW=()=>{let{addSessionSignersInternal:e,removeSessionSignersInternal:t}=ay();return{addSigners:async({address:n,signers:r})=>e({address:n,signers:r}),removeSigners:async({address:n})=>t({address:n})}},rW=()=>{let{signWithUserSigner:e}=la();return g.useMemo((()=>({async generateAuthorizationSignature(t){if(t instanceof Uint8Array){let{signature:a}=await Na(e,t);return{signature:a}}let{targetAppId:n,...r}=t,{signature:i}=await Na((async({message:a})=>e({message:a,targetAppId:n})),r);return{signature:i}}})),[e])},iW=()=>{let{privy:e}=Q(),{signWithUserSigner:t}=la();return g.useMemo((()=>({transfer:(n,r)=>Jx(e,t,{wallet_id:n,...r})})),[e,t])},aW=()=>{let{privy:e}=Q();return g.useMemo((()=>({getAction:(t,n)=>Xx(e,{wallet_id:t,action_id:n}),listActions:(t,n)=>Qx(e,{wallet_id:t,...n})})),[e])},sW=()=>{let{setUser:e,client:t}=g.useContext(id),{user:n}=g.useContext(qt);return{user:n,refreshUser:g.useCallback((async()=>{let r=await t?.updateUserAndIdToken();return e(r??null),r}),[t,e])}};function oW(){let{user:e}=it(),{client:t}=Q(),n=Ct(),r=g.useCallback((async({address:i,recipientPublicKey:a})=>{if(!e)throw new x("User must be authenticated before exporting their wallet");let s=await t.getAccessToken();if(!s)throw new x("Must have valid access token");let o=Pn(e,i);if(!o)throw new x("User does not have a wallet with this address");if(!mt(o))throw new x("Client export is only supported for unified stack wallets. On-device wallets are not supported.");return(function(l,c,u){let p=document.createElement("iframe");return p.style.display="none",p.src=l,document.body.appendChild(p),new Promise(((h,f)=>{let y=null,m=()=>{y!==null&&(clearTimeout(y),y=null),window.removeEventListener("message",w),p.parentNode&&p.parentNode.removeChild(p)},w=E=>{var _;E.origin===u&&typeof(_=E.data)=="object"&&_!==null&&"type"in _&&(_.type==="CLIENT_EXPORT_RESPONSE"||_.type==="CLIENT_EXPORT_ERROR")&&(m(),E.data.type==="CLIENT_EXPORT_ERROR"?f(new x(E.data.error)):h({ciphertext:E.data.ciphertext,encapsulatedKey:E.data.encapsulatedKey,chainType:E.data.chainType}))};window.addEventListener("message",w),p.onload=()=>{p.contentWindow?.postMessage({type:"CLIENT_EXPORT_REQUEST",recipientPublicKey:c},u)},y=setTimeout((()=>{m(),f(new x("Wallet export timed out"))}),3e4)}))})(F7({origin:t.apiUrl,path:`/apps/${n.id}/embedded-wallets/export`,query:{v:"1-unified",wallet_id:o.id,client_id:n.appClientId,mode:"client-export"},hash:{token:s}}),a,t.apiUrl)}),[e,t,n.id,n.appClientId]);return g.useMemo((()=>({getWalletPrivateKey:r})),[r])}const lW=e=>{let t=Cn(),{initLoginWithTelegram:n,loginWithTelegram:r,telegramAuthState:i,setTelegramAuthState:a}=Q();return{login:g.useCallback((async s=>{try{if(t.enabled&&t.status!=="success")throw new ia(t.error,null,R.CAPTCHA_FAILURE);await n(t.token,s?.disableSignup);let{user:o,isNewUser:l,loginAccount:c,wasAlreadyAuthenticated:u}=await r({intent:"login"});e?.onComplete?.({user:o,isNewUser:l,wasAlreadyAuthenticated:u,loginMethod:"telegram",loginAccount:c})}catch(o){throw a({status:"error",error:o}),e?.onError?.(o.privyErrorCode||R.UNKNOWN_AUTH_ERROR),o}}),[n,r,t]),state:i}},dW=()=>{let{revokeDelegatedWallets:e,delegateWallet:t}=Q();return{delegateWallet:async({address:n,chainType:r})=>await t({address:n,chainType:r,showDelegationUIs:!1}),revokeWallets:async()=>await e({showDelegationUIs:!1})}},cW=np,EB=Object.freeze(Object.defineProperty({__proto__:null,Captcha:D8,ConnectorManager:nf,EthereumWalletConnector:Qs,LoginModal:cW,PrivyClient:cf,PrivyModal:np,PrivyProvider:rU,SUPPORTED_CHAINS:Ya,VERSION:A4,WalletConnector:g1,addPrivyRpcToChain:C5,addRpcUrlOverrideToChain:qv,createCrossTabUserSyncPlugin:aU,createWalletCreationOnLoginPlugin:VD,dataSuffix:SA,errorIndicatesMaxMfaRetries:ED,errorIndicatesMfaTimeout:LD,errorIndicatesMfaVerificationFailed:AD,getAccessToken:cU,getEmbeddedConnectedWallet:dD,getIdentityToken:mT,toViemAccount:uf,useAcceptTerms:pU,useActiveWallet:nM,useAddFunds:MU,useAuthMfa:ty,useAuthMfaEnrollment:NU,useAuthorizationSignature:rW,useBaseAccountSdk:OU,useConnectBaseAccount:RU,useConnectCoinbaseSmartWallet:PU,useConnectOrCreateWallet:LU,useConnectWallet:XI,useCreateWallet:b8,useCrossAppAccounts:jU,useCustomAuth:JU,useDelegatedActions:eW,useDepositAddress:O8,useDepositFunds:oD,useExportWallet:Yf,useFarcasterSigner:QU,useFiatOnramp:ep,useFundWallet:r7,useFundWalletWithBankDeposit:T8,useGetAccessTokenForProvider:hU,useGetFarcasterSignerPublicKey:ny,useGetWalletPrivateKey:oW,useGuestAccounts:DU,useHeadlessCryptoDeposit:lD,useHeadlessDelegatedActions:dW,useIdentityToken:cT,useImportSeedPhrase:FU,useImportWallet:E8,useLinkAccount:SU,useLinkEmail:gU,useLinkJwtAccount:YU,useLinkPhone:bU,useLinkWithOAuth:yU,useLinkWithPasskey:CU,useLinkWithSiwe:AU,useLinkWithSiws:kU,useLogin:GI,useLoginWithEmail:mU,useLoginWithFarcasterV2:uU,useLoginWithOAuth:fU,useLoginWithPasskey:vU,useLoginWithSiwe:EU,useLoginWithSiws:xU,useLoginWithSms:_U,useLoginWithTelegram:lW,useLogout:YI,useMfa:lU,useMfaEnrollment:dU,useMigrateWallets:B8,useModalStatus:zU,useOAuthTokens:qU,usePrivy:xr,usePrivyClient_experimental:sU,useRecoverEmbeddedWallet:oU,useRegisterMfaListener:U8,useRequestFarcasterSigner:ry,useSendTransaction:mR,useSessionSigners:tW,useSetWalletRecovery:UU,useSign7702Authorization:VU,useSignFarcasterMessage:iy,useSignMessage:WU,useSignTransaction:$U,useSignTypedData:HU,useSigners:nW,useSignupWithPasskey:wU,useSubscribeToJwtAuthWithFlag:XU,useSyncJwtBasedAuthState:ip,useToken:KU,useTransfer:iW,useUnlinkEmail:y8,useUnlinkFarcaster:m8,useUnlinkOAuth:g8,useUnlinkPasskey:w8,useUnlinkPhone:v8,useUnlinkTelegram:C8,useUnlinkWallet:Qf,useUpdateAccount:JI,useUpdateEmail:TU,useUpdatePhone:IU,useUser:sW,useWalletActions:aW,useWallets:sa,useX402Fetch:BU},Symbol.toStringTag,{value:"Module"}));export{aP as $,gM as A,it as B,Fr as C,_r as D,pZ as E,mZ as F,h7 as G,OM as H,Zr as I,Nr as J,Wn as K,hZ as L,YM as M,_7 as N,dZ as O,Ar as P,U1 as Q,wd as R,f7 as S,MM as T,cP as U,HV as V,Ct as W,er as X,Hi as Y,OD as Z,HM as _,PW as a,T4 as a$,VM as a0,oM as a1,dP as a2,kP as a3,bM as a4,XM as a5,yP as a6,Ol as a7,rM as a8,l7 as a9,ia as aA,Ld as aB,wR as aC,IH as aD,aT as aE,EH as aF,$T as aG,s0 as aH,El as aI,Q4 as aJ,ur as aK,q$ as aL,Do as aM,YI as aN,Qn as aO,VV as aP,CZ as aQ,n2 as aR,vZ as aS,K8 as aT,q8 as aU,Bu as aV,J as aW,At as aX,ni as aY,KI as aZ,tM as a_,wZ as aa,Or as ab,gZ as ac,g7 as ad,m7 as ae,MV as af,FV as ag,WV as ah,Ll as ai,dH as aj,Hr as ak,v4 as al,xa as am,kT as an,J$ as ao,mH as ap,Zv as aq,Lr as ar,aa as as,br as at,Fv as au,V3 as av,qr as aw,Kr as ax,zr as ay,Cn as az,x as b,Kj as b$,XV as b0,qk as b1,iZ as b2,S4 as b3,yH as b4,CH as b5,ZV as b6,XH as b7,vH as b8,w8 as b9,Vw as bA,vo as bB,Fs as bC,tp as bD,N8 as bE,Qj as bF,nD as bG,eD as bH,u4 as bI,La as bJ,la as bK,Hl as bL,ID as bM,Uu as bN,Wu as bO,F7 as bP,v1 as bQ,rp as bR,HD as bS,TD as bT,aH as bU,PV as bV,Ss as bW,oH as bX,Rn as bY,ct as bZ,hr as b_,oZ as ba,jD as bb,hH as bc,nZ as bd,eZ as be,tZ as bf,IV as bg,rZ as bh,QH as bi,Qa as bj,aZ as bk,sZ as bl,t7 as bm,f8 as bn,fH as bo,AV as bp,kV as bq,SV as br,z5 as bs,TV as bt,EV as bu,$V as bv,ra as bw,tD as bx,wB as by,UV as bz,AB as c,jV as c$,uo as c0,qj as c1,Gj as c2,as as c3,yB as c4,fB as c5,mB as c6,_D as c7,j7 as c8,kW as c9,ON as cA,ve as cB,EZ as cC,lB as cD,dB as cE,gN as cF,uB as cG,d8 as cH,HZ as cI,q1 as cJ,Wl as cK,XO as cL,UF as cM,hB as cN,I4 as cO,hV as cP,OV as cQ,NV as cR,RV as cS,fV as cT,Ja as cU,Z$ as cV,zV as cW,BV as cX,qV as cY,KV as cZ,DV as c_,xW as ca,MW as cb,gB as cc,QE as cd,$W as ce,TW as cf,IW as cg,SW as ch,AW as ci,EW as cj,Hj as ck,Ad as cl,a2 as cm,wN as cn,KZ as co,Qt as cp,nB as cq,JO as cr,KF as cs,ZF as ct,TN as cu,c8 as cv,lF as cw,VF as cx,cB as cy,fF as cz,md as d,RZ as d$,KD as d0,bB as d1,AD as d2,LD as d3,LB as d4,ED as d5,Al as d6,r6 as d7,dU as d8,lU as d9,_Z as dA,LZ as dB,CB as dC,zI as dD,Gk as dE,pH as dF,y0 as dG,vi as dH,tB as dI,GZ as dJ,mi as dK,DZ as dL,z1 as dM,YZ as dN,EN as dO,xd as dP,NO as dQ,TZ as dR,MO as dS,SZ as dT,$Z as dU,V7 as dV,NZ as dW,FZ as dX,IZ as dY,MZ as dZ,jZ as d_,xV as da,F8 as db,Pn as dc,_B as dd,C1 as de,K4 as df,q4 as dg,SH as dh,$H as di,qe as dj,TH as dk,SD as dl,GA as dm,G$ as dn,va as dp,Au as dq,h1 as dr,ba as ds,ad as dt,aB as du,is as dv,oB as dw,AZ as dx,bZ as dy,WZ as dz,rt as e,OZ as e0,PZ as e1,SO as e2,co as e3,vN as e4,oo as e5,qZ as e6,QZ as e7,UZ as e8,gi as e9,qa as eA,l8 as eB,xZ as eC,kZ as eD,yF as eE,pF as eF,sB as eG,z3 as eH,Qs as eI,MH as eJ,e2 as eK,eo as eL,Kv as eM,bW as eN,n$ as eO,YV as eP,gH as eQ,ZH as eR,wH as eS,zH as eT,VH as eU,xT as eV,BH as eW,HH as eX,GV as eY,X4 as eZ,EB as e_,JZ as ea,zZ as eb,WO as ec,BZ as ed,VZ as ee,eB as ef,ZZ as eg,m3 as eh,XZ as ei,DW as ej,Bp as ek,RW as el,ZW as em,HW as en,iB as eo,rB as ep,NC as eq,WW as er,FW as es,jW as et,VW as eu,UW as ev,NW as ew,OW as ex,xF as ey,pB as ez,ro as f,ot as g,uZ as h,R as i,d as j,vn as k,Q as l,dM as m,m1 as n,z$ as o,JV as p,wn as q,cZ as r,CM as s,wi as t,Ft as u,sa as v,io as w,ar as x,Er as y,To as z};
|