@dcl/shop 0.1.0-29337358135.commit-2e4bf7e → 0.1.0-29341264529.commit-3758d56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{AnimatedBackground-DimPo0o6.js → AnimatedBackground-fvzwNhlg.js} +3 -3
- package/assets/Assets-C2SMY4Wn.js +1 -0
- package/assets/Button-BMI2yWqO.js +74 -0
- package/assets/{Cart-DfisnztS.js → Cart-BzFXsMma.js} +1 -1
- package/assets/CircularProgress-Cjnyi6sF.js +28 -0
- package/assets/Collection-DeiH22k9.js +1 -0
- package/assets/{ConstantsUtil-CiDezLbv.js → ConstantsUtil-DrbbN8Db.js} +1 -1
- package/assets/{Creator-DXuvF7aY.js → Creator-BRKRY9NQ.js} +1 -1
- package/assets/{ExchangeController-DKuss9DL.js → ExchangeController-BsoPlnUg.js} +1 -1
- package/assets/GetCredits-Df0EJOrT.js +2 -0
- package/assets/{HelpersUtil-BIYA4n9B.js → HelpersUtil-CG8lWgZZ.js} +1 -1
- package/assets/ImportListings-DFJCBiyn.js +1 -0
- package/assets/ItemDetail-DiMc18RR.js +2 -0
- package/assets/{LoadMore-BOCtgPLI.js → LoadMore-7qZApSeo.js} +1 -1
- package/assets/{MenuItem-Ci7Oxa0S.js → MenuItem-BNFaj4bv.js} +2 -2
- package/assets/MyAssets-ChOIdS7f.js +1 -0
- package/assets/{MyFavorites-BzUnpL59.js → MyFavorites-dpxOF1kK.js} +1 -1
- package/assets/{MyPurchases-C-MppIV4.js → MyPurchases-Dg0Dl_Ff.js} +1 -1
- package/assets/{NetworkUtil-DDES604E.js → NetworkUtil-BI8jZwmc.js} +1 -1
- package/assets/{NotFound-stjqjmfW.js → NotFound-BplOnkUp.js} +1 -1
- package/assets/{RealCheckout-BXu8QwUw.js → RealCheckout-BRvLBHx9.js} +1 -1
- package/assets/{ShopFooterInner-Bw0tZ5jz.js → ShopFooterInner-Bk4iHJAH.js} +3 -3
- package/assets/{SkeletonCards-BysJEVmg.js → SkeletonCards-DSpqiDzZ.js} +1 -1
- package/assets/{Success-BmFgC1Fj.js → Success-DznSzYm_.js} +1 -1
- package/assets/{SwapController-Daflx-KH.js → SwapController-DUcM1Ja2.js} +1 -1
- package/assets/{TradeService-mwlprIfz.js → TradeService-CbUgwZEW.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-OCCNZtGo.js → W3MFrameProviderSingleton-BS8u2E5h.js} +3 -3
- package/assets/{WebCryptoP256-DcxhTaIn.js → WebCryptoP256-BNECkcp8.js} +1 -1
- package/assets/{basic-DokGV68e.js → basic-ExMbnGJU.js} +1 -1
- package/assets/{biconomy-BFplpB0T.js → biconomy-DE4NulP5.js} +1 -1
- package/assets/{browser-DHYOtFa8.js → browser-D_5JuNNR.js} +1 -1
- package/assets/{browser-ponyfill-rND5WOqr.js → browser-ponyfill-ClcxEFdz.js} +1 -1
- package/assets/{buy-gasless-B5QPf-sE.js → buy-gasless-BCY1xiea.js} +1 -1
- package/assets/{buy-Cei5j8eO.js → buy-qZ6pCz4O.js} +1 -1
- package/assets/{ccip-38EHg6W8.js → ccip-BItjvNVe.js} +1 -1
- package/assets/{ccip-n6rH3sVb.js → ccip-Dc2Sl0Cx.js} +1 -1
- package/assets/{chains-Bk629xE3.js → chains-BsN0T6nV.js} +1 -1
- package/assets/{collection-dxCKqLM-.js → collection-DJ02EuIR.js} +1 -1
- package/assets/{common-CEkVtB9E.js → common-TfzpxC2l.js} +1 -1
- package/assets/{controller-DG_iRQPR.js → controller-RTLxVvZ6.js} +2 -2
- package/assets/{core-CIi4Ex77.js → core-DqO1PhnS.js} +4 -4
- package/assets/{custom-Cjfua0Ef.js → custom-BYzsjJ7t.js} +1 -1
- package/assets/{data-capture-DXahe72x.js → data-capture-DXHtqKgM.js} +1 -1
- package/assets/decimals-BKxae-RP.js +1 -0
- package/assets/{decimals-teeH97v6.js → decimals-CapXBEic.js} +1 -1
- package/assets/{detectExtension-DX1a8DfW.js → detectExtension-C019UiWG.js} +1 -1
- package/assets/{email-CPaGg29O.js → email-BDtokP8K.js} +1 -1
- package/assets/{embedded-wallet-BhVpPp0v.js → embedded-wallet-CpQg8tqs.js} +1 -1
- package/assets/emotion-styled.browser.esm-BhzSSuXb.js +1 -0
- package/assets/{engine-CwdwAsnd.js → engine-BQqxATpN.js} +1 -1
- package/assets/{estimate-l1-fee-BnSv7s_G.js → estimate-l1-fee-D-hSejEm.js} +1 -1
- package/assets/eth_estimateGas-Cu6PWoKP.js +1 -0
- package/assets/{eth_getStorageAt-DIueLfGz.js → eth_getStorageAt-r25nMq53.js} +1 -1
- package/assets/eth_getTransactionCount-IgHrxRqD.js +1 -0
- package/assets/{ethereum-CdeRZR9J.js → ethereum-A1QWZFDW.js} +1 -1
- package/assets/{ethers-JeCAM1sd.js → ethers-DXxh-eEm.js} +1 -1
- package/assets/{extractIPFS-BrP7LeOr.js → extractIPFS-WJH_KjST.js} +1 -1
- package/assets/{features-KCpkg70J.js → features-Df2C7VrE.js} +1 -1
- package/assets/{fetchTokenMetadata-ZA_LtwkO.js → fetchTokenMetadata-DQlS8SuK.js} +2 -2
- package/assets/{fortmatic-B9IU5L1m.js → fortmatic-Beo5lxXY.js} +1 -1
- package/assets/get-ecosystem-wallet-info-hp9qo9J3.js +1 -0
- package/assets/{getBalance-DGzGIvMz.js → getBalance-D4rmYxNh.js} +2 -2
- package/assets/{getInstalledModules-Bx09uT4y.js → getInstalledModules-C8Hva7AE.js} +1 -1
- package/assets/{getNFT-Zd5KGmRs.js → getNFT-CBawyAHj.js} +1 -1
- package/assets/{getNFT-tiy4hesk.js → getNFT-Dfj2l-Ch.js} +2 -2
- package/assets/{hashTypedData-CvnNX2YB.js → hashTypedData-BHGrMNK6.js} +1 -1
- package/assets/{hashTypedData-CtOt2WpE.js → hashTypedData-CM9F6RUI.js} +1 -1
- package/assets/{import-Ct60HkEi.js → import-Cx-OZqAE.js} +1 -1
- package/assets/{in-app-wallet-calls-nAqAaeZM.js → in-app-wallet-calls-Dch1hsg5.js} +1 -1
- package/assets/{index-CImDhWkL.js → index-42gEBfTi.js} +2 -2
- package/assets/{index-CtPBA1jA.js → index-48uPzbtE.js} +1 -1
- package/assets/{index-Ds5QdmMB.js → index-5E9VLIdh.js} +1 -1
- package/assets/{index-DXaR1qC5.js → index-9oav_WyD.js} +1 -1
- package/assets/index-B-jeDoF7.js +1 -0
- package/assets/{index-BKUufNAr.js → index-B0fp_BTU.js} +1 -1
- package/assets/{index-O4fffv47.js → index-BAWcl7uQ.js} +1 -1
- package/assets/{index-ClaWRN-y.js → index-BBL-hAHr.js} +1 -1
- package/assets/{index-OFpebMSe.js → index-BEVNPg7X.js} +3 -3
- package/assets/{index-BcyJUD4U.js → index-BOJUx2yW.js} +1 -1
- package/assets/{index-NMzNXj-b.js → index-BSCJHKfS.js} +1 -1
- package/assets/{index-Doasr1W7.js → index-BXvfWw1i.js} +1 -1
- package/assets/{index-CUREiiKP.js → index-BZvR1iax.js} +1 -1
- package/assets/{index-B8kuIs26.js → index-Ba8jdmry.js} +1 -1
- package/assets/{index-Bgq0v2Vw.js → index-Balk147I.js} +2 -2
- package/assets/{index-CSh-BHOv.js → index-BclUryz1.js} +1 -1
- package/assets/{index-BLmKUFKr.js → index-Bs_hiiN9.js} +1 -1
- package/assets/{index-CmJ_3H94.js → index-Buef3xrK.js} +1 -1
- package/assets/{index-Ca3Sav7N.js → index-BwpJa7L4.js} +1 -1
- package/assets/{index-C0sZ2G0D.js → index-BzjsXx68.js} +1 -1
- package/assets/{index-9GLN8yqL.js → index-C-qe8hE_.js} +1 -1
- package/assets/index-CIcEGlWj.js +1 -0
- package/assets/{index-ChvdYvQ4.js → index-CJ21qPJU.js} +1 -1
- package/assets/{index-CbNdOGip.js → index-CM1EzVrf.js} +1 -1
- package/assets/{index-CM4C6c3v.js → index-CN6e_bJW.js} +1 -1
- package/assets/{index-BTe18ABT.js → index-CQTErWBm.js} +1 -1
- package/assets/{index-DW9-slpM.js → index-CSZn1axc.js} +3 -3
- package/assets/{index-ChQKLd7_.js → index-CWDqSaNg.js} +1 -1
- package/assets/{index-CCamfLVz.js → index-CaVzt9Zg.js} +1 -1
- package/assets/{index-B_xrDWUL.js → index-Cc4Zz6Zy.js} +1 -1
- package/assets/{index-DGRE-ml6.js → index-Ccl-BImo.js} +1 -1
- package/assets/{index-U6KrdqpT.js → index-Ce01n-03.js} +1 -1
- package/assets/{index-t3MAsdpb.js → index-D6jFYOn4.js} +1 -1
- package/assets/{index-eOTACaIJ.js → index-DAZ3T5le.js} +1 -1
- package/assets/index-DBVEZzhi.js +4 -0
- package/assets/{index-D5Mm7yXQ.js → index-DGN5055N.js} +1 -1
- package/assets/{index-Zhfk6Aoz.js → index-DHzrcOiN.js} +1 -1
- package/assets/index-DIkXA0Hv.js +1 -0
- package/assets/{index-qVJufJAm.js → index-DJIAaV2A.js} +1 -1
- package/assets/{index-BFVyBGs8.js → index-DUfRRmta.js} +1 -1
- package/assets/{index-DvhSyBnM.js → index-Da42Ph0g.js} +2 -2
- package/assets/{index-U2hrSY35.js → index-DekR2YhX.js} +1 -1
- package/assets/{index-CqQ8Hs5j.js → index-Dit_Tadt.js} +1 -1
- package/assets/{index-xd5vYVHb.js → index-Dt4XXlAo.js} +1 -1
- package/assets/{index-T0IQCR4g.js → index-DzTAB8XM.js} +1 -1
- package/assets/{index-Bg4LriAo.js → index-FyW6lWdg.js} +1 -1
- package/assets/{index-CmD3WgD4.js → index-H3dPSebS.js} +1 -1
- package/assets/{index-Bt1JjNoo.js → index-K-cpVYNW.js} +1 -1
- package/assets/{index-Bqxd3bRY.js → index-KXOxVBmY.js} +1 -1
- package/assets/{index-fOgQisFj.css → index-Kb_kdzXZ.css} +1 -1
- package/assets/index-L5rl4tyv.js +103 -0
- package/assets/{index-Bz7iJIvj.js → index-Py7lPUfJ.js} +1 -1
- package/assets/{index-DZHh5kfE.js → index-VxjWNgq4.js} +1 -1
- package/assets/{index-B9fMKYcR.js → index-Z24VwtH-.js} +1 -1
- package/assets/{index-RyQIoZwA.js → index-aayYBIgE.js} +1 -1
- package/assets/index-g06cE3ON.js +1 -0
- package/assets/{index-CYwcDn0L.js → index-mRwFYme8.js} +2 -2
- package/assets/{index-CIpCj8f1.js → index-r-eIHibn.js} +1 -1
- package/assets/index-r9qogMtw.js +1 -0
- package/assets/{index-DssZGhOb.js → index-ue8m9AA_.js} +1 -1
- package/assets/{index.es-sLZupOx6.js → index.es-BpB0a1Th.js} +1 -1
- package/assets/{index.es-CBUy80x9.js → index.es-Dfabzma5.js} +4 -4
- package/assets/{index.es-1m0x5CpA.js → index.es-DhN91Wpt.js} +1 -1
- package/assets/{localBatchGatewayRequest-Bwch9V5u.js → localBatchGatewayRequest-k-UZ-HMO.js} +1 -1
- package/assets/{mana-rate-BrvfDold.js → mana-rate-GO2pCGLs.js} +1 -1
- package/assets/{native-C_y7cRlS.js → native-B9_hMdpy.js} +1 -1
- package/assets/network-QssBB6oI.js +1 -0
- package/assets/{networks-KNRT4yhl.js → networks-Cf-N-9Xq.js} +1 -1
- package/assets/{onramp-vni5tJjM.js → onramp-BGEfyVAt.js} +1 -1
- package/assets/{openzeppelin-Dm8mC4Oq.js → openzeppelin-Dqbxfcec.js} +1 -1
- package/assets/{ownerOf-lof10XBl.js → ownerOf-CljeAL21.js} +1 -1
- package/assets/{parseNft-COV0EcO6.js → parseNft-BC_5oKiz.js} +2 -2
- package/assets/{parseSignature-Dx8_igyj.js → parseSignature-CtI5iMV2.js} +1 -1
- package/assets/{parseSignature-DH_zPldG.js → parseSignature-V_kdzkxI.js} +3 -3
- package/assets/{pay-with-exchange-D7fz03Hw.js → pay-with-exchange-CZQdYVAY.js} +1 -1
- package/assets/{qr-overlay-B_s_8Smu.js → qr-overlay-BuM1P1vl.js} +3 -3
- package/assets/{react-Vu6nbGi5.js → react-CQ5qhqs6.js} +1 -1
- package/assets/{receive-Cm4r3Dka.js → receive-DmQKXpZf.js} +1 -1
- package/assets/{resolveImplementation-DG9O52l9.js → resolveImplementation-Bv53gP5B.js} +1 -1
- package/assets/{rpc-BA6d-g1R.js → rpc-BMKNIejp.js} +1 -1
- package/assets/{secp256k1-DqnVksGc.js → secp256k1--hQ4zJbr.js} +1 -1
- package/assets/{secp256k1-zTnesHEt.js → secp256k1-D-BnaYDw.js} +1 -1
- package/assets/{secp256k1-K3jrkFCF.js → secp256k1-D6E_Hi1m.js} +1 -1
- package/assets/{send-batch-transaction-D8RkjDD6.js → send-batch-transaction-Dz6j3z1q.js} +1 -1
- package/assets/{send-eip712-transaction-D224ueJ-.js → send-eip712-transaction-DjWFMOzt.js} +2 -2
- package/assets/{send-gasless-transaction-B_0JoAQE.js → send-gasless-transaction-CGFByKRT.js} +2 -2
- package/assets/{send-D-iD-Eqx.js → send-qU9iYsqh.js} +1 -1
- package/assets/{sendRawTransaction-CA5sPEMX.js → sendRawTransaction-B7PaRJhQ.js} +3 -3
- package/assets/{serializeTransaction-DoiqxhWF.js → serializeTransaction-BKFBSxXm.js} +1 -1
- package/assets/{session-proposal-gostBQZ3.js → session-proposal-B5Mu6CaX.js} +1 -1
- package/assets/{session-request-CTrIE5mc.js → session-request-C5RIloQJ.js} +2 -2
- package/assets/{sha256-DvVglGNs.js → sha256-CzoB8HGh.js} +1 -1
- package/assets/{signing-BNXs2XCn.js → signing-Ck4I48Ky.js} +5 -5
- package/assets/{socials-B0f9Npjf.js → socials-CjlOiNOa.js} +1 -1
- package/assets/{swaps-CrDXCLmL.js → swaps-DUV5kVh5.js} +1 -1
- package/assets/{thirdweb-BHHkLfZd.js → thirdweb-46ahlzaq.js} +3 -3
- package/assets/{totalSupply-OMptbxGo.js → totalSupply-juJGV40_.js} +1 -1
- package/assets/{trade-encoding-Dbk3clLx.js → trade-encoding-BnwDZb1r.js} +1 -1
- package/assets/{transactionReceipt-wg3yR0Lm.js → transactionReceipt-CjIrYUrd.js} +1 -1
- package/assets/{transactions-7oX42CZi.js → transactions-C4k8y4fS.js} +1 -1
- package/assets/useInfiniteGrid-BA-VoNAn.js +1 -0
- package/assets/{utils-BmX8TqzP.js → utils-CebgHLxz.js} +1 -1
- package/assets/{verifyHash-D-LCgkGR.js → verifyHash-CRPE73-q.js} +1 -1
- package/assets/{w3m-modal-ZsakVEYv.js → w3m-modal-CSsFueoj.js} +1 -1
- package/assets/{w3m-modal-BUd4eWHh.js → w3m-modal-DlKBtHap.js} +1 -1
- package/assets/{wait-for-tx-receipt-gZ6Dq1Eb.js → wait-for-tx-receipt-C6eRPabX.js} +1 -1
- package/assets/{wallet-kind-DtWrr4AZ.js → wallet-kind-BiP1tBJS.js} +1 -1
- package/assets/{wallets-C7iol5XW.js → wallets-DNThg_Tf.js} +6 -6
- package/assets/{web-connector-Dgg6xNHV.js → web-connector-Bsz2goeK.js} +3 -3
- package/assets/{writeContract-Bue8cAhq.js → writeContract-CQyj5ohz.js} +1 -1
- package/assets/{zora-sepolia-kNKNf7Kl.js → zora-sepolia-BXcKZl5q.js} +1 -1
- package/assets/{zoraTestnet-CrA1iIe2.js → zoraTestnet-D4vOnerF.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/Assets-0rXRECQy.js +0 -1
- package/assets/Button-C5iun1df.js +0 -74
- package/assets/CircularProgress-e_Dj0fmx.js +0 -28
- package/assets/Collection-CAJMA4Fe.js +0 -1
- package/assets/FilterBar-CdU8B66A.js +0 -1
- package/assets/GetCredits-DrLnYOdO.js +0 -2
- package/assets/ImportListings-CZkdcWaF.js +0 -1
- package/assets/ItemDetail-BMgOoWU8.js +0 -2
- package/assets/Market-B6NMpu2_.js +0 -1
- package/assets/MyAssets-DGLbKyUN.js +0 -1
- package/assets/SvgIcon-CBDCsycQ.js +0 -1
- package/assets/decimals-CN9Xxdem.js +0 -1
- package/assets/eth_estimateGas-Ds0QjpUA.js +0 -1
- package/assets/eth_getTransactionCount-joBCO4C6.js +0 -1
- package/assets/generateUtilityClasses-uRdMg1ON.js +0 -9
- package/assets/get-ecosystem-wallet-info-DezSaPim.js +0 -1
- package/assets/index-CKwxO0xv.js +0 -95
- package/assets/index-CLIR3TTD.js +0 -1
- package/assets/index-CQB-2hib.js +0 -1
- package/assets/index-CWxLUWXU.js +0 -4
- package/assets/index-CmIVXtjA.js +0 -1
- package/assets/index-GZKxkqGp.js +0 -1
- package/assets/index-l6x72Ai4.js +0 -1
- package/assets/network-DjfG_0s1.js +0 -1
- package/assets/useInfiniteGrid-D88R70KF.js +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B-jeDoF7.js","assets/react-CQ5qhqs6.js","assets/network-QssBB6oI.js","assets/index-CIcEGlWj.js","assets/emotion-styled.browser.esm-BhzSSuXb.js","assets/colors-LINLm1ux.js","assets/ethers-DXxh-eEm.js","assets/index-42gEBfTi.js","assets/TradeService-CbUgwZEW.js","assets/index-BSCJHKfS.js","assets/index-DBVEZzhi.js","assets/index-g06cE3ON.js","assets/Button-BMI2yWqO.js","assets/CircularProgress-Cjnyi6sF.js","assets/index-DIkXA0Hv.js","assets/MenuItem-BNFaj4bv.js","assets/AnimatedBackground-fvzwNhlg.js","assets/AnimatedBackground-CiurwFBv.css","assets/ShopFooterInner-Bk4iHJAH.js","assets/Assets-C2SMY4Wn.js","assets/mana-rate-GO2pCGLs.js","assets/SkeletonCards-DSpqiDzZ.js","assets/LoadMore-7qZApSeo.js","assets/buy-qZ6pCz4O.js","assets/trade-encoding-BnwDZb1r.js","assets/buy-gasless-BCY1xiea.js","assets/useInfiniteGrid-BA-VoNAn.js","assets/ItemDetail-DiMc18RR.js","assets/ItemDetail-Casltmsg.css","assets/Collection-DeiH22k9.js","assets/collection-DJ02EuIR.js","assets/collection-Ds5shVfK.css","assets/Creator-BRKRY9NQ.js","assets/MyAssets-ChOIdS7f.js","assets/import-Cx-OZqAE.js","assets/wallet-kind-BiP1tBJS.js","assets/MyAssets-BqJHbQOZ.css","assets/MyFavorites-dpxOF1kK.js","assets/MyPurchases-Dg0Dl_Ff.js","assets/ImportListings-DFJCBiyn.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-BzFXsMma.js","assets/GetCredits-Df0EJOrT.js","assets/Success-DznSzYm_.js","assets/NotFound-BplOnkUp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var J$=Object.defineProperty;var Bb=e=>{throw TypeError(e)};var Q$=(e,t,r)=>t in e?J$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gi=(e,t,r)=>Q$(e,typeof t!="symbol"?t+"":t,r),Uf=(e,t,r)=>t.has(e)||Bb("Cannot "+r);var le=(e,t,r)=>(Uf(e,t,"read from private field"),r?r.call(e):t.get(e)),ze=(e,t,r)=>t.has(e)?Bb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),De=(e,t,r,n)=>(Uf(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(Uf(e,t,"access private method"),r);var Gc=(e,t,r,n)=>({set _(i){De(e,t,i,r)},get _(){return le(e,t,n)}});import{r as Se,j as H,k as wC,g as Ud,R as RC,c as $_,L as hu,l as q_,e as fi,i as Z$,a as YE,d as eq,m as ki,b as tq,n as rq,o as Ir,N as Ub,p as nq,B as iq}from"./react-CQ5qhqs6.js";import{g as wd,p as hd,W as aq,m as sq,h as Fb,f as oq}from"./ethers-DXxh-eEm.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Lu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ra,Ii,As,hC,uq=(hC=class extends Lu{constructor(){super();ze(this,Ra);ze(this,Ii);ze(this,As);De(this,As,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){le(this,Ii)||this.setEventListener(le(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,Ii))==null||t.call(this),De(this,Ii,void 0))}setEventListener(t){var r;De(this,As,t),(r=le(this,Ii))==null||r.call(this),De(this,Ii,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){le(this,Ra)!==t&&(De(this,Ra,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof le(this,Ra)=="boolean"?le(this,Ra):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ra=new WeakMap,Ii=new WeakMap,As=new WeakMap,hC),KE=new uq,cq={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,WE,yC,lq=(yC=class{constructor(){ze(this,wi,cq);ze(this,WE,!1)}setTimeoutProvider(e){De(this,wi,e)}setTimeout(e,t){return le(this,wi).setTimeout(e,t)}clearTimeout(e){le(this,wi).clearTimeout(e)}setInterval(e,t){return le(this,wi).setInterval(e,t)}clearInterval(e){le(this,wi).clearInterval(e)}},wi=new WeakMap,WE=new WeakMap,yC),wa=new lq;function dq(e){setTimeout(e,0)}var fq=typeof window>"u"||"Deno"in globalThis;function $r(){}function pq(e,t){return typeof e=="function"?e(t):e}function k_(e){return typeof e=="number"&&e>=0&&e!==1/0}function AC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mi(e,t){return typeof e=="function"?e(t):e}function xr(e,t){return typeof e=="function"?e(t):e}function Hb(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==XE(s,t.options))return!1}else if(!gu(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Vb(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(yu(t.options.mutationKey)!==yu(a))return!1}else if(!gu(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function XE(e,t){return((t==null?void 0:t.queryKeyHashFn)||yu)(e)}function yu(e){return JSON.stringify(e,(t,r)=>U_(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function gu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>gu(e[r],t[r])):!1}var mq=Object.prototype.hasOwnProperty;function OC(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=Gb(e)&&Gb(t);if(!n&&!(U_(e)&&U_(t)))return t;const a=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,u=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c],f=e[d],p=t[d];if(f===p){u[d]=f,(n?c<a:mq.call(e,d))&&l++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){u[d]=p;continue}const y=OC(f,p,r+1);u[d]=y,y===f&&l++}return a===o&&l===a?e:u}function B_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Gb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function U_(e){if(!xb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!xb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xb(e){return Object.prototype.toString.call(e)==="[object Object]"}function hq(e){return new Promise(t=>{wa.setTimeout(t,e)})}function F_(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?OC(e,t):t}function Ff(e){return e}function yq(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function gq(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var JE=Symbol();function PC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===JE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function NC(e,t){return typeof e=="function"?e(...t):!!e}function _q(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var _u=(()=>{let e=()=>fq;return{isServer(){return e()},setIsServer(t){e=t}}})();function H_(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var Eq=dq;function vq(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=Eq;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||s()}return u},batchCalls:o=>(...u)=>{a(()=>{o(...u)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var dr=vq(),Os,Ri,Ps,gC,bq=(gC=class extends Lu{constructor(){super();ze(this,Os,!0);ze(this,Ri);ze(this,Ps);De(this,Ps,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){le(this,Ri)||this.setEventListener(le(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,Ri))==null||t.call(this),De(this,Ri,void 0))}setEventListener(t){var r;De(this,Ps,t),(r=le(this,Ri))==null||r.call(this),De(this,Ri,t(this.setOnline.bind(this)))}setOnline(t){le(this,Os)!==t&&(De(this,Os,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return le(this,Os)}},Os=new WeakMap,Ri=new WeakMap,Ps=new WeakMap,gC),Rd=new bq;function Sq(e){return Math.min(1e3*2**e,3e4)}function CC(e){return(e??"online")==="online"?Rd.isOnline():!0}var V_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function MC(e){let t=!1,r=0,n;const i=H_(),a=()=>i.status!=="pending",s=g=>{var T;if(!a()){const P=new V_(g);f(P),(T=e.onCancel)==null||T.call(e,P)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>KE.isFocused()&&(e.networkMode==="always"||Rd.isOnline())&&e.canRun(),c=()=>CC(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),i.resolve(g))},f=g=>{a()||(n==null||n(),i.reject(g))},p=()=>new Promise(g=>{var T;n=P=>{(a()||l())&&g(P)},(T=e.onPause)==null||T.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const T=r===0?e.initialPromise:void 0;try{g=T??e.fn()}catch(P){g=Promise.reject(P)}Promise.resolve(g).then(d).catch(P=>{var E;if(a())return;const m=e.retry??(_u.isServer()?0:3),w=e.retryDelay??Sq,I=typeof w=="function"?w(r,P):w,h=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,P);if(t||!h){f(P);return}r++,(E=e.onFail)==null||E.call(e,r,P),hq(I).then(()=>l()?void 0:p()).then(()=>{t?f(P):y()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?y():p().then(y),i)}}var Aa,_C,jC=(_C=class{constructor(){ze(this,Aa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),k_(this.gcTime)&&De(this,Aa,wa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_u.isServer()?1/0:300*1e3))}clearGcTimeout(){le(this,Aa)!==void 0&&(wa.clearTimeout(le(this,Aa)),De(this,Aa,void 0))}},Aa=new WeakMap,_C);function Tq(e){return{onFetch:(t,r)=>{var c,d,f,p,y;const n=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((y=t.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let g=!1;const T=w=>{_q(w,()=>t.signal,()=>g=!0)},P=PC(t.options,t.fetchOptions),m=async(w,I,h)=>{if(g)return Promise.reject(t.signal.reason);if(I==null&&w.pages.length)return Promise.resolve(w);const v=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:I,direction:h?"backward":"forward",meta:t.options.meta};return T(B),B})(),O=await P(v),{maxPages:C}=t.options,$=h?gq:yq;return{pages:$(w.pages,O,C),pageParams:$(w.pageParams,I,C)}};if(i&&a.length){const w=i==="backward",I=w?DC:G_,h={pages:a,pageParams:s},E=I(n,h);o=await m(h,E,w)}else{const w=e??a.length;do{const I=u===0?s[0]??n.initialPageParam:G_(n,o);if(u>0&&I==null)break;o=await m(o,I),u++}while(u<w)}return o};t.options.persister?t.fetchFn=()=>{var g,T;return(T=(g=t.options).persister)==null?void 0:T.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function G_(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function DC(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function _X(e,t){return t?G_(e,t)!=null:!1}function EX(e,t){return!t||!e.getPreviousPageParam?!1:DC(e,t)!=null}var Ns,Oa,Cs,Xr,Pa,ir,Nu,Na,Gr,LC,ii,EC,Iq=(EC=class extends jC{constructor(t){super();ze(this,Gr);ze(this,Ns);ze(this,Oa);ze(this,Cs);ze(this,Xr);ze(this,Pa);ze(this,ir);ze(this,Nu);ze(this,Na);De(this,Na,!1),De(this,Nu,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,Pa,t.client),De(this,Xr,le(this,Pa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,Oa,Wb(this.options)),this.state=t.state??le(this,Oa),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return le(this,Ns)}get promise(){var t;return(t=le(this,ir))==null?void 0:t.promise}setOptions(t){if(this.options={...le(this,Nu),...t},t!=null&&t._type&&De(this,Ns,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Wb(this.options);r.data!==void 0&&(this.setState(zb(r.data,r.dataUpdatedAt)),De(this,Oa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,Xr).remove(this)}setData(t,r){const n=F_(this.state.data,t,this.options);return rt(this,Gr,ii).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){rt(this,Gr,ii).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=le(this,ir))==null?void 0:n.promise;return(i=le(this,ir))==null||i.cancel(t),r?r.then($r).catch($r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return le(this,Oa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>xr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===JE||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!AC(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=le(this,ir))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=le(this,ir))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),le(this,Xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(le(this,ir)&&(le(this,Na)||rt(this,Gr,LC).call(this)?le(this,ir).cancel({revert:!0}):le(this,ir).cancelRetry()),this.scheduleGc()),le(this,Xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Gr,ii).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,f,p,y,g,T,P,m,w;if(this.state.fetchStatus!=="idle"&&((l=le(this,ir))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(le(this,ir))return le(this,ir).continueRetry(),le(this,ir).promise}if(t&&this.setOptions(t),!this.options.queryFn){const I=this.observers.find(h=>h.options.queryFn);I&&this.setOptions(I.options)}const n=new AbortController,i=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(De(this,Na,!0),n.signal)})},a=()=>{const I=PC(this.options,r),E=(()=>{const v={client:le(this,Pa),queryKey:this.queryKey,meta:this.meta};return i(v),v})();return De(this,Na,!1),this.options.persister?this.options.persister(I,E,this):I(E)},o=(()=>{const I={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:le(this,Pa),state:this.state,fetchFn:a};return i(I),I})(),u=le(this,Ns)==="infinite"?Tq(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),De(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&rt(this,Gr,ii).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),De(this,ir,MC({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:I=>{I instanceof V_&&I.revert&&this.setState({...le(this,Cs),fetchStatus:"idle"}),n.abort()},onFail:(I,h)=>{rt(this,Gr,ii).call(this,{type:"failed",failureCount:I,error:h})},onPause:()=>{rt(this,Gr,ii).call(this,{type:"pause"})},onContinue:()=>{rt(this,Gr,ii).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const I=await le(this,ir).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(p=(f=le(this,Xr).config).onSuccess)==null||p.call(f,I,this),(g=(y=le(this,Xr).config).onSettled)==null||g.call(y,I,this.state.error,this),I}catch(I){if(I instanceof V_){if(I.silent)return le(this,ir).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw rt(this,Gr,ii).call(this,{type:"error",error:I}),(P=(T=le(this,Xr).config).onError)==null||P.call(T,I,this),(w=(m=le(this,Xr).config).onSettled)==null||w.call(m,this.state.data,I,this),I}finally{this.scheduleGc()}}},Ns=new WeakMap,Oa=new WeakMap,Cs=new WeakMap,Xr=new WeakMap,Pa=new WeakMap,ir=new WeakMap,Nu=new WeakMap,Na=new WeakMap,Gr=new WeakSet,LC=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ii=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...$C(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...zb(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,Cs,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),dr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),le(this,Xr).notify({query:this,type:"updated",action:t})})},EC);function $C(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:CC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Wb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Lr,st,Cu,Rr,Ca,Ms,oi,Ai,Mu,js,Ds,Ma,ja,Oi,Ls,vt,Bo,x_,z_,W_,Y_,K_,X_,J_,qC,vC,wq=(vC=class extends Lu{constructor(t,r){super();ze(this,vt);ze(this,Lr);ze(this,st);ze(this,Cu);ze(this,Rr);ze(this,Ca);ze(this,Ms);ze(this,oi);ze(this,Ai);ze(this,Mu);ze(this,js);ze(this,Ds);ze(this,Ma);ze(this,ja);ze(this,Oi);ze(this,Ls,new Set);this.options=r,De(this,Lr,t),De(this,Ai,null),De(this,oi,H_()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,st).addObserver(this),Yb(le(this,st),this.options)?rt(this,vt,Bo).call(this):this.updateResult(),rt(this,vt,Y_).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q_(le(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q_(le(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,vt,K_).call(this),rt(this,vt,X_).call(this),le(this,st).removeObserver(this)}setOptions(t){const r=this.options,n=le(this,st);if(this.options=le(this,Lr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xr(this.options.enabled,le(this,st))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,vt,J_).call(this),le(this,st).setOptions(this.options),r._defaulted&&!B_(this.options,r)&&le(this,Lr).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,st),observer:this});const i=this.hasListeners();i&&Kb(le(this,st),n,this.options,r)&&rt(this,vt,Bo).call(this),this.updateResult(),i&&(le(this,st)!==n||xr(this.options.enabled,le(this,st))!==xr(r.enabled,le(this,st))||Mi(this.options.staleTime,le(this,st))!==Mi(r.staleTime,le(this,st)))&&rt(this,vt,x_).call(this);const a=rt(this,vt,z_).call(this);i&&(le(this,st)!==n||xr(this.options.enabled,le(this,st))!==xr(r.enabled,le(this,st))||a!==le(this,Oi))&&rt(this,vt,W_).call(this,a)}getOptimisticResult(t){const r=le(this,Lr).getQueryCache().build(le(this,Lr),t),n=this.createResult(r,t);return Aq(this,n)&&(De(this,Rr,n),De(this,Ms,this.options),De(this,Ca,le(this,st).state)),n}getCurrentResult(){return le(this,Rr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&le(this,oi).status==="pending"&&le(this,oi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){le(this,Ls).add(t)}getCurrentQuery(){return le(this,st)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=le(this,Lr).defaultQueryOptions(t),n=le(this,Lr).getQueryCache().build(le(this,Lr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return rt(this,vt,Bo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,Rr)))}createResult(t,r){var C;const n=le(this,st),i=this.options,a=le(this,Rr),s=le(this,Ca),o=le(this,Ms),l=t!==n?t.state:le(this,Cu),{state:c}=t;let d={...c},f=!1,p;if(r._optimisticResults){const $=this.hasListeners(),B=!$&&Yb(t,r),V=$&&Kb(t,n,r,i);(B||V)&&(d={...d,...$C(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:T}=d;p=d.data;let P=!1;if(r.placeholderData!==void 0&&p===void 0&&T==="pending"){let $;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?($=a.data,P=!0):$=typeof r.placeholderData=="function"?r.placeholderData((C=le(this,Ds))==null?void 0:C.state.data,le(this,Ds)):r.placeholderData,$!==void 0&&(T="success",p=F_(a==null?void 0:a.data,$,r),f=!0)}if(r.select&&p!==void 0&&!P)if(a&&p===(s==null?void 0:s.data)&&r.select===le(this,Mu))p=le(this,js);else try{De(this,Mu,r.select),p=r.select(p),p=F_(a==null?void 0:a.data,p,r),De(this,js,p),De(this,Ai,null)}catch($){De(this,Ai,$)}le(this,Ai)&&(y=le(this,Ai),p=le(this,js),g=Date.now(),T="error");const m=d.fetchStatus==="fetching",w=T==="pending",I=T==="error",h=w&&m,E=p!==void 0,O={status:T,fetchStatus:d.fetchStatus,isPending:w,isSuccess:T==="success",isError:I,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!w,isLoadingError:I&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:I&&E,isStale:QE(t,r),refetch:this.refetch,promise:le(this,oi),isEnabled:xr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=O.data!==void 0,B=O.status==="error"&&!$,V=te=>{B?te.reject(O.error):$&&te.resolve(O.data)},U=()=>{const te=De(this,oi,O.promise=H_());V(te)},k=le(this,oi);switch(k.status){case"pending":t.queryHash===n.queryHash&&V(k);break;case"fulfilled":(B||O.data!==k.value)&&U();break;case"rejected":(!B||O.error!==k.reason)&&U();break}}return O}updateResult(){const t=le(this,Rr),r=this.createResult(le(this,st),this.options);if(De(this,Ca,le(this,st).state),De(this,Ms,this.options),le(this,Ca).data!==void 0&&De(this,Ds,le(this,st)),B_(r,t))return;De(this,Rr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!le(this,Ls).size)return!0;const s=new Set(a??le(this,Ls));return this.options.throwOnError&&s.add("error"),Object.keys(le(this,Rr)).some(o=>{const u=o;return le(this,Rr)[u]!==t[u]&&s.has(u)})};rt(this,vt,qC).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,vt,Y_).call(this)}},Lr=new WeakMap,st=new WeakMap,Cu=new WeakMap,Rr=new WeakMap,Ca=new WeakMap,Ms=new WeakMap,oi=new WeakMap,Ai=new WeakMap,Mu=new WeakMap,js=new WeakMap,Ds=new WeakMap,Ma=new WeakMap,ja=new WeakMap,Oi=new WeakMap,Ls=new WeakMap,vt=new WeakSet,Bo=function(t){rt(this,vt,J_).call(this);let r=le(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch($r)),r},x_=function(){rt(this,vt,K_).call(this);const t=Mi(this.options.staleTime,le(this,st));if(_u.isServer()||le(this,Rr).isStale||!k_(t))return;const n=AC(le(this,Rr).dataUpdatedAt,t)+1;De(this,Ma,wa.setTimeout(()=>{le(this,Rr).isStale||this.updateResult()},n))},z_=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,st)):this.options.refetchInterval)??!1},W_=function(t){rt(this,vt,X_).call(this),De(this,Oi,t),!(_u.isServer()||xr(this.options.enabled,le(this,st))===!1||!k_(le(this,Oi))||le(this,Oi)===0)&&De(this,ja,wa.setInterval(()=>{(this.options.refetchIntervalInBackground||KE.isFocused())&&rt(this,vt,Bo).call(this)},le(this,Oi)))},Y_=function(){rt(this,vt,x_).call(this),rt(this,vt,W_).call(this,rt(this,vt,z_).call(this))},K_=function(){le(this,Ma)!==void 0&&(wa.clearTimeout(le(this,Ma)),De(this,Ma,void 0))},X_=function(){le(this,ja)!==void 0&&(wa.clearInterval(le(this,ja)),De(this,ja,void 0))},J_=function(){const t=le(this,Lr).getQueryCache().build(le(this,Lr),this.options);if(t===le(this,st))return;const r=le(this,st);De(this,st,t),De(this,Cu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},qC=function(t){dr.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(le(this,Rr))}),le(this,Lr).getQueryCache().notify({query:le(this,st),type:"observerResultsUpdated"})})},vC);function Rq(e,t){return xr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&xr(t.retryOnMount,e)===!1)}function Yb(e,t){return Rq(e,t)||e.state.data!==void 0&&Q_(e,t,t.refetchOnMount)}function Q_(e,t,r){if(xr(t.enabled,e)!==!1&&Mi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&QE(e,t)}return!1}function Kb(e,t,r,n){return(e!==t||xr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&QE(e,r)}function QE(e,t){return xr(t.enabled,e)!==!1&&e.isStaleByTime(Mi(t.staleTime,e))}function Aq(e,t){return!B_(e.getCurrentResult(),t)}var ju,jn,br,Da,Dn,vi,bC,Oq=(bC=class extends jC{constructor(t){super();ze(this,Dn);ze(this,ju);ze(this,jn);ze(this,br);ze(this,Da);De(this,ju,t.client),this.mutationId=t.mutationId,De(this,br,t.mutationCache),De(this,jn,[]),this.state=t.state||Pq(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){le(this,jn).includes(t)||(le(this,jn).push(t),this.clearGcTimeout(),le(this,br).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,jn,le(this,jn).filter(r=>r!==t)),this.scheduleGc(),le(this,br).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){le(this,jn).length||(this.state.status==="pending"?this.scheduleGc():le(this,br).remove(this))}continue(){var t;return((t=le(this,Da))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,f,p,y,g,T,P,m,w,I,h,E,v;const r=()=>{rt(this,Dn,vi).call(this,{type:"continue"})},n={client:le(this,ju),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,Da,MC({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(O,C)=>{rt(this,Dn,vi).call(this,{type:"failed",failureCount:O,error:C})},onPause:()=>{rt(this,Dn,vi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,br).canRun(this)}));const i=this.state.status==="pending",a=!le(this,Da).canStart();try{if(i)r();else{rt(this,Dn,vi).call(this,{type:"pending",variables:t,isPaused:a}),le(this,br).config.onMutate&&await le(this,br).config.onMutate(t,this,n);const C=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));C!==this.state.context&&rt(this,Dn,vi).call(this,{type:"pending",context:C,variables:t,isPaused:a})}const O=await le(this,Da).start();return await((l=(u=le(this,br).config).onSuccess)==null?void 0:l.call(u,O,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,O,t,this.state.context,n)),await((p=(f=le(this,br).config).onSettled)==null?void 0:p.call(f,O,null,this.state.variables,this.state.context,this,n)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,O,null,t,this.state.context,n)),rt(this,Dn,vi).call(this,{type:"success",data:O}),O}catch(O){try{await((P=(T=le(this,br).config).onError)==null?void 0:P.call(T,O,t,this.state.context,this,n))}catch(C){Promise.reject(C)}try{await((w=(m=this.options).onError)==null?void 0:w.call(m,O,t,this.state.context,n))}catch(C){Promise.reject(C)}try{await((h=(I=le(this,br).config).onSettled)==null?void 0:h.call(I,void 0,O,this.state.variables,this.state.context,this,n))}catch(C){Promise.reject(C)}try{await((v=(E=this.options).onSettled)==null?void 0:v.call(E,void 0,O,t,this.state.context,n))}catch(C){Promise.reject(C)}throw rt(this,Dn,vi).call(this,{type:"error",error:O}),O}finally{le(this,br).runNext(this)}}},ju=new WeakMap,jn=new WeakMap,br=new WeakMap,Da=new WeakMap,Dn=new WeakSet,vi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),dr.batch(()=>{le(this,jn).forEach(n=>{n.onMutationUpdate(t)}),le(this,br).notify({mutation:this,type:"updated",action:t})})},bC);function Pq(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ui,pn,Du,SC,Nq=(SC=class extends Lu{constructor(t={}){super();ze(this,ui);ze(this,pn);ze(this,Du);this.config=t,De(this,ui,new Set),De(this,pn,new Map),De(this,Du,0)}build(t,r,n){const i=new Oq({client:t,mutationCache:this,mutationId:++Gc(this,Du)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){le(this,ui).add(t);const r=xc(t);if(typeof r=="string"){const n=le(this,pn).get(r);n?n.push(t):le(this,pn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(le(this,ui).delete(t)){const r=xc(t);if(typeof r=="string"){const n=le(this,pn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&le(this,pn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=xc(t);if(typeof r=="string"){const n=le(this,pn).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=xc(t);if(typeof r=="string"){const i=(n=le(this,pn).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dr.batch(()=>{le(this,ui).forEach(t=>{this.notify({type:"removed",mutation:t})}),le(this,ui).clear(),le(this,pn).clear()})}getAll(){return Array.from(le(this,ui))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Vb(r,n))}findAll(t={}){return this.getAll().filter(r=>Vb(t,r))}notify(t){dr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return dr.batch(()=>Promise.all(t.map(r=>r.continue().catch($r))))}},ui=new WeakMap,pn=new WeakMap,Du=new WeakMap,SC);function xc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ln,TC,Cq=(TC=class extends Lu{constructor(t={}){super();ze(this,Ln);this.config=t,De(this,Ln,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??XE(i,r);let s=this.get(a);return s||(s=new Iq({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){le(this,Ln).has(t.queryHash)||(le(this,Ln).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=le(this,Ln).get(t.queryHash);r&&(t.destroy(),r===t&&le(this,Ln).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return le(this,Ln).get(t)}getAll(){return[...le(this,Ln).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Hb(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Hb(t,n)):r}notify(t){dr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){dr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ln=new WeakMap,TC),Wt,Pi,Ni,$s,qs,Ci,ks,Bs,IC,Mq=(IC=class{constructor(e={}){ze(this,Wt);ze(this,Pi);ze(this,Ni);ze(this,$s);ze(this,qs);ze(this,Ci);ze(this,ks);ze(this,Bs);De(this,Wt,e.queryCache||new Cq),De(this,Pi,e.mutationCache||new Nq),De(this,Ni,e.defaultOptions||{}),De(this,$s,new Map),De(this,qs,new Map),De(this,Ci,0)}mount(){Gc(this,Ci)._++,le(this,Ci)===1&&(De(this,ks,KE.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Wt).onFocus())})),De(this,Bs,Rd.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Wt).onOnline())})))}unmount(){var e,t;Gc(this,Ci)._--,le(this,Ci)===0&&((e=le(this,ks))==null||e.call(this),De(this,ks,void 0),(t=le(this,Bs))==null||t.call(this),De(this,Bs,void 0))}isFetching(e){return le(this,Wt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Pi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=le(this,Wt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=le(this,Wt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Mi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return le(this,Wt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=le(this,Wt).get(n.queryHash),a=i==null?void 0:i.state.data,s=pq(t,a);if(s!==void 0)return le(this,Wt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return dr.batch(()=>le(this,Wt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=le(this,Wt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=le(this,Wt);dr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=le(this,Wt);return dr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=dr.batch(()=>le(this,Wt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then($r).catch($r)}invalidateQueries(e,t={}){return dr.batch(()=>(le(this,Wt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=dr.batch(()=>le(this,Wt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch($r)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then($r)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=le(this,Wt).build(this,t);return r.isStaleByTime(Mi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($r).catch($r)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($r).catch($r)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Rd.isOnline()?le(this,Pi).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Wt)}getMutationCache(){return le(this,Pi)}getDefaultOptions(){return le(this,Ni)}setDefaultOptions(e){De(this,Ni,e)}setQueryDefaults(e,t){le(this,$s).set(yu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...le(this,$s).values()],r={};return t.forEach(n=>{gu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){le(this,qs).set(yu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...le(this,qs).values()],r={};return t.forEach(n=>{gu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...le(this,Ni).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=XE(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===JE&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,Ni).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Wt).clear(),le(this,Pi).clear()}},Wt=new WeakMap,Pi=new WeakMap,Ni=new WeakMap,$s=new WeakMap,qs=new WeakMap,Ci=new WeakMap,ks=new WeakMap,Bs=new WeakMap,IC),kC=Se.createContext(void 0),jq=e=>{const t=Se.useContext(kC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Dq=({client:e,children:t})=>(Se.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),H.jsx(kC.Provider,{value:e,children:t})),BC=Se.createContext(!1),Lq=()=>Se.useContext(BC);BC.Provider;function $q(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qq=Se.createContext($q()),kq=()=>Se.useContext(qq),Bq=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?NC(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Uq=e=>{Se.useEffect(()=>{e.clearReset()},[e])},Fq=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||NC(r,[e.error,n])),Hq=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Vq=(e,t)=>e.isLoading&&e.isFetching&&!t,Gq=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Xb=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function xq(e,t,r){var p,y,g,T;const n=Lq(),i=kq(),a=jq(),s=a.defaultQueryOptions(e);(y=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||y.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,Hq(s),Bq(s,i,o),Uq(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Se.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),f=!n&&u;if(Se.useSyncExternalStore(Se.useCallback(P=>{const m=f?c.subscribe(dr.batchCalls(P)):$r;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Se.useEffect(()=>{c.setOptions(s)},[s,c]),Gq(s,d))throw Xb(s,c,i);if(Fq({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((T=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||T.call(g,s,d),s.experimental_prefetchInRender&&!_u.isServer()&&Vq(d,n)){const P=l?Xb(s,c,i):o==null?void 0:o.promise;P==null||P.catch($r).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function ji(e,t){return xq(e,wq)}const zq="modulepreload",Wq=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/"+e},Jb={},ar=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(r.map(l=>{if(l=Wq(l),l in Jb)return;Jb[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":zq,c||(f.as="script"),f.crossOrigin="",f.href=l,u&&f.setAttribute("nonce",u),document.head.appendChild(f),c)return new Promise((p,y)=>{f.addEventListener("load",p),f.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},UC=Object.prototype.toString;function ZE(e){switch(UC.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ci(e,Error)}}function Js(e,t){return UC.call(e)===`[object ${t}]`}function ev(e){return Js(e,"ErrorEvent")}function Qb(e){return Js(e,"DOMError")}function Yq(e){return Js(e,"DOMException")}function Fn(e){return Js(e,"String")}function tv(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function rv(e){return e===null||tv(e)||typeof e!="object"&&typeof e!="function"}function qa(e){return Js(e,"Object")}function Fd(e){return typeof Event<"u"&&ci(e,Event)}function Kq(e){return typeof Element<"u"&&ci(e,Element)}function Xq(e){return Js(e,"RegExp")}function Qs(e){return!!(e&&e.then&&typeof e.then=="function")}function Jq(e){return qa(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function FC(e){return typeof e=="number"&&e!==e}function ci(e,t){try{return e instanceof t}catch{return!1}}function HC(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Es(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Zb(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{HC(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Qq(e,t,r=!1){return Fn(e)?Xq(t)?t.test(e):Fn(t)?r?e===t:e.includes(t):!1:!1}function $u(e,t=[],r=!1){return t.some(n=>Qq(e,n,r))}function Zq(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!ci(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=ek(Z_(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Z_(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(ci(n[i],Error)){e0(s,o);const l=e(t,n[i]),c=u.length;t0(l,i,c,o),u=Z_(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(ci(l,Error)){e0(s,o);const d=e(t,l),f=u.length;t0(d,`errors[${c}]`,f,o),u=Z_(e,t,r,l,i,[d,...u],d,f)}}),u}function e0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function t0(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function ek(e,t){return e.map(r=>(r.value&&(r.value=Es(r.value,t)),r))}function zc(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&zc(globalThis)||typeof window=="object"&&zc(window)||typeof self=="object"&&zc(self)||typeof wd=="object"&&zc(wd)||(function(){return this})()||{};function nv(){return ot}function Hd(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const vs=nv(),tk=80;function Us(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,s=0;const o=" > ",u=o.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||tk;for(;r&&a++<n&&(l=rk(r,c),!(l==="html"||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function rk(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(vs.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const l=t&&t.length?t.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&Fn(i))for(a=i.split(/\s+/),u=0;u<a.length;u++)n.push(`.${a[u]}`);const c=["aria-label","type","name","title","alt"];for(u=0;u<c.length;u++)s=c[u],o=r.getAttribute(s),o&&n.push(`[${s}="${o}"]`);return n.join("")}function nk(){try{return vs.document.location.href}catch{return""}}function ik(e){return vs.document&&vs.document.querySelector?vs.document.querySelector(e):null}function VC(e){if(!vs.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Zs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ak="Sentry Logger ",eE=["debug","info","warn","error","log","assert","trace"],Ad={};function qu(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Ad);n.forEach(i=>{const a=Ad[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function sk(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Zs?eE.forEach(r=>{t[r]=(...n)=>{e&&qu(()=>{ot.console[r](`${ak}[${r}]:`,...n)})}}):eE.forEach(r=>{t[r]=()=>{}}),t}const Re=sk(),ok=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function uk(e){return e==="http"||e==="https"}function Va(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${s}`}function ck(e){const t=ok.exec(e);if(!t){qu(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a,s="",o]=t.slice(1);let u="",l=o;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return GC({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function GC(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function lk(e){if(!Zs)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Re.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?uk(n)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function xC(e){const t=typeof e=="string"?ck(e):GC(e);if(!(!t||!lk(t)))return t}class kn extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function pr(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&zC(i,n),e[t]=i}function ka(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Zs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function zC(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,ka(e,"__sentry_original__",t)}catch{}}function iv(e){return e.__sentry_original__}function dk(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function WC(e){if(ZE(e))return{message:e.message,name:e.name,stack:e.stack,...n0(e)};if(Fd(e)){const t={type:e.type,target:r0(e.target),currentTarget:r0(e.currentTarget),...n0(e)};return typeof CustomEvent<"u"&&ci(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function r0(e){try{return Kq(e)?Us(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function n0(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function fk(e,t=40){const r=Object.keys(WC(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return Es(r[0],t);for(let n=r.length;n>0;n--){const i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:Es(i,t)}return""}function Zt(e){return tE(e,new Map)}function tE(e,t){if(pk(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=tE(e[i],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(i=>{n.push(tE(i,t))}),n}return e}function pk(e){if(!qa(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const YC=50,i0=/\(error: (.*)\)/,a0=/captureMessage|captureException/;function KC(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const i=[],a=r.split(`
|
|
3
|
+
`);for(let s=n;s<a.length;s++){const o=a[s];if(o.length>1024)continue;const u=i0.test(o)?o.replace(i0,"$1"):o;if(!u.match(/\S*Error: /)){for(const l of t){const c=l(u);if(c){i.push(c);break}}if(i.length>=YC)break}}return hk(i)}}function mk(e){return Array.isArray(e)?KC(...e):e}function hk(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),a0.test(t[t.length-1].function||"")&&(t.pop(),a0.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,YC).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const Hf="<anonymous>";function li(e){try{return!e||typeof e!="function"?Hf:e.name||Hf}catch{return Hf}}const yd={},s0={};function Ga(e,t){yd[e]=yd[e]||[],yd[e].push(t)}function xa(e,t){s0[e]||(t(),s0[e]=!0)}function hn(e,t){const r=e&&yd[e];if(r)for(const n of r)try{n(t)}catch(i){Zs&&Re.error(`Error while triggering instrumentation handler.
|
|
4
|
+
Type: ${e}
|
|
5
|
+
Name: ${li(n)}
|
|
6
|
+
Error:`,i)}}function yk(e){const t="console";Ga(t,e),xa(t,gk)}function gk(){"console"in ot&&eE.forEach(function(e){e in ot.console&&pr(ot.console,e,function(t){return Ad[e]=t,function(...r){hn("console",{args:r,level:e});const i=Ad[e];i&&i.apply(ot.console,r)}})})}function _t(){const e=ot,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function XC(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Si(e){const{message:t,event_id:r}=e;if(t)return t;const n=XC(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function rE(e,t,r){const n=e.exception=e.exception||{},i=n.values=n.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Eu(e,t){const r=XC(e);if(!r)return;const n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism={...n,...i,...t},t&&"data"in t){const a={...i&&i.data,...t.data};r.mechanism.data=a}}function o0(e){if(e&&e.__sentry_captured__)return!0;try{ka(e,"__sentry_captured__",!0)}catch{}return!1}function av(e){return Array.isArray(e)?e:[e]}const hs=ot,_k=1e3;let u0,nE,iE;function Ek(e){Ga("dom",e),xa("dom",vk)}function vk(){if(!hs.document)return;const e=hn.bind(null,"dom"),t=c0(e,!0);hs.document.addEventListener("click",t,!1),hs.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const n=hs[r]&&hs[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(pr(n,"addEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const u=this,l=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},c=l[a]=l[a]||{refCount:0};if(!c.handler){const d=c0(e);c.handler=d,i.call(this,a,d,o)}c.refCount++}catch{}return i.call(this,a,s,o)}}),pr(n,"removeEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const u=this,l=u.__sentry_instrumentation_handlers__||{},c=l[a];c&&(c.refCount--,c.refCount<=0&&(i.call(this,a,c.handler,o),c.handler=void 0,delete l[a]),Object.keys(l).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,a,s,o)}}))})}function bk(e){if(e.type!==nE)return!1;try{if(!e.target||e.target._sentryId!==iE)return!1}catch{}return!0}function Sk(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function c0(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=Tk(r);if(Sk(r.type,n))return;ka(r,"_sentryCaptured",!0),n&&!n._sentryId&&ka(n,"_sentryId",_t());const i=r.type==="keypress"?"input":r.type;bk(r)||(e({event:r,name:i,global:t}),nE=r.type,iE=n?n._sentryId:void 0),clearTimeout(u0),u0=hs.setTimeout(()=>{iE=void 0,nE=void 0},_k)}}function Tk(e){try{return e.target}catch{return null}}const aE=nv();function JC(){if(!("fetch"in aE))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function sE(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ik(){if(typeof EdgeRuntime=="string")return!0;if(!JC())return!1;if(sE(aE.fetch))return!0;let e=!1;const t=aE.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=sE(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Zs&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function QC(e){const t="fetch";Ga(t,e),xa(t,wk)}function wk(){Ik()&&pr(ot,"fetch",function(e){return function(...t){const{method:r,url:n}=Rk(t),i={args:t,fetchData:{method:r,url:n},startTimestamp:Date.now()};return hn("fetch",{...i}),e.apply(ot,t).then(a=>{const s={...i,endTimestamp:Date.now(),response:a};return hn("fetch",s),a},a=>{const s={...i,endTimestamp:Date.now(),error:a};throw hn("fetch",s),a})}})}function oE(e,t){return!!e&&typeof e=="object"&&!!e[t]}function l0(e){return typeof e=="string"?e:e?oE(e,"url")?e.url:e.toString?e.toString():"":""}function Rk(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:l0(r),method:oE(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:l0(t),method:oE(t,"method")?String(t.method).toUpperCase():"GET"}}let Wc=null;function ZC(e){const t="error";Ga(t,e),xa(t,Ak)}function Ak(){Wc=ot.onerror,ot.onerror=function(e,t,r,n,i){return hn("error",{column:n,error:i,line:r,msg:e,url:t}),Wc&&!Wc.__SENTRY_LOADER__?Wc.apply(this,arguments):!1},ot.onerror.__SENTRY_INSTRUMENTED__=!0}let Yc=null;function eM(e){const t="unhandledrejection";Ga(t,e),xa(t,Ok)}function Ok(){Yc=ot.onunhandledrejection,ot.onunhandledrejection=function(e){return hn("unhandledrejection",e),Yc&&!Yc.__SENTRY_LOADER__?Yc.apply(this,arguments):!0},ot.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Kc=nv();function Pk(){const e=Kc.chrome,t=e&&e.app&&e.app.runtime,r="history"in Kc&&!!Kc.history.pushState&&!!Kc.history.replaceState;return!t&&r}const yo=ot;let Xc;function sv(e){const t="history";Ga(t,e),xa(t,Nk)}function Nk(){if(!Pk())return;const e=yo.onpopstate;yo.onpopstate=function(...r){const n=yo.location.href,i=Xc;if(Xc=n,hn("history",{from:i,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const i=n.length>2?n[2]:void 0;if(i){const a=Xc,s=String(i);Xc=s,hn("history",{from:a,to:s})}return r.apply(this,n)}}pr(yo.history,"pushState",t),pr(yo.history,"replaceState",t)}const Ck=ot,ys="__sentry_xhr_v3__";function tM(e){Ga("xhr",e),xa("xhr",Mk)}function Mk(){if(!Ck.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;pr(e,"open",function(t){return function(...r){const n=Date.now(),i=Fn(r[0])?r[0].toUpperCase():void 0,a=jk(r[1]);if(!i||!a)return t.apply(this,r);this[ys]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const o=this[ys];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const u={args:[i,a],endTimestamp:Date.now(),startTimestamp:n,xhr:this};hn("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?pr(this,"onreadystatechange",function(o){return function(...u){return s(),o.apply(this,u)}}):this.addEventListener("readystatechange",s),pr(this,"setRequestHeader",function(o){return function(...u){const[l,c]=u,d=this[ys];return d&&Fn(l)&&Fn(c)&&(d.request_headers[l.toLowerCase()]=c),o.apply(this,u)}}),t.apply(this,r)}}),pr(e,"send",function(t){return function(...r){const n=this[ys];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);const i={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return hn("xhr",i),t.apply(this,r)}})}function jk(e){if(Fn(e))return e;try{return e.toString()}catch{}}function Dk(){return"npm"}function Lk(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let a=0;a<t.length;a++)if(t[a]===i)return!0;return t.push(i),!1}function n(i){if(e)t.delete(i);else for(let a=0;a<t.length;a++)if(t[a]===i){t.splice(a,1);break}}return[r,n]}function bi(e,t=100,r=1/0){try{return uE("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function rM(e,t=3,r=100*1024){const n=bi(e,t);return Bk(n)>r?rM(e,t-1,r):n}function uE(e,t,r=1/0,n=1/0,i=Lk()){const[a,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!FC(t))return t;const o=$k(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(u===0)return o.replace("object ","");if(a(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const p=l.toJSON();return uE("",p,u-1,n,i)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=WC(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=n){c[p]="[MaxProperties ~]";break}const y=f[p];c[p]=uE(p,y,u-1,n,i),d++}return s(t),c}function $k(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof wd<"u"&&t===wd)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(HC(t))return"[VueViewModel]";if(Jq(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${li(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=qk(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function qk(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function kk(e){return~-encodeURI(e).split(/%..|./).length}function Bk(e){return kk(JSON.stringify(e))}var ai;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(ai||(ai={}));function Fs(e){return new qr(t=>{t(e)})}function ov(e){return new qr((t,r)=>{r(e)})}class qr{constructor(t){qr.prototype.__init.call(this),qr.prototype.__init2.call(this),qr.prototype.__init3.call(this),qr.prototype.__init4.call(this),this._state=ai.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new qr((n,i)=>{this._handlers.push([!1,a=>{if(!t)n(a);else try{n(t(a))}catch(s){i(s)}},a=>{if(!r)i(a);else try{n(r(a))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new qr((r,n)=>{let i,a;return this.then(s=>{a=!1,i=s,t&&t()},s=>{a=!0,i=s,t&&t()}).then(()=>{if(a){n(i);return}r(i)})})}__init(){this._resolve=t=>{this._setResult(ai.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(ai.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===ai.PENDING){if(Qs(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===ai.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===ai.RESOLVED&&r[1](this._value),this._state===ai.REJECTED&&r[2](this._value),r[0]=!0)})}}}function Uk(e){const t=[];function r(){return e===void 0||t.length<e}function n(s){return t.splice(t.indexOf(s),1)[0]}function i(s){if(!r())return ov(new kn("Not adding Promise because buffer limit was reached."));const o=s();return t.indexOf(o)===-1&&t.push(o),o.then(()=>n(o)).then(null,()=>n(o).then(null,()=>{})),o}function a(s){return new qr((o,u)=>{let l=t.length;if(!l)return o(!0);const c=setTimeout(()=>{s&&s>0&&o(!1)},s);t.forEach(d=>{Fs(d).then(()=>{--l||(clearTimeout(c),o(!0))},u)})})}return{$:t,add:i,drain:a}}function La(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}const Fk=["fatal","error","warning","log","info","debug"];function Hk(e){return e==="warn"?"warning":Fk.includes(e)?e:"log"}const nM=1e3;function za(){return Date.now()/nM}function Vk(){const{performance:e}=ot;if(!e||!e.now)return za;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/nM}const Wa=Vk(),Zr=(()=>{const{performance:e}=ot;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,a=i<t,s=e.timing&&e.timing.navigationStart,u=typeof s=="number"?Math.abs(s+r-n):t,l=u<t;return a||l?i<=u?e.timeOrigin:s:n})(),cE="baggage",iM="sentry-",Gk=/^sentry-/,xk=8192;function zk(e){if(!Fn(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((n,i)=>{const a=d0(i);for(const s of Object.keys(a))n[s]=a[s];return n},{});else{if(!e)return;t=d0(e)}const r=Object.entries(t).reduce((n,[i,a])=>{if(i.match(Gk)){const s=i.slice(iM.length);n[s]=a}return n},{});if(Object.keys(r).length>0)return r}function aM(e){if(!e)return;const t=Object.entries(e).reduce((r,[n,i])=>(i&&(r[`${iM}${n}`]=i),r),{});return Wk(t)}function d0(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(t[r]=n,t),{})}function Wk(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],i)=>{const a=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=i===0?a:`${t},${a}`;return s.length>xk?(Zs&&Re.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}const Yk=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Kk(e){if(!e)return;const t=e.match(Yk);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function Xk(e,t){const r=Kk(e),n=zk(t),{traceId:i,parentSpanId:a,parentSampled:s}=r||{};return r?{traceId:i||_t(),parentSpanId:a||_t().substring(16),spanId:_t().substring(16),sampled:s,dsc:n||{}}:{traceId:i||_t(),spanId:_t().substring(16)}}function uv(e=_t(),t=_t().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Ya(e,t=[]){return[e,t]}function Jk(e,t){const[r,n]=e;return[r,[...n,t]]}function f0(e,t){const r=e[1];for(const n of r){const i=n[0].type;if(t(n,i))return!0}return!1}function lE(e,t){return(t||new TextEncoder).encode(e)}function Qk(e,t){const[r,n]=e;let i=JSON.stringify(r);function a(s){typeof i=="string"?i=typeof s=="string"?i+s:[lE(i,t),s]:i.push(typeof s=="string"?lE(s,t):s)}for(const s of n){const[o,u]=s;if(a(`
|
|
7
|
+
${JSON.stringify(o)}
|
|
8
|
+
`),typeof u=="string"||u instanceof Uint8Array)a(u);else{let l;try{l=JSON.stringify(u)}catch{l=JSON.stringify(bi(u))}a(l)}}return typeof i=="string"?i:Zk(i)}function Zk(e){const t=e.reduce((i,a)=>i+a.length,0),r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return r}function eB(e,t){const r=typeof e.data=="string"?lE(e.data,t):e.data;return[Zt({type:"attachment",length:r.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),r]}const tB={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function p0(e){return tB[e]}function sM(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function rB(e,t,r,n){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:Va(n)},...i&&{trace:Zt({...i})}}}function nB(e,t,r){const n=[{type:"client_report"},{timestamp:za(),discarded_events:e}];return Ya(t?{dsn:t}:{},[n])}const iB=60*1e3;function aB(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?iB:n-t}function sB(e,t){return e[t]||e.all||0}function oB(e,t,r=Date.now()){return sB(e,t)>r}function uB(e,{statusCode:t,headers:r},n=Date.now()){const i={...e},a=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(a)for(const o of a.trim().split(",")){const[u,l,,,c]=o.split(":",5),d=parseInt(u,10),f=(isNaN(d)?60:d)*1e3;if(!l)i.all=n+f;else for(const p of l.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(i[p]=n+f):i[p]=n+f}else s?i.all=n+aB(s,n):t===429&&(i.all=n+60*1e3);return i}const Mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vd="production";function cv(){return Hd("globalEventProcessors",()=>[])}function cB(e){cv().push(e)}function Od(e,t,r,n=0){return new qr((i,a)=>{const s=e[n];if(t===null||typeof s!="function")i(t);else{const o=s({...t},r);Mt&&s.id&&o===null&&Re.log(`Event processor "${s.id}" dropped event`),Qs(o)?o.then(u=>Od(e,u,r,n+1).then(i)).then(null,a):Od(e,o,r,n+1).then(i).then(null,a)}})}function oM(e){const t=Wa(),r={sid:_t(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>lB(r)};return e&&Ba(r,e),r}function Ba(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Wa(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:_t()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function uM(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Ba(e,r)}function lB(e){return Zt({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const dB=1;function fB(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=vu(e);return Zt({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function vu(e){return pB(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function pB(e){return typeof e.getSpanJSON=="function"}function mB(e){const{traceFlags:t}=e.spanContext();return!!(t&dB)}function hB(e,t,r,n,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,u={...t,event_id:t.event_id||r.event_id||_t(),timestamp:t.timestamp||za()},l=r.integrations||e.integrations.map(T=>T.name);yB(u,e),EB(u,l),t.type===void 0&&gB(u,e.stackParser);const c=bB(n,r.captureContext);r.mechanism&&Eu(u,r.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],f=DB().getScopeData();if(a){const T=a.getScopeData();g0(f,T)}if(c){const T=c.getScopeData();g0(f,T)}const p=[...r.attachments||[],...f.attachments];p.length&&(r.attachments=p),hM(u,f);const y=[...d,...cv(),...f.eventProcessors];return Od(y,u,r).then(T=>(T&&_B(T),typeof s=="number"&&s>0?vB(T,s,o):T))}function yB(e,t){const{environment:r,release:n,dist:i,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?r:Vd),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Es(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Es(s.value,a));const o=e.request;o&&o.url&&(o.url=Es(o.url,a))}const m0=new WeakMap;function gB(e,t){const r=ot._sentryDebugIds;if(!r)return;let n;const i=m0.get(t);i?n=i:(n=new Map,m0.set(t,n));const a=Object.keys(r).reduce((s,o)=>{let u;const l=n.get(o);l?u=l:(u=t(o),n.set(o,u));for(let c=u.length-1;c>=0;c--){const d=u[c];if(d.filename){s[d.filename]=r[o];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=a[o.filename])})})}catch{}}function _B(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.keys(t).forEach(n=>{r.push({type:"sourcemap",code_file:n,debug_id:t[n]})})}function EB(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function vB(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:bi(i.data,t,r)}}))},...e.user&&{user:bi(e.user,t,r)},...e.contexts&&{contexts:bi(e.contexts,t,r)},...e.extra&&{extra:bi(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=bi(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(i=>{const a=vu(i).data;return a&&(i.data=bi(a,t,r)),i})),n}function bB(e,t){if(!t)return e;const r=e?e.clone():new bu;return r.update(t),r}function SB(e){if(e)return TB(e)?{captureContext:e}:wB(e)?{captureContext:e}:e}function TB(e){return e instanceof bu||typeof e=="function"}const IB=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function wB(e){return Object.keys(e).some(t=>IB.includes(t))}function lv(e,t){return gn().captureException(e,SB(t))}function cM(e,t){return gn().captureEvent(e,t)}function Ua(e,t){gn().addBreadcrumb(e,t)}function RB(e){gn().setUser(e)}function lM(...e){const t=gn();if(e.length===2){const[r,n]=e;return r?t.withScope(()=>(t.getStackTop().scope=r,n(r))):t.withScope(n)}return t.withScope(e[0])}function Nr(){return gn().getClient()}function ku(){return gn().getScope()}function h0(e){const t=Nr(),r=xd(),n=ku(),{release:i,environment:a=Vd}=t&&t.getOptions()||{},{userAgent:s}=ot.navigator||{},o=oM({release:i,environment:a,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),u=r.getSession();return u&&u.status==="ok"&&Ba(u,{status:"exited"}),dM(),r.setSession(o),n.setSession(o),o}function dM(){const e=xd(),t=ku(),r=t.getSession()||e.getSession();r&&uM(r),fM(),e.setSession(),t.setSession()}function fM(){const e=xd(),t=ku(),r=Nr(),n=t.getSession()||e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}function y0(e=!1){if(e){dM();return}fM()}function pM(e){return e.transaction}function mM(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=Zt({environment:n.environment||Vd,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function AB(e){const t=Nr();if(!t)return{};const r=mM(vu(e).trace_id||"",t,ku()),n=pM(e);if(!n)return r;const i=n&&n._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:a,source:s}=n.metadata;a!=null&&(r.sample_rate=`${a}`);const o=vu(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(mB(n)),t.emit&&t.emit("createDsc",r),r}function hM(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;OB(e,t),n&&CB(e,n),MB(e,r),PB(e,i),NB(e,a)}function g0(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:d,propagationContext:f,transactionName:p,span:y}=t;go(e,"extra",r),go(e,"tags",n),go(e,"user",i),go(e,"contexts",a),go(e,"sdkProcessingMetadata",o),s&&(e.level=s),p&&(e.transactionName=p),y&&(e.span=y),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function go(e,t,r){if(r&&Object.keys(r).length){e[t]={...e[t]};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[t][n]=r[n])}}function OB(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,u=Zt(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=Zt(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=Zt(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=Zt(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function PB(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function NB(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function CB(e,t){e.contexts={trace:fB(t),...e.contexts};const r=pM(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:AB(t),...e.sdkProcessingMetadata};const n=vu(r).description;n&&(e.tags={transaction:n,...e.tags})}}function MB(e,t){e.fingerprint=e.fingerprint?av(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const jB=100;let Vf,bu=class gd{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=_0()}static clone(t){return t?t.clone():new gd}clone(){const t=new gd;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Ba(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t;if(r instanceof gd){const n=r.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),r.getRequestSession()&&(this._requestSession=r.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(qa(r)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=_0(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:jB;if(n<=0)return this;const i={timestamp:za(),...t},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:r,_contexts:n,_tags:i,_extra:a,_user:s,_level:o,_fingerprint:u,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:d,_transactionName:f,_span:p}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:i,extra:a,user:s,level:o,fingerprint:u||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:d,transactionName:f,span:p}}applyToEvent(t,r={},n=[]){hM(t,this.getScopeData());const i=[...n,...cv(),...this._eventProcessors];return Od(i,t,r)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:_t();if(!this._client)return Re.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...r,event_id:n},this),n}captureMessage(t,r,n){const i=n&&n.event_id?n.event_id:_t();if(!this._client)return Re.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i},this),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:_t();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(Re.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function DB(){return Vf||(Vf=new bu),Vf}function _0(){return{traceId:_t(),spanId:_t().substring(16)}}const dE="7.120.3",yM=parseFloat(dE),LB=100;let gM=class{constructor(t,r,n,i=yM){this._version=i;let a;r?a=r:(a=new bu,a.setClient(t));let s;n?s=n:(s=new bu,s.setClient(t)),this._stack=[{scope:a}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){const r=this.getStackTop();r.client=t,r.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const r=this.pushScope();let n;try{n=t(r)}catch(i){throw this.popScope(),i}return Qs(n)?n.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,r){const n=this._lastEventId=r&&r.event_id?r.event_id:_t(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...r,event_id:n}),n}captureMessage(t,r,n){const i=this._lastEventId=n&&n.event_id?n.event_id:_t(),a=new Error(t);return this.getScope().captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i}),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:_t();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...r,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,r){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=LB}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:za(),...t},l=a?qu(()=>a(u,r)):u;l!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,r){this.getScope().setTag(t,r),this.getIsolationScope().setTag(t,r)}setExtra(t,r){this.getScope().setExtra(t,r),this.getIsolationScope().setExtra(t,r)}setContext(t,r){this.getScope().setContext(t,r),this.getIsolationScope().setContext(t,r)}configureScope(t){const{scope:r,client:n}=this.getStackTop();n&&t(r)}run(t){const r=E0(this);try{t(this)}finally{E0(r)}}getIntegration(t){const r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return Mt&&Re.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){const n=this._callExtensionMethod("startTransaction",t,r);return Mt&&!n&&(this.getClient()?Re.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
9
|
+
Sentry.addTracingExtensions();
|
|
10
|
+
Sentry.init({...});
|
|
11
|
+
`):Re.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const r=this.getStackTop().scope,n=r.getSession();n&&uM(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=Vd}=n&&n.getOptions()||{},{userAgent:s}=ot.navigator||{},o=oM({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&Ba(u,{status:"exited"}),this.endSession(),r.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),r=t&&t.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:r}=this.getStackTop(),n=t.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_callExtensionMethod(t,...r){const i=Gd().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,r);Mt&&Re.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Gd(){return ot.__SENTRY__=ot.__SENTRY__||{extensions:{},hub:void 0},ot}function E0(e){const t=Gd(),r=fE(t);return _M(t,e),r}function gn(){const e=Gd();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return $B(e)}function xd(){return gn().getIsolationScope()}function $B(e=Gd()){return(!qB(e)||fE(e).isOlderThan(yM))&&_M(e,new gM),fE(e)}function qB(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function fE(e){return Hd("hub",()=>new gM,e)}function _M(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function kB(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function BB(e,t,r,n){const i=sM(r),a={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!n&&t&&{dsn:Va(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ya(a,[s])}function UB(e,t,r,n){const i=sM(r),a=e.type&&e.type!=="replay_event"?e.type:"event";kB(e,r&&r.sdk);const s=rB(e,i,n,t);return delete e.sdkProcessingMetadata,Ya(s,[[{type:a},e]])}const FB="7";function EM(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function HB(e){return`${EM(e)}${e.projectId}/envelope/`}function VB(e,t){return dk({sentry_key:e.publicKey,sentry_version:FB,...t&&{sentry_client:`${t.name}/${t.version}`}})}function GB(e,t={}){const r=typeof t=="string"?t:t.tunnel,n=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return r||`${HB(e)}?${VB(e,n)}`}function xB(e,t){const r=xC(e);if(!r)return"";const n=`${EM(r)}embed/error-page/`;let i=`dsn=${Va(r)}`;for(const a in t)if(a!=="dsn"&&a!=="onClose")if(a==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(a)}=${encodeURIComponent(t[a])}`;return`${n}?${i}`}const v0=[];function zB(e){const t={};return e.forEach(r=>{const{name:n}=r,i=t[n];i&&!i.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.keys(t).map(r=>t[r])}function WB(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...t,...r]:typeof r=="function"?n=av(r(t)):n=t;const i=zB(n),a=KB(i,s=>s.name==="Debug");if(a!==-1){const[s]=i.splice(a,1);i.push(s)}return i}function YB(e,t){const r={};return t.forEach(n=>{n&&vM(e,n,r)}),r}function b0(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function vM(e,t,r){if(r[t.name]){Mt&&Re.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,v0.indexOf(t.name)===-1&&(t.setupOnce(cB,gn),v0.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,a)=>n(i,a,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const n=t.processEvent.bind(t),i=Object.assign((a,s)=>n(a,s,e),{id:t.name});e.addEventProcessor(i)}Mt&&Re.log(`Integration installed: ${t.name}`)}function KB(e,t){for(let r=0;r<e.length;r++)if(t(e[r])===!0)return r;return-1}function Li(e,t){return Object.assign(function(...n){return t(...n)},{id:e})}function XB(e){let t="";for(const r of e){const n=Object.entries(r.tags),i=n.length>0?`|#${n.map(([a,s])=>`${a}:${s}`).join(",")}`:"";t+=`${r.name}@${r.unit}:${r.metric}|${r.metricType}${i}|T${r.timestamp}
|
|
12
|
+
`}return t}function JB(e,t,r,n){const i={sent_at:new Date().toISOString()};r&&r.sdk&&(i.sdk={name:r.sdk.name,version:r.sdk.version}),n&&t&&(i.dsn=Va(t));const a=QB(e);return Ya(i,[a])}function QB(e){const t=XB(e);return[{type:"statsd",length:t.length},t]}const S0="Not capturing exception because it's already been captured.";class ZB{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=xC(t.dsn):Mt&&Re.warn("No DSN provided, client will not send events."),this._dsn){const r=GB(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}}captureException(t,r,n){if(o0(t)){Mt&&Re.log(S0);return}let i=r&&r.event_id;return this._process(this.eventFromException(t,r).then(a=>this._captureEvent(a,r,n)).then(a=>{i=a})),i}captureMessage(t,r,n,i){let a=n&&n.event_id;const s=tv(t)?t:String(t),o=rv(t)?this.eventFromMessage(s,r,n):this.eventFromException(t,n);return this._process(o.then(u=>this._captureEvent(u,n,i)).then(u=>{a=u})),a}captureEvent(t,r,n){if(r&&r.originalException&&o0(r.originalException)){Mt&&Re.log(S0);return}let i=r&&r.event_id;const s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,r,s||n).then(o=>{i=o})),i}captureSession(t){typeof t.release!="string"?Mt&&Re.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ba(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(i=>n&&i))):Fs(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return Mt&&Re.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const r=this._integrations[t.name];vM(this,t,this._integrations),r||b0(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=UB(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of r.attachments||[])n=Jk(n,eB(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then(a=>this.emit("afterSendEvent",t,a),null)}sendSession(t){const r=BB(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const i=typeof n=="number"?n:1,a=`${t}:${r}`;Mt&&Re.log(`Recording outcome: "${a}"${i>1?` (${i} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+i}}captureAggregateMetrics(t){Mt&&Re.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const r=JB(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}on(t,r){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(r)}emit(t,...r){this._hooks[t]&&this._hooks[t].forEach(n=>n(...r))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=YB(this,t),b0(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,r){let n=!1,i=!1;const a=r.exception&&r.exception.values;if(a){i=!0;for(const u of a){const l=u.mechanism;if(l&&l.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Ba(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new qr(r=>{let n=0;const i=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),r(!0)):(n+=i,t&&n>=t&&(clearInterval(a),r(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,i=xd()){const a=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),hB(a,t,r,n,this,i).then(o=>{if(o===null)return o;const u={...i.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&u){const{traceId:c,spanId:d,parentSpanId:f,dsc:p}=u;o.contexts={trace:{trace_id:c,span_id:d,parent_span_id:f},...o.contexts};const y=p||mM(c,this,n);o.sdkProcessingMetadata={dynamicSamplingContext:y,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(i=>i.event_id,i=>{if(Mt){const a=i;a.logLevel==="log"?Re.log(a.message):Re.warn(a)}})}_processEvent(t,r,n){const i=this.getOptions(),{sampleRate:a}=i,s=SM(t),o=bM(t),u=t.type||"error",l=`before send for type \`${u}\``;if(o&&typeof a=="number"&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",t),ov(new kn(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const c=u==="replay_event"?"replay":u,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",c,t),new kn("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return p;const g=t2(i,p,r);return e2(g,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",c,t),s){const P=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",P)}throw new kn(`${l} returned \`null\`, will not send event.`,"log")}const y=n&&n.getSession();if(!s&&y&&this._updateSessionFromEvent(y,p),s){const T=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,P=p.spans?p.spans.length:0,m=T-P;m>0&&this.recordDroppedEvent("before_send","span",m)}const g=p.transaction_info;if(s&&g&&p.transaction!==t.transaction){const T="custom";p.transaction_info={...g,source:T}}return this.sendEvent(p,r),p}).then(null,p=>{throw p instanceof kn?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new kn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
13
|
+
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,r=>{Mt&&Re.error("Error while sending event:",r)});Mt&&Re.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(r=>{const[n,i]=r.split(":");return{reason:n,category:i,quantity:t[r]}})}}function e2(e,t){const r=`${t} must return \`null\` or a valid event.`;if(Qs(e))return e.then(n=>{if(!qa(n)&&n!==null)throw new kn(r);return n},n=>{throw new kn(`${t} rejected with ${n}`)});if(!qa(e)&&e!==null)throw new kn(r);return e}function t2(e,t,r){const{beforeSend:n,beforeSendTransaction:i}=e;if(bM(t)&&n)return n(t,r);if(SM(t)&&i){if(t.spans){const a=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(t,r)}return t}function bM(e){return e.type===void 0}function SM(e){return e.type==="transaction"}function r2(e,t){t.debug===!0&&(Mt?Re.enable():qu(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ku().update(t.initialScope);const n=new e(t);n2(n),i2(n)}function n2(e){const r=gn().getStackTop();r.client=e,r.scope.setClient(e)}function i2(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const a2=30;function TM(e,t,r=Uk(e.bufferSize||a2)){let n={};const i=s=>r.drain(s);function a(s){const o=[];if(f0(s,(d,f)=>{const p=p0(f);if(oB(n,p)){const y=T0(d,f);e.recordDroppedEvent("ratelimit_backoff",p,y)}else o.push(d)}),o.length===0)return Fs();const u=Ya(s[0],o),l=d=>{f0(u,(f,p)=>{const y=T0(f,p);e.recordDroppedEvent(d,p0(p),y)})},c=()=>t({body:Qk(u,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&Mt&&Re.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=uB(n,d),d),d=>{throw l("network_error"),d});return r.add(c).then(d=>d,d=>{if(d instanceof kn)return Mt&&Re.error("Skipped sending event because buffer is full."),l("queue_overflow"),Fs();throw d})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function T0(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function IM(e,t,r=[t],n="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(a=>({name:`${n}:@sentry/${a}`,version:dE})),version:dE}),e._metadata=i}const s2=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],o2=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],wM="InboundFilters",u2=((e={})=>({name:wM,setupOnce(){},processEvent(t,r,n){const i=n.getOptions(),a=c2(e,i);return l2(t,a)?null:t}})),RM=u2;Li(wM,RM);function c2(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:s2],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:o2],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function l2(e,t){return t.ignoreInternal&&y2(e)?(Mt&&Re.warn(`Event dropped due to being internal Sentry Error.
|
|
14
|
+
Event: ${Si(e)}`),!0):d2(e,t.ignoreErrors)?(Mt&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
15
|
+
Event: ${Si(e)}`),!0):f2(e,t.ignoreTransactions)?(Mt&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
16
|
+
Event: ${Si(e)}`),!0):p2(e,t.denyUrls)?(Mt&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
17
|
+
Event: ${Si(e)}.
|
|
18
|
+
Url: ${Pd(e)}`),!0):m2(e,t.allowUrls)?!1:(Mt&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
19
|
+
Event: ${Si(e)}.
|
|
20
|
+
Url: ${Pd(e)}`),!0)}function d2(e,t){return e.type||!t||!t.length?!1:h2(e).some(r=>$u(r,t))}function f2(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?$u(r,t):!1}function p2(e,t){if(!t||!t.length)return!1;const r=Pd(e);return r?$u(r,t):!1}function m2(e,t){if(!t||!t.length)return!0;const r=Pd(e);return r?$u(r,t):!0}function h2(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),Mt&&t.length===0&&Re.error(`Could not extract message for event ${Si(e)}`),t}function y2(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function g2(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Pd(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?g2(t):null}catch{return Mt&&Re.error(`Cannot extract url for event ${Si(e)}`),null}}let I0;const AM="FunctionToString",w0=new WeakMap,_2=(()=>({name:AM,setupOnce(){I0=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=iv(this),r=w0.has(Nr())&&t!==void 0?t:this;return I0.apply(r,e)}}catch{}},setup(e){w0.set(e,!0)}})),OM=_2;Li(AM,OM);const mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,PM="production";function E2(){return Hd("globalEventProcessors",()=>[])}function pE(e,t,r,n=0){return new qr((i,a)=>{const s=e[n];if(t===null||typeof s!="function")i(t);else{const o=s({...t},r);mt&&s.id&&o===null&&Re.log(`Event processor "${s.id}" dropped event`),Qs(o)?o.then(u=>pE(e,u,r,n+1).then(i)).then(null,a):pE(e,o,r,n+1).then(i).then(null,a)}})}function v2(e){const t=Wa(),r={sid:_t(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>S2(r)};return e&&zd(r,e),r}function zd(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Wa(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:_t()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function b2(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),zd(e,r)}function S2(e){return Zt({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const T2=0,NM=1;function dv(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=kr(e);return Zt({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function Wd(e){const{traceId:t,spanId:r}=e.spanContext(),n=fv(e);return uv(t,r,n)}function Yd(e){return typeof e=="number"?R0(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?R0(e.getTime()):Wa()}function R0(e){return e>9999999999?e/1e3:e}function kr(e){return I2(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function I2(e){return typeof e.getSpanJSON=="function"}function fv(e){const{traceFlags:t}=e.spanContext();return!!(t&NM)}function eo(){return ro().getClient()}function to(){return ro().getScope()}function Nd(e){return e.transaction}function pv(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=Zt({environment:n.environment||PM,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function Hs(e){const t=eo();if(!t)return{};const r=pv(kr(e).trace_id||"",t,to()),n=Nd(e);if(!n)return r;const i=n&&n._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:a,source:s}=n.metadata;a!=null&&(r.sample_rate=`${a}`);const o=kr(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(fv(n)),t.emit&&t.emit("createDsc",r),r}function w2(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;R2(e,t),n&&P2(e,n),N2(e,r),A2(e,i),O2(e,a)}function R2(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,u=Zt(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=Zt(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=Zt(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=Zt(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function A2(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function O2(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function P2(e,t){e.contexts={trace:dv(t),...e.contexts};const r=Nd(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:Hs(t),...e.sdkProcessingMetadata};const n=kr(r).description;n&&(e.tags={transaction:n,...e.tags})}}function N2(e,t){e.fingerprint=e.fingerprint?av(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const C2=100;class bs{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=A0()}static clone(t){return t?t.clone():new bs}clone(){const t=new bs;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&zd(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t;if(r instanceof bs){const n=r.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),r.getRequestSession()&&(this._requestSession=r.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(qa(r)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=A0(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:C2;if(n<=0)return this;const i={timestamp:za(),...t},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:r,_contexts:n,_tags:i,_extra:a,_user:s,_level:o,_fingerprint:u,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:d,_transactionName:f,_span:p}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:i,extra:a,user:s,level:o,fingerprint:u||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:d,transactionName:f,span:p}}applyToEvent(t,r={},n=[]){w2(t,this.getScopeData());const i=[...n,...E2(),...this._eventProcessors];return pE(i,t,r)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:_t();if(!this._client)return Re.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...r,event_id:n},this),n}captureMessage(t,r,n){const i=n&&n.event_id?n.event_id:_t();if(!this._client)return Re.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i},this),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:_t();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(Re.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function A0(){return{traceId:_t(),spanId:_t().substring(16)}}const M2="7.120.3",CM=parseFloat(M2),j2=100;class MM{constructor(t,r,n,i=CM){this._version=i;let a;r?a=r:(a=new bs,a.setClient(t));let s;n?s=n:(s=new bs,s.setClient(t)),this._stack=[{scope:a}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){const r=this.getStackTop();r.client=t,r.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const r=this.pushScope();let n;try{n=t(r)}catch(i){throw this.popScope(),i}return Qs(n)?n.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,r){const n=this._lastEventId=r&&r.event_id?r.event_id:_t(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...r,event_id:n}),n}captureMessage(t,r,n){const i=this._lastEventId=n&&n.event_id?n.event_id:_t(),a=new Error(t);return this.getScope().captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i}),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:_t();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...r,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,r){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=j2}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:za(),...t},l=a?qu(()=>a(u,r)):u;l!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,r){this.getScope().setTag(t,r),this.getIsolationScope().setTag(t,r)}setExtra(t,r){this.getScope().setExtra(t,r),this.getIsolationScope().setExtra(t,r)}setContext(t,r){this.getScope().setContext(t,r),this.getIsolationScope().setContext(t,r)}configureScope(t){const{scope:r,client:n}=this.getStackTop();n&&t(r)}run(t){const r=O0(this);try{t(this)}finally{O0(r)}}getIntegration(t){const r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return mt&&Re.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){const n=this._callExtensionMethod("startTransaction",t,r);return mt&&!n&&(this.getClient()?Re.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
21
|
+
Sentry.addTracingExtensions();
|
|
22
|
+
Sentry.init({...});
|
|
23
|
+
`):Re.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const r=this.getStackTop().scope,n=r.getSession();n&&b2(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=PM}=n&&n.getOptions()||{},{userAgent:s}=ot.navigator||{},o=v2({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&zd(u,{status:"exited"}),this.endSession(),r.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),r=t&&t.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:r}=this.getStackTop(),n=t.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_callExtensionMethod(t,...r){const i=Bu().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,r);mt&&Re.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Bu(){return ot.__SENTRY__=ot.__SENTRY__||{extensions:{},hub:void 0},ot}function O0(e){const t=Bu(),r=mE(t);return jM(t,e),r}function ro(){const e=Bu();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return D2(e)}function mv(){return ro().getIsolationScope()}function D2(e=Bu()){return(!L2(e)||mE(e).isOlderThan(CM))&&jM(e,new MM),mE(e)}function L2(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function mE(e){return Hd("hub",()=>new MM,e)}function jM(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function Fa(e){return ro().getScope().getTransaction()}let P0=!1;function $2(){P0||(P0=!0,ZC(hE),eM(hE))}function hE(){const e=Fa();if(e){const t="internal_error";mt&&Re.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}hE.tag="sentry_tracingErrorCallback";var N0;(function(e){e.Ok="ok";const r="deadline_exceeded";e.DeadlineExceeded=r;const n="unauthenticated";e.Unauthenticated=n;const i="permission_denied";e.PermissionDenied=i;const a="not_found";e.NotFound=a;const s="resource_exhausted";e.ResourceExhausted=s;const o="invalid_argument";e.InvalidArgument=o;const u="unimplemented";e.Unimplemented=u;const l="unavailable";e.Unavailable=l;const c="internal_error";e.InternalError=c;const d="unknown_error";e.UnknownError=d;const f="cancelled";e.Cancelled=f;const p="already_exists";e.AlreadyExists=p;const y="failed_precondition";e.FailedPrecondition=y;const g="aborted";e.Aborted=g;const T="out_of_range";e.OutOfRange=T;const P="data_loss";e.DataLoss=P})(N0||(N0={}));function q2(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function hv(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const r=q2(t);r!=="unknown_error"&&e.setStatus(r)}function no(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=eo(),r=e||t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function DM(e){if(!no())return;const t=U2(e),r=ro(),n=e.scope?e.scope.getSpan():k2();if(e.onlyIfParent&&!n)return;const s=(e.scope||to()).clone();return B2(r,{parentSpan:n,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function k2(){return to().getSpan()}function B2(e,{parentSpan:t,spanContext:r,forceTransaction:n,scope:i}){if(!no())return;const a=mv();let s;if(t&&!n)s=t.startChild(r);else if(t){const o=Hs(t),{traceId:u,spanId:l}=t.spanContext(),c=fv(t);s=e.startTransaction({traceId:u,parentSpanId:l,parentSampled:c,...r,metadata:{dynamicSamplingContext:o,...r.metadata}})}else{const{traceId:o,dsc:u,parentSpanId:l,sampled:c}={...a.getPropagationContext(),...i.getPropagationContext()};s=e.startTransaction({traceId:o,parentSpanId:l,parentSampled:c,...r,metadata:{dynamicSamplingContext:u,...r.metadata}})}return i.setSpan(s),F2(s,i,a),s}function U2(e){if(e.startTime){const t={...e};return t.startTimestamp=Yd(e.startTime),delete t.startTime,t}return e}const LM="_sentryScope",$M="_sentryIsolationScope";function F2(e,t,r){e&&(ka(e,$M,r),ka(e,LM,t))}function H2(e){return{scope:e[LM],isolationScope:e[$M]}}const Ss="sentry.source",gs="sentry.sample_rate",Jc="sentry.op",_s="sentry.origin",V2="profile_id";class qM{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Kd{constructor(t={}){this._traceId=t.traceId||_t(),this._spanId=t.spanId||_t().substring(16),this._startTime=t.startTimestamp||Wa(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[_s]:t.origin||"manual",[Jc]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Jc]}set op(t){this.setAttribute(Jc,t)}get origin(){return this._attributes[_s]}set origin(t){this.setAttribute(_s,t)}spanContext(){const{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?NM:T2}}startChild(t){const r=new Kd({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r);const n=Nd(this);if(r.transaction=n,mt&&n){const i=t&&t.op||"< unknown op >",a=kr(r).description||"< unknown name >",s=n.spanContext().spanId,o=`[Tracing] Starting '${i}' span on transaction '${a}' (${s}).`;Re.log(o),this._logMessage=o}return r}setTag(t,r){return this.tags={...this.tags,[t]:r},this}setData(t,r){return this.data={...this.data,[t]:r},this}setAttribute(t,r){r===void 0?delete this._attributes[t]:this._attributes[t]=r}setAttributes(t){Object.keys(t).forEach(r=>this.setAttribute(r,t[r]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return hv(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const r=Nd(this);if(mt&&r&&r.spanContext().spanId!==this._spanId){const n=this._logMessage;n&&Re.log(n.replace("Starting","Finishing"))}this._endTime=Yd(t)}toTraceparent(){return Wd(this)}toContext(){return Zt({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return dv(this)}getSpanJSON(){return Zt({data:this._getData(),description:this._name,op:this._attributes[Jc],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[_s],_metrics_summary:void 0,profile_id:this._attributes[V2],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:r}=this,n=Object.keys(t).length>0,i=Object.keys(r).length>0;if(!(!n&&!i))return n&&i?{...t,...r}:n?t:r}}class kM extends Kd{constructor(t,r){super(t),this._contexts={},this._hub=r||ro(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[Ss]&&{source:this._attributes[Ss]},...this._attributes[gs]&&{sampleRate:this._attributes[gs]}}}set metadata(t){this._metadata=t}setName(t,r="custom"){this._name=t,this.setAttribute(Ss,r)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new qM(t)),this.spanRecorder.add(this)}setContext(t,r){r===null?delete this._contexts[t]:this._contexts[t]=r}setMeasurement(t,r,n=""){this._measurements[t]={value:r,unit:n}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const r=Yd(t),n=this._finishTransaction(r);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();return Zt({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Hs(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(mt&&Re.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this._sampled!==!0){mt&&Re.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}const n=this.spanRecorder?this.spanRecorder.spans.filter(c=>c!==this&&kr(c).timestamp):[];if(this._trimEnd&&n.length>0){const c=n.map(d=>kr(d).timestamp).filter(Boolean);this._endTime=c.reduce((d,f)=>d>f?d:f)}const{scope:i,isolationScope:a}=H2(this),{metadata:s}=this,{source:o}=s,u={contexts:{...this._contexts,trace:dv(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:i,capturedSpanIsolationScope:a,...Zt({dynamicSamplingContext:Hs(this)})},_metrics_summary:void 0,...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(mt&&Re.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),mt&&Re.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),u}}const _d={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},G2="finishReason",as=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class x2 extends qM{constructor(t,r,n,i){super(i),this._pushActivity=t,this._popActivity=r,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const r=t.end;t.end=(...n)=>(this._popActivity(t.spanContext().spanId),r.apply(t,n)),kr(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class z2 extends kM{constructor(t,r,n=_d.idleTimeout,i=_d.finalTimeout,a=_d.heartbeatInterval,s=!1,o=!1){super(t,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=as[4],this._autoFinishAllowed=!o,s&&(mt&&Re.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),r.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=as[3],this.end())},this._finalTimeout)}end(t){const r=Yd(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(G2,this._finishReason),this.spanRecorder){mt&&Re.log("[Tracing] finishing IdleTransaction",new Date(r*1e3).toISOString(),this.op);for(const n of this._beforeFinishCallbacks)n(this,r);this.spanRecorder.spans=this.spanRecorder.spans.filter(n=>{if(n.spanContext().spanId===this.spanContext().spanId)return!0;kr(n).timestamp||(n.setStatus("cancelled"),n.end(r),mt&&Re.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(n,void 0,2)));const{start_timestamp:i,timestamp:a}=kr(n),s=i&&i<r,o=(this._finalTimeout+this._idleTimeout)/1e3,u=a&&i&&a-i<o;if(mt){const l=JSON.stringify(n,void 0,2);s?u||Re.log("[Tracing] discarding Span since it finished after Transaction final timeout",l):Re.log("[Tracing] discarding Span since it happened after Transaction was finished",l)}return s&&u}),mt&&Re.log("[Tracing] flushing IdleTransaction")}else mt&&Re.log("[Tracing] No active IdleTransaction");if(this._onScope){const n=this._idleHub.getScope();n.getTransaction()===this&&n.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const r=i=>{this._finished||this._pushActivity(i)},n=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new x2(r,n,this.spanContext().spanId,t),mt&&Re.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=as[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(mt&&Re.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=as[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),mt&&Re.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,mt&&Re.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(mt&&Re.log(`[Tracing] popActivity ${t}`),delete this.activities[t],mt&&Re.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const r=Wa();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=as[5],this.end(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(mt&&Re.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=as[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){mt&&Re.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function BM(e,t,r){if(!no(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(gs,Number(e.sampled)),e;let n;return typeof t.tracesSampler=="function"?(n=t.tracesSampler(r),e.setAttribute(gs,Number(n))):r.parentSampled!==void 0?n=r.parentSampled:typeof t.tracesSampleRate<"u"?(n=t.tracesSampleRate,e.setAttribute(gs,Number(n))):(n=1,e.setAttribute(gs,n)),UM(n)?n?(e.sampled=Math.random()<n,e.sampled?(mt&&Re.log(`[Tracing] starting ${e.op} transaction - ${kr(e).description}`),e):(mt&&Re.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),e)):(mt&&Re.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(mt&&Re.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function UM(e){return FC(e)||!(typeof e=="number"||typeof e=="boolean")?(mt&&Re.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(mt&&Re.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function W2(){const t=this.getScope().getSpan();return t?{"sentry-trace":Wd(t)}:{}}function Y2(e,t){const r=this.getClient(),n=r&&r.getOptions()||{},i=n.instrumenter||"sentry",a=e.instrumenter||"sentry";i!==a&&(mt&&Re.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter.
|
|
24
|
+
The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let s=new kM(e,this);return s=BM(s,n,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),s.isRecording()&&s.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",s),s}function C0(e,t,r,n,i,a,s,o=!1){const u=e.getClient(),l=u&&u.getOptions()||{};let c=new z2(t,e,r,n,s,i,o);return c=BM(c,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...a}),c.isRecording()&&c.initSpanRecorder(l._experiments&&l._experiments.maxSpans),u&&u.emit&&u.emit("startTransaction",c),c}function K2(){const e=Bu();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Y2),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=W2),$2())}function X2(e,t,r){const n=Fa();n&&n.setMeasurement(e,t,r)}function J2(e,t){const r={sent_at:new Date().toISOString()};t&&(r.dsn=Va(t));const n=e.map(Q2);return Ya(r,n)}function Q2(e){return[{type:"span"},e]}const jt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Je=ot;function Z2(){Je.document?Je.document.addEventListener("visibilitychange",()=>{const e=Fa();if(Je.document.hidden&&e){const t="cancelled",{op:r,status:n}=kr(e);jt&&Re.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${r}`),n||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):jt&&Re.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Uu=(e,t,r)=>{let n,i;return a=>{t.value>=0&&(a||r)&&(i=t.value-(n||0),(i||n===void 0)&&(n=t.value,t.delta=i,e(t)))}},eU=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,tU=()=>{const e=Je.performance.timing,t=Je.performance.navigation.type,r={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const n in e)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(e[n]-e.navigationStart,0));return r},Xd=()=>Je.__WEB_VITALS_POLYFILL__?Je.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||tU()):Je.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],yv=()=>{const e=Xd();return e&&e.activationStart||0},Fu=(e,t)=>{const r=Xd();let n="navigate";return r&&(Je.document&&Je.document.prerendering||yv()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:eU(),navigationType:n}},io=(e,t,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(i=>{t(i.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch{}},Hu=(e,t)=>{const r=n=>{(n.type==="pagehide"||Je.document.visibilityState==="hidden")&&(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};Je.document&&(addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0))},rU=(e,t={})=>{const r=Fu("CLS",0);let n,i=0,a=[];const s=u=>{u.forEach(l=>{if(!l.hadRecentInput){const c=a[0],d=a[a.length-1];i&&a.length!==0&&l.startTime-d.startTime<1e3&&l.startTime-c.startTime<5e3?(i+=l.value,a.push(l)):(i=l.value,a=[l]),i>r.value&&(r.value=i,r.entries=a,n&&n())}})},o=io("layout-shift",s);if(o){n=Uu(e,r,t.reportAllChanges);const u=()=>{s(o.takeRecords()),n(!0)};return Hu(u),u}};let Cd=-1;const nU=()=>{Je.document&&Je.document.visibilityState&&(Cd=Je.document.visibilityState==="hidden"&&!Je.document.prerendering?0:1/0)},iU=()=>{Hu(({timeStamp:e})=>{Cd=e},!0)},gv=()=>(Cd<0&&(nU(),iU()),{get firstHiddenTime(){return Cd}}),aU=e=>{const t=gv(),r=Fu("FID");let n;const i=o=>{o.startTime<t.firstHiddenTime&&(r.value=o.processingStart-o.startTime,r.entries.push(o),n(!0))},a=o=>{o.forEach(i)},s=io("first-input",a);n=Uu(e,r),s&&Hu(()=>{a(s.takeRecords()),s.disconnect()},!0)};let FM=0,Gf=1/0,Qc=0;const sU=e=>{e.forEach(t=>{t.interactionId&&(Gf=Math.min(Gf,t.interactionId),Qc=Math.max(Qc,t.interactionId),FM=Qc?(Qc-Gf)/7+1:0)})};let yE;const oU=()=>yE?FM:performance.interactionCount||0,uU=()=>{"interactionCount"in performance||yE||(yE=io("event",sU,{type:"event",buffered:!0,durationThreshold:0}))},HM=()=>oU(),M0=10,si=[],xf={},j0=e=>{const t=si[si.length-1],r=xf[e.interactionId];if(r||si.length<M0||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{const n={id:e.interactionId,latency:e.duration,entries:[e]};xf[n.id]=n,si.push(n)}si.sort((n,i)=>i.latency-n.latency),si.splice(M0).forEach(n=>{delete xf[n.id]})}},cU=()=>{const e=Math.min(si.length-1,Math.floor(HM()/50));return si[e]},lU=(e,t)=>{t=t||{},uU();const r=Fu("INP");let n;const i=s=>{s.forEach(u=>{u.interactionId&&j0(u),u.entryType==="first-input"&&!si.some(c=>c.entries.some(d=>u.duration===d.duration&&u.startTime===d.startTime))&&j0(u)});const o=cU();o&&o.latency!==r.value&&(r.value=o.latency,r.entries=o.entries,n())},a=io("event",i,{durationThreshold:t.durationThreshold||40});n=Uu(e,r,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Hu(()=>{i(a.takeRecords()),r.value<0&&HM()>0&&(r.value=0,r.entries=[]),n(!0)}))},D0={},dU=e=>{const t=gv(),r=Fu("LCP");let n;const i=s=>{const o=s[s.length-1];if(o){const u=Math.max(o.startTime-yv(),0);u<t.firstHiddenTime&&(r.value=u,r.entries=[o],n())}},a=io("largest-contentful-paint",i);if(a){n=Uu(e,r);const s=()=>{D0[r.id]||(i(a.takeRecords()),a.disconnect(),D0[r.id]=!0,n(!0))};return["keydown","click"].forEach(o=>{Je.document&&addEventListener(o,s,{once:!0,capture:!0})}),Hu(s,!0),s}},gE=e=>{Je.document&&(Je.document.prerendering?addEventListener("prerenderingchange",()=>gE(e),!0):Je.document.readyState!=="complete"?addEventListener("load",()=>gE(e),!0):setTimeout(e,0))},fU=(e,t)=>{t=t||{};const r=Fu("TTFB"),n=Uu(e,r,t.reportAllChanges);gE(()=>{const i=Xd();if(i){if(r.value=Math.max(i.responseStart-yv(),0),r.value<0||r.value>performance.now())return;r.entries=[i],n(!0)}})},du={},Md={};let VM,GM,xM,zM,WM;function pU(e,t=!1){return Vu("cls",e,_U,VM,t)}function mU(e,t=!1){return Vu("lcp",e,vU,xM,t)}function hU(e){return Vu("ttfb",e,bU,zM)}function yU(e){return Vu("fid",e,EU,GM)}function gU(e){return Vu("inp",e,SU,WM)}function Su(e,t){return YM(e,t),Md[e]||(TU(e),Md[e]=!0),KM(e,t)}function ao(e,t){const r=du[e];if(!(!r||!r.length))for(const n of r)try{n(t)}catch(i){jt&&Re.error(`Error while triggering instrumentation handler.
|
|
25
|
+
Type: ${e}
|
|
26
|
+
Name: ${li(n)}
|
|
27
|
+
Error:`,i)}}function _U(){return rU(e=>{ao("cls",{metric:e}),VM=e},{reportAllChanges:!0})}function EU(){return aU(e=>{ao("fid",{metric:e}),GM=e})}function vU(){return dU(e=>{ao("lcp",{metric:e}),xM=e})}function bU(){return fU(e=>{ao("ttfb",{metric:e}),zM=e})}function SU(){return lU(e=>{ao("inp",{metric:e}),WM=e})}function Vu(e,t,r,n,i=!1){YM(e,t);let a;return Md[e]||(a=r(),Md[e]=!0),n&&t({metric:n}),KM(e,t,i?a:void 0)}function TU(e){const t={};e==="event"&&(t.durationThreshold=0),io(e,r=>{ao(e,{entries:r})},t)}function YM(e,t){du[e]=du[e]||[],du[e].push(t)}function KM(e,t,r){return()=>{r&&r();const n=du[e];if(!n)return;const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}function zf(e){return typeof e=="number"&&isFinite(e)}function Vs(e,{startTimestamp:t,...r}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...r})}const IU=2147483647;function er(e){return e/1e3}function _v(){return Je&&Je.addEventListener&&Je.performance}let L0=0,Yt={},Mn,fu;function wU(){const e=_v();if(e&&Zr){e.mark&&Je.performance.mark("sentry-tracing-init");const t=CU(),r=PU(),n=NU(),i=MU();return()=>{t(),r(),n(),i()}}return()=>{}}function RU(){Su("longtask",({entries:e})=>{for(const t of e){const r=Fa();if(!r)return;const n=er(Zr+t.startTime),i=er(t.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}})}function AU(){Su("event",({entries:e})=>{for(const t of e){const r=Fa();if(!r)return;if(t.name==="click"){const n=er(Zr+t.startTime),i=er(t.duration),a={description:Us(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i},s=VC(t.target);s&&(a.attributes={"ui.component_name":s}),r.startChild(a)}}})}function OU(e,t){if(_v()&&Zr){const n=jU(e,t);return()=>{n()}}return()=>{}}function PU(){return pU(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(jt&&Re.log("[Measurements] Adding CLS"),Yt.cls={value:e.value,unit:""},fu=t)},!0)}function NU(){return mU(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(jt&&Re.log("[Measurements] Adding LCP"),Yt.lcp={value:e.value,unit:"millisecond"},Mn=t)},!0)}function CU(){return yU(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const r=er(Zr),n=er(t.startTime);jt&&Re.log("[Measurements] Adding FID"),Yt.fid={value:e.value,unit:"millisecond"},Yt["mark.fid"]={value:r+n,unit:"second"}})}function MU(){return hU(({metric:e})=>{e.entries[e.entries.length-1]&&(jt&&Re.log("[Measurements] Adding TTFB"),Yt.ttfb={value:e.value,unit:"millisecond"})})}const $0={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function jU(e,t){return gU(({metric:r})=>{if(r.value===void 0)return;const n=r.entries.find(w=>w.duration===r.value&&$0[w.name]!==void 0),i=eo();if(!n||!i)return;const a=$0[n.name],s=i.getOptions(),o=er(Zr+n.startTime),u=er(r.value),l=n.interactionId!==void 0?e[n.interactionId]:void 0;if(l===void 0)return;const{routeName:c,parentContext:d,activeTransaction:f,user:p,replayId:y}=l,g=p!==void 0?p.email||p.id||p.ip_address:void 0,T=f!==void 0?f.getProfileId():void 0,P=new Kd({startTimestamp:o,endTimestamp:o+u,op:`ui.interaction.${a}`,name:Us(n.target),attributes:{release:s.release,environment:s.environment,transaction:c,...g!==void 0&&g!==""?{user:g}:{},...T!==void 0?{profile_id:T}:{},...y!==void 0?{replay_id:y}:{}},exclusiveTime:r.value,measurements:{inp:{value:r.value,unit:"millisecond"}}}),m=HU(d,s,t);if(m&&Math.random()<m){const w=P?J2([P],i.getDsn()):void 0,I=i&&i.getTransport();I&&w&&I.send(w).then(null,h=>{jt&&Re.error("Error while sending interaction:",h)});return}})}function DU(e){const t=_v();if(!t||!Je.performance.getEntries||!Zr)return;jt&&Re.log("[Tracing] Adding & adjusting spans using Performance API");const r=er(Zr),n=t.getEntries(),{op:i,start_timestamp:a}=kr(e);if(n.slice(L0).forEach(s=>{const o=er(s.startTime),u=er(s.duration);if(!(e.op==="navigation"&&a&&r+o<a))switch(s.entryType){case"navigation":{$U(e,s,r);break}case"mark":case"paint":case"measure":{LU(e,s,o,u,r);const l=gv(),c=s.startTime<l.firstHiddenTime;s.name==="first-paint"&&c&&(jt&&Re.log("[Measurements] Adding FP"),Yt.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&c&&(jt&&Re.log("[Measurements] Adding FCP"),Yt.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{kU(e,s,s.name,o,u,r);break}}}),L0=Math.max(n.length-1,0),BU(e),i==="pageload"){FU(Yt),["fcp","fp","lcp"].forEach(o=>{if(!Yt[o]||!a||r>=a)return;const u=Yt[o].value,l=r+er(u),c=Math.abs((l-a)*1e3),d=c-u;jt&&Re.log(`[Measurements] Normalized ${o} from ${u} to ${c} (${d})`),Yt[o].value=c});const s=Yt["mark.fid"];s&&Yt.fid&&(Vs(e,{description:"first input delay",endTimestamp:s.value+er(Yt.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:s.value}),delete Yt["mark.fid"]),"fcp"in Yt||delete Yt.cls,Object.keys(Yt).forEach(o=>{X2(o,Yt[o].value,Yt[o].unit)}),UU(e)}Mn=void 0,fu=void 0,Yt={}}function LU(e,t,r,n,i){const a=i+r,s=a+n;return Vs(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a}),a}function $U(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Zc(e,t,n,r)}),Zc(e,t,"secureConnection",r,"TLS/SSL","connectEnd"),Zc(e,t,"fetch",r,"cache","domainLookupStart"),Zc(e,t,"domainLookup",r,"DNS"),qU(e,t,r)}function Zc(e,t,r,n,i,a){const s=a?t[a]:t[`${r}End`],o=t[`${r}Start`];!o||!s||Vs(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||r,startTimestamp:n+er(o),endTimestamp:n+er(s)})}function qU(e,t,r){t.responseEnd&&(Vs(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+er(t.requestStart),endTimestamp:r+er(t.responseEnd)}),Vs(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+er(t.responseStart),endTimestamp:r+er(t.responseEnd)}))}function kU(e,t,r,n,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=La(r),o={};Wf(o,t,"transferSize","http.response_transfer_size"),Wf(o,t,"encodedBodySize","http.response_content_length"),Wf(o,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(o["url.scheme"]=s.protocol.split(":").pop()),s.host&&(o["server.address"]=s.host),o["url.same_origin"]=r.includes(Je.location.origin);const u=a+n,l=u+i;Vs(e,{description:r.replace(Je.location.origin,""),endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:u,data:o})}function BU(e){const t=Je.navigator;if(!t)return;const r=t.connection;r&&(r.effectiveType&&e.setTag("effectiveConnectionType",r.effectiveType),r.type&&e.setTag("connectionType",r.type),zf(r.rtt)&&(Yt["connection.rtt"]={value:r.rtt,unit:"millisecond"})),zf(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),zf(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function UU(e){Mn&&(jt&&Re.log("[Measurements] Adding LCP Data"),Mn.element&&e.setTag("lcp.element",Us(Mn.element)),Mn.id&&e.setTag("lcp.id",Mn.id),Mn.url&&e.setTag("lcp.url",Mn.url.trim().slice(0,200)),e.setTag("lcp.size",Mn.size)),fu&&fu.sources&&(jt&&Re.log("[Measurements] Adding CLS Data"),fu.sources.forEach((t,r)=>e.setTag(`cls.source.${r+1}`,Us(t.node))))}function Wf(e,t,r,n){const i=t[r];i!=null&&i<IU&&(e[n]=i)}function FU(e){const t=Xd();if(!t)return;const{responseStart:r,requestStart:n}=t;n<=r&&(jt&&Re.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}function HU(e,t,r){if(!no(t))return!1;let n;return e!==void 0&&typeof t.tracesSampler=="function"?n=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:Je.location}):e!==void 0&&e.sampled!==void 0?n=e.sampled:typeof t.tracesSampleRate<"u"?n=t.tracesSampleRate:n=1,UM(n)?n===!0?r:n===!1?0:n*r:(jt&&Re.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function VU(e,t,r,n,i="auto.http.browser"){if(!no()||!e.fetchData)return;const a=t(e.fetchData.url);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const y=n[p];y&&(zU(y,e),delete n[p]);return}const s=to(),o=eo(),{method:u,url:l}=e.fetchData,c=xU(l),d=c?La(c).host:void 0,f=a?DM({name:`${u} ${l}`,onlyIfParent:!0,attributes:{url:l,type:"fetch","http.method":u,"http.url":c,"server.address":d,[_s]:i},op:"http.client"}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,n[f.spanContext().spanId]=f),r(e.fetchData.url)&&o){const p=e.args[0];e.args[1]=e.args[1]||{};const y=e.args[1];y.headers=GU(p,o,s,y,f)}return f}function GU(e,t,r,n,i){const a=i||r.getSpan(),s=mv(),{traceId:o,spanId:u,sampled:l,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},d=a?Wd(a):uv(o,u,l),f=aM(c||(a?Hs(a):pv(o,t,r))),p=n.headers||(typeof Request<"u"&&ci(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&ci(p,Headers)){const y=new Headers(p);return y.append("sentry-trace",d),f&&y.append(cE,f),y}else if(Array.isArray(p)){const y=[...p,["sentry-trace",d]];return f&&y.push([cE,f]),y}else{const y="baggage"in p?p.baggage:void 0,g=[];return Array.isArray(y)?g.push(...y):y&&g.push(y),f&&g.push(f),{...p,"sentry-trace":d,baggage:g.length>0?g.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function xU(e){try{return new URL(e).href}catch{return}}function zU(e,t){if(t.response){hv(e,t.response.status);const r=t.response&&t.response.headers&&t.response.headers.get("content-length");if(r){const n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus("internal_error");e.end()}const _E=["localhost",/^\/(?!\/)/],EE={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:_E,tracePropagationTargets:_E};function WU(e){const{traceFetch:t,traceXHR:r,tracePropagationTargets:n,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s}={traceFetch:EE.traceFetch,traceXHR:EE.traceXHR,...e},o=typeof a=="function"?a:c=>!0,u=c=>JU(c,n||i),l={};t&&QC(c=>{const d=VU(c,o,u,l);if(d){const f=XM(c.fetchData.url),p=f?La(f).host:void 0;d.setAttributes({"http.url":f,"server.address":p})}s&&d&&q0(d)}),r&&tM(c=>{const d=QU(c,o,u,l);s&&d&&q0(d)})}function YU(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function q0(e){const{url:t}=kr(e).data||{};if(!t||typeof t!="string")return;const r=Su("resource",({entries:n})=>{n.forEach(i=>{YU(i)&&i.name.endsWith(t)&&(XU(i).forEach(s=>e.setAttribute(...s)),setTimeout(r))})})}function KU(e){let t="unknown",r="unknown",n="";for(const i of e){if(i==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(i))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=i}return n===e&&(t=n),{name:t,version:r}}function Pn(e=0){return((Zr||performance.timeOrigin)+e)/1e3}function XU(e){const{name:t,version:r}=KU(e.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",t]),Zr?[...n,["http.request.redirect_start",Pn(e.redirectStart)],["http.request.fetch_start",Pn(e.fetchStart)],["http.request.domain_lookup_start",Pn(e.domainLookupStart)],["http.request.domain_lookup_end",Pn(e.domainLookupEnd)],["http.request.connect_start",Pn(e.connectStart)],["http.request.secure_connection_start",Pn(e.secureConnectionStart)],["http.request.connection_end",Pn(e.connectEnd)],["http.request.request_start",Pn(e.requestStart)],["http.request.response_start",Pn(e.responseStart)],["http.request.response_end",Pn(e.responseEnd)]]:n}function JU(e,t){return $u(e,t||_E)}function QU(e,t,r,n){const i=e.xhr,a=i&&i[ys];if(!no()||!i||i.__sentry_own_request__||!a)return;const s=t(a.url);if(e.endTimestamp&&s){const p=i.__sentry_xhr_span_id__;if(!p)return;const y=n[p];y&&a.status_code!==void 0&&(hv(y,a.status_code),y.end(),delete n[p]);return}const o=to(),u=mv(),l=XM(a.url),c=l?La(l).host:void 0,d=s?DM({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":a.method,"http.url":l,url:a.url,"server.address":c,[_s]:"auto.http.browser"},op:"http.client"}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,n[i.__sentry_xhr_span_id__]=d);const f=eo();if(i.setRequestHeader&&r(a.url)&&f){const{traceId:p,spanId:y,sampled:g,dsc:T}={...u.getPropagationContext(),...o.getPropagationContext()},P=d?Wd(d):uv(p,y,g),m=aM(T||(d?Hs(d):pv(p,f,o)));ZU(i,P,m)}return d}function ZU(e,t,r){try{e.setRequestHeader("sentry-trace",t),r&&e.setRequestHeader(cE,r)}catch{}}function XM(e){try{return new URL(e,Je.location.origin).href}catch{return}}function eF(e,t=!0,r=!0){if(!Je||!Je.location){jt&&Re.warn("Could not initialize routing instrumentation due to invalid location");return}let n=Je.location.href,i;t&&(i=e({name:Je.location.pathname,startTimestamp:Zr?Zr/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),r&&sv(({to:a,from:s})=>{if(s===void 0&&n&&n.indexOf(a)!==-1){n=void 0;return}s!==a&&(n=void 0,i&&(jt&&Re.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=e({name:Je.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const tF="BrowserTracing",rF={..._d,markBackgroundTransactions:!0,routingInstrumentation:eF,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...EE},k0=10;class nF{constructor(t){this.name=tF,this._hasSetTracePropagationTargets=!1,K2(),jt&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...rF,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=wU(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&OU(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&RU(),this.options._experiments.enableInteractions&&AU(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,r){this._getCurrentHub=r;const i=r().getClient(),a=i&&i.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:o,startTransactionOnPageLoad:u,markBackgroundTransactions:l,traceFetch:c,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:y}=this.options,g=a&&a.tracePropagationTargets,T=g||this.options.tracePropagationTargets;jt&&this._hasSetTracePropagationTargets&&g&&Re.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),s(P=>{const m=this._createRouteTransaction(P);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(m,P,r),m},u,o),l&&Z2(),y.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),WU({traceFetch:c,traceXHR:d,tracePropagationTargets:T,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub){jt&&Re.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const r=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:i,finalTimeout:a,heartbeatInterval:s}=this.options,o=t.op==="pageload";let u;if(o){const p=o?B0("sentry-trace"):"",y=o?B0("baggage"):void 0,{traceId:g,dsc:T,parentSpanId:P,sampled:m}=Xk(p,y);u={traceId:g,parentSpanId:P,parentSampled:m,...t,metadata:{...t.metadata,dynamicSamplingContext:T},trimEnd:!0}}else u={trimEnd:!0,...t};const l=typeof n=="function"?n(u):u,c=l===void 0?{...u,sampled:!1}:l;c.metadata=c.name!==u.name?{...c.metadata,source:"custom"}:c.metadata,this._latestRoute.name=c.name,this._latestRoute.context=c,c.sampled===!1&&jt&&Re.log(`[Tracing] Will not send ${c.op} transaction because of beforeNavigate.`),jt&&Re.log(`[Tracing] Starting ${c.op} transaction on scope`);const{location:d}=Je,f=C0(r,c,i,a,!0,{location:d},s,o);return o&&Je.document&&(Je.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(Je.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(Je.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(p=>{this._collectWebVitals(),DU(p)}),f}_registerInteractionListener(){let t;const r=()=>{const{idleTimeout:n,finalTimeout:i,heartbeatInterval:a}=this.options,s="ui.action.click",o=Fa();if(o&&o.op&&["navigation","pageload"].includes(o.op)){jt&&Re.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){jt&&Re.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){jt&&Re.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}const u=this._getCurrentHub(),{location:l}=Je,c={name:this._latestRoute.name,op:s,trimEnd:!0,data:{[Ss]:this._latestRoute.context?iF(this._latestRoute.context):"url"}};t=C0(u,c,n,i,!0,{location:l},a)};["click"].forEach(n=>{Je.document&&addEventListener(n,r,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:r})=>{const n=eo(),i=n!==void 0&&n.getIntegrationByName!==void 0?n.getIntegrationByName("Replay"):void 0,a=i!==void 0?i.getReplayId():void 0,s=Fa(),o=to(),u=o!==void 0?o.getUser():void 0;r.forEach(l=>{if(aF(l)){const c=l.interactionId;if(c===void 0)return;const d=this._interactionIdToRouteNameMapping[c],f=l.duration,p=l.startTime,y=Object.keys(this._interactionIdToRouteNameMapping),g=y.length>0?y.reduce((T,P)=>this._interactionIdToRouteNameMapping[T].duration<this._interactionIdToRouteNameMapping[P].duration?T:P):void 0;if(l.entryType==="first-input"&&y.map(P=>this._interactionIdToRouteNameMapping[P]).some(P=>P.duration===f&&P.startTime===p)||!c)return;if(d)d.duration=Math.max(d.duration,f);else if(y.length<k0||g===void 0||f>this._interactionIdToRouteNameMapping[g].duration){const T=this._latestRoute.name,P=this._latestRoute.context;T&&P&&(g&&Object.keys(this._interactionIdToRouteNameMapping).length>=k0&&delete this._interactionIdToRouteNameMapping[g],this._interactionIdToRouteNameMapping[c]={routeName:T,duration:f,parentContext:P,user:u,activeTransaction:s,replayId:a,startTime:p})}}})};Su("event",t),Su("first-input",t)}}function B0(e){const t=ik(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function iF(e){const t=e.attributes&&e.attributes[Ss],r=e.data&&e.data[Ss],n=e.metadata&&e.metadata.source;return t||r||n}function aF(e){return"duration"in e}const ft=ot;let vE=0;function JM(){return vE>0}function sF(){vE++,setTimeout(()=>{vE--})}function Gs(e,t={},r){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(iv(e))return e}catch{return e}const n=function(){const i=Array.prototype.slice.call(arguments);try{const a=i.map(s=>Gs(s,t));return e.apply(this,a)}catch(a){throw sF(),lM(s=>{s.addEventProcessor(o=>(t.mechanism&&(rE(o,void 0),Eu(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),lv(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}zC(n,e),ka(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const Qr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function QM(e,t){const r=Ev(e,t),n={type:t&&t.name,value:lF(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function oF(e,t,r,n){const i=Nr(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Fd(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:pF(t,{isUnhandledRejection:n})}]},extra:{__serialized__:rM(t,a)}};if(r){const o=Ev(e,r);o.length&&(s.exception.values[0].stacktrace={frames:o})}return s}function Yf(e,t){return{exception:{values:[QM(e,t)]}}}function Ev(e,t){const r=t.stacktrace||t.stack||"",n=cF(t);try{return e(r,n)}catch{}return[]}const uF=/Minified React error #\d+;/i;function cF(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(uF.test(e.message))return 1}return 0}function lF(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function dF(e,t,r,n){const i=r&&r.syntheticException||void 0,a=vv(e,t,i,n);return Eu(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id),Fs(a)}function fF(e,t,r="info",n,i){const a=n&&n.syntheticException||void 0,s=bE(e,t,a,i);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),Fs(s)}function vv(e,t,r,n,i){let a;if(ev(t)&&t.error)return Yf(e,t.error);if(Qb(t)||Yq(t)){const s=t;if("stack"in t)a=Yf(e,t);else{const o=s.name||(Qb(s)?"DOMError":"DOMException"),u=s.message?`${o}: ${s.message}`:o;a=bE(e,u,r,n),rE(a,u)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}return ZE(t)?Yf(e,t):qa(t)||Fd(t)?(a=oF(e,t,r,i),Eu(a,{synthetic:!0}),a):(a=bE(e,t,r,n),rE(a,`${t}`),Eu(a,{synthetic:!0}),a)}function bE(e,t,r,n){const i={};if(n&&r){const a=Ev(e,r);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}if(tv(t)){const{__sentry_template_string__:a,__sentry_template_values__:s}=t;return i.logentry={message:a,params:s},i}return i.message=t,i}function pF(e,{isUnhandledRejection:t}){const r=fk(e),n=t?"promise rejection":"exception";return ev(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Fd(e)?`Event \`${mF(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function mF(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function hF(e,{metadata:t,tunnel:r,dsn:n}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:Va(n)}},a=yF(e);return Ya(i,[a])}function yF(e){return[{type:"user_report"},e]}class gF extends ZB{constructor(t){const r=ft.SENTRY_SDK_SOURCE||Dk();IM(t,"browser",["browser"],r),super(t),t.sendClientReports&&ft.document&&ft.document.addEventListener("visibilitychange",()=>{ft.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return dF(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return fF(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Qr&&Re.warn("SDK not enabled, will not capture user feedback.");return}const r=hF(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){Qr&&Re.log("No outcomes to send");return}if(!this._dsn){Qr&&Re.log("No dsn provided, will not send outcomes");return}Qr&&Re.log("Sending outcomes:",t);const r=nB(t,this._options.tunnel&&Va(this._dsn));this._sendEnvelope(r)}}let Uo;function _F(){if(Uo)return Uo;if(sE(ft.fetch))return Uo=ft.fetch.bind(ft);const e=ft.document;let t=ft.fetch;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r);const n=r.contentWindow;n&&n.fetch&&(t=n.fetch),e.head.removeChild(r)}catch(r){Qr&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return Uo=t.bind(ft)}function EF(){Uo=void 0}function vF(e,t=_F()){let r=0,n=0;function i(a){const s=a.body.length;r+=s,n++;const o={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{return t(e.url,o).then(u=>(r-=s,n--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return EF(),r-=s,n--,ov(u)}}return TM(e,i)}const bF=4;function SF(e){function t(r){return new qr((n,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===bF&&n({statusCode:a.status,headers:{"x-sentry-rate-limits":a.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":a.getResponseHeader("Retry-After")}})},a.open("POST",e.url);for(const s in e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&a.setRequestHeader(s,e.headers[s]);a.send(r.body)})}return TM(e,t)}const Jd="?",TF=30,IF=40,wF=50;function bv(e,t,r,n){const i={filename:e,function:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}const RF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,AF=/\((\S*)(?::(\d+))(?::(\d+))\)/,OF=e=>{const t=RF.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const a=AF.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}const[n,i]=ZM(t[1]||Jd,t[2]);return bv(i,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},PF=[TF,OF],NF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,CF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,MF=e=>{const t=NF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=CF.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let n=t[3],i=t[1]||Jd;return[i,n]=ZM(i,n),bv(n,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},jF=[wF,MF],DF=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,LF=e=>{const t=DF.exec(e);return t?bv(t[2],t[1]||Jd,+t[3],t[4]?+t[4]:void 0):void 0},$F=[IF,LF],qF=[PF,jF,$F],kF=KC(...qF),ZM=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:Jd,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},el=1024,ej="Breadcrumbs",BF=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:ej,setupOnce(){},setup(r){t.console&&yk(HF(r)),t.dom&&Ek(FF(r,t.dom)),t.xhr&&tM(VF(r)),t.fetch&&QC(GF(r)),t.history&&sv(xF(r)),t.sentry&&r.on&&r.on("beforeSendEvent",UF(r))}}}),tj=BF;Li(ej,tj);function UF(e){return function(r){Nr()===e&&Ua({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Si(r)},{event:r})}}function FF(e,t){return function(n){if(Nr()!==e)return;let i,a,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>el&&(Qr&&Re.warn(`\`dom.maxStringLength\` cannot exceed ${el}, but a value of ${o} was configured. Sentry will use ${el} instead.`),o=el),typeof s=="string"&&(s=[s]);try{const l=n.event,c=zF(l)?l.target:l;i=Us(c,{keyAttrs:s,maxStringLength:o}),a=VC(c)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${n.name}`,message:i};a&&(u.data={"ui.component_name":a}),Ua(u,{event:n.event,name:n.name,global:n.global})}}function HF(e){return function(r){if(Nr()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:Hk(r.level),message:Zb(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Zb(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Ua(n,{input:r.args,level:r.level})}}function VF(e){return function(r){if(Nr()!==e)return;const{startTimestamp:n,endTimestamp:i}=r,a=r.xhr[ys];if(!n||!i||!a)return;const{method:s,url:o,status_code:u,body:l}=a,c={method:s,url:o,status_code:u},d={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:i};Ua({category:"xhr",data:c,type:"http"},d)}}function GF(e){return function(r){if(Nr()!==e)return;const{startTimestamp:n,endTimestamp:i}=r;if(i&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const a=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:i};Ua({category:"fetch",data:a,level:"error",type:"http"},s)}else{const a=r.response,s={...r.fetchData,status_code:a&&a.status},o={input:r.args,response:a,startTimestamp:n,endTimestamp:i};Ua({category:"fetch",data:s,type:"http"},o)}}}function xF(e){return function(r){if(Nr()!==e)return;let n=r.from,i=r.to;const a=La(ft.location.href);let s=n?La(n):void 0;const o=La(i);(!s||!s.path)&&(s=a),a.protocol===o.protocol&&a.host===o.host&&(i=o.relative),a.protocol===s.protocol&&a.host===s.host&&(n=s.relative),Ua({category:"navigation",data:{from:n,to:i}})}}function zF(e){return!!e&&!!e.target}const rj="Dedupe",WF=(()=>{let e;return{name:rj,setupOnce(){},processEvent(t){if(t.type)return t;try{if(YF(t,e))return Qr&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),nj=WF;Li(rj,nj);function YF(e,t){return t?!!(KF(e,t)||XF(e,t)):!1}function KF(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!aj(e,t)||!ij(e,t))}function XF(e,t){const r=U0(t),n=U0(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!aj(e,t)||!ij(e,t))}function ij(e,t){let r=F0(e),n=F0(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){const a=n[i],s=r[i];if(a.filename!==s.filename||a.lineno!==s.lineno||a.colno!==s.colno||a.function!==s.function)return!1}return!0}function aj(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function U0(e){return e.exception&&e.exception.values&&e.exception.values[0]}function F0(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const sj="GlobalHandlers",JF=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:sj,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(QF(r),H0("onerror")),t.onunhandledrejection&&(ZF(r),H0("onunhandledrejection"))}}}),oj=JF;Li(sj,oj);function QF(e){ZC(t=>{const{stackParser:r,attachStacktrace:n}=cj();if(Nr()!==e||JM())return;const{msg:i,url:a,line:s,column:o,error:u}=t,l=u===void 0&&Fn(i)?rH(i,a,s,o):uj(vv(r,u||i,void 0,n,!1),a,s,o);l.level="error",cM(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function ZF(e){eM(t=>{const{stackParser:r,attachStacktrace:n}=cj();if(Nr()!==e||JM())return;const i=eH(t),a=rv(i)?tH(i):vv(r,i,void 0,n,!0);a.level="error",cM(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function eH(e){if(rv(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function tH(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function rH(e,t,r,n){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=ev(e)?e.message:e,s="Error";const o=a.match(i);return o&&(s=o[1],a=o[2]),uj({exception:{values:[{type:s,value:a}]}},t,r,n)}function uj(e,t,r,n){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},u=o.frames=o.frames||[],l=isNaN(parseInt(n,10))?void 0:n,c=isNaN(parseInt(r,10))?void 0:r,d=Fn(t)&&t.length>0?t:nk();return u.length===0&&u.push({colno:l,filename:d,function:"?",in_app:!0,lineno:c}),e}function H0(e){Qr&&Re.log(`Global Handler attached: ${e}`)}function cj(){const e=Nr();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const lj="HttpContext",nH=(()=>({name:lj,setupOnce(){},preprocessEvent(e){if(!ft.navigator&&!ft.location&&!ft.document)return;const t=e.request&&e.request.url||ft.location&&ft.location.href,{referrer:r}=ft.document||{},{userAgent:n}=ft.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},a={...e.request,...t&&{url:t},headers:i};e.request=a}})),dj=nH;Li(lj,dj);const iH="cause",aH=5,fj="LinkedErrors",sH=((e={})=>{const t=e.limit||aH,r=e.key||iH;return{name:fj,setupOnce(){},preprocessEvent(n,i,a){const s=a.getOptions();Zq(QM,s.stackParser,s.maxValueLength,r,t,n,i)}}}),pj=sH;Li(fj,pj);const oH=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],mj="TryCatch",uH=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:mj,setupOnce(){t.setTimeout&&pr(ft,"setTimeout",V0),t.setInterval&&pr(ft,"setInterval",V0),t.requestAnimationFrame&&pr(ft,"requestAnimationFrame",cH),t.XMLHttpRequest&&"XMLHttpRequest"in ft&&pr(XMLHttpRequest.prototype,"send",lH);const r=t.eventTarget;r&&(Array.isArray(r)?r:oH).forEach(dH)}}}),hj=uH;Li(mj,hj);function V0(e){return function(...t){const r=t[0];return t[0]=Gs(r,{mechanism:{data:{function:li(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function cH(e){return function(t){return e.apply(this,[Gs(t,{mechanism:{data:{function:"requestAnimationFrame",handler:li(e)},handled:!1,type:"instrument"}})])}}function lH(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in r&&typeof r[i]=="function"&&pr(r,i,function(a){const s={mechanism:{data:{function:i,handler:li(a)},handled:!1,type:"instrument"}},o=iv(a);return o&&(s.mechanism.data.handler=li(o)),Gs(a,s)})}),e.apply(this,t)}}function dH(e){const t=ft,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(pr(r,"addEventListener",function(n){return function(i,a,s){try{typeof a.handleEvent=="function"&&(a.handleEvent=Gs(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:li(a),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,Gs(a,{mechanism:{data:{function:"addEventListener",handler:li(a),target:e},handled:!1,type:"instrument"}}),s])}}),pr(r,"removeEventListener",function(n){return function(i,a,s){const o=a;try{const u=o&&o.__sentry_wrapped__;u&&n.call(this,i,u,s)}catch{}return n.call(this,i,o,s)}}))}const fH=[RM(),OM(),hj(),tj(),oj(),pj(),nj(),dj()];function pH(e){return[...fH]}function mH(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=pH()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),ft.SENTRY_RELEASE&&ft.SENTRY_RELEASE.id&&(e.release=ft.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:mk(e.stackParser||kF),integrations:WB(e),transport:e.transport||(JC()?vF:SF)};r2(gF,t),e.autoSessionTracking&&hH()}const G0=(e={},t=gn())=>{if(!ft.document){Qr&&Re.error("Global document not defined in showReportDialog call");return}const{client:r,scope:n}=t.getStackTop(),i=e.dsn||r&&r.getDsn();if(!i){Qr&&Re.error("DSN not configured for showReportDialog call");return}n&&(e.user={...n.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const a=ft.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=xB(i,e),e.onLoad&&(a.onload=e.onLoad);const{onClose:s}=e;if(s){const u=l=>{if(l.data==="__sentry_reportdialog_closed__")try{s()}finally{ft.removeEventListener("message",u)}};ft.addEventListener("message",u)}const o=ft.document.head||ft.document.body;o?o.appendChild(a):Qr&&Re.error("Not injecting report dialog. No injection point found in HTML")};function hH(){if(typeof ft.document>"u"){Qr&&Re.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}h0({ignoreDuration:!0}),y0(),sv(({from:e,to:t})=>{e!==void 0&&e!==t&&(h0({ignoreDuration:!0}),y0())})}function yH(e){const t={...e};IM(t,"react"),mH(t)}var Kf={exports:{}},Et={};/** @license React v16.13.1
|
|
28
|
+
* react-is.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var x0;function gH(){if(x0)return Et;x0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function w(h){if(typeof h=="object"&&h!==null){var E=h.$$typeof;switch(E){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case y:case p:case s:return h;default:return E}}case r:return E}}}function I(h){return w(h)===l}return Et.AsyncMode=u,Et.ConcurrentMode=l,Et.ContextConsumer=o,Et.ContextProvider=s,Et.Element=t,Et.ForwardRef=c,Et.Fragment=n,Et.Lazy=y,Et.Memo=p,Et.Portal=r,Et.Profiler=a,Et.StrictMode=i,Et.Suspense=d,Et.isAsyncMode=function(h){return I(h)||w(h)===u},Et.isConcurrentMode=I,Et.isContextConsumer=function(h){return w(h)===o},Et.isContextProvider=function(h){return w(h)===s},Et.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},Et.isForwardRef=function(h){return w(h)===c},Et.isFragment=function(h){return w(h)===n},Et.isLazy=function(h){return w(h)===y},Et.isMemo=function(h){return w(h)===p},Et.isPortal=function(h){return w(h)===r},Et.isProfiler=function(h){return w(h)===a},Et.isStrictMode=function(h){return w(h)===i},Et.isSuspense=function(h){return w(h)===d},Et.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===f||typeof h=="object"&&h!==null&&(h.$$typeof===y||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===T||h.$$typeof===P||h.$$typeof===m||h.$$typeof===g)},Et.typeOf=w,Et}var z0;function _H(){return z0||(z0=1,Kf.exports=gH()),Kf.exports}var Xf,W0;function EH(){if(W0)return Xf;W0=1;var e=_H(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function s(y){return e.isMemo(y)?i:a[y.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function p(y,g,T){if(typeof g!="string"){if(f){var P=d(g);P&&P!==f&&p(y,P,T)}var m=u(g);l&&(m=m.concat(l(g)));for(var w=s(y),I=s(g),h=0;h<m.length;++h){var E=m[h];if(!r[E]&&!(T&&T[E])&&!(I&&I[E])&&!(w&&w[E])){var v=c(g,E);try{o(y,E,v)}catch{}}}}return y}return Xf=p,Xf}EH();const vH=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function bH(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Y0={componentStack:null,error:null,eventId:null};function SH(e,t){const r=new WeakMap;function n(i,a){if(!r.has(i)){if(i.cause)return r.set(i,!0),n(i.cause,a);i.cause=a}}n(e,t)}class jd extends Se.Component{constructor(t){super(t),jd.prototype.__init.call(this),this.state=Y0,this._openFallbackReportDialog=!0;const r=Nr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&G0({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;lM(o=>{if(bH(Se.version)&&ZE(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,SH(t,l)}n&&n(o,t,r);const u=lv(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&G0({...s,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&i(t,r,n)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(Y0)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let i;return typeof t=="function"?i=t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):i=t,Se.isValidElement(i)?i:(t&&vH&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const TH=Se.lazy(()=>ar(()=>import("./index-B-jeDoF7.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.Navbar})));function IH(e){return H.jsx(Se.Suspense,{fallback:H.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:H.jsx(TH,{...e})})}const wH={},K0=e=>{let t;const r=new Set,n=(c,d)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const p=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),r.forEach(y=>y(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(wH?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},l=t=e(n,i,u);return u},RH=e=>e?K0(e):K0;var Jf={exports:{}},Qf={},Zf={exports:{}},ep={};/**
|
|
35
|
+
* @license React
|
|
36
|
+
* use-sync-external-store-shim.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var X0;function AH(){if(X0)return ep;X0=1;var e=wC();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function o(d,f){var p=f(),y=n({inst:{value:p,getSnapshot:f}}),g=y[0].inst,T=y[1];return a(function(){g.value=p,g.getSnapshot=f,u(g)&&T({inst:g})},[d,p,f]),i(function(){return u(g)&&T({inst:g}),d(function(){u(g)&&T({inst:g})})},[d]),s(p),p}function u(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!r(d,p)}catch{return!0}}function l(d,f){return f()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return ep.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,ep}var J0;function OH(){return J0||(J0=1,Zf.exports=AH()),Zf.exports}/**
|
|
43
|
+
* @license React
|
|
44
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the MIT license found in the
|
|
49
|
+
* LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var Q0;function PH(){if(Q0)return Qf;Q0=1;var e=wC(),t=OH();function r(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,o=e.useMemo,u=e.useDebugValue;return Qf.useSyncExternalStoreWithSelector=function(l,c,d,f,p){var y=a(null);if(y.current===null){var g={hasValue:!1,value:null};y.current=g}else g=y.current;y=o(function(){function P(E){if(!m){if(m=!0,w=E,E=f(E),p!==void 0&&g.hasValue){var v=g.value;if(p(v,E))return I=v}return I=E}if(v=I,n(w,E))return v;var O=f(E);return p!==void 0&&p(v,O)?(w=E,v):(w=E,I=O)}var m=!1,w,I,h=d===void 0?null:d;return[function(){return P(c())},h===null?void 0:function(){return P(h())}]},[c,d,f,p]);var T=i(l,y[0],y[1]);return s(function(){g.hasValue=!0,g.value=T},[T]),u(T),T},Qf}var Z0;function NH(){return Z0||(Z0=1,Jf.exports=PH()),Jf.exports}var CH=NH();const MH=Ud(CH),yj={},{useDebugValue:jH}=RC,{useSyncExternalStoreWithSelector:DH}=MH;let eS=!1;const LH=e=>e;function $H(e,t=LH,r){(yj?"production":void 0)!=="production"&&r&&!eS&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),eS=!0);const n=DH(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return jH(n),n}const tS=e=>{(yj?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?RH(e):e,r=(n,i)=>$H(t,n,i);return Object.assign(r,t),r},so=e=>e?tS(e):tS;var nn={},Bi={},Ui={},tp={},an={},tl={exports:{}},rp={},Jn={},Fi={},np={},ip={},ap={},rS;function Tu(){return rS||(rS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(m){if(super(),!e.IDENTIFIER.test(m))throw new Error("CodeGen: name must be a valid identifier");this.str=m}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(m){super(),this._items=typeof m=="string"?[m]:m}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const m=this._items[0];return m===""||m==='""'}get str(){var m;return(m=this._str)!==null&&m!==void 0?m:this._str=this._items.reduce((w,I)=>`${w}${I}`,"")}get names(){var m;return(m=this._names)!==null&&m!==void 0?m:this._names=this._items.reduce((w,I)=>(I instanceof r&&(w[I.str]=(w[I.str]||0)+1),w),{})}}e._Code=n,e.nil=new n("");function i(P,...m){const w=[P[0]];let I=0;for(;I<m.length;)o(w,m[I]),w.push(P[++I]);return new n(w)}e._=i;const a=new n("+");function s(P,...m){const w=[p(P[0])];let I=0;for(;I<m.length;)w.push(a),o(w,m[I]),w.push(a,p(P[++I]));return u(w),new n(w)}e.str=s;function o(P,m){m instanceof n?P.push(...m._items):m instanceof r?P.push(m):P.push(d(m))}e.addCodeArg=o;function u(P){let m=1;for(;m<P.length-1;){if(P[m]===a){const w=l(P[m-1],P[m+1]);if(w!==void 0){P.splice(m-1,3,w);continue}P[m++]="+"}m++}}function l(P,m){if(m==='""')return P;if(P==='""')return m;if(typeof P=="string")return m instanceof r||P[P.length-1]!=='"'?void 0:typeof m!="string"?`${P.slice(0,-1)}${m}"`:m[0]==='"'?P.slice(0,-1)+m.slice(1):void 0;if(typeof m=="string"&&m[0]==='"'&&!(P instanceof r))return`"${P}${m.slice(1)}`}function c(P,m){return m.emptyStr()?P:P.emptyStr()?m:s`${P}${m}`}e.strConcat=c;function d(P){return typeof P=="number"||typeof P=="boolean"||P===null?P:p(Array.isArray(P)?P.join(","):P)}function f(P){return new n(p(P))}e.stringify=f;function p(P){return JSON.stringify(P).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=p;function y(P){return typeof P=="string"&&e.IDENTIFIER.test(P)?new n(`.${P}`):i`[${P}]`}e.getProperty=y;function g(P){if(typeof P=="string"&&e.IDENTIFIER.test(P))return new n(`${P}`);throw new Error(`CodeGen: invalid export name: ${P}, use explicit $id name mapping`)}e.getEsmExportName=g;function T(P){return new n(P.toString())}e.regexpCode=T})(ap)),ap}var sp={},nS;function iS(){return nS||(nS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Tu();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=i;class a extends t.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:d}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(c)}[${d}]`}}e.ValueScopeName=a;const s=(0,t._)`\n`;class o extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?s:t.nil}}get(){return this._scope}name(l){return new a(l,this._newName(l))}value(l,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(l),{prefix:p}=f,y=(d=c.key)!==null&&d!==void 0?d:c.ref;let g=this._values[p];if(g){const m=g.get(y);if(m)return m}else g=this._values[p]=new Map;g.set(y,f);const T=this._scope[p]||(this._scope[p]=[]),P=T.length;return T[P]=c.ref,f.setValue(c,{property:p,itemIndex:P}),f}getValue(l,c){const d=this._values[l];if(d)return d.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${l}${d.scopePath}`})}scopeCode(l=this._values,c,d){return this._reduceValues(l,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},c,d)}_reduceValues(l,c,d={},f){let p=t.nil;for(const y in l){const g=l[y];if(!g)continue;const T=d[y]=d[y]||new Map;g.forEach(P=>{if(T.has(P))return;T.set(P,n.Started);let m=c(P);if(m){const w=this.opts.es5?e.varKinds.var:e.varKinds.const;p=(0,t._)`${p}${w} ${P} = ${m};${this.opts._n}`}else if(m=f==null?void 0:f(P))p=(0,t._)`${p}${m}${this.opts._n}`;else throw new r(P);T.set(P,n.Completed)})}return p}}e.ValueScope=o})(sp)),sp}var aS;function Ke(){return aS||(aS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Tu(),r=iS();var n=Tu();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=iS();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(N,L){return this}}class s extends a{constructor(N,L,ee){super(),this.varKind=N,this.name=L,this.rhs=ee}render({es5:N,_n:L}){const ee=N?r.varKinds.var:this.varKind,Ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${Ee};`+L}optimizeNames(N,L){if(N[this.name.str])return this.rhs&&(this.rhs=k(this.rhs,N,L)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(N,L,ee){super(),this.lhs=N,this.rhs=L,this.sideEffects=ee}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,L){if(!(this.lhs instanceof t.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,N,L),this}get names(){const N=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(N,this.rhs)}}class u extends o{constructor(N,L,ee,Ee){super(N,ee,Ee),this.op=L}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class l extends a{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class c extends a{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class d extends a{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class f extends a{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,L){return this.code=k(this.code,N,L),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends a{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((L,ee)=>L+ee.render(N),"")}optimizeNodes(){const{nodes:N}=this;let L=N.length;for(;L--;){const ee=N[L].optimizeNodes();Array.isArray(ee)?N.splice(L,1,...ee):ee?N[L]=ee:N.splice(L,1)}return N.length>0?this:void 0}optimizeNames(N,L){const{nodes:ee}=this;let Ee=ee.length;for(;Ee--;){const he=ee[Ee];he.optimizeNames(N,L)||(te(N,he.names),ee.splice(Ee,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce((N,L)=>V(N,L.names),{})}}class y extends p{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class g extends p{}class T extends y{}T.kind="else";class P extends y{constructor(N,L){super(L),this.condition=N}render(N){let L=`if(${this.condition})`+super.render(N);return this.else&&(L+="else "+this.else.render(N)),L}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let L=this.else;if(L){const ee=L.optimizeNodes();L=this.else=Array.isArray(ee)?new T(ee):ee}if(L)return N===!1?L instanceof P?L:L.nodes:this.nodes.length?this:new P(ie(N),L instanceof P?[L]:L.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,L){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames(N,L),!!(super.optimizeNames(N,L)||this.else))return this.condition=k(this.condition,N,L),this}get names(){const N=super.names;return U(N,this.condition),this.else&&V(N,this.else.names),N}}P.kind="if";class m extends y{}m.kind="for";class w extends m{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,L){if(super.optimizeNames(N,L))return this.iteration=k(this.iteration,N,L),this}get names(){return V(super.names,this.iteration.names)}}class I extends m{constructor(N,L,ee,Ee){super(),this.varKind=N,this.name=L,this.from=ee,this.to=Ee}render(N){const L=N.es5?r.varKinds.var:this.varKind,{name:ee,from:Ee,to:he}=this;return`for(${L} ${ee}=${Ee}; ${ee}<${he}; ${ee}++)`+super.render(N)}get names(){const N=U(super.names,this.from);return U(N,this.to)}}class h extends m{constructor(N,L,ee,Ee){super(),this.loop=N,this.varKind=L,this.name=ee,this.iterable=Ee}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,L){if(super.optimizeNames(N,L))return this.iterable=k(this.iterable,N,L),this}get names(){return V(super.names,this.iterable.names)}}class E extends y{constructor(N,L,ee){super(),this.name=N,this.args=L,this.async=ee}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}E.kind="func";class v extends p{render(N){return"return "+super.render(N)}}v.kind="return";class O extends y{render(N){let L="try"+super.render(N);return this.catch&&(L+=this.catch.render(N)),this.finally&&(L+=this.finally.render(N)),L}optimizeNodes(){var N,L;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(L=this.finally)===null||L===void 0||L.optimizeNodes(),this}optimizeNames(N,L){var ee,Ee;return super.optimizeNames(N,L),(ee=this.catch)===null||ee===void 0||ee.optimizeNames(N,L),(Ee=this.finally)===null||Ee===void 0||Ee.optimizeNames(N,L),this}get names(){const N=super.names;return this.catch&&V(N,this.catch.names),this.finally&&V(N,this.finally.names),N}}class C extends y{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}C.kind="catch";class $ extends y{render(N){return"finally"+super.render(N)}}$.kind="finally";class B{constructor(N,L={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...L,_n:L.lines?`
|
|
51
|
+
`:""},this._extScope=N,this._scope=new r.Scope({parent:N}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,L){const ee=this._extScope.value(N,L);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue(N,L){return this._extScope.getValue(N,L)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,L,ee,Ee){const he=this._scope.toName(L);return ee!==void 0&&Ee&&(this._constants[he.str]=ee),this._leafNode(new s(N,he,ee)),he}const(N,L,ee){return this._def(r.varKinds.const,N,L,ee)}let(N,L,ee){return this._def(r.varKinds.let,N,L,ee)}var(N,L,ee){return this._def(r.varKinds.var,N,L,ee)}assign(N,L,ee){return this._leafNode(new o(N,L,ee))}add(N,L){return this._leafNode(new u(N,e.operators.ADD,L))}code(N){return typeof N=="function"?N():N!==t.nil&&this._leafNode(new f(N)),this}object(...N){const L=["{"];for(const[ee,Ee]of N)L.length>1&&L.push(","),L.push(ee),(ee!==Ee||this.opts.es5)&&(L.push(":"),(0,t.addCodeArg)(L,Ee));return L.push("}"),new t._Code(L)}if(N,L,ee){if(this._blockNode(new P(N)),L&&ee)this.code(L).else().code(ee).endIf();else if(L)this.code(L).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new P(N))}else(){return this._elseNode(new T)}endIf(){return this._endBlockNode(P,T)}_for(N,L){return this._blockNode(N),L&&this.code(L).endFor(),this}for(N,L){return this._for(new w(N),L)}forRange(N,L,ee,Ee,he=this.opts.es5?r.varKinds.var:r.varKinds.let){const be=this._scope.toName(N);return this._for(new I(he,be,L,ee),()=>Ee(be))}forOf(N,L,ee,Ee=r.varKinds.const){const he=this._scope.toName(N);if(this.opts.es5){const be=L instanceof t.Name?L:this.var("_arr",L);return this.forRange("_i",0,(0,t._)`${be}.length`,Ie=>{this.var(he,(0,t._)`${be}[${Ie}]`),ee(he)})}return this._for(new h("of",Ee,he,L),()=>ee(he))}forIn(N,L,ee,Ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,t._)`Object.keys(${L})`,ee);const he=this._scope.toName(N);return this._for(new h("in",Ee,he,L),()=>ee(he))}endFor(){return this._endBlockNode(m)}label(N){return this._leafNode(new l(N))}break(N){return this._leafNode(new c(N))}return(N){const L=new v;if(this._blockNode(L),this.code(N),L.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(v)}try(N,L,ee){if(!L&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const Ee=new O;if(this._blockNode(Ee),this.code(N),L){const he=this.name("e");this._currNode=Ee.catch=new C(he),L(he)}return ee&&(this._currNode=Ee.finally=new $,this.code(ee)),this._endBlockNode(C,$)}throw(N){return this._leafNode(new d(N))}block(N,L){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(L),this}endBlock(N){const L=this._blockStarts.pop();if(L===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-L;if(ee<0||N!==void 0&&ee!==N)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${N} expected`);return this._nodes.length=L,this}func(N,L=t.nil,ee,Ee){return this._blockNode(new E(N,L,ee)),Ee&&this.code(Ee).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,L){const ee=this._currNode;if(ee instanceof N||L&&ee instanceof L)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${L?`${N.kind}/${L.kind}`:N.kind}"`)}_elseNode(N){const L=this._currNode;if(!(L instanceof P))throw new Error('CodeGen: "else" without "if"');return this._currNode=L.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const L=this._nodes;L[L.length-1]=N}}e.CodeGen=B;function V(W,N){for(const L in N)W[L]=(W[L]||0)+(N[L]||0);return W}function U(W,N){return N instanceof t._CodeOrName?V(W,N.names):W}function k(W,N,L){if(W instanceof t.Name)return ee(W);if(!Ee(W))return W;return new t._Code(W._items.reduce((he,be)=>(be instanceof t.Name&&(be=ee(be)),be instanceof t._Code?he.push(...be._items):he.push(be),he),[]));function ee(he){const be=L[he.str];return be===void 0||N[he.str]!==1?he:(delete N[he.str],be)}function Ee(he){return he instanceof t._Code&&he._items.some(be=>be instanceof t.Name&&N[be.str]===1&&L[be.str]!==void 0)}}function te(W,N){for(const L in N)W[L]=(W[L]||0)-(N[L]||0)}function ie(W){return typeof W=="boolean"||typeof W=="number"||W===null?!W:(0,t._)`!${F(W)}`}e.not=ie;const J=D(e.operators.AND);function Q(...W){return W.reduce(J)}e.and=Q;const K=D(e.operators.OR);function q(...W){return W.reduce(K)}e.or=q;function D(W){return(N,L)=>N===t.nil?L:L===t.nil?N:(0,t._)`${F(N)} ${W} ${F(L)}`}function F(W){return W instanceof t.Name?W:(0,t._)`(${W})`}})(ip)),ip}var Ze={},sS;function pt(){if(sS)return Ze;sS=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.checkStrictMode=Ze.getErrorPath=Ze.Type=Ze.useFunc=Ze.setEvaluated=Ze.evaluatedPropsToName=Ze.mergeEvaluated=Ze.eachItem=Ze.unescapeJsonPointer=Ze.escapeJsonPointer=Ze.escapeFragment=Ze.unescapeFragment=Ze.schemaRefOrVal=Ze.schemaHasRulesButRef=Ze.schemaHasRules=Ze.checkUnknownRules=Ze.alwaysValidSchema=Ze.toHash=void 0;const e=Ke(),t=Tu();function r(h){const E={};for(const v of h)E[v]=!0;return E}Ze.toHash=r;function n(h,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(i(h,E),!a(E,h.self.RULES.all))}Ze.alwaysValidSchema=n;function i(h,E=h.schema){const{opts:v,self:O}=h;if(!v.strictSchema||typeof E=="boolean")return;const C=O.RULES.keywords;for(const $ in E)C[$]||I(h,`unknown keyword: "${$}"`)}Ze.checkUnknownRules=i;function a(h,E){if(typeof h=="boolean")return!h;for(const v in h)if(E[v])return!0;return!1}Ze.schemaHasRules=a;function s(h,E){if(typeof h=="boolean")return!h;for(const v in h)if(v!=="$ref"&&E.all[v])return!0;return!1}Ze.schemaHasRulesButRef=s;function o({topSchemaRef:h,schemaPath:E},v,O,C){if(!C){if(typeof v=="number"||typeof v=="boolean")return v;if(typeof v=="string")return(0,e._)`${v}`}return(0,e._)`${h}${E}${(0,e.getProperty)(O)}`}Ze.schemaRefOrVal=o;function u(h){return d(decodeURIComponent(h))}Ze.unescapeFragment=u;function l(h){return encodeURIComponent(c(h))}Ze.escapeFragment=l;function c(h){return typeof h=="number"?`${h}`:h.replace(/~/g,"~0").replace(/\//g,"~1")}Ze.escapeJsonPointer=c;function d(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}Ze.unescapeJsonPointer=d;function f(h,E){if(Array.isArray(h))for(const v of h)E(v);else E(h)}Ze.eachItem=f;function p({mergeNames:h,mergeToName:E,mergeValues:v,resultToName:O}){return(C,$,B,V)=>{const U=B===void 0?$:B instanceof e.Name?($ instanceof e.Name?h(C,$,B):E(C,$,B),B):$ instanceof e.Name?(E(C,B,$),$):v($,B);return V===e.Name&&!(U instanceof e.Name)?O(C,U):U}}Ze.mergeEvaluated={props:p({mergeNames:(h,E,v)=>h.if((0,e._)`${v} !== true && ${E} !== undefined`,()=>{h.if((0,e._)`${E} === true`,()=>h.assign(v,!0),()=>h.assign(v,(0,e._)`${v} || {}`).code((0,e._)`Object.assign(${v}, ${E})`))}),mergeToName:(h,E,v)=>h.if((0,e._)`${v} !== true`,()=>{E===!0?h.assign(v,!0):(h.assign(v,(0,e._)`${v} || {}`),g(h,v,E))}),mergeValues:(h,E)=>h===!0?!0:{...h,...E},resultToName:y}),items:p({mergeNames:(h,E,v)=>h.if((0,e._)`${v} !== true && ${E} !== undefined`,()=>h.assign(v,(0,e._)`${E} === true ? true : ${v} > ${E} ? ${v} : ${E}`)),mergeToName:(h,E,v)=>h.if((0,e._)`${v} !== true`,()=>h.assign(v,E===!0?!0:(0,e._)`${v} > ${E} ? ${v} : ${E}`)),mergeValues:(h,E)=>h===!0?!0:Math.max(h,E),resultToName:(h,E)=>h.var("items",E)})};function y(h,E){if(E===!0)return h.var("props",!0);const v=h.var("props",(0,e._)`{}`);return E!==void 0&&g(h,v,E),v}Ze.evaluatedPropsToName=y;function g(h,E,v){Object.keys(v).forEach(O=>h.assign((0,e._)`${E}${(0,e.getProperty)(O)}`,!0))}Ze.setEvaluated=g;const T={};function P(h,E){return h.scopeValue("func",{ref:E,code:T[E.code]||(T[E.code]=new t._Code(E.code))})}Ze.useFunc=P;var m;(function(h){h[h.Num=0]="Num",h[h.Str=1]="Str"})(m||(Ze.Type=m={}));function w(h,E,v){if(h instanceof e.Name){const O=E===m.Num;return v?O?(0,e._)`"[" + ${h} + "]"`:(0,e._)`"['" + ${h} + "']"`:O?(0,e._)`"/" + ${h}`:(0,e._)`"/" + ${h}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return v?(0,e.getProperty)(h).toString():"/"+c(h)}Ze.getErrorPath=w;function I(h,E,v=h.opts.strictSchema){if(v){if(E=`strict mode: ${E}`,v===!0)throw new Error(E);h.self.logger.warn(E)}}return Ze.checkStrictMode=I,Ze}var rl={},oS;function pi(){if(oS)return rl;oS=1,Object.defineProperty(rl,"__esModule",{value:!0});const e=Ke(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return rl.default=t,rl}var uS;function Gu(){return uS||(uS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Ke(),r=pt(),n=pi();e.keywordError={message:({keyword:T})=>(0,t.str)`must pass "${T}" keyword validation`},e.keyword$DataError={message:({keyword:T,schemaType:P})=>P?(0,t.str)`"${T}" keyword must be ${P} ($data)`:(0,t.str)`"${T}" keyword is invalid ($data)`};function i(T,P=e.keywordError,m,w){const{it:I}=T,{gen:h,compositeRule:E,allErrors:v}=I,O=d(T,P,m);w??(E||v)?u(h,O):l(I,(0,t._)`[${O}]`)}e.reportError=i;function a(T,P=e.keywordError,m){const{it:w}=T,{gen:I,compositeRule:h,allErrors:E}=w,v=d(T,P,m);u(I,v),h||E||l(w,n.default.vErrors)}e.reportExtraError=a;function s(T,P){T.assign(n.default.errors,P),T.if((0,t._)`${n.default.vErrors} !== null`,()=>T.if(P,()=>T.assign((0,t._)`${n.default.vErrors}.length`,P),()=>T.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function o({gen:T,keyword:P,schemaValue:m,data:w,errsCount:I,it:h}){if(I===void 0)throw new Error("ajv implementation error");const E=T.name("err");T.forRange("i",I,n.default.errors,v=>{T.const(E,(0,t._)`${n.default.vErrors}[${v}]`),T.if((0,t._)`${E}.instancePath === undefined`,()=>T.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(n.default.instancePath,h.errorPath))),T.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${h.errSchemaPath}/${P}`),h.opts.verbose&&(T.assign((0,t._)`${E}.schema`,m),T.assign((0,t._)`${E}.data`,w))})}e.extendErrors=o;function u(T,P){const m=T.const("err",P);T.if((0,t._)`${n.default.vErrors} === null`,()=>T.assign(n.default.vErrors,(0,t._)`[${m}]`),(0,t._)`${n.default.vErrors}.push(${m})`),T.code((0,t._)`${n.default.errors}++`)}function l(T,P){const{gen:m,validateName:w,schemaEnv:I}=T;I.$async?m.throw((0,t._)`new ${T.ValidationError}(${P})`):(m.assign((0,t._)`${w}.errors`,P),m.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(T,P,m){const{createErrors:w}=T.it;return w===!1?(0,t._)`{}`:f(T,P,m)}function f(T,P,m={}){const{gen:w,it:I}=T,h=[p(I,m),y(T,m)];return g(T,P,h),w.object(...h)}function p({errorPath:T},{instancePath:P}){const m=P?(0,t.str)`${T}${(0,r.getErrorPath)(P,r.Type.Str)}`:T;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,m)]}function y({keyword:T,it:{errSchemaPath:P}},{schemaPath:m,parentSchema:w}){let I=w?P:(0,t.str)`${P}/${T}`;return m&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(m,r.Type.Str)}`),[c.schemaPath,I]}function g(T,{params:P,message:m},w){const{keyword:I,data:h,schemaValue:E,it:v}=T,{opts:O,propertyName:C,topSchemaRef:$,schemaPath:B}=v;w.push([c.keyword,I],[c.params,typeof P=="function"?P(T):P||(0,t._)`{}`]),O.messages&&w.push([c.message,typeof m=="function"?m(T):m]),O.verbose&&w.push([c.schema,E],[c.parentSchema,(0,t._)`${$}${B}`],[n.default.data,h]),C&&w.push([c.propertyName,C])}})(np)),np}var cS;function qH(){if(cS)return Fi;cS=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.boolOrEmptySchema=Fi.topBoolOrEmptySchema=void 0;const e=Gu(),t=Ke(),r=pi(),n={message:"boolean schema is false"};function i(o){const{gen:u,schema:l,validateName:c}=o;l===!1?s(o,!1):typeof l=="object"&&l.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${c}.errors`,null),u.return(!0))}Fi.topBoolOrEmptySchema=i;function a(o,u){const{gen:l,schema:c}=o;c===!1?(l.var(u,!1),s(o)):l.var(u,!0)}Fi.boolOrEmptySchema=a;function s(o,u){const{gen:l,data:c}=o,d={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(d,n,void 0,u)}return Fi}var cr={},Hi={},lS;function gj(){if(lS)return Hi;lS=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.getRules=Hi.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}Hi.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Hi.getRules=n,Hi}var Qn={},dS;function _j(){if(dS)return Qn;dS=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.shouldUseRule=Qn.shouldUseGroup=Qn.schemaHasRulesForType=void 0;function e({schema:n,self:i},a){const s=i.RULES.types[a];return s&&s!==!0&&t(n,s)}Qn.schemaHasRulesForType=e;function t(n,i){return i.rules.some(a=>r(n,a))}Qn.shouldUseGroup=t;function r(n,i){var a;return n[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(s=>n[s]!==void 0))}return Qn.shouldUseRule=r,Qn}var fS;function Dd(){if(fS)return cr;fS=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.reportTypeError=cr.checkDataTypes=cr.checkDataType=cr.coerceAndCheckDataType=cr.getJSONTypes=cr.getSchemaTypes=cr.DataType=void 0;const e=gj(),t=_j(),r=Gu(),n=Ke(),i=pt();var a;(function(m){m[m.Correct=0]="Correct",m[m.Wrong=1]="Wrong"})(a||(cr.DataType=a={}));function s(m){const w=o(m.type);if(w.includes("null")){if(m.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!w.length&&m.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');m.nullable===!0&&w.push("null")}return w}cr.getSchemaTypes=s;function o(m){const w=Array.isArray(m)?m:m?[m]:[];if(w.every(e.isJSONType))return w;throw new Error("type must be JSONType or JSONType[]: "+w.join(","))}cr.getJSONTypes=o;function u(m,w){const{gen:I,data:h,opts:E}=m,v=c(w,E.coerceTypes),O=w.length>0&&!(v.length===0&&w.length===1&&(0,t.schemaHasRulesForType)(m,w[0]));if(O){const C=y(w,h,E.strictNumbers,a.Wrong);I.if(C,()=>{v.length?d(m,w,v):T(m)})}return O}cr.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(m,w){return w?m.filter(I=>l.has(I)||w==="array"&&I==="array"):[]}function d(m,w,I){const{gen:h,data:E,opts:v}=m,O=h.let("dataType",(0,n._)`typeof ${E}`),C=h.let("coerced",(0,n._)`undefined`);v.coerceTypes==="array"&&h.if((0,n._)`${O} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>h.assign(E,(0,n._)`${E}[0]`).assign(O,(0,n._)`typeof ${E}`).if(y(w,E,v.strictNumbers),()=>h.assign(C,E))),h.if((0,n._)`${C} !== undefined`);for(const B of I)(l.has(B)||B==="array"&&v.coerceTypes==="array")&&$(B);h.else(),T(m),h.endIf(),h.if((0,n._)`${C} !== undefined`,()=>{h.assign(E,C),f(m,C)});function $(B){switch(B){case"string":h.elseIf((0,n._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,n._)`"" + ${E}`).elseIf((0,n._)`${E} === null`).assign(C,(0,n._)`""`);return;case"number":h.elseIf((0,n._)`${O} == "boolean" || ${E} === null
|
|
52
|
+
|| (${O} == "string" && ${E} && ${E} == +${E})`).assign(C,(0,n._)`+${E}`);return;case"integer":h.elseIf((0,n._)`${O} === "boolean" || ${E} === null
|
|
53
|
+
|| (${O} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(C,(0,n._)`+${E}`);return;case"boolean":h.elseIf((0,n._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(C,!1).elseIf((0,n._)`${E} === "true" || ${E} === 1`).assign(C,!0);return;case"null":h.elseIf((0,n._)`${E} === "" || ${E} === 0 || ${E} === false`),h.assign(C,null);return;case"array":h.elseIf((0,n._)`${O} === "string" || ${O} === "number"
|
|
54
|
+
|| ${O} === "boolean" || ${E} === null`).assign(C,(0,n._)`[${E}]`)}}}function f({gen:m,parentData:w,parentDataProperty:I},h){m.if((0,n._)`${w} !== undefined`,()=>m.assign((0,n._)`${w}[${I}]`,h))}function p(m,w,I,h=a.Correct){const E=h===a.Correct?n.operators.EQ:n.operators.NEQ;let v;switch(m){case"null":return(0,n._)`${w} ${E} null`;case"array":v=(0,n._)`Array.isArray(${w})`;break;case"object":v=(0,n._)`${w} && typeof ${w} == "object" && !Array.isArray(${w})`;break;case"integer":v=O((0,n._)`!(${w} % 1) && !isNaN(${w})`);break;case"number":v=O();break;default:return(0,n._)`typeof ${w} ${E} ${m}`}return h===a.Correct?v:(0,n.not)(v);function O(C=n.nil){return(0,n.and)((0,n._)`typeof ${w} == "number"`,C,I?(0,n._)`isFinite(${w})`:n.nil)}}cr.checkDataType=p;function y(m,w,I,h){if(m.length===1)return p(m[0],w,I,h);let E;const v=(0,i.toHash)(m);if(v.array&&v.object){const O=(0,n._)`typeof ${w} != "object"`;E=v.null?O:(0,n._)`!${w} || ${O}`,delete v.null,delete v.array,delete v.object}else E=n.nil;v.number&&delete v.integer;for(const O in v)E=(0,n.and)(E,p(O,w,I,h));return E}cr.checkDataTypes=y;const g={message:({schema:m})=>`must be ${m}`,params:({schema:m,schemaValue:w})=>typeof m=="string"?(0,n._)`{type: ${m}}`:(0,n._)`{type: ${w}}`};function T(m){const w=P(m);(0,r.reportError)(w,g)}cr.reportTypeError=T;function P(m){const{gen:w,data:I,schema:h}=m,E=(0,i.schemaRefOrVal)(m,h,"type");return{gen:w,keyword:"type",data:I,schema:h.type,schemaCode:E,schemaValue:E,parentSchema:h,params:{},it:m}}return cr}var _o={},pS;function kH(){if(pS)return _o;pS=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.assignDefaults=void 0;const e=Ke(),t=pt();function r(i,a){const{properties:s,items:o}=i.schema;if(a==="object"&&s)for(const u in s)n(i,u,s[u].default);else a==="array"&&Array.isArray(o)&&o.forEach((u,l)=>n(i,l,u.default))}_o.assignDefaults=r;function n(i,a,s){const{gen:o,compositeRule:u,data:l,opts:c}=i;if(s===void 0)return;const d=(0,e._)`${l}${(0,e.getProperty)(a)}`;if(u){(0,t.checkStrictMode)(i,`default is ignored for: ${d}`);return}let f=(0,e._)`${d} === undefined`;c.useDefaults==="empty"&&(f=(0,e._)`${f} || ${d} === null || ${d} === ""`),o.if(f,(0,e._)`${d} = ${(0,e.stringify)(s)}`)}return _o}var sn={},bt={},mS;function _n(){if(mS)return bt;mS=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.validateUnion=bt.validateArray=bt.usePattern=bt.callValidateCode=bt.schemaProperties=bt.allSchemaProperties=bt.noPropertyInData=bt.propertyInData=bt.isOwnProperty=bt.hasPropFunc=bt.reportMissingProp=bt.checkMissingProp=bt.checkReportMissingProp=void 0;const e=Ke(),t=pt(),r=pi(),n=pt();function i(m,w){const{gen:I,data:h,it:E}=m;I.if(c(I,h,w,E.opts.ownProperties),()=>{m.setParams({missingProperty:(0,e._)`${w}`},!0),m.error()})}bt.checkReportMissingProp=i;function a({gen:m,data:w,it:{opts:I}},h,E){return(0,e.or)(...h.map(v=>(0,e.and)(c(m,w,v,I.ownProperties),(0,e._)`${E} = ${v}`)))}bt.checkMissingProp=a;function s(m,w){m.setParams({missingProperty:w},!0),m.error()}bt.reportMissingProp=s;function o(m){return m.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}bt.hasPropFunc=o;function u(m,w,I){return(0,e._)`${o(m)}.call(${w}, ${I})`}bt.isOwnProperty=u;function l(m,w,I,h){const E=(0,e._)`${w}${(0,e.getProperty)(I)} !== undefined`;return h?(0,e._)`${E} && ${u(m,w,I)}`:E}bt.propertyInData=l;function c(m,w,I,h){const E=(0,e._)`${w}${(0,e.getProperty)(I)} === undefined`;return h?(0,e.or)(E,(0,e.not)(u(m,w,I))):E}bt.noPropertyInData=c;function d(m){return m?Object.keys(m).filter(w=>w!=="__proto__"):[]}bt.allSchemaProperties=d;function f(m,w){return d(w).filter(I=>!(0,t.alwaysValidSchema)(m,w[I]))}bt.schemaProperties=f;function p({schemaCode:m,data:w,it:{gen:I,topSchemaRef:h,schemaPath:E,errorPath:v},it:O},C,$,B){const V=B?(0,e._)`${m}, ${w}, ${h}${E}`:w,U=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,v)],[r.default.parentData,O.parentData],[r.default.parentDataProperty,O.parentDataProperty],[r.default.rootData,r.default.rootData]];O.opts.dynamicRef&&U.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const k=(0,e._)`${V}, ${I.object(...U)}`;return $!==e.nil?(0,e._)`${C}.call(${$}, ${k})`:(0,e._)`${C}(${k})`}bt.callValidateCode=p;const y=(0,e._)`new RegExp`;function g({gen:m,it:{opts:w}},I){const h=w.unicodeRegExp?"u":"",{regExp:E}=w.code,v=E(I,h);return m.scopeValue("pattern",{key:v.toString(),ref:v,code:(0,e._)`${E.code==="new RegExp"?y:(0,n.useFunc)(m,E)}(${I}, ${h})`})}bt.usePattern=g;function T(m){const{gen:w,data:I,keyword:h,it:E}=m,v=w.name("valid");if(E.allErrors){const C=w.let("valid",!0);return O(()=>w.assign(C,!1)),C}return w.var(v,!0),O(()=>w.break()),v;function O(C){const $=w.const("len",(0,e._)`${I}.length`);w.forRange("i",0,$,B=>{m.subschema({keyword:h,dataProp:B,dataPropType:t.Type.Num},v),w.if((0,e.not)(v),C)})}}bt.validateArray=T;function P(m){const{gen:w,schema:I,keyword:h,it:E}=m;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some($=>(0,t.alwaysValidSchema)(E,$))&&!E.opts.unevaluated)return;const O=w.let("valid",!1),C=w.name("_valid");w.block(()=>I.forEach(($,B)=>{const V=m.subschema({keyword:h,schemaProp:B,compositeRule:!0},C);w.assign(O,(0,e._)`${O} || ${C}`),m.mergeValidEvaluated(V,C)||w.if((0,e.not)(O))})),m.result(O,()=>m.reset(),()=>m.error(!0))}return bt.validateUnion=P,bt}var hS;function BH(){if(hS)return sn;hS=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateKeywordUsage=sn.validSchemaType=sn.funcKeywordCode=sn.macroKeywordCode=void 0;const e=Ke(),t=pi(),r=_n(),n=Gu();function i(f,p){const{gen:y,keyword:g,schema:T,parentSchema:P,it:m}=f,w=p.macro.call(m.self,T,P,m),I=l(y,g,w);m.opts.validateSchema!==!1&&m.self.validateSchema(w,!0);const h=y.name("valid");f.subschema({schema:w,schemaPath:e.nil,errSchemaPath:`${m.errSchemaPath}/${g}`,topSchemaRef:I,compositeRule:!0},h),f.pass(h,()=>f.error(!0))}sn.macroKeywordCode=i;function a(f,p){var y;const{gen:g,keyword:T,schema:P,parentSchema:m,$data:w,it:I}=f;u(I,p);const h=!w&&p.compile?p.compile.call(I.self,P,m,I):p.validate,E=l(g,T,h),v=g.let("valid");f.block$data(v,O),f.ok((y=p.valid)!==null&&y!==void 0?y:v);function O(){if(p.errors===!1)B(),p.modifying&&s(f),V(()=>f.error());else{const U=p.async?C():$();p.modifying&&s(f),V(()=>o(f,U))}}function C(){const U=g.let("ruleErrs",null);return g.try(()=>B((0,e._)`await `),k=>g.assign(v,!1).if((0,e._)`${k} instanceof ${I.ValidationError}`,()=>g.assign(U,(0,e._)`${k}.errors`),()=>g.throw(k))),U}function $(){const U=(0,e._)`${E}.errors`;return g.assign(U,null),B(e.nil),U}function B(U=p.async?(0,e._)`await `:e.nil){const k=I.opts.passContext?t.default.this:t.default.self,te=!("compile"in p&&!w||p.schema===!1);g.assign(v,(0,e._)`${U}${(0,r.callValidateCode)(f,E,k,te)}`,p.modifying)}function V(U){var k;g.if((0,e.not)((k=p.valid)!==null&&k!==void 0?k:v),U)}}sn.funcKeywordCode=a;function s(f){const{gen:p,data:y,it:g}=f;p.if(g.parentData,()=>p.assign(y,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function o(f,p){const{gen:y}=f;y.if((0,e._)`Array.isArray(${p})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${p} : ${t.default.vErrors}.concat(${p})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(f)},()=>f.error())}function u({schemaEnv:f},p){if(p.async&&!f.$async)throw new Error("async keyword in sync schema")}function l(f,p,y){if(y===void 0)throw new Error(`keyword "${p}" failed to compile`);return f.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function c(f,p,y=!1){return!p.length||p.some(g=>g==="array"?Array.isArray(f):g==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==g||y&&typeof f>"u")}sn.validSchemaType=c;function d({schema:f,opts:p,self:y,errSchemaPath:g},T,P){if(Array.isArray(T.keyword)?!T.keyword.includes(P):T.keyword!==P)throw new Error("ajv implementation error");const m=T.dependencies;if(m!=null&&m.some(w=>!Object.prototype.hasOwnProperty.call(f,w)))throw new Error(`parent schema must have dependencies of ${P}: ${m.join(",")}`);if(T.validateSchema&&!T.validateSchema(f[P])){const I=`keyword "${P}" value is invalid at path "${g}": `+y.errorsText(T.validateSchema.errors);if(p.validateSchema==="log")y.logger.error(I);else throw new Error(I)}}return sn.validateKeywordUsage=d,sn}var Zn={},yS;function UH(){if(yS)return Zn;yS=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.extendSubschemaMode=Zn.extendSubschemaData=Zn.getSubschema=void 0;const e=Ke(),t=pt();function r(a,{keyword:s,schemaProp:o,schema:u,schemaPath:l,errSchemaPath:c,topSchemaRef:d}){if(s!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const f=a.schema[s];return o===void 0?{schema:f,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:f[o],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,t.escapeFragment)(o)}`}}if(u!==void 0){if(l===void 0||c===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:d,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}Zn.getSubschema=r;function n(a,s,{dataProp:o,dataPropType:u,data:l,dataTypes:c,propertyName:d}){if(l!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:f}=s;if(o!==void 0){const{errorPath:y,dataPathArr:g,opts:T}=s,P=f.let("data",(0,e._)`${s.data}${(0,e.getProperty)(o)}`,!0);p(P),a.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(o,u,T.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${o}`,a.dataPathArr=[...g,a.parentDataProperty]}if(l!==void 0){const y=l instanceof e.Name?l:f.let("data",l,!0);p(y),d!==void 0&&(a.propertyName=d)}c&&(a.dataTypes=c);function p(y){a.data=y,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,y]}}Zn.extendSubschemaData=n;function i(a,{jtdDiscriminator:s,jtdMetadata:o,compositeRule:u,createErrors:l,allErrors:c}){u!==void 0&&(a.compositeRule=u),l!==void 0&&(a.createErrors=l),c!==void 0&&(a.allErrors=c),a.jtdDiscriminator=s,a.jtdMetadata=o}return Zn.extendSubschemaMode=i,Zn}var wr={},op,gS;function Sv(){return gS||(gS=1,op=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),op}var up={exports:{}},_S;function FH(){if(_S)return up.exports;_S=1;var e=up.exports=function(n,i,a){typeof i=="function"&&(a=i,i={}),a=i.cb||a;var s=typeof a=="function"?a:a.pre||function(){},o=a.post||function(){};t(i,s,o,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,i,a,s,o,u,l,c,d,f){if(s&&typeof s=="object"&&!Array.isArray(s)){i(s,o,u,l,c,d,f);for(var p in s){var y=s[p];if(Array.isArray(y)){if(p in e.arrayKeywords)for(var g=0;g<y.length;g++)t(n,i,a,y[g],o+"/"+p+"/"+g,u,o,p,s,g)}else if(p in e.propsKeywords){if(y&&typeof y=="object")for(var T in y)t(n,i,a,y[T],o+"/"+p+"/"+r(T),u,o,p,s,T)}else(p in e.keywords||n.allKeys&&!(p in e.skipKeywords))&&t(n,i,a,y,o+"/"+p,u,o,p,s)}a(s,o,u,l,c,d,f)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return up.exports}var ES;function Qd(){if(ES)return wr;ES=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.getSchemaRefs=wr.resolveUrl=wr.normalizeId=wr._getFullPath=wr.getFullPath=wr.inlineRef=void 0;const e=pt(),t=Sv(),r=FH(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(g,T=!0){return typeof g=="boolean"?!0:T===!0?!s(g):T?o(g)<=T:!1}wr.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const T in g){if(a.has(T))return!0;const P=g[T];if(Array.isArray(P)&&P.some(s)||typeof P=="object"&&s(P))return!0}return!1}function o(g){let T=0;for(const P in g){if(P==="$ref")return 1/0;if(T++,!n.has(P)&&(typeof g[P]=="object"&&(0,e.eachItem)(g[P],m=>T+=o(m)),T===1/0))return 1/0}return T}function u(g,T="",P){P!==!1&&(T=d(T));const m=g.parse(T);return l(g,m)}wr.getFullPath=u;function l(g,T){return g.serialize(T).split("#")[0]+"#"}wr._getFullPath=l;const c=/#\/?$/;function d(g){return g?g.replace(c,""):""}wr.normalizeId=d;function f(g,T,P){return P=d(P),g.resolve(T,P)}wr.resolveUrl=f;const p=/^[a-z_][-a-z0-9._]*$/i;function y(g,T){if(typeof g=="boolean")return{};const{schemaId:P,uriResolver:m}=this.opts,w=d(g[P]||T),I={"":w},h=u(m,w,!1),E={},v=new Set;return r(g,{allKeys:!0},($,B,V,U)=>{if(U===void 0)return;const k=h+B;let te=I[U];typeof $[P]=="string"&&(te=ie.call(this,$[P])),J.call(this,$.$anchor),J.call(this,$.$dynamicAnchor),I[B]=te;function ie(Q){const K=this.opts.uriResolver.resolve;if(Q=d(te?K(te,Q):Q),v.has(Q))throw C(Q);v.add(Q);let q=this.refs[Q];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?O($,q.schema,Q):Q!==d(k)&&(Q[0]==="#"?(O($,E[Q],Q),E[Q]=$):this.refs[Q]=k),Q}function J(Q){if(typeof Q=="string"){if(!p.test(Q))throw new Error(`invalid anchor "${Q}"`);ie.call(this,`#${Q}`)}}}),E;function O($,B,V){if(B!==void 0&&!t($,B))throw C(V)}function C($){return new Error(`reference "${$}" resolves to more than one schema`)}}return wr.getSchemaRefs=y,wr}var vS;function xu(){if(vS)return Jn;vS=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.getData=Jn.KeywordCxt=Jn.validateFunctionCode=void 0;const e=qH(),t=Dd(),r=_j(),n=Dd(),i=kH(),a=BH(),s=UH(),o=Ke(),u=pi(),l=Qd(),c=pt(),d=Gu();function f(ae){if(h(ae)&&(v(ae),I(ae))){T(ae);return}p(ae,()=>(0,e.topBoolOrEmptySchema)(ae))}Jn.validateFunctionCode=f;function p({gen:ae,validateName:ce,schema:fe,schemaEnv:pe,opts:ve},Ae){ve.code.es5?ae.func(ce,(0,o._)`${u.default.data}, ${u.default.valCxt}`,pe.$async,()=>{ae.code((0,o._)`"use strict"; ${m(fe,ve)}`),g(ae,ve),ae.code(Ae)}):ae.func(ce,(0,o._)`${u.default.data}, ${y(ve)}`,pe.$async,()=>ae.code(m(fe,ve)).code(Ae))}function y(ae){return(0,o._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${ae.dynamicRef?(0,o._)`, ${u.default.dynamicAnchors}={}`:o.nil}}={}`}function g(ae,ce){ae.if(u.default.valCxt,()=>{ae.var(u.default.instancePath,(0,o._)`${u.default.valCxt}.${u.default.instancePath}`),ae.var(u.default.parentData,(0,o._)`${u.default.valCxt}.${u.default.parentData}`),ae.var(u.default.parentDataProperty,(0,o._)`${u.default.valCxt}.${u.default.parentDataProperty}`),ae.var(u.default.rootData,(0,o._)`${u.default.valCxt}.${u.default.rootData}`),ce.dynamicRef&&ae.var(u.default.dynamicAnchors,(0,o._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{ae.var(u.default.instancePath,(0,o._)`""`),ae.var(u.default.parentData,(0,o._)`undefined`),ae.var(u.default.parentDataProperty,(0,o._)`undefined`),ae.var(u.default.rootData,u.default.data),ce.dynamicRef&&ae.var(u.default.dynamicAnchors,(0,o._)`{}`)})}function T(ae){const{schema:ce,opts:fe,gen:pe}=ae;p(ae,()=>{fe.$comment&&ce.$comment&&U(ae),$(ae),pe.let(u.default.vErrors,null),pe.let(u.default.errors,0),fe.unevaluated&&P(ae),O(ae),k(ae)})}function P(ae){const{gen:ce,validateName:fe}=ae;ae.evaluated=ce.const("evaluated",(0,o._)`${fe}.evaluated`),ce.if((0,o._)`${ae.evaluated}.dynamicProps`,()=>ce.assign((0,o._)`${ae.evaluated}.props`,(0,o._)`undefined`)),ce.if((0,o._)`${ae.evaluated}.dynamicItems`,()=>ce.assign((0,o._)`${ae.evaluated}.items`,(0,o._)`undefined`))}function m(ae,ce){const fe=typeof ae=="object"&&ae[ce.schemaId];return fe&&(ce.code.source||ce.code.process)?(0,o._)`/*# sourceURL=${fe} */`:o.nil}function w(ae,ce){if(h(ae)&&(v(ae),I(ae))){E(ae,ce);return}(0,e.boolOrEmptySchema)(ae,ce)}function I({schema:ae,self:ce}){if(typeof ae=="boolean")return!ae;for(const fe in ae)if(ce.RULES.all[fe])return!0;return!1}function h(ae){return typeof ae.schema!="boolean"}function E(ae,ce){const{schema:fe,gen:pe,opts:ve}=ae;ve.$comment&&fe.$comment&&U(ae),B(ae),V(ae);const Ae=pe.const("_errs",u.default.errors);O(ae,Ae),pe.var(ce,(0,o._)`${Ae} === ${u.default.errors}`)}function v(ae){(0,c.checkUnknownRules)(ae),C(ae)}function O(ae,ce){if(ae.opts.jtd)return ie(ae,[],!1,ce);const fe=(0,t.getSchemaTypes)(ae.schema),pe=(0,t.coerceAndCheckDataType)(ae,fe);ie(ae,fe,!pe,ce)}function C(ae){const{schema:ce,errSchemaPath:fe,opts:pe,self:ve}=ae;ce.$ref&&pe.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(ce,ve.RULES)&&ve.logger.warn(`$ref: keywords ignored in schema at path "${fe}"`)}function $(ae){const{schema:ce,opts:fe}=ae;ce.default!==void 0&&fe.useDefaults&&fe.strictSchema&&(0,c.checkStrictMode)(ae,"default is ignored in the schema root")}function B(ae){const ce=ae.schema[ae.opts.schemaId];ce&&(ae.baseId=(0,l.resolveUrl)(ae.opts.uriResolver,ae.baseId,ce))}function V(ae){if(ae.schema.$async&&!ae.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:ae,schemaEnv:ce,schema:fe,errSchemaPath:pe,opts:ve}){const Ae=fe.$comment;if(ve.$comment===!0)ae.code((0,o._)`${u.default.self}.logger.log(${Ae})`);else if(typeof ve.$comment=="function"){const ke=(0,o.str)`${pe}/$comment`,We=ae.scopeValue("root",{ref:ce.root});ae.code((0,o._)`${u.default.self}.opts.$comment(${Ae}, ${ke}, ${We}.schema)`)}}function k(ae){const{gen:ce,schemaEnv:fe,validateName:pe,ValidationError:ve,opts:Ae}=ae;fe.$async?ce.if((0,o._)`${u.default.errors} === 0`,()=>ce.return(u.default.data),()=>ce.throw((0,o._)`new ${ve}(${u.default.vErrors})`)):(ce.assign((0,o._)`${pe}.errors`,u.default.vErrors),Ae.unevaluated&&te(ae),ce.return((0,o._)`${u.default.errors} === 0`))}function te({gen:ae,evaluated:ce,props:fe,items:pe}){fe instanceof o.Name&&ae.assign((0,o._)`${ce}.props`,fe),pe instanceof o.Name&&ae.assign((0,o._)`${ce}.items`,pe)}function ie(ae,ce,fe,pe){const{gen:ve,schema:Ae,data:ke,allErrors:We,opts:et,self:Xe}=ae,{RULES:ut}=Xe;if(Ae.$ref&&(et.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(Ae,ut))){ve.block(()=>Ee(ae,"$ref",ut.all.$ref.definition));return}et.jtd||Q(ae,ce),ve.block(()=>{for(const It of ut.rules)Ft(It);Ft(ut.post)});function Ft(It){(0,r.shouldUseGroup)(Ae,It)&&(It.type?(ve.if((0,n.checkDataType)(It.type,ke,et.strictNumbers)),J(ae,It),ce.length===1&&ce[0]===It.type&&fe&&(ve.else(),(0,n.reportTypeError)(ae)),ve.endIf()):J(ae,It),We||ve.if((0,o._)`${u.default.errors} === ${pe||0}`))}}function J(ae,ce){const{gen:fe,schema:pe,opts:{useDefaults:ve}}=ae;ve&&(0,i.assignDefaults)(ae,ce.type),fe.block(()=>{for(const Ae of ce.rules)(0,r.shouldUseRule)(pe,Ae)&&Ee(ae,Ae.keyword,Ae.definition,ce.type)})}function Q(ae,ce){ae.schemaEnv.meta||!ae.opts.strictTypes||(K(ae,ce),ae.opts.allowUnionTypes||q(ae,ce),D(ae,ae.dataTypes))}function K(ae,ce){if(ce.length){if(!ae.dataTypes.length){ae.dataTypes=ce;return}ce.forEach(fe=>{W(ae.dataTypes,fe)||L(ae,`type "${fe}" not allowed by context "${ae.dataTypes.join(",")}"`)}),N(ae,ce)}}function q(ae,ce){ce.length>1&&!(ce.length===2&&ce.includes("null"))&&L(ae,"use allowUnionTypes to allow union type keyword")}function D(ae,ce){const fe=ae.self.RULES.all;for(const pe in fe){const ve=fe[pe];if(typeof ve=="object"&&(0,r.shouldUseRule)(ae.schema,ve)){const{type:Ae}=ve.definition;Ae.length&&!Ae.some(ke=>F(ce,ke))&&L(ae,`missing type "${Ae.join(",")}" for keyword "${pe}"`)}}}function F(ae,ce){return ae.includes(ce)||ce==="number"&&ae.includes("integer")}function W(ae,ce){return ae.includes(ce)||ce==="integer"&&ae.includes("number")}function N(ae,ce){const fe=[];for(const pe of ae.dataTypes)W(ce,pe)?fe.push(pe):ce.includes("integer")&&pe==="number"&&fe.push("integer");ae.dataTypes=fe}function L(ae,ce){const fe=ae.schemaEnv.baseId+ae.errSchemaPath;ce+=` at "${fe}" (strictTypes)`,(0,c.checkStrictMode)(ae,ce,ae.opts.strictTypes)}class ee{constructor(ce,fe,pe){if((0,a.validateKeywordUsage)(ce,fe,pe),this.gen=ce.gen,this.allErrors=ce.allErrors,this.keyword=pe,this.data=ce.data,this.schema=ce.schema[pe],this.$data=fe.$data&&ce.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(ce,this.schema,pe,this.$data),this.schemaType=fe.schemaType,this.parentSchema=ce.schema,this.params={},this.it=ce,this.def=fe,this.$data)this.schemaCode=ce.gen.const("vSchema",Ie(this.$data,ce));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,fe.schemaType,fe.allowUndefined))throw new Error(`${pe} value must be ${JSON.stringify(fe.schemaType)}`);("code"in fe?fe.trackErrors:fe.errors!==!1)&&(this.errsCount=ce.gen.const("_errs",u.default.errors))}result(ce,fe,pe){this.failResult((0,o.not)(ce),fe,pe)}failResult(ce,fe,pe){this.gen.if(ce),pe?pe():this.error(),fe?(this.gen.else(),fe(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ce,fe){this.failResult((0,o.not)(ce),void 0,fe)}fail(ce){if(ce===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ce),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ce){if(!this.$data)return this.fail(ce);const{schemaCode:fe}=this;this.fail((0,o._)`${fe} !== undefined && (${(0,o.or)(this.invalid$data(),ce)})`)}error(ce,fe,pe){if(fe){this.setParams(fe),this._error(ce,pe),this.setParams({});return}this._error(ce,pe)}_error(ce,fe){(ce?d.reportExtraError:d.reportError)(this,this.def.error,fe)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(ce){this.allErrors||this.gen.if(ce)}setParams(ce,fe){fe?Object.assign(this.params,ce):this.params=ce}block$data(ce,fe,pe=o.nil){this.gen.block(()=>{this.check$data(ce,pe),fe()})}check$data(ce=o.nil,fe=o.nil){if(!this.$data)return;const{gen:pe,schemaCode:ve,schemaType:Ae,def:ke}=this;pe.if((0,o.or)((0,o._)`${ve} === undefined`,fe)),ce!==o.nil&&pe.assign(ce,!0),(Ae.length||ke.validateSchema)&&(pe.elseIf(this.invalid$data()),this.$dataError(),ce!==o.nil&&pe.assign(ce,!1)),pe.else()}invalid$data(){const{gen:ce,schemaCode:fe,schemaType:pe,def:ve,it:Ae}=this;return(0,o.or)(ke(),We());function ke(){if(pe.length){if(!(fe instanceof o.Name))throw new Error("ajv implementation error");const et=Array.isArray(pe)?pe:[pe];return(0,o._)`${(0,n.checkDataTypes)(et,fe,Ae.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function We(){if(ve.validateSchema){const et=ce.scopeValue("validate$data",{ref:ve.validateSchema});return(0,o._)`!${et}(${fe})`}return o.nil}}subschema(ce,fe){const pe=(0,s.getSubschema)(this.it,ce);(0,s.extendSubschemaData)(pe,this.it,ce),(0,s.extendSubschemaMode)(pe,ce);const ve={...this.it,...pe,items:void 0,props:void 0};return w(ve,fe),ve}mergeEvaluated(ce,fe){const{it:pe,gen:ve}=this;pe.opts.unevaluated&&(pe.props!==!0&&ce.props!==void 0&&(pe.props=c.mergeEvaluated.props(ve,ce.props,pe.props,fe)),pe.items!==!0&&ce.items!==void 0&&(pe.items=c.mergeEvaluated.items(ve,ce.items,pe.items,fe)))}mergeValidEvaluated(ce,fe){const{it:pe,gen:ve}=this;if(pe.opts.unevaluated&&(pe.props!==!0||pe.items!==!0))return ve.if(fe,()=>this.mergeEvaluated(ce,o.Name)),!0}}Jn.KeywordCxt=ee;function Ee(ae,ce,fe,pe){const ve=new ee(ae,fe,ce);"code"in fe?fe.code(ve,pe):ve.$data&&fe.validate?(0,a.funcKeywordCode)(ve,fe):"macro"in fe?(0,a.macroKeywordCode)(ve,fe):(fe.compile||fe.validate)&&(0,a.funcKeywordCode)(ve,fe)}const he=/^\/(?:[^~]|~0|~1)*$/,be=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ie(ae,{dataLevel:ce,dataNames:fe,dataPathArr:pe}){let ve,Ae;if(ae==="")return u.default.rootData;if(ae[0]==="/"){if(!he.test(ae))throw new Error(`Invalid JSON-pointer: ${ae}`);ve=ae,Ae=u.default.rootData}else{const Xe=be.exec(ae);if(!Xe)throw new Error(`Invalid JSON-pointer: ${ae}`);const ut=+Xe[1];if(ve=Xe[2],ve==="#"){if(ut>=ce)throw new Error(et("property/index",ut));return pe[ce-ut]}if(ut>ce)throw new Error(et("data",ut));if(Ae=fe[ce-ut],!ve)return Ae}let ke=Ae;const We=ve.split("/");for(const Xe of We)Xe&&(Ae=(0,o._)`${Ae}${(0,o.getProperty)((0,c.unescapeJsonPointer)(Xe))}`,ke=(0,o._)`${ke} && ${Ae}`);return ke;function et(Xe,ut){return`Cannot access ${Xe} ${ut} levels up, current level is ${ce}`}}return Jn.getData=Ie,Jn}var nl={},bS;function Tv(){if(bS)return nl;bS=1,Object.defineProperty(nl,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return nl.default=e,nl}var il={},SS;function Zd(){if(SS)return il;SS=1,Object.defineProperty(il,"__esModule",{value:!0});const e=Qd();class t extends Error{constructor(n,i,a,s){super(s||`can't resolve reference ${a} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return il.default=t,il}var Hr={},TS;function Iv(){if(TS)return Hr;TS=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.resolveSchema=Hr.getCompilingSchema=Hr.resolveRef=Hr.compileSchema=Hr.SchemaEnv=void 0;const e=Ke(),t=Tv(),r=pi(),n=Qd(),i=pt(),a=xu();class s{constructor(P){var m;this.refs={},this.dynamicAnchors={};let w;typeof P.schema=="object"&&(w=P.schema),this.schema=P.schema,this.schemaId=P.schemaId,this.root=P.root||this,this.baseId=(m=P.baseId)!==null&&m!==void 0?m:(0,n.normalizeId)(w==null?void 0:w[P.schemaId||"$id"]),this.schemaPath=P.schemaPath,this.localRefs=P.localRefs,this.meta=P.meta,this.$async=w==null?void 0:w.$async,this.refs={}}}Hr.SchemaEnv=s;function o(T){const P=c.call(this,T);if(P)return P;const m=(0,n.getFullPath)(this.opts.uriResolver,T.root.baseId),{es5:w,lines:I}=this.opts.code,{ownProperties:h}=this.opts,E=new e.CodeGen(this.scope,{es5:w,lines:I,ownProperties:h});let v;T.$async&&(v=E.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=E.scopeName("validate");T.validateName=O;const C={gen:E,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:T.schema,code:(0,e.stringify)(T.schema)}:{ref:T.schema}),validateName:O,ValidationError:v,schema:T.schema,schemaEnv:T,rootId:m,baseId:T.baseId||m,schemaPath:e.nil,errSchemaPath:T.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let $;try{this._compilations.add(T),(0,a.validateFunctionCode)(C),E.optimize(this.opts.code.optimize);const B=E.toString();$=`${E.scopeRefs(r.default.scope)}return ${B}`,this.opts.code.process&&($=this.opts.code.process($,T));const U=new Function(`${r.default.self}`,`${r.default.scope}`,$)(this,this.scope.get());if(this.scope.value(O,{ref:U}),U.errors=null,U.schema=T.schema,U.schemaEnv=T,T.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:O,validateCode:B,scopeValues:E._values}),this.opts.unevaluated){const{props:k,items:te}=C;U.evaluated={props:k instanceof e.Name?void 0:k,items:te instanceof e.Name?void 0:te,dynamicProps:k instanceof e.Name,dynamicItems:te instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return T.validate=U,T}catch(B){throw delete T.validate,delete T.validateName,$&&this.logger.error("Error compiling schema, function code:",$),B}finally{this._compilations.delete(T)}}Hr.compileSchema=o;function u(T,P,m){var w;m=(0,n.resolveUrl)(this.opts.uriResolver,P,m);const I=T.refs[m];if(I)return I;let h=f.call(this,T,m);if(h===void 0){const E=(w=T.localRefs)===null||w===void 0?void 0:w[m],{schemaId:v}=this.opts;E&&(h=new s({schema:E,schemaId:v,root:T,baseId:P}))}if(h!==void 0)return T.refs[m]=l.call(this,h)}Hr.resolveRef=u;function l(T){return(0,n.inlineRef)(T.schema,this.opts.inlineRefs)?T.schema:T.validate?T:o.call(this,T)}function c(T){for(const P of this._compilations)if(d(P,T))return P}Hr.getCompilingSchema=c;function d(T,P){return T.schema===P.schema&&T.root===P.root&&T.baseId===P.baseId}function f(T,P){let m;for(;typeof(m=this.refs[P])=="string";)P=m;return m||this.schemas[P]||p.call(this,T,P)}function p(T,P){const m=this.opts.uriResolver.parse(P),w=(0,n._getFullPath)(this.opts.uriResolver,m);let I=(0,n.getFullPath)(this.opts.uriResolver,T.baseId,void 0);if(Object.keys(T.schema).length>0&&w===I)return g.call(this,m,T);const h=(0,n.normalizeId)(w),E=this.refs[h]||this.schemas[h];if(typeof E=="string"){const v=p.call(this,T,E);return typeof(v==null?void 0:v.schema)!="object"?void 0:g.call(this,m,v)}if(typeof(E==null?void 0:E.schema)=="object"){if(E.validate||o.call(this,E),h===(0,n.normalizeId)(P)){const{schema:v}=E,{schemaId:O}=this.opts,C=v[O];return C&&(I=(0,n.resolveUrl)(this.opts.uriResolver,I,C)),new s({schema:v,schemaId:O,root:T,baseId:I})}return g.call(this,m,E)}}Hr.resolveSchema=p;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(T,{baseId:P,schema:m,root:w}){var I;if(((I=T.fragment)===null||I===void 0?void 0:I[0])!=="/")return;for(const v of T.fragment.slice(1).split("/")){if(typeof m=="boolean")return;const O=m[(0,i.unescapeFragment)(v)];if(O===void 0)return;m=O;const C=typeof m=="object"&&m[this.opts.schemaId];!y.has(v)&&C&&(P=(0,n.resolveUrl)(this.opts.uriResolver,P,C))}let h;if(typeof m!="boolean"&&m.$ref&&!(0,i.schemaHasRulesButRef)(m,this.RULES)){const v=(0,n.resolveUrl)(this.opts.uriResolver,P,m.$ref);h=p.call(this,w,v)}const{schemaId:E}=this.opts;if(h=h||new s({schema:m,schemaId:E,root:w,baseId:P}),h.schema!==h.root.schema)return h}return Hr}const HH="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",VH="Meta-schema for $data reference (JSON AnySchema extension proposal)",GH="object",xH=["$data"],zH={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},WH=!1,YH={$id:HH,description:VH,type:GH,required:xH,properties:zH,additionalProperties:WH};var al={},Eo={exports:{}},cp,IS;function Ej(){if(IS)return cp;IS=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),r=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(h){let E="",v=0,O=0;for(O=0;O<h.length;O++)if(v=h[O].charCodeAt(0),v!==48){if(!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";E+=h[O];break}for(O+=1;O<h.length;O++){if(v=h[O].charCodeAt(0),!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";E+=h[O]}return E}const s=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(h){return h.length=0,!0}function u(h,E,v){if(h.length){const O=a(h);if(O!=="")E.push(O);else return v.error=!0,!1;h.length=0}return!0}function l(h){let E=0;const v={error:!1,address:"",zone:""},O=[],C=[];let $=!1,B=!1,V=u;for(let U=0;U<h.length;U++){const k=h[U];if(!(k==="["||k==="]"))if(k===":"){if($===!0&&(B=!0),!V(C,O,v))break;if(++E>7){v.error=!0;break}U>0&&h[U-1]===":"&&($=!0),O.push(":");continue}else if(k==="%"){if(!V(C,O,v))break;V=o}else{C.push(k);continue}}return C.length&&(V===o?v.zone=C.join(""):B?O.push(C.join("")):O.push(a(C))),v.address=O.join(""),v}function c(h){if(d(h,":")<2)return{host:h,isIPV6:!1};const E=l(h);if(E.error)return{host:h,isIPV6:!1};{let v=E.address,O=E.address;return E.zone&&(v+="%"+E.zone,O+="%25"+E.zone),{host:v,isIPV6:!0,escapedHost:O}}}function d(h,E){let v=0;for(let O=0;O<h.length;O++)h[O]===E&&v++;return v}function f(h){let E=h;const v=[];let O=-1,C=0;for(;C=E.length;){if(C===1){if(E===".")break;if(E==="/"){v.push("/");break}else{v.push(E);break}}else if(C===2){if(E[0]==="."){if(E[1]===".")break;if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&(E[1]==="."||E[1]==="/")){v.push("/");break}}else if(C===3&&E==="/.."){v.length!==0&&v.pop(),v.push("/");break}if(E[0]==="."){if(E[1]==="."){if(E[2]==="/"){E=E.slice(3);continue}}else if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&E[1]==="."){if(E[2]==="/"){E=E.slice(2);continue}else if(E[2]==="."&&E[3]==="/"){E=E.slice(3),v.length!==0&&v.pop();continue}}if((O=E.indexOf("/",1))===-1){v.push(E);break}else v.push(E.slice(0,O)),E=E.slice(O)}return v.join("")}const p={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},y=/[@/?#:]/g,g=/[@/?#]/g;function T(h,E){const v=E?g:y;return v.lastIndex=0,h.replace(v,O=>p[O])}function P(h,E=!1){if(h.indexOf("%")===-1)return h;let v="";for(let O=0;O<h.length;O++){if(h[O]==="%"&&O+2<h.length){const C=h.slice(O+1,O+3);if(r(C)){const $=C.toUpperCase(),B=String.fromCharCode(parseInt($,16));E&&n(B)?v+=B:v+="%"+$,O+=2;continue}}v+=h[O]}return v}function m(h){let E="";for(let v=0;v<h.length;v++){if(h[v]==="%"&&v+2<h.length){const O=h.slice(v+1,v+3);if(r(O)){const C=O.toUpperCase(),$=String.fromCharCode(parseInt(C,16));$!=="."&&n($)?E+=$:E+="%"+C,v+=2;continue}}i(h[v])?E+=h[v]:E+=escape(h[v])}return E}function w(h){let E="";for(let v=0;v<h.length;v++){if(h[v]==="%"&&v+2<h.length){const O=h.slice(v+1,v+3);if(r(O)){E+="%"+O.toUpperCase(),v+=2;continue}}E+=escape(h[v])}return E}function I(h){const E=[];if(h.userinfo!==void 0&&(E.push(h.userinfo),E.push("@")),h.host!==void 0){let v=unescape(h.host);if(!t(v)){const O=c(v);O.isIPV6===!0?v=`[${O.escapedHost}]`:v=T(v,!1)}E.push(v)}return(typeof h.port=="number"||typeof h.port=="string")&&(E.push(":"),E.push(String(h.port))),E.length?E.join(""):void 0}return cp={nonSimpleDomain:s,recomposeAuthority:I,reescapeHostDelimiters:T,normalizePercentEncoding:P,normalizePathEncoding:m,escapePreservingEscapes:w,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:a},cp}var lp,wS;function KH(){if(wS)return lp;wS=1;const{isUUID:e}=Ej(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(h){return r.indexOf(h)!==-1}function i(h){return h.secure===!0?!0:h.secure===!1?!1:h.scheme?h.scheme.length===3&&(h.scheme[0]==="w"||h.scheme[0]==="W")&&(h.scheme[1]==="s"||h.scheme[1]==="S")&&(h.scheme[2]==="s"||h.scheme[2]==="S"):!1}function a(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function s(h){const E=String(h.scheme).toLowerCase()==="https";return(h.port===(E?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function o(h){return h.secure=i(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function u(h){if((h.port===(i(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[E,v]=h.resourceName.split("?");h.path=E&&E!=="/"?E:void 0,h.query=v,h.resourceName=void 0}return h.fragment=void 0,h}function l(h,E){if(!h.path)return h.error="URN can not be parsed",h;const v=h.path.match(t);if(v){const O=E.scheme||h.scheme||"urn";h.nid=v[1].toLowerCase(),h.nss=v[2];const C=`${O}:${E.nid||h.nid}`,$=I(C);h.path=void 0,$&&(h=$.parse(h,E))}else h.error=h.error||"URN can not be parsed.";return h}function c(h,E){if(h.nid===void 0)throw new Error("URN without nid cannot be serialized");const v=E.scheme||h.scheme||"urn",O=h.nid.toLowerCase(),C=`${v}:${E.nid||O}`,$=I(C);$&&(h=$.serialize(h,E));const B=h,V=h.nss;return B.path=`${O||E.nid}:${V}`,E.skipEscape=!0,B}function d(h,E){const v=h;return v.uuid=v.nss,v.nss=void 0,!E.tolerant&&(!v.uuid||!e(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function f(h){const E=h;return E.nss=(h.uuid||"").toLowerCase(),E}const p={scheme:"http",domainHost:!0,parse:a,serialize:s},y={scheme:"https",domainHost:p.domainHost,parse:a,serialize:s},g={scheme:"ws",domainHost:!0,parse:o,serialize:u},T={scheme:"wss",domainHost:g.domainHost,parse:g.parse,serialize:g.serialize},w={http:p,https:y,ws:g,wss:T,urn:{scheme:"urn",parse:l,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0}};Object.setPrototypeOf(w,null);function I(h){return h&&(w[h]||w[h.toLowerCase()])||void 0}return lp={wsIsSecure:i,SCHEMES:w,isValidSchemeName:n,getSchemeHandler:I},lp}var RS;function XH(){if(RS)return Eo.exports;RS=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:i,escapePreservingEscapes:a,reescapeHostDelimiters:s,isIPv4:o,nonSimpleDomain:u}=Ej(),{SCHEMES:l,getSchemeHandler:c}=KH();function d(O,C){return typeof O=="string"?O=I(O,C):typeof O=="object"&&(O=w(g(O,C),C)),O}function f(O,C,$){const B=$?Object.assign({scheme:"null"},$):{scheme:"null"},V=p(w(O,B),w(C,B),B,!0);return B.skipEscape=!0,g(V,B)}function p(O,C,$,B){const V={};return B||(O=w(g(O,$),$),C=w(g(C,$),$)),$=$||{},!$.tolerant&&C.scheme?(V.scheme=C.scheme,V.userinfo=C.userinfo,V.host=C.host,V.port=C.port,V.path=t(C.path||""),V.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(V.userinfo=C.userinfo,V.host=C.host,V.port=C.port,V.path=t(C.path||""),V.query=C.query):(C.path?(C.path[0]==="/"?V.path=t(C.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?V.path="/"+C.path:O.path?V.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+C.path:V.path=C.path,V.path=t(V.path)),V.query=C.query):(V.path=O.path,C.query!==void 0?V.query=C.query:V.query=O.query),V.userinfo=O.userinfo,V.host=O.host,V.port=O.port),V.scheme=O.scheme),V.fragment=C.fragment,V}function y(O,C,$){const B=E(O,$),V=E(C,$);return B!==void 0&&V!==void 0&&B.toLowerCase()===V.toLowerCase()}function g(O,C){const $={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},B=Object.assign({},C),V=[],U=c(B.scheme||$.scheme);U&&U.serialize&&U.serialize($,B),$.path!==void 0&&(B.skipEscape?$.path=n($.path):($.path=a($.path),$.scheme!==void 0&&($.path=$.path.split("%3A").join(":")))),B.reference!=="suffix"&&$.scheme&&V.push($.scheme,":");const k=r($);if(k!==void 0&&(B.reference!=="suffix"&&V.push("//"),V.push(k),$.path&&$.path[0]!=="/"&&V.push("/")),$.path!==void 0){let te=$.path;!B.absolutePath&&(!U||!U.absolutePath)&&(te=t(te)),k===void 0&&te[0]==="/"&&te[1]==="/"&&(te="/%2F"+te.slice(2)),V.push(te)}return $.query!==void 0&&V.push("?",$.query),$.fragment!==void 0&&V.push("#",$.fragment),V.join("")}const T=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function P(O,C){if(C[2]!==void 0&&O.path&&O.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof O.port=="number"&&(O.port<0||O.port>65535))return"URI port is malformed."}function m(O,C){const $=Object.assign({},C),B={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let V=!1,U=!1;$.reference==="suffix"&&($.scheme?O=$.scheme+":"+O:O="//"+O);const k=O.match(T);if(k){B.scheme=k[1],B.userinfo=k[3],B.host=k[4],B.port=parseInt(k[5],10),B.path=k[6]||"",B.query=k[7],B.fragment=k[8],isNaN(B.port)&&(B.port=k[5]);const te=P(B,k);if(te!==void 0&&(B.error=B.error||te,V=!0),B.host)if(o(B.host)===!1){const Q=e(B.host);B.host=Q.host.toLowerCase(),U=Q.isIPV6}else U=!0;B.scheme===void 0&&B.userinfo===void 0&&B.host===void 0&&B.port===void 0&&B.query===void 0&&!B.path?B.reference="same-document":B.scheme===void 0?B.reference="relative":B.fragment===void 0?B.reference="absolute":B.reference="uri",$.reference&&$.reference!=="suffix"&&$.reference!==B.reference&&(B.error=B.error||"URI is not a "+$.reference+" reference.");const ie=c($.scheme||B.scheme);if(!$.unicodeSupport&&(!ie||!ie.unicodeSupport)&&B.host&&($.domainHost||ie&&ie.domainHost)&&U===!1&&u(B.host))try{B.host=new URL("http://"+B.host).hostname}catch(J){B.error=B.error||"Host's domain name can not be converted to ASCII: "+J}if((!ie||ie&&!ie.skipNormalize)&&(O.indexOf("%")!==-1&&(B.scheme!==void 0&&(B.scheme=unescape(B.scheme)),B.host!==void 0&&(B.host=s(unescape(B.host),U))),B.path&&(B.path=i(B.path)),B.fragment))try{B.fragment=encodeURI(decodeURIComponent(B.fragment))}catch{B.error=B.error||"URI malformed"}ie&&ie.parse&&ie.parse(B,$)}else B.error=B.error||"URI can not be parsed.";return{parsed:B,malformedAuthorityOrPort:V}}function w(O,C){return m(O,C).parsed}function I(O,C){return h(O,C).normalized}function h(O,C){const{parsed:$,malformedAuthorityOrPort:B}=m(O,C);return{normalized:B?O:g($,C),malformedAuthorityOrPort:B}}function E(O,C){if(typeof O=="string"){const{normalized:$,malformedAuthorityOrPort:B}=h(O,C);return B?void 0:$}if(typeof O=="object")return g(O,C)}const v={SCHEMES:l,normalize:d,resolve:f,resolveComponent:p,equal:y,serialize:g,parse:w};return Eo.exports=v,Eo.exports.default=v,Eo.exports.fastUri=v,Eo.exports}var AS;function JH(){if(AS)return al;AS=1,Object.defineProperty(al,"__esModule",{value:!0});const e=XH();return e.code='require("ajv/dist/runtime/uri").default',al.default=e,al}var OS;function QH(){return OS||(OS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=xu();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Ke();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Tv(),i=Zd(),a=gj(),s=Iv(),o=Ke(),u=Qd(),l=Dd(),c=pt(),d=YH,f=JH(),p=(q,D)=>new RegExp(q,D);p.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),T={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},P={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},m=200;function w(q){var D,F,W,N,L,ee,Ee,he,be,Ie,ae,ce,fe,pe,ve,Ae,ke,We,et,Xe,ut,Ft,It,tr,wt;const mr=q.strict,hr=(D=q.code)===null||D===void 0?void 0:D.optimize,ht=hr===!0||hr===void 0?1:hr||0,Ur=(W=(F=q.code)===null||F===void 0?void 0:F.regExp)!==null&&W!==void 0?W:p,j=(N=q.uriResolver)!==null&&N!==void 0?N:f.default;return{strictSchema:(ee=(L=q.strictSchema)!==null&&L!==void 0?L:mr)!==null&&ee!==void 0?ee:!0,strictNumbers:(he=(Ee=q.strictNumbers)!==null&&Ee!==void 0?Ee:mr)!==null&&he!==void 0?he:!0,strictTypes:(Ie=(be=q.strictTypes)!==null&&be!==void 0?be:mr)!==null&&Ie!==void 0?Ie:"log",strictTuples:(ce=(ae=q.strictTuples)!==null&&ae!==void 0?ae:mr)!==null&&ce!==void 0?ce:"log",strictRequired:(pe=(fe=q.strictRequired)!==null&&fe!==void 0?fe:mr)!==null&&pe!==void 0?pe:!1,code:q.code?{...q.code,optimize:ht,regExp:Ur}:{optimize:ht,regExp:Ur},loopRequired:(ve=q.loopRequired)!==null&&ve!==void 0?ve:m,loopEnum:(Ae=q.loopEnum)!==null&&Ae!==void 0?Ae:m,meta:(ke=q.meta)!==null&&ke!==void 0?ke:!0,messages:(We=q.messages)!==null&&We!==void 0?We:!0,inlineRefs:(et=q.inlineRefs)!==null&&et!==void 0?et:!0,schemaId:(Xe=q.schemaId)!==null&&Xe!==void 0?Xe:"$id",addUsedSchema:(ut=q.addUsedSchema)!==null&&ut!==void 0?ut:!0,validateSchema:(Ft=q.validateSchema)!==null&&Ft!==void 0?Ft:!0,validateFormats:(It=q.validateFormats)!==null&&It!==void 0?It:!0,unicodeRegExp:(tr=q.unicodeRegExp)!==null&&tr!==void 0?tr:!0,int32range:(wt=q.int32range)!==null&&wt!==void 0?wt:!0,uriResolver:j}}class I{constructor(D={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...w(D)};const{es5:F,lines:W}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:g,es5:F,lines:W}),this.logger=V(D.logger);const N=D.validateFormats;D.validateFormats=!1,this.RULES=(0,a.getRules)(),h.call(this,T,D,"NOT SUPPORTED"),h.call(this,P,D,"DEPRECATED","warn"),this._metaOpts=$.call(this),D.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&C.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),v.call(this),D.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:F,schemaId:W}=this.opts;let N=d;W==="id"&&(N={...d},N.id=N.$id,delete N.$id),F&&D&&this.addMetaSchema(N,N[W],!1)}defaultMeta(){const{meta:D,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[F]||D:void 0}validate(D,F){let W;if(typeof D=="string"){if(W=this.getSchema(D),!W)throw new Error(`no schema with key or ref "${D}"`)}else W=this.compile(D);const N=W(F);return"$async"in W||(this.errors=W.errors),N}compile(D,F){const W=this._addSchema(D,F);return W.validate||this._compileSchemaEnv(W)}compileAsync(D,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:W}=this.opts;return N.call(this,D,F);async function N(Ie,ae){await L.call(this,Ie.$schema);const ce=this._addSchema(Ie,ae);return ce.validate||ee.call(this,ce)}async function L(Ie){Ie&&!this.getSchema(Ie)&&await N.call(this,{$ref:Ie},!0)}async function ee(Ie){try{return this._compileSchemaEnv(Ie)}catch(ae){if(!(ae instanceof i.default))throw ae;return Ee.call(this,ae),await he.call(this,ae.missingSchema),ee.call(this,Ie)}}function Ee({missingSchema:Ie,missingRef:ae}){if(this.refs[Ie])throw new Error(`AnySchema ${Ie} is loaded but ${ae} cannot be resolved`)}async function he(Ie){const ae=await be.call(this,Ie);this.refs[Ie]||await L.call(this,ae.$schema),this.refs[Ie]||this.addSchema(ae,Ie,F)}async function be(Ie){const ae=this._loading[Ie];if(ae)return ae;try{return await(this._loading[Ie]=W(Ie))}finally{delete this._loading[Ie]}}}addSchema(D,F,W,N=this.opts.validateSchema){if(Array.isArray(D)){for(const ee of D)this.addSchema(ee,void 0,W,N);return this}let L;if(typeof D=="object"){const{schemaId:ee}=this.opts;if(L=D[ee],L!==void 0&&typeof L!="string")throw new Error(`schema ${ee} must be string`)}return F=(0,u.normalizeId)(F||L),this._checkUnique(F),this.schemas[F]=this._addSchema(D,W,F,N,!0),this}addMetaSchema(D,F,W=this.opts.validateSchema){return this.addSchema(D,F,!0,W),this}validateSchema(D,F){if(typeof D=="boolean")return!0;let W;if(W=D.$schema,W!==void 0&&typeof W!="string")throw new Error("$schema must be a string");if(W=W||this.opts.defaultMeta||this.defaultMeta(),!W)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(W,D);if(!N&&F){const L="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(L);else throw new Error(L)}return N}getSchema(D){let F;for(;typeof(F=E.call(this,D))=="string";)D=F;if(F===void 0){const{schemaId:W}=this.opts,N=new s.SchemaEnv({schema:{},schemaId:W});if(F=s.resolveSchema.call(this,N,D),!F)return;this.refs[D]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=E.call(this,D);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const F=D;this._cache.delete(F);let W=D[this.opts.schemaId];return W&&(W=(0,u.normalizeId)(W),delete this.schemas[W],delete this.refs[W]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(const F of D)this.addKeyword(F);return this}addKeyword(D,F){let W;if(typeof D=="string")W=D,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=W);else if(typeof D=="object"&&F===void 0){if(F=D,W=F.keyword,Array.isArray(W)&&!W.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(k.call(this,W,F),!F)return(0,c.eachItem)(W,L=>te.call(this,L)),this;J.call(this,F);const N={...F,type:(0,l.getJSONTypes)(F.type),schemaType:(0,l.getJSONTypes)(F.schemaType)};return(0,c.eachItem)(W,N.type.length===0?L=>te.call(this,L,N):L=>N.type.forEach(ee=>te.call(this,L,N,ee))),this}getKeyword(D){const F=this.RULES.all[D];return typeof F=="object"?F.definition:!!F}removeKeyword(D){const{RULES:F}=this;delete F.keywords[D],delete F.all[D];for(const W of F.rules){const N=W.rules.findIndex(L=>L.keyword===D);N>=0&&W.rules.splice(N,1)}return this}addFormat(D,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[D]=F,this}errorsText(D=this.errors,{separator:F=", ",dataVar:W="data"}={}){return!D||D.length===0?"No errors":D.map(N=>`${W}${N.instancePath} ${N.message}`).reduce((N,L)=>N+F+L)}$dataMetaSchema(D,F){const W=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const N of F){const L=N.split("/").slice(1);let ee=D;for(const Ee of L)ee=ee[Ee];for(const Ee in W){const he=W[Ee];if(typeof he!="object")continue;const{$data:be}=he.definition,Ie=ee[Ee];be&&Ie&&(ee[Ee]=K(Ie))}}return D}_removeAllSchemas(D,F){for(const W in D){const N=D[W];(!F||F.test(W))&&(typeof N=="string"?delete D[W]:N&&!N.meta&&(this._cache.delete(N.schema),delete D[W]))}}_addSchema(D,F,W,N=this.opts.validateSchema,L=this.opts.addUsedSchema){let ee;const{schemaId:Ee}=this.opts;if(typeof D=="object")ee=D[Ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof D!="boolean")throw new Error("schema must be object or boolean")}let he=this._cache.get(D);if(he!==void 0)return he;W=(0,u.normalizeId)(ee||W);const be=u.getSchemaRefs.call(this,D,W);return he=new s.SchemaEnv({schema:D,schemaId:Ee,meta:F,baseId:W,localRefs:be}),this._cache.set(he.schema,he),L&&!W.startsWith("#")&&(W&&this._checkUnique(W),this.refs[W]=he),N&&this.validateSchema(D,!0),he}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw new Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta?this._compileMetaSchema(D):s.compileSchema.call(this,D),!D.validate)throw new Error("ajv implementation error");return D.validate}_compileMetaSchema(D){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,D)}finally{this.opts=F}}}I.ValidationError=n.default,I.MissingRefError=i.default,e.default=I;function h(q,D,F,W="error"){for(const N in q){const L=N;L in D&&this.logger[W](`${F}: option ${N}. ${q[L]}`)}}function E(q){return q=(0,u.normalizeId)(q),this.schemas[q]||this.refs[q]}function v(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const D in q)this.addSchema(q[D],D)}function O(){for(const q in this.opts.formats){const D=this.opts.formats[q];D&&this.addFormat(q,D)}}function C(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in q){const F=q[D];F.keyword||(F.keyword=D),this.addKeyword(F)}}function $(){const q={...this.opts};for(const D of y)delete q[D];return q}const B={log(){},warn(){},error(){}};function V(q){if(q===!1)return B;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function k(q,D){const{RULES:F}=this;if((0,c.eachItem)(q,W=>{if(F.keywords[W])throw new Error(`Keyword ${W} is already defined`);if(!U.test(W))throw new Error(`Keyword ${W} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function te(q,D,F){var W;const N=D==null?void 0:D.post;if(F&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:L}=this;let ee=N?L.post:L.rules.find(({type:he})=>he===F);if(ee||(ee={type:F,rules:[]},L.rules.push(ee)),L.keywords[q]=!0,!D)return;const Ee={keyword:q,definition:{...D,type:(0,l.getJSONTypes)(D.type),schemaType:(0,l.getJSONTypes)(D.schemaType)}};D.before?ie.call(this,ee,Ee,D.before):ee.rules.push(Ee),L.all[q]=Ee,(W=D.implements)===null||W===void 0||W.forEach(he=>this.addKeyword(he))}function ie(q,D,F){const W=q.rules.findIndex(N=>N.keyword===F);W>=0?q.rules.splice(W,0,D):(q.rules.push(D),this.logger.warn(`rule ${F} is not defined`))}function J(q){let{metaSchema:D}=q;D!==void 0&&(q.$data&&this.opts.$data&&(D=K(D)),q.validateSchema=this.compile(D,!0))}const Q={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function K(q){return{anyOf:[q,Q]}}})(rp)),rp}var sl={},ol={},ul={},PS;function ZH(){if(PS)return ul;PS=1,Object.defineProperty(ul,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return ul.default=e,ul}var _i={},NS;function eV(){if(NS)return _i;NS=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.callRef=_i.getValidate=void 0;const e=Zd(),t=_n(),r=Ke(),n=pi(),i=Iv(),a=pt(),s={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:d,it:f}=l,{baseId:p,schemaEnv:y,validateName:g,opts:T,self:P}=f,{root:m}=y;if((d==="#"||d==="#/")&&p===m.baseId)return I();const w=i.resolveRef.call(P,m,p,d);if(w===void 0)throw new e.default(f.opts.uriResolver,p,d);if(w instanceof i.SchemaEnv)return h(w);return E(w);function I(){if(y===m)return u(l,g,y,y.$async);const v=c.scopeValue("root",{ref:m});return u(l,(0,r._)`${v}.validate`,m,m.$async)}function h(v){const O=o(l,v);u(l,O,v,v.$async)}function E(v){const O=c.scopeValue("schema",T.code.source===!0?{ref:v,code:(0,r.stringify)(v)}:{ref:v}),C=c.name("valid"),$=l.subschema({schema:v,dataTypes:[],schemaPath:r.nil,topSchemaRef:O,errSchemaPath:d},C);l.mergeEvaluated($),l.ok(C)}}};function o(l,c){const{gen:d}=l;return c.validate?d.scopeValue("validate",{ref:c.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:c})}.validate`}_i.getValidate=o;function u(l,c,d,f){const{gen:p,it:y}=l,{allErrors:g,schemaEnv:T,opts:P}=y,m=P.passContext?n.default.this:r.nil;f?w():I();function w(){if(!T.$async)throw new Error("async schema referenced by sync schema");const v=p.let("valid");p.try(()=>{p.code((0,r._)`await ${(0,t.callValidateCode)(l,c,m)}`),E(c),g||p.assign(v,!0)},O=>{p.if((0,r._)`!(${O} instanceof ${y.ValidationError})`,()=>p.throw(O)),h(O),g||p.assign(v,!1)}),l.ok(v)}function I(){l.result((0,t.callValidateCode)(l,c,m),()=>E(c),()=>h(c))}function h(v){const O=(0,r._)`${v}.errors`;p.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${O} : ${n.default.vErrors}.concat(${O})`),p.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function E(v){var O;if(!y.opts.unevaluated)return;const C=(O=d==null?void 0:d.validate)===null||O===void 0?void 0:O.evaluated;if(y.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(y.props=a.mergeEvaluated.props(p,C.props,y.props));else{const $=p.var("props",(0,r._)`${v}.evaluated.props`);y.props=a.mergeEvaluated.props(p,$,y.props,r.Name)}if(y.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(y.items=a.mergeEvaluated.items(p,C.items,y.items));else{const $=p.var("items",(0,r._)`${v}.evaluated.items`);y.items=a.mergeEvaluated.items(p,$,y.items,r.Name)}}}return _i.callRef=u,_i.default=s,_i}var CS;function tV(){if(CS)return ol;CS=1,Object.defineProperty(ol,"__esModule",{value:!0});const e=ZH(),t=eV(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ol.default=r,ol}var cl={},ll={},MS;function rV(){if(MS)return ll;MS=1,Object.defineProperty(ll,"__esModule",{value:!0});const e=Ke(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:a,schemaCode:s})=>(0,e.str)`must be ${r[a].okStr} ${s}`,params:({keyword:a,schemaCode:s})=>(0,e._)`{comparison: ${r[a].okStr}, limit: ${s}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:s,data:o,schemaCode:u}=a;a.fail$data((0,e._)`${o} ${r[s].fail} ${u} || isNaN(${o})`)}};return ll.default=i,ll}var dl={},jS;function nV(){if(jS)return dl;jS=1,Object.defineProperty(dl,"__esModule",{value:!0});const e=Ke(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:a,schemaCode:s,it:o}=n,u=o.opts.multipleOfPrecision,l=i.let("res"),c=u?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${s} === 0 || (${l} = ${a}/${s}, ${c}))`)}};return dl.default=r,dl}var fl={},pl={},DS;function iV(){if(DS)return pl;DS=1,Object.defineProperty(pl,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,a;for(;i<r;)n++,a=t.charCodeAt(i++),a>=55296&&a<=56319&&i<r&&(a=t.charCodeAt(i),(a&64512)===56320&&i++);return n}return pl.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',pl}var LS;function aV(){if(LS)return fl;LS=1,Object.defineProperty(fl,"__esModule",{value:!0});const e=Ke(),t=pt(),r=iV(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:s}){const o=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:s,data:o,schemaCode:u,it:l}=a,c=s==="maxLength"?e.operators.GT:e.operators.LT,d=l.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(a.gen,r.default)}(${o})`;a.fail$data((0,e._)`${d} ${c} ${u}`)}};return fl.default=i,fl}var ml={},$S;function sV(){if($S)return ml;$S=1,Object.defineProperty(ml,"__esModule",{value:!0});const e=_n(),t=pt(),r=Ke(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,r.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,r._)`{pattern: ${a}}`},code(a){const{gen:s,data:o,$data:u,schema:l,schemaCode:c,it:d}=a,f=d.opts.unicodeRegExp?"u":"";if(u){const{regExp:p}=d.opts.code,y=p.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(s,p),g=s.let("valid");s.try(()=>s.assign(g,(0,r._)`${y}(${c}, ${f}).test(${o})`),()=>s.assign(g,!1)),a.fail$data((0,r._)`!${g}`)}else{const p=(0,e.usePattern)(a,l);a.fail$data((0,r._)`!${p}.test(${o})`)}}};return ml.default=i,ml}var hl={},qS;function oV(){if(qS)return hl;qS=1,Object.defineProperty(hl,"__esModule",{value:!0});const e=Ke(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:s}=n,o=i==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${a}).length ${o} ${s}`)}};return hl.default=r,hl}var yl={},kS;function uV(){if(kS)return yl;kS=1,Object.defineProperty(yl,"__esModule",{value:!0});const e=_n(),t=Ke(),r=pt(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,t.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,t._)`{missingProperty: ${a}}`},code(a){const{gen:s,schema:o,schemaCode:u,data:l,$data:c,it:d}=a,{opts:f}=d;if(!c&&o.length===0)return;const p=o.length>=f.loopRequired;if(d.allErrors?y():g(),f.strictRequired){const m=a.parentSchema.properties,{definedProperties:w}=a.it;for(const I of o)if((m==null?void 0:m[I])===void 0&&!w.has(I)){const h=d.schemaEnv.baseId+d.errSchemaPath,E=`required property "${I}" is not defined at "${h}" (strictRequired)`;(0,r.checkStrictMode)(d,E,d.opts.strictRequired)}}function y(){if(p||c)a.block$data(t.nil,T);else for(const m of o)(0,e.checkReportMissingProp)(a,m)}function g(){const m=s.let("missing");if(p||c){const w=s.let("valid",!0);a.block$data(w,()=>P(m,w)),a.ok(w)}else s.if((0,e.checkMissingProp)(a,o,m)),(0,e.reportMissingProp)(a,m),s.else()}function T(){s.forOf("prop",u,m=>{a.setParams({missingProperty:m}),s.if((0,e.noPropertyInData)(s,l,m,f.ownProperties),()=>a.error())})}function P(m,w){a.setParams({missingProperty:m}),s.forOf(m,u,()=>{s.assign(w,(0,e.propertyInData)(s,l,m,f.ownProperties)),s.if((0,t.not)(w),()=>{a.error(),s.break()})},t.nil)}}};return yl.default=i,yl}var gl={},BS;function cV(){if(BS)return gl;BS=1,Object.defineProperty(gl,"__esModule",{value:!0});const e=Ke(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:s}=n,o=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${a}.length ${o} ${s}`)}};return gl.default=r,gl}var _l={},El={},US;function wv(){if(US)return El;US=1,Object.defineProperty(El,"__esModule",{value:!0});const e=Sv();return e.code='require("ajv/dist/runtime/equal").default',El.default=e,El}var FS;function lV(){if(FS)return _l;FS=1,Object.defineProperty(_l,"__esModule",{value:!0});const e=Dd(),t=Ke(),r=pt(),n=wv(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${s} are identical)`,params:({params:{i:s,j:o}})=>(0,t._)`{i: ${s}, j: ${o}}`},code(s){const{gen:o,data:u,$data:l,schema:c,parentSchema:d,schemaCode:f,it:p}=s;if(!l&&!c)return;const y=o.let("valid"),g=d.items?(0,e.getSchemaTypes)(d.items):[];s.block$data(y,T,(0,t._)`${f} === false`),s.ok(y);function T(){const I=o.let("i",(0,t._)`${u}.length`),h=o.let("j");s.setParams({i:I,j:h}),o.assign(y,!0),o.if((0,t._)`${I} > 1`,()=>(P()?m:w)(I,h))}function P(){return g.length>0&&!g.some(I=>I==="object"||I==="array")}function m(I,h){const E=o.name("item"),v=(0,e.checkDataTypes)(g,E,p.opts.strictNumbers,e.DataType.Wrong),O=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${I}--;`,()=>{o.let(E,(0,t._)`${u}[${I}]`),o.if(v,(0,t._)`continue`),g.length>1&&o.if((0,t._)`typeof ${E} == "string"`,(0,t._)`${E} += "_"`),o.if((0,t._)`typeof ${O}[${E}] == "number"`,()=>{o.assign(h,(0,t._)`${O}[${E}]`),s.error(),o.assign(y,!1).break()}).code((0,t._)`${O}[${E}] = ${I}`)})}function w(I,h){const E=(0,r.useFunc)(o,n.default),v=o.name("outer");o.label(v).for((0,t._)`;${I}--;`,()=>o.for((0,t._)`${h} = ${I}; ${h}--;`,()=>o.if((0,t._)`${E}(${u}[${I}], ${u}[${h}])`,()=>{s.error(),o.assign(y,!1).break(v)})))}}};return _l.default=a,_l}var vl={},HS;function dV(){if(HS)return vl;HS=1,Object.defineProperty(vl,"__esModule",{value:!0});const e=Ke(),t=pt(),r=wv(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},code(a){const{gen:s,data:o,$data:u,schemaCode:l,schema:c}=a;u||c&&typeof c=="object"?a.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${o}, ${l})`):a.fail((0,e._)`${c} !== ${o}`)}};return vl.default=i,vl}var bl={},VS;function fV(){if(VS)return bl;VS=1,Object.defineProperty(bl,"__esModule",{value:!0});const e=Ke(),t=pt(),r=wv(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},code(a){const{gen:s,data:o,$data:u,schema:l,schemaCode:c,it:d}=a;if(!u&&l.length===0)throw new Error("enum must have non-empty array");const f=l.length>=d.opts.loopEnum;let p;const y=()=>p??(p=(0,t.useFunc)(s,r.default));let g;if(f||u)g=s.let("valid"),a.block$data(g,T);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const m=s.const("vSchema",c);g=(0,e.or)(...l.map((w,I)=>P(m,I)))}a.pass(g);function T(){s.assign(g,!1),s.forOf("v",c,m=>s.if((0,e._)`${y()}(${o}, ${m})`,()=>s.assign(g,!0).break()))}function P(m,w){const I=l[w];return typeof I=="object"&&I!==null?(0,e._)`${y()}(${o}, ${m}[${w}])`:(0,e._)`${o} === ${I}`}}};return bl.default=i,bl}var GS;function pV(){if(GS)return cl;GS=1,Object.defineProperty(cl,"__esModule",{value:!0});const e=rV(),t=nV(),r=aV(),n=sV(),i=oV(),a=uV(),s=cV(),o=lV(),u=dV(),l=fV(),c=[e.default,t.default,r.default,n.default,i.default,a.default,s.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];return cl.default=c,cl}var Sl={},ss={},xS;function vj(){if(xS)return ss;xS=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.validateAdditionalItems=void 0;const e=Ke(),t=pt(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{parentSchema:s,it:o}=a,{items:u}=s;if(!Array.isArray(u)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(a,u)}};function i(a,s){const{gen:o,schema:u,data:l,keyword:c,it:d}=a;d.items=!0;const f=o.const("len",(0,e._)`${l}.length`);if(u===!1)a.setParams({len:s.length}),a.pass((0,e._)`${f} <= ${s.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(d,u)){const y=o.var("valid",(0,e._)`${f} <= ${s.length}`);o.if((0,e.not)(y),()=>p(y)),a.ok(y)}function p(y){o.forRange("i",s.length,f,g=>{a.subschema({keyword:c,dataProp:g,dataPropType:t.Type.Num},y),d.allErrors||o.if((0,e.not)(y),()=>o.break())})}}return ss.validateAdditionalItems=i,ss.default=n,ss}var Tl={},os={},zS;function bj(){if(zS)return os;zS=1,Object.defineProperty(os,"__esModule",{value:!0}),os.validateTuple=void 0;const e=Ke(),t=pt(),r=_n(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:s,it:o}=a;if(Array.isArray(s))return i(a,"additionalItems",s);o.items=!0,!(0,t.alwaysValidSchema)(o,s)&&a.ok((0,r.validateArray)(a))}};function i(a,s,o=a.schema){const{gen:u,parentSchema:l,data:c,keyword:d,it:f}=a;g(l),f.opts.unevaluated&&o.length&&f.items!==!0&&(f.items=t.mergeEvaluated.items(u,o.length,f.items));const p=u.name("valid"),y=u.const("len",(0,e._)`${c}.length`);o.forEach((T,P)=>{(0,t.alwaysValidSchema)(f,T)||(u.if((0,e._)`${y} > ${P}`,()=>a.subschema({keyword:d,schemaProp:P,dataProp:P},p)),a.ok(p))});function g(T){const{opts:P,errSchemaPath:m}=f,w=o.length,I=w===T.minItems&&(w===T.maxItems||T[s]===!1);if(P.strictTuples&&!I){const h=`"${d}" is ${w}-tuple, but minItems or maxItems/${s} are not specified or different at path "${m}"`;(0,t.checkStrictMode)(f,h,P.strictTuples)}}}return os.validateTuple=i,os.default=n,os}var WS;function mV(){if(WS)return Tl;WS=1,Object.defineProperty(Tl,"__esModule",{value:!0});const e=bj(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Tl.default=t,Tl}var Il={},YS;function hV(){if(YS)return Il;YS=1,Object.defineProperty(Il,"__esModule",{value:!0});const e=Ke(),t=pt(),r=_n(),n=vj(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:o,parentSchema:u,it:l}=s,{prefixItems:c}=u;l.items=!0,!(0,t.alwaysValidSchema)(l,o)&&(c?(0,n.validateAdditionalItems)(s,c):s.ok((0,r.validateArray)(s)))}};return Il.default=a,Il}var wl={},KS;function yV(){if(KS)return wl;KS=1,Object.defineProperty(wl,"__esModule",{value:!0});const e=Ke(),t=pt(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:a}})=>a===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${a} valid item(s)`,params:({params:{min:i,max:a}})=>a===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${a}}`},code(i){const{gen:a,schema:s,parentSchema:o,data:u,it:l}=i;let c,d;const{minContains:f,maxContains:p}=o;l.opts.next?(c=f===void 0?1:f,d=p):c=1;const y=a.const("len",(0,e._)`${u}.length`);if(i.setParams({min:c,max:d}),d===void 0&&c===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&c>d){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(l,s)){let w=(0,e._)`${y} >= ${c}`;d!==void 0&&(w=(0,e._)`${w} && ${y} <= ${d}`),i.pass(w);return}l.items=!0;const g=a.name("valid");d===void 0&&c===1?P(g,()=>a.if(g,()=>a.break())):c===0?(a.let(g,!0),d!==void 0&&a.if((0,e._)`${u}.length > 0`,T)):(a.let(g,!1),T()),i.result(g,()=>i.reset());function T(){const w=a.name("_valid"),I=a.let("count",0);P(w,()=>a.if(w,()=>m(I)))}function P(w,I){a.forRange("i",0,y,h=>{i.subschema({keyword:"contains",dataProp:h,dataPropType:t.Type.Num,compositeRule:!0},w),I()})}function m(w){a.code((0,e._)`${w}++`),d===void 0?a.if((0,e._)`${w} >= ${c}`,()=>a.assign(g,!0).break()):(a.if((0,e._)`${w} > ${d}`,()=>a.assign(g,!1).break()),c===1?a.assign(g,!0):a.if((0,e._)`${w} >= ${c}`,()=>a.assign(g,!0)))}}};return wl.default=n,wl}var dp={},XS;function gV(){return XS||(XS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ke(),r=pt(),n=_n();e.error={message:({params:{property:u,depsCount:l,deps:c}})=>{const d=l===1?"property":"properties";return(0,t.str)`must have ${d} ${c} when property ${u} is present`},params:({params:{property:u,depsCount:l,deps:c,missingProperty:d}})=>(0,t._)`{property: ${u},
|
|
55
|
+
missingProperty: ${d},
|
|
56
|
+
depsCount: ${l},
|
|
57
|
+
deps: ${c}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[l,c]=a(u);s(u,l),o(u,c)}};function a({schema:u}){const l={},c={};for(const d in u){if(d==="__proto__")continue;const f=Array.isArray(u[d])?l:c;f[d]=u[d]}return[l,c]}function s(u,l=u.schema){const{gen:c,data:d,it:f}=u;if(Object.keys(l).length===0)return;const p=c.let("missing");for(const y in l){const g=l[y];if(g.length===0)continue;const T=(0,n.propertyInData)(c,d,y,f.opts.ownProperties);u.setParams({property:y,depsCount:g.length,deps:g.join(", ")}),f.allErrors?c.if(T,()=>{for(const P of g)(0,n.checkReportMissingProp)(u,P)}):(c.if((0,t._)`${T} && (${(0,n.checkMissingProp)(u,g,p)})`),(0,n.reportMissingProp)(u,p),c.else())}}e.validatePropertyDeps=s;function o(u,l=u.schema){const{gen:c,data:d,keyword:f,it:p}=u,y=c.name("valid");for(const g in l)(0,r.alwaysValidSchema)(p,l[g])||(c.if((0,n.propertyInData)(c,d,g,p.opts.ownProperties),()=>{const T=u.subschema({keyword:f,schemaProp:g},y);u.mergeValidEvaluated(T,y)},()=>c.var(y,!0)),u.ok(y))}e.validateSchemaDeps=o,e.default=i})(dp)),dp}var Rl={},JS;function _V(){if(JS)return Rl;JS=1,Object.defineProperty(Rl,"__esModule",{value:!0});const e=Ke(),t=pt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:a,schema:s,data:o,it:u}=i;if((0,t.alwaysValidSchema)(u,s))return;const l=a.name("valid");a.forIn("key",o,c=>{i.setParams({propertyName:c}),i.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},l),a.if((0,e.not)(l),()=>{i.error(!0),u.allErrors||a.break()})}),i.ok(l)}};return Rl.default=n,Rl}var Al={},QS;function Sj(){if(QS)return Al;QS=1,Object.defineProperty(Al,"__esModule",{value:!0});const e=_n(),t=Ke(),r=pi(),n=pt(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:o,schema:u,parentSchema:l,data:c,errsCount:d,it:f}=s;if(!d)throw new Error("ajv implementation error");const{allErrors:p,opts:y}=f;if(f.props=!0,y.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(f,u))return;const g=(0,e.allSchemaProperties)(l.properties),T=(0,e.allSchemaProperties)(l.patternProperties);P(),s.ok((0,t._)`${d} === ${r.default.errors}`);function P(){o.forIn("key",c,E=>{!g.length&&!T.length?I(E):o.if(m(E),()=>I(E))})}function m(E){let v;if(g.length>8){const O=(0,n.schemaRefOrVal)(f,l.properties,"properties");v=(0,e.isOwnProperty)(o,O,E)}else g.length?v=(0,t.or)(...g.map(O=>(0,t._)`${E} === ${O}`)):v=t.nil;return T.length&&(v=(0,t.or)(v,...T.map(O=>(0,t._)`${(0,e.usePattern)(s,O)}.test(${E})`))),(0,t.not)(v)}function w(E){o.code((0,t._)`delete ${c}[${E}]`)}function I(E){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){w(E);return}if(u===!1){s.setParams({additionalProperty:E}),s.error(),p||o.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(f,u)){const v=o.name("valid");y.removeAdditional==="failing"?(h(E,v,!1),o.if((0,t.not)(v),()=>{s.reset(),w(E)})):(h(E,v),p||o.if((0,t.not)(v),()=>o.break()))}}function h(E,v,O){const C={keyword:"additionalProperties",dataProp:E,dataPropType:n.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(C,v)}}};return Al.default=a,Al}var Ol={},ZS;function EV(){if(ZS)return Ol;ZS=1,Object.defineProperty(Ol,"__esModule",{value:!0});const e=xu(),t=_n(),r=pt(),n=Sj(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:s,schema:o,parentSchema:u,data:l,it:c}=a;c.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(c,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(o);for(const T of d)c.definedProperties.add(T);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),c.props));const f=d.filter(T=>!(0,r.alwaysValidSchema)(c,o[T]));if(f.length===0)return;const p=s.name("valid");for(const T of f)y(T)?g(T):(s.if((0,t.propertyInData)(s,l,T,c.opts.ownProperties)),g(T),c.allErrors||s.else().var(p,!0),s.endIf()),a.it.definedProperties.add(T),a.ok(p);function y(T){return c.opts.useDefaults&&!c.compositeRule&&o[T].default!==void 0}function g(T){a.subschema({keyword:"properties",schemaProp:T,dataProp:T},p)}}};return Ol.default=i,Ol}var Pl={},eT;function vV(){if(eT)return Pl;eT=1,Object.defineProperty(Pl,"__esModule",{value:!0});const e=_n(),t=Ke(),r=pt(),n=pt(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:s,schema:o,data:u,parentSchema:l,it:c}=a,{opts:d}=c,f=(0,e.allSchemaProperties)(o),p=f.filter(I=>(0,r.alwaysValidSchema)(c,o[I]));if(f.length===0||p.length===f.length&&(!c.opts.unevaluated||c.props===!0))return;const y=d.strictSchema&&!d.allowMatchingProperties&&l.properties,g=s.name("valid");c.props!==!0&&!(c.props instanceof t.Name)&&(c.props=(0,n.evaluatedPropsToName)(s,c.props));const{props:T}=c;P();function P(){for(const I of f)y&&m(I),c.allErrors?w(I):(s.var(g,!0),w(I),s.if(g))}function m(I){for(const h in y)new RegExp(I).test(h)&&(0,r.checkStrictMode)(c,`property ${h} matches pattern ${I} (use allowMatchingProperties)`)}function w(I){s.forIn("key",u,h=>{s.if((0,t._)`${(0,e.usePattern)(a,I)}.test(${h})`,()=>{const E=p.includes(I);E||a.subschema({keyword:"patternProperties",schemaProp:I,dataProp:h,dataPropType:n.Type.Str},g),c.opts.unevaluated&&T!==!0?s.assign((0,t._)`${T}[${h}]`,!0):!E&&!c.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Pl.default=i,Pl}var Nl={},tT;function bV(){if(tT)return Nl;tT=1,Object.defineProperty(Nl,"__esModule",{value:!0});const e=pt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:a}=r;if((0,e.alwaysValidSchema)(a,i)){r.fail();return}const s=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Nl.default=t,Nl}var Cl={},rT;function SV(){if(rT)return Cl;rT=1,Object.defineProperty(Cl,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:_n().validateUnion,error:{message:"must match a schema in anyOf"}};return Cl.default=t,Cl}var Ml={},nT;function TV(){if(nT)return Ml;nT=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=Ke(),t=pt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:a,schema:s,parentSchema:o,it:u}=i;if(!Array.isArray(s))throw new Error("ajv implementation error");if(u.opts.discriminator&&o.discriminator)return;const l=s,c=a.let("valid",!1),d=a.let("passing",null),f=a.name("_valid");i.setParams({passing:d}),a.block(p),i.result(c,()=>i.reset(),()=>i.error(!0));function p(){l.forEach((y,g)=>{let T;(0,t.alwaysValidSchema)(u,y)?a.var(f,!0):T=i.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},f),g>0&&a.if((0,e._)`${f} && ${c}`).assign(c,!1).assign(d,(0,e._)`[${d}, ${g}]`).else(),a.if(f,()=>{a.assign(c,!0),a.assign(d,g),T&&i.mergeEvaluated(T,e.Name)})})}}};return Ml.default=n,Ml}var jl={},iT;function IV(){if(iT)return jl;iT=1,Object.defineProperty(jl,"__esModule",{value:!0});const e=pt(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:a}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=n.name("valid");i.forEach((o,u)=>{if((0,e.alwaysValidSchema)(a,o))return;const l=r.subschema({keyword:"allOf",schemaProp:u},s);r.ok(s),r.mergeEvaluated(l)})}};return jl.default=t,jl}var Dl={},aT;function wV(){if(aT)return Dl;aT=1,Object.defineProperty(Dl,"__esModule",{value:!0});const e=Ke(),t=pt(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:s,parentSchema:o,it:u}=a;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const l=i(u,"then"),c=i(u,"else");if(!l&&!c)return;const d=s.let("valid",!0),f=s.name("_valid");if(p(),a.reset(),l&&c){const g=s.let("ifClause");a.setParams({ifClause:g}),s.if(f,y("then",g),y("else",g))}else l?s.if(f,y("then")):s.if((0,e.not)(f),y("else"));a.pass(d,()=>a.error(!0));function p(){const g=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);a.mergeEvaluated(g)}function y(g,T){return()=>{const P=a.subschema({keyword:g},f);s.assign(d,f),a.mergeValidEvaluated(P,d),T?s.assign(T,(0,e._)`${g}`):a.setParams({ifClause:g})}}}};function i(a,s){const o=a.schema[s];return o!==void 0&&!(0,t.alwaysValidSchema)(a,o)}return Dl.default=n,Dl}var Ll={},sT;function RV(){if(sT)return Ll;sT=1,Object.defineProperty(Ll,"__esModule",{value:!0});const e=pt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Ll.default=t,Ll}var oT;function AV(){if(oT)return Sl;oT=1,Object.defineProperty(Sl,"__esModule",{value:!0});const e=vj(),t=mV(),r=bj(),n=hV(),i=yV(),a=gV(),s=_V(),o=Sj(),u=EV(),l=vV(),c=bV(),d=SV(),f=TV(),p=IV(),y=wV(),g=RV();function T(P=!1){const m=[c.default,d.default,f.default,p.default,y.default,g.default,s.default,o.default,a.default,u.default,l.default];return P?m.push(t.default,n.default):m.push(e.default,r.default),m.push(i.default),m}return Sl.default=T,Sl}var $l={},ql={},uT;function OV(){if(uT)return ql;uT=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=Ke(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:a,data:s,$data:o,schema:u,schemaCode:l,it:c}=n,{opts:d,errSchemaPath:f,schemaEnv:p,self:y}=c;if(!d.validateFormats)return;o?g():T();function g(){const P=a.scopeValue("formats",{ref:y.formats,code:d.code.formats}),m=a.const("fDef",(0,e._)`${P}[${l}]`),w=a.let("fType"),I=a.let("format");a.if((0,e._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>a.assign(w,(0,e._)`${m}.type || "string"`).assign(I,(0,e._)`${m}.validate`),()=>a.assign(w,(0,e._)`"string"`).assign(I,m)),n.fail$data((0,e.or)(h(),E()));function h(){return d.strictSchema===!1?e.nil:(0,e._)`${l} && !${I}`}function E(){const v=p.$async?(0,e._)`(${m}.async ? await ${I}(${s}) : ${I}(${s}))`:(0,e._)`${I}(${s})`,O=(0,e._)`(typeof ${I} == "function" ? ${v} : ${I}.test(${s}))`;return(0,e._)`${I} && ${I} !== true && ${w} === ${i} && !${O}`}}function T(){const P=y.formats[u];if(!P){h();return}if(P===!0)return;const[m,w,I]=E(P);m===i&&n.pass(v());function h(){if(d.strictSchema===!1){y.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${u}" ignored in schema at path "${f}"`}}function E(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):d.code.formats?(0,e._)`${d.code.formats}${(0,e.getProperty)(u)}`:void 0,$=a.scopeValue("formats",{key:u,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${$}.validate`]:["string",O,$]}function v(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!p.$async)throw new Error("async format in sync schema");return(0,e._)`await ${I}(${s})`}return typeof w=="function"?(0,e._)`${I}(${s})`:(0,e._)`${I}.test(${s})`}}}};return ql.default=r,ql}var cT;function PV(){if(cT)return $l;cT=1,Object.defineProperty($l,"__esModule",{value:!0});const t=[OV().default];return $l.default=t,$l}var Vi={},lT;function NV(){return lT||(lT=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.contentVocabulary=Vi.metadataVocabulary=void 0,Vi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Vi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Vi}var dT;function CV(){if(dT)return sl;dT=1,Object.defineProperty(sl,"__esModule",{value:!0});const e=tV(),t=pV(),r=AV(),n=PV(),i=NV(),a=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return sl.default=a,sl}var kl={},vo={},fT;function MV(){if(fT)return vo;fT=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(vo.DiscrError=e={})),vo}var pT;function jV(){if(pT)return kl;pT=1,Object.defineProperty(kl,"__esModule",{value:!0});const e=Ke(),t=MV(),r=Iv(),n=Zd(),i=pt(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:u}})=>o===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:o,tag:u,tagName:l}})=>(0,e._)`{error: ${o}, tag: ${l}, tagValue: ${u}}`},code(o){const{gen:u,data:l,schema:c,parentSchema:d,it:f}=o,{oneOf:p}=d;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=c.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const g=u.let("valid",!1),T=u.const("tag",(0,e._)`${l}${(0,e.getProperty)(y)}`);u.if((0,e._)`typeof ${T} == "string"`,()=>P(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:T,tagName:y})),o.ok(g);function P(){const I=w();u.if(!1);for(const h in I)u.elseIf((0,e._)`${T} === ${h}`),u.assign(g,m(I[h]));u.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:T,tagName:y}),u.endIf()}function m(I){const h=u.name("valid"),E=o.subschema({keyword:"oneOf",schemaProp:I},h);return o.mergeEvaluated(E,e.Name),h}function w(){var I;const h={},E=O(d);let v=!0;for(let B=0;B<p.length;B++){let V=p[B];if(V!=null&&V.$ref&&!(0,i.schemaHasRulesButRef)(V,f.self.RULES)){const k=V.$ref;if(V=r.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,k),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(f.opts.uriResolver,f.baseId,k)}const U=(I=V==null?void 0:V.properties)===null||I===void 0?void 0:I[y];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);v=v&&(E||O(V)),C(U,B)}if(!v)throw new Error(`discriminator: "${y}" must be required`);return h;function O({required:B}){return Array.isArray(B)&&B.includes(y)}function C(B,V){if(B.const)$(B.const,V);else if(B.enum)for(const U of B.enum)$(U,V);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function $(B,V){if(typeof B!="string"||B in h)throw new Error(`discriminator: "${y}" values must be unique strings`);h[B]=V}}}};return kl.default=s,kl}const DV="http://json-schema.org/draft-07/schema#",LV="http://json-schema.org/draft-07/schema#",$V="Core schema meta-schema",qV={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},kV=["object","boolean"],BV={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},UV={$schema:DV,$id:LV,title:$V,definitions:qV,type:kV,properties:BV,default:!0};var mT;function Rv(){return mT||(mT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=QH(),n=CV(),i=jV(),a=UV,s=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(y,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=xu();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Ke();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=Tv();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=Zd();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(tl,tl.exports)),tl.exports}var Fo={exports:{}},Ho={exports:{}},Vo={exports:{}},Bl={exports:{}},hT;function FV(){return hT||(hT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=["undefined","string","number","object","function","boolean","symbol"];function i(){return{keyword:"typeof",schemaType:["string","array"],code(a){const{data:s,schema:o,schemaValue:u}=a;a.fail(typeof o=="string"?(0,r._)`typeof ${s} != ${o}`:(0,r._)`${u}.indexOf(typeof ${s}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}t.default=i,e.exports=i})(Bl,Bl.exports)),Bl.exports}var yT=Vo.exports,gT;function HV(){return gT||(gT=1,(function(e,t){var r=yT&&yT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(FV()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Vo,Vo.exports)),Vo.exports}var Go={exports:{}},Tj={},ef={};ef.byteLength=xV;ef.toByteArray=WV;ef.fromByteArray=XV;var Bn=[],Kr=[],VV=typeof Uint8Array<"u"?Uint8Array:Array,fp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var us=0,GV=fp.length;us<GV;++us)Bn[us]=fp[us],Kr[fp.charCodeAt(us)]=us;Kr[45]=62;Kr[95]=63;function Ij(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function xV(e){var t=Ij(e),r=t[0],n=t[1];return(r+n)*3/4-n}function zV(e,t,r){return(t+r)*3/4-r}function WV(e){var t,r=Ij(e),n=r[0],i=r[1],a=new VV(zV(e,n,i)),s=0,o=i>0?n-4:n,u;for(u=0;u<o;u+=4)t=Kr[e.charCodeAt(u)]<<18|Kr[e.charCodeAt(u+1)]<<12|Kr[e.charCodeAt(u+2)]<<6|Kr[e.charCodeAt(u+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Kr[e.charCodeAt(u)]<<2|Kr[e.charCodeAt(u+1)]>>4,a[s++]=t&255),i===1&&(t=Kr[e.charCodeAt(u)]<<10|Kr[e.charCodeAt(u+1)]<<4|Kr[e.charCodeAt(u+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function YV(e){return Bn[e>>18&63]+Bn[e>>12&63]+Bn[e>>6&63]+Bn[e&63]}function KV(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(YV(n));return i.join("")}function XV(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(KV(e,s,s+a>o?o:s+a));return n===1?(t=e[r-1],i.push(Bn[t>>2]+Bn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Bn[t>>10]+Bn[t>>4&63]+Bn[t<<2&63]+"=")),i.join("")}var Av={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Av.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,u=(1<<o)-1,l=u>>1,c=-7,d=r?i-1:0,f=r?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=a*256+e[t+d],d+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=s*256+e[t+d],d+=f,c-=8);if(a===0)a=1-l;else{if(a===u)return s?NaN:(p?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(p?-1:1)*s*Math.pow(2,a-n)};Av.write=function(e,t,r,n,i,a){var s,o,u,l=a*8-i-1,c=(1<<l)-1,d=c>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,y=n?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?t+=f/u:t+=f*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,i),s=s+d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=o&255,p+=y,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[r+p]=s&255,p+=y,s/=256,l-=8);e[r+p-y]|=g*128};/*!
|
|
58
|
+
* The buffer module from node.js, for the browser.
|
|
59
|
+
*
|
|
60
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
61
|
+
* @license MIT
|
|
62
|
+
*/(function(e){const t=ef,r=Av,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:a,ArrayBuffer:s,SharedArrayBuffer:o}=globalThis;c.TYPED_ARRAY_SUPPORT=u(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{const j=new a(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,a.prototype),Object.setPrototypeOf(j,S),j.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function l(j){if(j>i)throw new RangeError('The value "'+j+'" is invalid for option "size"');const S=new a(j);return Object.setPrototypeOf(S,c.prototype),S}function c(j,S,A){if(typeof j=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(j)}return d(j,S,A)}c.poolSize=8192;function d(j,S,A){if(typeof j=="string")return g(j,S);if(s.isView(j))return P(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(wt(j,s)||j&&wt(j.buffer,s)||typeof o<"u"&&(wt(j,o)||j&&wt(j.buffer,o)))return m(j,S,A);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=j.valueOf&&j.valueOf();if(Y!=null&&Y!==j)return c.from(Y,S,A);const de=w(j);if(de)return de;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return c.from(j[Symbol.toPrimitive]("string"),S,A);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}c.from=function(j,S,A){return d(j,S,A)},Object.setPrototypeOf(c.prototype,a.prototype),Object.setPrototypeOf(c,a);function f(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function p(j,S,A){return f(j),j<=0?l(j):S!==void 0?typeof A=="string"?l(j).fill(S,A):l(j).fill(S):l(j)}c.alloc=function(j,S,A){return p(j,S,A)};function y(j){return f(j),l(j<0?0:I(j)|0)}c.allocUnsafe=function(j){return y(j)},c.allocUnsafeSlow=function(j){return y(j)};function g(j,S){if((typeof S!="string"||S==="")&&(S="utf8"),!c.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const A=E(j,S)|0;let Y=l(A);const de=Y.write(j,S);return de!==A&&(Y=Y.slice(0,de)),Y}function T(j){const S=j.length<0?0:I(j.length)|0,A=l(S);for(let Y=0;Y<S;Y+=1)A[Y]=j[Y]&255;return A}function P(j){if(wt(j,a)){const S=new a(j);return m(S.buffer,S.byteOffset,S.byteLength)}return T(j)}function m(j,S,A){if(S<0||j.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(j.byteLength<S+(A||0))throw new RangeError('"length" is outside of buffer bounds');let Y;return S===void 0&&A===void 0?Y=new a(j):A===void 0?Y=new a(j,S):Y=new a(j,S,A),Object.setPrototypeOf(Y,c.prototype),Y}function w(j){if(c.isBuffer(j)){const S=I(j.length)|0,A=l(S);return A.length===0||j.copy(A,0,0,S),A}if(j.length!==void 0)return typeof j.length!="number"||mr(j.length)?l(0):T(j);if(j.type==="Buffer"&&Array.isArray(j.data))return T(j.data)}function I(j){if(j>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return j|0}function h(j){return+j!=j&&(j=0),c.alloc(+j)}c.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==c.prototype},c.compare=function(S,A){if(wt(S,a)&&(S=c.from(S,S.offset,S.byteLength)),wt(A,a)&&(A=c.from(A,A.offset,A.byteLength)),!c.isBuffer(S)||!c.isBuffer(A))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===A)return 0;let Y=S.length,de=A.length;for(let _e=0,we=Math.min(Y,de);_e<we;++_e)if(S[_e]!==A[_e]){Y=S[_e],de=A[_e];break}return Y<de?-1:de<Y?1:0},c.isEncoding=function(S){switch(String(S).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(S,A){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return c.alloc(0);let Y;if(A===void 0)for(A=0,Y=0;Y<S.length;++Y)A+=S[Y].length;const de=c.allocUnsafe(A);let _e=0;for(Y=0;Y<S.length;++Y){let we=S[Y];if(wt(we,a))_e+we.length>de.length?(c.isBuffer(we)||(we=c.from(we)),we.copy(de,_e)):a.prototype.set.call(de,we,_e);else if(c.isBuffer(we))we.copy(de,_e);else throw new TypeError('"list" argument must be an Array of Buffers');_e+=we.length}return de};function E(j,S){if(c.isBuffer(j))return j.length;if(s.isView(j)||wt(j,s))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const A=j.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&A===0)return 0;let de=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":return Xe(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A*2;case"hex":return A>>>1;case"base64":return It(j).length;default:if(de)return Y?-1:Xe(j).length;S=(""+S).toLowerCase(),de=!0}}c.byteLength=E;function v(j,S,A){let Y=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((A===void 0||A>this.length)&&(A=this.length),A<=0)||(A>>>=0,S>>>=0,A<=S))return"";for(j||(j="utf8");;)switch(j){case"hex":return F(this,S,A);case"utf8":case"utf-8":return J(this,S,A);case"ascii":return q(this,S,A);case"latin1":case"binary":return D(this,S,A);case"base64":return ie(this,S,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,S,A);default:if(Y)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),Y=!0}}c.prototype._isBuffer=!0;function O(j,S,A){const Y=j[S];j[S]=j[A],j[A]=Y}c.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let A=0;A<S;A+=2)O(this,A,A+1);return this},c.prototype.swap32=function(){const S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let A=0;A<S;A+=4)O(this,A,A+3),O(this,A+1,A+2);return this},c.prototype.swap64=function(){const S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let A=0;A<S;A+=8)O(this,A,A+7),O(this,A+1,A+6),O(this,A+2,A+5),O(this,A+3,A+4);return this},c.prototype.toString=function(){const S=this.length;return S===0?"":arguments.length===0?J(this,0,S):v.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(S){if(!c.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:c.compare(this,S)===0},c.prototype.inspect=function(){let S="";const A=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,A).replace(/(.{2})/g,"$1 ").trim(),this.length>A&&(S+=" ... "),"<Buffer "+S+">"},n&&(c.prototype[n]=c.prototype.inspect),c.prototype.compare=function(S,A,Y,de,_e){if(wt(S,a)&&(S=c.from(S,S.offset,S.byteLength)),!c.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(A===void 0&&(A=0),Y===void 0&&(Y=S?S.length:0),de===void 0&&(de=0),_e===void 0&&(_e=this.length),A<0||Y>S.length||de<0||_e>this.length)throw new RangeError("out of range index");if(de>=_e&&A>=Y)return 0;if(de>=_e)return-1;if(A>=Y)return 1;if(A>>>=0,Y>>>=0,de>>>=0,_e>>>=0,this===S)return 0;let we=_e-de,Qe=Y-A;const Dt=Math.min(we,Qe),Rt=this.slice(de,_e),Lt=S.slice(A,Y);for(let nt=0;nt<Dt;++nt)if(Rt[nt]!==Lt[nt]){we=Rt[nt],Qe=Lt[nt];break}return we<Qe?-1:Qe<we?1:0};function C(j,S,A,Y,de){if(j.length===0)return-1;if(typeof A=="string"?(Y=A,A=0):A>2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,mr(A)&&(A=de?0:j.length-1),A<0&&(A=j.length+A),A>=j.length){if(de)return-1;A=j.length-1}else if(A<0)if(de)A=0;else return-1;if(typeof S=="string"&&(S=c.from(S,Y)),c.isBuffer(S))return S.length===0?-1:$(j,S,A,Y,de);if(typeof S=="number")return S=S&255,typeof a.prototype.indexOf=="function"?de?a.prototype.indexOf.call(j,S,A):a.prototype.lastIndexOf.call(j,S,A):$(j,[S],A,Y,de);throw new TypeError("val must be string, number or Buffer")}function $(j,S,A,Y,de){let _e=1,we=j.length,Qe=S.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(j.length<2||S.length<2)return-1;_e=2,we/=2,Qe/=2,A/=2}function Dt(Lt,nt){return _e===1?Lt[nt]:Lt.readUInt16BE(nt*_e)}let Rt;if(de){let Lt=-1;for(Rt=A;Rt<we;Rt++)if(Dt(j,Rt)===Dt(S,Lt===-1?0:Rt-Lt)){if(Lt===-1&&(Lt=Rt),Rt-Lt+1===Qe)return Lt*_e}else Lt!==-1&&(Rt-=Rt-Lt),Lt=-1}else for(A+Qe>we&&(A=we-Qe),Rt=A;Rt>=0;Rt--){let Lt=!0;for(let nt=0;nt<Qe;nt++)if(Dt(j,Rt+nt)!==Dt(S,nt)){Lt=!1;break}if(Lt)return Rt}return-1}c.prototype.includes=function(S,A,Y){return this.indexOf(S,A,Y)!==-1},c.prototype.indexOf=function(S,A,Y){return C(this,S,A,Y,!0)},c.prototype.lastIndexOf=function(S,A,Y){return C(this,S,A,Y,!1)};function B(j,S,A,Y){A=Number(A)||0;const de=j.length-A;Y?(Y=Number(Y),Y>de&&(Y=de)):Y=de;const _e=S.length;Y>_e/2&&(Y=_e/2);let we;for(we=0;we<Y;++we){const Qe=parseInt(S.substr(we*2,2),16);if(mr(Qe))return we;j[A+we]=Qe}return we}function V(j,S,A,Y){return tr(Xe(S,j.length-A),j,A,Y)}function U(j,S,A,Y){return tr(ut(S),j,A,Y)}function k(j,S,A,Y){return tr(It(S),j,A,Y)}function te(j,S,A,Y){return tr(Ft(S,j.length-A),j,A,Y)}c.prototype.write=function(S,A,Y,de){if(A===void 0)de="utf8",Y=this.length,A=0;else if(Y===void 0&&typeof A=="string")de=A,Y=this.length,A=0;else if(isFinite(A))A=A>>>0,isFinite(Y)?(Y=Y>>>0,de===void 0&&(de="utf8")):(de=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const _e=this.length-A;if((Y===void 0||Y>_e)&&(Y=_e),S.length>0&&(Y<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");let we=!1;for(;;)switch(de){case"hex":return B(this,S,A,Y);case"utf8":case"utf-8":return V(this,S,A,Y);case"ascii":case"latin1":case"binary":return U(this,S,A,Y);case"base64":return k(this,S,A,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,S,A,Y);default:if(we)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),we=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(j,S,A){return S===0&&A===j.length?t.fromByteArray(j):t.fromByteArray(j.slice(S,A))}function J(j,S,A){A=Math.min(j.length,A);const Y=[];let de=S;for(;de<A;){const _e=j[de];let we=null,Qe=_e>239?4:_e>223?3:_e>191?2:1;if(de+Qe<=A){let Dt,Rt,Lt,nt;switch(Qe){case 1:_e<128&&(we=_e);break;case 2:Dt=j[de+1],(Dt&192)===128&&(nt=(_e&31)<<6|Dt&63,nt>127&&(we=nt));break;case 3:Dt=j[de+1],Rt=j[de+2],(Dt&192)===128&&(Rt&192)===128&&(nt=(_e&15)<<12|(Dt&63)<<6|Rt&63,nt>2047&&(nt<55296||nt>57343)&&(we=nt));break;case 4:Dt=j[de+1],Rt=j[de+2],Lt=j[de+3],(Dt&192)===128&&(Rt&192)===128&&(Lt&192)===128&&(nt=(_e&15)<<18|(Dt&63)<<12|(Rt&63)<<6|Lt&63,nt>65535&&nt<1114112&&(we=nt))}}we===null?(we=65533,Qe=1):we>65535&&(we-=65536,Y.push(we>>>10&1023|55296),we=56320|we&1023),Y.push(we),de+=Qe}return K(Y)}const Q=4096;function K(j){const S=j.length;if(S<=Q)return String.fromCharCode.apply(String,j);let A="",Y=0;for(;Y<S;)A+=String.fromCharCode.apply(String,j.slice(Y,Y+=Q));return A}function q(j,S,A){let Y="";A=Math.min(j.length,A);for(let de=S;de<A;++de)Y+=String.fromCharCode(j[de]&127);return Y}function D(j,S,A){let Y="";A=Math.min(j.length,A);for(let de=S;de<A;++de)Y+=String.fromCharCode(j[de]);return Y}function F(j,S,A){const Y=j.length;(!S||S<0)&&(S=0),(!A||A<0||A>Y)&&(A=Y);let de="";for(let _e=S;_e<A;++_e)de+=hr[j[_e]];return de}function W(j,S,A){const Y=j.slice(S,A);let de="";for(let _e=0;_e<Y.length-1;_e+=2)de+=String.fromCharCode(Y[_e]+Y[_e+1]*256);return de}c.prototype.slice=function(S,A){const Y=this.length;S=~~S,A=A===void 0?Y:~~A,S<0?(S+=Y,S<0&&(S=0)):S>Y&&(S=Y),A<0?(A+=Y,A<0&&(A=0)):A>Y&&(A=Y),A<S&&(A=S);const de=this.subarray(S,A);return Object.setPrototypeOf(de,c.prototype),de};function N(j,S,A){if(j%1!==0||j<0)throw new RangeError("offset is not uint");if(j+S>A)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(S,A,Y){S=S>>>0,A=A>>>0,Y||N(S,A,this.length);let de=this[S],_e=1,we=0;for(;++we<A&&(_e*=256);)de+=this[S+we]*_e;return de},c.prototype.readUintBE=c.prototype.readUIntBE=function(S,A,Y){S=S>>>0,A=A>>>0,Y||N(S,A,this.length);let de=this[S+--A],_e=1;for(;A>0&&(_e*=256);)de+=this[S+--A]*_e;return de},c.prototype.readUint8=c.prototype.readUInt8=function(S,A){return S=S>>>0,A||N(S,1,this.length),this[S]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(S,A){return S=S>>>0,A||N(S,2,this.length),this[S]|this[S+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(S,A){return S=S>>>0,A||N(S,2,this.length),this[S]<<8|this[S+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(S,A){return S=S>>>0,A||N(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(S,A){return S=S>>>0,A||N(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},c.prototype.readBigUInt64LE=ht(function(S){S=S>>>0,Ae(S,"offset");const A=this[S],Y=this[S+7];(A===void 0||Y===void 0)&&ke(S,this.length-8);const de=A+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,_e=this[++S]+this[++S]*2**8+this[++S]*2**16+Y*2**24;return BigInt(de)+(BigInt(_e)<<BigInt(32))}),c.prototype.readBigUInt64BE=ht(function(S){S=S>>>0,Ae(S,"offset");const A=this[S],Y=this[S+7];(A===void 0||Y===void 0)&&ke(S,this.length-8);const de=A*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],_e=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+Y;return(BigInt(de)<<BigInt(32))+BigInt(_e)}),c.prototype.readIntLE=function(S,A,Y){S=S>>>0,A=A>>>0,Y||N(S,A,this.length);let de=this[S],_e=1,we=0;for(;++we<A&&(_e*=256);)de+=this[S+we]*_e;return _e*=128,de>=_e&&(de-=Math.pow(2,8*A)),de},c.prototype.readIntBE=function(S,A,Y){S=S>>>0,A=A>>>0,Y||N(S,A,this.length);let de=A,_e=1,we=this[S+--de];for(;de>0&&(_e*=256);)we+=this[S+--de]*_e;return _e*=128,we>=_e&&(we-=Math.pow(2,8*A)),we},c.prototype.readInt8=function(S,A){return S=S>>>0,A||N(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},c.prototype.readInt16LE=function(S,A){S=S>>>0,A||N(S,2,this.length);const Y=this[S]|this[S+1]<<8;return Y&32768?Y|4294901760:Y},c.prototype.readInt16BE=function(S,A){S=S>>>0,A||N(S,2,this.length);const Y=this[S+1]|this[S]<<8;return Y&32768?Y|4294901760:Y},c.prototype.readInt32LE=function(S,A){return S=S>>>0,A||N(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},c.prototype.readInt32BE=function(S,A){return S=S>>>0,A||N(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},c.prototype.readBigInt64LE=ht(function(S){S=S>>>0,Ae(S,"offset");const A=this[S],Y=this[S+7];(A===void 0||Y===void 0)&&ke(S,this.length-8);const de=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(Y<<24);return(BigInt(de)<<BigInt(32))+BigInt(A+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24)}),c.prototype.readBigInt64BE=ht(function(S){S=S>>>0,Ae(S,"offset");const A=this[S],Y=this[S+7];(A===void 0||Y===void 0)&&ke(S,this.length-8);const de=(A<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(de)<<BigInt(32))+BigInt(this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+Y)}),c.prototype.readFloatLE=function(S,A){return S=S>>>0,A||N(S,4,this.length),r.read(this,S,!0,23,4)},c.prototype.readFloatBE=function(S,A){return S=S>>>0,A||N(S,4,this.length),r.read(this,S,!1,23,4)},c.prototype.readDoubleLE=function(S,A){return S=S>>>0,A||N(S,8,this.length),r.read(this,S,!0,52,8)},c.prototype.readDoubleBE=function(S,A){return S=S>>>0,A||N(S,8,this.length),r.read(this,S,!1,52,8)};function L(j,S,A,Y,de,_e){if(!c.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>de||S<_e)throw new RangeError('"value" argument is out of bounds');if(A+Y>j.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(S,A,Y,de){if(S=+S,A=A>>>0,Y=Y>>>0,!de){const Qe=Math.pow(2,8*Y)-1;L(this,S,A,Y,Qe,0)}let _e=1,we=0;for(this[A]=S&255;++we<Y&&(_e*=256);)this[A+we]=S/_e&255;return A+Y},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(S,A,Y,de){if(S=+S,A=A>>>0,Y=Y>>>0,!de){const Qe=Math.pow(2,8*Y)-1;L(this,S,A,Y,Qe,0)}let _e=Y-1,we=1;for(this[A+_e]=S&255;--_e>=0&&(we*=256);)this[A+_e]=S/we&255;return A+Y},c.prototype.writeUint8=c.prototype.writeUInt8=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,1,255,0),this[A]=S&255,A+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,2,65535,0),this[A]=S&255,this[A+1]=S>>>8,A+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,2,65535,0),this[A]=S>>>8,this[A+1]=S&255,A+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,4,4294967295,0),this[A+3]=S>>>24,this[A+2]=S>>>16,this[A+1]=S>>>8,this[A]=S&255,A+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,4,4294967295,0),this[A]=S>>>24,this[A+1]=S>>>16,this[A+2]=S>>>8,this[A+3]=S&255,A+4};function ee(j,S,A,Y,de){ve(S,Y,de,j,A,7);let _e=Number(S&BigInt(4294967295));j[A++]=_e,_e=_e>>8,j[A++]=_e,_e=_e>>8,j[A++]=_e,_e=_e>>8,j[A++]=_e;let we=Number(S>>BigInt(32)&BigInt(4294967295));return j[A++]=we,we=we>>8,j[A++]=we,we=we>>8,j[A++]=we,we=we>>8,j[A++]=we,A}function Ee(j,S,A,Y,de){ve(S,Y,de,j,A,7);let _e=Number(S&BigInt(4294967295));j[A+7]=_e,_e=_e>>8,j[A+6]=_e,_e=_e>>8,j[A+5]=_e,_e=_e>>8,j[A+4]=_e;let we=Number(S>>BigInt(32)&BigInt(4294967295));return j[A+3]=we,we=we>>8,j[A+2]=we,we=we>>8,j[A+1]=we,we=we>>8,j[A]=we,A+8}c.prototype.writeBigUInt64LE=ht(function(S,A=0){return ee(this,S,A,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ht(function(S,A=0){return Ee(this,S,A,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(S,A,Y,de){if(S=+S,A=A>>>0,!de){const Dt=Math.pow(2,8*Y-1);L(this,S,A,Y,Dt-1,-Dt)}let _e=0,we=1,Qe=0;for(this[A]=S&255;++_e<Y&&(we*=256);)S<0&&Qe===0&&this[A+_e-1]!==0&&(Qe=1),this[A+_e]=(S/we>>0)-Qe&255;return A+Y},c.prototype.writeIntBE=function(S,A,Y,de){if(S=+S,A=A>>>0,!de){const Dt=Math.pow(2,8*Y-1);L(this,S,A,Y,Dt-1,-Dt)}let _e=Y-1,we=1,Qe=0;for(this[A+_e]=S&255;--_e>=0&&(we*=256);)S<0&&Qe===0&&this[A+_e+1]!==0&&(Qe=1),this[A+_e]=(S/we>>0)-Qe&255;return A+Y},c.prototype.writeInt8=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,1,127,-128),S<0&&(S=255+S+1),this[A]=S&255,A+1},c.prototype.writeInt16LE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,2,32767,-32768),this[A]=S&255,this[A+1]=S>>>8,A+2},c.prototype.writeInt16BE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,2,32767,-32768),this[A]=S>>>8,this[A+1]=S&255,A+2},c.prototype.writeInt32LE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,4,2147483647,-2147483648),this[A]=S&255,this[A+1]=S>>>8,this[A+2]=S>>>16,this[A+3]=S>>>24,A+4},c.prototype.writeInt32BE=function(S,A,Y){return S=+S,A=A>>>0,Y||L(this,S,A,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[A]=S>>>24,this[A+1]=S>>>16,this[A+2]=S>>>8,this[A+3]=S&255,A+4},c.prototype.writeBigInt64LE=ht(function(S,A=0){return ee(this,S,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ht(function(S,A=0){return Ee(this,S,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function he(j,S,A,Y,de,_e){if(A+Y>j.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function be(j,S,A,Y,de){return S=+S,A=A>>>0,de||he(j,S,A,4),r.write(j,S,A,Y,23,4),A+4}c.prototype.writeFloatLE=function(S,A,Y){return be(this,S,A,!0,Y)},c.prototype.writeFloatBE=function(S,A,Y){return be(this,S,A,!1,Y)};function Ie(j,S,A,Y,de){return S=+S,A=A>>>0,de||he(j,S,A,8),r.write(j,S,A,Y,52,8),A+8}c.prototype.writeDoubleLE=function(S,A,Y){return Ie(this,S,A,!0,Y)},c.prototype.writeDoubleBE=function(S,A,Y){return Ie(this,S,A,!1,Y)},c.prototype.copy=function(S,A,Y,de){if(!c.isBuffer(S))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!de&&de!==0&&(de=this.length),A>=S.length&&(A=S.length),A||(A=0),de>0&&de<Y&&(de=Y),de===Y||S.length===0||this.length===0)return 0;if(A<0)throw new RangeError("targetStart out of bounds");if(Y<0||Y>=this.length)throw new RangeError("Index out of range");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),S.length-A<de-Y&&(de=S.length-A+Y);const _e=de-Y;return this===S&&typeof a.prototype.copyWithin=="function"?this.copyWithin(A,Y,de):a.prototype.set.call(S,this.subarray(Y,de),A),_e},c.prototype.fill=function(S,A,Y,de){if(typeof S=="string"){if(typeof A=="string"?(de=A,A=0,Y=this.length):typeof Y=="string"&&(de=Y,Y=this.length),de!==void 0&&typeof de!="string")throw new TypeError("encoding must be a string");if(typeof de=="string"&&!c.isEncoding(de))throw new TypeError("Unknown encoding: "+de);if(S.length===1){const we=S.charCodeAt(0);(de==="utf8"&&we<128||de==="latin1")&&(S=we)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(A<0||this.length<A||this.length<Y)throw new RangeError("Out of range index");if(Y<=A)return this;A=A>>>0,Y=Y===void 0?this.length:Y>>>0,S||(S=0);let _e;if(typeof S=="number")for(_e=A;_e<Y;++_e)this[_e]=S;else{const we=c.isBuffer(S)?S:c.from(S,de),Qe=we.length;if(Qe===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(_e=0;_e<Y-A;++_e)this[_e+A]=we[_e%Qe]}return this};const ae={};function ce(j,S,A){ae[j]=class extends A{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${j}]`,this.stack,delete this.name}get code(){return j}set code(de){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:de,writable:!0})}toString(){return`${this.name} [${j}]: ${this.message}`}}}ce("ERR_BUFFER_OUT_OF_BOUNDS",function(j){return j?`${j} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ce("ERR_INVALID_ARG_TYPE",function(j,S){return`The "${j}" argument must be of type number. Received type ${typeof S}`},TypeError),ce("ERR_OUT_OF_RANGE",function(j,S,A){let Y=`The value of "${j}" is out of range.`,de=A;return Number.isInteger(A)&&Math.abs(A)>2**32?de=fe(String(A)):typeof A=="bigint"&&(de=String(A),(A>BigInt(2)**BigInt(32)||A<-(BigInt(2)**BigInt(32)))&&(de=fe(de)),de+="n"),Y+=` It must be ${S}. Received ${de}`,Y},RangeError);function fe(j){let S="",A=j.length;const Y=j[0]==="-"?1:0;for(;A>=Y+4;A-=3)S=`_${j.slice(A-3,A)}${S}`;return`${j.slice(0,A)}${S}`}function pe(j,S,A){Ae(S,"offset"),(j[S]===void 0||j[S+A]===void 0)&&ke(S,j.length-(A+1))}function ve(j,S,A,Y,de,_e){if(j>A||j<S){const we=typeof S=="bigint"?"n":"";let Qe;throw S===0||S===BigInt(0)?Qe=`>= 0${we} and < 2${we} ** ${(_e+1)*8}${we}`:Qe=`>= -(2${we} ** ${(_e+1)*8-1}${we}) and < 2 ** ${(_e+1)*8-1}${we}`,new ae.ERR_OUT_OF_RANGE("value",Qe,j)}pe(Y,de,_e)}function Ae(j,S){if(typeof j!="number")throw new ae.ERR_INVALID_ARG_TYPE(S,"number",j)}function ke(j,S,A){throw Math.floor(j)!==j?(Ae(j,A),new ae.ERR_OUT_OF_RANGE("offset","an integer",j)):S<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,j)}const We=/[^+/0-9A-Za-z-_]/g;function et(j){if(j=j.split("=")[0],j=j.trim().replace(We,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function Xe(j,S){S=S||1/0;let A;const Y=j.length;let de=null;const _e=[];for(let we=0;we<Y;++we){if(A=j.charCodeAt(we),A>55295&&A<57344){if(!de){if(A>56319){(S-=3)>-1&&_e.push(239,191,189);continue}else if(we+1===Y){(S-=3)>-1&&_e.push(239,191,189);continue}de=A;continue}if(A<56320){(S-=3)>-1&&_e.push(239,191,189),de=A;continue}A=(de-55296<<10|A-56320)+65536}else de&&(S-=3)>-1&&_e.push(239,191,189);if(de=null,A<128){if((S-=1)<0)break;_e.push(A)}else if(A<2048){if((S-=2)<0)break;_e.push(A>>6|192,A&63|128)}else if(A<65536){if((S-=3)<0)break;_e.push(A>>12|224,A>>6&63|128,A&63|128)}else if(A<1114112){if((S-=4)<0)break;_e.push(A>>18|240,A>>12&63|128,A>>6&63|128,A&63|128)}else throw new Error("Invalid code point")}return _e}function ut(j){const S=[];for(let A=0;A<j.length;++A)S.push(j.charCodeAt(A)&255);return S}function Ft(j,S){let A,Y,de;const _e=[];for(let we=0;we<j.length&&!((S-=2)<0);++we)A=j.charCodeAt(we),Y=A>>8,de=A%256,_e.push(de),_e.push(Y);return _e}function It(j){return t.toByteArray(et(j))}function tr(j,S,A,Y){let de;for(de=0;de<Y&&!(de+A>=S.length||de>=j.length);++de)S[de+A]=j[de];return de}function wt(j,S){return j instanceof S||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===S.name}function mr(j){return j!==j}const hr=(function(){const j="0123456789abcdef",S=new Array(256);for(let A=0;A<16;++A){const Y=A*16;for(let de=0;de<16;++de)S[Y+de]=j[A]+j[de]}return S})();function ht(j){return typeof BigInt>"u"?Ur:j}function Ur(){throw new Error("BigInt not supported")}})(Tj);const _T=Tj.Buffer;var Ul={exports:{}},ET;function JV(){return ET||(ET=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof _T<"u"&&(r.Buffer=_T),typeof Promise<"u"&&(r.Promise=Promise);const n=Object.assign(i,{CONSTRUCTORS:r});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(s){if(typeof s=="string"){const o=a(s);return u=>u instanceof o}if(Array.isArray(s)){const o=s.map(a);return u=>{for(const l of o)if(u instanceof l)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function a(s){const o=r[s];if(o)return o;throw new Error(`invalid "instanceof" keyword value ${s}`)}t.default=n,e.exports=n})(Ul,Ul.exports)),Ul.exports}var vT=Go.exports,bT;function QV(){return bT||(bT=1,(function(e,t){var r=vT&&vT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(JV()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Go,Go.exports)),Go.exports}var xo={exports:{}},zo={exports:{}},Fl={},ST;function wj(){if(ST)return Fl;ST=1,Object.defineProperty(Fl,"__esModule",{value:!0});function e(t){return()=>({keyword:t,type:"number",schemaType:"array",macro:function([n,i]){return r(n,i),t==="range"?{minimum:n,maximum:i}:{exclusiveMinimum:n,exclusiveMaximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function r(n,i){if(n>i||t==="exclusiveRange"&&n===i)throw new Error("There are no numbers in range")}}return Fl.default=e,Fl}var TT=zo.exports,IT;function ZV(){return IT||(IT=1,(function(e,t){var r=TT&&TT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(wj()).default)("range");t.default=i,e.exports=i})(zo,zo.exports)),zo.exports}var wT=xo.exports,RT;function e3(){return RT||(RT=1,(function(e,t){var r=wT&&wT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(ZV()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(xo,xo.exports)),xo.exports}var Wo={exports:{}},Yo={exports:{}},AT=Yo.exports,OT;function t3(){return OT||(OT=1,(function(e,t){var r=AT&&AT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(wj()).default)("exclusiveRange");t.default=i,e.exports=i})(Yo,Yo.exports)),Yo.exports}var PT=Wo.exports,NT;function r3(){return NT||(NT=1,(function(e,t){var r=PT&&PT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(t3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Wo,Wo.exports)),Wo.exports}var Ko={exports:{}},Hl={exports:{}},Gi={},CT;function tf(){if(CT)return Gi;CT=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.usePattern=Gi.metaSchemaRef=void 0;const e=Ke(),t="http://json-schema.org/schema";function r({defaultMeta:i}={}){return i===!1?{}:{$ref:i||t}}Gi.metaSchemaRef=r;function n({gen:i,it:{opts:a}},s,o=a.unicodeRegExp?"u":""){const u=new RegExp(s,o);return i.scopeValue("pattern",{key:u.toString(),ref:u,code:(0,e._)`new RegExp(${s}, ${o})`})}return Gi.usePattern=n,Gi}var MT;function n3(){return MT||(MT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=tf(),i={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},a=/^\/(.*)\/([gimuy]*)$/;function s(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(o){const{data:u,schema:l}=o,c=d(l);o.pass((0,r._)`${c}.test(${u})`);function d(f){if(typeof f=="object")return(0,n.usePattern)(o,f.pattern,f.flags);const p=a.exec(f);if(p)return(0,n.usePattern)(o,p[1],p[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}t.default=s,e.exports=s})(Hl,Hl.exports)),Hl.exports}var jT=Ko.exports,DT;function i3(){return DT||(DT=1,(function(e,t){var r=jT&&jT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(n3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Ko,Ko.exports)),Ko.exports}var Xo={exports:{}},Vl={exports:{}},LT;function a3(){return LT||(LT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n={trimStart:u=>u.trimStart(),trimEnd:u=>u.trimEnd(),trimLeft:u=>u.trimStart(),trimRight:u=>u.trimEnd(),trim:u=>u.trim(),toLowerCase:u=>u.toLowerCase(),toUpperCase:u=>u.toUpperCase(),toEnumCase:(u,l)=>(l==null?void 0:l.hash[o(u)])||u},i=Object.assign(a,{transform:n});function a(){return{keyword:"transform",schemaType:"array",before:"enum",code(u){const{gen:l,data:c,schema:d,parentSchema:f,it:p}=u,{parentData:y,parentDataProperty:g}=p,T=d;if(!T.length)return;let P;if(T.includes("toEnumCase")){const w=s(f);P=l.scopeValue("obj",{ref:w,code:(0,r.stringify)(w)})}l.if((0,r._)`typeof ${c} == "string" && ${y} !== undefined`,()=>{l.assign(c,m(T.slice())),l.assign((0,r._)`${y}[${g}]`,c)});function m(w){if(!w.length)return c;const I=w.pop();if(!(I in n))throw new Error(`transform: unknown transformation ${I}`);const h=l.scopeValue("func",{ref:n[I],code:(0,r._)`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(I)}`}),E=m(w);return P&&I==="toEnumCase"?(0,r._)`${h}(${E}, ${P})`:(0,r._)`${h}(${E})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function s(u){const l={hash:{}};if(!u.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const c of u.enum){if(typeof c!="string")continue;const d=o(c);if(l.hash[d])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');l.hash[d]=c}return l}function o(u){return u.toLowerCase()}t.default=i,e.exports=i})(Vl,Vl.exports)),Vl.exports}var $T=Xo.exports,qT;function s3(){return qT||(qT=1,(function(e,t){var r=$T&&$T.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(a3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Xo,Xo.exports)),Xo.exports}var Jo={exports:{}},Gl={exports:{}},kT;function o3(){return kT||(kT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Sv(),n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(s,o){const u=a(s,o);return l=>{if(l.length<=1)return!0;for(let c=0;c<s.length;c++){const d=s[c];if(u[c]){const f={};for(const p of l){if(!p||typeof p!="object")continue;let y=p[d];if(!(y&&typeof y=="object")){if(typeof y=="string"&&(y='"'+y),f[y])return!1;f[y]=!0}}}else for(let f=l.length;f--;){const p=l[f];if(!(!p||typeof p!="object"))for(let y=f;y--;){const g=l[y];if(g&&typeof g=="object"&&r(p[d],g[d]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}t.default=i;function a(s,o){return s.map(u=>{var l,c,d;const f=(d=(c=(l=o.items)===null||l===void 0?void 0:l.properties)===null||c===void 0?void 0:c[u])===null||d===void 0?void 0:d.type;return Array.isArray(f)?!f.includes("object")&&!f.includes("array"):n.includes(f)})}e.exports=i})(Gl,Gl.exports)),Gl.exports}var BT=Jo.exports,UT;function u3(){return UT||(UT=1,(function(e,t){var r=BT&&BT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(o3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Jo,Jo.exports)),Jo.exports}var Qo={exports:{}},xl={exports:{}},FT;function c3(){return FT||(FT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,i){if(!n)return!0;const a=Object.keys(i.properties);return a.length===0?!0:{required:a}},dependencies:["properties"]}}t.default=r,e.exports=r})(xl,xl.exports)),xl.exports}var HT=Qo.exports,VT;function l3(){return VT||(VT=1,(function(e,t){var r=HT&&HT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(c3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Qo,Qo.exports)),Qo.exports}var Zo={exports:{}},eu={exports:{}},zl={},GT;function Rj(){if(GT)return zl;GT=1,Object.defineProperty(zl,"__esModule",{value:!0});function e(t){return()=>({keyword:t,type:"object",schemaType:"array",macro(r){return r.length===0?!0:r.length===1?{required:r}:{[t==="anyRequired"?"anyOf":"oneOf"]:r.map(i=>({required:[i]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return zl.default=e,zl}var xT=eu.exports,zT;function d3(){return zT||(zT=1,(function(e,t){var r=xT&&xT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(Rj()).default)("anyRequired");t.default=i,e.exports=i})(eu,eu.exports)),eu.exports}var WT=Zo.exports,YT;function f3(){return YT||(YT=1,(function(e,t){var r=WT&&WT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(d3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Zo,Zo.exports)),Zo.exports}var tu={exports:{}},ru={exports:{}},KT=ru.exports,XT;function p3(){return XT||(XT=1,(function(e,t){var r=KT&&KT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(Rj()).default)("oneRequired");t.default=i,e.exports=i})(ru,ru.exports)),ru.exports}var JT=tu.exports,QT;function m3(){return QT||(QT=1,(function(e,t){var r=JT&&JT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(p3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(tu,tu.exports)),tu.exports}var nu={exports:{}},Wl={exports:{}},ZT;function h3(){return ZT||(ZT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=tf(),i={message:({params:{missingPattern:s}})=>(0,r.str)`should have property matching pattern '${s}'`,params:({params:{missingPattern:s}})=>(0,r._)`{missingPattern: ${s}}`};function a(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(s){const{gen:o,schema:u,data:l}=s;if(u.length===0)return;const c=o.let("valid",!0);for(const f of u)d(f);function d(f){const p=o.let("matched",!1);o.forIn("key",l,y=>{o.assign(p,(0,r._)`${(0,n.usePattern)(s,f)}.test(${y})`),o.if(p,()=>o.break())}),s.setParams({missingPattern:f}),o.assign(c,(0,r.and)(c,p)),s.pass(c)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}t.default=a,e.exports=a})(Wl,Wl.exports)),Wl.exports}var e1=nu.exports,t1;function y3(){return t1||(t1=1,(function(e,t){var r=e1&&e1.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(h3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(nu,nu.exports)),nu.exports}var iu={exports:{}},Yl={exports:{}},r1;function g3(){return r1||(r1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(i=>({required:[i]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}t.default=r,e.exports=r})(Yl,Yl.exports)),Yl.exports}var n1=iu.exports,i1;function _3(){return i1||(i1=1,(function(e,t){var r=n1&&n1.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(g3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(iu,iu.exports)),iu.exports}var au={exports:{}},Kl={exports:{}},a1;function E3(){return a1||(a1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=tf();function n(s){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(o){const u=[];for(const l in o)u.push(i(l,o[l]));return{allOf:u}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,r.metaSchemaRef)(s)}}}t.default=n;function i(s,o){const u=s.split("/"),l={};let c=l;for(let d=1;d<u.length;d++){let f=u[d];const p=d===u.length-1;f=a(f);const y=c.properties={};let g;if(/[0-9]+/.test(f)){let T=+f;for(g=c.items=[],c.type=["object","array"];T--;)g.push({})}else c.type="object";c=p?o:{},y[f]=c,g&&g.push(c)}return l}function a(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Kl,Kl.exports)),Kl.exports}var s1=au.exports,o1;function v3(){return o1||(o1=1,(function(e,t){var r=s1&&s1.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(E3()),i=(a,s)=>a.addKeyword((0,n.default)(s));t.default=i,e.exports=i})(au,au.exports)),au.exports}var su={exports:{}},Xl={exports:{}},u1;function b3(){return u1||(u1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(a){const{schema:s,data:o}=a,u=s.map(c=>(0,r._)`(${l(c)}) === undefined`);a.fail((0,r.or)(...u));function l(c){if(c==="")throw new Error("empty JSON pointer not allowed");const d=c.split("/");let f=o;const p=d.map((y,g)=>g?f=(0,r._)`${f}${(0,r.getProperty)(i(y))}`:f);return(0,r.and)(...p)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}t.default=n;function i(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Xl,Xl.exports)),Xl.exports}var c1=su.exports,l1;function S3(){return l1||(l1=1,(function(e,t){var r=c1&&c1.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(b3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(su,su.exports)),su.exports}var ou={exports:{}},Jl={exports:{}},d1;function T3(){return d1||(d1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:c=>{var d;const f=(d=c==null?void 0:c.max)!==null&&d!==void 0?d:2;return()=>Math.floor(Math.random()*f)},seq:c=>{var d;const f=(d=c==null?void 0:c.name)!==null&&d!==void 0?d:"";return r[f]||(r[f]=0),()=>r[f]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(c,d,f){if(!f.opts.useDefaults||f.compositeRule)return()=>!0;const p={};for(const g in c)p[g]=s(c[g]);const y=f.opts.useDefaults==="empty";return g=>{for(const T in c)(g[T]===void 0||y&&(g[T]===null||g[T]===""))&&(g[T]=p[T]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function s(c){return typeof c=="object"?o(c):u(c)}function o({func:c,args:d}){const f=n[c];return l(c,f),f(d)}function u(c=""){const d=n[c];return l(c,d),d()}function l(c,d){if(!d)throw new Error(`invalid "dynamicDefaults" keyword property value: ${c}`)}t.default=i,e.exports=i})(Jl,Jl.exports)),Jl.exports}var f1=ou.exports,p1;function I3(){return p1||(p1=1,(function(e,t){var r=f1&&f1.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(T3()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(ou,ou.exports)),ou.exports}var uu={exports:{}},Ql={exports:{}},m1;function w3(){return m1||(m1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=tf(),i={message:({params:{schemaProp:s}})=>s?(0,r.str)`should match case "${s}" schema`:(0,r.str)`should match default case schema`,params:({params:{schemaProp:s}})=>s?(0,r._)`{failingCase: ${s}}`:(0,r._)`{failingDefault: true}`};function a(s){const o=(0,n.metaSchemaRef)(s);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:i,dependencies:["selectCases"],code(u){const{gen:l,schemaCode:c,parentSchema:d}=u;u.block$data(r.nil,()=>{const f=l.let("valid",!0),p=l.name("_valid"),y=l.const("value",(0,r._)`${c} === null ? "null" : ${c}`);l.if(!1);for(const g in d.selectCases){u.setParams({schemaProp:g}),l.elseIf((0,r._)`"" + ${y} == ${g}`);const T=u.subschema({keyword:"selectCases",schemaProp:g},p);u.mergeEvaluated(T,r.Name),l.assign(f,p)}if(l.else(),d.selectDefault!==void 0){u.setParams({schemaProp:void 0});const g=u.subschema({keyword:"selectDefault"},p);u.mergeEvaluated(g,r.Name),l.assign(f,p)}l.endIf(),u.pass(f)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:o}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:o}]}t.default=a,e.exports=a})(Ql,Ql.exports)),Ql.exports}var h1=uu.exports,y1;function R3(){return y1||(y1=1,(function(e,t){var r=h1&&h1.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(w3()),i=(a,s)=>((0,n.default)(s).forEach(o=>a.addKeyword(o)),a);t.default=i,e.exports=i})(uu,uu.exports)),uu.exports}var g1=Ho.exports,_1;function A3(){return _1||(_1=1,(function(e,t){var r=g1&&g1.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(HV()),i=r(QV()),a=r(e3()),s=r(r3()),o=r(i3()),u=r(s3()),l=r(u3()),c=r(l3()),d=r(f3()),f=r(m3()),p=r(y3()),y=r(_3()),g=r(v3()),T=r(S3()),P=r(I3()),m=r(R3()),w={typeof:n.default,instanceof:i.default,range:a.default,exclusiveRange:s.default,regexp:o.default,transform:u.default,uniqueItemProperties:l.default,allRequired:c.default,anyRequired:d.default,oneRequired:f.default,patternRequired:p.default,prohibited:y.default,deepProperties:g.default,deepRequired:T.default,dynamicDefaults:P.default,select:m.default};t.default=w,e.exports=w})(Ho,Ho.exports)),Ho.exports}var E1=Fo.exports,v1;function Aj(){return v1||(v1=1,(function(e,t){var r=E1&&E1.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(A3()),i=(s,o)=>{if(Array.isArray(o)){for(const u of o)a(u)(s);return s}if(o)return a(o)(s),s;for(o in n.default)a(o)(s);return s};i.get=a;function a(s){const o=n.default[s];if(!o)throw new Error("Unknown keyword "+s);return o}t.default=i,e.exports=i,e.exports.default=i})(Fo,Fo.exports)),Fo.exports}var Zl={exports:{}},b1;function Oj(){return b1||(b1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Rv(),n=Ke(),i=Tu(),a=xu(),s=Gu(),o=pi(),u="errorMessage",l=new r.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,f=/\$\{([^}]+)\}/g,p=/^""\s*\+\s*|\s*\+\s*""$/g;function y(T){return{keyword:u,schemaType:["string","object"],post:!0,code(P){const{gen:m,data:w,schema:I,schemaValue:h,it:E}=P;if(E.createErrors===!1)return;const v=I,O=n.strConcat(o.default.instancePath,E.errorPath);m.if(r._`${o.default.errors} > 0`,()=>{if(typeof v=="object"){const[W,N]=$(v);N&&B(N),W&&V(W),U(C(v))}const F=typeof v=="string"?v:v._;F&&k(F),T.keepErrors||te()});function C({properties:F,items:W}){const N={};if(F){N.props={};for(const L in F)N.props[L]=[]}if(W){N.items={};for(let L=0;L<W.length;L++)N.items[L]=[]}return N}function $(F){let W,N;for(const L in F){if(L==="properties"||L==="items")continue;const ee=F[L];if(typeof ee=="object"){W||(W={});const Ee=W[L]={};for(const he in ee)Ee[he]=[]}else N||(N={}),N[L]=[]}return[W,N]}function B(F){const W=m.const("emErrors",r.stringify(F)),N=m.const("templates",K(F,I));m.forOf("err",o.default.vErrors,he=>m.if(ie(he,W),()=>m.code(r._`${W}[${he}.keyword].push(${he})`).assign(r._`${he}.${l}`,!0)));const{singleError:L}=T;if(L){const he=m.let("message",r._`""`),be=m.let("paramsErrors",r._`[]`);ee(Ie=>{m.if(he,()=>m.code(r._`${he} += ${typeof L=="string"?L:";"}`)),m.code(r._`${he} += ${Ee(Ie)}`),m.assign(be,r._`${be}.concat(${W}[${Ie}])`)}),s.reportError(P,{message:he,params:r._`{errors: ${be}}`})}else ee(he=>s.reportError(P,{message:Ee(he),params:r._`{errors: ${W}[${he}]}`}));function ee(he){m.forIn("key",W,be=>m.if(r._`${W}[${be}].length`,()=>he(be)))}function Ee(he){return r._`${he} in ${N} ? ${N}[${he}]() : ${h}[${he}]`}}function V(F){const W=m.const("emErrors",r.stringify(F)),N=[];for(const be in F)N.push([be,K(F[be],I[be])]);const L=m.const("templates",m.object(...N)),ee=m.scopeValue("obj",{ref:c,code:r.stringify(c)}),Ee=m.let("emPropParams"),he=m.let("emParamsErrors");m.forOf("err",o.default.vErrors,be=>m.if(ie(be,W),()=>{m.assign(Ee,r._`${ee}[${be}.keyword]`),m.assign(he,r._`${W}[${be}.keyword][${be}.params[${Ee}]]`),m.if(he,()=>m.code(r._`${he}.push(${be})`).assign(r._`${be}.${l}`,!0))})),m.forIn("key",W,be=>m.forIn("keyProp",r._`${W}[${be}]`,Ie=>{m.assign(he,r._`${W}[${be}][${Ie}]`),m.if(r._`${he}.length`,()=>{const ae=m.const("tmpl",r._`${L}[${be}] && ${L}[${be}][${Ie}]`);s.reportError(P,{message:r._`${ae} ? ${ae}() : ${h}[${be}][${Ie}]`,params:r._`{errors: ${he}}`})})}))}function U(F){const{props:W,items:N}=F;if(!W&&!N)return;const L=r._`typeof ${w} == "object"`,ee=r._`Array.isArray(${w})`,Ee=m.let("emErrors");let he,be;const Ie=m.let("templates");W&&N?(he=m.let("emChildKwd"),m.if(L),m.if(ee,()=>{ae(N,I.items),m.assign(he,r.str`items`)},()=>{ae(W,I.properties),m.assign(he,r.str`properties`)}),be=r._`[${he}]`):N?(m.if(ee),ae(N,I.items),be=r._`.items`):W&&(m.if(n.and(L,n.not(ee))),ae(W,I.properties),be=r._`.properties`),m.forOf("err",o.default.vErrors,ce=>J(ce,Ee,fe=>m.code(r._`${Ee}[${fe}].push(${ce})`).assign(r._`${ce}.${l}`,!0))),m.forIn("key",Ee,ce=>m.if(r._`${Ee}[${ce}].length`,()=>{s.reportError(P,{message:r._`${ce} in ${Ie} ? ${Ie}[${ce}]() : ${h}${be}[${ce}]`,params:r._`{errors: ${Ee}[${ce}]}`}),m.assign(r._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,r._`${O} + "/" + ${ce}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),m.endIf();function ae(ce,fe){m.assign(Ee,r.stringify(ce)),m.assign(Ie,K(ce,fe))}}function k(F){const W=m.const("emErrs",r._`[]`);m.forOf("err",o.default.vErrors,N=>m.if(Q(N),()=>m.code(r._`${W}.push(${N})`).assign(r._`${N}.${l}`,!0))),m.if(r._`${W}.length`,()=>s.reportError(P,{message:q(F),params:r._`{errors: ${W}}`}))}function te(){const F=m.const("emErrs",r._`[]`);m.forOf("err",o.default.vErrors,W=>m.if(r._`!${W}.${l}`,()=>m.code(r._`${F}.push(${W})`))),m.assign(o.default.vErrors,F).assign(o.default.errors,r._`${F}.length`)}function ie(F,W){return n.and(r._`${F}.keyword !== ${u}`,r._`!${F}.${l}`,r._`${F}.instancePath === ${O}`,r._`${F}.keyword in ${W}`,r._`${F}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${F}.schemaPath.slice(${E.errSchemaPath.length}))`)}function J(F,W,N){m.if(n.and(r._`${F}.keyword !== ${u}`,r._`!${F}.${l}`,r._`${F}.instancePath.indexOf(${O}) === 0`),()=>{const L=m.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ee=m.const("emMatches",r._`${L}.exec(${F}.instancePath.slice(${O}.length))`),Ee=m.const("emChild",r._`${ee} && ${ee}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);m.if(r._`${Ee} !== undefined && ${Ee} in ${W}`,()=>N(Ee))})}function Q(F){return n.and(r._`${F}.keyword !== ${u}`,r._`!${F}.${l}`,n.or(r._`${F}.instancePath === ${O}`,n.and(r._`${F}.instancePath.indexOf(${O}) === 0`,r._`${F}.instancePath[${O}.length] === "/"`)),r._`${F}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`${F}.schemaPath[${E.errSchemaPath}.length] === "/"`)}function K(F,W){const N=[];for(const L in F){const ee=W[L];d.test(ee)&&N.push([L,D(ee)])}return m.object(...N)}function q(F){return d.test(F)?new i._Code(i.safeStringify(F).replace(f,(W,N)=>`" + JSON.stringify(${a.getData(N,E)}) + "`).replace(p,"")):r.stringify(F)}function D(F){return r._`function(){return ${q(F)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const g=(T,P={})=>{if(!T.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(T.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return T.addKeyword(y(P))};t.default=g,e.exports=g,e.exports.default=g})(Zl,Zl.exports)),Zl.exports}var S1;function Pe(){if(S1)return an;S1=1;var e=an&&an.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(an,"__esModule",{value:!0}),an.validateType=an.generateLazyValidator=an.Ajv=void 0;const t=e(Rv());an.Ajv=t.default;const r=e(Aj()),n=e(Oj());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const f=new t.default({$data:!0,allErrors:!0});(0,r.default)(f),(0,n.default)(f,{singleError:!0}),o==null||o.forEach(p=>f.addKeyword(p)),u=f.compile(s),Object.defineProperty(l,"errors",{get(){return u==null?void 0:u.errors}})}return u(c,d)};return l}an.generateLazyValidator=i;function a(s,o){return s.validate(o)}return an.validateType=a,an}var T1;function O3(){return T1||(T1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Pe();e.SCENE_UPDATE="SCENE_UPDATE",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(tp)),tp}var pp={},I1;function P3(){return I1||(I1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Pe();e.UPDATE="update",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Update||(e.Update={}))})(pp)),pp}var w1;function N3(){return w1||(w1=1,(function(e){var t=Ui&&Ui.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ui&&Ui.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(O3(),e),r(P3(),e)})(Ui)),Ui}var xi={},mp={},R1;function C3(){return R1||(R1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Pe();(function(r){r.SCENE="scene",r.SMART_ITEM="smart-item",r.PORTABLE_EXPERIENCE="portable-experience",r.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProjectType||(e.ProjectType={}))})(mp)),mp}var hp={},yp={},A1;function rf(){return A1||(A1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Pe();(function(r){r.UNIQUE="unique",r.MYTHIC="mythic",r.EXOTIC="exotic",r.LEGENDARY="legendary",r.EPIC="epic",r.RARE="rare",r.UNCOMMON="uncommon",r.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema);const n={[r.UNIQUE]:1,[r.MYTHIC]:10,[r.EXOTIC]:50,[r.LEGENDARY]:100,[r.EPIC]:1e3,[r.RARE]:5e3,[r.UNCOMMON]:1e4,[r.COMMON]:1e5},i={[r.UNIQUE]:"#FFE617",[r.MYTHIC]:"#FB7DE3",[r.EXOTIC]:"#E4FFB8",[r.LEGENDARY]:"#A657ED",[r.EPIC]:"#6397F2",[r.RARE]:"#3AD682",[r.UNCOMMON]:"#FF8563",[r.COMMON]:"#D4E0E0"},a={[r.UNIQUE]:"#FFB626",[r.MYTHIC]:"#FF63E1",[r.EXOTIC]:"#CAFF73",[r.LEGENDARY]:"#842DDA",[r.EPIC]:"#3D85E6",[r.RARE]:"#36CF75",[r.UNCOMMON]:"#ED6D4F",[r.COMMON]:"#ABC1C1"};function s(c){return n[c]}r.getMaxSupply=s;function o(c){return a[c]}r.getColor=o;function u(){return[r.UNIQUE,r.MYTHIC,r.EXOTIC,r.LEGENDARY,r.EPIC,r.RARE,r.UNCOMMON,r.COMMON]}r.getRarities=u;function l(c){return[i[c],a[c]]}r.getGradient=l})(e.Rarity||(e.Rarity={}))})(yp)),yp}var gp={},O1;function Ka(){return O1||(O1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Pe();(function(r){r.EYEBROWS="eyebrows",r.EYES="eyes",r.FACIAL_HAIR="facial_hair",r.HAIR="hair",r.BODY_SHAPE="body_shape",r.MOUTH="mouth",r.UPPER_BODY="upper_body",r.LOWER_BODY="lower_body",r.FEET="feet",r.EARRING="earring",r.EYEWEAR="eyewear",r.HAT="hat",r.HELMET="helmet",r.MASK="mask",r.TIARA="tiara",r.TOP_HEAD="top_head",r.SKIN="skin",r.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableCategory||(e.WearableCategory={}))})(gp)),gp}var _p={},P1;function nf(){return P1||(P1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBonesData=e.SpringBoneParams=void 0;const t=Pe();var r;(function(n){n.schema={type:"object",properties:{stiffness:{type:"number",minimum:0,maximum:4},gravityPower:{type:"number",minimum:0,maximum:2},gravityDir:{type:"array",items:[{type:"number",minimum:-10,maximum:10},{type:"number",minimum:-10,maximum:10},{type:"number",minimum:-10,maximum:10}],minItems:3,maxItems:3},drag:{type:"number",minimum:0,maximum:1},center:{type:"string",nullable:!0},isRoot:{type:"boolean",nullable:!0}},required:["stiffness","gravityPower","gravityDir","drag"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(r=e.SpringBoneParams||(e.SpringBoneParams={})),(function(n){n.schema={type:"object",properties:{version:{type:"integer",enum:[1]},models:{type:"object",additionalProperties:{type:"object",additionalProperties:r.schema,required:[]},required:[]}},required:["version","models"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpringBonesData||(e.SpringBonesData={}))})(_p)),_p}var Ep={},vp={},N1;function Ov(){return N1||(N1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Pe();(function(r){r.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",r.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyShape||(e.BodyShape={}))})(vp)),vp}var bp={},Sp={},C1;function Pj(){return C1||(C1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Pe();(function(r){r.HEAD="head",r.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Sp)),Sp}var M1;function Pv(){return M1||(M1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=Ka(),r=Pe(),n=Pj();(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(bp)),bp}var j1;function Nv(){return j1||(j1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Pe(),r=Ov(),n=Pv();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Ep)),Ep}var zi={},Wi={},Tp={},Ip={},D1;function Xa(){return D1||(D1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Pe();(function(r){r.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,t.generateLazyValidator)(r.schema);r.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(r){r.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(r){r.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(r){r.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(Ip)),Ip}var L1;function Nj(){return L1||(L1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=Ka(),r=Xa(),n=Pe();var i;(function(u){u.schema={type:"object",required:["face256","body"],properties:{face256:r.IPFSv2.schema,body:r.IPFSv2.schema}},u.validate=(0,n.generateLazyValidator)(u.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(u){u.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(u){u.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const l=new RegExp(u.schema.pattern,"i");u.validate=c=>l.test(c)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(u){u.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),(function(u){u.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},r.Color3.schema),{nullable:!0}),description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:r.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(e.Avatar||(e.Avatar={}))})(Tp)),Tp}var wp={},$1;function M3(){return $1||($1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Pe(),r=Nj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:r.Avatar.schema}},additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(wp)),wp}var q1;function j3(){return q1||(q1=1,(function(e){var t=Wi&&Wi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Wi&&Wi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Nj(),e),r(M3(),e)})(Wi)),Wi}var Rp={},Ap={},k1;function Cj(){return k1||(k1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Pe();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(r){r.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`},nearbyVoiceChat:{type:"string",enum:e.toggles,nullable:!0,errorMessage:`valid options are ${e.toggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Ap)),Ap}var Op={},B1;function Mj(){return B1||(B1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Op)),Op}var Pp={},U1;function jj(){return U1||(U1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Pe();(function(r){r.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},r.schemaValidator=(0,t.generateLazyValidator)(r.schema),r.validate=n=>r.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Pp)),Pp}var Np={},bo={},F1;function Cv(){return F1||(F1=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.displayableProperties=void 0,bo.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),bo}var Cp={},H1;function Dj(){return H1||(H1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Source||(e.Source={}))})(Cp)),Cp}var Mp={},V1;function Lj(){return V1||(V1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Mp)),Mp}var G1;function D3(){return G1||(G1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Pe(),r=Cv(),n=Cj(),i=jj(),a=Dj(),s=Lj(),o=Mj();var u;(function(l){l.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",l.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",l.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",l.USE_WEB3_API="USE_WEB3_API",l.USE_FETCH="USE_FETCH",l.USE_WEBSOCKET="USE_WEBSOCKET",l.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(u=e.RequiredPermission||(e.RequiredPermission={})),(function(l){l.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},r.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(u)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:u.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},l.validate=(0,t.generateLazyValidator)(l.schema)})(e.Scene||(e.Scene={}))})(Np)),Np}var x1;function L3(){return x1||(x1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=Cj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=Mj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=jj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=D3();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=Dj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=Lj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(Rp)),Rp}var Yi={},jp={},Dp={},z1;function $j(){return z1||(z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Pe();(function(r){r.EN="en",r.ES="es"})(e.Locale||(e.Locale={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Locale||(e.Locale={}))})(Dp)),Dp}var W1;function qj(){return W1||(W1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Pe(),r=$j();(function(n){n.schema={type:"object",properties:{code:r.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(jp)),jp}var Lp={},Y1;function kj(){return Y1||(Y1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Metrics||(e.Metrics={}))})(Lp)),Lp}var $p={},K1;function Mv(){return K1||(K1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=rf(),r=Pe();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,r.generateLazyValidator)(n);function a(s){return i(s)}e.isStandard=a})($p)),$p}var qp={},Ki={},kp={},X1;function $3(){return X1||(X1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MerkleProof||(e.MerkleProof={}))})(kp)),kp}var J1;function Bj(){return J1||(J1=1,(function(e){var t=Ki&&Ki.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ki&&Ki.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r($3(),e)})(Ki)),Ki}var Bp={},Q1;function jv(){return Q1||(Q1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=Pe();var r;(function(d){d.SINGLE="single",d.ANY="any",d.MULTIPLE="multiple",d.RANGE="range"})(r=e.MappingType||(e.MappingType={}));var n;(function(d){d.MAINNET="mainnet",d.BASE_MAINNET="base_mainnet",d.BASE_SEPOLIA="base_sepolia",d.MONAD_MAINNET="monad_mainnet",d.MONAD_TESTNET="monad_testnet",d.APE_MAINNET="ape_mainnet",d.APE_CALDERA="ape_caldera",d.MATIC="matic",d.SEPOLIA="sepolia",d.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.ANY}},required:["type"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(d){d._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(p,y){if(!y||!y.from||!y.to)return!1;let{to:g,from:T}=y;return(typeof T!="bigint"||typeof g!="bigint")&&(T=BigInt(T),g=BigInt(g)),T<=g},errors:!1},d.schema={type:"object",properties:{type:{type:"string",const:r.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[d._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var u;(function(d){d.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo])})(u=e.Mapping||(e.Mapping={})),(function(d){d._isMappingsValid={keyword:"_isMappingsValid",validate:function(p,y){try{c(y)}catch{return!1}return!0},errors:!1},d.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:u.schema}},minProperties:1,required:[],additionalProperties:!1};const f=Object.values(n).reduce((p,y)=>(p[y]=d.innerSchema,p),{});d.schema={type:"object",properties:f,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo,d._isMappingsValid])})(e.Mappings||(e.Mappings={}));class l extends Error{constructor(f,p,y){super(f),this.existingMapping=p,this.conflictingMapping=y}}e.AddMappingError=l;function c(d={}){const f={};for(const[h,E]of Object.entries(d)){f[h]={};for(const[v,O]of Object.entries(E))for(const C of O)w(h,v,C)}function p(){return JSON.parse(JSON.stringify(f))}function y(h,E,v){const O=BigInt(h);return O>=BigInt(E)&&O<=BigInt(v)}function g(h,E){switch(E.type){case r.SINGLE:return h.id===E.id;case r.MULTIPLE:return E.ids.includes(h.id);case r.RANGE:return y(h.id,E.from,E.to);default:return!1}}function T(h,E){switch(E.type){case r.SINGLE:return h.ids.includes(E.id);case r.MULTIPLE:return h.ids.some(v=>E.ids.includes(v));case r.RANGE:return h.ids.some(v=>y(v,E.from,E.to));default:return!1}}function P(h,E){switch(E.type){case r.SINGLE:return y(E.id,h.from,h.to);case r.MULTIPLE:return E.ids.some(v=>y(v,h.from,h.to));case r.RANGE:return BigInt(h.from)<=BigInt(E.to)&&BigInt(h.to)>=BigInt(E.from)}}function m(h,E){if(h.type===r.ANY||E.type===r.ANY)return!0;switch(h.type){case r.SINGLE:return g(h,E);case r.MULTIPLE:return T(h,E);case r.RANGE:return P(h,E)}}function w(h,E,v){var O,C;const $=E.toLowerCase();f[h]=(O=f[h])!==null&&O!==void 0?O:{},f[h][$]=(C=f[h][$])!==null&&C!==void 0?C:[];for(const B of f[h][$])if(m(B,v))throw new l(`Cannot add mapping to contract ${$} on network ${h} because it overlaps with existing mapping`,B,v);f[h][$].push(v)}function I(h,E,v){var O;return!((O=f[h])===null||O===void 0)&&O[E]?f[h][E].some(C=>{switch(C.type){case r.SINGLE:return C.id===v;case r.ANY:return!0;case r.MULTIPLE:return C.ids.includes(v);case r.RANGE:return BigInt(v)>=BigInt(C.from)&&BigInt(v)<=BigInt(C.to)}}):!1}return{addMapping:w,getMappings:p,includesNft:I}}e.createMappingsHelper=c})(Bp)),Bp}var Z1;function Dv(){return Z1||(Z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Pe(),r=Bj(),n=jv();e.schema={type:"object",properties:{merkleProof:r.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(o,u){var l;const c=u;return!((l=c==null?void 0:c.merkleProof)===null||l===void 0)&&l.hashingKeys?c.merkleProof.hashingKeys.every(d=>c.hasOwnProperty(d)):!1},errors:!1},a=(0,t.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(qp)),qp}var Up={},Fp={},on={},eI;function Uj(){if(eI)return on;eI=1,Object.defineProperty(on,"__esModule",{value:!0}),on.isBaseEmote=on.isBaseAvatar=on.requiredBaseItemProps=on.baseItemProperties=void 0;const e=qj(),t=kj(),r=Cv();on.baseItemProperties=Object.assign(Object.assign({},r.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},t.Metrics.schema),{nullable:!0})}),on.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(a){if(!a||!a.id)return!1;const s=a.id.split(":"),o=s[1]==="decentraland",u=s[3]==="base-avatars";return s.length===5&&o&&u}on.isBaseAvatar=n;function i(a){if(!a||!a.id)return!1;const s=a.id.split(":");return s.length===5&&s[1]==="decentraland"&&s[3]==="base-emotes"}return on.isBaseEmote=i,on}var tI;function q3(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Pe(),r=Ka(),n=Nv(),i=Uj(),a=Mv(),s=Dv(),o=Pv(),u=jv(),l=nf();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0},springBones:Object.assign(Object.assign({},l.SpringBonesData.schema),{nullable:!0})},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const d={keyword:"_isThirdParty",validate:(p,y)=>!p||(0,s.isThirdParty)(y),errors:!1},f={keyword:"_isBaseAvatar",validate:(p,y)=>!p||(0,i.isBaseAvatar)(y),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[d,f,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Fp)),Fp}var rI;function k3(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBonesData=e.SpringBoneParams=e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Nv();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=q3();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Ka();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=Pj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Pv();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}});var s=nf();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return s.SpringBoneParams}}),Object.defineProperty(e,"SpringBonesData",{enumerable:!0,get:function(){return s.SpringBonesData}})})(Up)),Up}var Hp={},Vp={},Gp={},xp={},nI;function Fj(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Pe();(function(r){r.DANCE="dance",r.STUNT="stunt",r.GREETINGS="greetings",r.FUN="fun",r.POSES="poses",r.REACTIONS="reactions",r.HORROR="horror",r.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(xp)),xp}var zp={},iI;function Hj(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Pe(),r=Ov();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(zp)),zp}var Wp={},aI;function Vj(){return aI||(aI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=Pe();var r;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(r=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.ArmatureId||(e.ArmatureId={}));var n;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[r.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[r.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",r.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[r.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(r).reduce((a,s)=>(a[s]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${s} must contain valid animation data when provided`}),a),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Wp)),Wp}var sI;function Gj(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=Fj(),r=Pe(),n=Hj(),i=Vj();(function(a){a.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Gp)),Gp}var oI;function B3(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=xj(),r=Pe(),n=Uj(),i=Mv(),a=Dv(),s=Gj();(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const u={keyword:"_isThirdParty",validate:(c,d)=>!c||(0,t.isThirdParty)(d),errors:!1},l={keyword:"_isBaseEmote",validate:(c,d)=>!c||(0,n.isBaseEmote)(d),errors:!1};o.validate=(0,r.generateLazyValidator)(o.schema,[u,l,t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Vp)),Vp}var Yp={},uI;function U3(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Pe();(function(r){r.SIMPLE="simple",r.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Yp)),Yp}var Kp={},cI;function F3(){return cI||(cI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=Pe();(function(r){r.SIMPLE_OUTCOME="so",r.MULTIPLE_OUTCOME="mo",r.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Kp)),Kp}var lI;function H3(){return lI||(lI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=B3();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=Hj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=Gj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=Vj();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var a=Fj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=U3();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=F3();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Hp)),Hp}var dI;function xj(){return dI||(dI=1,(function(e){var t=Yi&&Yi.__createBinding||(Object.create?(function(l,c,d,f){f===void 0&&(f=d);var p=Object.getOwnPropertyDescriptor(c,d);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,f,p)}):(function(l,c,d,f){f===void 0&&(f=d),l[f]=c[d]})),r=Yi&&Yi.__exportStar||function(l,c){for(var d in l)d!=="default"&&!Object.prototype.hasOwnProperty.call(c,d)&&t(c,l,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=qj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=$j();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=kj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Ov();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Mv();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=Dv();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(jv(),e),r(k3(),e),r(H3(),e)})(Yi)),Yi}var Xp={},Jp={},fI;function zu(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Pe();var r;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(r=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:r.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Jp)),Jp}var pI;function V3(){return pI||(pI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Xa(),r=zu(),n=Pe();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Xp)),Xp}var Qp={},Zp={},mI;function zj(){return mI||(mI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Xa(),r=Pe();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Zp)),Zp}var hI;function Wj(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Xa(),r=zj(),n=Pe();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:r.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Qp)),Qp}var em={},yI;function G3(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=zu(),r=Pe();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(em)),em}var Xi={},tm={},gI;function x3(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=Ka(),r=Xa(),n=Pe();var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(i=e.Outfit||(e.Outfit={})),(function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.Outfits||(e.Outfits={}))})(tm)),tm}var _I;function z3(){return _I||(_I=1,(function(e){var t=Xi&&Xi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Xi&&Xi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(x3(),e)})(Xi)),Xi}var Ji={},rm={},EI;function Yj(){return EI||(EI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(t){t.BADGE_GRANTED="badge_granted",t.BID_ACCEPTED="bid_accepted",t.BID_RECEIVED="bid_received",t.EVENTS_STARTED="events_started",t.EVENTS_STARTS_SOON="events_starts_soon",t.EVENT_CREATED="event_created",t.EVENT_APPROVED="event_approved",t.EVENT_REJECTED="event_rejected",t.EVENT_DELETED="event_deleted",t.GOVERNANCE_ANNOUNCEMENT="governance_announcement",t.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",t.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",t.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",t.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",t.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",t.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",t.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",t.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",t.GOVERNANCE_TENDER_PASSED="governance_tender_passed",t.GOVERNANCE_WHALE_VOTE="governance_whale_vote",t.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",t.ITEM_SOLD="item_sold",t.ITEM_PUBLISHED="item_published",t.LAND_RENTAL_ENDED="rental_ended",t.LAND_RENTED="rental_started",t.REWARD_ASSIGNED="reward_assignment",t.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",t.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",t.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",t.REWARD_DELAYED="reward_delayed",t.REWARD_IN_PROGRESS="reward_in_progress",t.ROYALTIES_EARNED="royalties_earned",t.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",t.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",t.WORLDS_ACCESS_RESTORED="worlds_access_restored",t.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",t.WORLDS_MISSING_RESOURCES="worlds_missing_resources",t.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",t.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",t.CREDITS_GOAL_COMPLETED="credits_goal_completed",t.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",t.STREAMING_KEY_RESET="streaming_key_reset",t.STREAMING_KEY_REVOKE="streaming_key_revoke",t.STREAMING_KEY_EXPIRED="streaming_key_expired",t.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",t.STREAMING_PLACE_UPDATED="streaming_place_updated",t.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",t.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",t.CREDITS_REMINDER_USAGE="credits_reminder_usage",t.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",t.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",t.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",t.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",t.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",t.COMMUNITY_DELETED="community_deleted",t.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",t.COMMUNITY_RENAMED="community_renamed",t.COMMUNITY_MEMBER_BANNED="community_member_banned",t.COMMUNITY_MEMBER_REMOVED="community_member_removed",t.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",t.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",t.COMMUNITY_INVITE_RECEIVED="community_invite_received",t.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",t.COMMUNITY_POST_ADDED="community_post_added",t.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",t.USER_BANNED_FROM_SCENE="user_banned_from_scene",t.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",t.TRANSFER_RECEIVED="transfer_received",t.TIP_RECEIVED="tip_received",t.BANNED="banned",t.BAN_WARNING="ban_warning",t.BAN_LIFTED="ban_lifted"})(e.NotificationType||(e.NotificationType={})),(function(t){t.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(rm)),rm}var nm={},im={},vI;function Kj(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Pe(),r=Yj(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(r.NotificationType).reduce((a,s)=>(a[s]=n,a),{});(function(a){a.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(r.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(im)),im}var am={},bI;function Xj(){return bI||(bI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(t){t.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const r=new RegExp(t.schema.pattern);t.validate=n=>r.test(n)})(e.Email||(e.Email={}))})(am)),am}var SI;function W3(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Pe(),r=Kj(),n=Xa(),i=Xj();(function(a){a.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:r.SubscriptionDetails.schema}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(nm)),nm}var TI;function Y3(){return TI||(TI=1,(function(e){var t=Ji&&Ji.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ji&&Ji.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Yj(),e),r(W3(),e),r(Kj(),e)})(Ji)),Ji}var Qi={},sm={},II;function Cr(){return II||(II=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(t){(function(r){r.BLOCKCHAIN="blockchain",r.CATALYST_DEPLOYMENT="catalyst-deployment",r.WORLD="world",r.CLIENT="client",r.WEB="web",r.MARKETPLACE="marketplace",r.REWARDS="rewards",r.BADGE="badge",r.ASSET_BUNDLE="asset-bundle",r.SOCIAL_SERVICE="social-service",r.CREDITS_SERVICE="credits-service",r.STREAMING="streaming",r.COMMS="comms",r.REFERRAL="referral",r.COMMUNITY="community",r.CAMERA="camera",r.EVENT="event",r.GOVERNANCE="governance",r.MODERATION="moderation"})(t.Type||(t.Type={})),(function(r){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received",n.TIP_RECEIVED="tip-received"})(r.Blockchain||(r.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(r.Marketplace||(r.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(r.CatalystDeployment||(r.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLD_SETTINGS_CHANGED="world_settings_changed",n.WORLD_SCENES_UNDEPLOYMENT="world_scenes_undeployment",n.WORLD_UNDEPLOYMENT="world_undeployment",n.WORLD_SPAWN_COORDINATE_SET="world_spawn_coordinate_set",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(r.Worlds||(r.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(r.Client||(r.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(r.Web||(r.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(r.Rewards||(r.Rewards={})),(function(n){n.GRANTED="badge-granted"})(r.Badge||(r.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(r.AssetBundle||(r.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(r.SocialService||(r.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(r.CreditsService||(r.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(r.Streaming||(r.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(r.Comms||(r.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(r.Referral||(r.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_LEFT="community-member-left",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(r.Community||(r.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(r.Camera||(r.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended",n.EVENT_APPROVED="event-approved",n.EVENT_REJECTED="event-rejected",n.EVENT_DELETED="event-deleted"})(r.Event||(r.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(r.Governance||(r.Governance={})),(function(n){n.USER_BAN_CREATED="user-ban-created",n.USER_BAN_LIFTED="user-ban-lifted",n.USER_WARNING_CREATED="user-warning-created"})(r.Moderation||(r.Moderation={}))})(t.SubType||(t.SubType={}))})(e.Events||(e.Events={}))})(sm)),sm}var om={},wI;function K3(){return wI||(wI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},amount:{type:"string"}},required:["senderAddress","receiverAddress","amount"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(om)),om}var um={},RI;function X3(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=zu(),r=Pe(),n=Wj(),i=Cr();(function(a){a.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:t.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(um)),um}var cm={},AI;function J3(){return AI||(AI=1,Object.defineProperty(cm,"__esModule",{value:!0})),cm}var lm={},OI;function Q3(){return OI||(OI=1,Object.defineProperty(lm,"__esModule",{value:!0})),lm}var dm={},PI;function Z3(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MARKETPLACE},subType:{type:"string",const:r.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(dm)),dm}var fm={},So={},NI;function af(){if(NI)return So;NI=1,Object.defineProperty(So,"__esModule",{value:!0}),So.createEventSchema=void 0;function e(t,r,n){return{type:"object",properties:{type:{type:"string",const:t},subType:{type:"string",const:r},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return So.createEventSchema=e,So}var CI;function e4(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const t=Pe(),r=Cr(),n=af(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},a={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(fm)),fm}var pm={},MI;function t4(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BADGE},subType:{type:"string",const:r.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(pm)),pm}var mm={},jI;function r4(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const t=Pe(),r=Cr(),n=af(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(mm)),mm}var hm={},DI;function n4(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=Pe(),r=Cr();var n;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(hm)),hm}var ym={},LI;function i4(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Pe(),r=Cr(),n=af(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(ym)),ym}var gm={},$I;function a4(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_LEFT},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},memberAddress:{type:"string"}},required:["id","memberAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(gm)),gm}var _m={},qI;function s4(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(_m)),_m}var Em={},kI;function o4(){return kI||(kI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventDeletedEvent=e.EventRejectedEvent=e.EventApprovedEvent=e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_APPROVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{host:{type:"string"},title:{type:"string"},description:{type:"string"},image:{type:"string"},link:{type:"string"}},required:["host","title","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventApprovedEvent||(e.EventApprovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_REJECTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{host:{type:"string"},title:{type:"string"},description:{type:"string"},image:{type:"string"},reason:{type:"string"}},required:["host","title","image","reason"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventRejectedEvent||(e.EventRejectedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_DELETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{host:{type:"string"},title:{type:"string"},description:{type:"string"},image:{type:"string"},reason:{type:"string",nullable:!0}},required:["host","title","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventDeletedEvent||(e.EventDeletedEvent={}))})(Em)),Em}var vm={},BI;function u4(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const t=Pe(),r=Cr(),n=af(),i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(vm)),vm}var bm={},UI;function c4(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;const t=zu(),r=Pe(),n=Cr();(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},contentRating:{type:"string",nullable:!0},skyboxTime:{type:"number",nullable:!0},categories:{type:"array",items:{type:"string"},nullable:!0},singlePlayer:{type:"boolean",nullable:!0},showInPlaces:{type:"boolean",nullable:!0},thumbnailUrl:{type:"string",nullable:!0},accessType:{type:"string",nullable:!0}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string",pattern:"^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$"},oldCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1,nullable:!0},newCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1}},required:["name","oldCoordinate","newCoordinate"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},scenes:{type:"array",items:{type:"object",properties:{entityId:{type:"string"},baseParcel:{type:"string"}},required:["entityId","baseParcel"],additionalProperties:!1},minItems:1}},required:["worldName","scenes"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:t.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(bm)),bm}var Sm={},FI;function l4(){return FI||(FI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=Pe(),r=Cr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},bannedBy:{type:"string"},reason:{type:"string"},bannedAt:{type:"number",minimum:0},expiresAt:{type:"number",nullable:!0,minimum:0},customMessage:{type:"string",nullable:!0}},required:["id","bannedAddress","bannedBy","reason","bannedAt","expiresAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},liftedBy:{type:"string"},liftedAt:{type:"number",minimum:0}},required:["id","bannedAddress","liftedBy","liftedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},warnedAddress:{type:"string"},warnedBy:{type:"string"},reason:{type:"string"},warnedAt:{type:"number",minimum:0}},required:["id","warnedAddress","warnedBy","reason","warnedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(Sm)),Sm}var HI;function d4(){return HI||(HI=1,(function(e){var t=Qi&&Qi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Qi&&Qi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Cr(),e),r(K3(),e),r(X3(),e),r(J3(),e),r(Q3(),e),r(Z3(),e),r(e4(),e),r(t4(),e),r(r4(),e),r(n4(),e),r(i4(),e),r(a4(),e),r(s4(),e),r(o4(),e),r(u4(),e),r(c4(),e),r(l4(),e)})(Qi)),Qi}var VI;function Lv(){return VI||(VI=1,(function(e){var t=zi&&zi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=zi&&zi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(j3(),e),r(L3(),e),r(xj(),e),r(Cv(),e),r(Bj(),e),r(V3(),e),r(Wj(),e),r(G3(),e),r(z3(),e),r(Y3(),e),r(d4(),e)})(zi)),zi}var GI;function f4(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=rf(),r=Ka(),n=nf(),i=Nv(),a=Pe(),s=Lv();(function(o){o.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:r.WearableCategory.schema},hides:{type:"array",items:r.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:i.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0},springBones:Object.assign(Object.assign({},n.SpringBonesData.schema),{nullable:!0})},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},o.validate=(0,a.generateLazyValidator)(o.schema)})(e.WearableJson||(e.WearableJson={}))})(hp)),hp}var xI;function p4(){return xI||(xI=1,(function(e){var t=xi&&xi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=xi&&xi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(C3(),e),r(f4(),e)})(xi)),xi}var zI;function m4(){return zI||(zI=1,(function(e){var t=Bi&&Bi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Bi&&Bi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(N3(),e),r(p4(),e)})(Bi)),Bi}var Zi={},Tm={},WI;function h4(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Pe();(function(r){r.MOST_SALES="most_sales",r.MOST_PURCHASES="most_purchases",r.MOST_SPENT="most_spent",r.MOST_EARNED="most_earned",r.MOST_ROYALTIES="most_royalties",r.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(r){r.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Account||(e.Account={}))})(Tm)),Tm}var Im={},wm={},YI;function Jj(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Pe(),r=vn();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai",a.MATIC_AMOY="Amoy",a.AVALANCHE_MAINNET="Avalanche",a.BINANCE_MAINNET="Binance Smart Chain",a.ARBITRUM_MAINNET="Arbitrum",a.OPTIMISM_MAINNET="Optimism",a.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return r.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return r.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return r.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return r.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return r.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return r.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,t.generateLazyValidator)(a.schema)})(n=e.ChainName||(e.ChainName={}))})(wm)),wm}var Rm={},KI;function En(){return KI||(KI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Pe();(function(r){r.ETHEREUM="ETHEREUM",r.MATIC="MATIC",r.AVALANCHE="AVALANCHE",r.BSC="BINANCE SMART CHAIN",r.OPTIMISM="OPTIMISM",r.ARBITRUM="ARBITRUM",r.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Network||(e.Network={}))})(Rm)),Rm}var XI;function vn(){return XI||(XI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Pe(),r=Jj(),n=En();var i;(function(l){l[l.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",l[l.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",l[l.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",l[l.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",l[l.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",l[l.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",l[l.MATIC_MAINNET=137]="MATIC_MAINNET",l[l.MATIC_MUMBAI=80001]="MATIC_MUMBAI",l[l.MATIC_AMOY=80002]="MATIC_AMOY",l[l.BSC_MAINNET=56]="BSC_MAINNET",l[l.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",l[l.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",l[l.FANTOM_MAINNET=250]="FANTOM_MAINNET",l[l.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function a(l){switch(l){case i.ETHEREUM_MAINNET:return r.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return r.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return r.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return r.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return r.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return r.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return r.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return r.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return r.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return r.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return r.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return r.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return r.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return r.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function s(l){switch(l){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=s;function o(l){const c={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(l){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},c);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},c);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c)}}e.getNetworkMapping=o;function u(l){switch(l){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=u,(function(l){l.schema={type:"number",enum:Object.values(l)},l.validate=(0,t.generateLazyValidator)(l.schema)})(i=e.ChainId||(e.ChainId={}))})(Im)),Im}var Am={},JI;function y4(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Pe(),r=vn(),n=En();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(Am)),Am}var Om={},Pm={},QI;function sf(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Pe();(function(r){r.PARCEL="parcel",r.ESTATE="estate",r.WEARABLE="wearable",r.ENS="ens",r.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Pm)),Pm}var ZI;function g4(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Pe(),r=vn(),n=En(),i=sf();(function(a){a.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:r.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Contract||(e.Contract={}))})(Om)),Om}var Nm={},Cm={},ew;function Qj(){return ew||(ew=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Pe(),r=vn(),n=Lv(),i=En(),a=sf(),s=rf(),o=Ka();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_LISTED="recently_listed",u.RECENTLY_SOLD="recently_sold",u.CHEAPEST="cheapest",u.RENTAL_LISTING_DATE="rental_listing_date",u.RENTAL_DATE="rented_date",u.MAX_RENTAL_PRICE="max_rental_price",u.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:r.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,t.generateLazyValidator)(u.schema)})(e.NFT||(e.NFT={}))})(Cm)),Cm}var tw;function _4(){return tw||(tw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Pe(),r=vn(),n=En(),i=Qj(),a=sf();(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:r.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.Item||(e.Item={}))})(Nm)),Nm}var Mm={},rw;function $v(){return rw||(rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Pe();(function(r){r.OPEN="open",r.SOLD="sold",r.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Mm)),Mm}var jm={},nw;function E4(){return nw||(nw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(jm)),jm}var Dm={},iw;function v4(){return iw||(iw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Pe(),r=vn(),n=En();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Dm)),Dm}var Lm={},aw;function b4(){return aw||(aw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(t){t.ASC="asc",t.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Lm)),Lm}var $m={},sw;function S4(){return sw||(sw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Pe(),r=vn(),n=$v(),i=En();(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Order||(e.Order={}))})($m)),$m}var qm={},ow;function T4(){return ow||(ow=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Pe();(function(r){r.INJECTED="injected",r.MAGIC="magic",r.MAGIC_TEST="magic_test",r.FORTMATIC="formatic",r.NETWORK="network",r.WALLET_CONNECT="wallet_connect",r.WALLET_CONNECT_V2="wallet_connect_v2",r.WALLET_LINK="wallet_link",r.METAMASK_MOBILE="metamask_mobile",r.AUTH_SERVER="auth_server",r.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProviderType||(e.ProviderType={}))})(qm)),qm}var km={},uw;function Zj(){return uw||(uw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Pe();(function(r){r.ORDER="order",r.BID="bid",r.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SaleType||(e.SaleType={}))})(km)),km}var Bm={},cw;function I4(){return cw||(cw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Pe(),r=vn(),n=Zj(),i=En();(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:r.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Sale||(e.Sale={}))})(Bm)),Bm}var Um={},lw;function w4(){return lw||(lw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=Pe(),r=vn(),n=En();(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(a){a.PARCEL="parcel",a.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:r.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Um)),Um}var Fm={},dw;function R4(){return dw||(dw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(t){t.DATE="date",t.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Fm)),Fm}var Hm={},fw;function A4(){return fw||(fw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Store||(e.Store={}))})(Hm)),Hm}var Vm={},pw;function O4(){return pw||(pw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Pe();(function(r){r.MALE="male",r.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(r){r.MALE="male",r.FEMALE="female",r.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableGender||(e.WearableGender={}))})(Vm)),Vm}var Gm={},mw;function P4(){return mw||(mw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Pe();function r(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=r;function n(i,a){const s=r().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Gm)),Gm}var xm={},hw;function N4(){return hw||(hw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Pe(),r=vn(),n=$v(),i=En();(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(a){const s={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};a.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...s.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Bid||(e.Bid={}))})(xm)),xm}var zm={},yw;function C4(){return yw||(yw=1,Object.defineProperty(zm,"__esModule",{value:!0})),zm}var Wm={},gw;function M4(){return gw||(gw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(t){t.BID="bid",t.PUBLIC_NFT_ORDER="public_nft_order",t.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(t){t[t.ERC20=1]="ERC20",t[t.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",t[t.ERC721=3]="ERC721",t[t.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(t){t.SENT="sent",t.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Wm)),Wm}var ea={},Ym={},_w;function j4(){return _w||(_w=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Pe();(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Ym)),Ym}var Km={},Ew;function D4(){return Ew||(Ew=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(t){t.AUTH="authentication",t.BUILDER="builder",t.MARKETPLACE="marketplace",t.PROFILE="profile",t.CONFIG="configurator",t.JESUS="jesus"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Km)),Km}var Xm={},vw;function L4(){return vw||(vw=1,Object.defineProperty(Xm,"__esModule",{value:!0})),Xm}var Jm={},bw;function $4(){return bw||(bw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Pe();(function(r){r.ANIMATION_PLAY="animation_play",r.ANIMATION_PAUSE="animation_pause",r.ANIMATION_LOOP="animation_loop",r.ANIMATION_END="animation_end",r.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Jm)),Jm}var Qm={},Sw;function q4(){return Sw||(Sw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Pe();(function(r){r.IDLE="idle",r.WALK="walk",r.RUN="run",r.JUMP="jump",r.CLAP="clap",r.DAB="dab",r.DANCE="dance",r.FASHION="fashion",r.FASHION_2="fashion-2",r.FASHION_3="fashion-3",r.FASHION_4="fashion-4",r.LOVE="love",r.MONEY="money",r.FIST_PUMP="fist-pump",r.HEAD_EXPLODE="head-explode",r.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(Qm)),Qm}var Zm={},Tw;function k4(){return Tw||(Tw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=Pe();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const r=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};e.sendMessage=r})(Zm)),Zm}var eh={},Iw;function B4(){return Iw||(Iw=1,Object.defineProperty(eh,"__esModule",{value:!0})),eh}var th={},ww;function U4(){return ww||(ww=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Pe();(function(r){r.ORTHOGRAPHIC="orthographic",r.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(th)),th}var rh={},Rw;function F4(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Pe();(function(r){r.TEXTURE="texture",r.WEARABLE="wearable",r.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewType||(e.PreviewType={}))})(rh)),rh}var nh={},Aw;function H4(){return Aw||(Aw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;var t=nf();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return t.SpringBoneParams}})})(nh)),nh}var ih={},Ow;function V4(){return Ow||(Ow=1,Object.defineProperty(ih,"__esModule",{value:!0})),ih}var ah={},Pw;function G4(){return Pw||(Pw=1,Object.defineProperty(ah,"__esModule",{value:!0})),ah}var sh={},Nw;function x4(){return Nw||(Nw=1,Object.defineProperty(sh,"__esModule",{value:!0})),sh}var oh={},Cw;function z4(){return Cw||(Cw=1,Object.defineProperty(oh,"__esModule",{value:!0})),oh}var uh={},Mw;function W4(){return Mw||(Mw=1,Object.defineProperty(uh,"__esModule",{value:!0})),uh}var ch={},jw;function Y4(){return jw||(jw=1,Object.defineProperty(ch,"__esModule",{value:!0})),ch}var lh={},Dw;function K4(){return Dw||(Dw=1,Object.defineProperty(lh,"__esModule",{value:!0})),lh}var dh={},Lw;function X4(){return Lw||(Lw=1,Object.defineProperty(dh,"__esModule",{value:!0})),dh}var $w;function J4(){return $w||($w=1,(function(e){var t=ea&&ea.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ea&&ea.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(j4(),e),r(D4(),e),r(L4(),e),r($4(),e),r(q4(),e),r(k4(),e),r(B4(),e),r(U4(),e),r(F4(),e),r(H4(),e),r(V4(),e),r(G4(),e),r(x4(),e),r(z4(),e),r(W4(),e),r(Y4(),e),r(K4(),e),r(X4(),e)})(ea)),ea}var ta={},To={},qw;function Q4(){if(qw)return To;qw=1,Object.defineProperty(To,"__esModule",{value:!0}),To.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return To.isSysLink=e,To}var Io={},kw;function Z4(){if(kw)return Io;kw=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),Io.ContentfulLocale=e,Io}var fh={},Bw;function eG(){return Bw||(Bw=1,Object.defineProperty(fh,"__esModule",{value:!0})),fh}var Uw;function tG(){return Uw||(Uw=1,(function(e){var t=ta&&ta.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ta&&ta.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Q4(),e),r(Z4(),e),r(eG(),e)})(ta)),ta}var Fw;function rG(){return Fw||(Fw=1,(function(e){var t=Zi&&Zi.__createBinding||(Object.create?(function($,B,V,U){U===void 0&&(U=V);var k=Object.getOwnPropertyDescriptor(B,V);(!k||("get"in k?!B.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return B[V]}}),Object.defineProperty($,U,k)}):(function($,B,V,U){U===void 0&&(U=V),$[U]=B[V]})),r=Zi&&Zi.__exportStar||function($,B){for(var V in $)V!=="default"&&!Object.prototype.hasOwnProperty.call(B,V)&&t(B,$,V)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=h4();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=vn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var a=Jj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=y4();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=g4();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=_4();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=$v();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=E4();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=v4();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var f=En();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return f.Network}});var p=sf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return p.NFTCategory}});var y=Qj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return y.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return y.NFTSortBy}});var g=b4();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return g.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return g.CatalogSortDirection}});var T=S4();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return T.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return T.OrderSortBy}});var P=T4();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return P.ProviderType}});var m=rf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return m.Rarity}});var w=Zj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return w.SaleType}});var I=I4();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return I.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return I.SaleSortBy}});var h=w4();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return h.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return h.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return h.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return h.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return h.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return h.PeriodCreation}});var E=R4();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return E.AnalyticsDayDataSortBy}});var v=A4();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return v.Store}});var O=O4();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return O.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return O.GenderFilterOption}});var C=P4();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return C.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return C.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return C.isInsideWorldLimits}}),r(N4(),e),r(C4(),e),r(M4(),e),r(J4(),e),r(tG(),e)})(Zi)),Zi}var ph={},Hw;function nG(){return Hw||(Hw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Pe();(function(r){r.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(ph)),ph}var ra={},mh={},wo={},Vw;function eD(){if(Vw)return wo;Vw=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.isInExceptionBlock=void 0;function e(i,a){return i>=62&&i<=150&&a>=151&&a<=158}function t(i,a){return i>=151&&i<=162&&a>=144&&a<=158}function r(i,a){return i>=151&&i<=163&&a>=59&&a<=143}function n(i,a){return e(i,a)||t(i,a)||r(i,a)}return wo.isInExceptionBlock=n,wo}var Gw;function iG(){return Gw||(Gw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Pe(),r=eD();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(p,y){return!y||typeof y.x!="number"||typeof y.y!="number"?!1:o(y)||(0,r.isInExceptionBlock)(y.x,y.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:f,y:p}){return`${f},${p}`}n.parcelToString=i;function a(f){const p=f.match(/^(-?\d+),(-?\d+)$/);if(!p)return null;const[,y,g]=p,T=parseInt(y,10),P=parseInt(g,10);return{x:T,y:P}}n.stringToParcel=a;function s(f){const p=a(f);return p?n.validate(p):!1}n.isParcelStringValid=s;function o(f){const{x:p,y}=f;return p>=e.PARCEL_LIMITS.minX&&p<=e.PARCEL_LIMITS.maxX&&y>=e.PARCEL_LIMITS.minY&&y<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(f){return(0,r.isInExceptionBlock)(f.x,f.y)}n.isExceptionParcel=u;function l(f){return o(f)||u(f)}n.isInBounds=l;function c(f){return n.validate(f)}n.isValid=c;function d(f){const p=a(f);return p?n.validate(p):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(mh)),mh}var na={},xw;function aG(){if(xw)return na;xw=1,Object.defineProperty(na,"__esModule",{value:!0}),na.validateUrlInstance=na.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(p,y=2){let g=p;for(let T=0;T<y;T++)try{g=decodeURIComponent(g)}catch{break}return g.normalize("NFKC")}function r(p){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(p)}function n(p){return!!(p.username||p.password)}function i(p){return/\\/.test(p)}const a=["80","443"];function s(p,y){return!!p.port&&!y.includes(p.port)}function o(p){const y=p.toLowerCase();return!!(y==="localhost"||y.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(y)||y==="::1"||y==="[::1]"||y.startsWith("fe80:")||y.startsWith("fc00:"))}function u(p){if(p.startsWith("//"))return null;try{return{url:new URL(p),wasRelative:!1}}catch{try{return{url:new URL(p,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(p){const y=t(String(p).toLowerCase());return!(r(y)||i(y))}function c(p){return!(!p||p.includes("..")||p.includes("//")||r(p)||i(p))}function d(p,y={}){const g=Object.assign(Object.assign({},e),y),T=[...a,...g.allowedPorts];if(!p||p.length===0||p.length>4096||r(p)||i(p))return!1;const P=t(p);if(r(P)||i(P)||p.startsWith("//"))return!1;const m=u(p);if(!m)return!1;const{url:w,wasRelative:I}=m;if(w.protocol!=="http:"&&w.protocol!=="https:"&&w.protocol!==""||n(w)||i(p)||i(w.href)||!I&&(s(w,T)||!g.allowLocalhost&&w.hostname&&o(w.hostname))||!c(w.pathname)||w.pathname.length>2048)return!1;const h=Array.from(w.searchParams.entries());if(h.length>50||(w.search?w.search.startsWith("?")?w.search.length-1:w.search.length:0)>2048)return!1;for(const[v,O]of h)if(v.length===0||!l(v)||!l(O)||v.length>128||O.length>1024)return!1;return!(w.hash&&r(w.hash))}na.validateUrl=d;function f(p,y={}){return d(p.toString(),y)}return na.validateUrlInstance=f,na}var zw;function sG(){return zw||(zw=1,(function(e){var t=ra&&ra.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ra&&ra.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(iG(),e),r(eD(),e),r(aG(),e)})(ra)),ra}var Ww;function oG(){return Ww||(Ww=1,(function(e){var t=nn&&nn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u);var c=Object.getOwnPropertyDescriptor(o,u);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,l,c)}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=nn&&nn.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=nn&&nn.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(o,s,u);return r(o,s),o},i=nn&&nn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=n(m4());e.sdk=a,i(Pe(),e),i(rG(),e),i(Lv(),e),i(Xa(),e),i(nG(),e),i(zu(),e),i(zj(),e),i(Xj(),e),i(sG(),e)})(nn)),nn}var en=oG(),ia={},un={},cu={exports:{}},uG=cu.exports,Yw;function of(){return Yw||(Yw=1,(function(e,t){(function(r,n){n(t)})(uG,(function(r){function n(_){if(_.jsonrpc="2.0",!_.id||typeof _.id!="number"||Math.floor(_.id)!==_.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(_)}`);if(!_.method||typeof _.method!="string"||_.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(_)}`);if(!_.params||typeof _.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(_)}`);return _}var i={};function a(){let _,R;const M=new Promise(((X,re)=>{_=ue=>{X(ue),M.isPending=!1},R=ue=>{re(ue),M.isPending=!1}})).catch((X=>Promise.reject(X)));return M.resolve=_,M.reject=R,"finally"in M||(M.finally=X=>{M.then(X),M.catch(X)}),M.isPending=!0,M}Object.defineProperty(i,"__esModule",{value:!0});var s=i.future=a;i.default=a;var o={exports:{}};/**
|
|
63
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
64
|
+
*
|
|
65
|
+
* @version 0.8.0
|
|
66
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
67
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
68
|
+
* @license MIT
|
|
69
|
+
*/(function(_){(function(){var R="input is invalid type",M=typeof window=="object",X=M?window:{};X.JS_SHA3_NO_WINDOW&&(M=!1);var re=!M&&typeof self=="object";!X.JS_SHA3_NO_NODE_JS&&typeof hd=="object"&&hd.versions&&hd.versions.node?X=$_:re&&(X=self);var ue=!X.JS_SHA3_NO_COMMON_JS&&_.exports,Te=!X.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Ce="0123456789abcdef".split(""),He=[4,1024,262144,67108864],Ge=[0,8,16,24],Sr=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Ht=[224,256,384,512],je=[128,256],sr=["hex","buffer","arrayBuffer","array","digest"],Pt={128:168,256:136};!X.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),!Te||!X.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});for(var Nt=function(b,G,Z){return function(z){return new lt(b,G,b).update(z)[Z]()}},yr=function(b,G,Z){return function(z,ne){return new lt(b,G,ne).update(z)[Z]()}},Wn=function(b,G,Z){return function(z,ne,se,oe){return or["cshake"+b].update(z,ne,se,oe)[Z]()}},wn=function(b,G,Z){return function(z,ne,se,oe){return or["kmac"+b].update(z,ne,se,oe)[Z]()}},gr=function(b,G,Z,z){for(var ne=0;ne<sr.length;++ne){var se=sr[ne];b[se]=G(Z,z,se)}return b},Rn=function(b,G){var Z=Nt(b,G,"hex");return Z.create=function(){return new lt(b,G,b)},Z.update=function(z){return Z.create().update(z)},gr(Z,Nt,b,G)},mi=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ht,createMethod:Rn},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ht,createMethod:Rn},{name:"shake",padding:[31,7936,2031616,520093696],bits:je,createMethod:function(b,G){var Z=yr(b,G,"hex");return Z.create=function(z){return new lt(b,G,z)},Z.update=function(z,ne){return Z.create(ne).update(z)},gr(Z,yr,b,G)}},{name:"cshake",padding:He,bits:je,createMethod:function(b,G){var Z=Pt[b],z=Wn(b,0,"hex");return z.create=function(ne,se,oe){return se||oe?new lt(b,G,ne).bytepad([se,oe],Z):or["shake"+b].create(ne)},z.update=function(ne,se,oe,me){return z.create(se,oe,me).update(ne)},gr(z,Wn,b,G)}},{name:"kmac",padding:He,bits:je,createMethod:function(b,G){var Z=Pt[b],z=wn(b,0,"hex");return z.create=function(ne,se,oe){return new Fr(b,G,se).bytepad(["KMAC",oe],Z).bytepad([ne],Z)},z.update=function(ne,se,oe,me){return z.create(ne,oe,me).update(se)},gr(z,wn,b,G)}}],or={},Yn=[],_r=0;_r<mi.length;++_r)for(var An=mi[_r],Oe=An.bits,Kn=0;Kn<Oe.length;++Kn){var ns=An.name+"_"+Oe[Kn];if(Yn.push(ns),or[ns]=An.createMethod(Oe[Kn],An.padding),An.name!=="sha3"){var is=An.name+Oe[Kn];Yn.push(is),or[is]=or[ns]}}function lt(b,G,Z){this.blocks=[],this.s=[],this.padding=G,this.outputBits=Z,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(b<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Z>>5,this.extraBytes=(31&Z)>>3;for(var z=0;z<50;++z)this.s[z]=0}function Fr(b,G,Z){lt.call(this,b,G,Z)}lt.prototype.update=function(b){if(this.finalized)throw new Error("finalize already called");var G,Z=typeof b;if(Z!=="string"){if(Z!=="object")throw new Error(R);if(b===null)throw new Error(R);if(Te&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Te&&ArrayBuffer.isView(b)))throw new Error(R);G=!0}for(var z,ne,se=this.blocks,oe=this.byteCount,me=b.length,ge=this.blockCount,ye=0,Me=this.s;ye<me;){if(this.reset)for(this.reset=!1,se[0]=this.block,z=1;z<ge+1;++z)se[z]=0;if(G)for(z=this.start;ye<me&&z<oe;++ye)se[z>>2]|=b[ye]<<Ge[3&z++];else for(z=this.start;ye<me&&z<oe;++ye)(ne=b.charCodeAt(ye))<128?se[z>>2]|=ne<<Ge[3&z++]:ne<2048?(se[z>>2]|=(192|ne>>6)<<Ge[3&z++],se[z>>2]|=(128|63&ne)<<Ge[3&z++]):ne<55296||ne>=57344?(se[z>>2]|=(224|ne>>12)<<Ge[3&z++],se[z>>2]|=(128|ne>>6&63)<<Ge[3&z++],se[z>>2]|=(128|63&ne)<<Ge[3&z++]):(ne=65536+((1023&ne)<<10|1023&b.charCodeAt(++ye)),se[z>>2]|=(240|ne>>18)<<Ge[3&z++],se[z>>2]|=(128|ne>>12&63)<<Ge[3&z++],se[z>>2]|=(128|ne>>6&63)<<Ge[3&z++],se[z>>2]|=(128|63&ne)<<Ge[3&z++]);if(this.lastByteIndex=z,z>=oe){for(this.start=z-oe,this.block=se[ge],z=0;z<ge;++z)Me[z]^=se[z];x(Me),this.reset=!0}else this.start=z}return this},lt.prototype.encode=function(b,G){var Z=255&b,z=1,ne=[Z];for(Z=255&(b>>=8);Z>0;)ne.unshift(Z),Z=255&(b>>=8),++z;return G?ne.push(z):ne.unshift(z),this.update(ne),ne.length},lt.prototype.encodeString=function(b){var G,Z=typeof b;if(Z!=="string"){if(Z!=="object")throw new Error(R);if(b===null)throw new Error(R);if(Te&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Te&&ArrayBuffer.isView(b)))throw new Error(R);G=!0}var z=0,ne=b.length;if(G)z=ne;else for(var se=0;se<b.length;++se){var oe=b.charCodeAt(se);oe<128?z+=1:oe<2048?z+=2:oe<55296||oe>=57344?z+=3:(oe=65536+((1023&oe)<<10|1023&b.charCodeAt(++se)),z+=4)}return z+=this.encode(8*z),this.update(b),z},lt.prototype.bytepad=function(b,G){for(var Z=this.encode(G),z=0;z<b.length;++z)Z+=this.encodeString(b[z]);var ne=G-Z%G,se=[];return se.length=ne,this.update(se),this},lt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,G=this.lastByteIndex,Z=this.blockCount,z=this.s;if(b[G>>2]|=this.padding[3&G],this.lastByteIndex===this.byteCount)for(b[0]=b[Z],G=1;G<Z+1;++G)b[G]=0;for(b[Z-1]|=2147483648,G=0;G<Z;++G)z[G]^=b[G];x(z)}},lt.prototype.toString=lt.prototype.hex=function(){this.finalize();for(var b,G=this.blockCount,Z=this.s,z=this.outputBlocks,ne=this.extraBytes,se=0,oe=0,me="";oe<z;){for(se=0;se<G&&oe<z;++se,++oe)b=Z[se],me+=Ce[b>>4&15]+Ce[15&b]+Ce[b>>12&15]+Ce[b>>8&15]+Ce[b>>20&15]+Ce[b>>16&15]+Ce[b>>28&15]+Ce[b>>24&15];oe%G==0&&(x(Z),se=0)}return ne&&(b=Z[se],me+=Ce[b>>4&15]+Ce[15&b],ne>1&&(me+=Ce[b>>12&15]+Ce[b>>8&15]),ne>2&&(me+=Ce[b>>20&15]+Ce[b>>16&15])),me},lt.prototype.arrayBuffer=function(){this.finalize();var b,G=this.blockCount,Z=this.s,z=this.outputBlocks,ne=this.extraBytes,se=0,oe=0,me=this.outputBits>>3;b=ne?new ArrayBuffer(z+1<<2):new ArrayBuffer(me);for(var ge=new Uint32Array(b);oe<z;){for(se=0;se<G&&oe<z;++se,++oe)ge[oe]=Z[se];oe%G==0&&x(Z)}return ne&&(ge[se]=Z[se],b=b.slice(0,me)),b},lt.prototype.buffer=lt.prototype.arrayBuffer,lt.prototype.digest=lt.prototype.array=function(){this.finalize();for(var b,G,Z=this.blockCount,z=this.s,ne=this.outputBlocks,se=this.extraBytes,oe=0,me=0,ge=[];me<ne;){for(oe=0;oe<Z&&me<ne;++oe,++me)b=me<<2,G=z[oe],ge[b]=255&G,ge[b+1]=G>>8&255,ge[b+2]=G>>16&255,ge[b+3]=G>>24&255;me%Z==0&&x(z)}return se&&(b=me<<2,G=z[oe],ge[b]=255&G,se>1&&(ge[b+1]=G>>8&255),se>2&&(ge[b+2]=G>>16&255)),ge},Fr.prototype=new lt,Fr.prototype.finalize=function(){return this.encode(this.outputBits,!0),lt.prototype.finalize.call(this)};var x=function(b){var G,Z,z,ne,se,oe,me,ge,ye,Me,Ve,Ye,it,Ct,kt,tt,dt,Kt,Xn,hi,yi,Tr,On,ur,Jt,Ot,oc,uc,cc,lc,dc,fc,pc,mc,hc,yc,gc,_c,Ec,vc,bc,Sc,Tc,Ic,wc,Rc,Ac,Oc,Pc,Nc,Cc,Mc,jc,Dc,Lc,$c,qc,kc,Bc,Uc,Fc,Hc,Vc;for(z=0;z<48;z+=2)ne=b[0]^b[10]^b[20]^b[30]^b[40],se=b[1]^b[11]^b[21]^b[31]^b[41],oe=b[2]^b[12]^b[22]^b[32]^b[42],me=b[3]^b[13]^b[23]^b[33]^b[43],ge=b[4]^b[14]^b[24]^b[34]^b[44],ye=b[5]^b[15]^b[25]^b[35]^b[45],Me=b[6]^b[16]^b[26]^b[36]^b[46],Ve=b[7]^b[17]^b[27]^b[37]^b[47],G=(Ye=b[8]^b[18]^b[28]^b[38]^b[48])^(oe<<1|me>>>31),Z=(it=b[9]^b[19]^b[29]^b[39]^b[49])^(me<<1|oe>>>31),b[0]^=G,b[1]^=Z,b[10]^=G,b[11]^=Z,b[20]^=G,b[21]^=Z,b[30]^=G,b[31]^=Z,b[40]^=G,b[41]^=Z,G=ne^(ge<<1|ye>>>31),Z=se^(ye<<1|ge>>>31),b[2]^=G,b[3]^=Z,b[12]^=G,b[13]^=Z,b[22]^=G,b[23]^=Z,b[32]^=G,b[33]^=Z,b[42]^=G,b[43]^=Z,G=oe^(Me<<1|Ve>>>31),Z=me^(Ve<<1|Me>>>31),b[4]^=G,b[5]^=Z,b[14]^=G,b[15]^=Z,b[24]^=G,b[25]^=Z,b[34]^=G,b[35]^=Z,b[44]^=G,b[45]^=Z,G=ge^(Ye<<1|it>>>31),Z=ye^(it<<1|Ye>>>31),b[6]^=G,b[7]^=Z,b[16]^=G,b[17]^=Z,b[26]^=G,b[27]^=Z,b[36]^=G,b[37]^=Z,b[46]^=G,b[47]^=Z,G=Me^(ne<<1|se>>>31),Z=Ve^(se<<1|ne>>>31),b[8]^=G,b[9]^=Z,b[18]^=G,b[19]^=Z,b[28]^=G,b[29]^=Z,b[38]^=G,b[39]^=Z,b[48]^=G,b[49]^=Z,Ct=b[0],kt=b[1],Rc=b[11]<<4|b[10]>>>28,Ac=b[10]<<4|b[11]>>>28,uc=b[20]<<3|b[21]>>>29,cc=b[21]<<3|b[20]>>>29,Uc=b[31]<<9|b[30]>>>23,Fc=b[30]<<9|b[31]>>>23,Sc=b[40]<<18|b[41]>>>14,Tc=b[41]<<18|b[40]>>>14,mc=b[2]<<1|b[3]>>>31,hc=b[3]<<1|b[2]>>>31,tt=b[13]<<12|b[12]>>>20,dt=b[12]<<12|b[13]>>>20,Oc=b[22]<<10|b[23]>>>22,Pc=b[23]<<10|b[22]>>>22,lc=b[33]<<13|b[32]>>>19,dc=b[32]<<13|b[33]>>>19,Hc=b[42]<<2|b[43]>>>30,Vc=b[43]<<2|b[42]>>>30,Dc=b[5]<<30|b[4]>>>2,Lc=b[4]<<30|b[5]>>>2,yc=b[14]<<6|b[15]>>>26,gc=b[15]<<6|b[14]>>>26,Kt=b[25]<<11|b[24]>>>21,Xn=b[24]<<11|b[25]>>>21,Nc=b[34]<<15|b[35]>>>17,Cc=b[35]<<15|b[34]>>>17,fc=b[45]<<29|b[44]>>>3,pc=b[44]<<29|b[45]>>>3,ur=b[6]<<28|b[7]>>>4,Jt=b[7]<<28|b[6]>>>4,$c=b[17]<<23|b[16]>>>9,qc=b[16]<<23|b[17]>>>9,_c=b[26]<<25|b[27]>>>7,Ec=b[27]<<25|b[26]>>>7,hi=b[36]<<21|b[37]>>>11,yi=b[37]<<21|b[36]>>>11,Mc=b[47]<<24|b[46]>>>8,jc=b[46]<<24|b[47]>>>8,Ic=b[8]<<27|b[9]>>>5,wc=b[9]<<27|b[8]>>>5,Ot=b[18]<<20|b[19]>>>12,oc=b[19]<<20|b[18]>>>12,kc=b[29]<<7|b[28]>>>25,Bc=b[28]<<7|b[29]>>>25,vc=b[38]<<8|b[39]>>>24,bc=b[39]<<8|b[38]>>>24,Tr=b[48]<<14|b[49]>>>18,On=b[49]<<14|b[48]>>>18,b[0]=Ct^~tt&Kt,b[1]=kt^~dt&Xn,b[10]=ur^~Ot&uc,b[11]=Jt^~oc&cc,b[20]=mc^~yc&_c,b[21]=hc^~gc&Ec,b[30]=Ic^~Rc&Oc,b[31]=wc^~Ac&Pc,b[40]=Dc^~$c&kc,b[41]=Lc^~qc&Bc,b[2]=tt^~Kt&hi,b[3]=dt^~Xn&yi,b[12]=Ot^~uc&lc,b[13]=oc^~cc&dc,b[22]=yc^~_c&vc,b[23]=gc^~Ec&bc,b[32]=Rc^~Oc&Nc,b[33]=Ac^~Pc&Cc,b[42]=$c^~kc&Uc,b[43]=qc^~Bc&Fc,b[4]=Kt^~hi&Tr,b[5]=Xn^~yi&On,b[14]=uc^~lc&fc,b[15]=cc^~dc&pc,b[24]=_c^~vc&Sc,b[25]=Ec^~bc&Tc,b[34]=Oc^~Nc&Mc,b[35]=Pc^~Cc&jc,b[44]=kc^~Uc&Hc,b[45]=Bc^~Fc&Vc,b[6]=hi^~Tr&Ct,b[7]=yi^~On&kt,b[16]=lc^~fc&ur,b[17]=dc^~pc&Jt,b[26]=vc^~Sc&mc,b[27]=bc^~Tc&hc,b[36]=Nc^~Mc&Ic,b[37]=Cc^~jc&wc,b[46]=Uc^~Hc&Dc,b[47]=Fc^~Vc&Lc,b[8]=Tr^~Ct&tt,b[9]=On^~kt&dt,b[18]=fc^~ur&Ot,b[19]=pc^~Jt&oc,b[28]=Sc^~mc&yc,b[29]=Tc^~hc&gc,b[38]=Mc^~Ic&Rc,b[39]=jc^~wc&Ac,b[48]=Hc^~Dc&$c,b[49]=Vc^~Lc&qc,b[0]^=Sr[z],b[1]^=Sr[z+1]};if(ue)_.exports=or;else for(_r=0;_r<Yn.length;++_r)X[Yn[_r]]=or[Yn[_r]]})()})(o);var u=o.exports,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,c=Math.ceil,d=Math.floor,f="[BigNumber Error] ",p=f+"Number primitive has more than 15 significant digits: ",y=1e14,g=14,T=9007199254740991,P=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,w=1e9;function I(_){var R=0|_;return _>0||_===R?R:R-1}function h(_){for(var R,M,X=1,re=_.length,ue=_[0]+"";X<re;){for(R=_[X++]+"",M=g-R.length;M--;R="0"+R);ue+=R}for(re=ue.length;ue.charCodeAt(--re)===48;);return ue.slice(0,re+1||1)}function E(_,R){var M,X,re=_.c,ue=R.c,Te=_.s,Ce=R.s,He=_.e,Ge=R.e;if(!Te||!Ce)return null;if(M=re&&!re[0],X=ue&&!ue[0],M||X)return M?X?0:-Ce:Te;if(Te!=Ce)return Te;if(M=Te<0,X=He==Ge,!re||!ue)return X?0:!re^M?1:-1;if(!X)return He>Ge^M?1:-1;for(Ce=(He=re.length)<(Ge=ue.length)?He:Ge,Te=0;Te<Ce;Te++)if(re[Te]!=ue[Te])return re[Te]>ue[Te]^M?1:-1;return He==Ge?0:He>Ge^M?1:-1}function v(_,R,M,X){if(_<R||_>M||_!==d(_))throw Error(f+(X||"Argument")+(typeof _=="number"?_<R||_>M?" out of range: ":" not an integer: ":" not a primitive number: ")+String(_))}function O(_){var R=_.c.length-1;return I(_.e/g)==R&&_.c[R]%2!=0}function C(_,R){return(_.length>1?_.charAt(0)+"."+_.slice(1):_)+(R<0?"e":"e+")+R}function $(_,R,M){var X,re;if(R<0){for(re=M+".";++R;re+=M);_=re+_}else if(++R>(X=_.length)){for(re=M,R-=X;--R;re+=M);_+=re}else R<X&&(_=_.slice(0,R)+"."+_.slice(R));return _}var B=(function _(R){var M,X,re,ue,Te,Ce,He,Ge,Sr,Ht,je=Oe.prototype={constructor:Oe,toString:null,valueOf:null},sr=new Oe(1),Pt=20,Nt=4,yr=-7,Wn=21,wn=-1e7,gr=1e7,Rn=!1,mi=1,or=0,Yn={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},_r="0123456789abcdefghijklmnopqrstuvwxyz",An=!0;function Oe(x,b){var G,Z,z,ne,se,oe,me,ge,ye=this;if(!(ye instanceof Oe))return new Oe(x,b);if(b==null){if(x&&x._isBigNumber===!0)return ye.s=x.s,void(!x.c||x.e>gr?ye.c=ye.e=null:x.e<wn?ye.c=[ye.e=0]:(ye.e=x.e,ye.c=x.c.slice()));if((oe=typeof x=="number")&&0*x==0){if(ye.s=1/x<0?(x=-x,-1):1,x===~~x){for(ne=0,se=x;se>=10;se/=10,ne++);return void(ne>gr?ye.c=ye.e=null:(ye.e=ne,ye.c=[x]))}ge=String(x)}else{if(!l.test(ge=String(x)))return re(ye,ge,oe);ye.s=ge.charCodeAt(0)==45?(ge=ge.slice(1),-1):1}(ne=ge.indexOf("."))>-1&&(ge=ge.replace(".","")),(se=ge.search(/e/i))>0?(ne<0&&(ne=se),ne+=+ge.slice(se+1),ge=ge.substring(0,se)):ne<0&&(ne=ge.length)}else{if(v(b,2,_r.length,"Base"),b==10&&An)return lt(ye=new Oe(x),Pt+ye.e+1,Nt);if(ge=String(x),oe=typeof x=="number"){if(0*x!=0)return re(ye,ge,oe,b);if(ye.s=1/x<0?(ge=ge.slice(1),-1):1,Oe.DEBUG&&ge.replace(/^0\.0*|\./,"").length>15)throw Error(p+x)}else ye.s=ge.charCodeAt(0)===45?(ge=ge.slice(1),-1):1;for(G=_r.slice(0,b),ne=se=0,me=ge.length;se<me;se++)if(G.indexOf(Z=ge.charAt(se))<0){if(Z=="."){if(se>ne){ne=me;continue}}else if(!z&&(ge==ge.toUpperCase()&&(ge=ge.toLowerCase())||ge==ge.toLowerCase()&&(ge=ge.toUpperCase()))){z=!0,se=-1,ne=0;continue}return re(ye,String(x),oe,b)}oe=!1,(ne=(ge=X(ge,b,10,ye.s)).indexOf("."))>-1?ge=ge.replace(".",""):ne=ge.length}for(se=0;ge.charCodeAt(se)===48;se++);for(me=ge.length;ge.charCodeAt(--me)===48;);if(ge=ge.slice(se,++me)){if(me-=se,oe&&Oe.DEBUG&&me>15&&(x>T||x!==d(x)))throw Error(p+ye.s*x);if((ne=ne-se-1)>gr)ye.c=ye.e=null;else if(ne<wn)ye.c=[ye.e=0];else{if(ye.e=ne,ye.c=[],se=(ne+1)%g,ne<0&&(se+=g),se<me){for(se&&ye.c.push(+ge.slice(0,se)),me-=g;se<me;)ye.c.push(+ge.slice(se,se+=g));se=g-(ge=ge.slice(se)).length}else se-=me;for(;se--;ge+="0");ye.c.push(+ge)}}else ye.c=[ye.e=0]}function Kn(x,b,G,Z){var z,ne,se,oe,me;if(G==null?G=Nt:v(G,0,8),!x.c)return x.toString();if(z=x.c[0],se=x.e,b==null)me=h(x.c),me=Z==1||Z==2&&(se<=yr||se>=Wn)?C(me,se):$(me,se,"0");else if(ne=(x=lt(new Oe(x),b,G)).e,oe=(me=h(x.c)).length,Z==1||Z==2&&(b<=ne||ne<=yr)){for(;oe<b;me+="0",oe++);me=C(me,ne)}else if(b-=se,me=$(me,ne,"0"),ne+1>oe){if(--b>0)for(me+=".";b--;me+="0");}else if((b+=ne-oe)>0)for(ne+1==oe&&(me+=".");b--;me+="0");return x.s<0&&z?"-"+me:me}function ns(x,b){for(var G,Z=1,z=new Oe(x[0]);Z<x.length;Z++){if(!(G=new Oe(x[Z])).s){z=G;break}b.call(z,G)&&(z=G)}return z}function is(x,b,G){for(var Z=1,z=b.length;!b[--z];b.pop());for(z=b[0];z>=10;z/=10,Z++);return(G=Z+G*g-1)>gr?x.c=x.e=null:G<wn?x.c=[x.e=0]:(x.e=G,x.c=b),x}function lt(x,b,G,Z){var z,ne,se,oe,me,ge,ye,Me=x.c,Ve=P;if(Me){e:{for(z=1,oe=Me[0];oe>=10;oe/=10,z++);if((ne=b-z)<0)ne+=g,se=b,ye=(me=Me[ge=0])/Ve[z-se-1]%10|0;else if((ge=c((ne+1)/g))>=Me.length){if(!Z)break e;for(;Me.length<=ge;Me.push(0));me=ye=0,z=1,se=(ne%=g)-g+1}else{for(me=oe=Me[ge],z=1;oe>=10;oe/=10,z++);ye=(se=(ne%=g)-g+z)<0?0:me/Ve[z-se-1]%10|0}if(Z=Z||b<0||Me[ge+1]!=null||(se<0?me:me%Ve[z-se-1]),Z=G<4?(ye||Z)&&(G==0||G==(x.s<0?3:2)):ye>5||ye==5&&(G==4||Z||G==6&&(ne>0?se>0?me/Ve[z-se]:0:Me[ge-1])%10&1||G==(x.s<0?8:7)),b<1||!Me[0])return Me.length=0,Z?(b-=x.e+1,Me[0]=Ve[(g-b%g)%g],x.e=-b||0):Me[0]=x.e=0,x;if(ne==0?(Me.length=ge,oe=1,ge--):(Me.length=ge+1,oe=Ve[g-ne],Me[ge]=se>0?d(me/Ve[z-se]%Ve[se])*oe:0),Z)for(;;){if(ge==0){for(ne=1,se=Me[0];se>=10;se/=10,ne++);for(se=Me[0]+=oe,oe=1;se>=10;se/=10,oe++);ne!=oe&&(x.e++,Me[0]==y&&(Me[0]=1));break}if(Me[ge]+=oe,Me[ge]!=y)break;Me[ge--]=0,oe=1}for(ne=Me.length;Me[--ne]===0;Me.pop());}x.e>gr?x.c=x.e=null:x.e<wn&&(x.c=[x.e=0])}return x}function Fr(x){var b,G=x.e;return G===null?x.toString():(b=h(x.c),b=G<=yr||G>=Wn?C(b,G):$(b,G,"0"),x.s<0?"-"+b:b)}return Oe.clone=_,Oe.ROUND_UP=0,Oe.ROUND_DOWN=1,Oe.ROUND_CEIL=2,Oe.ROUND_FLOOR=3,Oe.ROUND_HALF_UP=4,Oe.ROUND_HALF_DOWN=5,Oe.ROUND_HALF_EVEN=6,Oe.ROUND_HALF_CEIL=7,Oe.ROUND_HALF_FLOOR=8,Oe.EUCLID=9,Oe.config=Oe.set=function(x){var b,G;if(x!=null){if(typeof x!="object")throw Error(f+"Object expected: "+x);if(x.hasOwnProperty(b="DECIMAL_PLACES")&&(v(G=x[b],0,w,b),Pt=G),x.hasOwnProperty(b="ROUNDING_MODE")&&(v(G=x[b],0,8,b),Nt=G),x.hasOwnProperty(b="EXPONENTIAL_AT")&&((G=x[b])&&G.pop?(v(G[0],-w,0,b),v(G[1],0,w,b),yr=G[0],Wn=G[1]):(v(G,-w,w,b),yr=-(Wn=G<0?-G:G))),x.hasOwnProperty(b="RANGE"))if((G=x[b])&&G.pop)v(G[0],-w,-1,b),v(G[1],1,w,b),wn=G[0],gr=G[1];else{if(v(G,-w,w,b),!G)throw Error(f+b+" cannot be zero: "+G);wn=-(gr=G<0?-G:G)}if(x.hasOwnProperty(b="CRYPTO")){if((G=x[b])!==!!G)throw Error(f+b+" not true or false: "+G);if(G){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Rn=!G,Error(f+"crypto unavailable");Rn=G}else Rn=G}if(x.hasOwnProperty(b="MODULO_MODE")&&(v(G=x[b],0,9,b),mi=G),x.hasOwnProperty(b="POW_PRECISION")&&(v(G=x[b],0,w,b),or=G),x.hasOwnProperty(b="FORMAT")){if(typeof(G=x[b])!="object")throw Error(f+b+" not an object: "+G);Yn=G}if(x.hasOwnProperty(b="ALPHABET")){if(typeof(G=x[b])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(G))throw Error(f+b+" invalid: "+G);An=G.slice(0,10)=="0123456789",_r=G}}return{DECIMAL_PLACES:Pt,ROUNDING_MODE:Nt,EXPONENTIAL_AT:[yr,Wn],RANGE:[wn,gr],CRYPTO:Rn,MODULO_MODE:mi,POW_PRECISION:or,FORMAT:Yn,ALPHABET:_r}},Oe.isBigNumber=function(x){if(!x||x._isBigNumber!==!0)return!1;if(!Oe.DEBUG)return!0;var b,G,Z=x.c,z=x.e,ne=x.s;e:if({}.toString.call(Z)=="[object Array]"){if((ne===1||ne===-1)&&z>=-w&&z<=w&&z===d(z)){if(Z[0]===0){if(z===0&&Z.length===1)return!0;break e}if((b=(z+1)%g)<1&&(b+=g),String(Z[0]).length==b){for(b=0;b<Z.length;b++)if((G=Z[b])<0||G>=y||G!==d(G))break e;if(G!==0)return!0}}}else if(Z===null&&z===null&&(ne===null||ne===1||ne===-1))return!0;throw Error(f+"Invalid BigNumber: "+x)},Oe.maximum=Oe.max=function(){return ns(arguments,je.lt)},Oe.minimum=Oe.min=function(){return ns(arguments,je.gt)},Oe.random=(ue=9007199254740992,Te=Math.random()*ue&2097151?function(){return d(Math.random()*ue)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(x){var b,G,Z,z,ne,se=0,oe=[],me=new Oe(sr);if(x==null?x=Pt:v(x,0,w),z=c(x/g),Rn)if(crypto.getRandomValues){for(b=crypto.getRandomValues(new Uint32Array(z*=2));se<z;)(ne=131072*b[se]+(b[se+1]>>>11))>=9e15?(G=crypto.getRandomValues(new Uint32Array(2)),b[se]=G[0],b[se+1]=G[1]):(oe.push(ne%1e14),se+=2);se=z/2}else{if(!crypto.randomBytes)throw Rn=!1,Error(f+"crypto unavailable");for(b=crypto.randomBytes(z*=7);se<z;)(ne=281474976710656*(31&b[se])+1099511627776*b[se+1]+4294967296*b[se+2]+16777216*b[se+3]+(b[se+4]<<16)+(b[se+5]<<8)+b[se+6])>=9e15?crypto.randomBytes(7).copy(b,se):(oe.push(ne%1e14),se+=7);se=z/7}if(!Rn)for(;se<z;)(ne=Te())<9e15&&(oe[se++]=ne%1e14);for(z=oe[--se],x%=g,z&&x&&(ne=P[g-x],oe[se]=d(z/ne)*ne);oe[se]===0;oe.pop(),se--);if(se<0)oe=[Z=0];else{for(Z=-1;oe[0]===0;oe.splice(0,1),Z-=g);for(se=1,ne=oe[0];ne>=10;ne/=10,se++);se<g&&(Z-=g-se)}return me.e=Z,me.c=oe,me}),Oe.sum=function(){for(var x=1,b=arguments,G=new Oe(b[0]);x<b.length;)G=G.plus(b[x++]);return G},X=(function(){var x="0123456789";function b(G,Z,z,ne){for(var se,oe,me=[0],ge=0,ye=G.length;ge<ye;){for(oe=me.length;oe--;me[oe]*=Z);for(me[0]+=ne.indexOf(G.charAt(ge++)),se=0;se<me.length;se++)me[se]>z-1&&(me[se+1]==null&&(me[se+1]=0),me[se+1]+=me[se]/z|0,me[se]%=z)}return me.reverse()}return function(G,Z,z,ne,se){var oe,me,ge,ye,Me,Ve,Ye,it,Ct=G.indexOf("."),kt=Pt,tt=Nt;for(Ct>=0&&(ye=or,or=0,G=G.replace(".",""),Ve=(it=new Oe(Z)).pow(G.length-Ct),or=ye,it.c=b($(h(Ve.c),Ve.e,"0"),10,z,x),it.e=it.c.length),ge=ye=(Ye=b(G,Z,z,se?(oe=_r,x):(oe=x,_r))).length;Ye[--ye]==0;Ye.pop());if(!Ye[0])return oe.charAt(0);if(Ct<0?--ge:(Ve.c=Ye,Ve.e=ge,Ve.s=ne,Ye=(Ve=M(Ve,it,kt,tt,z)).c,Me=Ve.r,ge=Ve.e),Ct=Ye[me=ge+kt+1],ye=z/2,Me=Me||me<0||Ye[me+1]!=null,Me=tt<4?(Ct!=null||Me)&&(tt==0||tt==(Ve.s<0?3:2)):Ct>ye||Ct==ye&&(tt==4||Me||tt==6&&1&Ye[me-1]||tt==(Ve.s<0?8:7)),me<1||!Ye[0])G=Me?$(oe.charAt(1),-kt,oe.charAt(0)):oe.charAt(0);else{if(Ye.length=me,Me)for(--z;++Ye[--me]>z;)Ye[me]=0,me||(++ge,Ye=[1].concat(Ye));for(ye=Ye.length;!Ye[--ye];);for(Ct=0,G="";Ct<=ye;G+=oe.charAt(Ye[Ct++]));G=$(G,ge,oe.charAt(0))}return G}})(),M=(function(){function x(Z,z,ne){var se,oe,me,ge,ye=0,Me=Z.length,Ve=z%m,Ye=z/m|0;for(Z=Z.slice();Me--;)ye=((oe=Ve*(me=Z[Me]%m)+(se=Ye*me+(ge=Z[Me]/m|0)*Ve)%m*m+ye)/ne|0)+(se/m|0)+Ye*ge,Z[Me]=oe%ne;return ye&&(Z=[ye].concat(Z)),Z}function b(Z,z,ne,se){var oe,me;if(ne!=se)me=ne>se?1:-1;else for(oe=me=0;oe<ne;oe++)if(Z[oe]!=z[oe]){me=Z[oe]>z[oe]?1:-1;break}return me}function G(Z,z,ne,se){for(var oe=0;ne--;)Z[ne]-=oe,oe=Z[ne]<z[ne]?1:0,Z[ne]=oe*se+Z[ne]-z[ne];for(;!Z[0]&&Z.length>1;Z.splice(0,1));}return function(Z,z,ne,se,oe){var me,ge,ye,Me,Ve,Ye,it,Ct,kt,tt,dt,Kt,Xn,hi,yi,Tr,On,ur=Z.s==z.s?1:-1,Jt=Z.c,Ot=z.c;if(!(Jt&&Jt[0]&&Ot&&Ot[0]))return new Oe(Z.s&&z.s&&(Jt?!Ot||Jt[0]!=Ot[0]:Ot)?Jt&&Jt[0]==0||!Ot?0*ur:ur/0:NaN);for(kt=(Ct=new Oe(ur)).c=[],ur=ne+(ge=Z.e-z.e)+1,oe||(oe=y,ge=I(Z.e/g)-I(z.e/g),ur=ur/g|0),ye=0;Ot[ye]==(Jt[ye]||0);ye++);if(Ot[ye]>(Jt[ye]||0)&&ge--,ur<0)kt.push(1),Me=!0;else{for(hi=Jt.length,Tr=Ot.length,ye=0,ur+=2,(Ve=d(oe/(Ot[0]+1)))>1&&(Ot=x(Ot,Ve,oe),Jt=x(Jt,Ve,oe),Tr=Ot.length,hi=Jt.length),Xn=Tr,dt=(tt=Jt.slice(0,Tr)).length;dt<Tr;tt[dt++]=0);On=Ot.slice(),On=[0].concat(On),yi=Ot[0],Ot[1]>=oe/2&&yi++;do{if(Ve=0,(me=b(Ot,tt,Tr,dt))<0){if(Kt=tt[0],Tr!=dt&&(Kt=Kt*oe+(tt[1]||0)),(Ve=d(Kt/yi))>1)for(Ve>=oe&&(Ve=oe-1),it=(Ye=x(Ot,Ve,oe)).length,dt=tt.length;b(Ye,tt,it,dt)==1;)Ve--,G(Ye,Tr<it?On:Ot,it,oe),it=Ye.length,me=1;else Ve==0&&(me=Ve=1),it=(Ye=Ot.slice()).length;if(it<dt&&(Ye=[0].concat(Ye)),G(tt,Ye,dt,oe),dt=tt.length,me==-1)for(;b(Ot,tt,Tr,dt)<1;)Ve++,G(tt,Tr<dt?On:Ot,dt,oe),dt=tt.length}else me===0&&(Ve++,tt=[0]);kt[ye++]=Ve,tt[0]?tt[dt++]=Jt[Xn]||0:(tt=[Jt[Xn]],dt=1)}while((Xn++<hi||tt[0]!=null)&&ur--);Me=tt[0]!=null,kt[0]||kt.splice(0,1)}if(oe==y){for(ye=1,ur=kt[0];ur>=10;ur/=10,ye++);lt(Ct,ne+(Ct.e=ye+ge*g-1)+1,se,Me)}else Ct.e=ge,Ct.r=+Me;return Ct}})(),Ce=/^(-?)0([xbo])(?=\w[\w.]*$)/i,He=/^([^.]+)\.$/,Ge=/^\.([^.]+)$/,Sr=/^-?(Infinity|NaN)$/,Ht=/^\s*\+(?=[\w.])|^\s+|\s+$/g,re=function(x,b,G,Z){var z,ne=G?b:b.replace(Ht,"");if(Sr.test(ne))x.s=isNaN(ne)?null:ne<0?-1:1;else{if(!G&&(ne=ne.replace(Ce,(function(se,oe,me){return z=(me=me.toLowerCase())=="x"?16:me=="b"?2:8,Z&&Z!=z?se:oe})),Z&&(z=Z,ne=ne.replace(He,"$1").replace(Ge,"0.$1")),b!=ne))return new Oe(ne,z);if(Oe.DEBUG)throw Error(f+"Not a"+(Z?" base "+Z:"")+" number: "+b);x.s=null}x.c=x.e=null},je.absoluteValue=je.abs=function(){var x=new Oe(this);return x.s<0&&(x.s=1),x},je.comparedTo=function(x,b){return E(this,new Oe(x,b))},je.decimalPlaces=je.dp=function(x,b){var G,Z,z,ne=this;if(x!=null)return v(x,0,w),b==null?b=Nt:v(b,0,8),lt(new Oe(ne),x+ne.e+1,b);if(!(G=ne.c))return null;if(Z=((z=G.length-1)-I(this.e/g))*g,z=G[z])for(;z%10==0;z/=10,Z--);return Z<0&&(Z=0),Z},je.dividedBy=je.div=function(x,b){return M(this,new Oe(x,b),Pt,Nt)},je.dividedToIntegerBy=je.idiv=function(x,b){return M(this,new Oe(x,b),0,1)},je.exponentiatedBy=je.pow=function(x,b){var G,Z,z,ne,se,oe,me,ge,ye=this;if((x=new Oe(x)).c&&!x.isInteger())throw Error(f+"Exponent not an integer: "+Fr(x));if(b!=null&&(b=new Oe(b)),se=x.e>14,!ye.c||!ye.c[0]||ye.c[0]==1&&!ye.e&&ye.c.length==1||!x.c||!x.c[0])return ge=new Oe(Math.pow(+Fr(ye),se?x.s*(2-O(x)):+Fr(x))),b?ge.mod(b):ge;if(oe=x.s<0,b){if(b.c?!b.c[0]:!b.s)return new Oe(NaN);(Z=!oe&&ye.isInteger()&&b.isInteger())&&(ye=ye.mod(b))}else{if(x.e>9&&(ye.e>0||ye.e<-1||(ye.e==0?ye.c[0]>1||se&&ye.c[1]>=24e7:ye.c[0]<8e13||se&&ye.c[0]<=9999975e7)))return ne=ye.s<0&&O(x)?-0:0,ye.e>-1&&(ne=1/ne),new Oe(oe?1/ne:ne);or&&(ne=c(or/g+2))}for(se?(G=new Oe(.5),oe&&(x.s=1),me=O(x)):me=(z=Math.abs(+Fr(x)))%2,ge=new Oe(sr);;){if(me){if(!(ge=ge.times(ye)).c)break;ne?ge.c.length>ne&&(ge.c.length=ne):Z&&(ge=ge.mod(b))}if(z){if((z=d(z/2))===0)break;me=z%2}else if(lt(x=x.times(G),x.e+1,1),x.e>14)me=O(x);else{if((z=+Fr(x))==0)break;me=z%2}ye=ye.times(ye),ne?ye.c&&ye.c.length>ne&&(ye.c.length=ne):Z&&(ye=ye.mod(b))}return Z?ge:(oe&&(ge=sr.div(ge)),b?ge.mod(b):ne?lt(ge,or,Nt,void 0):ge)},je.integerValue=function(x){var b=new Oe(this);return x==null?x=Nt:v(x,0,8),lt(b,b.e+1,x)},je.isEqualTo=je.eq=function(x,b){return E(this,new Oe(x,b))===0},je.isFinite=function(){return!!this.c},je.isGreaterThan=je.gt=function(x,b){return E(this,new Oe(x,b))>0},je.isGreaterThanOrEqualTo=je.gte=function(x,b){return(b=E(this,new Oe(x,b)))===1||b===0},je.isInteger=function(){return!!this.c&&I(this.e/g)>this.c.length-2},je.isLessThan=je.lt=function(x,b){return E(this,new Oe(x,b))<0},je.isLessThanOrEqualTo=je.lte=function(x,b){return(b=E(this,new Oe(x,b)))===-1||b===0},je.isNaN=function(){return!this.s},je.isNegative=function(){return this.s<0},je.isPositive=function(){return this.s>0},je.isZero=function(){return!!this.c&&this.c[0]==0},je.minus=function(x,b){var G,Z,z,ne,se=this,oe=se.s;if(b=(x=new Oe(x,b)).s,!oe||!b)return new Oe(NaN);if(oe!=b)return x.s=-b,se.plus(x);var me=se.e/g,ge=x.e/g,ye=se.c,Me=x.c;if(!me||!ge){if(!ye||!Me)return ye?(x.s=-b,x):new Oe(Me?se:NaN);if(!ye[0]||!Me[0])return Me[0]?(x.s=-b,x):new Oe(ye[0]?se:Nt==3?-0:0)}if(me=I(me),ge=I(ge),ye=ye.slice(),oe=me-ge){for((ne=oe<0)?(oe=-oe,z=ye):(ge=me,z=Me),z.reverse(),b=oe;b--;z.push(0));z.reverse()}else for(Z=(ne=(oe=ye.length)<(b=Me.length))?oe:b,oe=b=0;b<Z;b++)if(ye[b]!=Me[b]){ne=ye[b]<Me[b];break}if(ne&&(z=ye,ye=Me,Me=z,x.s=-x.s),(b=(Z=Me.length)-(G=ye.length))>0)for(;b--;ye[G++]=0);for(b=y-1;Z>oe;){if(ye[--Z]<Me[Z]){for(G=Z;G&&!ye[--G];ye[G]=b);--ye[G],ye[Z]+=y}ye[Z]-=Me[Z]}for(;ye[0]==0;ye.splice(0,1),--ge);return ye[0]?is(x,ye,ge):(x.s=Nt==3?-1:1,x.c=[x.e=0],x)},je.modulo=je.mod=function(x,b){var G,Z,z=this;return x=new Oe(x,b),!z.c||!x.s||x.c&&!x.c[0]?new Oe(NaN):!x.c||z.c&&!z.c[0]?new Oe(z):(mi==9?(Z=x.s,x.s=1,G=M(z,x,0,3),x.s=Z,G.s*=Z):G=M(z,x,0,mi),(x=z.minus(G.times(x))).c[0]||mi!=1||(x.s=z.s),x)},je.multipliedBy=je.times=function(x,b){var G,Z,z,ne,se,oe,me,ge,ye,Me,Ve,Ye,it,Ct,kt,tt=this,dt=tt.c,Kt=(x=new Oe(x,b)).c;if(!(dt&&Kt&&dt[0]&&Kt[0]))return!tt.s||!x.s||dt&&!dt[0]&&!Kt||Kt&&!Kt[0]&&!dt?x.c=x.e=x.s=null:(x.s*=tt.s,dt&&Kt?(x.c=[0],x.e=0):x.c=x.e=null),x;for(Z=I(tt.e/g)+I(x.e/g),x.s*=tt.s,(me=dt.length)<(Me=Kt.length)&&(it=dt,dt=Kt,Kt=it,z=me,me=Me,Me=z),z=me+Me,it=[];z--;it.push(0));for(Ct=y,kt=m,z=Me;--z>=0;){for(G=0,Ve=Kt[z]%kt,Ye=Kt[z]/kt|0,ne=z+(se=me);ne>z;)G=((ge=Ve*(ge=dt[--se]%kt)+(oe=Ye*ge+(ye=dt[se]/kt|0)*Ve)%kt*kt+it[ne]+G)/Ct|0)+(oe/kt|0)+Ye*ye,it[ne--]=ge%Ct;it[ne]=G}return G?++Z:it.splice(0,1),is(x,it,Z)},je.negated=function(){var x=new Oe(this);return x.s=-x.s||null,x},je.plus=function(x,b){var G,Z=this,z=Z.s;if(b=(x=new Oe(x,b)).s,!z||!b)return new Oe(NaN);if(z!=b)return x.s=-b,Z.minus(x);var ne=Z.e/g,se=x.e/g,oe=Z.c,me=x.c;if(!ne||!se){if(!oe||!me)return new Oe(z/0);if(!oe[0]||!me[0])return me[0]?x:new Oe(oe[0]?Z:0*z)}if(ne=I(ne),se=I(se),oe=oe.slice(),z=ne-se){for(z>0?(se=ne,G=me):(z=-z,G=oe),G.reverse();z--;G.push(0));G.reverse()}for((z=oe.length)-(b=me.length)<0&&(G=me,me=oe,oe=G,b=z),z=0;b;)z=(oe[--b]=oe[b]+me[b]+z)/y|0,oe[b]=y===oe[b]?0:oe[b]%y;return z&&(oe=[z].concat(oe),++se),is(x,oe,se)},je.precision=je.sd=function(x,b){var G,Z,z,ne=this;if(x!=null&&x!==!!x)return v(x,1,w),b==null?b=Nt:v(b,0,8),lt(new Oe(ne),x,b);if(!(G=ne.c))return null;if(Z=(z=G.length-1)*g+1,z=G[z]){for(;z%10==0;z/=10,Z--);for(z=G[0];z>=10;z/=10,Z++);}return x&&ne.e+1>Z&&(Z=ne.e+1),Z},je.shiftedBy=function(x){return v(x,-9007199254740991,T),this.times("1e"+x)},je.squareRoot=je.sqrt=function(){var x,b,G,Z,z,ne=this,se=ne.c,oe=ne.s,me=ne.e,ge=Pt+4,ye=new Oe("0.5");if(oe!==1||!se||!se[0])return new Oe(!oe||oe<0&&(!se||se[0])?NaN:se?ne:1/0);if((oe=Math.sqrt(+Fr(ne)))==0||oe==1/0?(((b=h(se)).length+me)%2==0&&(b+="0"),oe=Math.sqrt(+b),me=I((me+1)/2)-(me<0||me%2),G=new Oe(b=oe==1/0?"5e"+me:(b=oe.toExponential()).slice(0,b.indexOf("e")+1)+me)):G=new Oe(oe+""),G.c[0]){for((oe=(me=G.e)+ge)<3&&(oe=0);;)if(z=G,G=ye.times(z.plus(M(ne,z,ge,1))),h(z.c).slice(0,oe)===(b=h(G.c)).slice(0,oe)){if(G.e<me&&--oe,(b=b.slice(oe-3,oe+1))!="9999"&&(Z||b!="4999")){+b&&(+b.slice(1)||b.charAt(0)!="5")||(lt(G,G.e+Pt+2,1),x=!G.times(G).eq(ne));break}if(!Z&&(lt(z,z.e+Pt+2,0),z.times(z).eq(ne))){G=z;break}ge+=4,oe+=4,Z=1}}return lt(G,G.e+Pt+1,Nt,x)},je.toExponential=function(x,b){return x!=null&&(v(x,0,w),x++),Kn(this,x,b,1)},je.toFixed=function(x,b){return x!=null&&(v(x,0,w),x=x+this.e+1),Kn(this,x,b)},je.toFormat=function(x,b,G){var Z,z=this;if(G==null)x!=null&&b&&typeof b=="object"?(G=b,b=null):x&&typeof x=="object"?(G=x,x=b=null):G=Yn;else if(typeof G!="object")throw Error(f+"Argument not an object: "+G);if(Z=z.toFixed(x,b),z.c){var ne,se=Z.split("."),oe=+G.groupSize,me=+G.secondaryGroupSize,ge=G.groupSeparator||"",ye=se[0],Me=se[1],Ve=z.s<0,Ye=Ve?ye.slice(1):ye,it=Ye.length;if(me&&(ne=oe,oe=me,me=ne,it-=ne),oe>0&&it>0){for(ne=it%oe||oe,ye=Ye.substr(0,ne);ne<it;ne+=oe)ye+=ge+Ye.substr(ne,oe);me>0&&(ye+=ge+Ye.slice(ne)),Ve&&(ye="-"+ye)}Z=Me?ye+(G.decimalSeparator||"")+((me=+G.fractionGroupSize)?Me.replace(new RegExp("\\d{"+me+"}\\B","g"),"$&"+(G.fractionGroupSeparator||"")):Me):ye}return(G.prefix||"")+Z+(G.suffix||"")},je.toFraction=function(x){var b,G,Z,z,ne,se,oe,me,ge,ye,Me,Ve,Ye=this,it=Ye.c;if(x!=null&&(!(oe=new Oe(x)).isInteger()&&(oe.c||oe.s!==1)||oe.lt(sr)))throw Error(f+"Argument "+(oe.isInteger()?"out of range: ":"not an integer: ")+Fr(oe));if(!it)return new Oe(Ye);for(b=new Oe(sr),ge=G=new Oe(sr),Z=me=new Oe(sr),Ve=h(it),ne=b.e=Ve.length-Ye.e-1,b.c[0]=P[(se=ne%g)<0?g+se:se],x=!x||oe.comparedTo(b)>0?ne>0?b:ge:oe,se=gr,gr=1/0,oe=new Oe(Ve),me.c[0]=0;ye=M(oe,b,0,1),(z=G.plus(ye.times(Z))).comparedTo(x)!=1;)G=Z,Z=z,ge=me.plus(ye.times(z=ge)),me=z,b=oe.minus(ye.times(z=b)),oe=z;return z=M(x.minus(G),Z,0,1),me=me.plus(z.times(ge)),G=G.plus(z.times(Z)),me.s=ge.s=Ye.s,Me=M(ge,Z,ne*=2,Nt).minus(Ye).abs().comparedTo(M(me,G,ne,Nt).minus(Ye).abs())<1?[ge,Z]:[me,G],gr=se,Me},je.toNumber=function(){return+Fr(this)},je.toPrecision=function(x,b){return x!=null&&v(x,1,w),Kn(this,x,b,2)},je.toString=function(x){var b,G=this,Z=G.s,z=G.e;return z===null?Z?(b="Infinity",Z<0&&(b="-"+b)):b="NaN":(x==null?b=z<=yr||z>=Wn?C(h(G.c),z):$(h(G.c),z,"0"):x===10&&An?b=$(h((G=lt(new Oe(G),Pt+z+1,Nt)).c),G.e,"0"):(v(x,2,_r.length,"Base"),b=X($(h(G.c),z,"0"),10,x,Z,!0)),Z<0&&G.c[0]&&(b="-"+b)),b},je.valueOf=je.toJSON=function(){return Fr(this)},je._isBigNumber=!0,je[Symbol.toStringTag]="BigNumber",je[Symbol.for("nodejs.util.inspect.custom")]=je.valueOf,R!=null&&Oe.set(R),Oe})();const V={ROUNDING_MODE:B.ROUND_DOWN};function U(_){return new TextEncoder().encode(_)}function k(_){return typeof _=="string"?k(Q(_)):new TextDecoder().decode(_)}B.config(V);const te="UNKNOWN_ERROR",ie="INVALID_ARGUMENT";function J(_,R=te,M={}){const X=[];Object.keys(M).forEach((Te=>{try{X.push(Te+"="+JSON.stringify(M[Te]))}catch{X.push(Te+"="+JSON.stringify(M[Te].toString()))}}));const re=_;X.length&&(_+=" ("+X.join(", ")+")");const ue=new Error(_);return ue.reason=re,ue.code=R,Object.keys(M).forEach((function(Te){ue[Te]=M[Te]})),ue}function Q(_){if(typeof _!="string")throw new Error("hexToBytes only accept strings, got: "+typeof _);if(_.substr(0,2)==="0x")return Q(_.substr(2));const R=new Uint8Array(Math.ceil(_.length/2));let M=0;for(let X=0;X<_.length;X+=2){const re=parseInt(_.substr(X,2),16);if(isNaN(re))throw new Error("Cannot read hex string:"+JSON.stringify(_));R[M]=re,M++}return R}function K(_){return Array.from(_).map((R=>R.toString(16).padStart(2,"0"))).join("")}function q(_,R){if(typeof _=="string"){if(R&&R.encoding==="hex"&&typeof _=="string"){let M=_;M.length>2&&M.substr(0,2)==="0x"&&(M=M.substr(2));const X=Q(M);return u.keccak256(X)}return u.keccak256(U(_))}return u.keccak256(_)}const D={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function F(_,R,M){return new Array(R-_.length+1).join(M||"0")+_}function W(_){let R="",M=0;const X=_.length;for(_.substring(0,2)==="0x"&&(M=2);M<X;M+=2){const re=parseInt(_.substr(M,2),16);R+=String.fromCharCode(re)}return R}function N(_){return A(_)&&_.name&&_.name.indexOf("(")!==-1?_.name:_.name+"("+ee(!1,_.inputs||[]).join(",")+")"}function L(..._){const R=_.reduce(((re,ue)=>re+ue.length),0),M=new Uint8Array(R);let X=0;for(const re of _)M.set(re,X),X+=re.length;return M}function ee(_,R){const M=[];return R.forEach((function(X){if(typeof X.components=="object"){if(X.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let re="";const ue=X.type.indexOf("[");ue>=0&&(re=X.type.substring(ue));const Te=ee(_,X.components);M.push("("+Te.join(",")+")"+re)}else M.push(X.type)})),M}function Ee(_){const R=_.indexOf("("),M=_.indexOf(")");return R!==-1&&M!==-1?_.substr(0,R):_}function he(_){const R=_.indexOf("("),M=_.indexOf(")");return R!==-1&&M!==-1?_.substr(R+1,M-R-1).replace(" ",""):""}function be(_){return _==null?_:We(_).toNumber()}function Ie(_){return We(_).toNumber()}function ae(_){return j(_)?_.toString(10):""+_}function ce(_){return typeof _=="string"&&!_.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(_)?"0x"+_:Ae(_)}function fe(_){if(typeof _=="string")return _.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(_)?Ae(_):"0x"+K(U(_));if(_ instanceof Uint8Array)return"0x"+K(_);throw new Error(`toStringData: Error trying to convert ${_} (${typeof _}) to a hex string.`)}function pe(_){return typeof _=="boolean"?_:We(_).toNumber()!==0}function ve(_){const R=We(_),M=R.toString(16);return R.isLessThan(0)?"-0x"+M.substr(1):"0x"+M}function Ae(_){if(Y(_))return ve(+_);if(j(_))return ve(_);if(S(_)){const R=_;if(R.indexOf("-0x")===0)return ve(R);if(R.indexOf("0x")===0)return R;if(!isFinite(R))return K(U(R))}if(_ instanceof Uint8Array)return"0x"+K(_);if(de(_)||A(_))throw new Error("toHex can only be called with scalar values, not objects or arrays");return ve(_)}function ke(_){const R=_?_.toLowerCase():"ether",M=D[R];if(M===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(D,null,2));return new B(M,10)}function We(_){let R=_||0;return j(R)?R:(typeof R=="string"&&(R=R.trim()),typeof R!="string"||R.indexOf("0x")!==0&&R.indexOf("-0x")!==0?R instanceof Uint8Array?new B(K(R),16):new B(R,10):new B(R.replace("0x","").toLowerCase(),16))}function et(_){return new B(new Array(_).fill("1").join(""),2)}function Xe(_,R=256){const M=We(_).integerValue();return M.isLessThan(0)?et(R).plus(M).plus(1):M}function ut(_,R){return F(_.toString(2),R,"0")[0]==="1"}function Ft(_){if(typeof _!="string")throw J("invalid address",ie,{arg:"address",value:_});if(_.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return _.trim().substring(0,2)!=="0x"&&(_="0x"+_),hr(_);throw J("invalid address",ie,{arg:"address",value:_})}function It(_,R=256){if(ut(_,R)){const M=et(R);return _.minus(M).minus(1)}return _}function tr(_){return/^0x[0-9a-f]{40}$/i.test(_)}function wt(_){return!!/^(0x)?[0-9a-f]{40}$/i.test(_)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(_)&&!/^(0x)?[0-9A-F]{40}$/.test(_))||mr(_))}function mr(_){const R=_.replace("0x",""),M=q(R.toLowerCase());for(let X=0;X<40;X++)if(parseInt(M[X],16)>7&&R[X].toUpperCase()!==R[X]||parseInt(M[X],16)<=7&&R[X].toLowerCase()!==R[X])return!1;return!0}function hr(_){if(_===void 0)return"";const R=_.toLowerCase().replace("0x",""),M=q(R);let X="0x";for(let re=0;re<R.length;re++)parseInt(M[re],16)>7?X+=R[re].toUpperCase():X+=R[re];return X}function ht(_){if(!Array.isArray(_))throw new Error(`Value was not an array: ${JSON.stringify(_)}`);return _}function Ur(_){return tr(_)?_:/^[0-9a-f]{40}$/.test(_)?"0x"+_:"0x"+F(Ae(_).substr(2),40)}function j(_){return _ instanceof B}function S(_){return typeof _=="string"||_&&_.constructor&&_.constructor.name==="String"}function A(_){return _!==null&&!Array.isArray(_)&&typeof _=="object"}function Y(_){return typeof _=="boolean"}function de(_){return Array.isArray(_)}var _e,we;function Qe(_,R){if(!_)throw new Error("jsonrpc method should be specified!");if(typeof _!="string")throw new Error(`jsonrpc must be a string, got ${typeof _}!`);return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:_,params:R||[]}}function Dt(_){return Array.isArray(_)?_.every(R):R(_);function R(M){return!!M&&(M.error===void 0||M.error===null)&&M.jsonrpc==="2.0"&&M.id!==null&&"result"in M&&M.result!==void 0}}r.TransactionStatus=void 0,(_e=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",_e.confirmed="confirmed",_e.failed="failed",r.TransactionType=void 0,(we=r.TransactionType||(r.TransactionType={})).queued="queued",we.dropped="dropped",we.replaced="replaced",we.pending="pending",we.reverted="reverted",we.confirmed="confirmed",r.messageId=0;function Rt(_){return We(_)}function Lt(_){return _==="latest"||_==="pending"||_==="earliest"}function nt(_){return _===void 0?"latest":rr(_)}function rr(_){return _==null?null:Lt(_)?_:Ae(_)}function jf(_){return _.from&&(_.from=jr(_.from)),_.to&&(_.to=jr(_.to)),_.gasPrice!==void 0&&(_.gasPrice=ve(_.gasPrice)),_.gas!==void 0&&(_.gas=ve(_.gas)),_.value!==void 0&&(_.value=ve(_.value)),_.nonce!==void 0&&(_.nonce=ve(_.nonce)),_.data&&!_.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(_.data)&&(_.data="0x"+_.data),_}function rs(_){if(typeof _!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(_));if(_.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(_));if(_.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(_));return _}function Df(_){if(typeof _!="object")throw new Error("Did not provide transaction options");if(!_.from)throw new Error('Missing "from" in transaction options');return _.from=jr(_.from),_.to&&(_.to=jr(_.to)),_.gasPrice!==void 0&&(_.gasPrice=ve(_.gasPrice)),_.gas!==void 0&&(_.gas=ve(_.gas)),_.value!==void 0&&(_.value=ve(_.value)),_.nonce!==void 0&&(_.nonce=ve(_.nonce)),_.data&&!_.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(_.data)&&(_.data="0x"+_.data),_}function fo(_){return _?(_.blockNumber!==null&&(_.blockNumber=Ie(_.blockNumber)),_.transactionIndex!==null&&(_.transactionIndex=Ie(_.transactionIndex)),_.nonce=Ie(_.nonce),_.gas=Ie(_.gas),_.gasPrice=We(_.gasPrice),_.value=We(_.value),_):null}function bb(_){return _?(_.blockNumber!==null&&(_.blockNumber=Ie(_.blockNumber)),_.transactionIndex!==null&&(_.transactionIndex=Ie(_.transactionIndex)),_.cumulativeGasUsed=Ie(_.cumulativeGasUsed),_.gasUsed=Ie(_.gasUsed),_.effectiveGasPrice!==void 0&&_.effectiveGasPrice!==null&&(_.effectiveGasPrice=Ie(_.effectiveGasPrice)),_.logs&&de(_.logs)&&(_.logs=_.logs.map((function(R){return nc(R)}))),_.status=Ie(_.status||""),_):null}function po(_){return _?(_.gasLimit=Ie(_.gasLimit),_.gasUsed=Ie(_.gasUsed),_.size=Ie(_.size),_.timestamp=Ie(_.timestamp),_.number!==null&&(_.number=Ie(_.number)),_.difficulty=We(_.difficulty),_.totalDifficulty=We(_.totalDifficulty),de(_.transactions)&&_.transactions.forEach((function(R,M){S(R)||(_.transactions[M]=fo(R)||_.transactions[M])})),_):null}function nc(_){return _&&(_.blockNumber&&(_.blockNumber=Ie(_.blockNumber)),_.transactionIndex&&(_.transactionIndex=Ie(_.transactionIndex)),_.logIndex&&(_.logIndex=Ie(_.logIndex)),_)}function jr(_){if(tr(_))return _;if(wt(_))return"0x"+_;throw new Error(`Invalid address: ${JSON.stringify(_)}`)}function Sb(_){return _}function Tb(_){return _&&(_.startingBlock=Ie(_.startingBlock),_.currentBlock=Ie(_.currentBlock),_.highestBlock=Ie(_.highestBlock),_.knownStates&&(_.knownStates=Ie(_.knownStates),_.pulledStates=Ie(_.pulledStates)),_)}function Lf(_){if(_===null)throw J("cannot convert null value to array",ie,{arg:"value",value:_});if(_ instanceof Uint8Array)return new Uint8Array(_);if(typeof _=="string"){const R=_.match(/^(0x)?[0-9a-fA-F]*$/);if(!R)throw J("invalid hexidecimal string",ie,{arg:"value",value:_});if(R[1]!=="0x")throw J("hex string must have 0x prefix",ie,{arg:"value",value:_});(_=_.substring(2)).length%2&&(_="0"+_);const M=[];for(let X=0;X<_.length;X+=2)M.push(parseInt(_.substr(X,2),16));return new Uint8Array(M)}if((function(R){if(!R||parseInt(String(R.length))!==R.length||typeof R=="string")return!1;for(let M=0;M<R.length;M++){const X=R[M];if(X<0||X>=256||parseInt(String(X))!==X)return!1}return!0})(_))return new Uint8Array(_);throw J("invalid arrayify value",void 0,{arg:"value",value:_,type:typeof _})}function Ib(_,R,M){Object.defineProperty(_,R,{enumerable:!0,value:M,writable:!1})}const B$=new B(-1),U$=new B(0),F$=new B(1),wb=new B("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Rb(_){return(function(R,M){function X(Te){return new Error('unexpected character "'+R[Te]+'" at position '+Te+' in "'+R+'"')}const re={type:"",name:"",state:{allowType:!0}};let ue=re;for(let Te=0;Te<R.length;Te++){const Ce=R[Te];switch(Ce){case"(":if(!ue.state.allowParams)throw X(Te);ue.state.allowType=!1,ue.type=mo(ue.type),ue.components=[{type:"",name:"",parent:ue,state:{allowType:!0}}],ue=ue.components[0];break;case")":delete ue.state,ue.name==="indexed"&&(ue.indexed=!0,ue.name=""),ue.type=mo(ue.type);const He=ue;if(ue=ue.parent,!ue)throw X(Te);delete He.parent,ue.state.allowParams=!1,ue.state.allowName=!0,ue.state.allowArray=!0;break;case",":delete ue.state,ue.name==="indexed"&&(ue.indexed=!0,ue.name=""),ue.type=mo(ue.type);const Ge={type:"",name:"",parent:ue.parent,state:{allowType:!0}};ue.parent.components.push(Ge),delete ue.parent,ue=Ge;break;case" ":ue.state.allowType&&ue.type!==""&&(ue.type=mo(ue.type),delete ue.state.allowType,ue.state.allowName=!0,ue.state.allowParams=!0),ue.state.allowName&&ue.name!==""&&(ue.name==="indexed"?(ue.indexed=!0,ue.name=""):ue.state.allowName=!1);break;case"[":if(!ue.state.allowArray)throw X(Te);ue.type+=Ce,ue.state.allowArray=!1,ue.state.allowName=!1,ue.state.readArray=!0;break;case"]":if(!ue.state.readArray)throw X(Te);ue.type+=Ce,ue.state.readArray=!1,ue.state.allowArray=!0,ue.state.allowName=!0;break;default:if(ue.state.allowType)ue.type+=Ce,ue.state.allowParams=!0,ue.state.allowArray=!0;else if(ue.state.allowName)ue.name+=Ce,delete ue.state.allowArray;else{if(!ue.state.readArray)throw X(Te);ue.type+=Ce}}}if(ue.parent)throw new Error("unexpected eof");return delete re.state,ue.name==="indexed"&&(ue.indexed=!0,ue.name=""),re.type=mo(re.type),re})(_)}function mo(_){return _.match(/^uint($|[^1-9])/)?_="uint256"+_.substring(4):_.match(/^int($|[^1-9])/)&&(_="int256"+_.substring(3)),_}const H$=new RegExp(/^bytes([0-9]*)$/),Ab=new RegExp(/^(u?int)([0-9]*)$/),V$=new RegExp(/^(.*)\[([0-9]*)\]$/),G$=function(_,R){const M=_.match(Ab);return M&&parseInt(M[2])<=48?R.toNumber():R};class In{constructor(R,M,X,re="",ue){this.coerceFunc=R,this.name=M,this.type=X,this.localName=re,this.dynamic=ue}}class x$ extends In{constructor(R){super(R.coerceFunc,R.name,R.type,void 0,R.dynamic),Ib(this,"coder",R)}encode(R){return this.coder.encode(R)}decode(R,M){return this.coder.decode(R,M)}}class z$ extends In{constructor(R,M){super(R,"null","",M,!1)}encode(R){return Lf([])}decode(R,M){if(M>R.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function ic(_,R){return new B(_.toString(2).substr(-R),2)}class Ob extends In{constructor(R,M,X,re){const ue=(X?"int":"uint")+8*M;super(R,ue,ue,re,!1),this.size=M,this.signed=X}encode(R){try{let M=We(R);if(this.signed){let re=ic(wb,8*this.size-1);if(M.gt(re))throw new Error("out-of-bounds");if(re=re.plus(F$).multipliedBy(B$),M.lt(re))throw new Error("out-of-bounds")}else if(M.lt(U$)||M.gt(ic(wb,8*this.size)))throw new Error("out-of-bounds");M=ic(Xe(M,8*this.size),8*this.size),this.signed&&(M=Xe(It(M,8*this.size),256));const X=F(Xe(M).toString(16),64);if(X.indexOf("NaN")!==-1)throw J("invalid number value, NaN",ie,{arg:this.localName,coderType:this.name,value:R,v:M,twosComplement:Xe(M),twosComplement16:Xe(M).toString(16),pad:F(Xe(M).toString(16),64),size:this.size});return Q(X)}catch(M){throw J("invalid number value",ie,{arg:this.localName,coderType:this.name,value:R,message:M.toString()})}}decode(R,M){if(R.length<M+32)throw J("insufficient data for "+this.name+" type",ie,{arg:this.localName,coderType:this.name,value:Ae(R.slice(M,M+32))});const X=32-this.size;let re=new B(K(R.slice(M+X,M+32)),16);return re=this.signed?It(re,8*this.size):ic(re,8*this.size),{consumed:32,value:this.coerceFunc(this.name,re)}}}const zn=new Ob((function(_,R){return R}),32,!1,"none");class Pb extends In{constructor(R,M,X){const re="bytes"+M;super(R,re,re,X,!1),this.length=M}encode(R){const M=new Uint8Array(32);try{if(typeof R=="string"&&R.length%2!=0)throw new Error("hex string cannot be odd-length");const X=Lf(R);if(X.length>this.length)throw new Error("incorrect data length");M.set(X)}catch(X){throw J("invalid "+this.name+" value. Use hex strings or Uint8Array",ie,{arg:this.localName,coderType:this.name,value:X.value||R,details:X.message})}return M}decode(R,M){if(R.length<M+32)throw J("insufficient data for "+this.name+" type",ie,{arg:this.localName,coderType:this.name,value:Ae(R.slice(M,M+32))});return{consumed:32,value:this.coerceFunc(this.name,R.slice(M,M+this.length))}}}function Nb(_){const R=32*Math.ceil(_.length/32),M=new Uint8Array(R-_.length);return L(zn.encode(_.length),_,M)}function Cb(_,R,M){if(_.length<R+32)throw J("insufficient data for dynamicBytes length",ie,{arg:M,coderType:"dynamicBytes",value:Ae(_.slice(R,R+32))});let X=zn.decode(_,R).value;try{X=X.toNumber()}catch(re){throw re("dynamic bytes count too large",ie,{arg:M,coderType:"dynamicBytes",value:X.toString()})}if(_.length<R+32+X)throw J("insufficient data for dynamicBytes type",ie,{arg:M,coderType:"dynamicBytes",value:Ae(_.slice(R,R+32+X))});return{consumed:32+32*Math.ceil(X/32),value:_.slice(R+32,R+32+X)}}function ac(_){return 32*Math.ceil(_/32)}function Mb(_,R){if(!Array.isArray(R)){if(!R||typeof R!="object")throw J("invalid tuple value",ie,{coderType:"tuple",value:R});{const He=[];_.forEach((function(Ge){He.push(R[Ge.localName])})),R=He}}if(_.length!==R.length)throw J("types/value length mismatch",ie,{coderType:"tuple",value:R});const M=[];_.forEach((function(He,Ge){M.push({dynamic:He.dynamic,value:He.encode(R[Ge])})}));let X=0,re=0;M.forEach((function(He){He.dynamic?(X+=32,re+=ac(He.value.length)):X+=ac(He.value.length)}));let ue=0,Te=X;const Ce=new Uint8Array(X+re);return M.forEach((function(He){He.dynamic?(Ce.set(zn.encode(Te),ue),ue+=32,Ce.set(He.value,Te),Te+=ac(He.value.length)):(Ce.set(He.value,ue),ue+=ac(He.value.length))})),Ce}class W$ extends Array{}class Y$ extends In{constructor(R,M,X,re){super(R,"array",M.type+"["+(X>=0?X:"")+"]",re,X===-1||M.dynamic),this.coder=M,this.length=X}encode(R){if(!Array.isArray(R))throw J("expected array value",ie,{arg:this.localName,coderType:"array",value:R});let M=this.length,X=new Uint8Array(0);M===-1&&(M=R.length,X=zn.encode(M)),(function(ue,Te,Ce){if(Ce||(Ce=""),ue<Te)throw J("missing argument"+Ce,"MISSING_ARGUMENT",{count:ue,expectedCount:Te});if(ue>Te)throw J("too many arguments"+Ce,"UNEXPECTED_ARGUMENT",{count:ue,expectedCount:Te})})(M,R.length,"in coder array"+(this.localName?" "+this.localName:""));const re=[];for(let ue=0;ue<R.length;ue++)re.push(this.coder);return L(X,Mb(re,R))}decode(R,M){let X=0,re=this.length;if(re===-1){let Ce;try{Ce=zn.decode(R,M)}catch(He){throw J("insufficient data for dynamic array length",ie,{arg:this.localName,coderType:"array",value:He.value})}try{re=Ce.value.toNumber()}catch{throw J("array count too large",ie,{arg:this.localName,coderType:"array",value:Ce.value.toString()})}X+=Ce.consumed,M+=Ce.consumed}const ue=[];for(let Ce=0;Ce<re;Ce++)ue.push(new x$(this.coder));const Te=(function(Ce,He,Ge){const Sr=Ge;let Ht=0;const je=[];return Ce.forEach((function(sr){let Pt;if(sr.dynamic){const Nt=zn.decode(He,Ge);Pt=sr.decode(He,Sr+Nt.value.toNumber()),Pt.consumed=Nt.consumed}else Pt=sr.decode(He,Ge);Pt.value!==void 0&&je.push(Pt.value),Ge+=Pt.consumed,Ht+=Pt.consumed})),{value:je,consumed:Ht}})(ue,R,M);return Te.consumed+=X,Te.value=this.coerceFunc(this.type,Te.value),Te}}class $f extends In{constructor(R,M,X){let re=!1;const ue=[];M.forEach((function(Te){Te.dynamic&&(re=!0),ue.push(Te.type)})),super(R,"tuple","tuple("+ue.join(",")+")",X,re),this.coders=M}encode(R){return Mb(this.coders,R)}decode(R,M){const X=(function(re,ue,Te){const Ce=Te;let He=0;const Ge=new W$;return re.forEach((function(Sr){let Ht;if(Sr.dynamic){const je=zn.decode(ue,Te);Ht=Sr.decode(ue,Ce+je.value.toNumber()),Ht.consumed=je.consumed}else Ht=Sr.decode(ue,Te);Ht.value!==void 0&&Ge.push(Ht.value),Te+=Ht.consumed,He+=Ht.consumed})),re.forEach((function(Sr,Ht){let je=Sr.localName;je&&(je==="length"&&(je="_length"),Ge[je]!==null&&Ge[je]!==void 0||(Ge[je]=Ge[Ht]))})),{value:Ge,consumed:He}})(this.coders,R,M);return X.value=this.coerceFunc(this.type,X.value),X}}const K$={address:class extends In{constructor(_,R){super(_,"address","address",R,!1)}encode(_){const R=new Uint8Array(32),M=_.trim();if(!wt(M))throw J("invalid address format",ie,{arg:this.localName,coderType:"address",value:_});try{R.set(Q(jr(M)),12)}catch(X){throw J(`invalid address (${X.message})`,ie,{arg:this.localName,coderType:"address",value:_})}return R}decode(_,R){if(_.length<R+32)throw J("insufficuent data for address type",ie,{arg:this.localName,coderType:"address",value:Ae(_.slice(R,R+32)),missingBytes:R+32-_.length});return{consumed:32,value:this.coerceFunc("address",Ft(Ae(_.slice(R+12,R+32))))}}},bool:class extends In{constructor(_,R){super(_,"bool","bool",R,!1)}encode(_){return zn.encode(_?1:0)}decode(_,R){try{const M=zn.decode(_,R);return{consumed:M.consumed,value:this.coerceFunc("bool",!M.value.isZero())}}catch(M){throw M.reason==="insufficient data for uint256 type"?J("insufficient data for boolean type",ie,{arg:this.localName,coderType:"boolean",value:M.value}):M}}},string:class extends In{constructor(_,R){super(_,"string","string",R,!0)}encode(_){if(typeof _!="string")throw J("invalid string value",ie,{arg:this.localName,coderType:"string",value:_});return Nb(U(_))}decode(_,R){const M=Cb(_,R,this.localName);return M.value=this.coerceFunc("string",k(M.value)),M}},bytes:class extends In{constructor(_,R){super(_,"bytes","bytes",R,!0)}encode(_){try{return Nb(Lf(_))}catch(R){throw R("invalid bytes value",ie,{arg:this.localName,coderType:"bytes",value:R.value})}}decode(_,R){const M=Cb(_,R,this.localName);return M.value=this.coerceFunc("bytes",M.value),M}},function:class extends Pb{constructor(_,R){super(_,24,R)}}};function sc(_,R){const M=K$[R.type];if(M)return new M(_,R.name);let X=R.type.match(Ab);if(X){const re=parseInt(X[2]||"256");if(re===0||re>256||re%8!=0)throw J("invalid "+X[1]+" bit length",ie,{arg:"param",value:R});return new Ob(_,re/8,X[1]==="int",R.name)}if(X=R.type.match(H$),X){const re=parseInt(X[1]);if(re===0||re>32)throw J("invalid bytes length",ie,{arg:"param",value:R});return new Pb(_,re,R.name)}if(X=R.type.match(V$),X){const re=Object.assign({},R),ue=parseInt(X[2]||"-1");return re.type=X[1],new Y$(_,sc(_,re),ue,R.name)}if(R.type.substring(0,5)==="tuple")return(function(re,ue,Te){ue||(ue=[]);const Ce=ue.map((He=>sc(re,He)));return new $f(re,Ce,Te)})(_,R.components,R.name);if(R.type==="")return new z$(_,R.name);throw J("invalid type",ie,{arg:"type",value:R.type,fullType:R})}class qf{constructor(R){(function(M,X){if(!(M instanceof X))throw J("missing new","MISSING_NEW",{name:X.name})})(this,qf),R||(R=G$),Ib(this,"coerceFunc",R)}encode(R,M){if(R.length!==M.length)throw J("types/values length mismatch",ie,{count:{types:R.length,values:M.length},value:{types:R,values:M}});const X=R.map((re=>typeof re=="string"?Rb(re):re)).map((re=>sc(this.coerceFunc,re)));return new $f(this.coerceFunc,X,"_").encode(M)}decode(R,M){const X=R.map((re=>typeof re=="string"?Rb(re):re)).map((re=>sc(this.coerceFunc,re)));return new $f(this.coerceFunc,X,"_").decode(M,0).value}}const jb=new qf;var Db,$e;function Be(_,R,M,X){var re,ue=arguments.length,Te=ue<3?R:X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Te=Reflect.decorate(_,R,M,X);else for(var Ce=_.length-1;Ce>=0;Ce--)(re=_[Ce])&&(Te=(ue<3?re(Te):ue>3?re(R,M,Te):re(R,M))||Te);return ue>3&&Te&&Object.defineProperty(R,M,Te),Te}function Ue(_,R){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(_,R)}r.coder=void 0,(Db=r.coder||(r.coder={})).encodeParams=function(_,R){return K(jb.encode(_,R))},Db.decodeParams=function(_,R){if(_.length>0&&(!R||R==="0x"||R==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return jb.decode(_,Q("0x"+R.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class xe{constructor(R){this.callName=R.callName,this.params=R.params||0,this.inputFormatter=R.inputFormatter||null,this.outputFormatter=R.outputFormatter}validateArgs(R){if(R.length!==this.params)throw M=this.callName,X=R.length,re=this.params,new Error(`Invalid number of input parameters to RPC method "${M}" given: ${X}, expected: ${re}`);var M,X,re}formatInput(R){return this.inputFormatter?this.inputFormatter.map((function(M,X){return M?M(R[X]):R[X]})):R}formatOutput(R){return R!==null?this.outputFormatter(R):null}toPayload(R){const M=this.formatInput(R);return this.validateArgs(M),{method:this.callName,params:M}}async execute(R,...M){const X=this.toPayload(M);if(!R)throw new Error("Missing RequestManager in method#exec");const re=await R.sendAsync(X);return this.formatOutput(re)}}class Dr{constructor(R){this.getter=R.getter,this.outputFormatter=R.outputFormatter}formatOutput(R){return this.outputFormatter(R)}async execute(R,...M){const X=await R.sendAsync({method:this.getter,params:[]});return this.formatOutput(X)}}function Lb(_){return new Promise((R=>setTimeout(R,_)))}r.eth=void 0,($e=r.eth||(r.eth={})).eth_getBalance=new xe({callName:"eth_getBalance",params:2,inputFormatter:[jr,nt],outputFormatter:Rt}),$e.eth_getStorageAt=new xe({callName:"eth_getStorageAt",params:3,inputFormatter:[jr,Ae,nt],outputFormatter:ce}),$e.eth_getCode=new xe({callName:"eth_getCode",params:2,inputFormatter:[jr,nt],outputFormatter:ce}),$e.eth_getBlockByHash=new xe({callName:"eth_getBlockByHash",params:2,inputFormatter:[rr,function(_){return!!_}],outputFormatter:po}),$e.eth_getBlockByNumber=new xe({callName:"eth_getBlockByNumber",params:2,inputFormatter:[rr,function(_){return!!_}],outputFormatter:po}),$e.eth_getUncleByBlockHashAndIndex=new xe({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[rr,Ae],outputFormatter:po}),$e.eth_getUncleByBlockNumberAndIndex=new xe({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[rr,Ae],outputFormatter:po}),$e.eth_getBlockTransactionCountByHash=new xe({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[rr],outputFormatter:Ie}),$e.eth_getBlockTransactionCountByNumber=new xe({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[rr],outputFormatter:Ie}),$e.eth_getUncleCountByBlockHash=new xe({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[rr],outputFormatter:Ie}),$e.eth_getUncleCountByBlockNumber=new xe({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[rr],outputFormatter:Ie}),$e.eth_getTransactionByHash=new xe({callName:"eth_getTransactionByHash",params:1,inputFormatter:[rs],outputFormatter:fo}),$e.eth_getTransactionByBlockHashAndIndex=new xe({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[rr,Ae],outputFormatter:fo}),$e.eth_getTransactionByBlockNumberAndIndex=new xe({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[rr,Ae],outputFormatter:fo}),$e.eth_getTransactionReceipt=new xe({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[rs],outputFormatter:bb}),$e.eth_getTransactionCount=new xe({callName:"eth_getTransactionCount",params:2,inputFormatter:[jr,nt],outputFormatter:Ie}),$e.eth_sendRawTransaction=new xe({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ce}),$e.web3_sha3=new xe({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ce}),$e.eth_sendTransaction=new xe({callName:"eth_sendTransaction",params:1,inputFormatter:[Df],outputFormatter:ce}),$e.eth_sign=new xe({callName:"eth_sign",params:2,inputFormatter:[jr,null],outputFormatter:ce}),$e.eth_call=new xe({callName:"eth_call",params:2,inputFormatter:[jf,nt],outputFormatter:ce}),$e.eth_estimateGas=new xe({callName:"eth_estimateGas",params:1,inputFormatter:[jf],outputFormatter:Ie}),$e.eth_submitWork=new xe({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:pe}),$e.eth_getWork=new xe({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:ht}),$e.eth_coinbase=new Dr({getter:"eth_coinbase",outputFormatter:Ur}),$e.eth_mining=new Dr({getter:"eth_mining",outputFormatter:pe}),$e.eth_hashrate=new Dr({getter:"eth_hashrate",outputFormatter:Ie}),$e.eth_syncing=new Dr({getter:"eth_syncing",outputFormatter:Tb}),$e.eth_gasPrice=new Dr({getter:"eth_gasPrice",outputFormatter:Rt}),$e.eth_accounts=new Dr({getter:"eth_accounts",outputFormatter:ht}),$e.eth_blockNumber=new Dr({getter:"eth_blockNumber",outputFormatter:Ie}),$e.eth_protocolVersion=new Dr({getter:"eth_protocolVersion",outputFormatter:Ie}),$e.web3_clientVersion=new Dr({getter:"web3_clientVersion",outputFormatter:ae}),$e.net_version=new Dr({getter:"net_version",outputFormatter:ae}),$e.shh_version=new xe({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Ie}),$e.shh_post=new xe({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:pe}),$e.personal_newAccount=new xe({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:Ur}),$e.personal_importRawKey=new xe({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:Ur}),$e.personal_sign=new xe({callName:"personal_sign",params:3,inputFormatter:[fe,jr,null],outputFormatter:ce}),$e.personal_ecRecover=new xe({callName:"personal_ecRecover",params:2,inputFormatter:[fe,null],outputFormatter:Ur}),$e.personal_unlockAccount=new xe({callName:"personal_unlockAccount",params:3,inputFormatter:[jr,null,be],outputFormatter:pe}),$e.personal_sendTransaction=new xe({callName:"personal_sendTransaction",params:2,inputFormatter:[Df,null],outputFormatter:ce}),$e.personal_lockAccount=new xe({callName:"personal_lockAccount",params:1,inputFormatter:[jr],outputFormatter:pe}),$e.personal_listAccounts=new Dr({getter:"personal_listAccounts",outputFormatter:ht}),$e.net_listening=new Dr({getter:"net_listening",outputFormatter:pe}),$e.net_peerCount=new Dr({getter:"net_peerCount",outputFormatter:Ie}),$e.eth_newFilter=new xe({callName:"eth_newFilter",params:1,inputFormatter:[Sb],outputFormatter:Ae}),$e.eth_getLogs=new xe({callName:"eth_getLogs",params:1,inputFormatter:[ht],outputFormatter:ht}),$e.eth_newBlockFilter=new xe({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Ae}),$e.eth_newPendingTransactionFilter=new xe({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Ae}),$e.eth_uninstallFilter=new xe({callName:"eth_uninstallFilter",params:1,inputFormatter:[Ae],outputFormatter:pe}),$e.eth_getFilterLogs=new xe({callName:"eth_getFilterLogs",params:1,inputFormatter:[Ae],outputFormatter:ht}),$e.eth_getFilterChanges=new xe({callName:"eth_getFilterChanges",params:1,inputFormatter:[Ae],outputFormatter:ht}),$e.eth_submitHashrate=new xe({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:pe}),$e.shh_newIdentity=new xe({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ce}),$e.shh_hasIdentity=new xe({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:pe}),$e.shh_newGroup=new xe({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ce}),$e.shh_addToGroup=new xe({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:pe}),$e.shh_newFilter=new xe({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Ae}),$e.shh_uninstallFilter=new xe({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:pe}),$e.shh_getLogs=new xe({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:ht}),$e.shh_getFilterMessages=new xe({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:ht}),$e.shh_getFilterChanges=new xe({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:ht}),$e.shh_getMessages=new xe({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:ht});function Fe(_,R){const M=r.eth[R];if(!M)throw new Error(`Could not find the method/property named ${R.toString()}`);Object.defineProperty(_,R,{value:function(...X){return M.execute(this,...X)}})}class Le{constructor(R){this.provider=R,this.requests=new Map}async sendAsync(R){const M=await this.provider;if(!M)throw new Error("Provider not set or invalid");const X=Qe(R.method,R.params),re=s();return this.requests.set(X.id,re),M.sendAsync(X,((ue,Te)=>{this.requests.delete(X.id),ue?re.reject(ue):Dt(Te)?re.resolve(Te.result):re.reject((function(Ce){const He=Ce&&Ce.error&&Ce.error.message?Ce.error.message:"Invalid JSON RPC response: "+JSON.stringify(Ce);return new Error(He)})(Te))})),re}setProvider(R){this.provider=R}async getConfirmedTransaction(R){const M=await this.waitForCompletion(R);if(this.isFailure(M))throw new Error(`Transaction "${R}" failed`);return M}async waitForCompletion(R,M){const X=rs(R);if(await this.isTxDropped(X,M)){const re=await this.getTransactionAndReceipt(X);return Object.assign(Object.assign({},re),{status:r.TransactionStatus.failed})}for(;;){const re=await this.getTransactionAndReceipt(X);if(!this.isPending(re)&&re.receipt)return Object.assign(Object.assign({},re),{status:this.isFailure(re)?r.TransactionStatus.failed:r.TransactionStatus.confirmed});await Lb(2e3)}}async getTransaction(R){let M,X=null;const re=rs(R);try{const Te=(await this.eth_accounts())[0];Te&&(X=await this.eth_getTransactionCount(Te,"latest"))}catch{X=null}try{if(M=await this.eth_getTransactionByHash(re),M===null)return null}catch{return null}if(M.blockNumber===null){if(X!==null){if(M.nonce<X)return{hash:re,type:r.TransactionType.replaced,nonce:M.nonce};if(M.nonce>X)return{hash:re,type:r.TransactionType.queued,nonce:M.nonce}}return Object.assign({type:r.TransactionType.pending},M)}let ue;try{if(ue=await this.eth_getTransactionReceipt(re),ue===null||ue.status===0)return Object.assign({type:r.TransactionType.reverted},M)}catch{return null}return Object.assign(Object.assign({type:r.TransactionType.confirmed},M),{receipt:ue})}async isTxDropped(R,M=15){let X=M;for(;X>0;){if(await this.getTransactionAndReceipt(R)!==null)return!1;X-=1,await Lb(2e3)}return!0}async getTransactionAndReceipt(R){R=rs(R);const[M,X]=await Promise.all([this.eth_getTransactionByHash(R),this.eth_getTransactionReceipt(R)]);return Object.assign(Object.assign({},M),{receipt:X})}isPending(R){return R&&R.blockNumber===null}isFailure(R){return R&&(!R.receipt||R.receipt.status===0)}}Be([Fe,Ue("design:type",Function)],Le.prototype,"web3_clientVersion",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"web3_sha3",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"net_version",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"net_peerCount",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"net_listening",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_protocolVersion",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_syncing",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_coinbase",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_mining",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_hashrate",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_gasPrice",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_accounts",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_blockNumber",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getBalance",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getStorageAt",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getTransactionCount",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getBlockTransactionCountByHash",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getBlockTransactionCountByNumber",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getUncleCountByBlockHash",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getUncleCountByBlockNumber",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getCode",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_sign",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_sendTransaction",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_sendRawTransaction",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_call",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_estimateGas",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getBlockByHash",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getBlockByNumber",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getTransactionByHash",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getTransactionReceipt",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_newFilter",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_newBlockFilter",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_newPendingTransactionFilter",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_uninstallFilter",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getFilterChanges",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getFilterLogs",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getLogs",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_getWork",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_submitWork",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"eth_submitHashrate",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_post",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_version",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_newIdentity",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_hasIdentity",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_newGroup",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_addToGroup",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_newFilter",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_uninstallFilter",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_getFilterChanges",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"shh_getMessages",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_unlockAccount",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_newAccount",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_listAccounts",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_lockAccount",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_importRawKey",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_sendTransaction",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_sign",void 0),Be([Fe,Ue("design:type",Function)],Le.prototype,"personal_ecRecover",void 0);class $b{constructor(R){this.json=R,this._inputTypes=R.inputs||[],this._outputTypes=R.outputs||[],this._constant=!!R.constant,this._payable=!!R.payable||R.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in R&&!R.constant||R.stateMutability==="nonpayable",this._name=N(R)}extractDefaultBlock(R){return R.length>this._inputTypes.length&&!A(R[R.length-1])&&nt(R.pop())||"latest"}validateArgs(R){if(R.some((ue=>ue===void 0)))throw new Error("Invalid call, some arguments are undefined");const M=R.filter((function(ue){return!(A(ue)===!0&&de(ue)===!1&&j(ue)===!1&&!(ue instanceof Uint8Array))}));if(M.length!==this._inputTypes.length)throw X=M.length,re=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${X}, expected: ${re}`);var X,re}toPayload(R){let M={to:void 0,data:void 0,value:void 0,from:void 0};R.length>this._inputTypes.length&&A(R[R.length-1])&&(M=R.pop()),this.validateArgs(R);const X=this.signature();let re=r.coder.encodeParams(this._inputTypes,R);return re.indexOf("0x")===0&&(re=re.substr(2)),M.data="0x"+X+re,M}signature(){return q(this._name).slice(0,8)}unpackOutput(R){if(!R)return;const M=R.length>=2?R.slice(2):R,X=r.coder.decodeParams(this._outputTypes,M);return X.length===1?X[0]:X}async execute(R,M,...X){if(!R)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const re=this.toPayload(X);if(re.to=M,re.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!re.from)throw new Error('Missing "from" in transaction options');return await R.eth_sendTransaction(re)}{const re=this.extractDefaultBlock(X),ue=this.toPayload(X);ue.to=M;const Te=await R.eth_call(ue,re);return this.unpackOutput(Te)}}estimateGas(R,M,...X){if(!(R instanceof Le))throw new Error("estimateGas needs to receive a RequestManager as first argument");const re=this.toPayload(X);return re.to=M,R.eth_estimateGas(re)}displayName(){return Ee(this._name)}typeName(){return he(this._name)||"void"}attachToContract(R){const M=this.displayName(),X=Object.assign(((...re)=>this.execute(R.requestManager,R.address,...re)),{estimateGas:this.estimateGas.bind(this,R.requestManager,R.address),toPayload:(...re)=>this.toPayload(re),toRPCMessage:(...re)=>{const ue=this.extractDefaultBlock(re),Te=this.toPayload(re);return Te.to=R.address,{method:"eth_call",params:[Te,ue]}},unpackOutput:re=>this.unpackOutput(re)});R[M]||(R[M]=X),R[M][this.typeName()]=X}}function qb(_){if(_==null)return null;const R=String(_).toString();return R.indexOf("0x")===0?R:K(U(R))}class kf{constructor(R){this.requestManager=R,this.isStarted=!1,this.isDisposed=!1,this.formatter=M=>M,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(R){if(this.isDisposed)throw new Error("The filter was disposed");R&&(this.callbacks.push(R),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const R=await this.getNewFilter();if(!R)throw new Error("Could not create a filter, response: "+JSON.stringify(R));this.filterId.resolve(R)}catch(R){throw R}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const R=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${R}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const M=await this.getChanges();M&&this.callbacks.forEach((X=>{this.formatter?M.forEach((re=>{X(this.formatter(re))})):M.forEach((re=>X(re)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((R=()=>this.poll(),function(){R().catch((M=>console.error(M)))}),500))}else this.stopSemaphore.resolve(1);var R}}class ho extends kf{constructor(R,M,X=(re=>re)){super(R),this.requestManager=R,this.options=M,this.formatter=X,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(re){return qb(re)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?rr(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?rr(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const R=await this.filterId;return this.requestManager.eth_getFilterLogs(R)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const R=await this.filterId;return this.requestManager.eth_getFilterChanges(R)}async uninstall(){const R=await this.filterId;return this.requestManager.eth_uninstallFilter(R)}}class Bf{constructor(R,M,X){this.requestManager=R,this.address=X,this._anonymous=!1,this._params=M.inputs||[],this._name=N(M),this._anonymous=M.anonymous||!1}types(R){return this._params.filter((function(M){return M.indexed===R}))}displayName(){return Ee(this._name)}typeName(){return he(this._name)||"void"}signature(){return q(this._name)}encode(R={},M={}){const X={topics:[],address:this.address};M.fromBlock!==void 0&&(X.fromBlock=rr(M.fromBlock)||void 0),M.toBlock!==void 0&&(X.toBlock=rr(M.toBlock)||void 0),X.topics=X.topics||[],this._anonymous||X.topics.push("0x"+this.signature());const re=this._params.filter((function(ue){return ue.indexed===!0})).map((function(ue){const Te=R[ue.name];return Te==null?null:de(Te)?Te.map((function(Ce){return"0x"+r.coder.encodeParams([ue],[Ce])})):"0x"+r.coder.encodeParams([ue],[Te])}));return X.topics=X.topics.concat(re),X}decode(R){R.data=R.data||"",R.topics=R.topics||[];const M=(this._anonymous?R.topics:R.topics.slice(1)).map((function(Ce){return Ce.slice(2)})).join(""),X=r.coder.decodeParams(this.types(!0),M),re=R.data.slice(2),ue=r.coder.decodeParams(this.types(!1),re),Te=this._params.reduce((function(Ce,He){return Ce[He.name]=He.indexed?X.shift():ue.shift(),Ce}),{});return Object.assign(Object.assign({},nc(R)),{event:this.displayName(),address:R.address,args:Te})}async execute(R,M){const X=this.encode(R,M),re=this.decode.bind(this);return new ho(this.requestManager,X,re)}attachToContract(R){const M=this.execute.bind(this),X=this.displayName();R.events[X]||(R.events[X]=M),R.events[X][this.typeName()]=this.execute.bind(this,R)}}class X${constructor(R,M,X){this._requestManager=R,this._json=M,this._address=X}encode(R={}){const M={address:this._address};return R.fromBlock!==void 0&&(M.fromBlock=rr(R.fromBlock)||void 0),R.toBlock!==void 0&&(M.toBlock=rr(R.toBlock)||void 0),M}decode(R){R.data=R.data||"";const M=de(R.topics)&&S(R.topics[0])?R.topics[0].slice(2):"",X=this._json.filter((function(re){return M===q(N(re))}))[0];return X?new Bf(this._requestManager,X,this._address).decode(R):nc(R)}async execute(R){const M=this.encode(R),X=this.decode.bind(this);return new ho(this._requestManager,M,X)}getAllEventsFunction(){return this.execute.bind(this)}}class kb{constructor(R,M,X){var re;this.requestManager=R,this.abi=M,this.address=X,this.events={},this.transactionHash=null,this.address=X,this.abi=M,(re=this).abi.filter((function(ue){return ue.type==="function"})).map((function(ue){return new $b(ue)})).forEach((function(ue){ue.attachToContract(re)})),this.allEvents=(function(ue){const Te=ue.abi.filter((function(He){return He.type==="event"})),Ce=new X$(ue.requestManager,Te,ue.address);return Te.map((function(He){return new Bf(ue.requestManager,He,ue.address)})).forEach((function(He){He.attachToContract(ue)})),Ce.getAllEventsFunction()})(this)}}r.AbstractFilter=kf,r.BigNumber=B,r.Contract=kb,r.ContractFactory=class{constructor(_,R){this.requestManager=_,this.abi=R}async deploy(..._){let R;const M=_[_.length-1];if(A(M)&&!de(M)&&(R=_.pop()),!R)throw new Error("Missing options object");if(!R.data||typeof R.data!="string")throw new Error("Invalid options.data");if(Ie(R.value)>0&&!(this.abi.filter((function(Ge){return Ge.type==="constructor"&&Ge.inputs.length===_.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const X=(re=this.abi,ue=_,re.filter((function(Ge){return Ge.type==="constructor"&&Ge.inputs&&Ge.inputs.length===ue.length})).map((function(Ge){return Ge.inputs||[]})).map((function(Ge){return r.coder.encodeParams(Ge,ue)}))[0]||"");var re,ue;R.data+=X,R.gas||(R.gas=await this.requestManager.eth_estimateGas(R));const Te=await this.requestManager.eth_sendTransaction(R);if(!Te)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const Ce=await(async function(Ge,Sr){const Ht=s();let je=0;const sr=()=>{je++,je>50?Ht.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Ge.eth_getTransactionReceipt(Sr).then((yr=>{yr&&yr.blockHash?Ht.resolve(yr):setTimeout(sr,1e3)}),(yr=>Ht.reject(yr)))};sr();const Pt=await Ht,Nt=await Ge.eth_getCode(Pt.contractAddress,"latest");if(Nt&&Nt.length>3)return Pt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Nt,receipt:Pt})})(this.requestManager,Te),He=await this.at(Ce);return He.transactionHash=Te,He}async at(_){if(!wt(_))throw new TypeError(`Invalid address ${JSON.stringify(_)}`);return new kb(this.requestManager,this.abi,_)}},r.EthBlockFilter=class extends ho{constructor(_){super(_,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=ho,r.EthPendingTransactionFilter=class extends ho{constructor(_){super(_,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(_,R={}){this.host=_,this.options=R,this.debug=!1,this.host=_||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(_,R){try{let M=null;M=_ instanceof Array?_.map((ue=>n(ue))):n(_);const X=this.options.fetch||globalThis.fetch;if(X===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const re={body:JSON.stringify(M),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+re.body),X(this.host,re).then((async ue=>{if(ue.ok){const Te=await ue.json();this.debug&&console.log("RECV << "+JSON.stringify(Te)),Te.error?R(Object.assign(new Error(Te.error.json||Te.error),Te.error)):R(null,Te)}else{const Te=(typeof ue.text=="function"?await ue.text().catch((()=>"")):"").trim().slice(0,512),Ce="External error. response code: "+ue.status+(Te?" — "+Te:"");this.debug&&console.log("ERR << "+Ce),R(new Error(Ce))}}),(ue=>{this.debug&&console.log("ERR << "+JSON.stringify(ue)),R(ue)}))}catch(M){this.debug&&console.log("ERR << "+JSON.stringify(M)),R(M)}}},r.Method=xe,r.Property=Dr,r.RequestManager=Le,r.SHHFilter=class extends kf{constructor(_,R){super(_),this.requestManager=_,this.options=R,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(M){return qb(M)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const _=await this.filterId;return this.requestManager.shh_getMessages(_)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const _=await this.filterId;return this.requestManager.shh_getFilterChanges(_)}async uninstall(){const _=await this.filterId;return this.requestManager.shh_uninstallFilter(_)}},r.SolidityEvent=Bf,r.SolidityFunction=$b,r.WebSocketProvider=class{constructor(_,R={}){this.url=_,this.options=R,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const _=this.connection;this.timeout(new Error("Provider disposed.")),_.then((R=>R.close())).catch((R=>{this.debug&&console.error(R)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(_,R){const M=[];let X;if(_ instanceof Array)X=Promise.all(_.map((re=>{const ue=s();try{const Te=n(re);M.push(Te),this.responseCallbacks.set(Te.id,ue)}catch(Te){ue.reject(Te)}return ue})));else{const re=s();try{const ue=n(_);M.push(ue),this.responseCallbacks.set(ue.id,re)}catch(ue){re.reject(ue)}X=re}X.then((re=>R(null,re)),(re=>R(re))),this.connection.then((re=>{M.forEach((ue=>{const Te=JSON.stringify(ue);this.debug&&console.log("SEND >> "+Te),re.send(Te)}))}),(re=>{R(re)}))}parseResponse(_){const R=[];return _.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((M=>{let X=M;this.lastChunk&&(X=this.lastChunk+X);let re=null;try{re=JSON.parse(X)}catch{return this.lastChunk=X,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",re&&R.push(re)})),R}processMessage(_){if("id"in _){const R=_.id,M=this.responseCallbacks.get(R);if(!M)return void console.error("Error: Received a response for an unknown request",_);this.responseCallbacks.delete(R),_.error!==void 0&&_.error!==null?M.reject(Object.assign(new Error(_.error.message||_.error),_.error)):"result"in _&&M.resolve(_)}else this.notificationCallbacks.forEach((R=>R(null,_)))}timeout(_){this.connection&&this.connection.isPending||(this.connection=s());const R=_||new Error("Connection timeout");this.responseCallbacks.forEach((M=>M.reject(R))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((M=>M.close())).catch((M=>{this.debug&&console.error(M)})),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const _=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!_)throw new Error("Please provide a WebSocketConstructor");const R=new _(this.url,this.options.protocol);R.onopen=()=>{this.connection.resolve(R)},R.onerror=M=>{const X=new Error("Error in web socket");X.data=M,this.timeout(X)},R.onclose=M=>{this.timeout(new Error(`Connection closed (${M&&M.reason||"Unknown reason"})`))},R.onmessage=M=>{const X=typeof M.data=="string"?M.data:"";this.debug&&console.log("RECV << "+M.data),this.parseResponse(X).forEach((re=>{re instanceof Array?re.forEach((ue=>this.processMessage(ue))):this.processMessage(re)}))}}},r.bytesToHex=K,r.bytesToUtf8String=k,r.concatBytes=L,r.default=Le,r.extractDisplayName=Ee,r.extractTypeName=he,r.fromAscii=function(_,R=0){let M="";for(let X=0;X<_.length;X++){const re=_.charCodeAt(X).toString(16);M+=re.length<2?"0"+re:re}return"0x"+M.padEnd(R,"0")},r.fromDecimal=ve,r.fromTwosComplement=It,r.fromWei=function(_,R){const M=We(_).dividedBy(ke(R));return j(_)?M:M.toString(10)},r.getAddress=Ft,r.getValueOfUnit=ke,r.hexToBytes=Q,r.inputAddressFormatter=jr,r.inputBlockNumberFormatter=rr,r.inputCallFormatter=jf,r.inputDefaultBlockNumberFormatter=nt,r.inputFilterOptions=Sb,r.inputPostFormatter=function(_){return _?(_.ttl=ve(_.ttl),_.workToProve=ve(_.workToProve),_.priority=ve(_.priority),de(_.topics)||(_.topics=_.topics?[_.topics]:[]),_.topics=_.topics.map((function(R){return R.indexOf("0x")===0?R:"0x"+K(U(R))})),_):null},r.inputTransactionFormatter=Df,r.inputTransactionId=rs,r.isAddress=wt,r.isArray=de,r.isBigNumber=j,r.isBloom=function(_){return!!/^(0x)?[0-9a-f]{512}$/i.test(_)&&!!/^(0x)?[0-9a-f]{512}$/i.test(_)},r.isBoolean=Y,r.isChecksumAddress=mr,r.isFunction=function(_){return typeof _=="function"},r.isHex=function(_){return typeof _=="string"&&/^0x[0-9a-fA-F]+$/.test(_)},r.isJson=function(_){try{return!!JSON.parse(_)}catch{return!1}},r.isObject=A,r.isPredefinedBlockNumber=Lt,r.isStrictAddress=tr,r.isString=S,r.isTopic=function(_){return!!/^(0x)?[0-9a-f]{64}$/i.test(_)&&!!/^(0x)?[0-9a-f]{64}$/i.test(_)},r.isValidResponse=Dt,r.outputBigNumberFormatter=Rt,r.outputBlockFormatter=po,r.outputLogFormatter=nc,r.outputPostFormatter=function(_){return _?(_.expiry=Ie(_.expiry),_.sent=Ie(_.sent),_.ttl=Ie(_.ttl),_.workProved=Ie(_.workProved),_.topics||(_.topics=[]),_.topics=_.topics.map((function(R){return W(R)})),_):null},r.outputSyncingFormatter=Tb,r.outputTransactionFormatter=fo,r.outputTransactionReceiptFormatter=bb,r.padLeft=F,r.padRight=function(_,R,M){return _+new Array(R-_.length+1).join(M||"0")},r.sha3=q,r.signedIsNegative=ut,r.stringToUtf8Bytes=U,r.toAddress=Ur,r.toArray=ht,r.toAscii=W,r.toBatchPayload=function(_){return _.map((function(R){return Qe(R.method,R.params)}))},r.toBigNumber=We,r.toBoolean=pe,r.toChecksumAddress=hr,r.toData=ce,r.toDecimal=Ie,r.toHex=Ae,r.toJsonRpcRequest=Qe,r.toNullDecimal=be,r.toString=ae,r.toStringData=fe,r.toTwosComplement=Xe,r.toWei=function(_,R){const M=We(_).times(ke(R));return j(_)?M:M.toString(10)},r.transformToFullName=N,Object.defineProperty(r,"__esModule",{value:!0})}))})(cu,cu.exports)),cu.exports}var ed={},Kw;function cG(){if(Kw)return ed;Kw=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.SignatureValidator=t;const e=of();async function t(r,n){const i=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(r,i).at(n)}return ed}var Nn={},hh={},yh={},aa={},ei={},nr={},Xw;function qv(){if(Xw)return nr;Xw=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.output=nr.exists=nr.hash=nr.bytes=nr.bool=nr.number=nr.isBytes=void 0;function e(u){if(!Number.isSafeInteger(u)||u<0)throw new Error(`positive integer expected, not ${u}`)}nr.number=e;function t(u){if(typeof u!="boolean")throw new Error(`boolean expected, not ${u}`)}nr.bool=t;function r(u){return u instanceof Uint8Array||u!=null&&typeof u=="object"&&u.constructor.name==="Uint8Array"}nr.isBytes=r;function n(u,...l){if(!r(u))throw new Error("Uint8Array expected");if(l.length>0&&!l.includes(u.length))throw new Error(`Uint8Array expected of length ${l}, not of length=${u.length}`)}nr.bytes=n;function i(u){if(typeof u!="function"||typeof u.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(u.outputLen),e(u.blockLen)}nr.hash=i;function a(u,l=!0){if(u.destroyed)throw new Error("Hash instance has been destroyed");if(l&&u.finished)throw new Error("Hash#digest() has already been called")}nr.exists=a;function s(u,l){n(u);const c=l.outputLen;if(u.length<c)throw new Error(`digestInto() expects output buffer of length at least ${c}`)}nr.output=s;const o={number:e,bool:t,bytes:n,hash:i,exists:a,output:s};return nr.default=o,nr}var gh={},Ro={},Jw;function lG(){return Jw||(Jw=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.crypto=void 0,Ro.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),Ro}var Qw;function Wu(){return Qw||(Qw=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const t=lG(),r=qv();function n(V){return V instanceof Uint8Array||V!=null&&typeof V=="object"&&V.constructor.name==="Uint8Array"}e.isBytes=n;const i=V=>new Uint8Array(V.buffer,V.byteOffset,V.byteLength);e.u8=i;const a=V=>new Uint32Array(V.buffer,V.byteOffset,Math.floor(V.byteLength/4));e.u32=a;const s=V=>new DataView(V.buffer,V.byteOffset,V.byteLength);e.createView=s;const o=(V,U)=>V<<32-U|V>>>U;e.rotr=o;const u=(V,U)=>V<<U|V>>>32-U>>>0;e.rotl=u,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=V=>V<<24&4278190080|V<<8&16711680|V>>>8&65280|V>>>24&255;e.byteSwap=l,e.byteSwapIfBE=e.isLE?V=>V:V=>(0,e.byteSwap)(V);function c(V){for(let U=0;U<V.length;U++)V[U]=(0,e.byteSwap)(V[U])}e.byteSwap32=c;const d=Array.from({length:256},(V,U)=>U.toString(16).padStart(2,"0"));function f(V){(0,r.bytes)(V);let U="";for(let k=0;k<V.length;k++)U+=d[V[k]];return U}e.bytesToHex=f;const p={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function y(V){if(V>=p._0&&V<=p._9)return V-p._0;if(V>=p._A&&V<=p._F)return V-(p._A-10);if(V>=p._a&&V<=p._f)return V-(p._a-10)}function g(V){if(typeof V!="string")throw new Error("hex string expected, got "+typeof V);const U=V.length,k=U/2;if(U%2)throw new Error("padded hex string expected, got unpadded hex of length "+U);const te=new Uint8Array(k);for(let ie=0,J=0;ie<k;ie++,J+=2){const Q=y(V.charCodeAt(J)),K=y(V.charCodeAt(J+1));if(Q===void 0||K===void 0){const q=V[J]+V[J+1];throw new Error('hex string expected, got non-hex character "'+q+'" at index '+J)}te[ie]=Q*16+K}return te}e.hexToBytes=g;const T=async()=>{};e.nextTick=T;async function P(V,U,k){let te=Date.now();for(let ie=0;ie<V;ie++){k(ie);const J=Date.now()-te;J>=0&&J<U||(await(0,e.nextTick)(),te+=J)}}e.asyncLoop=P;function m(V){if(typeof V!="string")throw new Error(`utf8ToBytes expected string, got ${typeof V}`);return new Uint8Array(new TextEncoder().encode(V))}e.utf8ToBytes=m;function w(V){return typeof V=="string"&&(V=m(V)),(0,r.bytes)(V),V}e.toBytes=w;function I(...V){let U=0;for(let te=0;te<V.length;te++){const ie=V[te];(0,r.bytes)(ie),U+=ie.length}const k=new Uint8Array(U);for(let te=0,ie=0;te<V.length;te++){const J=V[te];k.set(J,ie),ie+=J.length}return k}e.concatBytes=I;class h{clone(){return this._cloneInto()}}e.Hash=h;const E={}.toString;function v(V,U){if(U!==void 0&&E.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(V,U)}e.checkOpts=v;function O(V){const U=te=>V().update(w(te)).digest(),k=V();return U.outputLen=k.outputLen,U.blockLen=k.blockLen,U.create=()=>V(),U}e.wrapConstructor=O;function C(V){const U=(te,ie)=>V(ie).update(w(te)).digest(),k=V({});return U.outputLen=k.outputLen,U.blockLen=k.blockLen,U.create=te=>V(te),U}e.wrapConstructorWithOpts=C;function $(V){const U=(te,ie)=>V(ie).update(w(te)).digest(),k=V({});return U.outputLen=k.outputLen,U.blockLen=k.blockLen,U.create=te=>V(te),U}e.wrapXOFConstructorWithOpts=$;function B(V=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(V));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=B})(gh)),gh}var Zw;function dG(){if(Zw)return ei;Zw=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.HashMD=ei.Maj=ei.Chi=void 0;const e=qv(),t=Wu();function r(s,o,u,l){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,u,l);const c=BigInt(32),d=BigInt(4294967295),f=Number(u>>c&d),p=Number(u&d),y=l?4:0,g=l?0:4;s.setUint32(o+y,f,l),s.setUint32(o+g,p,l)}const n=(s,o,u)=>s&o^~s&u;ei.Chi=n;const i=(s,o,u)=>s&o^s&u^o&u;ei.Maj=i;class a extends t.Hash{constructor(o,u,l,c){super(),this.blockLen=o,this.outputLen=u,this.padOffset=l,this.isLE=c,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(o),this.view=(0,t.createView)(this.buffer)}update(o){(0,e.exists)(this);const{view:u,buffer:l,blockLen:c}=this;o=(0,t.toBytes)(o);const d=o.length;for(let f=0;f<d;){const p=Math.min(c-this.pos,d-f);if(p===c){const y=(0,t.createView)(o);for(;c<=d-f;f+=c)this.process(y,f);continue}l.set(o.subarray(f,f+p),this.pos),this.pos+=p,f+=p,this.pos===c&&(this.process(u,0),this.pos=0)}return this.length+=o.length,this.roundClean(),this}digestInto(o){(0,e.exists)(this),(0,e.output)(o,this),this.finished=!0;const{buffer:u,view:l,blockLen:c,isLE:d}=this;let{pos:f}=this;u[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>c-f&&(this.process(l,0),f=0);for(let P=f;P<c;P++)u[P]=0;r(l,c-8,BigInt(this.length*8),d),this.process(l,0);const p=(0,t.createView)(o),y=this.outputLen;if(y%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=y/4,T=this.get();if(g>T.length)throw new Error("_sha2: outputLen bigger than state");for(let P=0;P<g;P++)p.setUint32(4*P,T[P],d)}digest(){const{buffer:o,outputLen:u}=this;this.digestInto(o);const l=o.slice(0,u);return this.destroy(),l}_cloneInto(o){o||(o=new this.constructor),o.set(...this.get());const{blockLen:u,buffer:l,length:c,finished:d,destroyed:f,pos:p}=this;return o.length=c,o.pos=p,o.finished=d,o.destroyed=f,c%u&&o.buffer.set(l),o}}return ei.HashMD=a,ei}var eR;function fG(){if(eR)return aa;eR=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.sha224=aa.sha256=void 0;const e=dG(),t=Wu(),r=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),n=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);class a extends e.HashMD{constructor(){super(64,32,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){const{A:u,B:l,C:c,D:d,E:f,F:p,G:y,H:g}=this;return[u,l,c,d,f,p,y,g]}set(u,l,c,d,f,p,y,g){this.A=u|0,this.B=l|0,this.C=c|0,this.D=d|0,this.E=f|0,this.F=p|0,this.G=y|0,this.H=g|0}process(u,l){for(let m=0;m<16;m++,l+=4)i[m]=u.getUint32(l,!1);for(let m=16;m<64;m++){const w=i[m-15],I=i[m-2],h=(0,t.rotr)(w,7)^(0,t.rotr)(w,18)^w>>>3,E=(0,t.rotr)(I,17)^(0,t.rotr)(I,19)^I>>>10;i[m]=E+i[m-7]+h+i[m-16]|0}let{A:c,B:d,C:f,D:p,E:y,F:g,G:T,H:P}=this;for(let m=0;m<64;m++){const w=(0,t.rotr)(y,6)^(0,t.rotr)(y,11)^(0,t.rotr)(y,25),I=P+w+(0,e.Chi)(y,g,T)+r[m]+i[m]|0,E=((0,t.rotr)(c,2)^(0,t.rotr)(c,13)^(0,t.rotr)(c,22))+(0,e.Maj)(c,d,f)|0;P=T,T=g,g=y,y=p+I|0,p=f,f=d,d=c,c=I+E|0}c=c+this.A|0,d=d+this.B|0,f=f+this.C|0,p=p+this.D|0,y=y+this.E|0,g=g+this.F|0,T=T+this.G|0,P=P+this.H|0,this.set(c,d,f,p,y,g,T,P)}roundClean(){i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class s extends a{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return aa.sha256=(0,t.wrapConstructor)(()=>new a),aa.sha224=(0,t.wrapConstructor)(()=>new s),aa}var Ao={},_h={},tR;function pG(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=qv(),r=Wu();class n extends r.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(s);const u=(0,r.toBytes)(o);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const l=this.blockLen,c=new Uint8Array(l);c.set(u.length>l?s.create().update(u).digest():u);for(let d=0;d<c.length;d++)c[d]^=54;this.iHash.update(c),this.oHash=s.create();for(let d=0;d<c.length;d++)c[d]^=106;this.oHash.update(c),c.fill(0)}update(s){return(0,t.exists)(this),this.iHash.update(s),this}digestInto(s){(0,t.exists)(this),(0,t.bytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:u,finished:l,destroyed:c,blockLen:d,outputLen:f}=this;return s=s,s.finished=l,s.destroyed=c,s.blockLen=d,s.outputLen=f,s.oHash=o._cloneInto(s.oHash),s.iHash=u._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const i=(a,s,o)=>new n(a,s).update(o).digest();e.hmac=i,e.hmac.create=(a,s)=>new n(a,s)})(_h)),_h}var Eh={},Oo={},Bt={},$t={},rR;function xs(){if(rR)return $t;rR=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.bitMask=void 0,$t.isBytes=n,$t.abytes=i,$t.bytesToHex=s,$t.numberToHexUnpadded=o,$t.hexToNumber=u,$t.hexToBytes=d,$t.bytesToNumberBE=f,$t.bytesToNumberLE=p,$t.numberToBytesBE=y,$t.numberToBytesLE=g,$t.numberToVarBytesBE=T,$t.ensureBytes=P,$t.concatBytes=m,$t.equalBytes=w,$t.utf8ToBytes=I,$t.bitLen=h,$t.bitGet=E,$t.bitSet=v,$t.createHmacDrbg=B,$t.validateObject=U;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=BigInt(0),t=BigInt(1),r=BigInt(2);function n(k){return k instanceof Uint8Array||k!=null&&typeof k=="object"&&k.constructor.name==="Uint8Array"}function i(k){if(!n(k))throw new Error("Uint8Array expected")}const a=Array.from({length:256},(k,te)=>te.toString(16).padStart(2,"0"));function s(k){i(k);let te="";for(let ie=0;ie<k.length;ie++)te+=a[k[ie]];return te}function o(k){const te=k.toString(16);return te.length&1?`0${te}`:te}function u(k){if(typeof k!="string")throw new Error("hex string expected, got "+typeof k);return BigInt(k===""?"0":`0x${k}`)}const l={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function c(k){if(k>=l._0&&k<=l._9)return k-l._0;if(k>=l._A&&k<=l._F)return k-(l._A-10);if(k>=l._a&&k<=l._f)return k-(l._a-10)}function d(k){if(typeof k!="string")throw new Error("hex string expected, got "+typeof k);const te=k.length,ie=te/2;if(te%2)throw new Error("padded hex string expected, got unpadded hex of length "+te);const J=new Uint8Array(ie);for(let Q=0,K=0;Q<ie;Q++,K+=2){const q=c(k.charCodeAt(K)),D=c(k.charCodeAt(K+1));if(q===void 0||D===void 0){const F=k[K]+k[K+1];throw new Error('hex string expected, got non-hex character "'+F+'" at index '+K)}J[Q]=q*16+D}return J}function f(k){return u(s(k))}function p(k){return i(k),u(s(Uint8Array.from(k).reverse()))}function y(k,te){return d(k.toString(16).padStart(te*2,"0"))}function g(k,te){return y(k,te).reverse()}function T(k){return d(o(k))}function P(k,te,ie){let J;if(typeof te=="string")try{J=d(te)}catch(K){throw new Error(`${k} must be valid hex string, got "${te}". Cause: ${K}`)}else if(n(te))J=Uint8Array.from(te);else throw new Error(`${k} must be hex string or Uint8Array`);const Q=J.length;if(typeof ie=="number"&&Q!==ie)throw new Error(`${k} expected ${ie} bytes, got ${Q}`);return J}function m(...k){let te=0;for(let J=0;J<k.length;J++){const Q=k[J];i(Q),te+=Q.length}const ie=new Uint8Array(te);for(let J=0,Q=0;J<k.length;J++){const K=k[J];ie.set(K,Q),Q+=K.length}return ie}function w(k,te){if(k.length!==te.length)return!1;let ie=0;for(let J=0;J<k.length;J++)ie|=k[J]^te[J];return ie===0}function I(k){if(typeof k!="string")throw new Error(`utf8ToBytes expected string, got ${typeof k}`);return new Uint8Array(new TextEncoder().encode(k))}function h(k){let te;for(te=0;k>e;k>>=t,te+=1);return te}function E(k,te){return k>>BigInt(te)&t}function v(k,te,ie){return k|(ie?t:e)<<BigInt(te)}const O=k=>(r<<BigInt(k-1))-t;$t.bitMask=O;const C=k=>new Uint8Array(k),$=k=>Uint8Array.from(k);function B(k,te,ie){if(typeof k!="number"||k<2)throw new Error("hashLen must be a number");if(typeof te!="number"||te<2)throw new Error("qByteLen must be a number");if(typeof ie!="function")throw new Error("hmacFn must be a function");let J=C(k),Q=C(k),K=0;const q=()=>{J.fill(1),Q.fill(0),K=0},D=(...L)=>ie(Q,J,...L),F=(L=C())=>{Q=D($([0]),L),J=D(),L.length!==0&&(Q=D($([1]),L),J=D())},W=()=>{if(K++>=1e3)throw new Error("drbg: tried 1000 values");let L=0;const ee=[];for(;L<te;){J=D();const Ee=J.slice();ee.push(Ee),L+=J.length}return m(...ee)};return(L,ee)=>{q(),F(L);let Ee;for(;!(Ee=ee(W()));)F();return q(),Ee}}const V={bigint:k=>typeof k=="bigint",function:k=>typeof k=="function",boolean:k=>typeof k=="boolean",string:k=>typeof k=="string",stringOrUint8Array:k=>typeof k=="string"||n(k),isSafeInteger:k=>Number.isSafeInteger(k),array:k=>Array.isArray(k),field:(k,te)=>te.Fp.isValid(k),hash:k=>typeof k=="function"&&Number.isSafeInteger(k.outputLen)};function U(k,te,ie={}){const J=(Q,K,q)=>{const D=V[K];if(typeof D!="function")throw new Error(`Invalid validator "${K}", expected function`);const F=k[Q];if(!(q&&F===void 0)&&!D(F,k))throw new Error(`Invalid param ${String(Q)}=${F} (${typeof F}), expected ${K}`)};for(const[Q,K]of Object.entries(te))J(Q,K,!1);for(const[Q,K]of Object.entries(ie))J(Q,K,!0);return k}return $t}var nR;function uf(){if(nR)return Bt;nR=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isNegativeLE=void 0,Bt.mod=u,Bt.pow=l,Bt.pow2=c,Bt.invert=d,Bt.tonelliShanks=f,Bt.FpSqrt=p,Bt.validateField=T,Bt.FpPow=P,Bt.FpInvertBatch=m,Bt.FpDiv=w,Bt.FpIsSquare=I,Bt.nLength=h,Bt.Field=E,Bt.FpSqrtOdd=v,Bt.FpSqrtEven=O,Bt.hashToPrivateScalar=C,Bt.getFieldBytesLength=$,Bt.getMinHashLength=B,Bt.mapHashToField=V;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=xs(),t=BigInt(0),r=BigInt(1),n=BigInt(2),i=BigInt(3),a=BigInt(4),s=BigInt(5),o=BigInt(8);BigInt(9),BigInt(16);function u(U,k){const te=U%k;return te>=t?te:k+te}function l(U,k,te){if(te<=t||k<t)throw new Error("Expected power/modulo > 0");if(te===r)return t;let ie=r;for(;k>t;)k&r&&(ie=ie*U%te),U=U*U%te,k>>=r;return ie}function c(U,k,te){let ie=U;for(;k-- >t;)ie*=ie,ie%=te;return ie}function d(U,k){if(U===t||k<=t)throw new Error(`invert: expected positive integers, got n=${U} mod=${k}`);let te=u(U,k),ie=k,J=t,Q=r;for(;te!==t;){const q=ie/te,D=ie%te,F=J-Q*q;ie=te,te=D,J=Q,Q=F}if(ie!==r)throw new Error("invert: does not exist");return u(J,k)}function f(U){const k=(U-r)/n;let te,ie,J;for(te=U-r,ie=0;te%n===t;te/=n,ie++);for(J=n;J<U&&l(J,k,U)!==U-r;J++);if(ie===1){const K=(U+r)/a;return function(D,F){const W=D.pow(F,K);if(!D.eql(D.sqr(W),F))throw new Error("Cannot find square root");return W}}const Q=(te+r)/n;return function(q,D){if(q.pow(D,k)===q.neg(q.ONE))throw new Error("Cannot find square root");let F=ie,W=q.pow(q.mul(q.ONE,J),te),N=q.pow(D,Q),L=q.pow(D,te);for(;!q.eql(L,q.ONE);){if(q.eql(L,q.ZERO))return q.ZERO;let ee=1;for(let he=q.sqr(L);ee<F&&!q.eql(he,q.ONE);ee++)he=q.sqr(he);const Ee=q.pow(W,r<<BigInt(F-ee-1));W=q.sqr(Ee),N=q.mul(N,Ee),L=q.mul(L,W),F=ee}return N}}function p(U){if(U%a===i){const k=(U+r)/a;return function(ie,J){const Q=ie.pow(J,k);if(!ie.eql(ie.sqr(Q),J))throw new Error("Cannot find square root");return Q}}if(U%o===s){const k=(U-s)/o;return function(ie,J){const Q=ie.mul(J,n),K=ie.pow(Q,k),q=ie.mul(J,K),D=ie.mul(ie.mul(q,n),K),F=ie.mul(q,ie.sub(D,ie.ONE));if(!ie.eql(ie.sqr(F),J))throw new Error("Cannot find square root");return F}}return f(U)}const y=(U,k)=>(u(U,k)&r)===r;Bt.isNegativeLE=y;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function T(U){const k={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},te=g.reduce((ie,J)=>(ie[J]="function",ie),k);return(0,e.validateObject)(U,te)}function P(U,k,te){if(te<t)throw new Error("Expected power > 0");if(te===t)return U.ONE;if(te===r)return k;let ie=U.ONE,J=k;for(;te>t;)te&r&&(ie=U.mul(ie,J)),J=U.sqr(J),te>>=r;return ie}function m(U,k){const te=new Array(k.length),ie=k.reduce((Q,K,q)=>U.is0(K)?Q:(te[q]=Q,U.mul(Q,K)),U.ONE),J=U.inv(ie);return k.reduceRight((Q,K,q)=>U.is0(K)?Q:(te[q]=U.mul(Q,te[q]),U.mul(Q,K)),J),te}function w(U,k,te){return U.mul(k,typeof te=="bigint"?d(te,U.ORDER):U.inv(te))}function I(U){const k=(U.ORDER-r)/n;return te=>{const ie=U.pow(te,k);return U.eql(ie,U.ZERO)||U.eql(ie,U.ONE)}}function h(U,k){const te=k!==void 0?k:U.toString(2).length,ie=Math.ceil(te/8);return{nBitLength:te,nByteLength:ie}}function E(U,k,te=!1,ie={}){if(U<=t)throw new Error(`Expected Field ORDER > 0, got ${U}`);const{nBitLength:J,nByteLength:Q}=h(U,k);if(Q>2048)throw new Error("Field lengths over 2048 bytes are not supported");const K=p(U),q=Object.freeze({ORDER:U,BITS:J,BYTES:Q,MASK:(0,e.bitMask)(J),ZERO:t,ONE:r,create:D=>u(D,U),isValid:D=>{if(typeof D!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof D}`);return t<=D&&D<U},is0:D=>D===t,isOdd:D=>(D&r)===r,neg:D=>u(-D,U),eql:(D,F)=>D===F,sqr:D=>u(D*D,U),add:(D,F)=>u(D+F,U),sub:(D,F)=>u(D-F,U),mul:(D,F)=>u(D*F,U),pow:(D,F)=>P(q,D,F),div:(D,F)=>u(D*d(F,U),U),sqrN:D=>D*D,addN:(D,F)=>D+F,subN:(D,F)=>D-F,mulN:(D,F)=>D*F,inv:D=>d(D,U),sqrt:ie.sqrt||(D=>K(q,D)),invertBatch:D=>m(q,D),cmov:(D,F,W)=>W?F:D,toBytes:D=>te?(0,e.numberToBytesLE)(D,Q):(0,e.numberToBytesBE)(D,Q),fromBytes:D=>{if(D.length!==Q)throw new Error(`Fp.fromBytes: expected ${Q}, got ${D.length}`);return te?(0,e.bytesToNumberLE)(D):(0,e.bytesToNumberBE)(D)}});return Object.freeze(q)}function v(U,k){if(!U.isOdd)throw new Error("Field doesn't have isOdd");const te=U.sqrt(k);return U.isOdd(te)?te:U.neg(te)}function O(U,k){if(!U.isOdd)throw new Error("Field doesn't have isOdd");const te=U.sqrt(k);return U.isOdd(te)?U.neg(te):te}function C(U,k,te=!1){U=(0,e.ensureBytes)("privateHash",U);const ie=U.length,J=h(k).nByteLength+8;if(J<24||ie<J||ie>1024)throw new Error(`hashToPrivateScalar: expected ${J}-1024 bytes of input, got ${ie}`);const Q=te?(0,e.bytesToNumberLE)(U):(0,e.bytesToNumberBE)(U);return u(Q,k-r)+r}function $(U){if(typeof U!="bigint")throw new Error("field order must be bigint");const k=U.toString(2).length;return Math.ceil(k/8)}function B(U){const k=$(U);return k+Math.ceil(k/2)}function V(U,k,te=!1){const ie=U.length,J=$(k),Q=B(k);if(ie<16||ie<Q||ie>1024)throw new Error(`expected ${Q}-1024 bytes of input, got ${ie}`);const K=te?(0,e.bytesToNumberBE)(U):(0,e.bytesToNumberLE)(U),q=u(K,k-r)+r;return te?(0,e.numberToBytesLE)(q,J):(0,e.numberToBytesBE)(q,J)}return Bt}var iR;function mG(){if(iR)return Oo;iR=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.wNAF=i,Oo.validateBasic=a;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=uf(),t=xs(),r=BigInt(0),n=BigInt(1);function i(s,o){const u=(c,d)=>{const f=d.negate();return c?f:d},l=c=>{const d=Math.ceil(o/c)+1,f=2**(c-1);return{windows:d,windowSize:f}};return{constTimeNegate:u,unsafeLadder(c,d){let f=s.ZERO,p=c;for(;d>r;)d&n&&(f=f.add(p)),p=p.double(),d>>=n;return f},precomputeWindow(c,d){const{windows:f,windowSize:p}=l(d),y=[];let g=c,T=g;for(let P=0;P<f;P++){T=g,y.push(T);for(let m=1;m<p;m++)T=T.add(g),y.push(T);g=T.double()}return y},wNAF(c,d,f){const{windows:p,windowSize:y}=l(c);let g=s.ZERO,T=s.BASE;const P=BigInt(2**c-1),m=2**c,w=BigInt(c);for(let I=0;I<p;I++){const h=I*y;let E=Number(f&P);f>>=w,E>y&&(E-=m,f+=n);const v=h,O=h+Math.abs(E)-1,C=I%2!==0,$=E<0;E===0?T=T.add(u(C,d[v])):g=g.add(u($,d[O]))}return{p:g,f:T}},wNAFCached(c,d,f,p){const y=c._WINDOW_SIZE||1;let g=d.get(c);return g||(g=this.precomputeWindow(c,y),y!==1&&d.set(c,p(g))),this.wNAF(y,g,f)}}}function a(s){return(0,e.validateField)(s.Fp),(0,t.validateObject)(s,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(s.n,s.nBitLength),...s,p:s.Fp.ORDER})}return Oo}var aR;function tD(){return aR||(aR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=p,e.weierstrass=g,e.SWUFpSqrtRatio=T,e.mapToCurveSimpleSWU=P;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=mG(),r=uf(),n=xs(),i=xs();function a(m){const w=(0,t.validateBasic)(m);n.validateObject(w,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:I,Fp:h,a:E}=w;if(I){if(!h.eql(E,h.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof I!="object"||typeof I.beta!="bigint"||typeof I.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...w})}const{bytesToNumberBE:s,hexToBytes:o}=n;e.DER={Err:class extends Error{constructor(w=""){super(w)}},_parseInt(m){const{Err:w}=e.DER;if(m.length<2||m[0]!==2)throw new w("Invalid signature integer tag");const I=m[1],h=m.subarray(2,I+2);if(!I||h.length!==I)throw new w("Invalid signature integer: wrong length");if(h[0]&128)throw new w("Invalid signature integer: negative");if(h[0]===0&&!(h[1]&128))throw new w("Invalid signature integer: unnecessary leading zero");return{d:s(h),l:m.subarray(I+2)}},toSig(m){const{Err:w}=e.DER,I=typeof m=="string"?o(m):m;n.abytes(I);let h=I.length;if(h<2||I[0]!=48)throw new w("Invalid signature tag");if(I[1]!==h-2)throw new w("Invalid signature: incorrect length");const{d:E,l:v}=e.DER._parseInt(I.subarray(2)),{d:O,l:C}=e.DER._parseInt(v);if(C.length)throw new w("Invalid signature: left bytes after parsing");return{r:E,s:O}},hexFromSig(m){const w=B=>Number.parseInt(B[0],16)&8?"00"+B:B,I=B=>{const V=B.toString(16);return V.length&1?`0${V}`:V},h=w(I(m.s)),E=w(I(m.r)),v=h.length/2,O=E.length/2,C=I(v),$=I(O);return`30${I(O+v+4)}02${$}${E}02${C}${h}`}};const u=BigInt(0),l=BigInt(1),c=BigInt(2),d=BigInt(3),f=BigInt(4);function p(m){const w=a(m),{Fp:I}=w,h=w.toBytes||((ie,J,Q)=>{const K=J.toAffine();return n.concatBytes(Uint8Array.from([4]),I.toBytes(K.x),I.toBytes(K.y))}),E=w.fromBytes||(ie=>{const J=ie.subarray(1),Q=I.fromBytes(J.subarray(0,I.BYTES)),K=I.fromBytes(J.subarray(I.BYTES,2*I.BYTES));return{x:Q,y:K}});function v(ie){const{a:J,b:Q}=w,K=I.sqr(ie),q=I.mul(K,ie);return I.add(I.add(q,I.mul(ie,J)),Q)}if(!I.eql(I.sqr(w.Gy),v(w.Gx)))throw new Error("bad generator point: equation left != right");function O(ie){return typeof ie=="bigint"&&u<ie&&ie<w.n}function C(ie){if(!O(ie))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function $(ie){const{allowedPrivateKeyLengths:J,nByteLength:Q,wrapPrivateKey:K,n:q}=w;if(J&&typeof ie!="bigint"){if(n.isBytes(ie)&&(ie=n.bytesToHex(ie)),typeof ie!="string"||!J.includes(ie.length))throw new Error("Invalid key");ie=ie.padStart(Q*2,"0")}let D;try{D=typeof ie=="bigint"?ie:n.bytesToNumberBE((0,i.ensureBytes)("private key",ie,Q))}catch{throw new Error(`private key must be ${Q} bytes, hex or bigint, not ${typeof ie}`)}return K&&(D=r.mod(D,q)),C(D),D}const B=new Map;function V(ie){if(!(ie instanceof U))throw new Error("ProjectivePoint expected")}class U{constructor(J,Q,K){if(this.px=J,this.py=Q,this.pz=K,J==null||!I.isValid(J))throw new Error("x required");if(Q==null||!I.isValid(Q))throw new Error("y required");if(K==null||!I.isValid(K))throw new Error("z required")}static fromAffine(J){const{x:Q,y:K}=J||{};if(!J||!I.isValid(Q)||!I.isValid(K))throw new Error("invalid affine point");if(J instanceof U)throw new Error("projective point not allowed");const q=D=>I.eql(D,I.ZERO);return q(Q)&&q(K)?U.ZERO:new U(Q,K,I.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(J){const Q=I.invertBatch(J.map(K=>K.pz));return J.map((K,q)=>K.toAffine(Q[q])).map(U.fromAffine)}static fromHex(J){const Q=U.fromAffine(E((0,i.ensureBytes)("pointHex",J)));return Q.assertValidity(),Q}static fromPrivateKey(J){return U.BASE.multiply($(J))}_setWindowSize(J){this._WINDOW_SIZE=J,B.delete(this)}assertValidity(){if(this.is0()){if(w.allowInfinityPoint&&!I.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:J,y:Q}=this.toAffine();if(!I.isValid(J)||!I.isValid(Q))throw new Error("bad point: x or y not FE");const K=I.sqr(Q),q=v(J);if(!I.eql(K,q))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:J}=this.toAffine();if(I.isOdd)return!I.isOdd(J);throw new Error("Field doesn't support isOdd")}equals(J){V(J);const{px:Q,py:K,pz:q}=this,{px:D,py:F,pz:W}=J,N=I.eql(I.mul(Q,W),I.mul(D,q)),L=I.eql(I.mul(K,W),I.mul(F,q));return N&&L}negate(){return new U(this.px,I.neg(this.py),this.pz)}double(){const{a:J,b:Q}=w,K=I.mul(Q,d),{px:q,py:D,pz:F}=this;let W=I.ZERO,N=I.ZERO,L=I.ZERO,ee=I.mul(q,q),Ee=I.mul(D,D),he=I.mul(F,F),be=I.mul(q,D);return be=I.add(be,be),L=I.mul(q,F),L=I.add(L,L),W=I.mul(J,L),N=I.mul(K,he),N=I.add(W,N),W=I.sub(Ee,N),N=I.add(Ee,N),N=I.mul(W,N),W=I.mul(be,W),L=I.mul(K,L),he=I.mul(J,he),be=I.sub(ee,he),be=I.mul(J,be),be=I.add(be,L),L=I.add(ee,ee),ee=I.add(L,ee),ee=I.add(ee,he),ee=I.mul(ee,be),N=I.add(N,ee),he=I.mul(D,F),he=I.add(he,he),ee=I.mul(he,be),W=I.sub(W,ee),L=I.mul(he,Ee),L=I.add(L,L),L=I.add(L,L),new U(W,N,L)}add(J){V(J);const{px:Q,py:K,pz:q}=this,{px:D,py:F,pz:W}=J;let N=I.ZERO,L=I.ZERO,ee=I.ZERO;const Ee=w.a,he=I.mul(w.b,d);let be=I.mul(Q,D),Ie=I.mul(K,F),ae=I.mul(q,W),ce=I.add(Q,K),fe=I.add(D,F);ce=I.mul(ce,fe),fe=I.add(be,Ie),ce=I.sub(ce,fe),fe=I.add(Q,q);let pe=I.add(D,W);return fe=I.mul(fe,pe),pe=I.add(be,ae),fe=I.sub(fe,pe),pe=I.add(K,q),N=I.add(F,W),pe=I.mul(pe,N),N=I.add(Ie,ae),pe=I.sub(pe,N),ee=I.mul(Ee,fe),N=I.mul(he,ae),ee=I.add(N,ee),N=I.sub(Ie,ee),ee=I.add(Ie,ee),L=I.mul(N,ee),Ie=I.add(be,be),Ie=I.add(Ie,be),ae=I.mul(Ee,ae),fe=I.mul(he,fe),Ie=I.add(Ie,ae),ae=I.sub(be,ae),ae=I.mul(Ee,ae),fe=I.add(fe,ae),be=I.mul(Ie,fe),L=I.add(L,be),be=I.mul(pe,fe),N=I.mul(ce,N),N=I.sub(N,be),be=I.mul(ce,Ie),ee=I.mul(pe,ee),ee=I.add(ee,be),new U(N,L,ee)}subtract(J){return this.add(J.negate())}is0(){return this.equals(U.ZERO)}wNAF(J){return te.wNAFCached(this,B,J,Q=>{const K=I.invertBatch(Q.map(q=>q.pz));return Q.map((q,D)=>q.toAffine(K[D])).map(U.fromAffine)})}multiplyUnsafe(J){const Q=U.ZERO;if(J===u)return Q;if(C(J),J===l)return this;const{endo:K}=w;if(!K)return te.unsafeLadder(this,J);let{k1neg:q,k1:D,k2neg:F,k2:W}=K.splitScalar(J),N=Q,L=Q,ee=this;for(;D>u||W>u;)D&l&&(N=N.add(ee)),W&l&&(L=L.add(ee)),ee=ee.double(),D>>=l,W>>=l;return q&&(N=N.negate()),F&&(L=L.negate()),L=new U(I.mul(L.px,K.beta),L.py,L.pz),N.add(L)}multiply(J){C(J);let Q=J,K,q;const{endo:D}=w;if(D){const{k1neg:F,k1:W,k2neg:N,k2:L}=D.splitScalar(Q);let{p:ee,f:Ee}=this.wNAF(W),{p:he,f:be}=this.wNAF(L);ee=te.constTimeNegate(F,ee),he=te.constTimeNegate(N,he),he=new U(I.mul(he.px,D.beta),he.py,he.pz),K=ee.add(he),q=Ee.add(be)}else{const{p:F,f:W}=this.wNAF(Q);K=F,q=W}return U.normalizeZ([K,q])[0]}multiplyAndAddUnsafe(J,Q,K){const q=U.BASE,D=(W,N)=>N===u||N===l||!W.equals(q)?W.multiplyUnsafe(N):W.multiply(N),F=D(this,Q).add(D(J,K));return F.is0()?void 0:F}toAffine(J){const{px:Q,py:K,pz:q}=this,D=this.is0();J==null&&(J=D?I.ONE:I.inv(q));const F=I.mul(Q,J),W=I.mul(K,J),N=I.mul(q,J);if(D)return{x:I.ZERO,y:I.ZERO};if(!I.eql(N,I.ONE))throw new Error("invZ was invalid");return{x:F,y:W}}isTorsionFree(){const{h:J,isTorsionFree:Q}=w;if(J===l)return!0;if(Q)return Q(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:J,clearCofactor:Q}=w;return J===l?this:Q?Q(U,this):this.multiplyUnsafe(w.h)}toRawBytes(J=!0){return this.assertValidity(),h(U,this,J)}toHex(J=!0){return n.bytesToHex(this.toRawBytes(J))}}U.BASE=new U(w.Gx,w.Gy,I.ONE),U.ZERO=new U(I.ZERO,I.ONE,I.ZERO);const k=w.nBitLength,te=(0,t.wNAF)(U,w.endo?Math.ceil(k/2):k);return{CURVE:w,ProjectivePoint:U,normPrivateKeyToScalar:$,weierstrassEquation:v,isWithinCurveOrder:O}}function y(m){const w=(0,t.validateBasic)(m);return n.validateObject(w,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...w})}function g(m){const w=y(m),{Fp:I,n:h}=w,E=I.BYTES+1,v=2*I.BYTES+1;function O(fe){return u<fe&&fe<I.ORDER}function C(fe){return r.mod(fe,h)}function $(fe){return r.invert(fe,h)}const{ProjectivePoint:B,normPrivateKeyToScalar:V,weierstrassEquation:U,isWithinCurveOrder:k}=p({...w,toBytes(fe,pe,ve){const Ae=pe.toAffine(),ke=I.toBytes(Ae.x),We=n.concatBytes;return ve?We(Uint8Array.from([pe.hasEvenY()?2:3]),ke):We(Uint8Array.from([4]),ke,I.toBytes(Ae.y))},fromBytes(fe){const pe=fe.length,ve=fe[0],Ae=fe.subarray(1);if(pe===E&&(ve===2||ve===3)){const ke=n.bytesToNumberBE(Ae);if(!O(ke))throw new Error("Point is not on curve");const We=U(ke);let et;try{et=I.sqrt(We)}catch(Ft){const It=Ft instanceof Error?": "+Ft.message:"";throw new Error("Point is not on curve"+It)}const Xe=(et&l)===l;return(ve&1)===1!==Xe&&(et=I.neg(et)),{x:ke,y:et}}else if(pe===v&&ve===4){const ke=I.fromBytes(Ae.subarray(0,I.BYTES)),We=I.fromBytes(Ae.subarray(I.BYTES,2*I.BYTES));return{x:ke,y:We}}else throw new Error(`Point of length ${pe} was invalid. Expected ${E} compressed bytes or ${v} uncompressed bytes`)}}),te=fe=>n.bytesToHex(n.numberToBytesBE(fe,w.nByteLength));function ie(fe){const pe=h>>l;return fe>pe}function J(fe){return ie(fe)?C(-fe):fe}const Q=(fe,pe,ve)=>n.bytesToNumberBE(fe.slice(pe,ve));class K{constructor(pe,ve,Ae){this.r=pe,this.s=ve,this.recovery=Ae,this.assertValidity()}static fromCompact(pe){const ve=w.nByteLength;return pe=(0,i.ensureBytes)("compactSignature",pe,ve*2),new K(Q(pe,0,ve),Q(pe,ve,2*ve))}static fromDER(pe){const{r:ve,s:Ae}=e.DER.toSig((0,i.ensureBytes)("DER",pe));return new K(ve,Ae)}assertValidity(){if(!k(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!k(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(pe){return new K(this.r,this.s,pe)}recoverPublicKey(pe){const{r:ve,s:Ae,recovery:ke}=this,We=L((0,i.ensureBytes)("msgHash",pe));if(ke==null||![0,1,2,3].includes(ke))throw new Error("recovery id invalid");const et=ke===2||ke===3?ve+w.n:ve;if(et>=I.ORDER)throw new Error("recovery id 2 or 3 invalid");const Xe=(ke&1)===0?"02":"03",ut=B.fromHex(Xe+te(et)),Ft=$(et),It=C(-We*Ft),tr=C(Ae*Ft),wt=B.BASE.multiplyAndAddUnsafe(ut,It,tr);if(!wt)throw new Error("point at infinify");return wt.assertValidity(),wt}hasHighS(){return ie(this.s)}normalizeS(){return this.hasHighS()?new K(this.r,C(-this.s),this.recovery):this}toDERRawBytes(){return n.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return n.hexToBytes(this.toCompactHex())}toCompactHex(){return te(this.r)+te(this.s)}}const q={isValidPrivateKey(fe){try{return V(fe),!0}catch{return!1}},normPrivateKeyToScalar:V,randomPrivateKey:()=>{const fe=r.getMinHashLength(w.n);return r.mapHashToField(w.randomBytes(fe),w.n)},precompute(fe=8,pe=B.BASE){return pe._setWindowSize(fe),pe.multiply(BigInt(3)),pe}};function D(fe,pe=!0){return B.fromPrivateKey(fe).toRawBytes(pe)}function F(fe){const pe=n.isBytes(fe),ve=typeof fe=="string",Ae=(pe||ve)&&fe.length;return pe?Ae===E||Ae===v:ve?Ae===2*E||Ae===2*v:fe instanceof B}function W(fe,pe,ve=!0){if(F(fe))throw new Error("first arg must be private key");if(!F(pe))throw new Error("second arg must be public key");return B.fromHex(pe).multiply(V(fe)).toRawBytes(ve)}const N=w.bits2int||function(fe){const pe=n.bytesToNumberBE(fe),ve=fe.length*8-w.nBitLength;return ve>0?pe>>BigInt(ve):pe},L=w.bits2int_modN||function(fe){return C(N(fe))},ee=n.bitMask(w.nBitLength);function Ee(fe){if(typeof fe!="bigint")throw new Error("bigint expected");if(!(u<=fe&&fe<ee))throw new Error(`bigint expected < 2^${w.nBitLength}`);return n.numberToBytesBE(fe,w.nByteLength)}function he(fe,pe,ve=be){if(["recovered","canonical"].some(hr=>hr in ve))throw new Error("sign() legacy options not supported");const{hash:Ae,randomBytes:ke}=w;let{lowS:We,prehash:et,extraEntropy:Xe}=ve;We==null&&(We=!0),fe=(0,i.ensureBytes)("msgHash",fe),et&&(fe=(0,i.ensureBytes)("prehashed msgHash",Ae(fe)));const ut=L(fe),Ft=V(pe),It=[Ee(Ft),Ee(ut)];if(Xe!=null&&Xe!==!1){const hr=Xe===!0?ke(I.BYTES):Xe;It.push((0,i.ensureBytes)("extraEntropy",hr))}const tr=n.concatBytes(...It),wt=ut;function mr(hr){const ht=N(hr);if(!k(ht))return;const Ur=$(ht),j=B.BASE.multiply(ht).toAffine(),S=C(j.x);if(S===u)return;const A=C(Ur*C(wt+S*Ft));if(A===u)return;let Y=(j.x===S?0:2)|Number(j.y&l),de=A;return We&&ie(A)&&(de=J(A),Y^=1),new K(S,de,Y)}return{seed:tr,k2sig:mr}}const be={lowS:w.lowS,prehash:!1},Ie={lowS:w.lowS,prehash:!1};function ae(fe,pe,ve=be){const{seed:Ae,k2sig:ke}=he(fe,pe,ve),We=w;return n.createHmacDrbg(We.hash.outputLen,We.nByteLength,We.hmac)(Ae,ke)}B.BASE._setWindowSize(8);function ce(fe,pe,ve,Ae=Ie){var j;const ke=fe;if(pe=(0,i.ensureBytes)("msgHash",pe),ve=(0,i.ensureBytes)("publicKey",ve),"strict"in Ae)throw new Error("options.strict was renamed to lowS");const{lowS:We,prehash:et}=Ae;let Xe,ut;try{if(typeof ke=="string"||n.isBytes(ke))try{Xe=K.fromDER(ke)}catch(S){if(!(S instanceof e.DER.Err))throw S;Xe=K.fromCompact(ke)}else if(typeof ke=="object"&&typeof ke.r=="bigint"&&typeof ke.s=="bigint"){const{r:S,s:A}=ke;Xe=new K(S,A)}else throw new Error("PARSE");ut=B.fromHex(ve)}catch(S){if(S.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(We&&Xe.hasHighS())return!1;et&&(pe=w.hash(pe));const{r:Ft,s:It}=Xe,tr=L(pe),wt=$(It),mr=C(tr*wt),hr=C(Ft*wt),ht=(j=B.BASE.multiplyAndAddUnsafe(ut,mr,hr))==null?void 0:j.toAffine();return ht?C(ht.x)===Ft:!1}return{CURVE:w,getPublicKey:D,getSharedSecret:W,sign:ae,verify:ce,ProjectivePoint:B,Signature:K,utils:q}}function T(m,w){const I=m.ORDER;let h=u;for(let ie=I-l;ie%c===u;ie/=c)h+=l;const E=h,v=c<<E-l-l,O=v*c,C=(I-l)/O,$=(C-l)/c,B=O-l,V=v,U=m.pow(w,C),k=m.pow(w,(C+l)/c);let te=(ie,J)=>{let Q=U,K=m.pow(J,B),q=m.sqr(K);q=m.mul(q,J);let D=m.mul(ie,q);D=m.pow(D,$),D=m.mul(D,K),K=m.mul(D,J),q=m.mul(D,ie);let F=m.mul(q,K);D=m.pow(F,V);let W=m.eql(D,m.ONE);K=m.mul(q,k),D=m.mul(F,Q),q=m.cmov(K,q,W),F=m.cmov(D,F,W);for(let N=E;N>l;N--){let L=N-c;L=c<<L-l;let ee=m.pow(F,L);const Ee=m.eql(ee,m.ONE);K=m.mul(q,Q),Q=m.mul(Q,Q),ee=m.mul(F,Q),q=m.cmov(K,q,Ee),F=m.cmov(ee,F,Ee)}return{isValid:W,value:q}};if(m.ORDER%f===d){const ie=(m.ORDER-d)/f,J=m.sqrt(m.neg(w));te=(Q,K)=>{let q=m.sqr(K);const D=m.mul(Q,K);q=m.mul(q,D);let F=m.pow(q,ie);F=m.mul(F,D);const W=m.mul(F,J),N=m.mul(m.sqr(F),K),L=m.eql(N,Q);let ee=m.cmov(W,F,L);return{isValid:L,value:ee}}}return te}function P(m,w){if(r.validateField(m),!m.isValid(w.A)||!m.isValid(w.B)||!m.isValid(w.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const I=T(m,w.Z);if(!m.isOdd)throw new Error("Fp.isOdd is not implemented!");return h=>{let E,v,O,C,$,B,V,U;E=m.sqr(h),E=m.mul(E,w.Z),v=m.sqr(E),v=m.add(v,E),O=m.add(v,m.ONE),O=m.mul(O,w.B),C=m.cmov(w.Z,m.neg(v),!m.eql(v,m.ZERO)),C=m.mul(C,w.A),v=m.sqr(O),B=m.sqr(C),$=m.mul(B,w.A),v=m.add(v,$),v=m.mul(v,O),B=m.mul(B,C),$=m.mul(B,w.B),v=m.add(v,$),V=m.mul(E,O);const{isValid:k,value:te}=I(v,B);U=m.mul(E,h),U=m.mul(U,te),V=m.cmov(V,O,k),U=m.cmov(U,te,k);const ie=m.isOdd(h)===m.isOdd(U);return U=m.cmov(m.neg(U),U,ie),V=m.div(V,C),{x:V,y:U}}}})(Eh)),Eh}var sR;function hG(){if(sR)return Ao;sR=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.getHash=n,Ao.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=pG(),t=Wu(),r=tD();function n(a){return{hash:a,hmac:(s,...o)=>(0,e.hmac)(a,s,(0,t.concatBytes)(...o)),randomBytes:t.randomBytes}}function i(a,s){const o=u=>(0,r.weierstrass)({...a,...n(u)});return Object.freeze({...o(s),create:o})}return Ao}var Ei={},oR;function yG(){if(oR)return Ei;oR=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.expand_message_xmd=s,Ei.expand_message_xof=o,Ei.hash_to_field=u,Ei.isogenyMap=l,Ei.createHasher=c;const e=uf(),t=xs(),r=t.bytesToNumberBE;function n(d,f){if(d<0||d>=1<<8*f)throw new Error(`bad I2OSP call: value=${d} length=${f}`);const p=Array.from({length:f}).fill(0);for(let y=f-1;y>=0;y--)p[y]=d&255,d>>>=8;return new Uint8Array(p)}function i(d,f){const p=new Uint8Array(d.length);for(let y=0;y<d.length;y++)p[y]=d[y]^f[y];return p}function a(d){if(!Number.isSafeInteger(d))throw new Error("number expected")}function s(d,f,p,y){(0,t.abytes)(d),(0,t.abytes)(f),a(p),f.length>255&&(f=y((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),f)));const{outputLen:g,blockLen:T}=y,P=Math.ceil(p/g);if(P>255)throw new Error("Invalid xmd length");const m=(0,t.concatBytes)(f,n(f.length,1)),w=n(0,T),I=n(p,2),h=new Array(P),E=y((0,t.concatBytes)(w,d,I,n(0,1),m));h[0]=y((0,t.concatBytes)(E,n(1,1),m));for(let O=1;O<=P;O++){const C=[i(E,h[O-1]),n(O+1,1),m];h[O]=y((0,t.concatBytes)(...C))}return(0,t.concatBytes)(...h).slice(0,p)}function o(d,f,p,y,g){if((0,t.abytes)(d),(0,t.abytes)(f),a(p),f.length>255){const T=Math.ceil(2*y/8);f=g.create({dkLen:T}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(f).digest()}if(p>65535||f.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return g.create({dkLen:p}).update(d).update(n(p,2)).update(f).update(n(f.length,1)).digest()}function u(d,f,p){(0,t.validateObject)(p,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:y,k:g,m:T,hash:P,expand:m,DST:w}=p;(0,t.abytes)(d),a(f);const I=typeof w=="string"?(0,t.utf8ToBytes)(w):w,h=y.toString(2).length,E=Math.ceil((h+g)/8),v=f*T*E;let O;if(m==="xmd")O=s(d,I,v,P);else if(m==="xof")O=o(d,I,v,g,P);else if(m==="_internal_pass")O=d;else throw new Error('expand must be "xmd" or "xof"');const C=new Array(f);for(let $=0;$<f;$++){const B=new Array(T);for(let V=0;V<T;V++){const U=E*(V+$*T),k=O.subarray(U,U+E);B[V]=(0,e.mod)(r(k),y)}C[$]=B}return C}function l(d,f){const p=f.map(y=>Array.from(y).reverse());return(y,g)=>{const[T,P,m,w]=p.map(I=>I.reduce((h,E)=>d.add(d.mul(h,y),E)));return y=d.div(T,P),g=d.mul(g,d.div(m,w)),{x:y,y:g}}}function c(d,f,p){if(typeof f!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(y,g){const T=u(y,2,{...p,DST:p.DST,...g}),P=d.fromAffine(f(T[0])),m=d.fromAffine(f(T[1])),w=P.add(m).clearCofactor();return w.assertValidity(),w},encodeToCurve(y,g){const T=u(y,1,{...p,DST:p.encodeDST,...g}),P=d.fromAffine(f(T[0])).clearCofactor();return P.assertValidity(),P},mapToCurve(y){if(!Array.isArray(y))throw new Error("mapToCurve: expected array of bigints");for(const T of y)if(typeof T!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${T} in array`);const g=d.fromAffine(f(y)).clearCofactor();return g.assertValidity(),g}}}return Ei}var uR;function gG(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=fG(),r=Wu(),n=hG(),i=yG(),a=uf(),s=xs(),o=tD(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),c=BigInt(1),d=BigInt(2),f=(K,q)=>(K+q/d)/q;function p(K){const q=u,D=BigInt(3),F=BigInt(6),W=BigInt(11),N=BigInt(22),L=BigInt(23),ee=BigInt(44),Ee=BigInt(88),he=K*K*K%q,be=he*he*K%q,Ie=(0,a.pow2)(be,D,q)*be%q,ae=(0,a.pow2)(Ie,D,q)*be%q,ce=(0,a.pow2)(ae,d,q)*he%q,fe=(0,a.pow2)(ce,W,q)*ce%q,pe=(0,a.pow2)(fe,N,q)*fe%q,ve=(0,a.pow2)(pe,ee,q)*pe%q,Ae=(0,a.pow2)(ve,Ee,q)*ve%q,ke=(0,a.pow2)(Ae,ee,q)*pe%q,We=(0,a.pow2)(ke,D,q)*be%q,et=(0,a.pow2)(We,L,q)*fe%q,Xe=(0,a.pow2)(et,F,q)*he%q,ut=(0,a.pow2)(Xe,d,q);if(!y.eql(y.sqr(ut),K))throw new Error("Cannot find square root");return ut}const y=(0,a.Field)(u,void 0,void 0,{sqrt:p});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:K=>{const q=l,D=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),F=-c*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),W=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),N=D,L=BigInt("0x100000000000000000000000000000000"),ee=f(N*K,q),Ee=f(-F*K,q);let he=(0,a.mod)(K-ee*D-Ee*W,q),be=(0,a.mod)(-ee*F-Ee*N,q);const Ie=he>L,ae=be>L;if(Ie&&(he=q-he),ae&&(be=q-be),he>L||be>L)throw new Error("splitScalar: Endomorphism failed, k="+K);return{k1neg:Ie,k1:he,k2neg:ae,k2:be}}}},t.sha256);const g=BigInt(0),T=K=>typeof K=="bigint"&&g<K&&K<u,P=K=>typeof K=="bigint"&&g<K&&K<l,m={};function w(K,...q){let D=m[K];if(D===void 0){const F=(0,t.sha256)(Uint8Array.from(K,W=>W.charCodeAt(0)));D=(0,s.concatBytes)(F,F),m[K]=D}return(0,t.sha256)((0,s.concatBytes)(D,...q))}const I=K=>K.toRawBytes(!0).slice(1),h=K=>(0,s.numberToBytesBE)(K,32),E=K=>(0,a.mod)(K,u),v=K=>(0,a.mod)(K,l),O=e.secp256k1.ProjectivePoint,C=(K,q,D)=>O.BASE.multiplyAndAddUnsafe(K,q,D);function $(K){let q=e.secp256k1.utils.normPrivateKeyToScalar(K),D=O.fromPrivateKey(q);return{scalar:D.hasEvenY()?q:v(-q),bytes:I(D)}}function B(K){if(!T(K))throw new Error("bad x: need 0 < x < p");const q=E(K*K),D=E(q*K+BigInt(7));let F=p(D);F%d!==g&&(F=E(-F));const W=new O(K,F,c);return W.assertValidity(),W}function V(...K){return v((0,s.bytesToNumberBE)(w("BIP0340/challenge",...K)))}function U(K){return $(K).bytes}function k(K,q,D=(0,r.randomBytes)(32)){const F=(0,s.ensureBytes)("message",K),{bytes:W,scalar:N}=$(q),L=(0,s.ensureBytes)("auxRand",D,32),ee=h(N^(0,s.bytesToNumberBE)(w("BIP0340/aux",L))),Ee=w("BIP0340/nonce",ee,W,F),he=v((0,s.bytesToNumberBE)(Ee));if(he===g)throw new Error("sign failed: k is zero");const{bytes:be,scalar:Ie}=$(he),ae=V(be,W,F),ce=new Uint8Array(64);if(ce.set(be,0),ce.set(h(v(Ie+ae*N)),32),!te(ce,F,W))throw new Error("sign: Invalid signature produced");return ce}function te(K,q,D){const F=(0,s.ensureBytes)("signature",K,64),W=(0,s.ensureBytes)("message",q),N=(0,s.ensureBytes)("publicKey",D,32);try{const L=B((0,s.bytesToNumberBE)(N)),ee=(0,s.bytesToNumberBE)(F.subarray(0,32));if(!T(ee))return!1;const Ee=(0,s.bytesToNumberBE)(F.subarray(32,64));if(!P(Ee))return!1;const he=V(h(ee),I(L),W),be=C(L,Ee,v(-he));return!(!be||!be.hasEvenY()||be.toAffine().x!==ee)}catch{return!1}}e.schnorr={getPublicKey:U,sign:k,verify:te,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:B,pointToBytes:I,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:w,mod:a.mod}};const ie=(0,i.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(K=>K.map(q=>BigInt(q)))),J=(0,o.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}),Q=(0,i.createHasher)(e.secp256k1.ProjectivePoint,K=>{const{x:q,y:D}=J(y.create(K[0]));return ie(q,D)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=Q.hashToCurve,e.encodeToCurve=Q.encodeToCurve})(yh)),yh}var cR;function _G(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=gG();Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(hh)),hh}var lR;function EG(){if(lR)return Nn;lR=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.recoverPublicKey=r,Nn.recoverAddressFromEthSignature=i,Nn.sign=a,Nn.createEthereumMessageHash=s,Nn.ethSign=o,Nn.computeAddress=u,Nn.createUnsafeIdentity=l;const e=of(),t=_G();function r(c,d){if(c.length!==65)throw new Error("Invalid signature length "+c.length);const f=c[64];if(f!==27&&f!==28)throw new Error(`Invalid signature recovery value: ${f}. Expected 27 or 28.`);const p=c.slice(0,c.length-1),y=f===28?1:0;return t.secp256k1.Signature.fromCompact(p).addRecoveryBit(y).recoverPublicKey(d).toRawBytes(!1).slice(1)}function n(c){if(c.length!==65)throw new Error("Invalid ethereum signature");const d=c[64];if(d===0||d===1){const f=new Uint8Array(c);return f[64]=d+27,f}return c}function i(c,d){if(typeof c=="string"){if((0,e.isHex)(c))return i((0,e.hexToBytes)(c),d);throw new Error("String signatures must be encoded in hex")}return u(r(n(c),s(d)))}function a(c,d){const f=t.secp256k1.sign(d,c),p=f.recovery===1?"1c":"1b";return"0x"+f.toCompactHex()+p}function s(c){const d=typeof c=="string"?(0,e.stringToUtf8Bytes)(c):c,f=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
70
|
+
`),(0,e.stringToUtf8Bytes)(String(d.length)),d);return(0,e.hexToBytes)((0,e.sha3)(f))}function o(c,d){return a(c,s(d))}function u(c){let d;if(c.length===65&&c[0]===4)d=c.slice(1);else if(c.length===64)d=c;else throw new Error(`Invalid public key length: ${c.length}. Expected 64 bytes, or 65 bytes with a leading 0x04 uncompressed prefix.`);return(0,e.getAddress)((0,e.sha3)(d).substring(24))}function l(){const c=t.secp256k1.utils.randomPrivateKey(),d=t.secp256k1.getPublicKey(c,!1).slice(1),f=u(d);return{privateKey:(0,e.bytesToHex)(c),publicKey:(0,e.bytesToHex)(d),address:f}}return Nn}var td={},dR;function vG(){if(dR)return td;dR=1,Object.defineProperty(td,"__esModule",{value:!0});const e=of();class t{constructor(n,i=!0){gi(this,"requestManager");gi(this,"checkedBlocks");gi(this,"saveBlocks");gi(this,"savedBlocks");gi(this,"requests");gi(this,"blockTime");gi(this,"firstTimestamp");this.requestManager=n,this.checkedBlocks={},this.saveBlocks=i,this.savedBlocks={},this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),i=await this.getBlockWrapper(1);return this.blockTime=(n.timestamp-i.timestamp)/(Number(n.number)-1),this.firstTimestamp=i.timestamp,{blockTime:this.blockTime,firstTimestamp:this.firstTimestamp}}async getDate(n,i=!0){const a=n/1e3,s=Date.now()/1e3;let o=this.firstTimestamp,u=this.blockTime;if((o===void 0||u===void 0)&&({firstTimestamp:o,blockTime:u}=await this.fillBlockTime()),a<o)return{block:1,timestamp:a};const l=this.savedBlocks.latest;if(a>=s||l&&a>l.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:a};this.checkedBlocks[a]=[];const c=await this.getBlockWrapper(Math.ceil((a-o)/u));return{block:await this.findBetter(a,c,i,u),timestamp:a}}async findBetter(n,i,a,s){let o=s??this.blockTime??(await this.fillBlockTime()).blockTime;if(await this.isBetterBlock(n,i,a))return i.number;const u=n-i.timestamp;let l=Math.ceil(u/o);l===0&&(l=u<0?-1:1);const c=await this.getBlockWrapper(this.getNextBlock(n,i.number,l));return o=Math.abs((i.timestamp-c.timestamp)/(i.number-c.number)),this.findBetter(n,c,a,o)}async isBetterBlock(n,i,a){const s=i.timestamp;if(a){if(s<n)return!1;const o=await this.getBlockWrapper(i.number-1);if(s>=n&&o.timestamp<n)return!0}else{if(s>=n)return!1;const o=await this.getBlockWrapper(i.number+1);if(s<n&&o.timestamp>=n)return!0}return!1}getNextBlock(n,i,a){const s=i+a;if(this.checkedBlocks[n].includes(s)){const o=a<0?a+1:a-1;if(o===0)throw new Error(`Could not find an unchecked block for timestamp ${n}`);return this.getNextBlock(n,i,o)}return this.checkedBlocks[n].push(s),s}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}const i=n.toString();if(this.savedBlocks[i])return this.savedBlocks[i];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:a}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[i]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(a).toNumber()},this.requests++,this.savedBlocks[i]}}return td.default=t,td}var rd={},fR;function bG(){if(fR)return rd;fR=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.moveMinutes=e;function e(t){const r=new Date;return r.setMinutes(r.getMinutes()+t),r}return rd}var vh={},cn={},sa={},oa={},bh={},ln={},pR;function Ne(){if(pR)return ln;pR=1;var e=ln&&ln.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ln,"__esModule",{value:!0}),ln.validateType=ln.generateLazyValidator=ln.Ajv=void 0;const t=e(Rv());ln.Ajv=t.default;const r=e(Aj()),n=e(Oj());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const f=new t.default({$data:!0,allErrors:!0});(0,r.default)(f),(0,n.default)(f,{singleError:!0}),o==null||o.forEach(p=>f.addKeyword(p)),u=f.compile(s),Object.defineProperty(l,"errors",{get(){return u==null?void 0:u.errors}})}return u(c,d)};return l}ln.generateLazyValidator=i;function a(s,o){return s.validate(o)}return ln.validateType=a,ln}var mR;function SG(){return mR||(mR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Ne();e.SCENE_UPDATE="SCENE_UPDATE",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(bh)),bh}var Sh={},hR;function TG(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Ne();e.UPDATE="update",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Update||(e.Update={}))})(Sh)),Sh}var yR;function IG(){return yR||(yR=1,(function(e){var t=oa&&oa.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=oa&&oa.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(SG(),e),r(TG(),e)})(oa)),oa}var ua={},Th={},gR;function wG(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Ne();(function(r){r.SCENE="scene",r.SMART_ITEM="smart-item",r.PORTABLE_EXPERIENCE="portable-experience",r.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProjectType||(e.ProjectType={}))})(Th)),Th}var Ih={},wh={},_R;function cf(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Ne();(function(r){r.UNIQUE="unique",r.MYTHIC="mythic",r.EXOTIC="exotic",r.LEGENDARY="legendary",r.EPIC="epic",r.RARE="rare",r.UNCOMMON="uncommon",r.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema);const n={[r.UNIQUE]:1,[r.MYTHIC]:10,[r.EXOTIC]:50,[r.LEGENDARY]:100,[r.EPIC]:1e3,[r.RARE]:5e3,[r.UNCOMMON]:1e4,[r.COMMON]:1e5},i={[r.UNIQUE]:"#FFE617",[r.MYTHIC]:"#FB7DE3",[r.EXOTIC]:"#E4FFB8",[r.LEGENDARY]:"#A657ED",[r.EPIC]:"#6397F2",[r.RARE]:"#3AD682",[r.UNCOMMON]:"#FF8563",[r.COMMON]:"#D4E0E0"},a={[r.UNIQUE]:"#FFB626",[r.MYTHIC]:"#FF63E1",[r.EXOTIC]:"#CAFF73",[r.LEGENDARY]:"#842DDA",[r.EPIC]:"#3D85E6",[r.RARE]:"#36CF75",[r.UNCOMMON]:"#ED6D4F",[r.COMMON]:"#ABC1C1"};function s(c){return n[c]}r.getMaxSupply=s;function o(c){return a[c]}r.getColor=o;function u(){return[r.UNIQUE,r.MYTHIC,r.EXOTIC,r.LEGENDARY,r.EPIC,r.RARE,r.UNCOMMON,r.COMMON]}r.getRarities=u;function l(c){return[i[c],a[c]]}r.getGradient=l})(e.Rarity||(e.Rarity={}))})(wh)),wh}var Rh={},ER;function Ja(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Ne();(function(r){r.EYEBROWS="eyebrows",r.EYES="eyes",r.FACIAL_HAIR="facial_hair",r.HAIR="hair",r.BODY_SHAPE="body_shape",r.MOUTH="mouth",r.UPPER_BODY="upper_body",r.LOWER_BODY="lower_body",r.FEET="feet",r.EARRING="earring",r.EYEWEAR="eyewear",r.HAT="hat",r.HELMET="helmet",r.MASK="mask",r.TIARA="tiara",r.TOP_HEAD="top_head",r.SKIN="skin",r.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Rh)),Rh}var Ah={},Oh={},vR;function kv(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Ne();(function(r){r.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",r.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyShape||(e.BodyShape={}))})(Oh)),Oh}var Ph={},Nh={},bR;function rD(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Ne();(function(r){r.HEAD="head",r.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Nh)),Nh}var SR;function Bv(){return SR||(SR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=Ja(),r=Ne(),n=rD();(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Ph)),Ph}var TR;function Uv(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Ne(),r=kv(),n=Bv();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Ah)),Ah}var ca={},la={},Ch={},Mh={},IR;function Qa(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Ne();(function(r){r.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,t.generateLazyValidator)(r.schema);r.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(r){r.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(r){r.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(r){r.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(Mh)),Mh}var wR;function nD(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=Ja(),r=Qa(),n=Ne();var i;(function(u){u.schema={type:"object",required:["face256","body"],properties:{face256:r.IPFSv2.schema,body:r.IPFSv2.schema}},u.validate=(0,n.generateLazyValidator)(u.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(u){u.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(u){u.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const l=new RegExp(u.schema.pattern,"i");u.validate=c=>l.test(c)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(u){u.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),(function(u){u.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},r.Color3.schema),{nullable:!0}),description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:r.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(e.Avatar||(e.Avatar={}))})(Ch)),Ch}var jh={},RR;function RG(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Ne(),r=nD();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:r.Avatar.schema}},additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(jh)),jh}var AR;function AG(){return AR||(AR=1,(function(e){var t=la&&la.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=la&&la.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(nD(),e),r(RG(),e)})(la)),la}var Dh={},Lh={},OR;function iD(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Ne();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(r){r.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Lh)),Lh}var $h={},PR;function aD(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})($h)),$h}var qh={},NR;function sD(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Ne();(function(r){r.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},r.schemaValidator=(0,t.generateLazyValidator)(r.schema),r.validate=n=>r.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(qh)),qh}var kh={},Po={},CR;function Fv(){return CR||(CR=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.displayableProperties=void 0,Po.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Po}var Bh={},MR;function oD(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Source||(e.Source={}))})(Bh)),Bh}var Uh={},jR;function uD(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Uh)),Uh}var DR;function OG(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Ne(),r=Fv(),n=iD(),i=sD(),a=oD(),s=uD(),o=aD();var u;(function(l){l.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",l.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",l.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",l.USE_WEB3_API="USE_WEB3_API",l.USE_FETCH="USE_FETCH",l.USE_WEBSOCKET="USE_WEBSOCKET",l.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(u=e.RequiredPermission||(e.RequiredPermission={})),(function(l){l.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},r.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(u)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:u.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},l.validate=(0,t.generateLazyValidator)(l.schema)})(e.Scene||(e.Scene={}))})(kh)),kh}var LR;function PG(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=iD();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=aD();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=sD();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=OG();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=oD();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=uD();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(Dh)),Dh}var da={},Fh={},Hh={},$R;function cD(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Ne();(function(r){r.EN="en",r.ES="es"})(e.Locale||(e.Locale={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Locale||(e.Locale={}))})(Hh)),Hh}var qR;function lD(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Ne(),r=cD();(function(n){n.schema={type:"object",properties:{code:r.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Fh)),Fh}var Vh={},kR;function dD(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Metrics||(e.Metrics={}))})(Vh)),Vh}var Gh={},BR;function Hv(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=cf(),r=Ne();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,r.generateLazyValidator)(n);function a(s){return i(s)}e.isStandard=a})(Gh)),Gh}var xh={},fa={},zh={},UR;function NG(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MerkleProof||(e.MerkleProof={}))})(zh)),zh}var FR;function fD(){return FR||(FR=1,(function(e){var t=fa&&fa.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=fa&&fa.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(NG(),e)})(fa)),fa}var Wh={},HR;function Vv(){return HR||(HR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=Ne();var r;(function(d){d.SINGLE="single",d.ANY="any",d.MULTIPLE="multiple",d.RANGE="range"})(r=e.MappingType||(e.MappingType={}));var n;(function(d){d.MAINNET="mainnet",d.BASE_MAINNET="base_mainnet",d.BASE_SEPOLIA="base_sepolia",d.MONAD_MAINNET="monad_mainnet",d.MONAD_TESTNET="monad_testnet",d.APE_MAINNET="ape_mainnet",d.APE_CALDERA="ape_caldera",d.MATIC="matic",d.SEPOLIA="sepolia",d.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.ANY}},required:["type"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(d){d._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(p,y){if(!y||!y.from||!y.to)return!1;let{to:g,from:T}=y;return(typeof T!="bigint"||typeof g!="bigint")&&(T=BigInt(T),g=BigInt(g)),T<=g},errors:!1},d.schema={type:"object",properties:{type:{type:"string",const:r.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[d._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var u;(function(d){d.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo])})(u=e.Mapping||(e.Mapping={})),(function(d){d._isMappingsValid={keyword:"_isMappingsValid",validate:function(p,y){try{c(y)}catch{return!1}return!0},errors:!1},d.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:u.schema}},minProperties:1,required:[],additionalProperties:!1};const f=Object.values(n).reduce((p,y)=>(p[y]=d.innerSchema,p),{});d.schema={type:"object",properties:f,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo,d._isMappingsValid])})(e.Mappings||(e.Mappings={}));class l extends Error{constructor(f,p,y){super(f),this.existingMapping=p,this.conflictingMapping=y}}e.AddMappingError=l;function c(d={}){const f={};for(const[h,E]of Object.entries(d)){f[h]={};for(const[v,O]of Object.entries(E))for(const C of O)w(h,v,C)}function p(){return JSON.parse(JSON.stringify(f))}function y(h,E,v){const O=BigInt(h);return O>=BigInt(E)&&O<=BigInt(v)}function g(h,E){switch(E.type){case r.SINGLE:return h.id===E.id;case r.MULTIPLE:return E.ids.includes(h.id);case r.RANGE:return y(h.id,E.from,E.to);default:return!1}}function T(h,E){switch(E.type){case r.SINGLE:return h.ids.includes(E.id);case r.MULTIPLE:return h.ids.some(v=>E.ids.includes(v));case r.RANGE:return h.ids.some(v=>y(v,E.from,E.to));default:return!1}}function P(h,E){switch(E.type){case r.SINGLE:return y(E.id,h.from,h.to);case r.MULTIPLE:return E.ids.some(v=>y(v,h.from,h.to));case r.RANGE:return BigInt(h.from)<=BigInt(E.to)&&BigInt(h.to)>=BigInt(E.from)}}function m(h,E){if(h.type===r.ANY||E.type===r.ANY)return!0;switch(h.type){case r.SINGLE:return g(h,E);case r.MULTIPLE:return T(h,E);case r.RANGE:return P(h,E)}}function w(h,E,v){var O,C;const $=E.toLowerCase();f[h]=(O=f[h])!==null&&O!==void 0?O:{},f[h][$]=(C=f[h][$])!==null&&C!==void 0?C:[];for(const B of f[h][$])if(m(B,v))throw new l(`Cannot add mapping to contract ${$} on network ${h} because it overlaps with existing mapping`,B,v);f[h][$].push(v)}function I(h,E,v){var O;return!((O=f[h])===null||O===void 0)&&O[E]?f[h][E].some(C=>{switch(C.type){case r.SINGLE:return C.id===v;case r.ANY:return!0;case r.MULTIPLE:return C.ids.includes(v);case r.RANGE:return BigInt(v)>=BigInt(C.from)&&BigInt(v)<=BigInt(C.to)}}):!1}return{addMapping:w,getMappings:p,includesNft:I}}e.createMappingsHelper=c})(Wh)),Wh}var VR;function Gv(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Ne(),r=fD(),n=Vv();e.schema={type:"object",properties:{merkleProof:r.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(o,u){var l;const c=u;return!((l=c==null?void 0:c.merkleProof)===null||l===void 0)&&l.hashingKeys?c.merkleProof.hashingKeys.every(d=>c.hasOwnProperty(d)):!1},errors:!1},a=(0,t.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(xh)),xh}var Yh={},Kh={},dn={},GR;function pD(){if(GR)return dn;GR=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.isBaseEmote=dn.isBaseAvatar=dn.requiredBaseItemProps=dn.baseItemProperties=void 0;const e=lD(),t=dD(),r=Fv();dn.baseItemProperties=Object.assign(Object.assign({},r.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},t.Metrics.schema),{nullable:!0})}),dn.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(a){if(!a||!a.id)return!1;const s=a.id.split(":"),o=s[1]==="decentraland",u=s[3]==="base-avatars";return s.length===5&&o&&u}dn.isBaseAvatar=n;function i(a){if(!a||!a.id)return!1;const s=a.id.split(":");return s.length===5&&s[1]==="decentraland"&&s[3]==="base-emotes"}return dn.isBaseEmote=i,dn}var xR;function CG(){return xR||(xR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Ne(),r=Ja(),n=Uv(),i=pD(),a=Hv(),s=Gv(),o=Bv(),u=Vv();(function(l){l.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const c={keyword:"_isThirdParty",validate:(f,p)=>!f||(0,s.isThirdParty)(p),errors:!1},d={keyword:"_isBaseAvatar",validate:(f,p)=>!f||(0,i.isBaseAvatar)(p),errors:!1};l.validate=(0,t.generateLazyValidator)(l.schema,[c,d,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Kh)),Kh}var zR;function MG(){return zR||(zR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Uv();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=CG();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Ja();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=rD();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Bv();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(Yh)),Yh}var Xh={},Jh={},Qh={},Zh={},WR;function mD(){return WR||(WR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Ne();(function(r){r.DANCE="dance",r.STUNT="stunt",r.GREETINGS="greetings",r.FUN="fun",r.POSES="poses",r.REACTIONS="reactions",r.HORROR="horror",r.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Zh)),Zh}var ey={},YR;function hD(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Ne(),r=kv();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(ey)),ey}var ty={},KR;function yD(){return KR||(KR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=Ne();var r;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(r=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.ArmatureId||(e.ArmatureId={}));var n;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[r.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[r.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",r.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[r.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(r).reduce((a,s)=>(a[s]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${s} must contain valid animation data when provided`}),a),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(ty)),ty}var XR;function gD(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=mD(),r=Ne(),n=hD(),i=yD();(function(a){a.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Qh)),Qh}var JR;function jG(){return JR||(JR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=_D(),r=Ne(),n=pD(),i=Hv(),a=Gv(),s=gD();(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const u={keyword:"_isThirdParty",validate:(c,d)=>!c||(0,t.isThirdParty)(d),errors:!1},l={keyword:"_isBaseEmote",validate:(c,d)=>!c||(0,n.isBaseEmote)(d),errors:!1};o.validate=(0,r.generateLazyValidator)(o.schema,[u,l,t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Jh)),Jh}var ry={},QR;function DG(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Ne();(function(r){r.SIMPLE="simple",r.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(ry)),ry}var ny={},ZR;function LG(){return ZR||(ZR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=Ne();(function(r){r.SIMPLE_OUTCOME="so",r.MULTIPLE_OUTCOME="mo",r.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(ny)),ny}var eA;function $G(){return eA||(eA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=jG();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=hD();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=gD();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=yD();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var a=mD();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=DG();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=LG();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Xh)),Xh}var tA;function _D(){return tA||(tA=1,(function(e){var t=da&&da.__createBinding||(Object.create?(function(l,c,d,f){f===void 0&&(f=d);var p=Object.getOwnPropertyDescriptor(c,d);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,f,p)}):(function(l,c,d,f){f===void 0&&(f=d),l[f]=c[d]})),r=da&&da.__exportStar||function(l,c){for(var d in l)d!=="default"&&!Object.prototype.hasOwnProperty.call(c,d)&&t(c,l,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=lD();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=cD();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=dD();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=kv();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Hv();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=Gv();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(Vv(),e),r(MG(),e),r($G(),e)})(da)),da}var iy={},ay={},rA;function Yu(){return rA||(rA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Ne();var r;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(r=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:r.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(ay)),ay}var nA;function qG(){return nA||(nA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Qa(),r=Yu(),n=Ne();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(iy)),iy}var sy={},oy={},iA;function ED(){return iA||(iA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Qa(),r=Ne();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(oy)),oy}var aA;function vD(){return aA||(aA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Qa(),r=ED(),n=Ne();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:r.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(sy)),sy}var uy={},sA;function kG(){return sA||(sA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Yu(),r=Ne();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(uy)),uy}var pa={},cy={},oA;function BG(){return oA||(oA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=Ja(),r=Qa(),n=Ne();var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(i=e.Outfit||(e.Outfit={})),(function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.Outfits||(e.Outfits={}))})(cy)),cy}var uA;function UG(){return uA||(uA=1,(function(e){var t=pa&&pa.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=pa&&pa.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(BG(),e)})(pa)),pa}var ma={},ly={},cA;function bD(){return cA||(cA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(t){t.BADGE_GRANTED="badge_granted",t.BID_ACCEPTED="bid_accepted",t.BID_RECEIVED="bid_received",t.EVENTS_STARTED="events_started",t.EVENTS_STARTS_SOON="events_starts_soon",t.EVENT_CREATED="event_created",t.GOVERNANCE_ANNOUNCEMENT="governance_announcement",t.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",t.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",t.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",t.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",t.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",t.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",t.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",t.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",t.GOVERNANCE_TENDER_PASSED="governance_tender_passed",t.GOVERNANCE_WHALE_VOTE="governance_whale_vote",t.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",t.ITEM_SOLD="item_sold",t.ITEM_PUBLISHED="item_published",t.LAND_RENTAL_ENDED="rental_ended",t.LAND_RENTED="rental_started",t.REWARD_ASSIGNED="reward_assignment",t.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",t.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",t.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",t.REWARD_DELAYED="reward_delayed",t.REWARD_IN_PROGRESS="reward_in_progress",t.ROYALTIES_EARNED="royalties_earned",t.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",t.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",t.WORLDS_ACCESS_RESTORED="worlds_access_restored",t.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",t.WORLDS_MISSING_RESOURCES="worlds_missing_resources",t.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",t.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",t.CREDITS_GOAL_COMPLETED="credits_goal_completed",t.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",t.STREAMING_KEY_RESET="streaming_key_reset",t.STREAMING_KEY_REVOKE="streaming_key_revoke",t.STREAMING_KEY_EXPIRED="streaming_key_expired",t.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",t.STREAMING_PLACE_UPDATED="streaming_place_updated",t.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",t.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",t.CREDITS_REMINDER_USAGE="credits_reminder_usage",t.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",t.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",t.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",t.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",t.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",t.COMMUNITY_DELETED="community_deleted",t.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",t.COMMUNITY_RENAMED="community_renamed",t.COMMUNITY_MEMBER_BANNED="community_member_banned",t.COMMUNITY_MEMBER_REMOVED="community_member_removed",t.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",t.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",t.COMMUNITY_INVITE_RECEIVED="community_invite_received",t.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",t.COMMUNITY_POST_ADDED="community_post_added",t.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",t.USER_BANNED_FROM_SCENE="user_banned_from_scene",t.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",t.TRANSFER_RECEIVED="transfer_received",t.TIP_RECEIVED="tip_received",t.BANNED="banned",t.BAN_WARNING="ban_warning",t.BAN_LIFTED="ban_lifted"})(e.NotificationType||(e.NotificationType={})),(function(t){t.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(ly)),ly}var dy={},fy={},lA;function SD(){return lA||(lA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Ne(),r=bD(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(r.NotificationType).reduce((a,s)=>(a[s]=n,a),{});(function(a){a.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(r.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(fy)),fy}var py={},dA;function TD(){return dA||(dA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(t){t.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const r=new RegExp(t.schema.pattern);t.validate=n=>r.test(n)})(e.Email||(e.Email={}))})(py)),py}var fA;function FG(){return fA||(fA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Ne(),r=SD(),n=Qa(),i=TD();(function(a){a.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:r.SubscriptionDetails.schema}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(dy)),dy}var pA;function HG(){return pA||(pA=1,(function(e){var t=ma&&ma.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ma&&ma.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(bD(),e),r(FG(),e),r(SD(),e)})(ma)),ma}var ha={},my={},mA;function Mr(){return mA||(mA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(t){(function(r){r.BLOCKCHAIN="blockchain",r.CATALYST_DEPLOYMENT="catalyst-deployment",r.WORLD="world",r.CLIENT="client",r.WEB="web",r.MARKETPLACE="marketplace",r.REWARDS="rewards",r.BADGE="badge",r.ASSET_BUNDLE="asset-bundle",r.SOCIAL_SERVICE="social-service",r.CREDITS_SERVICE="credits-service",r.STREAMING="streaming",r.COMMS="comms",r.REFERRAL="referral",r.COMMUNITY="community",r.CAMERA="camera",r.EVENT="event",r.GOVERNANCE="governance",r.MODERATION="moderation"})(t.Type||(t.Type={})),(function(r){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received",n.TIP_RECEIVED="tip-received"})(r.Blockchain||(r.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(r.Marketplace||(r.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(r.CatalystDeployment||(r.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLD_SETTINGS_CHANGED="world_settings_changed",n.WORLD_SCENES_UNDEPLOYMENT="world_scenes_undeployment",n.WORLD_UNDEPLOYMENT="world_undeployment",n.WORLD_SPAWN_COORDINATE_SET="world_spawn_coordinate_set",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(r.Worlds||(r.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(r.Client||(r.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(r.Web||(r.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(r.Rewards||(r.Rewards={})),(function(n){n.GRANTED="badge-granted"})(r.Badge||(r.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(r.AssetBundle||(r.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(r.SocialService||(r.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(r.CreditsService||(r.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(r.Streaming||(r.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(r.Comms||(r.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(r.Referral||(r.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_LEFT="community-member-left",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(r.Community||(r.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(r.Camera||(r.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended"})(r.Event||(r.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(r.Governance||(r.Governance={})),(function(n){n.USER_BAN_CREATED="user-ban-created",n.USER_BAN_LIFTED="user-ban-lifted",n.USER_WARNING_CREATED="user-warning-created"})(r.Moderation||(r.Moderation={}))})(t.SubType||(t.SubType={}))})(e.Events||(e.Events={}))})(my)),my}var hy={},hA;function VG(){return hA||(hA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},amount:{type:"string"}},required:["senderAddress","receiverAddress","amount"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(hy)),hy}var yy={},yA;function GG(){return yA||(yA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=Yu(),r=Ne(),n=vD(),i=Mr();(function(a){a.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:t.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(yy)),yy}var gy={},gA;function xG(){return gA||(gA=1,Object.defineProperty(gy,"__esModule",{value:!0})),gy}var _y={},_A;function zG(){return _A||(_A=1,Object.defineProperty(_y,"__esModule",{value:!0})),_y}var Ey={},EA;function WG(){return EA||(EA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MARKETPLACE},subType:{type:"string",const:r.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Ey)),Ey}var vy={},No={},vA;function lf(){if(vA)return No;vA=1,Object.defineProperty(No,"__esModule",{value:!0}),No.createEventSchema=void 0;function e(t,r,n){return{type:"object",properties:{type:{type:"string",const:t},subType:{type:"string",const:r},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return No.createEventSchema=e,No}var bA;function YG(){return bA||(bA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const t=Ne(),r=Mr(),n=lf(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},a={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(vy)),vy}var by={},SA;function KG(){return SA||(SA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BADGE},subType:{type:"string",const:r.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(by)),by}var Sy={},TA;function XG(){return TA||(TA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const t=Ne(),r=Mr(),n=lf(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(Sy)),Sy}var Ty={},IA;function JG(){return IA||(IA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=Ne(),r=Mr();var n;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(Ty)),Ty}var Iy={},wA;function QG(){return wA||(wA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Ne(),r=Mr(),n=lf(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(Iy)),Iy}var wy={},RA;function ZG(){return RA||(RA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_LEFT},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},memberAddress:{type:"string"}},required:["id","memberAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(wy)),wy}var Ry={},AA;function e5(){return AA||(AA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(Ry)),Ry}var Ay={},OA;function t5(){return OA||(OA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(Ay)),Ay}var Oy={},PA;function r5(){return PA||(PA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const t=Ne(),r=Mr(),n=lf(),i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(Oy)),Oy}var Py={},NA;function n5(){return NA||(NA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;const t=Yu(),r=Ne(),n=Mr();(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},contentRating:{type:"string",nullable:!0},skyboxTime:{type:"number",nullable:!0},categories:{type:"array",items:{type:"string"},nullable:!0},singlePlayer:{type:"boolean",nullable:!0},showInPlaces:{type:"boolean",nullable:!0},thumbnailUrl:{type:"string",nullable:!0},accessType:{type:"string",nullable:!0}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string",pattern:"^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$"},oldCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1,nullable:!0},newCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1}},required:["name","oldCoordinate","newCoordinate"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},scenes:{type:"array",items:{type:"object",properties:{entityId:{type:"string"},baseParcel:{type:"string"}},required:["entityId","baseParcel"],additionalProperties:!1},minItems:1}},required:["worldName","scenes"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:t.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(Py)),Py}var Ny={},CA;function i5(){return CA||(CA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=Ne(),r=Mr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},bannedBy:{type:"string"},reason:{type:"string"},bannedAt:{type:"number",minimum:0},expiresAt:{type:"number",nullable:!0,minimum:0},customMessage:{type:"string",nullable:!0}},required:["id","bannedAddress","bannedBy","reason","bannedAt","expiresAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},liftedBy:{type:"string"},liftedAt:{type:"number",minimum:0}},required:["id","bannedAddress","liftedBy","liftedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},warnedAddress:{type:"string"},warnedBy:{type:"string"},reason:{type:"string"},warnedAt:{type:"number",minimum:0}},required:["id","warnedAddress","warnedBy","reason","warnedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(Ny)),Ny}var MA;function a5(){return MA||(MA=1,(function(e){var t=ha&&ha.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ha&&ha.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Mr(),e),r(VG(),e),r(GG(),e),r(xG(),e),r(zG(),e),r(WG(),e),r(YG(),e),r(KG(),e),r(XG(),e),r(JG(),e),r(QG(),e),r(ZG(),e),r(e5(),e),r(t5(),e),r(r5(),e),r(n5(),e),r(i5(),e)})(ha)),ha}var jA;function xv(){return jA||(jA=1,(function(e){var t=ca&&ca.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ca&&ca.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(AG(),e),r(PG(),e),r(_D(),e),r(Fv(),e),r(fD(),e),r(qG(),e),r(vD(),e),r(kG(),e),r(UG(),e),r(HG(),e),r(a5(),e)})(ca)),ca}var DA;function s5(){return DA||(DA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=cf(),r=Ja(),n=Uv(),i=Ne(),a=xv();(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:r.WearableCategory.schema},hides:{type:"array",items:r.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.WearableJson||(e.WearableJson={}))})(Ih)),Ih}var LA;function o5(){return LA||(LA=1,(function(e){var t=ua&&ua.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ua&&ua.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(wG(),e),r(s5(),e)})(ua)),ua}var $A;function u5(){return $A||($A=1,(function(e){var t=sa&&sa.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=sa&&sa.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(IG(),e),r(o5(),e)})(sa)),sa}var ya={},Cy={},qA;function c5(){return qA||(qA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Ne();(function(r){r.MOST_SALES="most_sales",r.MOST_PURCHASES="most_purchases",r.MOST_SPENT="most_spent",r.MOST_EARNED="most_earned",r.MOST_ROYALTIES="most_royalties",r.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(r){r.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Account||(e.Account={}))})(Cy)),Cy}var My={},jy={},kA;function ID(){return kA||(kA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Ne(),r=Sn();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai",a.MATIC_AMOY="Amoy",a.AVALANCHE_MAINNET="Avalanche",a.BINANCE_MAINNET="Binance Smart Chain",a.ARBITRUM_MAINNET="Arbitrum",a.OPTIMISM_MAINNET="Optimism",a.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return r.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return r.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return r.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return r.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return r.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return r.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,t.generateLazyValidator)(a.schema)})(n=e.ChainName||(e.ChainName={}))})(jy)),jy}var Dy={},BA;function bn(){return BA||(BA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Ne();(function(r){r.ETHEREUM="ETHEREUM",r.MATIC="MATIC",r.AVALANCHE="AVALANCHE",r.BSC="BINANCE SMART CHAIN",r.OPTIMISM="OPTIMISM",r.ARBITRUM="ARBITRUM",r.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Network||(e.Network={}))})(Dy)),Dy}var UA;function Sn(){return UA||(UA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Ne(),r=ID(),n=bn();var i;(function(l){l[l.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",l[l.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",l[l.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",l[l.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",l[l.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",l[l.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",l[l.MATIC_MAINNET=137]="MATIC_MAINNET",l[l.MATIC_MUMBAI=80001]="MATIC_MUMBAI",l[l.MATIC_AMOY=80002]="MATIC_AMOY",l[l.BSC_MAINNET=56]="BSC_MAINNET",l[l.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",l[l.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",l[l.FANTOM_MAINNET=250]="FANTOM_MAINNET",l[l.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function a(l){switch(l){case i.ETHEREUM_MAINNET:return r.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return r.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return r.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return r.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return r.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return r.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return r.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return r.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return r.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return r.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return r.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return r.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return r.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return r.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function s(l){switch(l){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=s;function o(l){const c={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(l){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},c);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},c);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c)}}e.getNetworkMapping=o;function u(l){switch(l){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=u,(function(l){l.schema={type:"number",enum:Object.values(l)},l.validate=(0,t.generateLazyValidator)(l.schema)})(i=e.ChainId||(e.ChainId={}))})(My)),My}var Ly={},FA;function l5(){return FA||(FA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Ne(),r=Sn(),n=bn();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(Ly)),Ly}var $y={},qy={},HA;function df(){return HA||(HA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Ne();(function(r){r.PARCEL="parcel",r.ESTATE="estate",r.WEARABLE="wearable",r.ENS="ens",r.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.NFTCategory||(e.NFTCategory={}))})(qy)),qy}var VA;function d5(){return VA||(VA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Ne(),r=Sn(),n=bn(),i=df();(function(a){a.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:r.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Contract||(e.Contract={}))})($y)),$y}var ky={},By={},GA;function wD(){return GA||(GA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Ne(),r=Sn(),n=xv(),i=bn(),a=df(),s=cf(),o=Ja();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_LISTED="recently_listed",u.RECENTLY_SOLD="recently_sold",u.CHEAPEST="cheapest",u.RENTAL_LISTING_DATE="rental_listing_date",u.RENTAL_DATE="rented_date",u.MAX_RENTAL_PRICE="max_rental_price",u.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:r.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,t.generateLazyValidator)(u.schema)})(e.NFT||(e.NFT={}))})(By)),By}var xA;function f5(){return xA||(xA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Ne(),r=Sn(),n=bn(),i=wD(),a=df();(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:r.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.Item||(e.Item={}))})(ky)),ky}var Uy={},zA;function zv(){return zA||(zA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Ne();(function(r){r.OPEN="open",r.SOLD="sold",r.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Uy)),Uy}var Fy={},WA;function p5(){return WA||(WA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Fy)),Fy}var Hy={},YA;function m5(){return YA||(YA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Ne(),r=Sn(),n=bn();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Hy)),Hy}var Vy={},KA;function h5(){return KA||(KA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(t){t.ASC="asc",t.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Vy)),Vy}var Gy={},XA;function y5(){return XA||(XA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Ne(),r=Sn(),n=zv(),i=bn();(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Order||(e.Order={}))})(Gy)),Gy}var xy={},JA;function g5(){return JA||(JA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Ne();(function(r){r.INJECTED="injected",r.MAGIC="magic",r.MAGIC_TEST="magic_test",r.FORTMATIC="formatic",r.NETWORK="network",r.WALLET_CONNECT="wallet_connect",r.WALLET_CONNECT_V2="wallet_connect_v2",r.WALLET_LINK="wallet_link",r.METAMASK_MOBILE="metamask_mobile",r.AUTH_SERVER="auth_server",r.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProviderType||(e.ProviderType={}))})(xy)),xy}var zy={},QA;function RD(){return QA||(QA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Ne();(function(r){r.ORDER="order",r.BID="bid",r.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SaleType||(e.SaleType={}))})(zy)),zy}var Wy={},ZA;function _5(){return ZA||(ZA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Ne(),r=Sn(),n=RD(),i=bn();(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:r.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Sale||(e.Sale={}))})(Wy)),Wy}var Yy={},eO;function E5(){return eO||(eO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=Ne(),r=Sn(),n=bn();(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(a){a.PARCEL="parcel",a.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:r.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Yy)),Yy}var Ky={},tO;function v5(){return tO||(tO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(t){t.DATE="date",t.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Ky)),Ky}var Xy={},rO;function b5(){return rO||(rO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Store||(e.Store={}))})(Xy)),Xy}var Jy={},nO;function S5(){return nO||(nO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Ne();(function(r){r.MALE="male",r.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(r){r.MALE="male",r.FEMALE="female",r.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableGender||(e.WearableGender={}))})(Jy)),Jy}var Qy={},iO;function T5(){return iO||(iO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Ne();function r(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=r;function n(i,a){const s=r().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Qy)),Qy}var Zy={},aO;function I5(){return aO||(aO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Ne(),r=Sn(),n=zv(),i=bn();(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(a){const s={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};a.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...s.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Bid||(e.Bid={}))})(Zy)),Zy}var eg={},sO;function w5(){return sO||(sO=1,Object.defineProperty(eg,"__esModule",{value:!0})),eg}var tg={},oO;function R5(){return oO||(oO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(t){t.BID="bid",t.PUBLIC_NFT_ORDER="public_nft_order",t.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(t){t[t.ERC20=1]="ERC20",t[t.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",t[t.ERC721=3]="ERC721",t[t.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(t){t.SENT="sent",t.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(tg)),tg}var ga={},rg={},uO;function A5(){return uO||(uO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Ne();(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(rg)),rg}var ng={},cO;function O5(){return cO||(cO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(t){t.AUTH="authentication",t.BUILDER="builder",t.MARKETPLACE="marketplace",t.PROFILE="profile",t.CONFIG="configurator",t.JESUS="jesus"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(ng)),ng}var ig={},lO;function P5(){return lO||(lO=1,Object.defineProperty(ig,"__esModule",{value:!0})),ig}var ag={},dO;function N5(){return dO||(dO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Ne();(function(r){r.ANIMATION_PLAY="animation_play",r.ANIMATION_PAUSE="animation_pause",r.ANIMATION_LOOP="animation_loop",r.ANIMATION_END="animation_end",r.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(ag)),ag}var sg={},fO;function C5(){return fO||(fO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Ne();(function(r){r.IDLE="idle",r.WALK="walk",r.RUN="run",r.JUMP="jump",r.CLAP="clap",r.DAB="dab",r.DANCE="dance",r.FASHION="fashion",r.FASHION_2="fashion-2",r.FASHION_3="fashion-3",r.FASHION_4="fashion-4",r.LOVE="love",r.MONEY="money",r.FIST_PUMP="fist-pump",r.HEAD_EXPLODE="head-explode",r.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(sg)),sg}var og={},pO;function M5(){return pO||(pO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=Ne();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const r=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};e.sendMessage=r})(og)),og}var ug={},mO;function j5(){return mO||(mO=1,Object.defineProperty(ug,"__esModule",{value:!0})),ug}var cg={},hO;function D5(){return hO||(hO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Ne();(function(r){r.ORTHOGRAPHIC="orthographic",r.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(cg)),cg}var lg={},yO;function L5(){return yO||(yO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Ne();(function(r){r.TEXTURE="texture",r.WEARABLE="wearable",r.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewType||(e.PreviewType={}))})(lg)),lg}var dg={},gO;function $5(){return gO||(gO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{stiffness:{type:"number",minimum:0,maximum:5},gravityPower:{type:"number",minimum:0,maximum:10},gravityDir:{type:"array",items:[{type:"number"},{type:"number"},{type:"number"}],minItems:3,maxItems:3},dragForce:{type:"number",minimum:0,maximum:1},center:{type:"integer",minimum:0,nullable:!0}},required:["stiffness","gravityPower","gravityDir","dragForce"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SpringBoneParams||(e.SpringBoneParams={}))})(dg)),dg}var fg={},_O;function q5(){return _O||(_O=1,Object.defineProperty(fg,"__esModule",{value:!0})),fg}var pg={},EO;function k5(){return EO||(EO=1,Object.defineProperty(pg,"__esModule",{value:!0})),pg}var mg={},vO;function B5(){return vO||(vO=1,Object.defineProperty(mg,"__esModule",{value:!0})),mg}var hg={},bO;function U5(){return bO||(bO=1,Object.defineProperty(hg,"__esModule",{value:!0})),hg}var yg={},SO;function F5(){return SO||(SO=1,Object.defineProperty(yg,"__esModule",{value:!0})),yg}var gg={},TO;function H5(){return TO||(TO=1,Object.defineProperty(gg,"__esModule",{value:!0})),gg}var _g={},IO;function V5(){return IO||(IO=1,Object.defineProperty(_g,"__esModule",{value:!0})),_g}var Eg={},wO;function G5(){return wO||(wO=1,Object.defineProperty(Eg,"__esModule",{value:!0})),Eg}var RO;function x5(){return RO||(RO=1,(function(e){var t=ga&&ga.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ga&&ga.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(A5(),e),r(O5(),e),r(P5(),e),r(N5(),e),r(C5(),e),r(M5(),e),r(j5(),e),r(D5(),e),r(L5(),e),r($5(),e),r(q5(),e),r(k5(),e),r(B5(),e),r(U5(),e),r(F5(),e),r(H5(),e),r(V5(),e),r(G5(),e)})(ga)),ga}var _a={},Co={},AO;function z5(){if(AO)return Co;AO=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return Co.isSysLink=e,Co}var Mo={},OO;function W5(){if(OO)return Mo;OO=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),Mo.ContentfulLocale=e,Mo}var vg={},PO;function Y5(){return PO||(PO=1,Object.defineProperty(vg,"__esModule",{value:!0})),vg}var NO;function K5(){return NO||(NO=1,(function(e){var t=_a&&_a.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=_a&&_a.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(z5(),e),r(W5(),e),r(Y5(),e)})(_a)),_a}var CO;function X5(){return CO||(CO=1,(function(e){var t=ya&&ya.__createBinding||(Object.create?(function($,B,V,U){U===void 0&&(U=V);var k=Object.getOwnPropertyDescriptor(B,V);(!k||("get"in k?!B.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return B[V]}}),Object.defineProperty($,U,k)}):(function($,B,V,U){U===void 0&&(U=V),$[U]=B[V]})),r=ya&&ya.__exportStar||function($,B){for(var V in $)V!=="default"&&!Object.prototype.hasOwnProperty.call(B,V)&&t(B,$,V)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=c5();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Sn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var a=ID();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=l5();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=d5();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=f5();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=zv();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=p5();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=m5();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var f=bn();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return f.Network}});var p=df();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return p.NFTCategory}});var y=wD();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return y.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return y.NFTSortBy}});var g=h5();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return g.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return g.CatalogSortDirection}});var T=y5();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return T.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return T.OrderSortBy}});var P=g5();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return P.ProviderType}});var m=cf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return m.Rarity}});var w=RD();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return w.SaleType}});var I=_5();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return I.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return I.SaleSortBy}});var h=E5();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return h.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return h.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return h.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return h.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return h.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return h.PeriodCreation}});var E=v5();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return E.AnalyticsDayDataSortBy}});var v=b5();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return v.Store}});var O=S5();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return O.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return O.GenderFilterOption}});var C=T5();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return C.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return C.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return C.isInsideWorldLimits}}),r(I5(),e),r(w5(),e),r(R5(),e),r(x5(),e),r(K5(),e)})(ya)),ya}var bg={},MO;function J5(){return MO||(MO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(bg)),bg}var Ea={},Sg={},jo={},jO;function AD(){if(jO)return jo;jO=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.isInExceptionBlock=void 0;function e(i,a){return i>=62&&i<=150&&a>=151&&a<=158}function t(i,a){return i>=151&&i<=162&&a>=144&&a<=158}function r(i,a){return i>=151&&i<=163&&a>=59&&a<=143}function n(i,a){return e(i,a)||t(i,a)||r(i,a)}return jo.isInExceptionBlock=n,jo}var DO;function Q5(){return DO||(DO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Ne(),r=AD();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(p,y){return!y||typeof y.x!="number"||typeof y.y!="number"?!1:o(y)||(0,r.isInExceptionBlock)(y.x,y.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:f,y:p}){return`${f},${p}`}n.parcelToString=i;function a(f){const p=f.match(/^(-?\d+),(-?\d+)$/);if(!p)return null;const[,y,g]=p,T=parseInt(y,10),P=parseInt(g,10);return{x:T,y:P}}n.stringToParcel=a;function s(f){const p=a(f);return p?n.validate(p):!1}n.isParcelStringValid=s;function o(f){const{x:p,y}=f;return p>=e.PARCEL_LIMITS.minX&&p<=e.PARCEL_LIMITS.maxX&&y>=e.PARCEL_LIMITS.minY&&y<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(f){return(0,r.isInExceptionBlock)(f.x,f.y)}n.isExceptionParcel=u;function l(f){return o(f)||u(f)}n.isInBounds=l;function c(f){return n.validate(f)}n.isValid=c;function d(f){const p=a(f);return p?n.validate(p):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(Sg)),Sg}var va={},LO;function Z5(){if(LO)return va;LO=1,Object.defineProperty(va,"__esModule",{value:!0}),va.validateUrlInstance=va.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(p,y=2){let g=p;for(let T=0;T<y;T++)try{g=decodeURIComponent(g)}catch{break}return g.normalize("NFKC")}function r(p){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(p)}function n(p){return!!(p.username||p.password)}function i(p){return/\\/.test(p)}const a=["80","443"];function s(p,y){return!!p.port&&!y.includes(p.port)}function o(p){const y=p.toLowerCase();return!!(y==="localhost"||y.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(y)||y==="::1"||y==="[::1]"||y.startsWith("fe80:")||y.startsWith("fc00:"))}function u(p){if(p.startsWith("//"))return null;try{return{url:new URL(p),wasRelative:!1}}catch{try{return{url:new URL(p,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(p){const y=t(String(p).toLowerCase());return!(r(y)||i(y))}function c(p){return!(!p||p.includes("..")||p.includes("//")||r(p)||i(p))}function d(p,y={}){const g=Object.assign(Object.assign({},e),y),T=[...a,...g.allowedPorts];if(!p||p.length===0||p.length>4096||r(p)||i(p))return!1;const P=t(p);if(r(P)||i(P)||p.startsWith("//"))return!1;const m=u(p);if(!m)return!1;const{url:w,wasRelative:I}=m;if(w.protocol!=="http:"&&w.protocol!=="https:"&&w.protocol!==""||n(w)||i(p)||i(w.href)||!I&&(s(w,T)||!g.allowLocalhost&&w.hostname&&o(w.hostname))||!c(w.pathname)||w.pathname.length>2048)return!1;const h=Array.from(w.searchParams.entries());if(h.length>50||(w.search?w.search.startsWith("?")?w.search.length-1:w.search.length:0)>2048)return!1;for(const[v,O]of h)if(v.length===0||!l(v)||!l(O)||v.length>128||O.length>1024)return!1;return!(w.hash&&r(w.hash))}va.validateUrl=d;function f(p,y={}){return d(p.toString(),y)}return va.validateUrlInstance=f,va}var $O;function ex(){return $O||($O=1,(function(e){var t=Ea&&Ea.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ea&&Ea.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Q5(),e),r(AD(),e),r(Z5(),e)})(Ea)),Ea}var qO;function tx(){return qO||(qO=1,(function(e){var t=cn&&cn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u);var c=Object.getOwnPropertyDescriptor(o,u);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,l,c)}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=cn&&cn.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=cn&&cn.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(o,s,u);return r(o,s),o},i=cn&&cn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=n(u5());e.sdk=a,i(Ne(),e),i(X5(),e),i(xv(),e),i(Qa(),e),i(J5(),e),i(Yu(),e),i(ED(),e),i(TD(),e),i(ex(),e)})(cn)),cn}var kO;function OD(){return kO||(kO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=tx();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}})})(vh)),vh}var BO;function PD(){return BO||(BO=1,(function(e){var t=un&&un.__createBinding||(Object.create?(function(Q,K,q,D){D===void 0&&(D=q);var F=Object.getOwnPropertyDescriptor(K,q);(!F||("get"in F?!K.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return K[q]}}),Object.defineProperty(Q,D,F)}):(function(Q,K,q,D){D===void 0&&(D=q),Q[D]=K[q]})),r=un&&un.__setModuleDefault||(Object.create?(function(Q,K){Object.defineProperty(Q,"default",{enumerable:!0,value:K})}):function(Q,K){Q.default=K}),n=un&&un.__importStar||(function(){var Q=function(K){return Q=Object.getOwnPropertyNames||function(q){var D=[];for(var F in q)Object.prototype.hasOwnProperty.call(q,F)&&(D[D.length]=F);return D},Q(K)};return function(K){if(K&&K.__esModule)return K;var q={};if(K!=null)for(var D=Q(K),F=0;F<D.length;F++)D[F]!=="default"&&t(q,K,D[F]);return r(q,K),q}})(),i=un&&un.__importDefault||function(Q){return Q&&Q.__esModule?Q:{default:Q}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseEmphemeralPayload=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.createEthereumMessageHash=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0,e.validateSignature=f,e.isValidAuthChain=p,e.createEIP1271MessageHash=y,e.createSimpleAuthChain=g,e.createAuthChain=T,e.initializeAuthChain=P,e.signPayload=m,e.createSignature=w,e.ownerAddress=I,e.getEphemeralMessage=h,e.getEphemeralSignatureType=V,e.getSignedIdentitySignatureType=U,e.parseEphemeralPayload=k,e.isValidEIP1271Signature=te;const a=n(of()),s=cG(),o=EG(),u=i(vG()),l=bG(),c=OD();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;async function f(Q,K,q,D=Date.now()){let F="";if(!p(K))return{ok:!1,message:"ERROR: Malformed authChain"};for(const N of K){const L=J(N.type);try{const{nextAuthority:ee}=await L(F,N,{provider:q,dateToValidateExpirationInMillis:D});F=ee||""}catch(ee){const Ee=ee instanceof Error?ee.message:String(ee);return{ok:!1,message:`ERROR. Link type: ${N.type}. ${Ee}.`}}}const W=F===Q;return{ok:W,message:W?void 0:`ERROR: Invalid final authority. Expected: ${Q}. Current ${F}.`}}function p(Q){for(const[K,q]of Q.entries())if(K===0&&q.type!==c.AuthLinkType.SIGNER||q.type===c.AuthLinkType.SIGNER&&K!==0)return!1;return!0}function y(Q){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(Q)))}function g(Q,K,q){return[{type:c.AuthLinkType.SIGNER,payload:K,signature:""},{type:U(q),payload:Q,signature:q}]}function T(Q,K,q,D){const F=(0,l.moveMinutes)(q),W=h(K.address,F),N=w(Q,W),L=w(K,D);return[{type:c.AuthLinkType.SIGNER,payload:Q.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:W,signature:N},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:D,signature:L}]}async function P(Q,K,q,D){const F=(0,l.moveMinutes)(q),W=h(K.address,F),N=await D(W),L=[{type:c.AuthLinkType.SIGNER,payload:Q,signature:""},{type:V(N),payload:W,signature:N}];return{ephemeralIdentity:K,expiration:F,authChain:L}}function m(Q,K){const q=w(Q.ephemeralIdentity,K);return[...Q.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:K,signature:q}]}e.createEthereumMessageHash=o.createEthereumMessageHash;function w(Q,K){return(0,o.ethSign)((0,a.hexToBytes)(Q.privateKey),K)}function I(Q){return Q.length>0&&Q[0].type===c.AuthLinkType.SIGNER?Q[0].payload:"Invalid-Owner-Address"}function h(Q,K){return`Decentraland Login
|
|
71
|
+
Ephemeral address: ${Q}
|
|
72
|
+
Expiration: ${K.toISOString()}`}e.Authenticator={validateSignature:f,isValidAuthChain:p,createEIP1271MessageHash:y,createSimpleAuthChain:g,createAuthChain:T,initializeAuthChain:P,signPayload:m,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:w,ownerAddress:I,getEphemeralMessage:h};const E=async(Q,K)=>({nextAuthority:K.payload});e.SIGNER_VALIDATOR=E;const v=async(Q,K)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const q=(0,o.recoverAddressFromEthSignature)(K.signature,K.payload),D=Q.toLocaleLowerCase(),F=q.toLocaleLowerCase();if(D===F)return{nextAuthority:K.payload};throw new Error(`Invalid signer address. Expected: ${D}. Actual: ${F}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=v;const O=async(Q,K,q)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:F,expiration:W}=k(K.payload),N=(q==null?void 0:q.dateToValidateExpirationInMillis)||Date.now();if(W>N){const L=(0,o.recoverAddressFromEthSignature)(K.signature,D),ee=Q.toLocaleLowerCase(),Ee=L.toLocaleLowerCase();if(ee===Ee)return{nextAuthority:F};throw new Error(`Invalid signer address. Expected: ${ee}. Actual: ${Ee}`)}throw new Error(`Ephemeral key expired. Expiration: ${W}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=O;const C=async(Q,K,q)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:F,expiration:W}=k(K.payload),N=(q==null?void 0:q.dateToValidateExpirationInMillis)||Date.now();if(W>N&&await ie(q==null?void 0:q.provider,Q,D,K.signature,N))return{nextAuthority:F};throw new Error(`Ephemeral key expired. Expiration: ${W}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=C;const $=async(Q,K,q)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!q)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await ie(q.provider,Q,K.payload,K.signature,q.dateToValidateExpirationInMillis))return{nextAuthority:K.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=$;const B=async(Q,K)=>({error:"Error Validator."});function V(Q){return Q.length===d?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function U(Q){return Q.length===d?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function k(Q){const K=Q.replace(/\r/g,""),q=K.split(`
|
|
73
|
+
`),D="Ephemeral address: ",F="Expiration: ";if(q.length<3||!q[1].startsWith(D)||!q[2].startsWith(F))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${D}" on line 2 and "${F}" on line 3.`);const W=q[1].substring(D.length),N=q[2].substring(F.length),L=Date.parse(N);if(Number.isNaN(L))throw new Error(`Invalid expiration date in ephemeral payload: "${N}"`);return{message:K,ephemeralAddress:W,expiration:L}}e.parseEmphemeralPayload=k;async function te(Q,K,q,D){const F=y(K),W=(0,a.hexToBytes)(q);let N;try{N=(0,a.bytesToHex)(await Q.isValidSignature(F,W,D))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const L=(0,o.createEthereumMessageHash)(K);try{N=(0,a.bytesToHex)(await Q.isValidSignature(L,W,D))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function ie(Q,K,q,D,F){if(!Q)throw new Error("Missing provider");const W=new a.default(Q),N=await(0,s.SignatureValidator)(W,K);let L=await te(N,q,D);if(L)return!0;const ee=new u.default(W);try{const{block:Ee}=await ee.getDate(F,!1);if(L=await te(N,q,D,Ee),L)return!0}catch(Ee){const he=Ee instanceof Error?Ee.message:String(Ee);throw new Error(`Invalid validation. Error: ${he}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${L}`)}function J(Q){switch(Q){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return B}}})(un)),un}var ti={},UO;function rx(){return UO||(UO=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.AUTH_METADATA_HEADER=ti.AUTH_TIMESTAMP_HEADER=ti.AUTH_CHAIN_HEADER_PREFIX=void 0,ti.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",ti.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",ti.AUTH_METADATA_HEADER="x-identity-metadata"),ti}var FO;function nx(){return FO||(FO=1,(function(e){var t=ia&&ia.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ia&&ia.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(PD(),e),r(rx(),e),r(OD(),e)})(ia)),ia}var ix=nx(),ba={},fn={},nd={exports:{}},id={exports:{}},HO;function Wv(){return HO||(HO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=t.default,e.exports.default=t.default})(id,id.exports)),id.exports}var ad={exports:{}},VO;function ax(){return VO||(VO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function n(i,a){for(var s=0;s<a.length;s++){var o=a[s];if(i===o||r(o)&&o.test(i))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(ad,ad.exports)),ad.exports}var sd={exports:{}},GO;function sx(){return GO||(GO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(i,a){return i.indexOf(a)!==-1};t.default=r,e.exports=t.default,e.exports.default=t.default})(sd,sd.exports)),sd.exports}var od={exports:{}},ud={exports:{}},xO;function ND(){return xO||(xO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},r(i)}function n(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;(r(i)!=="object"||i===null)&&(i={});for(var s in a)typeof i[s]>"u"&&(i[s]=a[s]);return i}e.exports=t.default,e.exports.default=t.default})(ud,ud.exports)),ud.exports}var zO;function ox(){return zO||(zO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(Wv()),n=i(ND());function i(o){return o&&o.__esModule?o:{default:o}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function s(o,u){(0,r.default)(o),u=(0,n.default)(u,a),u.allow_trailing_dot&&o[o.length-1]==="."&&(o=o.substring(0,o.length-1)),u.allow_wildcard===!0&&o.indexOf("*.")===0&&(o=o.substring(2));var l=o.split("."),c=l[l.length-1];return u.require_tld&&(l.length<2||!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(c)||/\s/.test(c))||!u.allow_numeric_tld&&/^\d+$/.test(c)?!1:l.every(function(d){return!(d.length>63&&!u.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(d)||/[\uff01-\uff5e]/.test(d)||/^-|-$/.test(d)||!u.allow_underscores&&/_/.test(d))})}e.exports=t.default,e.exports.default=t.default})(od,od.exports)),od.exports}var cd={exports:{}},WO;function ux(){return WO||(WO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(Wv());function n(d){return d&&d.__esModule?d:{default:d}}function i(d){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},i(d)}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",s="(".concat(a,"[.]){3}").concat(a),o=new RegExp("^".concat(s,"$")),u="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(s,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(s,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(s,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(s,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(s,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(s,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(s,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function c(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var p=(i(f)==="object"?f.version:arguments[1])||"";return p?p.toString()==="4"?o.test(d):p.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(cd,cd.exports)),cd.exports}var YO;function cx(){return YO||(YO=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r=u(Wv()),n=u(ax()),i=u(sx()),a=u(ox()),s=u(ux()),o=u(ND());function u(m){return m&&m.__esModule?m:{default:m}}function l(m,w){return y(m)||p(m,w)||d(m,w)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(m,w){if(m){if(typeof m=="string")return f(m,w);var I={}.toString.call(m).slice(8,-1);return I==="Object"&&m.constructor&&(I=m.constructor.name),I==="Map"||I==="Set"?Array.from(m):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?f(m,w):void 0}}function f(m,w){(w==null||w>m.length)&&(w=m.length);for(var I=0,h=Array(w);I<w;I++)h[I]=m[I];return h}function p(m,w){var I=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(I!=null){var h,E,v,O,C=[],$=!0,B=!1;try{if(v=(I=I.call(m)).next,w!==0)for(;!($=(h=v.call(I)).done)&&(C.push(h.value),C.length!==w);$=!0);}catch(V){B=!0,E=V}finally{try{if(!$&&I.return!=null&&(O=I.return(),Object(O)!==O))return}finally{if(B)throw E}}return C}}function y(m){if(Array.isArray(m))return m}var g={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function P(m,w){if((0,r.default)(m),!m||/[\s<>]/.test(m)||m.indexOf("mailto:")===0||(w=(0,o.default)(w,g),w.validate_length&&m.length>w.max_allowed_length)||!w.allow_fragments&&(0,i.default)(m,"#")||!w.allow_query_components&&((0,i.default)(m,"?")||(0,i.default)(m,"&")))return!1;var I,h,E,v,O,C,$,B;$=m.split("#"),m=$.shift(),$=m.split("?"),m=$.shift();var V=m.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,k=function(ce){return U=!0,I=ce.toLowerCase(),w.require_valid_protocol&&w.protocols.indexOf(I)===-1?!1:m.substring(V[0].length)};if(V){var te=V[1],ie=m.substring(V[0].length),J=ie.slice(0,2)==="//";if(J){if(m=k(te),m===!1)return!1}else{var Q=ie.indexOf("/"),K=Q===-1?ie:ie.substring(0,Q),q=K.indexOf("@");if(q!==-1){var D=K.substring(0,q),F=/^[a-zA-Z0-9\-_.%:]*$/,W=F.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(W&&!N){if(w.require_protocol)return!1}else if(m=k(te),m===!1)return!1}else{var L=/^[0-9]/.test(ie);if(L){if(w.require_protocol)return!1}else if(m=k(te),m===!1)return!1}}}else if(w.require_protocol)return!1;if(m.slice(0,2)==="//"){if(!U&&!w.allow_protocol_relative_urls)return!1;m=m.slice(2)}if(m==="")return!1;if($=m.split("/"),m=$.shift(),m===""&&!w.require_host)return!0;if($=m.split("@"),$.length>1){if(w.disallow_auth||$[0]===""||(h=$.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var ee=h.split(":"),Ee=l(ee,2),he=Ee[0],be=Ee[1];if(he===""&&be==="")return!1}v=$.join("@"),C=null,B=null;var Ie=v.match(T);if(Ie?(E="",B=Ie[1],C=Ie[2]||null):($=v.split(":"),E=$.shift(),$.length&&(C=$.join(":"))),C!==null&&C.length>0){if(O=parseInt(C,10),!/^[0-9]+$/.test(C)||O<=0||O>65535)return!1}else if(w.require_port)return!1;return w.host_whitelist?(0,n.default)(E,w.host_whitelist):E===""&&!w.require_host?!0:!(!(0,s.default)(E)&&!(0,a.default)(E,w)&&(!B||!(0,s.default)(B,6))||(E=E||B,w.host_blacklist&&(0,n.default)(E,w.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(nd,nd.exports)),nd.exports}var Tg={},KO;function CD(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=r;function n(o){const u=localStorage.getItem(s(o));if(!u)return null;let l;try{l=JSON.parse(u)}catch{return a(o),null}return l.expiration=new Date(l.expiration),l.expiration.getTime()<=Date.now()?(a(o),null):l}e.localStorageGetIdentity=n;function i(o,u){new Date(u.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(u))}e.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}e.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(Tg)),Tg}var XO;function lx(){if(XO)return fn;XO=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.clearIdentity=fn.storeIdentity=fn.getIdentity=fn.init=void 0;const e=cx(),t=CD(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(T,P={}){if(!(0,e.default)(T,{...o,...P}))throw new Error(`Invalid url: ${T}`);if(s)throw new Error("Already initialized");const m=document.createElement("iframe");m.id=r,m.src=T,m.style.width="0",m.style.height="0",m.style.border="none",m.style.position="absolute",document.body.appendChild(m),s=T}fn.init=u;async function l(T){let P;try{P=(await p(await f(),t.Action.GET,{user:T})).identity??null}catch(m){g(m),P=(0,t.localStorageGetIdentity)(T)}return P}fn.getIdentity=l;async function c(T,P){try{await p(await f(),t.Action.STORE,{user:T,identity:P})}catch(m){g(m),(0,t.localStorageStoreIdentity)(T,P)}}fn.storeIdentity=c;async function d(T){try{await p(await f(),t.Action.CLEAR,{user:T})}catch(P){g(P),(0,t.localStorageClearIdentity)(T)}}fn.clearIdentity=d;async function f(){if(!s)throw new Error("Not initialized");for(let T=0;T<i;T++){const P=document.getElementById(r),m=P==null?void 0:P.contentWindow;if(!m){await y(n);continue}try{await p(m,t.Action.PING,{},n)}catch{continue}return m}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(T,P,m,w=0){a++;const I=a;let h=null;const E=new Promise((v,O)=>{h=({data:C})=>{!C||C.target!==t.SINGLE_SIGN_ON_TARGET||C.id!==I||(C.error?O(new Error(C.error)):v(C))},window.addEventListener("message",h)});T.postMessage((0,t.createMessage)({id:I,action:P,...m}),s);try{return await(w?Promise.race([E,new Promise((v,O)=>setTimeout(()=>O(new Error("Did not receive a response in time")),w))]):E)}catch(v){throw v}finally{h&&window.removeEventListener("message",h)}}function y(T){return new Promise(P=>setTimeout(P,T))}function g(T){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",T.message)}return fn}var JO;function dx(){return JO||(JO=1,(function(e){var t=ba&&ba.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ba&&ba.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(lx(),e),r(CD(),e)})(ba)),ba}var SE=dx();function fx(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?Hn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?Hn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?Hn.DEVELOPMENT:null}function px(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(jD(n))return n}return null}var QO={},Hn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(Hn||(Hn={}));function MD(){return Object.values(Hn)}function jD(e){return MD().includes(e)}function ld(e){if(jD(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${MD().map(t=>`"${t}"`).join(", ")}.`)}function mx(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=e;if(t&&r&&t!==r)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&i&&t!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?ld(t):r?ld(r):n?ld(n):i?ld(i):Hn.PRODUCTION}function hx(e){if(typeof window<"u"){const r=px(window.location);if(r)return r;const n=fx(window.location);if(n)return n}return mx(typeof e>"u"&&typeof hd=="object"&&typeof QO=="object"?QO:e)}function yx(e,t){const r=hx(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}const gx="development",_x="80002",Ex="https://marketplace-api.decentraland.zone",vx="https://marketplace-api.decentraland.zone",bx="/auth",Sx="https://rpc.decentraland.org/amoy",Tx="https://credits.decentraland.zone",Ix="https://builder-api.decentraland.zone",wx="https://peer.decentraland.zone",Rx="",Ax="",Ox="",Px="",Nx={ENVIRONMENT:gx,CHAIN_ID:_x,MARKETPLACE_SERVER_URL:Ex,NFT_API_URL:vx,AUTH_URL:bx,RPC_URL:Sx,CREDITS_SERVER_URL:Tx,BUILDER_SERVER_URL:Ix,PEER_URL:wx,SHOP_SERVER_URL:Rx,STRIPE_PUBLISHABLE_KEY:Ax,SEGMENT_WRITE_KEY:Ox,SENTRY_DSN:Px},Cx="staging",Mx="80002",jx="https://marketplace-api.decentraland.zone",Dx="https://marketplace-api.decentraland.zone",Lx="/auth",$x="https://rpc.decentraland.org/amoy",qx="https://credits.decentraland.zone",kx="https://builder-api.decentraland.zone",Bx="https://peer.decentraland.zone",Ux="",Fx="",Hx="",Vx="",Gx={ENVIRONMENT:Cx,CHAIN_ID:Mx,MARKETPLACE_SERVER_URL:jx,NFT_API_URL:Dx,AUTH_URL:Lx,RPC_URL:$x,CREDITS_SERVER_URL:qx,BUILDER_SERVER_URL:kx,PEER_URL:Bx,SHOP_SERVER_URL:Ux,STRIPE_PUBLISHABLE_KEY:Fx,SEGMENT_WRITE_KEY:Hx,SENTRY_DSN:Vx},xx="production",zx="137",Wx="https://marketplace-api.decentraland.org",Yx="https://marketplace-api.decentraland.org",Kx="/auth",Xx="https://rpc.decentraland.org/polygon",Jx="https://credits.decentraland.org",Qx="https://builder-api.decentraland.org",Zx="https://peer.decentraland.org",e6="",t6="",r6="",n6="",i6={ENVIRONMENT:xx,CHAIN_ID:zx,MARKETPLACE_SERVER_URL:Wx,NFT_API_URL:Yx,AUTH_URL:Kx,RPC_URL:Xx,CREDITS_SERVER_URL:Jx,BUILDER_SERVER_URL:Qx,PEER_URL:Zx,SHOP_SERVER_URL:e6,STRIPE_PUBLISHABLE_KEY:t6,SEGMENT_WRITE_KEY:r6,SENTRY_DSN:n6},a6={},Vr=yx({[Hn.DEVELOPMENT]:Nx,[Hn.STAGING]:Gx,[Hn.PRODUCTION]:i6},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),Er=a6,St={marketplaceServerUrl:Er.VITE_MARKETPLACE_SERVER_URL??Vr.get("MARKETPLACE_SERVER_URL"),nftApiUrl:Er.VITE_NFT_API_URL??Vr.get("NFT_API_URL"),chainId:Number(Er.VITE_CHAIN_ID??Vr.get("CHAIN_ID")),authUrl:Er.VITE_AUTH_URL??Vr.get("AUTH_URL"),rpcUrl:Er.VITE_RPC_URL??Vr.get("RPC_URL"),creditsServerUrl:Er.VITE_CREDITS_SERVER_URL??Vr.get("CREDITS_SERVER_URL"),builderServerUrl:Er.VITE_BUILDER_SERVER_URL??Vr.get("BUILDER_SERVER_URL"),peerUrl:Er.VITE_PEER_URL??Vr.get("PEER_URL"),shopServerUrl:Er.VITE_SHOP_SERVER_URL??Vr.get("SHOP_SERVER_URL"),stripePublishableKey:Er.VITE_STRIPE_PK??Vr.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:Er.VITE_SEGMENT_WRITE_KEY??Vr.get("SEGMENT_WRITE_KEY"),sentryDsn:Er.VITE_SENTRY_DSN??Vr.get("SENTRY_DSN"),sentryEnvironment:Er.VITE_SENTRY_ENVIRONMENT??(Number(Er.VITE_CHAIN_ID??Vr.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:Er.VITE_SENTRY_RELEASE??`shop@${Er.VITE_APP_VERSION??"0.0.0-dev"}`},s6=744*60;async function DD(){return(await ar(async()=>{const{connection:e}=await import("./index-42gEBfTi.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([7,1]))).connection}async function o6(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new aq(e.provider),n=r.getSigner();let i=SE.localStorageGetIdentity(t);if(!i){const a=sq.createRandom();i=await ix.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:Fb(a.publicKey),privateKey:Fb(a.privateKey)},s6,s=>n.signMessage(s)),SE.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function u6(){const e=encodeURIComponent(window.location.href);window.location.replace(`${St.authUrl}/login?redirectTo=${e}`)}async function c6(){try{const t=await(await DD()).tryPreviousConnection();return!t.account||!SE.localStorageGetIdentity(t.account.toLowerCase())?null:await o6(t)}catch{return null}}async function l6(){try{await(await DD()).disconnect()}catch{}}const d6=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,f6=St.chainId===80002?"amoy":"polygon",p6=St.chainId===80002?"dev":"prod";function Yv(){return window.analytics}function m6(){let e=null;try{e=oo.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:d6,network:f6,app_env:p6}}function yn(e,t={}){const r={...m6(),...t},n=Yv();n&&n.track(e,r)}function h6(e,t={}){const r=Yv();r&&r.identify(e.toLowerCase(),t)}function y6(){const e=Yv();e!=null&&e.reset&&e.reset()}function g6(e){yn("Shop Viewed Page",{page:e})}function ZO(e){return e===en.ProviderType.MAGIC||e===en.ProviderType.MAGIC_TEST?"magic":"wallet"}function _6(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function Iu(e){return Math.round(e*10)/100}function Kv(e){return!e.tokenId}function TX(e){return{item_id:e.itemId??null,contract_address:e.contractAddress,token_id:e.tokenId??null,trade_id:e.tradeId??null,price_credits:e.priceCredits,price_usd:Iu(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:Kv(e)}}function IX(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(Kv);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:Iu(n.priceCredits)})),value_credits:t,value_usd:Iu(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function E6(e){const t=e;if((t==null?void 0:t.code)===4001)return"user_rejected";const r=((t==null?void 0:t.message)??"").toLowerCase();return r.includes("reject")||r.includes("denied")||r.includes("cancel")?"user_rejected":r.includes("insufficient")?"insufficient_credits":r.includes("not for sale")||r.includes("no active listing")||r.includes("sold")?"not_for_sale":"unknown"}function wX(e){return E6(e)==="user_rejected"}function v6(e){const t=window;if(t.analytics&&t.analytics.invoked)return;const r=t.analytics||[];r.invoked=!0,r.methods=["track","identify","page","group","alias","ready","on","once","off","reset","setAnonymousId"],r.factory=n=>(...i)=>(r.push([n,...i]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const i=document.createElement("script");i.async=!0,i.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(i)},t.analytics=r,r.load(e),r.page()}let eP=!1;function b6(){if(eP)return;eP=!0;const e=St.segmentWriteKey;e&&v6(e)}let TE=null;function S6(e){TE=e}function tP(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),TE)try{TE(e,t)}catch{}}const T6=/0x[a-fA-F0-9]{130}\b/g,I6=/0x[a-fA-F0-9]{64}\b/g,w6=/(sk_[a-z]+_[A-Za-z0-9]+|pi_[A-Za-z0-9]+_secret_[A-Za-z0-9]+|[A-Za-z0-9-]*secret[A-Za-z0-9-]*)/gi,R6=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Do(e){return e.replace(T6,"<signature>").replace(w6,"<secret>").replace(I6,"<hex32>")}function A6(e){var r;e.message&&(e.message=Do(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Do(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Do(n.message));e.request&&(e.request.url&&(e.request.url=Do(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(R6.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Do(n[i]))}};return t(e.tags),t(e.extra),e}let rP=!1;function O6(){if(rP)return;const e=St.sentryDsn;if(!e)return;rP=!0,yH({dsn:e,environment:St.sentryEnvironment,release:St.sentryRelease,integrations:[new nF],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:A6});const t=P6();t&&RB({id:t}),S6((r,n)=>lv(r,{extra:n}))}function P6(){var e;try{return((e=oo.getState().session)==null?void 0:e.address)??null}catch{return null}}const nP="shop-favorites";let Ed=null;const LD=e=>e?`${nP}:${e.toLowerCase()}`:nP;function iP(e){var t;try{const r=localStorage.getItem(LD(e));if(!r)return{};const n=JSON.parse(r);if(!n||typeof n!="object")return{};const i="state"in n&&((t=n.state)!=null&&t.items)?n.state.items:n;return i&&typeof i=="object"?i:{}}catch{return{}}}function aP(e){try{localStorage.setItem(LD(Ed),JSON.stringify(e))}catch{}}const Ld=so(e=>({items:iP(Ed),toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,aP(n),{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],aP(n),{items:n}}),reloadFor:t=>{Ed=t?t.toLowerCase():null,e({items:iP(Ed)})}})),sP="shop:followed-creators:v1",N6=200;let Xv=null;const $D=e=>e?`${sP}:${e.toLowerCase()}`:sP;function oP(){try{const e=localStorage.getItem($D(Xv));if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function uP(e){try{localStorage.setItem($D(Xv),JSON.stringify(e))}catch{}}const IE=so((e,t)=>({followed:oP(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const i=[n,...t().followed].slice(0,N6);uP(i),e({followed:i}),yn("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const i=t().followed.filter(a=>a!==n);uP(i),e({followed:i}),yn("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r),reloadFor:r=>{Xv=r?r.toLowerCase():null,e({followed:oP()})}})),Ig="shop:signing_in",oo=so(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(Ig,"1")}catch{}u6()},disconnect:async()=>{yn("Shop Signed Out");try{await l6()}catch(t){tP(t,{flow:"wallet",step:"disconnect"})}y6(),Ld.getState().reloadFor(null),IE.getState().reloadFor(null),e({session:null})},restore:async()=>{let t;try{t=await c6()}catch(n){tP(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),Ld.getState().reloadFor(t.address),IE.getState().reloadFor(t.address),h6(t.address,{sign_in_method:ZO(t.providerType)});let r=!1;try{r=sessionStorage.getItem(Ig)==="1",r&&sessionStorage.removeItem(Ig)}catch{}r&&yn("Shop Signed In",{method:ZO(t.providerType),is_new_user:_6(t.address)})}}));async function qD(e){var n;const t=await fetch(`${St.peerUrl}/lambdas/profiles/${e.toLowerCase()}`);if(!t.ok)return;const r=await t.json();return(n=r==null?void 0:r.avatars)==null?void 0:n[0]}function ff(e){return ji({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:()=>qD(e)})}var ri={},wg={},cP;function kD(){return cP||(cP=1,Object.defineProperty(wg,"__esModule",{value:!0})),wg}var ni={},Cn={},cs={},Sa={},lP={},Lo,dP;function Tn(){if(dP)return Lo;dP=1;var e=function(t){return t&&t.Math===Math&&t};return Lo=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof $_=="object"&&$_)||e(typeof Lo=="object"&&Lo)||(function(){return this})()||Function("return this")(),Lo}var Rg,fP;function Za(){return fP||(fP=1,Rg=function(e){try{return!!e()}catch{return!0}}),Rg}var Ag,pP;function pf(){if(pP)return Ag;pP=1;var e=Za();return Ag=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Ag}var Og,mP;function C6(){if(mP)return Og;mP=1;var e=pf(),t=Function.prototype,r=t.apply,n=t.call;return Og=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Og}var Pg,hP;function uo(){if(hP)return Pg;hP=1;var e=pf(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Pg=e?n:function(i){return function(){return r.apply(i,arguments)}},Pg}var Ng,yP;function BD(){if(yP)return Ng;yP=1;var e=uo(),t=e({}.toString),r=e("".slice);return Ng=function(n){return r(t(n),8,-1)},Ng}var Cg,gP;function UD(){if(gP)return Cg;gP=1;var e=BD(),t=uo();return Cg=function(r){if(e(r)==="Function")return t(r)},Cg}var Mg,_P;function es(){if(_P)return Mg;_P=1;var e=typeof document=="object"&&document.all;return Mg=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Mg}var jg={},Dg,EP;function Ku(){if(EP)return Dg;EP=1;var e=Za();return Dg=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Dg}var Lg,vP;function Jv(){if(vP)return Lg;vP=1;var e=pf(),t=Function.prototype.call;return Lg=e?t.bind(t):function(){return t.apply(t,arguments)},Lg}var $g={},bP;function M6(){if(bP)return $g;bP=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return $g.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,$g}var qg,SP;function FD(){return SP||(SP=1,qg=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),qg}var kg,TP;function j6(){if(TP)return kg;TP=1;var e=uo(),t=Za(),r=BD(),n=Object,i=e("".split);return kg=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,kg}var Bg,IP;function HD(){return IP||(IP=1,Bg=function(e){return e==null}),Bg}var Ug,wP;function VD(){if(wP)return Ug;wP=1;var e=HD(),t=TypeError;return Ug=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Ug}var Fg,RP;function D6(){if(RP)return Fg;RP=1;var e=j6(),t=VD();return Fg=function(r){return e(t(r))},Fg}var Hg,AP;function mf(){if(AP)return Hg;AP=1;var e=es();return Hg=function(t){return typeof t=="object"?t!==null:e(t)},Hg}var Vg,OP;function GD(){return OP||(OP=1,Vg={}),Vg}var Gg,PP;function L6(){if(PP)return Gg;PP=1;var e=GD(),t=Tn(),r=es(),n=function(i){return r(i)?i:void 0};return Gg=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Gg}var xg,NP;function $6(){if(NP)return xg;NP=1;var e=uo();return xg=e({}.isPrototypeOf),xg}var zg,CP;function q6(){if(CP)return zg;CP=1;var e=Tn(),t=e.navigator,r=t&&t.userAgent;return zg=r?String(r):"",zg}var Wg,MP;function k6(){if(MP)return Wg;MP=1;var e=Tn(),t=q6(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),Wg=o,Wg}var Yg,jP;function xD(){if(jP)return Yg;jP=1;var e=k6(),t=Za(),r=Tn(),n=r.String;return Yg=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Yg}var Kg,DP;function zD(){if(DP)return Kg;DP=1;var e=xD();return Kg=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Kg}var Xg,LP;function WD(){if(LP)return Xg;LP=1;var e=L6(),t=es(),r=$6(),n=zD(),i=Object;return Xg=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Xg}var Jg,$P;function B6(){if($P)return Jg;$P=1;var e=String;return Jg=function(t){try{return e(t)}catch{return"Object"}},Jg}var Qg,qP;function YD(){if(qP)return Qg;qP=1;var e=es(),t=B6(),r=TypeError;return Qg=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Qg}var Zg,kP;function U6(){if(kP)return Zg;kP=1;var e=YD(),t=HD();return Zg=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Zg}var e_,BP;function F6(){if(BP)return e_;BP=1;var e=Jv(),t=es(),r=mf(),n=TypeError;return e_=function(i,a){var s,o;if(a==="string"&&t(s=i.toString)&&!r(o=e(s,i))||t(s=i.valueOf)&&!r(o=e(s,i))||a!=="string"&&t(s=i.toString)&&!r(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},e_}var t_={exports:{}},r_,UP;function H6(){return UP||(UP=1,r_=!0),r_}var n_,FP;function V6(){if(FP)return n_;FP=1;var e=Tn(),t=Object.defineProperty;return n_=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},n_}var HP;function G6(){if(HP)return t_.exports;HP=1;var e=H6(),t=Tn(),r=V6(),n="__core-js_shared__",i=t_.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),t_.exports}var i_,VP;function x6(){if(VP)return i_;VP=1;var e=G6();return i_=function(t,r){return e[t]||(e[t]=r||{})},i_}var a_,GP;function z6(){if(GP)return a_;GP=1;var e=VD(),t=Object;return a_=function(r){return t(e(r))},a_}var s_,xP;function Qv(){if(xP)return s_;xP=1;var e=uo(),t=z6(),r=e({}.hasOwnProperty);return s_=Object.hasOwn||function(i,a){return r(t(i),a)},s_}var o_,zP;function W6(){if(zP)return o_;zP=1;var e=uo(),t=0,r=Math.random(),n=e(1.1.toString);return o_=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},o_}var u_,WP;function Y6(){if(WP)return u_;WP=1;var e=Tn(),t=x6(),r=Qv(),n=W6(),i=xD(),a=zD(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return u_=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},u_}var c_,YP;function K6(){if(YP)return c_;YP=1;var e=Jv(),t=mf(),r=WD(),n=U6(),i=F6(),a=Y6(),s=TypeError,o=a("toPrimitive");return c_=function(u,l){if(!t(u)||r(u))return u;var c=n(u,o),d;if(c){if(l===void 0&&(l="default"),d=e(c,u,l),!t(d)||r(d))return d;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},c_}var l_,KP;function KD(){if(KP)return l_;KP=1;var e=K6(),t=WD();return l_=function(r){var n=e(r,"string");return t(n)?n:n+""},l_}var d_,XP;function X6(){if(XP)return d_;XP=1;var e=Tn(),t=mf(),r=e.document,n=t(r)&&t(r.createElement);return d_=function(i){return n?r.createElement(i):{}},d_}var f_,JP;function XD(){if(JP)return f_;JP=1;var e=Ku(),t=Za(),r=X6();return f_=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),f_}var QP;function J6(){if(QP)return jg;QP=1;var e=Ku(),t=Jv(),r=M6(),n=FD(),i=D6(),a=KD(),s=Qv(),o=XD(),u=Object.getOwnPropertyDescriptor;return jg.f=e?u:function(c,d){if(c=i(c),d=a(d),o)try{return u(c,d)}catch{}if(s(c,d))return n(!t(r.f,c,d),c[d])},jg}var p_,ZP;function Q6(){if(ZP)return p_;ZP=1;var e=Za(),t=es(),r=/#|\.prototype\./,n=function(u,l){var c=a[i(u)];return c===o?!0:c===s?!1:t(l)?e(l):!!l},i=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return p_=n,p_}var m_,eN;function Z6(){if(eN)return m_;eN=1;var e=UD(),t=YD(),r=pf(),n=e(e.bind);return m_=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},m_}var h_={},y_,tN;function e8(){if(tN)return y_;tN=1;var e=Ku(),t=Za();return y_=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),y_}var g_,rN;function t8(){if(rN)return g_;rN=1;var e=mf(),t=String,r=TypeError;return g_=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},g_}var nN;function r8(){if(nN)return h_;nN=1;var e=Ku(),t=XD(),r=e8(),n=t8(),i=KD(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return h_.f=e?r?function(f,p,y){if(n(f),p=i(p),n(y),typeof f=="function"&&p==="prototype"&&"value"in y&&c in y&&!y[c]){var g=o(f,p);g&&g[c]&&(f[p]=y.value,y={configurable:l in y?y[l]:g[l],enumerable:u in y?y[u]:g[u],writable:!1})}return s(f,p,y)}:s:function(f,p,y){if(n(f),p=i(p),n(y),t)try{return s(f,p,y)}catch{}if("get"in y||"set"in y)throw new a("Accessors not supported");return"value"in y&&(f[p]=y.value),f},h_}var __,iN;function n8(){if(iN)return __;iN=1;var e=Ku(),t=r8(),r=FD();return __=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},__}var E_,aN;function i8(){if(aN)return E_;aN=1;var e=Tn(),t=C6(),r=UD(),n=es(),i=J6().f,a=Q6(),s=GD(),o=Z6(),u=n8(),l=Qv(),c=function(d){var f=function(p,y,g){if(this instanceof f){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,y)}return new d(p,y,g)}return t(d,this,arguments)};return f.prototype=d.prototype,f};return E_=function(d,f){var p=d.target,y=d.global,g=d.stat,T=d.proto,P=y?e:g?e[p]:e[p]&&e[p].prototype,m=y?s:s[p]||u(s,p,{})[p],w=m.prototype,I,h,E,v,O,C,$,B,V;for(v in f)I=a(y?v:p+(g?".":"#")+v,d.forced),h=!I&&P&&l(P,v),C=m[v],h&&(d.dontCallGetSet?(V=i(P,v),$=V&&V.value):$=P[v]),O=h&&$?$:f[v],!(!I&&!T&&typeof C==typeof O)&&(d.bind&&h?B=o(O,e):d.wrap&&h?B=c(O):T&&n(O)?B=r(O):B=O,(d.sham||O&&O.sham||C&&C.sham)&&u(B,"sham",!0),u(m,v,B),T&&(E=p+"Prototype",l(s,E)||u(s,E,{}),u(s[E],v,O),d.real&&w&&(I||!w[v])&&u(w,v,O)))},E_}var sN;function a8(){if(sN)return lP;sN=1;var e=i8(),t=Tn();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),lP}var v_,oN;function s8(){return oN||(oN=1,a8(),v_=Tn()),v_}var b_,uN;function o8(){if(uN)return b_;uN=1;var e=s8();return b_=e,b_}var cN;function JD(){if(cN)return Sa;cN=1;var e=Sa&&Sa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.getImplementation=void 0;var t=e(o8());function r(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:t.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return Sa.getImplementation=r,Sa}var lN;function QD(){if(lN)return cs;lN=1;var e=cs&&cs.__values||function(o){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&o[u],c=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&c>=o.length&&(o=void 0),{value:o&&o[c++],done:!o}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(cs,"__esModule",{value:!0});var t=PD(),r=JD(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var u=(0,r.getImplementation)(o,"Headers");return function(c,d,f,p,y){var g,T,P=new u(y),m=String(Date.now()),w=JSON.stringify(p),I=[d,f,m,w].join(":").toLowerCase(),h=0,E=t.Authenticator.signPayload(c,I);try{for(var v=e(E),O=v.next();!O.done;O=v.next()){var C=O.value;P.set(n+h,JSON.stringify(C)),h++}}catch($){g={error:$}}finally{try{O&&!O.done&&(T=v.return)&&T.call(v)}finally{if(g)throw g.error}}return P.set(i,m),P.set(a,w),P}}return cs.default=s,cs}var dN;function ZD(){if(dN)return Cn;dN=1;var e=Cn&&Cn.__assign||function(){return e=Object.assign||function(s){for(var o,u=1,l=arguments.length;u<l;u++){o=arguments[u];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])}return s},e.apply(this,arguments)},t=Cn&&Cn.__rest||function(s,o){var u={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(u[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(s);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(s,l[c])&&(u[l[c]]=s[l[c]]);return u},r=Cn&&Cn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Cn,"__esModule",{value:!0});var n=r(QD()),i=JD();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),u=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),c=(0,i.getImplementation)(s,"fetch");return function(f,p){if(p&&p.identity){var y=p.identity,g=p.metadata,T=t(p,["identity","metadata"]);if(typeof f=="string"||f instanceof u||globalThis.URL&&f instanceof globalThis.URL){var P=typeof f=="string"?new u(f):f,m=new l(P.toString(),e(e({},T),{headers:o(y,p.method||"GET",P.pathname,g||{},T==null?void 0:T.headers)}));return c(m)}var w=new u(f.url),I=new l(f),h=o(y,f.method||"GET",w.pathname,g||{});return h.forEach(function(E,v){I.headers.set(v,E)}),c(I)}return c(f,p)}}return Cn.default=a,Cn}var fN;function u8(){return fN||(fN=1,(function(e){var t=ni&&ni.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[u]}})}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=ni&&ni.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=ni&&ni.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(kD(),e);var i=ZD();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=QD();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(ni)),ni}var pN;function c8(){return pN||(pN=1,(function(e){var t=ri&&ri.__createBinding||(Object.create?(function(a,s,o,u){u===void 0&&(u=o),Object.defineProperty(a,u,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]})),r=ri&&ri.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=ri&&ri.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(kD(),e),r(u8(),e);var i=n(ZD());e.default=(0,i.default)()})(ri)),ri}var l8=c8();const hf=Ud(l8);async function d8(e,t){const r=`${St.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await hf(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function f8(e,t){const{usd:r}=await d8(e,t);return r??{balanceCents:0,credits:0}}async function RX(e,t,r){const n=`${St.creditsServerUrl}/credits/authorize`,i=await hf(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function AX(e,t,r){const n=new URLSearchParams;n.set("status","all"),n.set("limit",String(r.first)),(r==null?void 0:r.skip)!=null&&n.set("offset",String(r.skip));const i=n.toString(),a=`${St.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await hf(a,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),u=o.purchases??[],l=(r==null?void 0:r.skip)??0,c=r==null?void 0:r.first,d=typeof o.total=="number"?o.total:l+u.length+(u.length>=c?1:0);return{items:u,total:d}}async function OX(e,t){if(t.length===0)return 0;const r=`${St.creditsServerUrl}/credits/authorize/cancel`,n=await hf(r,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({salts:t})});if(!n.ok)throw new Error(`cancelUsdIntents ${n.status}: ${await n.text()}`);return(await n.json()).released??0}async function PX(e,t=1e3){const r=await fetch(`${St.creditsServerUrl}/dev/mint-usd`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e.toLowerCase(),usdCents:t})});if(!r.ok)throw new Error(`devMintUsd ${r.status}: ${await r.text()}`);return r.json()}function p8(e){return ji({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>f8(e.address,e.identity)})}const m8=e=>Iu(e.reduce((t,r)=>t+r.priceCredits,0)),mn=so((e,t)=>({items:[],open:!1,fittingOpen:!1,add:(r,n="grid")=>{const i=t().items.some(s=>s.id===r.id);if(e(s=>i?{open:!0}:{items:[...s.items,r],open:!0}),i)return;const a=t().items;yn("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:Iu(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:m8(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&yn("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),setOpen:r=>e({open:r}),setFittingOpen:r=>e(r?{fittingOpen:r,open:!1}:{fittingOpen:r})})),zs={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function NX(e){return`${e} ${e===1?zs.nameSingular:zs.name}`}function Un({className:e}){return H.jsx("span",{className:`ico ${zs.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function h8(){const e=mn(s=>s.items),t=mn(s=>s.open),r=mn(s=>s.setOpen),n=mn(s=>s.setFittingOpen),i=Se.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return Se.useEffect(()=>{if(!t)return;const s=setTimeout(()=>r(!1),4500),o=u=>{i.current&&!i.current.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",o),()=>{clearTimeout(s),document.removeEventListener("mousedown",o)}},[t,e.length,r]),!t||e.length===0?null:H.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[H.jsxs("div",{className:"cart-pop__head",children:[H.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),H.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>H.jsxs("div",{className:"cart-pop__row",children:[H.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?H.jsx("img",{src:s.thumbnail,alt:s.name}):null}),H.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),H.jsxs("div",{className:"cart-pop__price",children:[H.jsx(Un,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),H.jsxs("div",{className:"cart-pop__foot",children:[H.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",H.jsxs("strong",{children:[H.jsx(Un,{className:"ccy-mark"})," ",a]})]}),H.jsxs("div",{className:"cart-pop__actions",children:[H.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),H.jsx(hu,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var $o={},S_={exports:{}},mN;function Zv(){return mN||(mN=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(S_)),S_.exports}var T_={};function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tt.apply(null,arguments)}function Ti(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eL(e){if(Se.isValidElement(e)||!Ti(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=eL(e[r])}),t}function Vn(e,t,r={clone:!0}){const n=r.clone?Tt({},e):e;return Ti(e)&&Ti(t)&&Object.keys(t).forEach(i=>{Se.isValidElement(t[i])?n[i]=t[i]:Ti(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ti(e[i])?n[i]=Vn(e[i],t[i],r):r.clone?n[i]=Ti(t[i])?eL(t[i]):t[i]:n[i]=t[i]}),n}const y8=Object.freeze(Object.defineProperty({__proto__:null,default:Vn,isPlainObject:Ti},Symbol.toStringTag,{value:"Module"}));function wu(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const g8=Object.freeze(Object.defineProperty({__proto__:null,default:wu},Symbol.toStringTag,{value:"Module"}));var I_={exports:{}},At={};/**
|
|
75
|
+
* @license React
|
|
76
|
+
* react-is.production.js
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the MIT license found in the
|
|
81
|
+
* LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/var hN;function _8(){if(hN)return At;hN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function y(g){if(typeof g=="object"&&g!==null){var T=g.$$typeof;switch(T){case e:switch(g=g.type,g){case r:case i:case n:case u:case l:case f:return g;default:switch(g=g&&g.$$typeof,g){case s:case o:case d:case c:return g;case a:return g;default:return T}}case t:return T}}}return At.ContextConsumer=a,At.ContextProvider=s,At.Element=e,At.ForwardRef=o,At.Fragment=r,At.Lazy=d,At.Memo=c,At.Portal=t,At.Profiler=i,At.StrictMode=n,At.Suspense=u,At.SuspenseList=l,At.isContextConsumer=function(g){return y(g)===a},At.isContextProvider=function(g){return y(g)===s},At.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},At.isForwardRef=function(g){return y(g)===o},At.isFragment=function(g){return y(g)===r},At.isLazy=function(g){return y(g)===d},At.isMemo=function(g){return y(g)===c},At.isPortal=function(g){return y(g)===t},At.isProfiler=function(g){return y(g)===i},At.isStrictMode=function(g){return y(g)===n},At.isSuspense=function(g){return y(g)===u},At.isSuspenseList=function(g){return y(g)===l},At.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===n||g===u||g===l||typeof g=="object"&&g!==null&&(g.$$typeof===d||g.$$typeof===c||g.$$typeof===s||g.$$typeof===a||g.$$typeof===o||g.$$typeof===p||g.getModuleId!==void 0)},At.typeOf=y,At}var yN;function E8(){return yN||(yN=1,I_.exports=_8()),I_.exports}var gN=E8();const v8=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function tL(e){const t=`${e}`.match(v8);return t&&t[1]||""}function rL(e,t=""){return e.displayName||e.name||tL(e)||t}function _N(e,t,r){const n=rL(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function b8(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return rL(e,"Component");if(typeof e=="object")switch(e.$$typeof){case gN.ForwardRef:return _N(e,e.render,"ForwardRef");case gN.Memo:return _N(e,e.type,"memo");default:return}}}const S8=Object.freeze(Object.defineProperty({__proto__:null,default:b8,getFunctionName:tL},Symbol.toStringTag,{value:"Module"}));function Di(e){if(typeof e!="string")throw new Error(wu(7));return e.charAt(0).toUpperCase()+e.slice(1)}const T8=Object.freeze(Object.defineProperty({__proto__:null,default:Di},Symbol.toStringTag,{value:"Module"}));function I8(...e){return e.reduce((t,r)=>r==null?t:function(...i){t.apply(this,i),r.apply(this,i)},()=>{})}function w8(e,t=166){let r;function n(...i){const a=()=>{e.apply(this,i)};clearTimeout(r),r=setTimeout(a,t)}return n.clear=()=>{clearTimeout(r)},n}function R8(e,t){return()=>null}function A8(e,t){var r,n;return Se.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function nL(e){return e&&e.ownerDocument||document}function O8(e){return nL(e).defaultView||window}function P8(e,t){return()=>null}function iL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const aL=typeof window<"u"?Se.useLayoutEffect:Se.useEffect;let EN=0;function N8(e){const[t,r]=Se.useState(e),n=e||t;return Se.useEffect(()=>{t==null&&(EN+=1,r(`mui-${EN}`))},[t]),n}const vN=q_.useId;function C8(e){if(vN!==void 0){const t=vN();return e??t}return N8(e)}function M8(e,t,r,n,i){return null}function j8({controlled:e,default:t,name:r,state:n="value"}){const{current:i}=Se.useRef(e!==void 0),[a,s]=Se.useState(t),o=i?e:a,u=Se.useCallback(l=>{i||s(l)},[]);return[o,u]}function D8(e){const t=Se.useRef(e);return aL(()=>{t.current=e}),Se.useRef((...r)=>(0,t.current)(...r)).current}function L8(...e){return Se.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{iL(r,t)})},e)}const bN={};function $8(e,t){const r=Se.useRef(bN);return r.current===bN&&(r.current=e(t)),r}const q8=[];function k8(e){Se.useEffect(e,q8)}class yf{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new yf}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function CX(){const e=$8(yf.create).current;return k8(e.disposeEffect),e}let gf=!0,wE=!1;const B8=new yf,U8={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function F8(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&U8[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function H8(e){e.metaKey||e.altKey||e.ctrlKey||(gf=!0)}function w_(){gf=!1}function V8(){this.visibilityState==="hidden"&&wE&&(gf=!0)}function G8(e){e.addEventListener("keydown",H8,!0),e.addEventListener("mousedown",w_,!0),e.addEventListener("pointerdown",w_,!0),e.addEventListener("touchstart",w_,!0),e.addEventListener("visibilitychange",V8,!0)}function x8(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return gf||F8(t)}function z8(){const e=Se.useCallback(i=>{i!=null&&G8(i.ownerDocument)},[]),t=Se.useRef(!1);function r(){return t.current?(wE=!0,B8.start(100,()=>{wE=!1}),t.current=!1,!0):!1}function n(i){return x8(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function RE(e,t){const r=Tt({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=Tt({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const i=e[n]||{},a=t[n];r[n]={},!a||!Object.keys(a)?r[n]=i:!i||!Object.keys(i)?r[n]=a:(r[n]=Tt({},a),Object.keys(i).forEach(s=>{r[n][s]=RE(i[s],a[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function W8(e,t,r=void 0){const n={};return Object.keys(e).forEach(i=>{n[i]=e[i].reduce((a,s)=>{if(s){const o=t(s);o!==""&&a.push(o),r&&r[s]&&a.push(r[s])}return a},[]).join(" ")}),n}const SN=e=>e,Y8=()=>{let e=SN;return{configure(t){e=t},generate(t){return e(t)},reset(){e=SN}}},sL=Y8(),K8={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function oL(e,t,r="Mui"){const n=K8[t];return n?`${r}-${n}`:`${sL.generate(e)}-${t}`}function X8(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=oL(e,i,r)}),n}function J8(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const Q8=Object.freeze(Object.defineProperty({__proto__:null,default:J8},Symbol.toStringTag,{value:"Module"}));function $i(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function uL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=uL(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Z8(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=uL(e))&&(n&&(n+=" "),n+=t);return n}const cL=Se.createContext(void 0);function MX({value:e,children:t}){return H.jsx(cL.Provider,{value:e,children:t})}function ez(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?RE(i.defaultProps,n):!i.styleOverrides&&!i.variants?RE(i,n):n}function tz({props:e,name:t}){const r=Se.useContext(cL);return ez({props:e,name:t,theme:{components:r}})}function rz(e){return tz(e)}var Ta={},R_={exports:{}},TN;function nz(){return TN||(TN=1,(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(R_)),R_.exports}var A_={exports:{}},IN;function iz(){return IN||(IN=1,(function(e){function t(r,n){if(r==null)return{};var i={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(n.indexOf(a)!==-1)continue;i[a]=r[a]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(A_)),A_.exports}function az(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function sz(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var oz=(function(){function e(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sz(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=az(i);try{a.insertRule(n,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),vr="-ms-",$d="-moz-",yt="-webkit-",lL="comm",eb="rule",tb="decl",uz="@import",dL="@keyframes",cz="@layer",lz=Math.abs,_f=String.fromCharCode,dz=Object.assign;function fz(e,t){return lr(e,0)^45?(((t<<2^lr(e,0))<<2^lr(e,1))<<2^lr(e,2))<<2^lr(e,3):0}function fL(e){return e.trim()}function pz(e,t){return(e=t.exec(e))?e[0]:e}function gt(e,t,r){return e.replace(t,r)}function AE(e,t){return e.indexOf(t)}function lr(e,t){return e.charCodeAt(t)|0}function Ru(e,t,r){return e.slice(t,r)}function $n(e){return e.length}function rb(e){return e.length}function dd(e,t){return t.push(e),e}function mz(e,t){return e.map(t).join("")}var Ef=1,Ws=1,pL=0,Br=0,Qt=0,co="";function vf(e,t,r,n,i,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Ef,column:Ws,length:s,return:""}}function qo(e,t){return dz(vf("",null,null,"",null,null,0),e,{length:-e.length},t)}function hz(){return Qt}function yz(){return Qt=Br>0?lr(co,--Br):0,Ws--,Qt===10&&(Ws=1,Ef--),Qt}function Wr(){return Qt=Br<pL?lr(co,Br++):0,Ws++,Qt===10&&(Ws=1,Ef++),Qt}function Gn(){return lr(co,Br)}function vd(){return Br}function Xu(e,t){return Ru(co,e,t)}function Au(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 mL(e){return Ef=Ws=1,pL=$n(co=e),Br=0,[]}function hL(e){return co="",e}function bd(e){return fL(Xu(Br-1,OE(e===91?e+2:e===40?e+1:e)))}function gz(e){for(;(Qt=Gn())&&Qt<33;)Wr();return Au(e)>2||Au(Qt)>3?"":" "}function _z(e,t){for(;--t&&Wr()&&!(Qt<48||Qt>102||Qt>57&&Qt<65||Qt>70&&Qt<97););return Xu(e,vd()+(t<6&&Gn()==32&&Wr()==32))}function OE(e){for(;Wr();)switch(Qt){case e:return Br;case 34:case 39:e!==34&&e!==39&&OE(Qt);break;case 40:e===41&&OE(e);break;case 92:Wr();break}return Br}function Ez(e,t){for(;Wr()&&e+Qt!==57;)if(e+Qt===84&&Gn()===47)break;return"/*"+Xu(t,Br-1)+"*"+_f(e===47?e:Wr())}function vz(e){for(;!Au(Gn());)Wr();return Xu(e,Br)}function bz(e){return hL(Sd("",null,null,null,[""],e=mL(e),0,[0],e))}function Sd(e,t,r,n,i,a,s,o,u){for(var l=0,c=0,d=s,f=0,p=0,y=0,g=1,T=1,P=1,m=0,w="",I=i,h=a,E=n,v=w;T;)switch(y=m,m=Wr()){case 40:if(y!=108&&lr(v,d-1)==58){AE(v+=gt(bd(m),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:v+=bd(m);break;case 9:case 10:case 13:case 32:v+=gz(y);break;case 92:v+=_z(vd()-1,7);continue;case 47:switch(Gn()){case 42:case 47:dd(Sz(Ez(Wr(),vd()),t,r),u);break;default:v+="/"}break;case 123*g:o[l++]=$n(v)*P;case 125*g:case 59:case 0:switch(m){case 0:case 125:T=0;case 59+c:P==-1&&(v=gt(v,/\f/g,"")),p>0&&$n(v)-d&&dd(p>32?RN(v+";",n,r,d-1):RN(gt(v," ","")+";",n,r,d-2),u);break;case 59:v+=";";default:if(dd(E=wN(v,t,r,l,c,i,o,w,I=[],h=[],d),a),m===123)if(c===0)Sd(v,t,E,E,I,a,d,o,h);else switch(f===99&&lr(v,3)===110?100:f){case 100:case 108:case 109:case 115:Sd(e,E,E,n&&dd(wN(e,E,E,0,0,i,o,w,i,I=[],d),h),i,h,d,o,n?I:h);break;default:Sd(v,E,E,E,[""],h,0,o,h)}}l=c=p=0,g=P=1,w=v="",d=s;break;case 58:d=1+$n(v),p=y;default:if(g<1){if(m==123)--g;else if(m==125&&g++==0&&yz()==125)continue}switch(v+=_f(m),m*g){case 38:P=c>0?1:(v+="\f",-1);break;case 44:o[l++]=($n(v)-1)*P,P=1;break;case 64:Gn()===45&&(v+=bd(Wr())),f=Gn(),c=d=$n(w=v+=vz(vd())),m++;break;case 45:y===45&&$n(v)==2&&(g=0)}}return a}function wN(e,t,r,n,i,a,s,o,u,l,c){for(var d=i-1,f=i===0?a:[""],p=rb(f),y=0,g=0,T=0;y<n;++y)for(var P=0,m=Ru(e,d+1,d=lz(g=s[y])),w=e;P<p;++P)(w=fL(g>0?f[P]+" "+m:gt(m,/&\f/g,f[P])))&&(u[T++]=w);return vf(e,t,r,i===0?eb:o,u,l,c)}function Sz(e,t,r){return vf(e,t,r,lL,_f(hz()),Ru(e,2,-2),0)}function RN(e,t,r,n){return vf(e,t,r,tb,Ru(e,0,n),Ru(e,n+1,-1),n)}function Ts(e,t){for(var r="",n=rb(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Tz(e,t,r,n){switch(e.type){case cz:if(e.children.length)break;case uz:case tb:return e.return=e.return||e.value;case lL:return"";case dL:return e.return=e.value+"{"+Ts(e.children,n)+"}";case eb:e.value=e.props.join(",")}return $n(r=Ts(e.children,n))?e.return=e.value+"{"+r+"}":""}function Iz(e){var t=rb(e);return function(r,n,i,a){for(var s="",o=0;o<t;o++)s+=e[o](r,n,i,a)||"";return s}}function wz(e){return function(t){t.root||(t=t.return)&&e(t)}}function yL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Rz=function(t,r,n){for(var i=0,a=0;i=a,a=Gn(),i===38&&a===12&&(r[n]=1),!Au(a);)Wr();return Xu(t,Br)},Az=function(t,r){var n=-1,i=44;do switch(Au(i)){case 0:i===38&&Gn()===12&&(r[n]=1),t[n]+=Rz(Br-1,r,n);break;case 2:t[n]+=bd(i);break;case 4:if(i===44){t[++n]=Gn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=_f(i)}while(i=Wr());return t},Oz=function(t,r){return hL(Az(mL(t),r))},AN=new WeakMap,Pz=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!AN.get(n))&&!i){AN.set(t,!0);for(var a=[],s=Oz(r,a),o=n.props,u=0,l=0;u<s.length;u++)for(var c=0;c<o.length;c++,l++)t.props[l]=a[u]?s[u].replace(/&\f/g,o[c]):o[c]+" "+s[u]}}},Nz=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function gL(e,t){switch(fz(e,t)){case 5103:return yt+"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 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return yt+e+$d+e+vr+e+e;case 6828:case 4268:return yt+e+vr+e+e;case 6165:return yt+e+vr+"flex-"+e+e;case 5187:return yt+e+gt(e,/(\w+).+(:[^]+)/,yt+"box-$1$2"+vr+"flex-$1$2")+e;case 5443:return yt+e+vr+"flex-item-"+gt(e,/flex-|-self/,"")+e;case 4675:return yt+e+vr+"flex-line-pack"+gt(e,/align-content|flex-|-self/,"")+e;case 5548:return yt+e+vr+gt(e,"shrink","negative")+e;case 5292:return yt+e+vr+gt(e,"basis","preferred-size")+e;case 6060:return yt+"box-"+gt(e,"-grow","")+yt+e+vr+gt(e,"grow","positive")+e;case 4554:return yt+gt(e,/([^-])(transform)/g,"$1"+yt+"$2")+e;case 6187:return gt(gt(gt(e,/(zoom-|grab)/,yt+"$1"),/(image-set)/,yt+"$1"),e,"")+e;case 5495:case 3959:return gt(e,/(image-set\([^]*)/,yt+"$1$`$1");case 4968:return gt(gt(e,/(.+:)(flex-)?(.*)/,yt+"box-pack:$3"+vr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yt+e+e;case 4095:case 3583:case 4068:case 2532:return gt(e,/(.+)-inline(.+)/,yt+"$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($n(e)-1-t>6)switch(lr(e,t+1)){case 109:if(lr(e,t+4)!==45)break;case 102:return gt(e,/(.+:)(.+)-([^]+)/,"$1"+yt+"$2-$3$1"+$d+(lr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~AE(e,"stretch")?gL(gt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(lr(e,t+1)!==115)break;case 6444:switch(lr(e,$n(e)-3-(~AE(e,"!important")&&10))){case 107:return gt(e,":",":"+yt)+e;case 101:return gt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+yt+(lr(e,14)===45?"inline-":"")+"box$3$1"+yt+"$2$3$1"+vr+"$2box$3")+e}break;case 5936:switch(lr(e,t+11)){case 114:return yt+e+vr+gt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return yt+e+vr+gt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return yt+e+vr+gt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return yt+e+vr+e+e}return e}var Cz=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case tb:t.return=gL(t.value,t.length);break;case dL:return Ts([qo(t,{value:gt(t.value,"@","@"+yt)})],i);case eb:if(t.length)return mz(t.props,function(a){switch(pz(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ts([qo(t,{props:[gt(a,/:(read-\w+)/,":"+$d+"$1")]})],i);case"::placeholder":return Ts([qo(t,{props:[gt(a,/:(plac\w+)/,":"+yt+"input-$1")]}),qo(t,{props:[gt(a,/:(plac\w+)/,":"+$d+"$1")]}),qo(t,{props:[gt(a,/:(plac\w+)/,vr+"input-$1")]})],i)}return""})}},Mz=[Cz],_L=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var T=g.getAttribute("data-emotion");T.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||Mz,a={},s,o=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var T=g.getAttribute("data-emotion").split(" "),P=1;P<T.length;P++)a[T[P]]=!0;o.push(g)});var u,l=[Pz,Nz];{var c,d=[Tz,wz(function(g){c.insert(g)})],f=Iz(l.concat(i,d)),p=function(T){return Ts(bz(T),f)};u=function(T,P,m,w){c=m,p(T?T+"{"+P.styles+"}":P.styles),w&&(y.inserted[P.name]=!0)}}var y={key:r,sheet:new oz({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return y.sheet.hydrate(o),y},jz=!0;function EL(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var nb=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||jz===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},ib=function(t,r,n){nb(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function Dz(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Lz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan: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},$z=/[A-Z]|^ms/g,qz=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vL=function(t){return t.charCodeAt(1)===45},ON=function(t){return t!=null&&typeof t!="boolean"},O_=yL(function(e){return vL(e)?e:e.replace($z,"-$&").toLowerCase()}),PN=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(qz,function(n,i,a){return qn={name:i,styles:a,next:qn},i})}return Lz[t]!==1&&!vL(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ou(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return qn={name:i.name,styles:i.styles,next:qn},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)qn={name:s.name,styles:s.styles,next:qn},s=s.next;var o=a.styles+";";return o}return kz(e,t,r)}case"function":{if(e!==void 0){var u=qn,l=r(e);return qn=u,Ou(e,t,l)}break}}var c=r;if(t==null)return c;var d=t[c];return d!==void 0?d:c}function kz(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Ou(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;t!=null&&t[o]!==void 0?n+=a+"{"+t[o]+"}":ON(o)&&(n+=O_(a)+":"+PN(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var u=0;u<s.length;u++)ON(s[u])&&(n+=O_(a)+":"+PN(a,s[u])+";");else{var l=Ou(e,t,s);switch(a){case"animation":case"animationName":{n+=O_(a)+":"+l+";";break}default:n+=a+"{"+l+"}"}}}return n}var NN=/label:\s*([^\s;{]+)\s*(;|$)/g,qn;function Ju(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";qn=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Ou(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=Ou(r,t,e[o]),n){var u=a;i+=u[o]}NN.lastIndex=0;for(var l="",c;(c=NN.exec(i))!==null;)l+="-"+c[1];var d=Dz(i)+l;return{name:d,styles:i,next:qn}}var Bz=function(t){return t()},bL=q_.useInsertionEffect?q_.useInsertionEffect:!1,SL=bL||Bz,CN=bL||Se.useLayoutEffect,TL=Se.createContext(typeof HTMLElement<"u"?_L({key:"css"}):null),Uz=TL.Provider,ab=function(t){return Se.forwardRef(function(r,n){var i=Se.useContext(TL);return t(r,i,n)})},bf=Se.createContext({}),sb={}.hasOwnProperty,PE="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Fz=function(t,r){var n={};for(var i in r)sb.call(r,i)&&(n[i]=r[i]);return n[PE]=t,n},Hz=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return nb(r,n,i),SL(function(){return ib(r,n,i)}),null},Vz=ab(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var i=e[PE],a=[n],s="";typeof e.className=="string"?s=EL(t.registered,a,e.className):e.className!=null&&(s=e.className+" ");var o=Ju(a,void 0,Se.useContext(bf));s+=t.key+"-"+o.name;var u={};for(var l in e)sb.call(e,l)&&l!=="css"&&l!==PE&&(u[l]=e[l]);return u.className=s,r&&(u.ref=r),Se.createElement(Se.Fragment,null,Se.createElement(Hz,{cache:t,serialized:o,isStringTag:typeof i=="string"}),Se.createElement(i,u))}),Gz=Vz,MN=function(t,r){var n=arguments;if(r==null||!sb.call(r,"css"))return Se.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=Gz,a[1]=Fz(t,r);for(var s=2;s<i;s++)a[s]=n[s];return Se.createElement.apply(null,a)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(MN||(MN={}));var xz=ab(function(e,t){var r=e.styles,n=Ju([r],void 0,Se.useContext(bf)),i=Se.useRef();return CN(function(){var a=t.key+"-global",s=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,u=document.querySelector('style[data-emotion="'+a+" "+n.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),u!==null&&(o=!0,u.setAttribute("data-emotion",a),s.hydrate([u])),i.current=[s,o],function(){s.flush()}},[t]),CN(function(){var a=i.current,s=a[0],o=a[1];if(o){a[1]=!1;return}if(n.next!==void 0&&ib(t,n.next,!0),s.tags.length){var u=s.tags[s.tags.length-1].nextElementSibling;s.before=u,s.flush()}t.insert("",n,s,!1)},[t,n.name]),null});function IL(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ju(t)}function zz(){var e=IL.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Wz=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yz=yL(function(e){return Wz.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Kz=Yz,Xz=function(t){return t!=="theme"},jN=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Kz:Xz},DN=function(t,r,n){var i;if(r){var a=r.shouldForwardProp;i=t.__emotion_forwardProp&&a?function(s){return t.__emotion_forwardProp(s)&&a(s)}:a}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},Jz=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return nb(r,n,i),SL(function(){return ib(r,n,i)}),null},Qz=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,a,s;r!==void 0&&(a=r.label,s=r.target);var o=DN(t,r,n),u=o||jN(i),l=!u("as");return function(){var c=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push("label:"+a+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{var f=c[0];d.push(f[0]);for(var p=c.length,y=1;y<p;y++)d.push(c[y],f[y])}var g=ab(function(T,P,m){var w=l&&T.as||i,I="",h=[],E=T;if(T.theme==null){E={};for(var v in T)E[v]=T[v];E.theme=Se.useContext(bf)}typeof T.className=="string"?I=EL(P.registered,h,T.className):T.className!=null&&(I=T.className+" ");var O=Ju(d.concat(h),P.registered,E);I+=P.key+"-"+O.name,s!==void 0&&(I+=" "+s);var C=l&&o===void 0?jN(w):u,$={};for(var B in T)l&&B==="as"||C(B)&&($[B]=T[B]);return $.className=I,m&&($.ref=m),Se.createElement(Se.Fragment,null,Se.createElement(Jz,{cache:P,serialized:O,isStringTag:typeof w=="string"}),Se.createElement(w,$))});return g.displayName=a!==void 0?a:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=d,g.__emotion_forwardProp=o,Object.defineProperty(g,"toString",{value:function(){return"."+s}}),g.withComponent=function(T,P){var m=e(T,Tt({},r,P,{shouldForwardProp:DN(g,P,!0)}));return m.apply(void 0,d)},g}},Zz=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","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","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],NE=Qz.bind(null);Zz.forEach(function(e){NE[e]=NE(e)});function eW(e,t){const r=_L({key:"css",prepend:e});if(t){const n=r.insert;r.insert=(...i)=>(i[1].styles.match(/^@layer\s+[^{]*$/)||(i[1].styles=`@layer mui {${i[1].styles}}`),n(...i))}return r}const P_=new Map;function tW(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,i=Se.useMemo(()=>{const a=`${t}-${r}`;if(typeof document=="object"&&P_.has(a))return P_.get(a);const s=eW(t,r);return P_.set(a,s),s},[t,r]);return t||r?H.jsx(Uz,{value:i,children:n}):n}function rW(e){return e==null||Object.keys(e).length===0}function nW(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?i=>t(rW(i)?r:i):t;return H.jsx(xz,{styles:n})}function iW(e,t){return NE(e,t)}const aW=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},LN=[];function sW(e){return LN[0]=e,Ju(LN)}const oW=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:nW,StyledEngineProvider:tW,ThemeContext:bf,css:IL,default:iW,internal_processStyles:aW,internal_serializeStyles:sW,keyframes:zz},Symbol.toStringTag,{value:"Module"})),uW=fi(oW),cW=fi(y8),lW=fi(T8),dW=fi(S8),fW=["values","unit","step"],pW=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>Tt({},r,{[n.key]:n.val}),{})};function wL(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=$i(e,fW),a=pW(t),s=Object.keys(a);function o(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r})`}function u(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-n/100}${r})`}function l(f,p){const y=s.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r}) and (max-width:${(y!==-1&&typeof t[s[y]]=="number"?t[s[y]]:p)-n/100}${r})`}function c(f){return s.indexOf(f)+1<s.length?l(f,s[s.indexOf(f)+1]):o(f)}function d(f){const p=s.indexOf(f);return p===0?o(s[1]):p===s.length-1?u(s[p]):l(f,s[s.indexOf(f)+1]).replace("@media","@media not all and")}return Tt({keys:s,values:a,up:o,down:u,between:l,only:c,not:d,unit:r},i)}const mW={borderRadius:4};function pu(e,t){return t?Vn(e,t,{clone:!1}):e}const ob={xs:0,sm:600,md:900,lg:1200,xl:1536},$N={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ob[e]}px)`};function di(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||$N;return t.reduce((s,o,u)=>(s[a.up(a.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const a=n.breakpoints||$N;return Object.keys(t).reduce((s,o)=>{if(Object.keys(a.values||ob).indexOf(o)!==-1){const u=a.up(o);s[u]=r(t[o],o)}else{const u=o;s[u]=t[u]}return s},{})}return r(t)}function hW(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function qN(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Sf(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function qd(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Sf(e,r)||n,t&&(i=t(i,n,e)),i}function Xt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=s=>{if(s[t]==null)return null;const o=s[t],u=s.theme,l=Sf(u,n)||{};return di(s,o,d=>{let f=qd(l,i,d);return d===f&&typeof d=="string"&&(f=qd(l,i,`${t}${d==="default"?"":Di(d)}`,d)),r===!1?f:{[r]:f}})};return a.propTypes={},a.filterProps=[t],a}function yW(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const gW={m:"margin",p:"padding"},_W={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},kN={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},EW=yW(e=>{if(e.length>2)if(kN[e])e=kN[e];else return[e];const[t,r]=e.split(""),n=gW[t],i=_W[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),ub=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...ub,...cb];function Qu(e,t,r,n){var i;const a=(i=Sf(e,t,!1))!=null?i:r;return typeof a=="number"?s=>typeof s=="string"?s:a*s:Array.isArray(a)?s=>typeof s=="string"?s:a[s]:typeof a=="function"?a:()=>{}}function RL(e){return Qu(e,"spacing",8)}function Zu(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function vW(e,t){return r=>e.reduce((n,i)=>(n[i]=Zu(t,r),n),{})}function bW(e,t,r,n){if(t.indexOf(r)===-1)return null;const i=EW(r),a=vW(i,n),s=e[r];return di(e,s,a)}function AL(e,t){const r=RL(e.theme);return Object.keys(e).map(n=>bW(e,t,n,r)).reduce(pu,{})}function xt(e){return AL(e,ub)}xt.propTypes={};xt.filterProps=ub;function zt(e){return AL(e,cb)}zt.propTypes={};zt.filterProps=cb;function SW(e=8){if(e.mui)return e;const t=RL({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function Tf(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?pu(i,t[a](n)):i,{});return r.propTypes={},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function Jr(e){return typeof e!="number"?e:`${e}px solid`}function tn(e,t){return Xt({prop:e,themeKey:"borders",transform:t})}const TW=tn("border",Jr),IW=tn("borderTop",Jr),wW=tn("borderRight",Jr),RW=tn("borderBottom",Jr),AW=tn("borderLeft",Jr),OW=tn("borderColor"),PW=tn("borderTopColor"),NW=tn("borderRightColor"),CW=tn("borderBottomColor"),MW=tn("borderLeftColor"),jW=tn("outline",Jr),DW=tn("outlineColor"),If=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Qu(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:Zu(t,n)});return di(e,e.borderRadius,r)}return null};If.propTypes={};If.filterProps=["borderRadius"];Tf(TW,IW,wW,RW,AW,OW,PW,NW,CW,MW,If,jW,DW);const wf=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Qu(e.theme,"spacing",8),r=n=>({gap:Zu(t,n)});return di(e,e.gap,r)}return null};wf.propTypes={};wf.filterProps=["gap"];const Rf=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Qu(e.theme,"spacing",8),r=n=>({columnGap:Zu(t,n)});return di(e,e.columnGap,r)}return null};Rf.propTypes={};Rf.filterProps=["columnGap"];const Af=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Qu(e.theme,"spacing",8),r=n=>({rowGap:Zu(t,n)});return di(e,e.rowGap,r)}return null};Af.propTypes={};Af.filterProps=["rowGap"];const LW=Xt({prop:"gridColumn"}),$W=Xt({prop:"gridRow"}),qW=Xt({prop:"gridAutoFlow"}),kW=Xt({prop:"gridAutoColumns"}),BW=Xt({prop:"gridAutoRows"}),UW=Xt({prop:"gridTemplateColumns"}),FW=Xt({prop:"gridTemplateRows"}),HW=Xt({prop:"gridTemplateAreas"}),VW=Xt({prop:"gridArea"});Tf(wf,Rf,Af,LW,$W,qW,kW,BW,UW,FW,HW,VW);function Is(e,t){return t==="grey"?t:e}const GW=Xt({prop:"color",themeKey:"palette",transform:Is}),xW=Xt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Is}),zW=Xt({prop:"backgroundColor",themeKey:"palette",transform:Is});Tf(GW,xW,zW);function zr(e){return e<=1&&e!==0?`${e*100}%`:e}const WW=Xt({prop:"width",transform:zr}),lb=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,i;const a=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||ob[r];return a?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${a}${e.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:zr(r)}};return di(e,e.maxWidth,t)}return null};lb.filterProps=["maxWidth"];const YW=Xt({prop:"minWidth",transform:zr}),KW=Xt({prop:"height",transform:zr}),XW=Xt({prop:"maxHeight",transform:zr}),JW=Xt({prop:"minHeight",transform:zr});Xt({prop:"size",cssProperty:"width",transform:zr});Xt({prop:"size",cssProperty:"height",transform:zr});const QW=Xt({prop:"boxSizing"});Tf(WW,lb,YW,KW,XW,JW,QW);const ec={border:{themeKey:"borders",transform:Jr},borderTop:{themeKey:"borders",transform:Jr},borderRight:{themeKey:"borders",transform:Jr},borderBottom:{themeKey:"borders",transform:Jr},borderLeft:{themeKey:"borders",transform:Jr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Jr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:If},color:{themeKey:"palette",transform:Is},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Is},backgroundColor:{themeKey:"palette",transform:Is},p:{style:zt},pt:{style:zt},pr:{style:zt},pb:{style:zt},pl:{style:zt},px:{style:zt},py:{style:zt},padding:{style:zt},paddingTop:{style:zt},paddingRight:{style:zt},paddingBottom:{style:zt},paddingLeft:{style:zt},paddingX:{style:zt},paddingY:{style:zt},paddingInline:{style:zt},paddingInlineStart:{style:zt},paddingInlineEnd:{style:zt},paddingBlock:{style:zt},paddingBlockStart:{style:zt},paddingBlockEnd:{style:zt},m:{style:xt},mt:{style:xt},mr:{style:xt},mb:{style:xt},ml:{style:xt},mx:{style:xt},my:{style:xt},margin:{style:xt},marginTop:{style:xt},marginRight:{style:xt},marginBottom:{style:xt},marginLeft:{style:xt},marginX:{style:xt},marginY:{style:xt},marginInline:{style:xt},marginInlineStart:{style:xt},marginInlineEnd:{style:xt},marginBlock:{style:xt},marginBlockStart:{style:xt},marginBlockEnd:{style:xt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:wf},rowGap:{style:Af},columnGap:{style:Rf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:zr},maxWidth:{style:lb},minWidth:{transform:zr},height:{transform:zr},maxHeight:{transform:zr},minHeight:{transform:zr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ZW(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function e7(e,t){return typeof e=="function"?e(t):e}function OL(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:u=r,themeKey:l,transform:c,style:d}=o;if(n==null)return null;if(l==="typography"&&n==="inherit")return{[r]:n};const f=Sf(i,l)||{};return d?d(s):di(s,n,y=>{let g=qd(f,c,y);return y===g&&typeof y=="string"&&(g=qd(f,c,`${r}${y==="default"?"":Di(y)}`,y)),u===!1?g:{[u]:g}})}function t(r){var n;const{sx:i,theme:a={},nested:s}=r||{};if(!i)return null;const o=(n=a.unstable_sxConfig)!=null?n:ec;function u(l){let c=l;if(typeof l=="function")c=l(a);else if(typeof l!="object")return l;if(!c)return null;const d=hW(a.breakpoints),f=Object.keys(d);let p=d;return Object.keys(c).forEach(y=>{const g=e7(c[y],a);if(g!=null)if(typeof g=="object")if(o[y])p=pu(p,e(y,g,a,o));else{const T=di({theme:a},g,P=>({[y]:P}));ZW(T,g)?p[y]=t({sx:g,theme:a,nested:!0}):p=pu(p,T)}else p=pu(p,e(y,g,a,o))}),!s&&a.modularCssLayers?{"@layer sx":qN(f,p)}:qN(f,p)}return Array.isArray(i)?i.map(u):u(i)}return t}const Of=OL();Of.filterProps=["sx"];function PL(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const t7=["breakpoints","palette","spacing","shape"];function NL(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,s=$i(e,t7),o=wL(r),u=SW(i);let l=Vn({breakpoints:o,direction:"ltr",components:{},palette:Tt({mode:"light"},n),spacing:u,shape:Tt({},mW,a)},s);return l.applyStyles=PL,l=t.reduce((c,d)=>Vn(c,d),l),l.unstable_sxConfig=Tt({},ec,s==null?void 0:s.unstable_sxConfig),l.unstable_sx=function(d){return Of({sx:d,theme:this})},l}const r7=Object.freeze(Object.defineProperty({__proto__:null,default:NL,private_createBreakpoints:wL,unstable_applyStyles:PL},Symbol.toStringTag,{value:"Module"})),n7=fi(r7),i7=["sx"],a7=e=>{var t,r;const n={systemProps:{},otherProps:{}},i=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:ec;return Object.keys(e).forEach(a=>{i[a]?n.systemProps[a]=e[a]:n.otherProps[a]=e[a]}),n};function s7(e){const{sx:t}=e,r=$i(e,i7),{systemProps:n,otherProps:i}=a7(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const o=t(...s);return Ti(o)?Tt({},n,o):n}:a=Tt({},n,t),Tt({},i,{sx:a})}const o7=Object.freeze(Object.defineProperty({__proto__:null,default:Of,extendSxProp:s7,unstable_createStyleFunctionSx:OL,unstable_defaultSxConfig:ec},Symbol.toStringTag,{value:"Module"})),u7=fi(o7);var BN;function c7(){if(BN)return Ta;BN=1;var e=Zv();Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.default=h,Ta.shouldForwardProp=y,Ta.systemDefaultTheme=void 0;var t=e(nz()),r=e(iz()),n=d(uW),i=cW;e(lW),e(dW);var a=e(n7),s=e(u7);const o=["ownerState"],u=["variants"],l=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function c(E){if(typeof WeakMap!="function")return null;var v=new WeakMap,O=new WeakMap;return(c=function(C){return C?O:v})(E)}function d(E,v){if(E&&E.__esModule)return E;if(E===null||typeof E!="object"&&typeof E!="function")return{default:E};var O=c(v);if(O&&O.has(E))return O.get(E);var C={__proto__:null},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in E)if(B!=="default"&&Object.prototype.hasOwnProperty.call(E,B)){var V=$?Object.getOwnPropertyDescriptor(E,B):null;V&&(V.get||V.set)?Object.defineProperty(C,B,V):C[B]=E[B]}return C.default=E,O&&O.set(E,C),C}function f(E){return Object.keys(E).length===0}function p(E){return typeof E=="string"&&E.charCodeAt(0)>96}function y(E){return E!=="ownerState"&&E!=="theme"&&E!=="sx"&&E!=="as"}function g(E,v){return v&&E&&typeof E=="object"&&E.styles&&!E.styles.startsWith("@layer")&&(E.styles=`@layer ${v}{${String(E.styles)}}`),E}const T=Ta.systemDefaultTheme=(0,a.default)(),P=E=>E&&E.charAt(0).toLowerCase()+E.slice(1);function m({defaultTheme:E,theme:v,themeId:O}){return f(v)?E:v[O]||v}function w(E){return E?(v,O)=>O[E]:null}function I(E,v,O){let{ownerState:C}=v,$=(0,r.default)(v,o);const B=typeof E=="function"?E((0,t.default)({ownerState:C},$)):E;if(Array.isArray(B))return B.flatMap(V=>I(V,(0,t.default)({ownerState:C},$),O));if(B&&typeof B=="object"&&Array.isArray(B.variants)){const{variants:V=[]}=B;let k=(0,r.default)(B,u);return V.forEach(te=>{let ie=!0;if(typeof te.props=="function"?ie=te.props((0,t.default)({ownerState:C},$,C)):Object.keys(te.props).forEach(J=>{(C==null?void 0:C[J])!==te.props[J]&&$[J]!==te.props[J]&&(ie=!1)}),ie){Array.isArray(k)||(k=[k]);const J=typeof te.style=="function"?te.style((0,t.default)({ownerState:C},$,C)):te.style;k.push(O?g((0,n.internal_serializeStyles)(J),O):J)}}),k}return O?g((0,n.internal_serializeStyles)(B),O):B}function h(E={}){const{themeId:v,defaultTheme:O=T,rootShouldForwardProp:C=y,slotShouldForwardProp:$=y}=E,B=V=>(0,s.default)((0,t.default)({},V,{theme:m((0,t.default)({},V,{defaultTheme:O,themeId:v}))}));return B.__mui_systemSx=!0,(V,U={})=>{(0,n.internal_processStyles)(V,he=>he.filter(be=>!(be!=null&&be.__mui_systemSx)));const{name:k,slot:te,skipVariantsResolver:ie,skipSx:J,overridesResolver:Q=w(P(te))}=U,K=(0,r.default)(U,l),q=k&&k.startsWith("Mui")||te?"components":"custom",D=ie!==void 0?ie:te&&te!=="Root"&&te!=="root"||!1,F=J||!1;let W,N=y;te==="Root"||te==="root"?N=C:te?N=$:p(V)&&(N=void 0);const L=(0,n.default)(V,(0,t.default)({shouldForwardProp:N,label:W},K)),ee=he=>typeof he=="function"&&he.__emotion_real!==he||(0,i.isPlainObject)(he)?be=>{const Ie=m({theme:be.theme,defaultTheme:O,themeId:v});return I(he,(0,t.default)({},be,{theme:Ie}),Ie.modularCssLayers?q:void 0)}:he,Ee=(he,...be)=>{let Ie=ee(he);const ae=be?be.map(ee):[];k&&Q&&ae.push(pe=>{const ve=m((0,t.default)({},pe,{defaultTheme:O,themeId:v}));if(!ve.components||!ve.components[k]||!ve.components[k].styleOverrides)return null;const Ae=ve.components[k].styleOverrides,ke={};return Object.entries(Ae).forEach(([We,et])=>{ke[We]=I(et,(0,t.default)({},pe,{theme:ve}),ve.modularCssLayers?"theme":void 0)}),Q(pe,ke)}),k&&!D&&ae.push(pe=>{var ve;const Ae=m((0,t.default)({},pe,{defaultTheme:O,themeId:v})),ke=Ae==null||(ve=Ae.components)==null||(ve=ve[k])==null?void 0:ve.variants;return I({variants:ke},(0,t.default)({},pe,{theme:Ae}),Ae.modularCssLayers?"theme":void 0)}),F||ae.push(B);const ce=ae.length-be.length;if(Array.isArray(he)&&ce>0){const pe=new Array(ce).fill("");Ie=[...he,...pe],Ie.raw=[...he.raw,...pe]}const fe=L(Ie,...ae);return V.muiName&&(fe.muiName=V.muiName),fe};return L.withConfig&&(Ee.withConfig=L.withConfig),Ee}}return Ta}var l7=c7();const d7=Ud(l7);function f7(e,t){return Tt({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Vt={};const p7=fi(g8),m7=fi(Q8);var UN;function h7(){if(UN)return Vt;UN=1;var e=Zv();Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.alpha=y,Vt.blend=E,Vt.colorChannel=void 0,Vt.darken=T,Vt.decomposeColor=s,Vt.emphasize=I,Vt.getContrastRatio=p,Vt.getLuminance=f,Vt.hexToRgb=i,Vt.hslToRgb=d,Vt.lighten=m,Vt.private_safeAlpha=g,Vt.private_safeColorChannel=void 0,Vt.private_safeDarken=P,Vt.private_safeEmphasize=h,Vt.private_safeLighten=w,Vt.recomposeColor=l,Vt.rgbToHex=c;var t=e(p7),r=e(m7);function n(v,O=0,C=1){return(0,r.default)(v,O,C)}function i(v){v=v.slice(1);const O=new RegExp(`.{1,${v.length>=6?2:1}}`,"g");let C=v.match(O);return C&&C[0].length===1&&(C=C.map($=>$+$)),C?`rgb${C.length===4?"a":""}(${C.map(($,B)=>B<3?parseInt($,16):Math.round(parseInt($,16)/255*1e3)/1e3).join(", ")})`:""}function a(v){const O=v.toString(16);return O.length===1?`0${O}`:O}function s(v){if(v.type)return v;if(v.charAt(0)==="#")return s(i(v));const O=v.indexOf("("),C=v.substring(0,O);if(["rgb","rgba","hsl","hsla","color"].indexOf(C)===-1)throw new Error((0,t.default)(9,v));let $=v.substring(O+1,v.length-1),B;if(C==="color"){if($=$.split(" "),B=$.shift(),$.length===4&&$[3].charAt(0)==="/"&&($[3]=$[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(B)===-1)throw new Error((0,t.default)(10,B))}else $=$.split(",");return $=$.map(V=>parseFloat(V)),{type:C,values:$,colorSpace:B}}const o=v=>{const O=s(v);return O.values.slice(0,3).map((C,$)=>O.type.indexOf("hsl")!==-1&&$!==0?`${C}%`:C).join(" ")};Vt.colorChannel=o;const u=(v,O)=>{try{return o(v)}catch{return v}};Vt.private_safeColorChannel=u;function l(v){const{type:O,colorSpace:C}=v;let{values:$}=v;return O.indexOf("rgb")!==-1?$=$.map((B,V)=>V<3?parseInt(B,10):B):O.indexOf("hsl")!==-1&&($[1]=`${$[1]}%`,$[2]=`${$[2]}%`),O.indexOf("color")!==-1?$=`${C} ${$.join(" ")}`:$=`${$.join(", ")}`,`${O}(${$})`}function c(v){if(v.indexOf("#")===0)return v;const{values:O}=s(v);return`#${O.map((C,$)=>a($===3?Math.round(255*C):C)).join("")}`}function d(v){v=s(v);const{values:O}=v,C=O[0],$=O[1]/100,B=O[2]/100,V=$*Math.min(B,1-B),U=(ie,J=(ie+C/30)%12)=>B-V*Math.max(Math.min(J-3,9-J,1),-1);let k="rgb";const te=[Math.round(U(0)*255),Math.round(U(8)*255),Math.round(U(4)*255)];return v.type==="hsla"&&(k+="a",te.push(O[3])),l({type:k,values:te})}function f(v){v=s(v);let O=v.type==="hsl"||v.type==="hsla"?s(d(v)).values:v.values;return O=O.map(C=>(v.type!=="color"&&(C/=255),C<=.03928?C/12.92:((C+.055)/1.055)**2.4)),Number((.2126*O[0]+.7152*O[1]+.0722*O[2]).toFixed(3))}function p(v,O){const C=f(v),$=f(O);return(Math.max(C,$)+.05)/(Math.min(C,$)+.05)}function y(v,O){return v=s(v),O=n(O),(v.type==="rgb"||v.type==="hsl")&&(v.type+="a"),v.type==="color"?v.values[3]=`/${O}`:v.values[3]=O,l(v)}function g(v,O,C){try{return y(v,O)}catch{return v}}function T(v,O){if(v=s(v),O=n(O),v.type.indexOf("hsl")!==-1)v.values[2]*=1-O;else if(v.type.indexOf("rgb")!==-1||v.type.indexOf("color")!==-1)for(let C=0;C<3;C+=1)v.values[C]*=1-O;return l(v)}function P(v,O,C){try{return T(v,O)}catch{return v}}function m(v,O){if(v=s(v),O=n(O),v.type.indexOf("hsl")!==-1)v.values[2]+=(100-v.values[2])*O;else if(v.type.indexOf("rgb")!==-1)for(let C=0;C<3;C+=1)v.values[C]+=(255-v.values[C])*O;else if(v.type.indexOf("color")!==-1)for(let C=0;C<3;C+=1)v.values[C]+=(1-v.values[C])*O;return l(v)}function w(v,O,C){try{return m(v,O)}catch{return v}}function I(v,O=.15){return f(v)>.5?T(v,O):m(v,O)}function h(v,O,C){try{return I(v,O)}catch{return v}}function E(v,O,C,$=1){const B=(te,ie)=>Math.round((te**(1/$)*(1-C)+ie**(1/$)*C)**$),V=s(v),U=s(O),k=[B(V.values[0],U.values[0]),B(V.values[1],U.values[1]),B(V.values[2],U.values[2])];return l({type:"rgb",values:k})}return Vt}var CE=h7();const Pu={black:"#000",white:"#fff"},y7={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ls={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},ds={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ko={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},fs={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ps={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},ms={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},g7=["mode","contrastThreshold","tonalOffset"],FN={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Pu.white,default:Pu.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},N_={text:{primary:Pu.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Pu.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function HN(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=CE.lighten(e.main,i):t==="dark"&&(e.dark=CE.darken(e.main,a)))}function _7(e="light"){return e==="dark"?{main:fs[200],light:fs[50],dark:fs[400]}:{main:fs[700],light:fs[400],dark:fs[800]}}function E7(e="light"){return e==="dark"?{main:ls[200],light:ls[50],dark:ls[400]}:{main:ls[500],light:ls[300],dark:ls[700]}}function v7(e="light"){return e==="dark"?{main:ds[500],light:ds[300],dark:ds[700]}:{main:ds[700],light:ds[400],dark:ds[800]}}function b7(e="light"){return e==="dark"?{main:ps[400],light:ps[300],dark:ps[700]}:{main:ps[700],light:ps[500],dark:ps[900]}}function S7(e="light"){return e==="dark"?{main:ms[400],light:ms[300],dark:ms[700]}:{main:ms[800],light:ms[500],dark:ms[900]}}function T7(e="light"){return e==="dark"?{main:ko[400],light:ko[300],dark:ko[700]}:{main:"#ed6c02",light:ko[500],dark:ko[900]}}function I7(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,i=$i(e,g7),a=e.primary||_7(t),s=e.secondary||E7(t),o=e.error||v7(t),u=e.info||b7(t),l=e.success||S7(t),c=e.warning||T7(t);function d(g){return CE.getContrastRatio(g,N_.text.primary)>=r?N_.text.primary:FN.text.primary}const f=({color:g,name:T,mainShade:P=500,lightShade:m=300,darkShade:w=700})=>{if(g=Tt({},g),!g.main&&g[P]&&(g.main=g[P]),!g.hasOwnProperty("main"))throw new Error(wu(11,T?` (${T})`:"",P));if(typeof g.main!="string")throw new Error(wu(12,T?` (${T})`:"",JSON.stringify(g.main)));return HN(g,"light",m,n),HN(g,"dark",w,n),g.contrastText||(g.contrastText=d(g.main)),g},p={dark:N_,light:FN};return Vn(Tt({common:Tt({},Pu),mode:t,primary:f({color:a,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:o,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:u,name:"info"}),success:f({color:l,name:"success"}),grey:y7,contrastThreshold:r,getContrastText:d,augmentColor:f,tonalOffset:n},p[t]),i)}const w7=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function R7(e){return Math.round(e*1e5)/1e5}const VN={textTransform:"uppercase"},GN='"Roboto", "Helvetica", "Arial", sans-serif';function A7(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=GN,fontSize:i=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:o=500,fontWeightBold:u=700,htmlFontSize:l=16,allVariants:c,pxToRem:d}=r,f=$i(r,w7),p=i/14,y=d||(P=>`${P/l*p}rem`),g=(P,m,w,I,h)=>Tt({fontFamily:n,fontWeight:P,fontSize:y(m),lineHeight:w},n===GN?{letterSpacing:`${R7(I/m)}em`}:{},h,c),T={h1:g(a,96,1.167,-1.5),h2:g(a,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(o,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(o,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(o,14,1.75,.4,VN),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,VN),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Vn(Tt({htmlFontSize:l,pxToRem:y,fontFamily:n,fontSize:i,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:u},T),f,{clone:!1})}const O7=.2,P7=.14,N7=.12;function Ut(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${O7})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${P7})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${N7})`].join(",")}const C7=["none",Ut(0,2,1,-1,0,1,1,0,0,1,3,0),Ut(0,3,1,-2,0,2,2,0,0,1,5,0),Ut(0,3,3,-2,0,3,4,0,0,1,8,0),Ut(0,2,4,-1,0,4,5,0,0,1,10,0),Ut(0,3,5,-1,0,5,8,0,0,1,14,0),Ut(0,3,5,-1,0,6,10,0,0,1,18,0),Ut(0,4,5,-2,0,7,10,1,0,2,16,1),Ut(0,5,5,-3,0,8,10,1,0,3,14,2),Ut(0,5,6,-3,0,9,12,1,0,3,16,2),Ut(0,6,6,-3,0,10,14,1,0,4,18,3),Ut(0,6,7,-4,0,11,15,1,0,4,20,3),Ut(0,7,8,-4,0,12,17,2,0,5,22,4),Ut(0,7,8,-4,0,13,19,2,0,5,24,4),Ut(0,7,9,-4,0,14,21,2,0,5,26,4),Ut(0,8,9,-5,0,15,22,2,0,6,28,5),Ut(0,8,10,-5,0,16,24,2,0,6,30,5),Ut(0,8,11,-5,0,17,26,2,0,6,32,5),Ut(0,9,11,-5,0,18,28,2,0,7,34,6),Ut(0,9,12,-6,0,19,29,2,0,7,36,6),Ut(0,10,13,-6,0,20,31,3,0,8,38,7),Ut(0,10,13,-6,0,21,33,3,0,8,40,7),Ut(0,10,14,-6,0,22,35,3,0,8,42,7),Ut(0,11,14,-7,0,23,36,3,0,9,44,8),Ut(0,11,15,-7,0,24,38,3,0,9,46,8)],M7=["duration","easing","delay"],j7={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},D7={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function xN(e){return`${Math.round(e)}ms`}function L7(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function $7(e){const t=Tt({},j7,e.easing),r=Tt({},D7,e.duration);return Tt({getAutoHeightDuration:L7,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:u=0}=a;return $i(a,M7),(Array.isArray(i)?i:[i]).map(l=>`${l} ${typeof s=="string"?s:xN(s)} ${o} ${typeof u=="string"?u:xN(u)}`).join(",")}},e,{easing:t,duration:r})}const q7={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},k7=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function B7(e={},...t){const{mixins:r={},palette:n={},transitions:i={},typography:a={}}=e,s=$i(e,k7);if(e.vars)throw new Error(wu(18));const o=I7(n),u=NL(e);let l=Vn(u,{mixins:f7(u.breakpoints,r),palette:o,shadows:C7.slice(),typography:A7(o,a),transitions:$7(i),zIndex:Tt({},q7)});return l=Vn(l,s),l=t.reduce((c,d)=>Vn(c,d),l),l.unstable_sxConfig=Tt({},ec,s==null?void 0:s.unstable_sxConfig),l.unstable_sx=function(d){return Of({sx:d,theme:this})},l}const U7=B7(),F7="$$material";function H7(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const V7=e=>H7(e)&&e!=="classes",G7=d7({themeId:F7,defaultTheme:U7,rootShouldForwardProp:V7});function x7(e){return oL("MuiSvgIcon",e)}X8("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const z7=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],W7=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Di(t)}`,`fontSize${Di(r)}`]};return W8(i,x7,n)},Y7=G7("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Di(r.color)}`],t[`fontSize${Di(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,i,a,s,o,u,l,c,d,f,p,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((a=e.typography)==null||(s=a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem",medium:((o=e.typography)==null||(u=o.pxToRem)==null?void 0:u.call(o,24))||"1.5rem",large:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(p=(e.vars||e).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[t.color]}}),ME=Se.forwardRef(function(t,r){const n=rz({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:u="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24"}=n,p=$i(n,z7),y=Se.isValidElement(i)&&i.type==="svg",g=Tt({},n,{color:s,component:o,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:y}),T={};c||(T.viewBox=f);const P=W7(g);return H.jsxs(Y7,Tt({as:o,className:Z8(P.root,a),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r},T,p,y&&i.props,{ownerState:g,children:[y?i.props.children:i,d?H.jsx("title",{children:d}):null]}))});ME.muiName="SvgIcon";function K7(e,t){function r(n,i){return H.jsx(ME,Tt({"data-testid":`${t}Icon`,ref:i},n,{children:e}))}return r.muiName=ME.muiName,Se.memo(Se.forwardRef(r))}const X7={configure:e=>{sL.configure(e)}},J7=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Di,createChainedFunction:I8,createSvgIcon:K7,debounce:w8,deprecatedPropType:R8,isMuiElement:A8,ownerDocument:nL,ownerWindow:O8,requirePropFactory:P8,setRef:iL,unstable_ClassNameGenerator:X7,unstable_useEnhancedEffect:aL,unstable_useId:C8,unsupportedProp:M8,useControlled:j8,useEventCallback:D8,useForkRef:L8,useIsFocusVisible:z8},Symbol.toStringTag,{value:"Module"})),Q7=fi(J7);var zN;function Z7(){return zN||(zN=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Q7})(T_)),T_}var WN;function e9(){if(WN)return $o;WN=1;var e=Zv();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(Z7()),r=Z$();return $o.default=(0,t.default)((0,r.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),$o}var t9=e9();const CL=Ud(t9),db=`${St.nftApiUrl}/v1`;function ML(e){if(!e)return 0;try{return Math.ceil(Number(oq(e))*10)}catch{return 0}}function jX(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function DX(e,t){var n,i,a;const r=new URLSearchParams({contractAddresses:e,itemId:t,first:"1"});try{const s=await fetch(`${St.nftApiUrl}/v2/catalog?${r.toString()}`);if(!s.ok)return"";const{data:o}=await s.json(),u=(n=o==null?void 0:o[0])==null?void 0:n.data;return(((i=u==null?void 0:u.wearable)==null?void 0:i.description)??((a=u==null?void 0:u.emote)==null?void 0:a.description)??"").trim()}catch{return""}}async function LX(e){const{listings:t}=await Pf({contractAddress:e,first:200}),r={};for(const n of t)n.listingType!=="primary"||n.itemId==null||(r[String(n.itemId)]={isOnSale:!0,priceCredits:n.priceCredits,tradeId:n.tradeId});return r}async function r9(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${db}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return((a=i==null?void 0:i[0])==null?void 0:a.nft)??null}function fb(e){return{id:e.tradeId,tradeId:e.tradeId,name:e.name,creator:e.creator,contractAddress:e.contractAddress,itemId:e.itemId,tokenId:e.tokenId??void 0,category:e.category,wearableCategory:e.wearableCategory??void 0,rarity:e.rarity,network:e.network,chainId:e.chainId,thumbnail:e.thumbnail,priceCredits:e.priceCredits,gender:null,compareAtCredits:e.compareAtCredits!=null&&e.compareAtCredits>e.priceCredits?e.compareAtCredits:void 0,saleEndsAt:e.saleEndsAt!=null?e.saleEndsAt*1e3:void 0}}async function Pf(e){var i,a;const t=new URLSearchParams;(e.category==="wearable"||e.category==="emote")&&t.set("category",e.category),e.first!=null&&t.set("first",String(e.first)),e.skip!=null&&t.set("skip",String(e.skip)),e.contractAddress&&t.set("contractAddress",e.contractAddress),e.itemId!=null&&t.set("itemId",e.itemId),(i=e.rarities)!=null&&i.length&&t.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.length&&t.set("wearableCategory",e.wearableCategories.join(",")),e.minPriceCredits!=null&&t.set("minPriceCredits",String(e.minPriceCredits)),e.maxPriceCredits!=null&&t.set("maxPriceCredits",String(e.maxPriceCredits)),e.search&&t.set("search",e.search),e.sortBy&&t.set("sortBy",e.sortBy);const r=await fetch(`${St.marketplaceServerUrl}/v3/catalog/shop?${t.toString()}`);if(!r.ok)throw new Error(`fetchShopListings ${r.status}`);const n=await r.json();return{listings:n.data??[],total:n.total??0}}async function $X(e,t){const{listings:r}=await Pf({contractAddress:e,itemId:t,first:1});return r[0]?fb(r[0]):null}async function jL({first:e=100,...t}={}){const{listings:r,total:n}=await Pf({...t,first:e});return{items:r.map(fb),total:n}}function n9(e){return{...fb(e),source:e.source,manaWei:e.manaWei??null}}async function qX({first:e=100,...t}={}){var s,o;const r=new URLSearchParams;(t.category==="wearable"||t.category==="emote")&&r.set("category",t.category),r.set("first",String(e)),t.skip!=null&&r.set("skip",String(t.skip)),(s=t.rarities)!=null&&s.length&&r.set("rarity",t.rarities.join(",")),(o=t.wearableCategories)!=null&&o.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.minPriceCredits!=null&&r.set("minPriceCredits",String(t.minPriceCredits)),t.maxPriceCredits!=null&&r.set("maxPriceCredits",String(t.maxPriceCredits)),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${St.marketplaceServerUrl}/v3/catalog/unified?${r.toString()}`);if(!n.ok)throw new Error(`fetchUnified ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(n9),total:i.total??a.length}}async function kX(e,{category:t="wearable",first:r=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${db}/nfts?${i.toString()}`);if(!a.ok)throw new Error(`Failed to fetch assets (${a.status})`);const{data:s,total:o}=await a.json();return{assets:s.map(l=>{var c,d,f,p,y;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((p=(f=l.nft.data)==null?void 0:f.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?ML(l.order.price):void 0,tradeId:(y=l.order)==null?void 0:y.tradeId}}),total:o}}const i9="dcl:marketplace";async function BX(e,t){const{TradeService:r}=await ar(async()=>{const{TradeService:i}=await import("./TradeService-CbUgwZEW.js");return{TradeService:i}},__vite__mapDeps([8,6,1,9,2,7]));return new r(i9,St.marketplaceServerUrl,()=>t).addTrade(e)}async function DL(e){const t=await fetch(`${St.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function a9(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${db}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function UX(e){var u,l;let t;try{t=await DL(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=ML(n==null?void 0:n.amount),a=(r==null?void 0:r.contractAddress)??"",s=(r==null?void 0:r.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((r==null?void 0:r.assetType)===en.TradeAssetType.COLLECTION_ITEM){const c=await a9(a,s);return{name:(c==null?void 0:c.name)??"Item",thumbnail:(c==null?void 0:c.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await r9(a,s);return{name:(o==null?void 0:o.name)??`#${s}`,thumbnail:(o==null?void 0:o.image)??"",credits:i,contractAddress:a,tokenId:s}}async function FX(e,t){var i;const{listings:r}=await Pf({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?DL(n):null}async function s9(e,t=4){const r=new URLSearchParams({search:e,first:String(t)}),n=await fetch(`${St.nftApiUrl}/v1/collections?${r.toString()}`);if(!n.ok)throw new Error(`fetchCollectionSuggestions ${n.status}`);const{data:i}=await n.json();return(i??[]).filter(a=>a.contractAddress&&a.name).map(a=>({contractAddress:a.contractAddress,name:a.name,creator:a.creator??""}))}async function o9(e,t){var s,o,u;const r=new URLSearchParams({category:"ens",search:e,first:String(t)}),n=await fetch(`${St.nftApiUrl}/v1/nfts?${r.toString()}`);if(!n.ok)throw new Error(`fetchNameOwners ${n.status}`);const{data:i}=await n.json(),a=new Map;for(const l of i??[]){const c=(o=(s=l.nft)==null?void 0:s.owner)==null?void 0:o.toLowerCase(),d=(u=l.nft)==null?void 0:u.name;c&&d&&!a.has(c)&&a.set(c,d)}return a}async function u9(e){if(e.length===0)return new Map;const t=new URLSearchParams({sortBy:"most_collections"});for(const a of e)t.append("address",a);const r=await fetch(`${St.nftApiUrl}/v1/accounts?${t.toString()}`);if(!r.ok)throw new Error(`fetchSellerCounts ${r.status}`);const{data:n}=await r.json(),i=new Map;for(const a of n??[])(a.collections??0)>0&&i.set(a.address.toLowerCase(),a.collections??0);return i}async function c9(e,t=4,r=20){const n=e.trim();if(!n)return[];const i=await o9(n,r);if(i.size===0)return[];const a=await u9([...i.keys()]),s=[...i.keys()].filter(o=>a.has(o)).slice(0,t);return s.length===0?[]:Promise.all(s.map(async o=>{var l,c;const u=await qD(o);return{address:o,name:(u==null?void 0:u.name)||(i.get(o)??o),face:(c=(l=u==null?void 0:u.avatar)==null?void 0:l.snapshots)==null?void 0:c.face256}}))}function l9(e){if(!e||e.length===0)return null;const t=e.some(n=>n.includes("Male")),r=e.some(n=>n.includes("Female"));return t&&r?"unisex":t?"male":r?"female":null}function LL(e){var t,r,n,i,a,s;return{id:e.id,name:e.name,creator:e.creator??"",contractAddress:e.contractAddress,itemId:e.itemId??null,category:e.category,wearableCategory:((r=(t=e.data)==null?void 0:t.wearable)==null?void 0:r.category)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category),rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:e.priceCredits??0,gender:l9((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function d9(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${St.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(LL);return{items:o,total:s??r+o.length}}async function f9(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${St.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(LL);return{items:o,total:s??r+o.length}}async function HX(e){const t=new URLSearchParams({contractAddress:e,first:"1"}),r=await fetch(`${St.nftApiUrl}/v1/collections?${t.toString()}`);if(!r.ok)throw new Error(`fetchCollection ${r.status}`);const{data:n}=await r.json(),i=n==null?void 0:n[0];return i&&i.contractAddress?{contractAddress:i.contractAddress,name:i.name??"",creator:i.creator??""}:null}const C_="#a09ba8";function YN(e){if(!e)return C_;try{return en.Rarity.getColor(e.toLowerCase())||C_}catch{return C_}}const KN="radial-gradient(#c0bdc6, #a09ba8)";function p9(e){try{const[t,r]=en.Rarity.getGradient((e??"common").toLowerCase());return!t||!r?KN:`radial-gradient(${t}, ${r})`}catch{return KN}}function m9(e){const t=typeof e=="string"?e.replace("#",""):"";if(t.length<6)return"#161518";const r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*r+.587*n+.114*i>150?"#161518":"#ffffff"}var jE=function(e,t){return jE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},jE(e,t)};function Yr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jE(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var qe=function(){return qe=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(this,arguments)};function lo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function $L(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function qL(e,t){return function(r,n){t(r,n,e)}}function kL(e,t,r,n,i,a){function s(P){if(P!==void 0&&typeof P!="function")throw new TypeError("Function expected");return P}for(var o=n.kind,u=o==="getter"?"get":o==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,f=!1,p=r.length-1;p>=0;p--){var y={};for(var g in n)y[g]=g==="access"?{}:n[g];for(var g in n.access)y.access[g]=n.access[g];y.addInitializer=function(P){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(P||null))};var T=(0,r[p])(o==="accessor"?{get:c.get,set:c.set}:c[u],y);if(o==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(d=s(T.get))&&(c.get=d),(d=s(T.set))&&(c.set=d),(d=s(T.init))&&i.unshift(d)}else(d=s(T))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),f=!0}function BL(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function UL(e){return typeof e=="symbol"?e:"".concat(e)}function FL(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function HL(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function VL(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(d){s(d)}}function u(c){try{l(n.throw(c))}catch(d){s(d)}}function l(c){c.done?a(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})}function GL(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Nf=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});function xL(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Nf(t,e,r)}function kd(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function pb(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function zL(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(pb(arguments[t]));return e}function WL(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function fr(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function Ys(e){return this instanceof Ys?(this.v=e,this):new Ys(e)}function YL(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(p){return function(y){return Promise.resolve(y).then(p,d)}}function o(p,y){n[p]&&(i[p]=function(g){return new Promise(function(T,P){a.push([p,g,T,P])>1||u(p,g)})},y&&(i[p]=y(i[p])))}function u(p,y){try{l(n[p](y))}catch(g){f(a[0][3],g)}}function l(p){p.value instanceof Ys?Promise.resolve(p.value.v).then(c,d):f(a[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function f(p,y){p(y),a.shift(),a.length&&u(a[0][0],a[0][1])}}function KL(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,a){t[i]=e[i]?function(s){return(r=!r)?{value:Ys(e[i](s)),done:!1}:a?a(s):s}:a}}function XL(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof kd=="function"?kd(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,u){s=e[a](s),i(o,u,s.done,s.value)})}}function i(a,s,o,u){Promise.resolve(u).then(function(l){a({value:l,done:o})},s)}}function JL(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var h9=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},DE=function(e){return DE=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},DE(e)};function QL(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=DE(e),n=0;n<r.length;n++)r[n]!=="default"&&Nf(t,e,r[n]);return h9(t,e),t}function ZL(e){return e&&e.__esModule?e:{default:e}}function e$(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function t$(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function r$(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function n$(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var y9=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function i$(e){function t(a){e.error=e.hasError?new y9(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var r,n=0;function i(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(s){return t(s),i()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function a$(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,a,s){return n?t?".jsx":".js":i&&(!a||!s)?r:i+a+"."+s.toLowerCase()+"js"}):e}const g9={__extends:Yr,__assign:qe,__rest:lo,__decorate:$L,__param:qL,__esDecorate:kL,__runInitializers:BL,__propKey:UL,__setFunctionName:FL,__metadata:HL,__awaiter:VL,__generator:GL,__createBinding:Nf,__exportStar:xL,__values:kd,__read:pb,__spread:zL,__spreadArrays:WL,__spreadArray:fr,__await:Ys,__asyncGenerator:YL,__asyncDelegator:KL,__asyncValues:XL,__makeTemplateObject:JL,__importStar:QL,__importDefault:ZL,__classPrivateFieldGet:e$,__classPrivateFieldSet:t$,__classPrivateFieldIn:r$,__addDisposableResource:n$,__disposeResources:i$,__rewriteRelativeImportExtension:a$},VX=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:n$,get __assign(){return qe},__asyncDelegator:KL,__asyncGenerator:YL,__asyncValues:XL,__await:Ys,__awaiter:VL,__classPrivateFieldGet:e$,__classPrivateFieldIn:r$,__classPrivateFieldSet:t$,__createBinding:Nf,__decorate:$L,__disposeResources:i$,__esDecorate:kL,__exportStar:xL,__extends:Yr,__generator:GL,__importDefault:ZL,__importStar:QL,__makeTemplateObject:JL,__metadata:HL,__param:qL,__propKey:UL,__read:pb,__rest:lo,__rewriteRelativeImportExtension:a$,__runInitializers:BL,__setFunctionName:FL,__spread:zL,__spreadArray:fr,__spreadArrays:WL,__values:kd,default:g9},Symbol.toStringTag,{value:"Module"}));function Or(e,t){var r=t&&t.cache?t.cache:T9,n=t&&t.serializer?t.serializer:S9,i=t&&t.strategy?t.strategy:v9;return i(e,{cache:r,serializer:n})}function _9(e){return e==null||typeof e=="number"||typeof e=="boolean"}function E9(e,t,r,n){var i=_9(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function s$(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,n),t.set(i,a)),a}function o$(e,t,r,n,i){return r.bind(t,e,n,i)}function v9(e,t){var r=e.length===1?E9:s$;return o$(e,this,r,t.cache.create(),t.serializer)}function b9(e,t){return o$(e,this,s$,t.cache.create(),t.serializer)}var S9=function(){return JSON.stringify(arguments)};function mb(){this.cache=Object.create(null)}mb.prototype.get=function(e){return this.cache[e]};mb.prototype.set=function(e,t){this.cache[e]=t};var T9={create:function(){return new mb}},Pr={variadic:b9};function u$(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}Or(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,fr([void 0],t,!1)))},{strategy:Pr.variadic});Or(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,fr([void 0],t,!1)))},{strategy:Pr.variadic});Or(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,fr([void 0],t,!1)))},{strategy:Pr.variadic});Or(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.Locale).bind.apply(e,fr([void 0],t,!1)))},{strategy:Pr.variadic});Or(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.ListFormat).bind.apply(e,fr([void 0],t,!1)))},{strategy:Pr.variadic});var at;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(at||(at={}));var qt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(qt||(qt={}));var Ks;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ks||(Ks={}));function XN(e){return e.type===qt.literal}function I9(e){return e.type===qt.argument}function c$(e){return e.type===qt.number}function l$(e){return e.type===qt.date}function d$(e){return e.type===qt.time}function f$(e){return e.type===qt.select}function p$(e){return e.type===qt.plural}function w9(e){return e.type===qt.pound}function m$(e){return e.type===qt.tag}function h$(e){return!!(e&&typeof e=="object"&&e.type===Ks.number)}function LE(e){return!!(e&&typeof e=="object"&&e.type===Ks.dateTime)}var y$=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,R9=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function A9(e){var t={};return e.replace(R9,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var O9=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function P9(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(O9).filter(function(f){return f.length>0}),r=[],n=0,i=t;n<i.length;n++){var a=i[n],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),l=0,c=u;l<c.length;l++){var d=c[l];if(d.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:u})}return r}function N9(e){return e.replace(/^(.*?)-/,"")}var JN=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,g$=/^(@+)?(\+|#+)?[rs]?$/g,C9=/(\*)(0+)|(#+)(0+)|(0+)/g,_$=/^(0+)$/;function QN(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(g$,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function E$(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function M9(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!_$.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ZN(e){var t={},r=E$(e);return r||t}function j9(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=N9(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=qe(qe(qe({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return qe(qe({},u),ZN(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),ZN(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(C9,function(u,l,c,d,f,p){if(l)t.minimumIntegerDigits=c.length;else{if(d&&f)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(_$.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(JN.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(JN,function(u,l,c,d,f,p){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:f&&p?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+p.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var a=i.options[0];a==="w"?t=qe(qe({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=qe(qe({},t),QN(a)));continue}if(g$.test(i.stem)){t=qe(qe({},t),QN(i.stem));continue}var s=E$(i.stem);s&&(t=qe(qe({},t),s));var o=M9(i.stem);o&&(t=qe(qe({},t),o))}return t}var fd={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function D9(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var a=0;n+1<e.length&&e.charAt(n+1)===i;)a++,n++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",l=L9(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)r+=u;for(;s-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function L9(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=fd[n||""]||fd[r||""]||fd["".concat(r,"-001")]||fd["001"];return i[0]}var M_,$9=new RegExp("^".concat(y$.source,"*")),q9=new RegExp("".concat(y$.source,"*$"));function ct(e,t){return{start:e,end:t}}var k9=!!String.prototype.startsWith&&"_a".startsWith("a",1),B9=!!String.fromCodePoint,U9=!!Object.fromEntries,F9=!!String.prototype.codePointAt,H9=!!String.prototype.trimStart,V9=!!String.prototype.trimEnd,G9=!!Number.isSafeInteger,x9=G9?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},$E=!0;try{var z9=b$("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");$E=((M_=z9.exec("a"))===null||M_===void 0?void 0:M_[0])==="a"}catch{$E=!1}var eC=k9?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},qE=B9?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},tC=U9?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var a=i[n],s=a[0],o=a[1];r[s]=o}return r},v$=F9?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),a;return i<55296||i>56319||r+1===n||(a=t.charCodeAt(r+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},W9=H9?function(t){return t.trimStart()}:function(t){return t.replace($9,"")},Y9=V9?function(t){return t.trimEnd()}:function(t){return t.replace(q9,"")};function b$(e,t){return new RegExp(e,t)}var kE;if($E){var rC=b$("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");kE=function(t,r){var n;rC.lastIndex=r;var i=rC.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else kE=function(t,r){for(var n=[];;){var i=v$(t,r);if(i===void 0||S$(i)||Q9(i))break;n.push(i),r+=i>=65536?2:1}return qE.apply(void 0,n)};var K9=(function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:qt.pound,location:ct(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(at.UNMATCHED_CLOSING_TAG,ct(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&BE(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:qt.literal,value:"<".concat(i,"/>"),location:ct(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,r,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!BE(this.char()))return this.error(at.INVALID_TAG,ct(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(at.UNMATCHED_CLOSING_TAG,ct(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:qt.tag,value:i,children:s,location:ct(n,this.clonePosition())},err:null}:this.error(at.INVALID_TAG,ct(o,this.clonePosition())))}else return this.error(at.UNCLOSED_TAG,ct(n,this.clonePosition()))}else return this.error(at.INVALID_TAG,ct(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&J9(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var a=this.tryParseQuote(r);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=ct(n,this.clonePosition());return{val:{type:qt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!X9(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return qE.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),qE(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(at.EMPTY_ARGUMENT,ct(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(at.MALFORMED_ARGUMENT,ct(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:qt.argument,value:i,location:ct(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(at.MALFORMED_ARGUMENT,ct(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=kE(this.message,r),i=r+n.length;this.bumpTo(i);var a=this.clonePosition(),s=ct(t,a);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(at.EXPECT_ARGUMENT_TYPE,ct(s,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var f=Y9(d.val);if(f.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var p=ct(c,this.clonePosition());l={style:f,styleLocation:p}}var y=this.tryParseArgumentClose(i);if(y.err)return y;var g=ct(i,this.clonePosition());if(l&&eC(l==null?void 0:l.style,"::",0)){var T=W9(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(T,l.styleLocation);return d.err?d:{val:{type:qt.number,value:n,location:g,style:d.val},err:null}}else{if(T.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,g);var P=T;this.locale&&(P=D9(T,this.locale));var f={type:Ks.dateTime,pattern:P,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?A9(P):{}},m=o==="date"?qt.date:qt.time;return{val:{type:m,value:n,location:g,style:f},err:null}}}return{val:{type:o==="number"?qt.number:o==="date"?qt.date:qt.time,value:n,location:g,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(w,qe({},w)));this.bumpSpace();var I=this.parseIdentifierIfPossible(),h=0;if(o!=="select"&&I.value==="offset"){if(!this.bumpIf(":"))return this.error(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,at.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),I=this.parseIdentifierIfPossible(),h=d.val}var E=this.tryParsePluralOrSelectOptions(t,o,r,I);if(E.err)return E;var y=this.tryParseArgumentClose(i);if(y.err)return y;var v=ct(i,this.clonePosition());return o==="select"?{val:{type:qt.select,value:n,options:tC(E.val),location:v},err:null}:{val:{type:qt.plural,value:n,options:tC(E.val),offset:h,pluralType:o==="plural"?"cardinal":"ordinal",location:v},err:null}}default:return this.error(at.INVALID_ARGUMENT_TYPE,ct(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(at.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ct(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=P9(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ks.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?j9(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var a,s=!1,o=[],u=new Set,l=i.value,c=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;c=ct(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?at.DUPLICATE_SELECT_ARGUMENT_SELECTOR:at.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);l==="other"&&(s=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:at.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ct(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,r,n);if(y.err)return y;var g=this.tryParseArgumentClose(p);if(g.err)return g;o.push([l,{value:y.val,location:ct(p,this.clonePosition())}]),u.add(l),this.bumpSpace(),a=this.parseIdentifierIfPossible(),l=a.value,c=a.location}return o.length===0?this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR:at.EXPECT_PLURAL_ARGUMENT_SELECTOR,ct(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(at.MISSING_OTHER_CLAUSE,ct(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ct(i,this.clonePosition());return a?(s*=n,x9(s)?{val:s,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=v$(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(eC(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&S$(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e})();function BE(e){return e>=97&&e<=122||e>=65&&e<=90}function X9(e){return BE(e)||e===47}function J9(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function S$(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Q9(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function UE(e){e.forEach(function(t){if(delete t.location,f$(t)||p$(t))for(var r in t.options)delete t.options[r].location,UE(t.options[r].value);else c$(t)&&h$(t.style)||(l$(t)||d$(t))&&LE(t.style)?delete t.style.location:m$(t)&&UE(t.children)})}function Z9(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new K9(e,t).parse();if(r.err){var n=SyntaxError(at[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||UE(r.val),r.val}var xn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(xn||(xn={}));var qi=(function(e){Yr(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.code=n,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),nC=(function(e){Yr(t,e);function t(r,n,i,a){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),xn.INVALID_VALUE,a)||this}return t})(qi),eY=(function(e){Yr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),xn.INVALID_VALUE,i)||this}return t})(qi),tY=(function(e){Yr(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),xn.MISSING_VALUE,n)||this}return t})(qi),Ar;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ar||(Ar={}));function rY(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==Ar.literal||r.type!==Ar.literal?t.push(r):n.value+=r.value,t},[])}function T$(e){return typeof e=="function"}function Td(e,t,r,n,i,a,s){if(e.length===1&&XN(e[0]))return[{type:Ar.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var c=l[u];if(XN(c)){o.push({type:Ar.literal,value:c.value});continue}if(w9(c)){typeof a=="number"&&o.push({type:Ar.literal,value:r.getNumberFormat(t).format(a)});continue}var d=c.value;if(!(i&&d in i))throw new tY(d,s);var f=i[d];if(I9(c)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),o.push({type:typeof f=="string"?Ar.literal:Ar.object,value:f});continue}if(l$(c)){var p=typeof c.style=="string"?n.date[c.style]:LE(c.style)?c.style.parsedOptions:void 0;o.push({type:Ar.literal,value:r.getDateTimeFormat(t,p).format(f)});continue}if(d$(c)){var p=typeof c.style=="string"?n.time[c.style]:LE(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:Ar.literal,value:r.getDateTimeFormat(t,p).format(f)});continue}if(c$(c)){var p=typeof c.style=="string"?n.number[c.style]:h$(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),o.push({type:Ar.literal,value:r.getNumberFormat(t,p).format(f)});continue}if(m$(c)){var y=c.children,g=c.value,T=i[g];if(!T$(T))throw new eY(g,"function",s);var P=Td(y,t,r,n,i,a),m=T(P.map(function(h){return h.value}));Array.isArray(m)||(m=[m]),o.push.apply(o,m.map(function(h){return{type:typeof h=="string"?Ar.literal:Ar.object,value:h}}))}if(f$(c)){var w=c.options[f]||c.options.other;if(!w)throw new nC(c.value,f,Object.keys(c.options),s);o.push.apply(o,Td(w.value,t,r,n,i));continue}if(p$(c)){var w=c.options["=".concat(f)];if(!w){if(!Intl.PluralRules)throw new qi(`Intl.PluralRules is not available in this environment.
|
|
83
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
84
|
+
`,xn.MISSING_INTL_API,s);var I=r.getPluralRules(t,{type:c.pluralType}).select(f-(c.offset||0));w=c.options[I]||c.options.other}if(!w)throw new nC(c.value,f,Object.keys(c.options),s);o.push.apply(o,Td(w.value,t,r,n,i,f-(c.offset||0)));continue}}return rY(o)}function nY(e,t){return t?qe(qe(qe({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=qe(qe({},e[n]),t[n]||{}),r},{})):e}function iY(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=nY(e[n],t[n]),r},qe({},e)):e}function j_(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function aY(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Or(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,fr([void 0],r,!1)))},{cache:j_(e.number),strategy:Pr.variadic}),getDateTimeFormat:Or(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,fr([void 0],r,!1)))},{cache:j_(e.dateTime),strategy:Pr.variadic}),getPluralRules:Or(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,fr([void 0],r,!1)))},{cache:j_(e.pluralRules),strategy:Pr.variadic})}}var I$=(function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=a.formatToParts(u);if(l.length===1)return l[0].value;var c=l.reduce(function(d,f){return!d.length||f.type!==Ar.literal||typeof d[d.length-1]!="string"?d.push(f.value):d[d.length-1]+=f.value,d},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return Td(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=lo(s,["formatters"]);this.ast=e.__parse(t,qe(qe({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=iY(e.formats,n),this.formatters=i&&i.formatters||aY(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Z9,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),Ha;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Ha||(Ha={}));var tc=(function(e){Yr(t,e);function t(r,n,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
|
|
85
|
+
`).concat(s?`
|
|
86
|
+
`.concat(s.message,`
|
|
87
|
+
`).concat(s.stack):""))||this,a.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),sY=(function(e){Yr(t,e);function t(r,n){return e.call(this,Ha.UNSUPPORTED_FORMATTER,r,n)||this}return t})(tc),oY=(function(e){Yr(t,e);function t(r,n){return e.call(this,Ha.INVALID_CONFIG,r,n)||this}return t})(tc),iC=(function(e){Yr(t,e);function t(r,n){return e.call(this,Ha.MISSING_DATA,r,n)||this}return t})(tc),rn=(function(e){Yr(t,e);function t(r,n,i){var a=e.call(this,Ha.FORMAT_ERROR,"".concat(r,`
|
|
88
|
+
Locale: `).concat(n,`
|
|
89
|
+
`),i)||this;return a.locale=n,a}return t})(tc),D_=(function(e){Yr(t,e);function t(r,n,i,a){var s=e.call(this,"".concat(r,`
|
|
90
|
+
MessageID: `).concat(i==null?void 0:i.id,`
|
|
91
|
+
Default Message: `).concat(i==null?void 0:i.defaultMessage,`
|
|
92
|
+
Description: `).concat(i==null?void 0:i.description,`
|
|
93
|
+
`),n,a)||this;return s.descriptor=i,s.locale=n,s}return t})(rn),uY=(function(e){Yr(t,e);function t(r,n){var i=e.call(this,Ha.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=r,i}return t})(tc);function ts(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,i){return i in e?n[i]=e[i]:i in r&&(n[i]=r[i]),n},{})}var cY=function(e){},lY=function(e){},w$={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:cY,onWarn:lY};function R$(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Ia(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function dY(e){e===void 0&&(e=R$());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=Or(function(){for(var o,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((o=Intl.DateTimeFormat).bind.apply(o,fr([void 0],u,!1)))},{cache:Ia(e.dateTime),strategy:Pr.variadic}),a=Or(function(){for(var o,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((o=Intl.NumberFormat).bind.apply(o,fr([void 0],u,!1)))},{cache:Ia(e.number),strategy:Pr.variadic}),s=Or(function(){for(var o,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((o=Intl.PluralRules).bind.apply(o,fr([void 0],u,!1)))},{cache:Ia(e.pluralRules),strategy:Pr.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:Or(function(o,u,l,c){return new I$(o,u,l,qe({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},c||{}))},{cache:Ia(e.message),strategy:Pr.variadic}),getRelativeTimeFormat:Or(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,fr([void 0],o,!1)))},{cache:Ia(e.relativeTime),strategy:Pr.variadic}),getPluralRules:s,getListFormat:Or(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,fr([void 0],o,!1)))},{cache:Ia(e.list),strategy:Pr.variadic}),getDisplayNames:Or(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,fr([void 0],o,!1)))},{cache:Ia(e.displayNames),strategy:Pr.variadic})}}function hb(e,t,r,n){var i=e&&e[t],a;if(i&&(a=i[r]),a)return a;n(new sY("No ".concat(t," format named: ").concat(r)))}function pd(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=qe({timeZone:t},e[n]),r},{})}function aC(e,t){var r=Object.keys(qe(qe({},e),t));return r.reduce(function(n,i){return n[i]=qe(qe({},e[i]||{}),t[i]||{}),n},{})}function sC(e,t){if(!t)return e;var r=I$.formats;return qe(qe(qe({},r),e),{date:aC(pd(r.date,t),pd(e.date||{},t)),time:aC(pd(r.time,t),pd(e.time||{},t))})}var FE=function(e,t,r,n,i){var a=e.locale,s=e.formats,o=e.messages,u=e.defaultLocale,l=e.defaultFormats,c=e.fallbackOnEmptyString,d=e.onError,f=e.timeZone,p=e.defaultRichTextElements;r===void 0&&(r={id:""});var y=r.id,g=r.defaultMessage;u$(!!y,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var T=String(y),P=o&&Object.prototype.hasOwnProperty.call(o,T)&&o[T];if(Array.isArray(P)&&P.length===1&&P[0].type===qt.literal)return P[0].value;if(!n&&P&&typeof P=="string"&&!p)return P.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=qe(qe({},p),n||{}),s=sC(s,f),l=sC(l,f),!P){if(c===!1&&P==="")return P;if((!g||a&&a.toLowerCase()!==u.toLowerCase())&&d(new uY(r,a)),g)try{var m=t.getMessageFormat(g,u,l,i);return m.format(n)}catch(w){return d(new D_('Error formatting default message for: "'.concat(T,'", rendering default message verbatim'),a,r,w)),typeof g=="string"?g:T}return T}try{var m=t.getMessageFormat(P,a,s,qe({formatters:t},i||{}));return m.format(n)}catch(w){d(new D_('Error formatting message: "'.concat(T,'", using ').concat(g?"default message":"id"," as fallback."),a,r,w))}if(g)try{var m=t.getMessageFormat(g,u,l,i);return m.format(n)}catch(w){d(new D_('Error formatting the default message for: "'.concat(T,'", rendering message verbatim'),a,r,w))}return typeof P=="string"?P:typeof g=="string"?g:T},A$=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Cf(e,t,r,n){var i=e.locale,a=e.formats,s=e.onError,o=e.timeZone;n===void 0&&(n={});var u=n.format,l=qe(qe({},o&&{timeZone:o}),u&&hb(a,t,u,s)),c=ts(n,A$,l);return t==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=qe(qe({},c),{hour:"numeric",minute:"numeric"})),r(i,c)}function fY(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],a=r[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Cf(e,"date",t,s).format(o)}catch(u){e.onError(new rn("Error formatting date.",e.locale,u))}return String(o)}function pY(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],a=r[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Cf(e,"time",t,s).format(o)}catch(u){e.onError(new rn("Error formatting time.",e.locale,u))}return String(o)}function mY(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],a=r[1],s=r[2],o=s===void 0?{}:s,u=e.timeZone,l=e.locale,c=e.onError,d=ts(o,A$,u?{timeZone:u}:{});try{return t(l,d).formatRange(i,a)}catch(f){c(new rn("Error formatting date time range.",e.locale,f))}return String(i)}function hY(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],a=r[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Cf(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new rn("Error formatting date.",e.locale,u))}return[]}function yY(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],a=r[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Cf(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new rn("Error formatting time.",e.locale,u))}return[]}var gY=["style","type","fallback","languageDisplay"];function _Y(e,t,r,n){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new qi(`Intl.DisplayNames is not available in this environment.
|
|
94
|
+
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
95
|
+
`,xn.MISSING_INTL_API));var o=ts(n,gY);try{return t(i,o).of(r)}catch(u){a(new rn("Error formatting display name.",i,u))}}var EY=["type","style"],oC=Date.now();function vY(e){return"".concat(oC,"_").concat(e,"_").concat(oC)}function bY(e,t,r,n){n===void 0&&(n={});var i=O$(e,t,r,n).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return i.length===1?i[0]:i.length===0?"":i}function O$(e,t,r,n){var i=e.locale,a=e.onError;n===void 0&&(n={});var s=Intl.ListFormat;s||a(new qi(`Intl.ListFormat is not available in this environment.
|
|
96
|
+
Try polyfilling it using "@formatjs/intl-listformat"
|
|
97
|
+
`,xn.MISSING_INTL_API));var o=ts(n,EY);try{var u={},l=r.map(function(c,d){if(typeof c=="object"){var f=vY(d);return u[f]=c,f}return String(c)});return t(i,o).formatToParts(l).map(function(c){return c.type==="literal"?c:qe(qe({},c),{value:u[c.value]||c.value})})}catch(c){a(new rn("Error formatting list.",i,c))}return r}var SY=["type"];function TY(e,t,r,n){var i=e.locale,a=e.onError;n===void 0&&(n={}),Intl.PluralRules||a(new qi(`Intl.PluralRules is not available in this environment.
|
|
98
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
99
|
+
`,xn.MISSING_INTL_API));var s=ts(n,SY);try{return t(i,s).select(r)}catch(o){a(new rn("Error formatting plural.",i,o))}return"other"}var IY=["numeric","style"];function wY(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=!!s&&hb(i,"relative",s,a)||{},u=ts(r,IY,o);return t(n,u)}function RY(e,t,r,n,i){i===void 0&&(i={}),n||(n="second");var a=Intl.RelativeTimeFormat;a||e.onError(new qi(`Intl.RelativeTimeFormat is not available in this environment.
|
|
100
|
+
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
101
|
+
`,xn.MISSING_INTL_API));try{return wY(e,t,i).format(r,n)}catch(s){e.onError(new rn("Error formatting relative time.",e.locale,s))}return String(r)}var AY=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function P$(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=s&&hb(i,"number",s,a)||{},u=ts(r,AY,o);return t(n,u)}function OY(e,t,r,n){n===void 0&&(n={});try{return P$(e,t,n).format(r)}catch(i){e.onError(new rn("Error formatting number.",e.locale,i))}return String(r)}function PY(e,t,r,n){n===void 0&&(n={});try{return P$(e,t,n).formatToParts(r)}catch(i){e.onError(new rn("Error formatting number.",e.locale,i))}return[]}function NY(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function CY(e){e.onWarn&&e.defaultRichTextElements&&NY(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
102
|
+
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
103
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function MY(e,t){var r=dY(t),n=qe(qe({},w$),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new iC('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new iC('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new oY('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),CY(n),qe(qe({},n),{formatters:r,formatNumber:OY.bind(null,n,r.getNumberFormat),formatNumberToParts:PY.bind(null,n,r.getNumberFormat),formatRelativeTime:RY.bind(null,n,r.getRelativeTimeFormat),formatDate:fY.bind(null,n,r.getDateTimeFormat),formatDateToParts:hY.bind(null,n,r.getDateTimeFormat),formatTime:pY.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:mY.bind(null,n,r.getDateTimeFormat),formatTimeToParts:yY.bind(null,n,r.getDateTimeFormat),formatPlural:TY.bind(null,n,r.getPluralRules),formatMessage:FE.bind(null,n,r),$t:FE.bind(null,n,r),formatList:bY.bind(null,n,r.getListFormat),formatListToParts:O$.bind(null,n,r.getListFormat),formatDisplayName:_Y.bind(null,n,r.getDisplayNames)})}function jY(e){u$(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var DY=qe(qe({},w$),{textComponent:Se.Fragment});function LY(e){return function(t){return e(Se.Children.toArray(t))}}var yb=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Se.createContext(null)):Se.createContext(null);yb.Consumer;var $Y=yb.Provider,qY=$Y,kY=yb;function N$(){var e=Se.useContext(kY);return jY(e),e}var HE;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(HE||(HE={}));var VE;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(VE||(VE={}));function C$(e){var t=function(r){var n=N$(),i=r.value,a=r.children,s=lo(r,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?n.formatDateToParts(o,s):n.formatTimeToParts(o,s);return a(u)};return t.displayName=VE[e],t}function rc(e){var t=function(r){var n=N$(),i=r.value,a=r.children,s=lo(r,["value","children"]),o=n[e](i,s);if(typeof a=="function")return a(o);var u=n.textComponent||Se.Fragment;return Se.createElement(u,null,o)};return t.displayName=HE[e],t}function M$(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=T$(n)?LY(n):n,t},{})}var uC=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=M$(n),o=FE.apply(void 0,fr([e,t,r,s],i,!1));return Array.isArray(o)?Se.Children.toArray(o):o},BY=function(e,t){var r=e.defaultRichTextElements,n=lo(e,["defaultRichTextElements"]),i=M$(r),a=MY(qe(qe(qe({},DY),n),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return qe(qe({},a),{formatMessage:uC.bind(null,s,a.formatters),$t:uC.bind(null,s,a.formatters)})};rc("formatDate");rc("formatTime");rc("formatNumber");rc("formatList");rc("formatDisplayName");C$("formatDate");C$("formatTime");const UY={overview:"Overview",collectibles:"Collectibles",myAssets:"My Assets",myFavorites:"My Favorites",myPurchases:"My Purchases",searchPlaceholder:"Search items…",searchAria:"Search the shop",yourBalance:"Your {currency}",getCredits:"Get {currency}",cart:"Cart"},FY={suggestions:"Search suggestions",recent:"Recent searches",clearRecent:"Clear",removeRecent:"Remove “{query}” from recent searches",searching:"Searching…",noResults:"No results match “{query}”",seeAll:"See all {count} results",clear:"Clear search",creators:"Creators",collections:"Collections",items:"Items",byCreator:"By {name}"},HY={breadcrumb:"Collectibles",fallbackTitle:"Collection"},VY={title:"Page not found",body:"The page you’re looking for isn’t here. Let’s get you back to the shop.",cta:"Browse Collectibles"},GY={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},xY={nav:UY,search:FY,collection:HY,notFound:VY,cart:GY},zY={overview:"Inicio",collectibles:"Coleccionables",myAssets:"Mis artículos",myFavorites:"Mis favoritos",myPurchases:"Mis compras",searchPlaceholder:"Buscá artículos…",searchAria:"Buscar en la tienda",yourBalance:"Tus {currency}",getCredits:"Conseguir {currency}",cart:"Carrito"},WY={suggestions:"Sugerencias de búsqueda",recent:"Búsquedas recientes",clearRecent:"Limpiar",removeRecent:"Quitar «{query}» de las búsquedas recientes",searching:"Buscando…",noResults:"Ningún resultado coincide con «{query}»",seeAll:"Ver los {count} resultados",clear:"Limpiar búsqueda",creators:"Creadores",collections:"Colecciones",items:"Artículos",byCreator:"Por {name}"},YY={breadcrumb:"Coleccionables",fallbackTitle:"Colección"},KY={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},XY={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},JY={nav:zY,search:WY,collection:YY,notFound:KY,cart:XY},Id=["en","es"];function GE(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?GE(i,a,r):r[a]=String(i)}return r}const QY={en:GE(xY),es:GE(JY)},ZY=R$(),L_={};function gb(e){return L_[e]||(L_[e]=BY({locale:e,defaultLocale:"en",messages:QY[e],onError:()=>{}},ZY)),L_[e]}let j$=gb("en");function eK(e){j$=gb(e)}function Gt(e,t){return j$.formatMessage({id:e},t)}function tK(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function cC({address:e,className:t}){const{data:r}=ff(e),n=(r==null?void 0:r.name)||tK(e);return H.jsx("span",{className:t,children:Gt("search.byCreator",{name:n})})}function rK({contractAddress:e}){const{data:t}=ji({queryKey:["collection-thumb",e],queryFn:()=>d9(e,{first:4}),staleTime:3e5}),r=(t==null?void 0:t.items)??[];return r.length===0?H.jsx("span",{className:"search-pop__thumb search-pop__thumb--icon",children:H.jsx("span",{className:"ico ico-search","aria-hidden":!0})}):H.jsx("span",{className:"search-pop__thumb search-pop__thumb--mosaic","data-count":r.length,children:r.map(n=>H.jsx("span",{className:"search-pop__mosaic-cell",style:{backgroundImage:p9(n.rarity)},children:n.thumbnail?H.jsx("img",{src:n.thumbnail,alt:""}):null},n.id))})}const nK=5,iK=2;function aK({query:e,recent:t,onSelectItem:r,onSelectCollection:n,onSelectCreator:i,onRunSearch:a,onRemoveRecent:s,onClearRecent:o}){const u=e.length>=iK,{data:l,isFetching:c}=ji({queryKey:["search-suggest",e],queryFn:()=>jL({search:e,first:nK}),enabled:u,placeholderData:Ff,staleTime:3e4}),{data:d=[]}=ji({queryKey:["search-suggest-collections",e],queryFn:()=>s9(e),enabled:u,placeholderData:Ff,staleTime:3e4}),{data:f=[]}=ji({queryKey:["search-suggest-creators",e],queryFn:()=>c9(e),enabled:u,placeholderData:Ff,staleTime:3e4}),p=u?(l==null?void 0:l.items)??[]:[],y=(l==null?void 0:l.total)??0;if(!u)return t.length===0?null:H.jsxs("div",{className:"search-pop",role:"listbox","aria-label":Gt("search.suggestions"),children:[H.jsxs("div",{className:"search-pop__section-head",children:[H.jsx("span",{children:Gt("search.recent")}),H.jsx("button",{type:"button",className:"search-pop__clear",onClick:o,children:Gt("search.clearRecent")})]}),H.jsx("ul",{className:"search-pop__list",children:t.map(T=>H.jsxs("li",{className:"search-pop__recent",children:[H.jsxs("button",{type:"button",className:"search-pop__recent-btn",onClick:()=>a(T),children:[H.jsx("span",{className:"ico ico-search search-pop__recent-ico","aria-hidden":!0}),H.jsx("span",{className:"search-pop__recent-text",children:T})]}),H.jsx("button",{type:"button",className:"search-pop__recent-remove","aria-label":Gt("search.removeRecent",{query:T}),onClick:()=>s(T),children:H.jsx(CL,{})})]},T))})]});const g=p.length===0&&d.length===0&&f.length===0;return H.jsx("div",{className:"search-pop",role:"listbox","aria-label":Gt("search.suggestions"),children:g?H.jsx("p",{className:"search-pop__empty",children:c?Gt("search.searching"):Gt("search.noResults",{query:e})}):H.jsxs(H.Fragment,{children:[p.length>0?H.jsxs(H.Fragment,{children:[H.jsx("div",{className:"search-pop__section-head",children:H.jsx("span",{children:Gt("search.items")})}),H.jsx("ul",{className:"search-pop__list",children:p.map(T=>H.jsx("li",{children:H.jsxs("button",{type:"button",className:"search-pop__row",onClick:()=>r(T),children:[H.jsx("span",{className:"search-pop__thumb",children:T.thumbnail?H.jsx("img",{src:T.thumbnail,alt:""}):null}),H.jsxs("span",{className:"search-pop__text",children:[H.jsx("span",{className:"search-pop__name",title:T.name,children:T.name}),T.creator?H.jsx(cC,{address:T.creator,className:"search-pop__sub"}):null]}),H.jsxs("span",{className:"search-pop__price",children:[H.jsx(Un,{className:"ccy-mark"})," ",T.priceCredits]})]})},T.id))})]}):null,d.length>0?H.jsxs(H.Fragment,{children:[H.jsx("div",{className:"search-pop__section-head",children:H.jsx("span",{children:Gt("search.collections")})}),H.jsx("ul",{className:"search-pop__list",children:d.map(T=>H.jsx("li",{children:H.jsxs("button",{type:"button",className:"search-pop__row search-pop__row--collection",onClick:()=>n(T),children:[H.jsx(rK,{contractAddress:T.contractAddress}),H.jsxs("span",{className:"search-pop__text",children:[H.jsx("span",{className:"search-pop__name",title:T.name,children:T.name}),T.creator?H.jsx(cC,{address:T.creator,className:"search-pop__sub"}):null]})]})},T.contractAddress))})]}):null,f.length>0?H.jsxs(H.Fragment,{children:[H.jsx("div",{className:"search-pop__section-head",children:H.jsx("span",{children:Gt("search.creators")})}),H.jsx("ul",{className:"search-pop__list",children:f.map(T=>H.jsx("li",{children:H.jsxs("button",{type:"button",className:"search-pop__row search-pop__row--creator",onClick:()=>i(T),children:[H.jsx("span",{className:"search-pop__thumb search-pop__thumb--round",children:T.face?H.jsx("img",{src:T.face,alt:""}):null}),H.jsx("span",{className:"search-pop__text",children:H.jsx("span",{className:"search-pop__name",title:T.name,children:T.name})})]})},T.address))})]}):null,y>0?H.jsx("button",{type:"button",className:"search-pop__seeall",onClick:()=>a(e),children:Gt("search.seeAll",{count:y.toLocaleString()})}):null]})})}const Mf="shop:recent-searches",D$=8;function Bd(){try{const e=localStorage.getItem(Mf);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"&&r.length>0).slice(0,D$):[]}catch{return[]}}function md(e){const t=e.trim();if(t)try{const r=[t,...Bd().filter(n=>n.toLowerCase()!==t.toLowerCase())].slice(0,D$);localStorage.setItem(Mf,JSON.stringify(r))}catch{}}function sK(e){try{const t=Bd().filter(r=>r.toLowerCase()!==e.trim().toLowerCase());localStorage.setItem(Mf,JSON.stringify(t))}catch{}}function oK(){try{localStorage.removeItem(Mf)}catch{}}function uK(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=oo(),a=e==null?void 0:e.address,{data:s,isLoading:o}=ff(a),{data:u}=p8(e),l=mn(J=>J.items.length),c=YE(),[d]=eq(),f=d.get("q")??"",[p,y]=Se.useState(f),[g,T]=Se.useState(f),[P,m]=Se.useState(!1),[w,I]=Se.useState([]),h=Se.useRef(),E=Se.useRef(null);Se.useEffect(()=>{i()},[i]),Se.useEffect(()=>{y(f),T(f)},[f]),Se.useEffect(()=>{if(!P)return;const J=Q=>{E.current&&!E.current.contains(Q.target)&&m(!1)};return document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)},[P]);function v(){I(Bd()),m(!0)}function O(J){const Q=J.trim();m(!1),Q&&md(Q),c(Q?`/assets?q=${encodeURIComponent(Q)}`:"/assets",{replace:!0})}function C(J){m(!1),p.trim()&&md(p.trim()),yn("Shop Search Suggestion Clicked",{query:p.trim(),type:"item",item_id:J.id});const Q=J.tokenId??J.itemId;J.contractAddress&&Q?c(`/item/${J.contractAddress}/${Q}`,{state:{item:J,tradeId:J.tradeId}}):O(p)}function $(J){m(!1),p.trim()&&md(p.trim()),yn("Shop Search Suggestion Clicked",{query:p.trim(),type:"collection",contract_address:J.contractAddress}),c(`/collection/${J.contractAddress}`)}function B(J){m(!1),p.trim()&&md(p.trim()),yn("Shop Search Suggestion Clicked",{query:p.trim(),type:"creator",creator_address:J.address}),c(`/creator/${J.address}`)}function V(J){y(J),m(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>T(J.trim()),300)}function U(){y(""),T(""),m(!1),c("/assets",{replace:!0})}function k(J){sK(J),I(Bd())}function te(){oK(),I([])}function ie(J){if(J.key==="Escape"){m(!1);return}J.key==="Enter"&&(h.current&&clearTimeout(h.current),O(p))}return H.jsxs(H.Fragment,{children:[H.jsx(IH,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),H.jsxs("div",{className:"subnav",children:[H.jsxs("nav",{className:"subnav__tabs",children:[H.jsx(ki,{to:"/overview",children:Gt("nav.overview")}),H.jsx(ki,{to:"/assets",children:Gt("nav.collectibles")}),H.jsx(ki,{to:"/my-assets",children:Gt("nav.myAssets")}),H.jsx(ki,{to:"/my-favorites",children:Gt("nav.myFavorites")}),e?H.jsx(ki,{to:"/my-purchases",children:Gt("nav.myPurchases")}):null]}),H.jsxs("div",{className:"subnav__search",ref:E,children:[H.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),H.jsx("input",{value:p,"aria-label":Gt("nav.searchAria"),placeholder:Gt("nav.searchPlaceholder"),onChange:J=>V(J.target.value),onFocus:v,onKeyDown:ie}),p?H.jsx("button",{type:"button",className:"subnav__search-clear","aria-label":Gt("search.clear"),onClick:U,children:H.jsx(CL,{})}):null,P?H.jsx(aK,{query:g,recent:w,onSelectItem:C,onSelectCollection:$,onSelectCreator:B,onRunSearch:O,onRemoveRecent:k,onClearRecent:te}):null]}),e?H.jsxs("span",{className:"subnav__balance",title:Gt("nav.yourBalance",{currency:zs.name}),children:[H.jsx(Un,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,H.jsxs(ki,{to:"/credits",className:"subnav__credits",children:[H.jsx(Un,{className:"subnav__credits-ico"}),Gt("nav.getCredits",{currency:zs.name})]}),H.jsxs("div",{className:"subnav__cart-wrap",children:[H.jsxs(ki,{to:"/cart",className:"subnav__cart","aria-label":Gt("nav.cart"),children:[H.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?H.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),H.jsx(h8,{})]})]})]})}let cK=0;const mu=so(e=>({toasts:[],push:t=>{const r=++cK;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),GX={success:e=>mu.getState().push({message:e,kind:"success"}),error:e=>mu.getState().push({message:e,kind:"error"}),info:e=>mu.getState().push({message:e,kind:"info"})},lK={success:"✓",error:"!",info:"i"};function dK({t:e}){const t=mu(r=>r.dismiss);return Se.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),H.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[H.jsx("span",{className:"toast__icon","aria-hidden":!0,children:lK[e.kind]}),H.jsx("span",{className:"toast__msg",children:e.message})]})}function fK(){const e=mu(t=>t.toasts);return e.length===0?null:H.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>H.jsx(dK,{t},t.id))})}const pK=Se.lazy(()=>ar(()=>import("./index-DBVEZzhi.js"),__vite__mapDeps([10,1,11,4,12,13,14,6,3,15])).then(e=>({default:e.WearablePreview})));function _b(e){return H.jsx(Se.Suspense,{fallback:null,children:H.jsx(pK,{...e})})}function mK(e){return e.itemId?`urn:decentraland:${St.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}const ws=en.BodyShape.MALE,Rs=en.BodyShape.FEMALE;function xE(e){if(e.category==="emote")return[ws,Rs];switch(e.gender){case"male":return[ws];case"female":return[Rs];default:return[ws,Rs]}}function hK(e){var r;const t=(r=e==null?void 0:e.avatar)==null?void 0:r.bodyShape;return t?t.includes("BaseFemale")?Rs:ws:null}function Eb(e,t){return t==null||xE(e).includes(t)}function lC(e){return e===Rs?"Female":"Male"}function yK(e){let t=0,r=0;for(const n of e)n.category!=="emote"&&(n.gender==="male"?t++:n.gender==="female"&&r++);return t===0&&r===0?null:r>t?Rs:ws}function $a(e){return e.category!=="emote"}function Xs(e){return $a(e)?e.wearableCategory??`unknown:${e.id}`:null}const gK=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function _K(e){if(!$a(e))return"item";const t=e.wearableCategory;return t?gK.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function dC(e,t=null){const r=new Set,n=new Set;for(const i of e){const a=Xs(i);a==null||n.has(a)||Eb(i,t)&&(n.add(a),r.add(i.id))}return r}function EK(e,t,r){if(!$a(t))return e;const n=new Set(e);if(n.has(t.id))return n.delete(t.id),n;const i=Xs(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&Xs(a)===i&&n.delete(a.id);return n.add(t.id),n}function vK(e){const t=new Map;for(const n of e){const i=Xs(n);if(i==null)continue;const a=t.get(i)??[];a.push(n.id),t.set(i,a)}const r=new Set;for(const n of t.values())n.length>1&&n.forEach(i=>r.add(i));return r}function bK(e,t,r=null){const n=[];for(const i of e){if(!t.has(i.id)||!$a(i)||!Eb(i,r))continue;const a=mK(i);a&&n.push(a)}return n}const SK=Se.lazy(()=>ar(()=>import("./AnimatedBackground-fvzwNhlg.js"),__vite__mapDeps([16,1,17])));function fC(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function TK(){const e=mn(h=>h.fittingOpen),t=mn(h=>h.setFittingOpen),r=mn(h=>h.items),n=mn(h=>h.remove),i=YE(),a=oo(h=>{var E;return(E=h.session)==null?void 0:E.address}),{data:s,isFetched:o}=ff(a),u=!a||o,l=!!a&&!!s,c=l?a:"default",d=hK(s)??yK(r)??ws,[f,p]=Se.useState(()=>dC(r,d)),[y,g]=Se.useState(!1);Se.useEffect(()=>{e&&p(dC(r,d))},[e,d]),Se.useEffect(()=>{const h=new Set(r.map(E=>E.id));p(E=>{const v=new Set([...E].filter(O=>h.has(O)));return v.size===E.size?E:v})},[r]);const T=Se.useMemo(()=>vK(r),[r]),P=Se.useMemo(()=>bK(r,f,d),[r,f,d]),m=r.reduce((h,E)=>h+E.priceCredits,0),w=P.join(",");Se.useEffect(()=>{g(!1)},[w,c]);const I=Se.useRef(!1);return Se.useEffect(()=>{if(!e){I.current=!1;return}I.current||(I.current=!0,yn("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter($a).length,emotes:r.filter(h=>!$a(h)).length,cart_value_credits:m}))},[e,r,m]),Se.useEffect(()=>{if(!e)return;const h=E=>{E.key==="Escape"&&t(!1)};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,t]),!e||r.length===0?null:H.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[H.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),H.jsxs("div",{className:"fitting__panel",children:[H.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),H.jsxs("div",{className:"fitting__stage",children:[H.jsx(Se.Suspense,{fallback:null,children:H.jsx(SK,{})}),u?P.length>0?H.jsxs(H.Fragment,{children:[H.jsx(_b,{profile:c,bodyShape:l?void 0:d,urns:P,type:en.PreviewType.AVATAR,emote:en.PreviewEmote.FASHION,disableBackground:!0,disableFadeEffect:!0,dev:St.chainId===80002,onLoad:()=>g(!0)},c),y?null:H.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:H.jsx("span",{className:"fitting__spinner"})})]}):H.jsxs("div",{className:"fitting__empty-stage",children:[H.jsx("p",{children:"Nothing on right now."}),H.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):H.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:H.jsx("span",{className:"fitting__spinner"})})]}),H.jsxs("div",{className:"fitting__side",children:[H.jsxs("div",{className:"fitting__head",children:[H.jsx("h2",{className:"fitting__title",children:"Fitting room"}),H.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),H.jsx("div",{className:"fitting__items",children:r.map(h=>{const E=$a(h),v=E&&!Eb(h,d),O=f.has(h.id),C=T.has(h.id);return H.jsxs("div",{className:`fitting-row${O?" is-on":""}${v?" is-incompatible":""}`,children:[H.jsxs("label",{className:"fitting-row__toggle",children:[H.jsx("input",{type:"checkbox",checked:O,disabled:!E||v,onChange:()=>p($=>EK($,h,r))}),H.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),H.jsx("div",{className:"fitting-row__thumb",children:h.thumbnail?H.jsx("img",{src:h.thumbnail,alt:h.name}):null}),H.jsxs("div",{className:"fitting-row__info",children:[H.jsx("div",{className:"fitting-row__name",title:h.name,children:h.name}),H.jsxs("div",{className:"fitting-row__meta",children:[H.jsx("span",{className:`ico ico-slot-${E?_K(h):"item"} fitting-row__slot-ico`,title:E?fC(Xs(h)):"Emote",role:"img","aria-label":E?fC(Xs(h)):"Emote"}),C&&!v?H.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null,v?H.jsxs("span",{className:"fitting-row__incompat",title:`This item is made for the ${lC(xE(h)[0])} body shape`,children:[lC(xE(h)[0])," only"]}):null]})]}),H.jsxs("div",{className:"fitting-row__price",children:[H.jsx(Un,{className:"fitting-row__diamond"}),h.priceCredits]}),H.jsx("button",{className:"fitting-row__remove",onClick:()=>n(h.id),"aria-label":`Remove ${h.name} from cart`,title:"Remove",children:H.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},h.id)})}),H.jsxs("div",{className:"fitting__foot",children:[H.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",H.jsxs("strong",{children:[zs.symbol," ",m]})]}),H.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const L$="shop:locale";function IK(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&Id.includes(t))return t;const r=localStorage.getItem(L$);if(r&&Id.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&Id.includes(n))return n}catch{}return"en"}const zE=so(e=>({locale:IK(),setLocale:t=>{try{localStorage.setItem(L$,t)}catch{}e({locale:t})}})),wK=Se.lazy(()=>ar(()=>import("./ShopFooterInner-Bk4iHJAH.js"),__vite__mapDeps([18,1,5,15,12,3,4,6])));function RK(){const e=zE(r=>r.locale),t=zE(r=>r.setLocale);return H.jsx("div",{className:"shop-footer",children:H.jsx(Se.Suspense,{fallback:null,children:H.jsx(wK,{locale:e,onChange:r=>{Id.includes(r)&&t(r)}})})})}function AK(){const[e,t]=Se.useState(!1);return Se.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>t(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const r=window.setTimeout(()=>t(!0),1500);return()=>window.clearTimeout(r)},[]),e?H.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:H.jsx(_b,{id:"preview-warmer",profile:"default",dev:St.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function OK(){const e=oo(t=>t.session);Se.useEffect(()=>{if(!e||e.providerType!==en.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var i;return(i=t.removeListener)==null?void 0:i.call(t,"accountsChanged",n)}},[e])}function PK(e,t){return!t||!e.creator?!1:Kv(e)&&e.creator.toLowerCase()===t.toLowerCase()}function xX(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function NK(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function CK(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)>>>0;return`hsl(${t%360}, 52%, 45%)`}function MK(e,t){var r;return(((r=e==null?void 0:e.trim())==null?void 0:r[0])||t.replace(/^0x/i,"")[0]||"?").toUpperCase()}function jK({address:e,className:t,linkToProfile:r}){var f,p;const n=YE(),{data:i}=ff(e),a=(p=(f=i==null?void 0:i.avatar)==null?void 0:f.snapshots)==null?void 0:p.face256,[s,o]=Se.useState(!1);if(Se.useEffect(()=>o(!1),[a]),!e)return null;const u=(i==null?void 0:i.name)||NK(e),c=!!a&&!s?H.jsx("img",{className:"creator__ava",src:a,alt:"",loading:"lazy",onError:()=>o(!0)}):H.jsx("span",{className:"creator__ava creator__ava--letter",style:{backgroundColor:CK(e)},"aria-hidden":!0,children:MK(i==null?void 0:i.name,e)}),d=H.jsxs(H.Fragment,{children:[c,H.jsxs("span",{className:"creator__name",children:["By ",u]})]});return r?H.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${u}`,onClick:y=>{y.stopPropagation(),n(`/creator/${e}`)},children:d}):H.jsx("span",{className:`creator${t?` ${t}`:""}`,children:d})}function DK(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function LK(e,t){if(!(e>0)||!(t>=0)||t>=e)return 0;const r=Math.round((1-t/e)*100);return Math.min(99,Math.max(1,r))}function lu(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function $K(e){if(!isFinite(e)||e<=0)return"";const t=Math.floor(e/1e3),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return r>0?n>0?`${r}d ${n}h`:`${r}d`:n>0?`${n}h ${i}m`:i>0?`${i}m ${a}s`:`${a}s`}function pC(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function qK({endsAt:e,className:t}){const[r,n]=Se.useState(()=>lu(e));Se.useEffect(()=>{if(n(lu(e)),e==null)return;let a;const s=()=>{const u=lu(e);n(u);const l=pC(u);l>0&&(a=setTimeout(s,l))},o=pC(lu(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=$K(r);return i?H.jsxs("span",{className:t??"sale-countdown",children:[H.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}function kK(e){const[,t]=Se.useState(0);return Se.useEffect(()=>{const r=lu(e.saleEndsAt);if(!isFinite(r)||r<=0||r>2147483647)return;const n=setTimeout(()=>t(i=>i+1),r+1);return()=>clearTimeout(n)},[e.saleEndsAt]),DK(e)}const BK=120,UK=250;function FK(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function vb(e){const{item:t}=e,r=e.mode==="market",[n,i]=Se.useState(!1),[a,s]=Se.useState(!1),o=Se.useRef(),u=Se.useRef(),l=mn($=>$.add),c=mn($=>$.items.some(B=>B.id===t.id)),d=oo($=>{var B;return(B=$.session)==null?void 0:B.address}),f=PK(t,d),p=Ld($=>$.toggle),y=Ld($=>!!$.items[t.id]),g=!!t.contractAddress&&!!t.itemId,T=t.tokenId??t.itemId,P=!r&&!!t.contractAddress&&!!T,m=`/item/${t.contractAddress}/${T}`;function w(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),BK)}function I(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function h(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),UK)}const E=FK(t.gender),v=kK({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),O=!r&&v,C=O?LK(t.compareAtCredits,t.priceCredits):0;return H.jsxs("article",{className:`card${n?" card--hover":""}`,style:P?{cursor:"pointer"}:void 0,onMouseEnter:w,onMouseLeave:I,children:[P?H.jsx(hu,{className:"card__link",to:m,state:{item:t,tradeId:t.tradeId},"aria-label":t.name}):null,H.jsxs("div",{className:"card__media",children:[O?H.jsxs("span",{className:"card__sale-badge",children:["SALE",C>0?` -${C}%`:""]}):null,H.jsx("button",{className:`card__fav${y?" is-on":""}`,onClick:$=>{$.stopPropagation(),p(t)},"aria-label":y?"Remove from favorites":"Add to favorites",children:H.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?H.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&g?H.jsxs(H.Fragment,{children:[H.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:H.jsx(_b,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:en.PreviewType.AVATAR,emote:t.category==="emote"?void 0:en.PreviewEmote.FASHION,dev:St.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:h})}),H.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:H.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),H.jsxs("div",{className:"card__body",children:[H.jsxs("div",{className:"card__desc",children:[H.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?H.jsx(jK,{address:t.creator,className:"card__creator",linkToProfile:!0}):H.jsx("div",{className:"card__creator",children:" "})]}),H.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?H.jsxs("div",{className:"card__price card__price--market",children:[H.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),H.jsx(Un,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,H.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):O?H.jsxs("div",{className:"card__price card__price--sale",children:[H.jsxs("span",{className:"card__price-now",children:[H.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),H.jsxs("span",{className:"card__price-was",children:[H.jsx(Un,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),H.jsx(qK,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):H.jsxs("div",{className:"card__price",children:[H.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),H.jsxs("div",{className:"card__chips",children:[H.jsx("span",{className:"chip chip--rarity",style:{background:YN(t.rarity),color:m9(YN(t.rarity))},children:t.rarity}),t.category==="wearable"?H.jsx("span",{className:"chip chip--icon",children:H.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,E?H.jsx("span",{className:"chip chip--icon",children:E}):null]})]}),r&&e.mode==="market"?H.jsx("button",{className:"card__cart",onClick:$=>{$.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):H.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:$=>{$.stopPropagation(),f||l(t,"grid")},disabled:c||f,children:[f?null:H.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),f?"Your item":c?"In cart":"Add to cart"]})]})]})}const HK=8,VK=8,GK=12;function xK(){const t=IE(i=>i.followed).slice(0,HK),{data:r=[],isLoading:n}=ji({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>f9(a,{first:VK}).then(s=>s.items).catch(()=>[])));return zK(i).filter(a=>a.priceCredits>0).slice(0,GK)}});return t.length===0||!n&&r.length===0?null:H.jsxs("section",{className:"row",children:[H.jsx("div",{className:"row__head",children:H.jsx("h2",{className:"row__title",children:"From creators you follow"})}),H.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>H.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>H.jsx(vb,{item:i},i.id))})]})}function zK(e){const t=[],r=new Set,n=e.reduce((i,a)=>Math.max(i,a.length),0);for(let i=0;i<n;i++)for(const a of e){const s=a[i];s&&!r.has(s.id)&&(r.add(s.id),t.push(s))}return t}const $$="shop:recently-viewed",q$=12;function k$(){try{const e=localStorage.getItem($$);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,q$):[]}catch{return[]}}function zX(e){if(e!=null&&e.id)try{const t=[e,...k$().filter(r=>r.id!==e.id)].slice(0,q$);localStorage.setItem($$,JSON.stringify(t))}catch{}}function WK({excludeId:e}){const t=Se.useMemo(()=>k$().filter(r=>r.id!==e),[e]);return t.length===0?null:H.jsxs("section",{className:"row",children:[H.jsx("div",{className:"row__head",children:H.jsx("h2",{className:"row__title",children:"Recently viewed"})}),H.jsx("div",{className:"row__track",children:t.map(r=>H.jsx(vb,{item:r},r.id))})]})}function mC({title:e,items:t,loading:r}){return H.jsxs("section",{className:"row",children:[H.jsxs("div",{className:"row__head",children:[H.jsx("h2",{className:"row__title",children:e}),H.jsxs(hu,{className:"row__viewall",to:"/assets",children:["View all ",H.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),H.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>H.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>H.jsx(vb,{item:n},n.id))})]})}function YK(){const{data:e,isLoading:t}=ji({queryKey:["overview-listings"],queryFn:()=>jL({first:24})}),r=(e==null?void 0:e.items)??[];return H.jsxs("div",{className:"overview",children:[H.jsx("section",{className:"hero",children:H.jsxs("div",{className:"hero__inner",children:[H.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),H.jsx(hu,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),H.jsx(xK,{}),H.jsx(WK,{}),t||r.length>0?H.jsxs(H.Fragment,{children:[H.jsx(mC,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>12?H.jsx(mC,{title:"New Creations",items:r.slice(12,24),loading:!1}):null]}):H.jsxs("div",{className:"overview__empty",children:[H.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),H.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),H.jsx(hu,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const KK={"/overview":"overview","/assets":"assets","/my-assets":"my_assets","/my-favorites":"favorites","/my-purchases":"my_purchases","/import":"import","/cart":"cart","/credits":"credits","/success":"success"},XK=Se.lazy(()=>ar(()=>import("./Assets-C2SMY4Wn.js"),__vite__mapDeps([19,1,20,9,6,21,22,23,24,25,26])).then(e=>({default:e.Assets}))),JK=Se.lazy(()=>ar(()=>import("./ItemDetail-DiMc18RR.js"),__vite__mapDeps([27,1,23,24,9,6,25,28])).then(e=>({default:e.ItemDetail}))),QK=Se.lazy(()=>ar(()=>import("./Collection-DeiH22k9.js"),__vite__mapDeps([29,1,30,31,21,22,26,6])).then(e=>({default:e.Collection}))),ZK=Se.lazy(()=>ar(()=>import("./Creator-BRKRY9NQ.js"),__vite__mapDeps([32,1,30,31,21,22,26,6])).then(e=>({default:e.Creator}))),eX=Se.lazy(()=>ar(()=>import("./MyAssets-ChOIdS7f.js"),__vite__mapDeps([33,1,34,23,24,9,6,20,35,22,26,36])).then(e=>({default:e.MyAssets}))),tX=Se.lazy(()=>ar(()=>import("./MyFavorites-dpxOF1kK.js"),__vite__mapDeps([37,1,22,6])).then(e=>({default:e.MyFavorites}))),rX=Se.lazy(()=>ar(()=>import("./MyPurchases-Dg0Dl_Ff.js"),__vite__mapDeps([38,1,22,26,6])).then(e=>({default:e.MyPurchases}))),nX=Se.lazy(()=>ar(()=>import("./ImportListings-DFJCBiyn.js"),__vite__mapDeps([39,1,34,23,24,9,6,20,35,40])).then(e=>({default:e.ImportListings}))),iX=Se.lazy(()=>ar(()=>import("./Cart-BzFXsMma.js"),__vite__mapDeps([41,1,23,24,9,6,25])).then(e=>({default:e.Cart}))),aX=Se.lazy(()=>ar(()=>import("./GetCredits-Df0EJOrT.js"),__vite__mapDeps([42,1,13,6])).then(e=>({default:e.GetCredits}))),sX=Se.lazy(()=>ar(()=>import("./Success-DznSzYm_.js"),__vite__mapDeps([43,1,35,25,24,9,6])).then(e=>({default:e.Success}))),oX=Se.lazy(()=>ar(()=>import("./NotFound-BplOnkUp.js"),__vite__mapDeps([44,1,6])).then(e=>({default:e.NotFound})));function uX(){return H.jsx("div",{className:"page-loading","aria-busy":"true",children:H.jsx("span",{className:"spinner","aria-hidden":!0})})}function cX(){return H.jsxs("div",{className:"overview__empty",children:[H.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),H.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),H.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function lX(){OK();const e=tq();return Se.useEffect(()=>{b6()},[]),Se.useEffect(()=>{const t=e.pathname,r=KK[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");g6(r)},[e.pathname]),H.jsxs(H.Fragment,{children:[H.jsx(fK,{}),H.jsx(AK,{}),H.jsx(TK,{}),H.jsx(uK,{}),H.jsx("main",{className:"page",children:H.jsx(jd,{fallback:H.jsx(cX,{}),children:H.jsx(Se.Suspense,{fallback:H.jsx(uX,{}),children:H.jsxs(rq,{children:[H.jsx(Ir,{path:"/",element:H.jsx(Ub,{to:"/overview",replace:!0})}),H.jsx(Ir,{path:"/overview",element:H.jsx(YK,{})}),H.jsx(Ir,{path:"/assets",element:H.jsx(XK,{})}),H.jsx(Ir,{path:"/market",element:H.jsx(Ub,{to:"/assets",replace:!0})}),H.jsx(Ir,{path:"/item/:contractAddress/:tokenId",element:H.jsx(JK,{})}),H.jsx(Ir,{path:"/collection/:contractAddress",element:H.jsx(QK,{})}),H.jsx(Ir,{path:"/creator/:address",element:H.jsx(ZK,{})}),H.jsx(Ir,{path:"/my-assets",element:H.jsx(eX,{})}),H.jsx(Ir,{path:"/my-favorites",element:H.jsx(tX,{})}),H.jsx(Ir,{path:"/my-purchases",element:H.jsx(rX,{})}),H.jsx(Ir,{path:"/import",element:H.jsx(nX,{})}),H.jsx(Ir,{path:"/cart",element:H.jsx(iX,{})}),H.jsx(Ir,{path:"/credits",element:H.jsx(aX,{})}),H.jsx(Ir,{path:"/success",element:H.jsx(sX,{})}),H.jsx(Ir,{path:"*",element:H.jsx(oX,{})})]})})})}),H.jsx(jd,{fallback:H.jsx(H.Fragment,{}),children:H.jsx(RK,{})})]})}function dX({children:e}){const t=zE(r=>r.locale);return eK(t),H.jsx(qY,{value:gb(t),children:e},t)}O6();const fX=new Mq({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),pX=["localhost","127.0.0.1"].includes(window.location.hostname),mX=pX?void 0:"/shop";nq.createRoot(document.getElementById("root")).render(H.jsx(RC.StrictMode,{children:H.jsx(Dq,{client:fX,children:H.jsx(dX,{children:H.jsx(iq,{basename:mX,children:H.jsx(lX,{})})})})}));export{G7 as $,vb as A,_T as B,jK as C,tP as D,RX as E,IX as F,wX as G,E6 as H,OX as I,FX as J,jL as K,ff as L,mK as M,hK as N,Eb as O,yK as P,ws as Q,oL as R,X8 as S,rz as T,$i as U,Tt as V,_b as W,Z8 as X,Di as Y,W8 as Z,ar as _,HX as a,I8 as a$,IL as a0,zz as a1,Yz as a2,ab as a3,bf as a4,EL as a5,Ju as a6,nb as a7,SL as a8,ib as a9,s7 as aA,CX as aB,L8 as aC,z8 as aD,D8 as aE,sL as aF,F7 as aG,B7 as aH,RE as aI,V7 as aJ,CE as aK,vn as aL,T4 as aM,l8 as aN,U7 as aO,aL as aP,iL as aQ,nL as aR,nW as aS,sW as aT,C8 as aU,MX as aV,wu as aW,Vn as aX,ec as aY,A7 as aZ,O8 as a_,wq as aa,EX as ab,_X as ac,xq as ad,Ff as ae,hf as af,PX as ag,NX as ah,yx as ai,Hn as aj,qX as ak,xE as al,lC as am,kK as an,TX as ao,zX as ap,LK as aq,qK as ar,$X as as,DX as at,kX as au,LX as av,ME as aw,NL as ax,iW as ay,Of as az,Ld as b,w8 as b0,Zv as b1,Z7 as b2,I7 as b3,Wu as b4,qv as b5,K8 as b6,j8 as b7,J8 as b8,uW as b9,H7 as ba,VX as bb,Rv as bc,Aj as bd,Oj as be,J4 as bf,$4 as bg,oo as c,AX as d,Un as e,d9 as f,UX as g,DL as h,St as i,en as j,IE as k,f9 as l,mn as m,PK as n,GX as o,BX as p,xX as q,En as r,jX as s,Gt as t,ji as u,p8 as v,jq as w,zs as x,yn as y,Iu as z};
|